[Bug middle-end/106078] Invalid loop invariant motion with non-call-exceptions

hubicka at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Jun 24 11:40:20 GMT 2022


--- Comment #1 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
This is version that does not need -fnon-call-exceptions
If called test (NULL, 0) it should be indefinitely increasing val rather then
segfaulting.  Seems clang gets this one right.

int array[10000];
volatile int val;
int test(short *b,int s)
        for (int i = 0; i<10000;i++)
            for (int j = 0; j < 10; j+=s)

More information about the Gcc-bugs mailing list