The ia64-hp-hpux11.23 platform fails when building the C++ library during a bootstrap build with r161382. r161381 works. r161521, which has some bug fixes, still fails. The failure only occurs with bootstrap, the compiler faults when building the libstdc++ library. /proj/opensrc_nobackup/sje/reg3/build-ia64-hp-hpux11.23-trunk/obj_gcc/ia64-hp-hpux11.23/libstdc++-v3/include/bits/postypes.h:123:12: internal compiler error: Illegal instruction Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. make[4]: *** [ia64-hp-hpux11.23/bits/stdc++.h.gch/O2ggnu++0x.gch] Error Running under gdb didn't give me a complete backtrace but did show: #0 0x42c88b0:2 in cplus_expand_constant (cst=0x6432d880) at /proj/opensrc_nobackup/sje/reg3/src/trunk/gcc/cp/expr.c:70 I will try turning off partial inlining and see if that fixes the problem using the r161382 sources. This bug doesn't appear to be the same as PR44671 (fixed in r161521) or PR44687 (an ICE error in tree_nrv).
I have verified that the bootstrap works if I set flag_partial_inlining to 0. I also did a build with --disable-libstdcxx-pch to see if the build failed when I didn't build pre-compiled C++ headers and it does. It dies while compiling libstdc++-v3/libsupc++/array_type_info.cc with the same error.
Hi, can I have a testcase that reproduce on cross compiler? The backtrace seems rather odd.
I haven't been able to come up with a test case other then bootstrapping. If I build a non-bootstrap compiler and run the testsuite I don't get any unexpected failures due to this problem. It is only when, during bootstrap, I run the cc1plus executable that was built by the stage1 cc1 that I get a failure. At that point trying to compile any C++ program with cc1plus results in cc1plus aborting.
The problem seems to happen when compiling cp/decl.c. If I compile this file at -O1 instead of -O2 the resulting C++ compiler will work. I am trying to see if I can track it down to one function within cp/decl.c.
If I put __attribute__ ((noinline)) on check_class_member_definition_namespace in cp/decl.c, I don't see the bug. I don't see anything special about this function so I don't know why it is having problems being (partially) inlined when nothing else seems to cause problems.
Subject: Re: [4.6 Regression] Bootstrap fails with partial inlining (r161382) great work! Could you, please, post me the fnsplit, einline2 and inline dumps? Perhaps I can work out what is wrong there. (and preprocessed source so I can try on cross if possible too) Honza
Created attachment 21129 [details] Compressed preprocessed cp/decl.c
Created attachment 21130 [details] Compressed decl.c.015t.inline_param1 file
Created attachment 21131 [details] Compressed decl.c.025t.einline2 file
Created attachment 21132 [details] Compressed decl.c.041t.fnsplit file
Created attachment 21133 [details] Compressed decl.c.043t.inline_param3 file
I have a slightly smaller test case for this, but it still needs to bootstrap to fail. If I bootstrap just the C part of the compiler I get a successful build (with partial inlining enabled) but when I use that compiler to compile this test case (with -O2) I get a segfault in the compiler: char *s4; test2_sub (int i, ...) { __builtin_va_list ap; __builtin___vsprintf_chk (s4, 0, __builtin_object_size (s4, 0), "%s %d", ap); } If I modify the gimple_rewrite_call_expr call in builtins.c and replace the call to gimple_call_num_args with a new function that I don't inline (or that I inline completely) the segfault goes away. Looking at some of the dump files, builtins.c.041t.fnsplit shows gimple_call_num_args getting split but I don't see any indication of inlining in builtins.c.015/025/043. fnsplit creates gimple_call_num_args.part.22 and changes gimple_call_num_args to call that routine the dump doesn't show imple_rewrite_call_expr calling part.22 but later dumps do show this. I will attach builtins.c.041t.fnsplit. Any help on this bug would be appreciated, IA64 HP-UX has not bootstrapped with ToT sources in some time now.
Created attachment 21455 [details] compressed builtins.c.041t.fnsplit dump file I believe that the splitting and inlining of gimple_call_num_args into gimple_rewrite_call_expr is causing the failure but I do not know why.
I will have a look tomorrow.
I didn't get a chance to look.
Honza, have you had a chance to look at this failure recently? It is still happening and I can only build GCC on ia64-hp-hpux11.23 using workarounds to stop some of the inlining.
It looks like GCC on IA64 HP-UX has a problem when a routine in .text.unlikely calls a function in .text. If I define UNLIKELY_EXECUTED_TEXT_SECTION_NAME and HOT_TEXT_SECTION_NAME to just be '.text' then I can bootstrap with partial inlining enabled. I think the bug that is causing the abort is probably in the GNU assembler or the HP linker or some combination of the two. There is still a GCC bug here because the partial inlining change shouldn't have triggered the use of .text.unlikely. Particularly since it appears that it is the caller of the partially inlined function that is getting put into .text.unlikely, not the 'remainder' of the partially inlined function. On IA64 Linux, we do not appear to be using .text.unlikely, and that is probably why I see this bug on HP-UX but not Linux.
Author: sje Date: Fri Oct 1 17:05:45 2010 New Revision: 164891 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=164891 Log: 2010-10-01 Steve Ellcey <sje@cup.hp.com> PR tree-optimization/44716 * config/ia64/hpux.h (UNLIKELY_EXECUTED_TEXT_SECTION_NAME): Define. (HOT_TEXT_SECTION_NAME): Define. Modified: trunk/gcc/ChangeLog trunk/gcc/config/ia64/hpux.h
I assume FIXED from http://gcc.gnu.org/ml/gcc-testresults/2010-11/msg00221.html.