aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans-Peter Nilsson <hp@axis.com>2023-11-25 03:42:04 +0100
committerHans-Peter Nilsson <hp@bitrange.com>2023-11-27 00:29:01 +0100
commitbeb4328eaffc4817006d7b7bf52308aa780d106d (patch)
tree3faf873e7ef5511b7795355643fdffbe3b56ab9c
parentb2f42d0cdf0c7eed9c4c55ccdd628836414136b1 (diff)
downloadgcc-beb4328eaffc4817006d7b7bf52308aa780d106d.zip
gcc-beb4328eaffc4817006d7b7bf52308aa780d106d.tar.gz
gcc-beb4328eaffc4817006d7b7bf52308aa780d106d.tar.bz2
testsuite/gcc.dg/uninit-pred-9_b.c:20: Fix XPASS for various targets
The xfail for "*-*-*" here, set in r14-4089-gd45ddc2c04e471 "tree-optimization/111294 - backwards threader PHI costing" was somewhat too general and made this test XPASS for a number of targets. The common factor for those targets is that they either explicitly or by default define LOGICAL_OP_NON_SHORT_CIRCUIT as 0 (see fold-const.cc). Instead of changing *-*-* to a seemingly random set of xfailed targets or inventing a new testsuite effective-target predicate for logical-op-short-circuited targets or the opposite, let's just force a setting that removes the need for the xfail for all targets, by overriding with --param=logical-op-non-short-circuit=0. * gcc.dg/uninit-pred-9_b.c: Remove xfail for line 20. Pass --param=logical-op-non-short-circuit=0. Comment why.
-rw-r--r--gcc/testsuite/gcc.dg/uninit-pred-9_b.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/testsuite/gcc.dg/uninit-pred-9_b.c b/gcc/testsuite/gcc.dg/uninit-pred-9_b.c
index 3e544f3..1877d5d 100644
--- a/gcc/testsuite/gcc.dg/uninit-pred-9_b.c
+++ b/gcc/testsuite/gcc.dg/uninit-pred-9_b.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
-/* { dg-options "-Wuninitialized -O2" } */
+/* The param shuts up a bogus uninitialized warning at line 21. */
+/* { dg-options "-Wuninitialized -O2 --param=logical-op-non-short-circuit=0" } */
int g;
void bar();
@@ -17,7 +18,7 @@ int foo (int n, int l, int m, int r)
if (l > 100)
if ( (n <= 9) && (m < 100) && (r < 19) )
- blah(v); /* { dg-bogus "uninitialized" "bogus warning" { xfail *-*-* } } */
+ blah(v); /* { dg-bogus "uninitialized" "bogus warning" } */
if ( (n <= 8) && (m < 99) && (r < 19) )
blah(v); /* { dg-bogus "uninitialized" "pr101674" } */