[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 thought it was a more target independend

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

2008-10-06 Thread joseph at codesourcery dot com
--- Comment #1 from joseph at codesourcery dot com 2008-10-06 11:58 --- Subject: Re: New: Segmentation Fault Exception with -O and signed array index On Mon, 6 Oct 2008, gcc at jme dot de wrote: The following code produces a segmentation fault when compiled with -O. Environment

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

2008-10-06 Thread rguenth at gcc dot gnu dot org
--- Comment #2 from rguenth at gcc dot gnu dot org 2008-10-06 15:59 --- This will invoke for (i=0; i0; i++) which invokes undefined behavior on signed integer overflow. -- rguenth at gcc dot gnu dot org changed: What|Removed |Added