Bug 48613 - [4.6/4.7 Regression] ICE: vector VEC(ipa_node_params_t,base) index domain error with -O0 -flto -findirect-inlining
Summary: [4.6/4.7 Regression] ICE: vector VEC(ipa_node_params_t,base) index domain err...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: tree-optimization (show other bugs)
Version: 4.7.0
: P2 normal
Target Milestone: 4.6.1
Assignee: Martin Jambor
URL:
Keywords: ice-on-valid-code, lto
Depends on:
Blocks:
 
Reported: 2011-04-14 21:01 UTC by Zdenek Sojka
Modified: 2011-06-16 20:29 UTC (History)
2 users (show)

See Also:
Host: x86_64-pc-linux-gnu
Target: x86_64-pc-linux-gnu
Build:
Known to work: 4.5.3
Known to fail: 4.6.1, 4.7.0
Last reconfirmed: 2011-04-21 12:51:31


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Zdenek Sojka 2011-04-14 21:01:01 UTC

    
Comment 1 Zdenek Sojka 2011-04-14 21:05:56 UTC
----- testcase.c -----
void foo () {}
----------------------

Compiler output:
$ gcc -flto -findirect-inlining testcase.c    
testcase.c:1:1: internal compiler error: vector VEC(ipa_node_params_t,base) index domain error, in ipa_prop_write_jump_functions at ipa-prop.c:2842
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

Tested revisions:
r172439 - crash
4.6 r172337 - crash
4.5 r172337 - OK
Comment 2 Jakub Jelinek 2011-04-21 12:51:31 UTC
-findirect-inlining with -O0 makes no sense, we should clear flag_indirect_inlining when -O0 or guard all flag_indirect_inlining uses with && optimize (currently it is done that way only in one place, which is the reason why this ICEs).
Comment 3 Richard Biener 2011-06-12 13:05:06 UTC
Martin?
Comment 4 Martin Jambor 2011-06-13 12:59:09 UTC
Confirmed. I'll take care of this.
Comment 5 Martin Jambor 2011-06-14 20:51:53 UTC
Patch posted to mailing list:

http://gcc.gnu.org/ml/gcc-patches/2011-06/msg01108.html
Comment 6 Martin Jambor 2011-06-15 11:22:38 UTC
Author: jamborm
Date: Wed Jun 15 11:22:35 2011
New Revision: 175077

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=175077
Log:
2011-06-15  Martin Jambor  <mjambor@suse.cz>

	PR tree-optimization/48613
	* ipa-prop.c (ipa_prop_write_jump_functions): Return immediately if
	ipa_node_params_vector is NULL.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/ipa-prop.c
Comment 7 Martin Jambor 2011-06-16 19:37:44 UTC
Author: jamborm
Date: Thu Jun 16 19:37:37 2011
New Revision: 175109

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=175109
Log:
2011-06-16  Martin Jambor  <mjambor@suse.cz>

	PR tree-optimization/48613
	* ipa-prop.c (ipa_prop_write_jump_functions): Return immediately if
	ipa_node_params_vector is NULL.


Modified:
    branches/gcc-4_6-branch/gcc/ChangeLog
    branches/gcc-4_6-branch/gcc/ipa-prop.c
Comment 8 Martin Jambor 2011-06-16 20:29:02 UTC
Fixed.