This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/58088] [4.8/4.9 Regression] ICE in gcc.c


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...


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]