]> gcc.gnu.org Git - gcc.git/commit
[testsuite] Add effective target ident_directive
authorTom de Vries <tdevries@suse.de>
Thu, 24 Sep 2020 08:49:02 +0000 (10:49 +0200)
committerTom de Vries <tdevries@suse.de>
Fri, 25 Sep 2020 07:06:12 +0000 (09:06 +0200)
commitfa91ca7f506b162d5f0afcffd2d7d562da6aa7fa
tree03deac5eed11153302fb4bed584d615681af2a76
parenta2b7397b501378815d1b6c5beb7cbda21f2e4ad7
[testsuite] Add effective target ident_directive

On nvptx we run into:
...
FAIL: c-c++-common/ident-1b.c  -Wc++-compat   scan-assembler GCC:
FAIL: c-c++-common/ident-2b.c  -Wc++-compat   scan-assembler GCC:
...

Using a scan-assembler directive adds -fno-indent to the compile options.
The test c-c++-common/ident-1b.c adds dg-options "-fident", and intends to
check that the -fident overrides the -fno-indent, by means of the
scan-assembler.  But for nvptx, there's no .ident directive, both with -fident
and -fno-ident.

Fix this by adding an effective target ident_directive, and requiring
it in both test-cases.

Tested on nvptx and x86_64.

gcc/testsuite/ChangeLog:

2020-09-24  Tom de Vries  <tdevries@suse.de>

* lib/target-supports.exp (check_effective_target_ident_directive): New proc.
* c-c++-common/ident-1b.c: Require effective target ident_directive.
* c-c++-common/ident-2b.c: Same.
gcc/testsuite/c-c++-common/ident-1b.c
gcc/testsuite/c-c++-common/ident-2b.c
gcc/testsuite/lib/target-supports.exp
This page took 0.068102 seconds and 6 git commands to generate.