Created attachment 22860 [details] reduced testcase (from gcc.c-torture/execute/pr43220.c) Compiler output: $ gcc -O -fexceptions -fnon-call-exceptions -ftrapv pr47086.c pr47086.c: In function 'foo': pr47086.c:2:1: error: BB 3 can not throw but has an EH edge pr47086.c:2:1: internal compiler error: verify_flow_info failed Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. Tested revisions: r168296 - crash I don't know if this is a regression or not.
It is caused by revision 151676: http://gcc.gnu.org/ml/gcc-cvs/2009-09/msg00423.html
We're deleting the last instruction in a loop which traps. The loop exit edge is marked as an EH edge. With the EH edge, but no trapping insn, the CFG verifier fails. Patch in testing.
Author: law Date: Tue Jan 11 14:10:54 2011 New Revision: 168659 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=168659 Log: * PR tree-optimization/47086 * tree-ssa-loop-ivopts.c (find_givs_in_stmt_scev): Do not record IVs from statements that might throw. * PR tree-optimization/47086 * gcc.dg/pr47086.c: New test. Added: trunk/gcc/testsuite/gcc.dg/pr47086.c Modified: trunk/gcc/ChangeLog trunk/gcc/testsuite/ChangeLog trunk/gcc/tree-ssa-loop-ivopts.c
Fixed on trunk
*** Bug 47087 has been marked as a duplicate of this bug. ***
Thank you for fixing this. It is not planned for backport to 4.5? Target Milestone set to 4.5.3 will cause this bug to be shown as fixed in 4.5.3, which is not true.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 01/11/11 07:22, zsojka at seznam dot cz wrote: > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47086 > > --- Comment #6 from Zdenek Sojka <zsojka at seznam dot cz> 2011-01-11 14:21:49 UTC --- > Thank you for fixing this. > > It is not planned for backport to 4.5? Target Milestone set to 4.5.3 will cause > this bug to be shown as fixed in 4.5.3, which is not true. > I wasn't planning to backport the fix; however, if you wish to do so and ask the 4.5.x branch maintainer to include the fix it wouldn't be terribly hard. I fixed the target milestone. Thanks, Jeff -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/ iQEcBAEBAgAGBQJNLGxSAAoJEBRtltQi2kC7ISsIALIyXthTTNESWwlh2GqUsg9/ c2zFnrd4Ijvypwgq3pua9LE4UV+LFdGEW6zUHyi1FpcwXvXL+GcO06DVyjRn39sf RdU0VRIknXMaPJbFjGzMHAvJQb2zfjGYxEfB6+qOPNtO+l4d5+YtIIwNQmUHRYxH dTsSDzYZ1BXx6/64AJJrCXNKd+gmXvzxHiwc1qOgPYaks3a25i3LjK5YvLTwSAiT xqtW/i8Atmupesvf43l2TRqiyCd62xcBkQW7kaKyNg+uZVm+agfvfW0v4Ln7MS8K HUIvTkifh2KxqLnBMNeN4udws3QX0zkGM3Tsu5OXVeBU+ysE5JPXwAIY2kPYUmM= =neNR -----END PGP SIGNATURE-----