https://gcc.gnu.org/g:6ab6c84821e80c0d17e77f3a67a3a931b6fcde9d

commit r17-1501-g6ab6c84821e80c0d17e77f3a67a3a931b6fcde9d
Author: Iain Sandoe <[email protected]>
Date:   Thu Jun 11 19:30:41 2026 +0100

    testsuite, c++: Account for emulated TLS in attr tests.
    
    The output for emulated TLS does not match that of native.
    
    gcc/testsuite/ChangeLog:
    
            * c-c++-common/tls-attr-common.c: Add emulated TLS
            matches.
            * c-c++-common/tls-attr-le-pic.c: Likewise.
            * c-c++-common/tls-attr-le-pie.c: Likewise.
    
    Signed-off-by: Iain Sandoe <[email protected]>

Diff:
---
 gcc/testsuite/c-c++-common/tls-attr-common.c | 4 +++-
 gcc/testsuite/c-c++-common/tls-attr-le-pic.c | 1 +
 gcc/testsuite/c-c++-common/tls-attr-le-pie.c | 4 +++-
 3 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/gcc/testsuite/c-c++-common/tls-attr-common.c 
b/gcc/testsuite/c-c++-common/tls-attr-common.c
index 55153bbbb8f5..9fc720e60928 100644
--- a/gcc/testsuite/c-c++-common/tls-attr-common.c
+++ b/gcc/testsuite/c-c++-common/tls-attr-common.c
@@ -17,4 +17,6 @@ foo (void)
 }
 
 /* tls_model should be tls-initial-exec due to common attribute.  */
-/* { dg-final { scan-ipa-dump "Varpool flags: tls-initial-exec" 
"whole-program" } } */
+/* { dg-final { scan-ipa-dump "Varpool flags: tls-emulated" "whole-program" { 
target { ! tls_native } } } } */
+/* { dg-final { scan-ipa-dump "Varpool flags: tls-global-dynamic" 
"whole-program" { target { ! tls_native } } } } */
+/* { dg-final { scan-ipa-dump "Varpool flags: tls-initial-exec" 
"whole-program" { target tls_native } } } */
diff --git a/gcc/testsuite/c-c++-common/tls-attr-le-pic.c 
b/gcc/testsuite/c-c++-common/tls-attr-le-pic.c
index c02df6919f1a..186400e96aaa 100644
--- a/gcc/testsuite/c-c++-common/tls-attr-le-pic.c
+++ b/gcc/testsuite/c-c++-common/tls-attr-le-pic.c
@@ -12,4 +12,5 @@ foo (void)
 }
 
 /* tls_model should be local-exec due to tls_model attribute.  */
+/* { dg-final { scan-ipa-dump "Varpool flags: initialized tls-emulated" 
"whole-program" { target { ! tls_native } } } } */
 /* { dg-final { scan-ipa-dump "Varpool flags: tls-local-exec" "whole-program" 
} } */
diff --git a/gcc/testsuite/c-c++-common/tls-attr-le-pie.c 
b/gcc/testsuite/c-c++-common/tls-attr-le-pie.c
index b8ef7840d791..9051e7c3c1d6 100644
--- a/gcc/testsuite/c-c++-common/tls-attr-le-pie.c
+++ b/gcc/testsuite/c-c++-common/tls-attr-le-pie.c
@@ -12,4 +12,6 @@ ppfoo (void)
 }
 
 /* tls_model should be local-exec due to -fPIE.  */
-/* { dg-final { scan-ipa-dump "Varpool flags: initialized tls-local-exec" 
"whole-program" } } */
+/* { dg-final { scan-ipa-dump "Varpool flags: initialized tls-emulated" 
"whole-program" { target { ! tls_native } } } } */
+/* { dg-final { scan-ipa-dump "Varpool flags: tls-local-exec" "whole-program" 
{ target { ! tls_native } } } } */
+/* { dg-final { scan-ipa-dump "Varpool flags: initialized tls-local-exec" 
"whole-program" { target tls_native } } } */

Reply via email to