diff options
author | Cary Coutant <ccoutant@gmail.com> | 2017-12-01 22:53:08 -0800 |
---|---|---|
committer | Cary Coutant <ccoutant@gmail.com> | 2017-12-01 22:53:08 -0800 |
commit | 0af4ccfc5bc7ded4d87f813e3754486eb5a75349 (patch) | |
tree | 1e5b1daaa4f42828338680d0bcef1ad4114e2a45 /gold/testsuite/odr_violation2.cc | |
parent | 059256c7465164fc070482dbe04ebe4e2ccf1a08 (diff) | |
download | gdb-0af4ccfc5bc7ded4d87f813e3754486eb5a75349.zip gdb-0af4ccfc5bc7ded4d87f813e3754486eb5a75349.tar.gz gdb-0af4ccfc5bc7ded4d87f813e3754486eb5a75349.tar.bz2 |
Workaround GCC 7 bug with debug line numbers causing debug_msg.sh failure.
gold/
PR gold/21841
* testsuite/debug_msg.sh: Adjust expected line numbers.
* testsuite/odr_violation2.cc (DummyFunction): New function.
Diffstat (limited to 'gold/testsuite/odr_violation2.cc')
-rw-r--r-- | gold/testsuite/odr_violation2.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gold/testsuite/odr_violation2.cc b/gold/testsuite/odr_violation2.cc index e3d30f3..aa9868f 100644 --- a/gold/testsuite/odr_violation2.cc +++ b/gold/testsuite/odr_violation2.cc @@ -23,6 +23,14 @@ void SortDescending(int array[], int size) { extern "C" int OverriddenCFunction(int i) { return i * i; } + +// Extra lines to put SometimeInlineFunction at line 30+. + +// And a dummy function to workaround a GCC 7 bug with debug line numbers. +int DummyFunction(int i) { + return i ^ 0x5555; +} + // This is inline in debug_msg.cc, which makes it a weak symbol too. int SometimesInlineFunction(int i) { return i * i; |