[Bug bootstrap/53321] [4.8 Regression] LTO bootstrap failed with bootstrap-profiled
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53321 --- Comment #18 from uros at gcc dot gnu.org 2012-07-04 13:49:24 UTC --- Author: uros Date: Wed Jul 4 13:49:19 2012 New Revision: 189261 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=189261 Log: PR middle-end/53321 * ipa.c (symtab_remove_unreachable_nodes): Partially revert r187375 to not call cgraph_propagate_frequency if something was changed. testsuite/ChangLog: PR middle-end/53321 * g++.dg/torture/pr53321.C: New test. Added: trunk/gcc/testsuite/g++.dg/torture/pr53321.C Modified: trunk/gcc/ChangeLog trunk/gcc/ipa.c trunk/gcc/testsuite/ChangeLog
[Bug bootstrap/53321] [4.8 Regression] LTO bootstrap failed with bootstrap-profiled
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53321 --- Comment #16 from Uros Bizjak ubizjak at gmail dot com 2012-07-03 15:57:34 UTC --- Following patch fixes testcase failure for me, and also enables lto-bootstrap: --cut here-- Index: ipa.c === --- ipa.c (revision 189217) +++ ipa.c (working copy) @@ -449,11 +449,6 @@ symtab_remove_unreachable_nodes (bool before_inlin verify_symtab (); #endif - /* If we removed something, perhaps profile could be improved. */ - if (changed optimize inline_edge_summary_vec) -FOR_EACH_DEFINED_FUNCTION (node) - cgraph_propagate_frequency (node); - return changed; } --cut here--
[Bug bootstrap/53321] [4.8 Regression] LTO bootstrap failed with bootstrap-profiled
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53321 --- Comment #17 from Uros Bizjak ubizjak at gmail dot com 2012-07-03 18:17:09 UTC --- Created attachment 27736 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=27736 Patch that cures various may be used uninitialized errors during LTO bootstrap This patch is needed to cure various may be used uninitialized errors during LTO bootstrap. This patch brings the bootstrap up to PR 53433. Adding the patch from PR 53433 successfully finish LTO profiledbootstrap.
[Bug bootstrap/53321] [4.8 Regression] LTO bootstrap failed with bootstrap-profiled
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53321 --- Comment #15 from Uros Bizjak ubizjak at gmail dot com 2012-07-02 09:48:57 UTC --- Jan, can you please fix this bug, profiledbootstrap LTO autotesters are broken for more than a month due to this problem. The reduced testcase is in Comment #10.
[Bug bootstrap/53321] [4.8 Regression] LTO bootstrap failed with bootstrap-profiled
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53321 --- Comment #14 from H.J. Lu hjl.tools at gmail dot com 2012-06-23 14:51:07 UTC --- (In reply to comment #13) Hehe, i still love them ;) But inline summaries are separate of cgraph, so it is not cgraph checker's work to verify it ;)) I think the problem is in new profile updating logic in unreachable node removal. I will look into it. Any updates?
[Bug bootstrap/53321] [4.8 Regression] LTO bootstrap failed with bootstrap-profiled
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53321 Jan Hubicka hubicka at gcc dot gnu.org changed: What|Removed |Added Status|NEW |ASSIGNED AssignedTo|unassigned at gcc dot |hubicka at gcc dot gnu.org |gnu.org | --- Comment #13 from Jan Hubicka hubicka at gcc dot gnu.org 2012-05-28 08:26:48 UTC --- Hehe, i still love them ;) But inline summaries are separate of cgraph, so it is not cgraph checker's work to verify it ;)) I think the problem is in new profile updating logic in unreachable node removal. I will look into it.
[Bug bootstrap/53321] [4.8 Regression] LTO bootstrap failed with bootstrap-profiled
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53321 --- Comment #10 from Uros Bizjak ubizjak at gmail dot com 2012-05-26 10:09:35 UTC --- Reduced testcase: --cut here-- typedef long unsigned int size_t; extern C { extern void *memcpy (void *__dest, __const void *__src, size_t __n); } extern char *src, *sources; extern int n_sources; static void find_source (const char *file_name) { memcpy (src, sources, n_sources * sizeof (*sources)); } extern const char *gcov_read_string (void); static void read_graph_file (void) { find_source (gcov_read_string ()); } static void process_file (void) { read_graph_file (); } int main () { process_file (); } --cut here-- ~/gcc-build/gcc/cc1plus -O2 -fprofile-generate -quiet t.C t.C:32:1: internal compiler error: vector VEC(inline_edge_summary_t,base) index domain error, in inline_edge_summary at ipa-inline.h:200 } ^ Please submit a full bug report, with preprocessed source if appropriate. See http://gcc.gnu.org/bugs.html for instructions.
[Bug bootstrap/53321] [4.8 Regression] LTO bootstrap failed with bootstrap-profiled
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53321 Steven Bosscher steven at gcc dot gnu.org changed: What|Removed |Added CC||steven at gcc dot gnu.org --- Comment #11 from Steven Bosscher steven at gcc dot gnu.org 2012-05-26 19:39:28 UTC --- At the point of the ICE: (gdb) run The program being debugged has been started already. Start it from the beginning? (y or n) y Starting program: /home/stevenb/devel/build-test2/gcc/cc1plus -quiet -O2 -fprofile-generate t.cc Breakpoint 2, internal_error (gmsgid=0x18d10b8 vector %s %s domain error, in %s at %s:%u) at ../../trunk/gcc/diagnostic.c:955 955 va_start (ap, gmsgid); (gdb) up 4 #4 0x009bc54c in cgraph_propagate_frequency_1 (node=0x770d5888, data=0x7fffde40) at ../../trunk/gcc/cgraph.c:1805 1805 if (inline_edge_summary (edge)-loop_depth) (gdb) p debug_cgraph() callgraph: __gcov_indirect_call_profiler/25 (built-in) @0x772603a8 Type: function Visibility: external public artificial References: Referring: Availability: not_available Function flags: Called by: main/3 (1.00 per call) Calls: __gcov_ior_profiler/24 (built-in) @0x77260138 Type: function Visibility: external public artificial References: Referring: Availability: not_available Function flags: Called by: _ZL11find_sourcePKc.isra.0/9 (1.00 per call) Calls: __gcov_average_profiler/23 (built-in) @0x7726 Type: function Visibility: external public artificial References: Referring: Availability: not_available Function flags: Called by: _ZL11find_sourcePKc.isra.0/9 (1.00 per call) Calls: __gcov_one_value_profiler/22 (built-in) @0x770d59c0 Type: function Visibility: external public artificial References: Referring: Availability: not_available Function flags: Called by: _ZL11find_sourcePKc.isra.0/9 (1.00 per call) Calls: _ZL11find_sourcePKc.isra.0/9 (void _ZL11find_sourcePKc.isra.0()) @0x770d5ea0 Type: function Visibility: artificial References: long int __gcov0._ZL11find_sourcePKc.isra.0 [1]/12 (read)long int __gcov0._ZL11find_sourcePKc.isra.0 [1]/12 (write)int n_sources/5 (read)char* sources/6 (read)char* src/7 (read)long int __gcov3._ZL11find_sourcePKc.isra.0 [3]/13 (addr)long int __gcov6._ZL11find_sourcePKc.isra.0 [2]/14 (addr)long int __gcov7._ZL11find_sourcePKc.isra.0 [1]/15 (addr) Referring: Availability: local Function flags: analyzed body local finalized Called by: _ZL15read_graph_filev/1 (1.00 per call) Calls: void* memcpy(void*, const void*, size_t)/8 (1.00 per call) __gcov_ior_profiler/24 (1.00 per call) __gcov_average_profiler/23 (1.00 per call) __gcov_one_value_profiler/22 (1.00 per call) void* memcpy(void*, const void*, size_t)/8 (void* memcpy(void*, const void*, size_t)) @0x770d5d68 Type: function Visibility: external public visibility_specified References: Referring: Availability: not_available Function flags: Called by: _ZL11find_sourcePKc.isra.0/9 (1.00 per call) Calls: const char* gcov_read_string()/4 (const char* gcov_read_string()) @0x770d5c30 Type: function Visibility: external public References: Referring: Availability: not_available Function flags: Called by: _ZL15read_graph_filev/1 (1.00 per call) (can throw external) Calls: main/3 (int main()) @0x770d5af8 Type: function Visibility: public Address is taken. References: long int* __gcov_indirect_call_counters/11 (read)void* __gcov_indirect_call_callee/10 (read)main/3 (addr)void* __gcov_indirect_call_callee/10 (write)long int __gcov0.main [2]/16 (read)long int __gcov0.main [2]/16 (write)long int __gcov0.main [2]/16 (read)long int __gcov0.main [2]/16 (write) Referring: main/3 (addr) Availability: available Function flags: analyzed body finalized only_called_at_startup Called by: Calls: _ZL15read_graph_filev/1 (1.00 per call) (can throw external) __gcov_indirect_call_profiler/25 (1.00 per call) _ZL15read_graph_filev/1 (void read_graph_file()) @0x770d5888 Type: function Visibility: prevailing_def_ironly References: long int __gcov0._ZL15read_graph_filev [3]/17 (read)long int __gcov0._ZL15read_graph_filev [3]/17 (write)long int __gcov0._ZL15read_graph_filev [3]/17 (read)long int __gcov0._ZL15read_graph_filev [3]/17 (write)long int __gcov0._ZL15read_graph_filev [3]/17 (read)long int __gcov0._ZL15read_graph_filev [3]/17 (write) Referring: Availability: local Function flags: analyzed body local finalized Called by: main/3 (1.00 per call) (can throw external) Calls: _ZL11find_sourcePKc.isra.0/9 (1.00 per call) const char* gcov_read_string()/4 (1.00 per call) (can throw external) $41 = void Note the isra function. The ICE goes away with -fno-ipa-sra, and can be triggered with -O1 -fipa-sra -fprofile-generate.
[Bug bootstrap/53321] [4.8 Regression] LTO bootstrap failed with bootstrap-profiled
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53321 --- Comment #12 from Steven Bosscher steven at gcc dot gnu.org 2012-05-26 19:42:26 UTC --- Note, btw, that verify_cgraph() doesn't catch this. Honza, you loved checkers so much a few years ago -- maybe this checker (also yours??) should be enhanced :-)
[Bug bootstrap/53321] [4.8 Regression] LTO bootstrap failed with bootstrap-profiled
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53321 --- Comment #7 from Uros Bizjak ubizjak at gmail dot com 2012-05-25 20:03:51 UTC --- Created attachment 27500 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=27500 Preprocessed source This preprocessed source from the bootstrap fails with -g -O2 -fprofile-generate: ~/gcc-build/gcc/cc1plus -O2 -fprofile-generate -quiet gcov.ii ../../gcc-svn/trunk/gcc/gcov.c:2348:1: internal compiler error: vector VEC(inline_edge_summary_t,base) index domain error, in inline_edge_summary at ipa-inline.h:200 Please submit a full bug report, with preprocessed source if appropriate. See http://gcc.gnu.org/bugs.html for instructions.
[Bug bootstrap/53321] [4.8 Regression] LTO bootstrap failed with bootstrap-profiled
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53321 Uros Bizjak ubizjak at gmail dot com changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2012-05-25 Ever Confirmed|0 |1 --- Comment #8 from Uros Bizjak ubizjak at gmail dot com 2012-05-25 20:05:57 UTC --- Confirmed on x86_64-pc-linux-gnu with: Target: x86_64-unknown-linux-gnu gcc version 4.8.0 20120525 (experimental) [trunk revision 187887] (GCC)
[Bug bootstrap/53321] [4.8 Regression] LTO bootstrap failed with bootstrap-profiled
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53321 --- Comment #9 from Uros Bizjak ubizjak at gmail dot com 2012-05-25 20:10:54 UTC --- (gdb) bt #0 internal_error (gmsgid=0x1214dd8 vector %s %s domain error, in %s at %s:%u) at ../../gcc-svn/trunk/gcc/diagnostic.c:951 #1 0x00ef31a9 in vec_assert_fail (op=0x11d3093 index, struct_name=0xfa61d0 VEC(inline_edge_summary_t,base), file=optimized out, line=200, function=0xfa6fd0 inline_edge_summary) at ../../gcc-svn/trunk/gcc/vec.c:528 #2 0x0079114e in VEC_inline_edge_summary_t_base_index (ix_=optimized out, vec_=optimized out, file_=optimized out, line_=optimized out, function_=optimized out) at ../../gcc-svn/trunk/gcc/ipa-inline.h:145 #3 inline_edge_summary (edge=optimized out) at ../../gcc-svn/trunk/gcc/ipa-inline.h:199 #4 cgraph_propagate_frequency_1 (node=0x7109b138, data=0x7fffdb20) at ../../gcc-svn/trunk/gcc/cgraph.c:1805 #5 0x00794810 in cgraph_for_node_and_aliases (node=0x7109b138, callback=0x790f10 cgraph_propagate_frequency_1(cgraph_node*, void*), data=0x7fffdb20, include_overwritable=true) at ../../gcc-svn/trunk/gcc/cgraph.c:1633 #6 0x00794a92 in cgraph_propagate_frequency (node=0x7109b138) at ../../gcc-svn/trunk/gcc/cgraph.c:1839 #7 0x00930487 in symtab_remove_unreachable_nodes (before_inlining_p=optimized out, file=0x0) at ../../gcc-svn/trunk/gcc/ipa.c:455 #8 0x0079b6a0 in ipa_passes () at ../../gcc-svn/trunk/gcc/cgraphunit.c:1853
[Bug bootstrap/53321] [4.8 Regression] LTO bootstrap failed with bootstrap-profiled
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53321 --- Comment #6 from H.J. Lu hjl.tools at gmail dot com 2012-05-19 18:14:17 UTC --- (In reply to comment #5) I need to add disable-werror otherwise we fail on extra warnings, but with that my bootstrap works. Is it still failing for you? The unreferenced nodes removal is very basic thing so when it breaks it should show up quite consistently. It still fails for me. Did you configure GCC with --with-build-config=bootstrap-lto?
[Bug bootstrap/53321] [4.8 Regression] LTO bootstrap failed with bootstrap-profiled
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53321 --- Comment #5 from Jan Hubicka hubicka at gcc dot gnu.org 2012-05-12 11:03:01 UTC --- I need to add disable-werror otherwise we fail on extra warnings, but with that my bootstrap works. Is it still failing for you? The unreferenced nodes removal is very basic thing so when it breaks it should show up quite consistently. Honza
[Bug bootstrap/53321] [4.8 Regression] LTO bootstrap failed with bootstrap-profiled
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53321 H.J. Lu hjl.tools at gmail dot com changed: What|Removed |Added CC||hubicka at gcc dot gnu.org Target Milestone|--- |4.8.0 --- Comment #1 from H.J. Lu hjl.tools at gmail dot com 2012-05-11 11:20:37 UTC --- It may be caused by revision 187375: http://gcc.gnu.org/ml/gcc-cvs/2012-05/msg00371.html
[Bug bootstrap/53321] [4.8 Regression] LTO bootstrap failed with bootstrap-profiled
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53321 --- Comment #2 from Jan Hubicka hubicka at gcc dot gnu.org 2012-05-11 15:48:32 UTC --- I fixed identically looking ICE seen on Mozilla build yesterday. Hopefully the boostrap is fixed now, too. Honza
[Bug bootstrap/53321] [4.8 Regression] LTO bootstrap failed with bootstrap-profiled
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53321 --- Comment #3 from H.J. Lu hjl.tools at gmail dot com 2012-05-11 15:52:38 UTC --- (In reply to comment #2) I fixed identically looking ICE seen on Mozilla build yesterday. Hopefully the boostrap is fixed now, too. It still fails with the same error as of revision 187408. Does revision 187408 have your fix for Mozilla?
[Bug bootstrap/53321] [4.8 Regression] LTO bootstrap failed with bootstrap-profiled
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53321 --- Comment #4 from Jan Hubicka hubicka at gcc dot gnu.org 2012-05-11 18:25:06 UTC --- was comitted as revision 187382. I am trying profiledbootstrap now. Honza