diff options
author | Iain Sandoe <iain@sandoe.co.uk> | 2020-04-16 21:13:51 +0100 |
---|---|---|
committer | Iain Sandoe <iain@sandoe.co.uk> | 2020-04-16 21:13:51 +0100 |
commit | b084efe3fcdfcf88e1703800b9b99347e89beefb (patch) | |
tree | 21b19d7a0d2e8634f8b29ea01a860697f9993892 | |
parent | 7123347c8b44571811c4b58506b06fb09969bccb (diff) | |
download | gcc-b084efe3fcdfcf88e1703800b9b99347e89beefb.zip gcc-b084efe3fcdfcf88e1703800b9b99347e89beefb.tar.gz gcc-b084efe3fcdfcf88e1703800b9b99347e89beefb.tar.bz2 |
testsuite: Update pr94426-2 test to handle more targets [PR94426]
The function (_Z4InitIN3VARIZ1qvEUlvE_EUlvE_EEbT_) that initializes
VAR has changed siganture. It was was weak / comdat [Linux] or
weak / global [Darwin] and now is text section local.
So: test that the symbol exists, is spelled the way intended by the
ABI mangling and is not weak (or global on Darwin).
gcc/testsuite/ChangeLog:
2020-04-16 Iain Sandoe <iain@sandoe.co.uk>
PR c++/94426
* g++.dg/cpp0x/lambda/pr94426-2.C: Adjust scan-asms to test
for the change on more platforms.
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/cpp0x/lambda/pr94426-2.C | 10 |
2 files changed, 13 insertions, 2 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index ad4b7e2..d862567 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2020-04-16 Iain Sandoe <iain@sandoe.co.uk> + + * g++.dg/cpp0x/lambda/pr94426-2.C: Adjust scan-asms to test + for the change on more platforms. + 2020-04-16 Martin Jambor <mjambor@suse.cz> PR ipa/93621 diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/pr94426-2.C b/gcc/testsuite/g++.dg/cpp0x/lambda/pr94426-2.C index 3db864c..9a1c718 100644 --- a/gcc/testsuite/g++.dg/cpp0x/lambda/pr94426-2.C +++ b/gcc/testsuite/g++.dg/cpp0x/lambda/pr94426-2.C @@ -16,5 +16,11 @@ void q () } // The instantiation of VAR becomes local -// { dg-final { scan-assembler {.local _Z3VARIZ1qvEUlvE_E} { target { i?86-*-* x86_64-*-* } } } } -// { dg-final { scan-assembler {.comm _Z3VARIZ1qvEUlvE_E,1,1} { target { i?86-*-* x86_64-*-* } } } } +// { dg-final { scan-assembler {.local _Z3VARIZ1qvEUlvE_E} { target { { i?86-*-* x86_64-*-* } && { ! *-*-darwin* } } } } } +// { dg-final { scan-assembler {.comm _Z3VARIZ1qvEUlvE_E,1,1} { target { { i?86-*-* x86_64-*-* } && { ! *-*-darwin* } } } } } + +// The instantiation of VAR becomes local +// { dg-final { scan-assembler-not {.globl[ \t]+_?_Z4InitIN3VARIZ1qvEUlvE_EUlvE_EEbT_} { target *-*-darwin* } } } +// { dg-final { scan-assembler-not {.weak(_definition)?[ \t]+_?_Z4InitIN3VARIZ1qvEUlvE_EUlvE_EEbT_} { target { i?86-*-* x86_64-*-* *-*-darwin* } } } } +// Make sure it is defined with the mangling we expect. +// { dg-final { scan-assembler {_?_Z4InitIN3VARIZ1qvEUlvE_EUlvE_EEbT_:} { target { i?86-*-* x86_64-*-* *-*-darwin* } } } } |