Skip a number of 'g++.dg/tree-prof/' test cases for '-fno-exceptions' testing
Running 'make check' with: 'RUNTESTFLAGS=--target_board=unix/-fno-exceptions', 'error: exception handling disabled' is triggered for C++ 'throw' etc. usage, and per 'gcc/testsuite/lib/gcc-dg.exp:gcc-dg-prune': # If exceptions are disabled, mark tests expecting exceptions to be enabled # as unsupported. if { ![check_effective_target_exceptions_enabled] } { if [regexp "(^|\n)\[^\n\]*: error: exception handling disabled" $text] { return "::unsupported::exception handling disabled" } ..., which generally means: -PASS: [...] (test for excess errors) +UNSUPPORTED: [...]: exception handling disabled However, this doesn't work for 'g++.dg/tree-prof/' test cases. For example: [-PASS:-]{+UNSUPPORTED:+} g++.dg/tree-prof/indir-call-prof-2.C [-compilation, -fprofile-generate -D_PROFILE_GENERATE-]{+compilation: exception handling disabled+} [-PASS:-]{+UNRESOLVED:+} g++.dg/tree-prof/indir-call-prof-2.C execution, -fprofile-generate -D_PROFILE_GENERATE [-PASS:-]{+UNRESOLVED:+} g++.dg/tree-prof/indir-call-prof-2.C compilation, -fprofile-use -D_PROFILE_USE [-PASS:-]{+UNRESOLVED:+} g++.dg/tree-prof/indir-call-prof-2.C execution, -fprofile-use -D_PROFILE_USE Dependent tests turn UNRESOLVED if the first "compilation" runs into the expected 'UNSUPPORTED: [...] compile: exception handling disabled'. Specify 'dg-require-effective-target exceptions_enabled' for those test cases. gcc/testsuite/ * g++.dg/tree-prof/indir-call-prof-2.C: Specify 'dg-require-effective-target exceptions_enabled'. * g++.dg/tree-prof/partition1.C: Likewise. * g++.dg/tree-prof/partition2.C: Likewise. * g++.dg/tree-prof/partition3.C: Likewise. * g++.dg/tree-prof/pr51719.C: Likewise. * g++.dg/tree-prof/pr57451.C: Likewise. * g++.dg/tree-prof/pr59255.C: Likewise.
This commit is contained in:
parent
94782ed707
commit
3881d010dc
7 changed files with 7 additions and 0 deletions
|
@ -1,3 +1,4 @@
|
|||
/* Explicit { dg-require-effective-target exceptions_enabled } so that dependent tests don't turn UNRESOLVED for '-fno-exceptions'. */
|
||||
/* { dg-options "-O" } */
|
||||
|
||||
int foo1(void) { return 0; }
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* Explicit { dg-require-effective-target exceptions_enabled } so that dependent tests don't turn UNRESOLVED for '-fno-exceptions'. */
|
||||
/* { dg-require-effective-target freorder } */
|
||||
/* { dg-options "-O2 -freorder-blocks-and-partition" } */
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// PR middle-end/45458
|
||||
// Explicit { dg-require-effective-target exceptions_enabled } so that dependent tests don't turn UNRESOLVED for '-fno-exceptions'.
|
||||
// { dg-require-effective-target freorder }
|
||||
// { dg-options "-O2 -fnon-call-exceptions -freorder-blocks-and-partition" }
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// PR middle-end/45566
|
||||
// Explicit { dg-require-effective-target exceptions_enabled } so that dependent tests don't turn UNRESOLVED for '-fno-exceptions'.
|
||||
// { dg-require-effective-target freorder }
|
||||
// { dg-options "-O2 -fnon-call-exceptions -freorder-blocks-and-partition" }
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// PR tree-optimization/51719
|
||||
// Explicit { dg-require-effective-target exceptions_enabled } so that dependent tests don't turn UNRESOLVED for '-fno-exceptions'.
|
||||
// { dg-options "-O -fpartial-inlining" }
|
||||
|
||||
int
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// Explicit { dg-require-effective-target exceptions_enabled } so that dependent tests don't turn UNRESOLVED for '-fno-exceptions'.
|
||||
// { dg-require-effective-target freorder }
|
||||
// { dg-options "-O2 -freorder-blocks-and-partition -g" }
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// PR c++/59255
|
||||
// Explicit { dg-require-effective-target exceptions_enabled } so that dependent tests don't turn UNRESOLVED for '-fno-exceptions'.
|
||||
// { dg-options "-std=c++11 -O2" }
|
||||
|
||||
struct S
|
||||
|
|
Loading…
Add table
Reference in a new issue