From 92bde79946cff05b65eec25847a76d3778cf811d Mon Sep 17 00:00:00 2001 From: Iain Sandoe Date: Wed, 15 May 2019 07:10:04 +0000 Subject: [PATCH] darwin, testsuite, laste piece to fix PR82920 These ae test adjustments to the scan assembler strings mostly just to catch missing __USER_LABEL_PREFIX__s on symbols. 2019-05-15 Iain Sandoe PR target/82920 * g++.dg/cet-notrack-1.C: Adjust scan assembler for Darwin. * gcc.target/i386/cet-notrack-5a.c: Likewise. * gcc.target/i386/cet-notrack-5b.c: Likewise. * gcc.target/i386/cet-notrack-6b.c: Likewise. * gcc.target/i386/cet-notrack-icf-1.c: Likewise. * gcc.target/i386/cet-notrack-icf-2.c: Likewise. * gcc.target/i386/cet-notrack-icf-3.c: Likewise. * gcc.target/i386/cet-notrack-icf-4.c: Likewise. * gcc.target/i386/cet-sjlj-3.c: Likewise. * gcc.target/i386/cet-sjlj-5.c: Likewise. From-SVN: r271199 --- gcc/testsuite/ChangeLog | 14 ++++++++++++++ gcc/testsuite/g++.dg/cet-notrack-1.C | 2 +- gcc/testsuite/gcc.target/i386/cet-notrack-5a.c | 3 ++- gcc/testsuite/gcc.target/i386/cet-notrack-5b.c | 3 ++- gcc/testsuite/gcc.target/i386/cet-notrack-6b.c | 3 ++- gcc/testsuite/gcc.target/i386/cet-notrack-icf-1.c | 4 ++-- gcc/testsuite/gcc.target/i386/cet-notrack-icf-2.c | 2 +- gcc/testsuite/gcc.target/i386/cet-notrack-icf-3.c | 4 ++-- gcc/testsuite/gcc.target/i386/cet-notrack-icf-4.c | 2 +- gcc/testsuite/gcc.target/i386/cet-sjlj-3.c | 2 +- gcc/testsuite/gcc.target/i386/cet-sjlj-5.c | 2 +- 11 files changed, 29 insertions(+), 12 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 93aa83b58c5..730a9ebfd7a 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,17 @@ +2019-05-15 Iain Sandoe + + PR target/82920 + * g++.dg/cet-notrack-1.C: Adjust scan assembler for Darwin. + * gcc.target/i386/cet-notrack-5a.c: Likewise. + * gcc.target/i386/cet-notrack-5b.c: Likewise. + * gcc.target/i386/cet-notrack-6b.c: Likewise. + * gcc.target/i386/cet-notrack-icf-1.c: Likewise. + * gcc.target/i386/cet-notrack-icf-2.c: Likewise. + * gcc.target/i386/cet-notrack-icf-3.c: Likewise. + * gcc.target/i386/cet-notrack-icf-4.c: Likewise. + * gcc.target/i386/cet-sjlj-3.c: Likewise. + * gcc.target/i386/cet-sjlj-5.c: Likewise. + 2019-05-14 Marek Polacek PR c++/68918 diff --git a/gcc/testsuite/g++.dg/cet-notrack-1.C b/gcc/testsuite/g++.dg/cet-notrack-1.C index eab0946d477..ee98fd43d58 100644 --- a/gcc/testsuite/g++.dg/cet-notrack-1.C +++ b/gcc/testsuite/g++.dg/cet-notrack-1.C @@ -1,7 +1,7 @@ /* { dg-do compile { target i?86-*-* x86_64-*-* } } */ /* { dg-options "-fcf-protection" } */ /* { dg-final { scan-assembler "endbr32|endbr64" } } */ -/* { dg-final { scan-assembler-times "\tcall\[ \t]+puts" 2 } } */ +/* { dg-final { scan-assembler-times "\tcall\[ \t]+_?puts" 2 } } */ /* { dg-final { scan-assembler-times "notrack call\[ \t]+" 1 } } */ #include diff --git a/gcc/testsuite/gcc.target/i386/cet-notrack-5a.c b/gcc/testsuite/gcc.target/i386/cet-notrack-5a.c index 50fe0db7d0c..c80b4f65926 100644 --- a/gcc/testsuite/gcc.target/i386/cet-notrack-5a.c +++ b/gcc/testsuite/gcc.target/i386/cet-notrack-5a.c @@ -2,7 +2,8 @@ /* { dg-options "-O -fcf-protection" } */ /* { dg-final { scan-assembler-times "endbr32" 1 { target ia32 } } } */ /* { dg-final { scan-assembler-times "endbr64" 1 { target { ! ia32 } } } } */ -/* { dg-final { scan-assembler-not "\tcall\[ \t]+" } } */ +/* { dg-final { scan-assembler-not "\tcall\[ \t]+" { target { ! ia32 } || { ! *-*-darwin* } } } } */ +/* { dg-final { scan-assembler-times "\tcall\[ \t]+" 1 { target { ia32 && *-*-darwin* } } } } */ /* { dg-final { scan-assembler-times "notrack call\[ \t]+" 1 } } */ int (*fptr) (int) __attribute__ ((nocf_check)); diff --git a/gcc/testsuite/gcc.target/i386/cet-notrack-5b.c b/gcc/testsuite/gcc.target/i386/cet-notrack-5b.c index 222ff62d670..255ad458a87 100644 --- a/gcc/testsuite/gcc.target/i386/cet-notrack-5b.c +++ b/gcc/testsuite/gcc.target/i386/cet-notrack-5b.c @@ -3,7 +3,8 @@ /* { dg-options "-O -fcf-protection" } */ /* { dg-final { scan-assembler-times "endbr32" 1 { target ia32 } } } */ /* { dg-final { scan-assembler-times "endbr64" 1 { target { ! ia32 } } } } */ -/* { dg-final { scan-assembler-times "\tcall\[ \t]+" 1 } } */ +/* { dg-final { scan-assembler-times "\tcall\[ \t]+" 1 { target { ! ia32 } || { ! *-*-darwin* } } } } */ +/* { dg-final { scan-assembler-times "\tcall\[ \t]+" 2 { target { ia32 && *-*-darwin* } } } } */ /* { dg-final { scan-assembler-times "notrack call\[ \t]+" 1 } } */ int (*fptr) (int) __attribute__ ((nocf_check)); diff --git a/gcc/testsuite/gcc.target/i386/cet-notrack-6b.c b/gcc/testsuite/gcc.target/i386/cet-notrack-6b.c index f27088c7283..f950d3a8689 100644 --- a/gcc/testsuite/gcc.target/i386/cet-notrack-6b.c +++ b/gcc/testsuite/gcc.target/i386/cet-notrack-6b.c @@ -2,7 +2,8 @@ /* { dg-options "-O0 -fcf-protection" } */ /* { dg-final { scan-assembler-times "endbr32" 1 { target ia32 } } } */ /* { dg-final { scan-assembler-times "endbr64" 1 { target { ! ia32 } } } } */ -/* { dg-final { scan-assembler-not "\tcall\[ \t]+" } } */ +/* { dg-final { scan-assembler-not "\tcall\[ \t]+" { target { ! ia32 } || { ! *-*-darwin* } } } } */ +/* { dg-final { scan-assembler-times "\tcall\[ \t]+" 1 { target { ia32 && *-*-darwin* } } } } */ /* { dg-final { scan-assembler-times "notrack call\[ \t]+" 1 } } */ int foo (int arg); diff --git a/gcc/testsuite/gcc.target/i386/cet-notrack-icf-1.c b/gcc/testsuite/gcc.target/i386/cet-notrack-icf-1.c index b90019f5e83..fe913e87eea 100644 --- a/gcc/testsuite/gcc.target/i386/cet-notrack-icf-1.c +++ b/gcc/testsuite/gcc.target/i386/cet-notrack-icf-1.c @@ -3,8 +3,8 @@ /* { dg-options "-O2 -fcf-protection=none" } */ /* { dg-final { scan-assembler-not "endbr" } } */ /* { dg-final { scan-assembler-not "fn3:" } } */ -/* { dg-final { scan-assembler "set\[ \t]+fn2,fn1" } } */ -/* { dg-final { scan-assembler "set\[ \t]+fn3,fn1" } } */ +/* { dg-final { scan-assembler "set\[ \t]+fn2,fn1" { target { ! *-*-darwin* } } } } */ +/* { dg-final { scan-assembler "set\[ \t]+fn3,fn1" { target { ! *-*-darwin* } } } } */ static __attribute__((noinline)) int fn1 (int x) diff --git a/gcc/testsuite/gcc.target/i386/cet-notrack-icf-2.c b/gcc/testsuite/gcc.target/i386/cet-notrack-icf-2.c index 08132a3e7ac..f15594d1f0b 100644 --- a/gcc/testsuite/gcc.target/i386/cet-notrack-icf-2.c +++ b/gcc/testsuite/gcc.target/i386/cet-notrack-icf-2.c @@ -3,7 +3,7 @@ /* { dg-options "-O2 -fcf-protection" } */ /* { dg-final { scan-assembler "endbr" } } */ /* { dg-final { scan-assembler "fn3:" } } */ -/* { dg-final { scan-assembler "set\[ \t]+fn2,fn1" } } */ +/* { dg-final { scan-assembler "set\[ \t]+fn2,fn1" { target { ! *-*-darwin* } } } } */ static __attribute__((noinline)) int fn1 (int x) diff --git a/gcc/testsuite/gcc.target/i386/cet-notrack-icf-3.c b/gcc/testsuite/gcc.target/i386/cet-notrack-icf-3.c index 3eec1e0ef8f..e1b34da31df 100644 --- a/gcc/testsuite/gcc.target/i386/cet-notrack-icf-3.c +++ b/gcc/testsuite/gcc.target/i386/cet-notrack-icf-3.c @@ -3,8 +3,8 @@ /* { dg-options "-O2 -fcf-protection=none" } */ /* { dg-final { scan-assembler-not "endbr" } } */ /* { dg-final { scan-assembler-not "fn2:" } } */ -/* { dg-final { scan-assembler "set\[ \t]+fn2,fn1" } } */ -/* { dg-final { scan-assembler "set\[ \t]+fn3,fn1" } } */ +/* { dg-final { scan-assembler "set\[ \t]+fn2,fn1" { target { ! *-*-darwin* } } } } */ +/* { dg-final { scan-assembler "set\[ \t]+fn3,fn1" { target { ! *-*-darwin* } } } } */ int (*foo)(int); diff --git a/gcc/testsuite/gcc.target/i386/cet-notrack-icf-4.c b/gcc/testsuite/gcc.target/i386/cet-notrack-icf-4.c index b5f07876b52..7d646662a4e 100644 --- a/gcc/testsuite/gcc.target/i386/cet-notrack-icf-4.c +++ b/gcc/testsuite/gcc.target/i386/cet-notrack-icf-4.c @@ -3,7 +3,7 @@ /* { dg-options "-O2 -fcf-protection" } */ /* { dg-final { scan-assembler "endbr" } } */ /* { dg-final { scan-assembler "fn2:" } } */ -/* { dg-final { scan-assembler "set\[ \t]+fn3,fn1" } } */ +/* { dg-final { scan-assembler "set\[ \t]+fn3,fn1" { target { ! *-*-darwin* } } } } */ int (*foo)(int); diff --git a/gcc/testsuite/gcc.target/i386/cet-sjlj-3.c b/gcc/testsuite/gcc.target/i386/cet-sjlj-3.c index 25117cc0c9f..e2653dbb2c5 100644 --- a/gcc/testsuite/gcc.target/i386/cet-sjlj-3.c +++ b/gcc/testsuite/gcc.target/i386/cet-sjlj-3.c @@ -3,7 +3,7 @@ /* { dg-final { scan-assembler-times "endbr32" 4 { target ia32 } } } */ /* { dg-final { scan-assembler-times "endbr64" 4 { target { ! ia32 } } } } */ /* { dg-final { scan-assembler-times "call _?setjmp" 1 } } */ -/* { dg-final { scan-assembler-times "call longjmp" 1 } } */ +/* { dg-final { scan-assembler-times "call _?longjmp" 1 } } */ #include #include diff --git a/gcc/testsuite/gcc.target/i386/cet-sjlj-5.c b/gcc/testsuite/gcc.target/i386/cet-sjlj-5.c index 1b624327d0f..8470f9cbf88 100644 --- a/gcc/testsuite/gcc.target/i386/cet-sjlj-5.c +++ b/gcc/testsuite/gcc.target/i386/cet-sjlj-5.c @@ -3,7 +3,7 @@ /* { dg-final { scan-assembler-times "endbr32" 2 { target ia32 } } } */ /* { dg-final { scan-assembler-times "endbr64" 2 { target { ! ia32 } } } } */ /* { dg-final { scan-assembler-times "call _?setjmp" 1 } } */ -/* { dg-final { scan-assembler-times "call longjmp" 1 } } */ +/* { dg-final { scan-assembler-times "call _?longjmp" 1 } } */ #include #include -- 2.30.2