Bug 48929 - [4.7 Regression] ICE: in estimate_size_after_inlining, at ipa-inline-analysis.c:1961 with -findirect-inlining
Summary: [4.7 Regression] ICE: in estimate_size_after_inlining, at ipa-inline-analysis...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: tree-optimization (show other bugs)
Version: 4.7.0
: P3 normal
Target Milestone: 4.7.0
Assignee: Jan Hubicka
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2011-05-08 12:39 UTC by Zdenek Sojka
Modified: 2011-06-04 18:07 UTC (History)
2 users (show)

See Also:
Host: x86_64-pc-linux-gnu
Target: x86_64-pc-linux-gnu
Build:
Known to work: 4.6.1
Known to fail: 4.7.0
Last reconfirmed: 2011-05-08 14:04:22


Attachments
reduced testcase (155 bytes, text/plain)
2011-05-08 12:39 UTC, Zdenek Sojka
Details
Pack I am testing (513 bytes, patch)
2011-06-04 13:02 UTC, Jan Hubicka
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Zdenek Sojka 2011-05-08 12:39:57 UTC
Created attachment 24208 [details]
reduced testcase

Compiler output:
$ gcc -O -findirect-inlining testcase.c 
testcase.c:30:1: internal compiler error: in estimate_size_after_inlining, at ipa-inline-analysis.c:1961
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

Tested revisions:
r173545 - crash
4.6 r173059 - OK
Comment 1 H.J. Lu 2011-05-08 14:04:22 UTC
It was caused by revision 173190:

http://gcc.gnu.org/ml/gcc-cvs/2011-04/msg01386.html
Comment 2 Jan Hubicka 2011-06-04 13:02:28 UTC
Created attachment 24428 [details]
Pack I am testing

The problem is that the code assumes transitivity in edge predicates, while this is broken by bug in remap_edge_predicates.  When inlining function F that has predicate P and F contains edge with no predicates, the edge should be remapped to have predicate P.

Regtesting/bootstrapping the patch and will commit it if it passes.
Comment 3 Jan Hubicka 2011-06-04 14:24:24 UTC
Author: hubicka
Date: Sat Jun  4 14:24:20 2011
New Revision: 174638

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=174638
Log:
	PR tree-optimize/48929
	* gcc.c-torture/compile/pr48929.c: New testcase.
	* ipa-inline-analysis.c (remap_edge_predicates): Fix handling
	of empty predicate.

Added:
    trunk/gcc/testsuite/gcc.c-torture/compile/pr48929.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/ipa-inline-analysis.c
    trunk/gcc/testsuite/ChangeLog
Comment 4 Jan Hubicka 2011-06-04 18:07:27 UTC
Fixed.