]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Remove undefined behaviour from testscase.
authorAndrew MacLeod <amacleod@redhat.com>
Tue, 27 Sep 2022 22:42:33 +0000 (18:42 -0400)
committerRichard Biener <rguenther@suse.de>
Wed, 19 Oct 2022 09:42:31 +0000 (11:42 +0200)
There was a patch posted to remove the undefined behaviour from this
testcase, but it appear to never have been applied.

gcc/teststuite/
PR tree-optimization/102892
* gcc.dg/pr102892-1.c: Remove undefined behaviour.

gcc/testsuite/gcc.dg/pr102892-1.c

index a9302b536df6bbdabe535f84a5555fb43a05bb7b..051d09016f6f8a1f5ef28aabfa4b2ce332ba0e9f 100644 (file)
@@ -11,7 +11,7 @@ int
 main ()
 {
   long c = 0;
-  for (long a; a < 1; ++a)
+  for (long a = 0; a < 1; ++a)
     for (; c <= 1; c++) {
       bar();
       if (1 == b[c][0])