* [Bug ipa/64978] [5 Regression] ICE: in ipcp_verify_propagated_values, at ipa-cp.c:1060
2015-02-09 6:38 [Bug ipa/64978] New: [5 Regression] ICE: in ipcp_verify_propagated_values, at ipa-cp.c:1060 trippels at gcc dot gnu.org
@ 2015-02-09 7:39 ` jakub at gcc dot gnu.org
2015-02-09 7:57 ` trippels at gcc dot gnu.org
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-02-09 7:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64978
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
Target Milestone|--- |5.0
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug ipa/64978] [5 Regression] ICE: in ipcp_verify_propagated_values, at ipa-cp.c:1060
2015-02-09 6:38 [Bug ipa/64978] New: [5 Regression] ICE: in ipcp_verify_propagated_values, at ipa-cp.c:1060 trippels at gcc dot gnu.org
2015-02-09 7:39 ` [Bug ipa/64978] " jakub at gcc dot gnu.org
@ 2015-02-09 7:57 ` trippels at gcc dot gnu.org
2015-02-09 7:57 ` trippels at gcc dot gnu.org
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-02-09 7:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64978
--- Comment #2 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
...
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug ipa/64978] [5 Regression] ICE: in ipcp_verify_propagated_values, at ipa-cp.c:1060
2015-02-09 6:38 [Bug ipa/64978] New: [5 Regression] ICE: in ipcp_verify_propagated_values, at ipa-cp.c:1060 trippels at gcc dot gnu.org
2015-02-09 7:39 ` [Bug ipa/64978] " jakub at gcc dot gnu.org
2015-02-09 7:57 ` trippels at gcc dot gnu.org
@ 2015-02-09 7:57 ` trippels at gcc dot gnu.org
2015-02-09 13:02 ` alserkli at inbox dot ru
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-02-09 7:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64978
--- Comment #1 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Created attachment 34698
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34698&action=edit
ipa-cp-dump
...
182467 IPA lattices after constant propagation, before gcc_unreachable:
182468
182469 Lattices:
182470 Node: __deleting_dtor /202322:
182471 param [0]: BOTTOM
182472 ctxs: BOTTOM
182473 Alignment unusable
182474 AGGS BOTTOM
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug ipa/64978] [5 Regression] ICE: in ipcp_verify_propagated_values, at ipa-cp.c:1060
2015-02-09 6:38 [Bug ipa/64978] New: [5 Regression] ICE: in ipcp_verify_propagated_values, at ipa-cp.c:1060 trippels at gcc dot gnu.org
` (2 preceding siblings ...)
2015-02-09 7:57 ` trippels at gcc dot gnu.org
@ 2015-02-09 13:02 ` alserkli at inbox dot ru
2015-02-09 14:36 ` rguenth at gcc dot gnu.org
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: alserkli at inbox dot ru @ 2015-02-09 13:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64978
Alexander Klimov <alserkli at inbox dot ru> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |alserkli at inbox dot ru
--- Comment #4 from Alexander Klimov <alserkli at inbox dot ru> ---
Created attachment 34703
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34703&action=edit
gzipped source code that gives same ICE
The same ICE trace
0x127f05a ipcp_verify_propagated_values()
/gcc/gcc/ipa-cp.c:1060
0x1280b92 ipcp_propagate_stage
/gcc/gcc/ipa-cp.c:2761
0x1280b92 ipcp_driver
/gcc/gcc/ipa-cp.c:4410
0x1280b92 execute
/gcc/gcc/ipa-cp.c:4505
during compilation of root with g++ (GCC) 5.0.0 20150209
$ g++ -O2 -std=c++11 -c VTableBuilder.ii
/root/interpreter/llvm/src/tools/clang/lib/AST/VTableBuilder.cpp:3491:1:
internal compiler error: in ipcp_verify_propagated_values, at ipa-cp.c:1060
This does not give an ICE on GCC 20150120.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug ipa/64978] [5 Regression] ICE: in ipcp_verify_propagated_values, at ipa-cp.c:1060
2015-02-09 6:38 [Bug ipa/64978] New: [5 Regression] ICE: in ipcp_verify_propagated_values, at ipa-cp.c:1060 trippels at gcc dot gnu.org
` (3 preceding siblings ...)
2015-02-09 13:02 ` alserkli at inbox dot ru
@ 2015-02-09 14:36 ` rguenth at gcc dot gnu.org
2015-02-09 16:34 ` trippels at gcc dot gnu.org
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-02-09 14:36 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64978
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P1
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug ipa/64978] [5 Regression] ICE: in ipcp_verify_propagated_values, at ipa-cp.c:1060
2015-02-09 6:38 [Bug ipa/64978] New: [5 Regression] ICE: in ipcp_verify_propagated_values, at ipa-cp.c:1060 trippels at gcc dot gnu.org
` (4 preceding siblings ...)
2015-02-09 14:36 ` rguenth at gcc dot gnu.org
@ 2015-02-09 16:34 ` trippels at gcc dot gnu.org
2015-02-09 20:29 ` hubicka at gcc dot gnu.org
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-02-09 16:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64978
--- Comment #6 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
IPA lattices after constant propagation, before gcc_unreachable:
Lattices:
Node: void {anonymous}::C::m_fn3(A, unsigned int, const int*, int&)/10:
param [0]: TOP
ctxs: VARIABLE
Alignment unusable
AGGS VARIABLE
Node: unsigned int B::m_fn2()/6:
param [0]: BOTTOM
ctxs: BOTTOM
Alignment unusable
AGGS BOTTOM
Node: void B::m_fn1(bool, const int*, int&)/5:
param [0]: BOTTOM
ctxs: BOTTOM
Alignment unusable
AGGS BOTTOM
param [1]: BOTTOM
ctxs: BOTTOM
Alignment unusable
AGGS BOTTOM
param [2]: BOTTOM
ctxs: BOTTOM
Alignment unusable
AGGS BOTTOM
param [3]: BOTTOM
ctxs: BOTTOM
Alignment unusable
AGGS BOTTOM
Node: {anonymous}::C::C()/1:
param [0]: VARIABLE
ctxs: VARIABLE
Alignment 16, misalignment 0
AGGS VARIABLE
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug ipa/64978] [5 Regression] ICE: in ipcp_verify_propagated_values, at ipa-cp.c:1060
2015-02-09 6:38 [Bug ipa/64978] New: [5 Regression] ICE: in ipcp_verify_propagated_values, at ipa-cp.c:1060 trippels at gcc dot gnu.org
` (5 preceding siblings ...)
2015-02-09 16:34 ` trippels at gcc dot gnu.org
@ 2015-02-09 20:29 ` hubicka at gcc dot gnu.org
2015-02-09 21:16 ` hubicka at gcc dot gnu.org
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: hubicka at gcc dot gnu.org @ 2015-02-09 20:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64978
Jan Hubicka <hubicka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2015-02-09
CC| |mjambor at suse dot cz
Ever confirmed|0 |1
--- Comment #7 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
Adding Martin to CC. This ICE usually means that there is someting that seems
unreachable for ipa-prop but it is not removed by unreachable_function_nodes
call.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug ipa/64978] [5 Regression] ICE: in ipcp_verify_propagated_values, at ipa-cp.c:1060
2015-02-09 6:38 [Bug ipa/64978] New: [5 Regression] ICE: in ipcp_verify_propagated_values, at ipa-cp.c:1060 trippels at gcc dot gnu.org
` (6 preceding siblings ...)
2015-02-09 20:29 ` hubicka at gcc dot gnu.org
@ 2015-02-09 21:16 ` hubicka at gcc dot gnu.org
2015-02-09 22:39 ` hubicka at gcc dot gnu.org
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: hubicka at gcc dot gnu.org @ 2015-02-09 21:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64978
--- Comment #8 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
My changes pushed the following two symbols local (which they are). How that
affect ipa-prop's propagation is bit behind my current understanding...
_ZN12_GLOBAL__N_11CC1Ev/2 ({anonymous}::C::C()) @0x7ffff6ae77a8
Type: function definition analyzed alias cpp_implicit_alias
Visibility: prevailing_def_ironly
References: _ZN12_GLOBAL__N_11CC2Ev/1 (alias)
Referring:
Availability: local
First run: 0
Function flags: local
Called by: _ZN1B5m_fn1EbPKiRi/5 (1.00 per call) (can throw external)
Calls:
_ZN12_GLOBAL__N_11CC2Ev/1 ({anonymous}::C::C()) @0x7ffff6ae7620
Type: function definition analyzed
Visibility: prevailing_def_ironly
References:
Referring: _ZN12_GLOBAL__N_11CC1Ev/2 (alias)
Availability: local
First run: 0
Function flags: body local executed_once
Called by:
Calls: _ZN12_GLOBAL__N_11C5m_fn3E1AjPKiRi.isra.0/10 (1.00 per call) (can
throw external) _ZN1AC1Eii/7 (1.00 per call) (can throw external)
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug ipa/64978] [5 Regression] ICE: in ipcp_verify_propagated_values, at ipa-cp.c:1060
2015-02-09 6:38 [Bug ipa/64978] New: [5 Regression] ICE: in ipcp_verify_propagated_values, at ipa-cp.c:1060 trippels at gcc dot gnu.org
` (7 preceding siblings ...)
2015-02-09 21:16 ` hubicka at gcc dot gnu.org
@ 2015-02-09 22:39 ` hubicka at gcc dot gnu.org
2015-02-10 0:39 ` hubicka at gcc dot gnu.org
2015-02-10 13:08 ` trippels at gcc dot gnu.org
10 siblings, 0 replies; 12+ messages in thread
From: hubicka at gcc dot gnu.org @ 2015-02-09 22:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64978
--- Comment #9 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
OK, I think I found the bug - when doing the dataflow, we need to push the
actual function not alias visited.
Index: ipa-cp.c
===================================================================
--- ipa-cp.c (revision 220547)
+++ ipa-cp.c (working copy)
@@ -561,8 +561,7 @@ gather_caller_stats (struct cgraph_node
for (cs = node->callers; cs; cs = cs->next_caller)
if (cs->caller->thunk.thunk_p)
- cs->caller->call_for_symbol_thunks_and_aliases (gather_caller_stats,
- stats, false);
+ ;
else
{
stats->count_sum += cs->count;
@@ -2643,7 +2642,7 @@ propagate_constants_topo (struct ipa_top
for (cs = v->callees; cs; cs = cs->next_callee)
if (ipa_edge_within_scc (cs)
&& propagate_constants_accross_call (cs))
- push_node_to_stack (topo, cs->callee);
+ push_node_to_stack (topo, cs->callee->function_symbol ());
v = pop_node_from_stack (topo);
}
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug ipa/64978] [5 Regression] ICE: in ipcp_verify_propagated_values, at ipa-cp.c:1060
2015-02-09 6:38 [Bug ipa/64978] New: [5 Regression] ICE: in ipcp_verify_propagated_values, at ipa-cp.c:1060 trippels at gcc dot gnu.org
` (8 preceding siblings ...)
2015-02-09 22:39 ` hubicka at gcc dot gnu.org
@ 2015-02-10 0:39 ` hubicka at gcc dot gnu.org
2015-02-10 13:08 ` trippels at gcc dot gnu.org
10 siblings, 0 replies; 12+ messages in thread
From: hubicka at gcc dot gnu.org @ 2015-02-10 0:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64978
--- Comment #10 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
Author: hubicka
Date: Tue Feb 10 00:38:46 2015
New Revision: 220557
URL: https://gcc.gnu.org/viewcvs?rev=220557&root=gcc&view=rev
Log:
PR ipa/64978
* ipa-cp.c (gather_caller_stats): Skip thunks.
(propagate_constants_topo): Skip aliases.
* g++.dg/torture/pr64978.C: New testcase.
Added:
trunk/gcc/testsuite/g++.dg/torture/pr64978.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/ipa-cp.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug ipa/64978] [5 Regression] ICE: in ipcp_verify_propagated_values, at ipa-cp.c:1060
2015-02-09 6:38 [Bug ipa/64978] New: [5 Regression] ICE: in ipcp_verify_propagated_values, at ipa-cp.c:1060 trippels at gcc dot gnu.org
` (9 preceding siblings ...)
2015-02-10 0:39 ` hubicka at gcc dot gnu.org
@ 2015-02-10 13:08 ` trippels at gcc dot gnu.org
10 siblings, 0 replies; 12+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-02-10 13:08 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64978
Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #11 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Fixed. Thanks.
^ permalink raw reply [flat|nested] 12+ messages in thread