[gcc r13-2970] Remove undefined behaviour from testscase.

Andrew Macleod amacleod@gcc.gnu.org
Thu Sep 29 22:34:33 GMT 2022


https://gcc.gnu.org/g:845ee38e9b40230fbb1b9825fb62146fd858cd96

commit r13-2970-g845ee38e9b40230fbb1b9825fb62146fd858cd96
Author: Andrew MacLeod <amacleod@redhat.com>
Date:   Tue Sep 27 18:42:33 2022 -0400

    Remove undefined behaviour from testscase.
    
    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.

Diff:
---
 gcc/testsuite/gcc.dg/pr102892-1.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/testsuite/gcc.dg/pr102892-1.c b/gcc/testsuite/gcc.dg/pr102892-1.c
index f08b2b84f52..faca3f2f35d 100644
--- a/gcc/testsuite/gcc.dg/pr102892-1.c
+++ b/gcc/testsuite/gcc.dg/pr102892-1.c
@@ -12,7 +12,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])


More information about the Gcc-cvs mailing list