Tested revisions:
r159202 - fail
r159152 - fail
Compiler output:
$ gcc -O1 -fipa-cp -fipa-pta -fno-tree-pta testcase.c -DDEBUG && ./a.out
res = 0
Aborted
Corrent coutput:
$ gcc testcase.c -DDEBUG && ./a.out
res = 500500
--
Summary: Wrong code is produced with -fipa-pta -fno-tree-pta
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: zsojka at seznam dot cz
GCC host triplet: x86_64-pc-linux-gnu
GCC target triplet: x86_64-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44050