[Bug ipa/88936] -fipa-pta breaks bash (incorrect optimisation of recursive static function)

slyfox at inbox dot ru gcc-bugzilla@gcc.gnu.org
Mon Jan 21 08:29:00 GMT 2019


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88936

--- Comment #2 from Sergei Trofimovich <slyfox at inbox dot ru> ---
The sample output different result with -fipa-pta and without.

$ gcc -O2 -Wall -fno-stack-protector           main.c -o c-bug         &&
./c-bug
ff(1) = 1
$ gcc -O2 -Wall -fno-stack-protector -fipa-pta main.c -o c-bug-ipa-pta &&
./c-bug-ipa-pta
ff(1) = 3


More information about the Gcc-bugs mailing list