public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug tree-optimization/51694] New: [4.7 Regression] ICE while compiling alliance package @ 2011-12-28 11:06 jakub at gcc dot gnu.org 2011-12-28 11:09 ` [Bug tree-optimization/51694] " jakub at gcc dot gnu.org ` (5 more replies) 0 siblings, 6 replies; 7+ messages in thread From: jakub at gcc dot gnu.org @ 2011-12-28 11:06 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51694 Bug #: 51694 Summary: [4.7 Regression] ICE while compiling alliance package Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassigned@gcc.gnu.org ReportedBy: jakub@gcc.gnu.org CC: mkuvyrkov@gcc.gnu.org Target: x86_64-linux void foo (x, fn) void (*fn) (); { int a = baz ((void *) 0, x); (*fn) (x, 0); } void bar (void) { void *x = 0; foo (x); } ICEs at -O2 starting with http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=181377 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/51694] [4.7 Regression] ICE while compiling alliance package 2011-12-28 11:06 [Bug tree-optimization/51694] New: [4.7 Regression] ICE while compiling alliance package jakub at gcc dot gnu.org @ 2011-12-28 11:09 ` jakub at gcc dot gnu.org 2011-12-28 11:29 ` mkuvyrkov at gcc dot gnu.org ` (4 subsequent siblings) 5 siblings, 0 replies; 7+ messages in thread From: jakub at gcc dot gnu.org @ 2011-12-28 11:09 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51694 Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |4.7.0 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/51694] [4.7 Regression] ICE while compiling alliance package 2011-12-28 11:06 [Bug tree-optimization/51694] New: [4.7 Regression] ICE while compiling alliance package jakub at gcc dot gnu.org 2011-12-28 11:09 ` [Bug tree-optimization/51694] " jakub at gcc dot gnu.org @ 2011-12-28 11:29 ` mkuvyrkov at gcc dot gnu.org 2012-01-04 13:52 ` rguenth at gcc dot gnu.org ` (3 subsequent siblings) 5 siblings, 0 replies; 7+ messages in thread From: mkuvyrkov at gcc dot gnu.org @ 2011-12-28 11:29 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51694 Maxim Kuvyrkov <mkuvyrkov at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |ASSIGNED Last reconfirmed| |2011-12-28 Ever Confirmed|0 |1 --- Comment #1 from Maxim Kuvyrkov <mkuvyrkov at gcc dot gnu.org> 2011-12-28 11:09:29 UTC --- Will investigate. Jakub, thanks for reporting this. ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/51694] [4.7 Regression] ICE while compiling alliance package 2011-12-28 11:06 [Bug tree-optimization/51694] New: [4.7 Regression] ICE while compiling alliance package jakub at gcc dot gnu.org 2011-12-28 11:09 ` [Bug tree-optimization/51694] " jakub at gcc dot gnu.org 2011-12-28 11:29 ` mkuvyrkov at gcc dot gnu.org @ 2012-01-04 13:52 ` rguenth at gcc dot gnu.org 2012-01-06 11:47 ` hubicka at gcc dot gnu.org ` (2 subsequent siblings) 5 siblings, 0 replies; 7+ messages in thread From: rguenth at gcc dot gnu.org @ 2012-01-04 13:52 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51694 Richard Guenther <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P3 |P1 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/51694] [4.7 Regression] ICE while compiling alliance package 2011-12-28 11:06 [Bug tree-optimization/51694] New: [4.7 Regression] ICE while compiling alliance package jakub at gcc dot gnu.org ` (2 preceding siblings ...) 2012-01-04 13:52 ` rguenth at gcc dot gnu.org @ 2012-01-06 11:47 ` hubicka at gcc dot gnu.org 2012-01-08 16:33 ` hubicka at gcc dot gnu.org 2012-01-08 16:36 ` hubicka at gcc dot gnu.org 5 siblings, 0 replies; 7+ messages in thread From: hubicka at gcc dot gnu.org @ 2012-01-06 11:47 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51694 Jan Hubicka <hubicka at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hubicka at gcc dot gnu.org AssignedTo|unassigned at gcc dot |hubicka at gcc dot gnu.org |gnu.org | --- Comment #2 from Jan Hubicka <hubicka at gcc dot gnu.org> 2012-01-06 11:46:55 UTC --- This is the usual argument count mismatch. Foo is called only with one argument, but we don't do bound check when handling indirect call logic. The patch also disable logic in ipa-inline propagatic across uninlinable calls. We can not do that correctly + we will never inline the call anyway. I am testing the attached patch. Honza Index: ipa-cp.c =================================================================== *** ipa-cp.c (revision 182949) --- ipa-cp.c (working copy) *************** ipa_get_indirect_edge_target (struct cgr *** 1112,1118 **** if (!ie->indirect_info->polymorphic) { ! tree t = VEC_index (tree, known_vals, param_index); if (t && TREE_CODE (t) == ADDR_EXPR && TREE_CODE (TREE_OPERAND (t, 0)) == FUNCTION_DECL) --- 1112,1119 ---- if (!ie->indirect_info->polymorphic) { ! tree t = (VEC_length (tree, known_vals) > param_index ! ? VEC_index (tree, known_vals, param_index) : NULL); if (t && TREE_CODE (t) == ADDR_EXPR && TREE_CODE (TREE_OPERAND (t, 0)) == FUNCTION_DECL) *************** ipa_get_indirect_edge_target (struct cgr *** 1126,1132 **** otr_type = ie->indirect_info->otr_type; t = VEC_index (tree, known_vals, param_index); ! if (!t && known_binfos) t = VEC_index (tree, known_binfos, param_index); if (!t) return NULL_TREE; --- 1127,1133 ---- otr_type = ie->indirect_info->otr_type; t = VEC_index (tree, known_vals, param_index); ! if (!t && known_binfos && VEC_length (tree, known_binfos) > param_index) t = VEC_index (tree, known_binfos, param_index); if (!t) return NULL_TREE; Index: ipa-inline-analysis.c =================================================================== *** ipa-inline-analysis.c (revision 182949) --- ipa-inline-analysis.c (working copy) *************** evaluate_properties_for_edge (struct cgr *** 728,733 **** --- 728,734 ---- *known_binfos_ptr = NULL; if (ipa_node_params_vector + && !e->call_stmt_cannot_inline_p && ((clause_ptr && info->conds) || known_vals_ptr || known_binfos_ptr)) { struct ipa_node_params *parms_info; ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/51694] [4.7 Regression] ICE while compiling alliance package 2011-12-28 11:06 [Bug tree-optimization/51694] New: [4.7 Regression] ICE while compiling alliance package jakub at gcc dot gnu.org ` (3 preceding siblings ...) 2012-01-06 11:47 ` hubicka at gcc dot gnu.org @ 2012-01-08 16:33 ` hubicka at gcc dot gnu.org 2012-01-08 16:36 ` hubicka at gcc dot gnu.org 5 siblings, 0 replies; 7+ messages in thread From: hubicka at gcc dot gnu.org @ 2012-01-08 16:33 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51694 --- Comment #3 from Jan Hubicka <hubicka at gcc dot gnu.org> 2012-01-08 16:32:57 UTC --- Author: hubicka Date: Sun Jan 8 16:32:49 2012 New Revision: 182993 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=182993 Log: PR tree-optimize/51694 * ipa-cp.c (ipa_get_indirect_edge_target): Add bounds checks. Added: trunk/gcc/testsuite/gcc.c-torture/compile/pr51694.c Modified: trunk/gcc/ChangeLog trunk/gcc/ipa-cp.c trunk/gcc/testsuite/ChangeLog ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/51694] [4.7 Regression] ICE while compiling alliance package 2011-12-28 11:06 [Bug tree-optimization/51694] New: [4.7 Regression] ICE while compiling alliance package jakub at gcc dot gnu.org ` (4 preceding siblings ...) 2012-01-08 16:33 ` hubicka at gcc dot gnu.org @ 2012-01-08 16:36 ` hubicka at gcc dot gnu.org 5 siblings, 0 replies; 7+ messages in thread From: hubicka at gcc dot gnu.org @ 2012-01-08 16:36 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51694 Jan Hubicka <hubicka at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED --- Comment #4 from Jan Hubicka <hubicka at gcc dot gnu.org> 2012-01-08 16:35:46 UTC --- Fixed. ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-01-08 16:36 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2011-12-28 11:06 [Bug tree-optimization/51694] New: [4.7 Regression] ICE while compiling alliance package jakub at gcc dot gnu.org 2011-12-28 11:09 ` [Bug tree-optimization/51694] " jakub at gcc dot gnu.org 2011-12-28 11:29 ` mkuvyrkov at gcc dot gnu.org 2012-01-04 13:52 ` rguenth at gcc dot gnu.org 2012-01-06 11:47 ` hubicka at gcc dot gnu.org 2012-01-08 16:33 ` hubicka at gcc dot gnu.org 2012-01-08 16:36 ` hubicka at gcc dot gnu.org
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).