diff options
author | Marek Polacek <polacek@redhat.com> | 2023-06-29 14:57:48 -0400 |
---|---|---|
committer | Marek Polacek <polacek@redhat.com> | 2023-06-29 16:28:42 -0400 |
commit | 94c71750cdd742a981de33b7fd885f68255b937c (patch) | |
tree | aa4aa8af92c9559d61bab2e38a4801f34f88349c | |
parent | 7599b4fb1c7d71de236388d709c027a8559ffebd (diff) | |
download | gcc-94c71750cdd742a981de33b7fd885f68255b937c.zip gcc-94c71750cdd742a981de33b7fd885f68255b937c.tar.gz gcc-94c71750cdd742a981de33b7fd885f68255b937c.tar.bz2 |
testsuite: Use -fno-report-bug in gcc.dg/plugin/
Certain downstream compilers (for example, in Fedora) default to
-freport-bug. The extra output breaks the following tests. We can use
-fno-report-bug to fix that. Patch verified with:
$ make check RUNTESTFLAGS='--target_board=unix\{,-freport-bug\} plugin.exp'
gcc/testsuite/ChangeLog:
* gcc.dg/plugin/crash-test-ice-sarif.c: Use -fno-report-bug. Adjust
scan-sarif-file.
* gcc.dg/plugin/crash-test-ice-stderr.c: Use -fno-report-bug.
* gcc.dg/plugin/crash-test-write-though-null-sarif.c: Use
-fno-report-bug. Adjust scan-sarif-file.
* gcc.dg/plugin/crash-test-write-though-null-stderr.c: Use
-fno-report-bug.
4 files changed, 6 insertions, 2 deletions
diff --git a/gcc/testsuite/gcc.dg/plugin/crash-test-ice-sarif.c b/gcc/testsuite/gcc.dg/plugin/crash-test-ice-sarif.c index 3b773a9..84a4347 100644 --- a/gcc/testsuite/gcc.dg/plugin/crash-test-ice-sarif.c +++ b/gcc/testsuite/gcc.dg/plugin/crash-test-ice-sarif.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-fdiagnostics-format=sarif-file" } */ +/* { dg-additional-options "-fno-report-bug" } */ extern void inject_ice (void); @@ -56,7 +57,7 @@ void test_inject_ice (void) { dg-final { scan-sarif-file "\"contextRegion\": " } } { dg-final { scan-sarif-file "\"artifactLocation\": " } } { dg-final { scan-sarif-file "\"region\": " } } - { dg-final { scan-sarif-file "\"startLine\": 8" } } + { dg-final { scan-sarif-file "\"startLine\": 9" } } { dg-final { scan-sarif-file "\"startColumn\": 3" } } { dg-final { scan-sarif-file "\"endColumn\": 16" } } { dg-final { scan-sarif-file "\"message\": " } } diff --git a/gcc/testsuite/gcc.dg/plugin/crash-test-ice-stderr.c b/gcc/testsuite/gcc.dg/plugin/crash-test-ice-stderr.c index cee701b..0064d3b 100644 --- a/gcc/testsuite/gcc.dg/plugin/crash-test-ice-stderr.c +++ b/gcc/testsuite/gcc.dg/plugin/crash-test-ice-stderr.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-additional-options "-fno-report-bug" } */ extern void inject_ice (void); diff --git a/gcc/testsuite/gcc.dg/plugin/crash-test-write-though-null-sarif.c b/gcc/testsuite/gcc.dg/plugin/crash-test-write-though-null-sarif.c index 57caa20..83b38d2 100644 --- a/gcc/testsuite/gcc.dg/plugin/crash-test-write-though-null-sarif.c +++ b/gcc/testsuite/gcc.dg/plugin/crash-test-write-though-null-sarif.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-fdiagnostics-format=sarif-file" } */ +/* { dg-additional-options "-fno-report-bug" } */ extern void inject_write_through_null (void); @@ -56,7 +57,7 @@ void test_inject_write_through_null (void) { dg-final { scan-sarif-file "\"contextRegion\": " } } { dg-final { scan-sarif-file "\"artifactLocation\": " } } { dg-final { scan-sarif-file "\"region\": " } } - { dg-final { scan-sarif-file "\"startLine\": 8" } } + { dg-final { scan-sarif-file "\"startLine\": 9" } } { dg-final { scan-sarif-file "\"startColumn\": 3" } } { dg-final { scan-sarif-file "\"endColumn\": 31" } } { dg-final { scan-sarif-file "\"message\": " } } diff --git a/gcc/testsuite/gcc.dg/plugin/crash-test-write-though-null-stderr.c b/gcc/testsuite/gcc.dg/plugin/crash-test-write-though-null-stderr.c index 7b43e42..a9a211a 100644 --- a/gcc/testsuite/gcc.dg/plugin/crash-test-write-though-null-stderr.c +++ b/gcc/testsuite/gcc.dg/plugin/crash-test-write-though-null-stderr.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-additional-options "-fno-report-bug" } */ extern void inject_write_through_null (void); |