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.
This commit is contained in:
Alan Modra 2019-09-21 18:13:52 +09:30
parent 77d036789a
commit a13ba30840
2 changed files with 5 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2019-09-22 Alan Modra <amodra@gmail.com>
* testsuite/ld-srec/sr3.cc (FOO_MSG_LEN): Set to 4.
2019-09-20 Nelson Chu <nelson.chu@sifive.com>
* testsuite/ld-riscv-elf/weakref32.s: Add relaxable undef weak code.

View File

@ -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;