public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ipa/64978] New: [5 Regression] ICE: in ipcp_verify_propagated_values, at ipa-cp.c:1060
@ 2015-02-09  6:38 trippels at gcc dot gnu.org
  2015-02-09  7:39 ` [Bug ipa/64978] " jakub at gcc dot gnu.org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-02-09  6:38 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64978

            Bug ID: 64978
           Summary: [5 Regression] ICE: in ipcp_verify_propagated_values,
                    at ipa-cp.c:1060
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ipa
          Assignee: unassigned at gcc dot gnu.org
          Reporter: trippels at gcc dot gnu.org
                CC: hubicka at gcc dot gnu.org

Honza's patches from today break Firefox LTO build on ppc64:

trippels@gcc2-power8 makeconv % /home/trippels/gcc_test/usr/local/bin/c++ -fPIC
-Wall -Wempty-body -Woverloaded-virtual -Wsign-compare -Wwrite-strings
-Werror=endif-labels -Werror=int-to-pointer-cast -Werror=missing-braces
-Werror=pointer-arith -Werror=return-type -Werror=sequence-point
-Werror=unused-label -Werror=trigraphs -Werror=type-limits
-Wno-invalid-offsetof -Wcast-align -flto=80 --param lto-partitions=80
-fno-semantic-interposition -fdevirtualize-at-ltrans -mcpu=power8
-ffunction-sections -fdata-sections -fno-exceptions -fno-strict-aliasing -frtti
-fno-exceptions -fno-math-errno -std=gnu++0x -pthread -pipe -UDEBUG -DNDEBUG
-O3 -DU_STATIC_IMPLEMENTATION -fvisibility=hidden -W -Wall -pedantic
-Wpointer-arith -Wwrite-strings -Wno-long-long -Wno-unused
-Wno-unused-parameter -lpthread
-Wl,--hash-style=gnu,--as-needed,--gc-sections,--icf=all -Wl,-z,noexecstack
-Wl,-z,text -Wl,--build-id -Wl,--gc-sections -o ../../bin/makeconv makeconv.o
ucnvstat.o genmbcs.o gencnvex.o -L../../lib -licutu -L../../lib -licui18n
-L../../lib -licuuc -L../../stubdata -licudata -lpthread -ldl -lm
lto1: internal compiler error: in ipcp_verify_propagated_values, at
ipa-cp.c:1060
0x10d1bbef ipcp_verify_propagated_values()
        ../../gcc/gcc/ipa-cp.c:1060
0x10d1dcfb ipcp_propagate_stage
        ../../gcc/gcc/ipa-cp.c:2761
0x10d1dcfb ipcp_driver
        ../../gcc/gcc/ipa-cp.c:4410
0x10d1dcfb execute
        ../../gcc/gcc/ipa-cp.c:4505
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
lto-wrapper: fatal error: /home/trippels/gcc_test/usr/local/bin/c++ returned 1
exit status
compilation terminated.
/home/trippels/bin/ld: fatal error: lto-wrapper failed
collect2: error: ld returned 1 exit status


^ 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 ` 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 #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
  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 #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
                   ` (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

end of thread, other threads:[~2015-02-10 13:08 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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
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

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).