[Bug c/37745] Segmentation Fault Exception with -O and signed array index

2008-10-07 Thread gcc at jme dot de
--- Comment #3 from gcc at jme dot de 2008-10-07 23:29 --- Hi Joseph, because the the problem occurs only with the compiler switch -O. And the problem occurs not if I place a "printf("xx")" between the two statements "if" and "for". Therefore, I

[Bug c/37745] New: Segmentation Fault Exception with -O and signed array index

2008-10-06 Thread gcc at jme dot de
The following code produces a segmentation fault when compiled with -O. Environment is GCC V4.2.2 (also tested with 4.1.2) on AVR32 Linux target. Cross compiled on Cygwin. With GCC V3.4.4 on Cygwin Target it works correct. Even when I insert a printf("."); between the if and the for the code works.