From: Jakub Jelinek Date: Mon, 9 Sep 2024 07:37:26 +0000 (+0200) Subject: testsuite: Fix up pr116588.c test [PR116588] X-Git-Tag: basepoints/gcc-16~6011 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=765875e2c18b8f4c346b754a19e287efaec531a5;p=thirdparty%2Fgcc.git 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 PR tree-optimization/116588 * gcc.dg/pr116588.c: Remove -DDEBUG from dg-options. (main): Remove debugging code and simplify. --- diff --git a/gcc/testsuite/gcc.dg/pr116588.c b/gcc/testsuite/gcc.dg/pr116588.c index 6b0678d465e..481772a54e1 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" } } */