This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Work around gcc10 FAIL: S-records with constructors


gcc10 on x86_64 and powerpc64le recognises that the loop in
Foo::operator= can be turned into a call to memmove, which then
results in an undefined symbol when linking.  Avoid that by making the
loop smaller.

	* testsuite/ld-srec/sr3.cc (FOO_MSG_LEN): Set to 4.

diff --git a/ld/testsuite/ld-srec/sr3.cc b/ld/testsuite/ld-srec/sr3.cc
index 0b5fa7ec89..29f8019468 100644
--- a/ld/testsuite/ld-srec/sr3.cc
+++ b/ld/testsuite/ld-srec/sr3.cc
@@ -1,6 +1,6 @@
 // This file is compiled and linked into the S-record format.
 
-#define FOO_MSG_LEN 80
+#define FOO_MSG_LEN 4
 
 class Foo {
     static int foos;

-- 
Alan Modra
Australia Development Lab, IBM


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]