This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[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
- From: "vmakarov at redhat dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 20 Oct 2010 03:04:27 +0000
- Subject: [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
- Auto-submitted: auto-generated
- References: <bug-42169-4@http.gcc.gnu.org/bugzilla/>
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.