--- Comment #5 from yu19820428 at 163 dot com 2009-01-10 15:28 ---
Of course, it is a weird situation. Nobody use the options like this. However,
it is indeed a problem in 4.2.4. I do not know it has been fixed in 4.3.* or
not, because some other options may have effect on it so that it
--- Comment #3 from yu19820428 at 163 dot com 2009-01-09 14:00 ---
the options is to turn off all other optimizations while only to turn on the
-ftree-loop-linear. the result is right when -O3, but not right when only
-ftree-loop-linear is on.
--
http://gcc.gnu.org/bugzilla
--- Comment #1 from yu19820428 at 163 dot com 2009-01-09 08:32 ---
and when all optimizations are on, the results are right. but when only
tree-loop-linear on, no matter the strict-aliasing is on or off, the result is
error when the index reached the upbound.
--
yu19820428 at 163
run, the result is error.
however when I use the option O0 (all optimizations are off), the result is
right. the same problem occurs with some other test cases.
the problem is when one of the array indexes reaches the upbound, the result is
error.
--
Summary: the result when excuted with loop-linear on is different
to that with O0
Product: gcc
Version: 4.2.4
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: yu19820428 at 163 dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38778