diff options
-rw-r--r-- | gcc/testsuite/c-c++-common/ident-1b.c | 1 | ||||
-rw-r--r-- | gcc/testsuite/c-c++-common/ident-2b.c | 1 | ||||
-rw-r--r-- | gcc/testsuite/lib/target-supports.exp | 9 |
3 files changed, 11 insertions, 0 deletions
diff --git a/gcc/testsuite/c-c++-common/ident-1b.c b/gcc/testsuite/c-c++-common/ident-1b.c index 6956744..b8b83e6 100644 --- a/gcc/testsuite/c-c++-common/ident-1b.c +++ b/gcc/testsuite/c-c++-common/ident-1b.c @@ -2,6 +2,7 @@ * Make sure scan-assembler turns off .ident unless -fident in testcase */ /* { dg-do compile } */ /* { dg-options "-fident" } */ +/* { dg-require-effective-target ident_directive }*/ int i; /* { dg-final { scan-assembler "GCC: " { xfail { { hppa*-*-hpux* && { ! lp64 } } || { powerpc-ibm-aix* || powerpc*-*-darwin* } } } } } */ diff --git a/gcc/testsuite/c-c++-common/ident-2b.c b/gcc/testsuite/c-c++-common/ident-2b.c index fae6a03..52f0693 100644 --- a/gcc/testsuite/c-c++-common/ident-2b.c +++ b/gcc/testsuite/c-c++-common/ident-2b.c @@ -2,6 +2,7 @@ * Make sure scan-assembler-times turns off .ident unless -fident in testcase */ /* { dg-do compile } */ /* { dg-options "-fident" } */ +/* { dg-require-effective-target ident_directive }*/ int ident; /* { dg-final { scan-assembler "GCC: " { xfail { { hppa*-*-hpux* && { ! lp64 } } || { powerpc-ibm-aix* || powerpc*-*-darwin* } } } } } */ diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 5cbe32f..0a00972 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -10510,3 +10510,12 @@ proc check_symver_available { } { } }] } + +# Return 1 if emitted assembly contains .ident directive. + +proc check_effective_target_ident_directive {} { + return [check_no_messages_and_pattern ident_directive \ + "(?n)^\[\t\]+\\.ident" assembly { + int i; + }] +} |