diff options
author | Jakub Jelinek <jakub@redhat.com> | 2024-09-09 09:37:26 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2024-09-09 09:43:31 +0200 |
commit | 765875e2c18b8f4c346b754a19e287efaec531a5 (patch) | |
tree | a8246b4c9fc667128049bf00e507e354236e1444 /gcc | |
parent | 00b35424cbdd0985e87e6de2c381ee3c3f7fdc21 (diff) | |
download | gcc-765875e2c18b8f4c346b754a19e287efaec531a5.zip gcc-765875e2c18b8f4c346b754a19e287efaec531a5.tar.gz gcc-765875e2c18b8f4c346b754a19e287efaec531a5.tar.bz2 |
testsuite: Fix up pr116588.c test [PR116588]
The test as committed without the tree-vrp.cc change only FAILs with
FAIL: gcc.dg/pr116588.c scan-tree-dump-not vrp2 "0 != 0"
The DEBUG code in there was just to make it easier to debug, but doesn't
actually fail when the test is miscompiled.
We don't need such debugging code in simple tests like that, but it is
useful if they abort when miscompiled.
With this patch without the tree-vrp.cc change I see
FAIL: gcc.dg/pr116588.c execution test
FAIL: gcc.dg/pr116588.c scan-tree-dump-not vrp2 "0 != 0"
and with it it passes.
2024-09-09 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/116588
* gcc.dg/pr116588.c: Remove -DDEBUG from dg-options.
(main): Remove debugging code and simplify.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/gcc.dg/pr116588.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/gcc/testsuite/gcc.dg/pr116588.c b/gcc/testsuite/gcc.dg/pr116588.c index 6b0678d..481772a 100644 --- a/gcc/testsuite/gcc.dg/pr116588.c +++ b/gcc/testsuite/gcc.dg/pr116588.c @@ -1,7 +1,7 @@ /* PR tree-optimization/116588 */ /* { dg-do run { target bitint575 } } */ /* { dg-require-effective-target int128 } */ -/* { dg-options "-O2 -fno-vect-cost-model -fno-tree-dominator-opts -fno-tree-fre --param=vrp-block-limit=0 -DDEBUG -fdump-tree-vrp2-details" } */ +/* { dg-options "-O2 -fno-vect-cost-model -fno-tree-dominator-opts -fno-tree-fre --param=vrp-block-limit=0 -fdump-tree-vrp2-details" } */ int a; __int128 b, c; @@ -18,15 +18,8 @@ foo (_BitInt (129) e) int main () { - __int128 x = foo (0); -#ifdef DEBUG - for (unsigned i = 0; i < sizeof (x); i++) - __builtin_printf ("%02x", i[(volatile unsigned char *) &x]); - __builtin_printf("\n"); -#else - if (x) - __builtin_abort(); -#endif + if (foo (0)) + __builtin_abort (); } /* { dg-final { scan-tree-dump-not "0 != 0" "vrp2" } } */ |