This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/58088] [4.8/4.9 Regression] ICE in gcc.c
- From: "ktkachov at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 06 Aug 2013 08:28:08 +0000
- Subject: [Bug tree-optimization/58088] [4.8/4.9 Regression] ICE in gcc.c
- Auto-submitted: auto-generated
- References: <bug-58088-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58088
--- Comment #5 from ktkachov at gcc dot gnu.org ---
(In reply to Marek Polacek from comment #4)
> Another testcases:
>
> int
> bar (int i)
> {
> return 1 | ((i * 2) & 254);
> }
>
> int
> foo (int i)
> {
> return 1 | ((i * 2) & 255);
> }
This happens for any value of the RHS of the AND that is >= 128.
A stack overflow occurs because fold_binary_loc keeps getting called, but op1,
which is supposed to be the result of maksing the RHS with the NOT of the 2 in
(i * 2) is set to something else.
Now investigating...