Add 'dg-note', 'dg-lto-note'
authorThomas Schwinge <thomas@codesourcery.com>
Thu, 6 May 2021 09:59:42 +0000 (11:59 +0200)
committerThomas Schwinge <thomas@codesourcery.com>
Tue, 18 May 2021 10:39:57 +0000 (12:39 +0200)
commit03eb779141a29f96600cd46904b88a33c4b49a66
treeeeed89ac8d0a497c6e3d34ff4eb749d6ff509ba8
parent5116b54e4644cb0d7b99891c76f8f015097f6530
Add 'dg-note', 'dg-lto-note'

That's 'dg-message "note: [...]"' with a twist: inhibit default notes pruning,
such that "if 'dg-note' is used at least once in a testcase, [notes] are not
pruned and instead must *all* be handled explicitly".

The rationale is that either you're not interested in notes at all (default
behavior of pruning all notes), but often, when you're interested in one note,
you're in fact interested in all notes, and especially interested if
*additional* notes appear over time, as GCC evolves.

gcc/testsuite/
* lib/gcc-dg.exp: Implement 'dg-note'.
* lib/prune.exp: Likewise.
* gcc.dg/vect/nodump-vect-opt-info-2.c: Use 'dg-note', and
'dg-prune-output "note: ".
* gfortran.dg/goacc/routine-external-level-of-parallelism-2.f: Use
'dg-note', match up additional notes, one class of them with
XFAILed 'dg-bogus'.
* lib/lto.exp: Implement 'dg-lto-note'.
* g++.dg/lto/odr-1_0.C: Use 'dg-lto-note', match up additional
notes.
* g++.dg/lto/odr-1_1.C: Likewise.
* g++.dg/lto/odr-2_1.C: Likewise.
libstdc++-v3/
* testsuite/lib/prune.exp: Add note about 'dg-note'.
gcc/
* doc/sourcebuild.texi: Document 'dg-note'.
gcc/doc/sourcebuild.texi
gcc/testsuite/g++.dg/lto/odr-1_0.C
gcc/testsuite/g++.dg/lto/odr-1_1.C
gcc/testsuite/g++.dg/lto/odr-2_1.C
gcc/testsuite/gcc.dg/vect/nodump-vect-opt-info-2.c
gcc/testsuite/gfortran.dg/goacc/routine-external-level-of-parallelism-2.f
gcc/testsuite/lib/gcc-dg.exp
gcc/testsuite/lib/lto.exp
gcc/testsuite/lib/prune.exp
libstdc++-v3/testsuite/lib/prune.exp