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 fortran/42169] [4.4/4.5/4.6 Regression] gfortran.dg/pr41928.f90:47: internal compiler error: in store_can_be_removed_p, at ira-emit.c:371


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42169

Vladimir Makarov <vmakarov at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |vmakarov at redhat dot com

--- Comment #22 from Vladimir Makarov <vmakarov at redhat dot com> 2010-10-20 03:03:53 UTC ---
Function store_can_be_removed_p was written in assumption that the store is on
a loop exit.  Apparently it is not true.  In this case, it was actually a loop
entry from 4 to 5 in loop tree:

0->1->2->3->4->5
            |
             -->6->7

There should be some rare combinations of conditions (one is that pseudo is not
changed in whole program) to achieve gcc_unreachable for the loop entry. 
Therefore it is hard to reproduce.

There is a very simple solution which is to return false (preventing this
optimization) instead of gcc_unreachable (that is a loop entry case).

I'll send a patch soon.


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