This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/53884] [4.7/4.8 Regression] ICE: in function_and_variable_visibility, at ipa.c:818 with -flto -fno-weak
- From: "mpolacek at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 21 Feb 2013 14:09:42 +0000
- Subject: [Bug middle-end/53884] [4.7/4.8 Regression] ICE: in function_and_variable_visibility, at ipa.c:818 with -flto -fno-weak
- Auto-submitted: auto-generated
- References: <bug-53884-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53884
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mpolacek at gcc dot gnu.org
--- Comment #4 from Marek Polacek <mpolacek at gcc dot gnu.org> 2013-02-21 14:09:42 UTC ---
ISTM that we ICE here because we arrive at the assert at ipa.c:818 with:
<function_decl 0x7f7dda50f600 _ZN1SIL_Z3foovEEC1Ev
type <method_type 0x7f7dda50e690
type <void_type 0x7f7dda3a0c78 void type_6 VOID
align 8 symtab 0 alias set -1 canonical type 0x7f7dda3a0c78
pointer_to_this <pointer_type 0x7f7dda3a0d20>>
QI
size <integer_cst 0x7f7dda393f80 constant 8>
unit size <integer_cst 0x7f7dda393fa0 constant 1>
align 8 symtab 0 alias set -1 canonical type 0x7f7dda50e690 method
basetype <record_type 0x7f7dda4fbdc8 S>
arg-types <tree_list 0x7f7dda50b1b8 value <pointer_type 0x7f7dda50e5e8>
chain <tree_list 0x7f7dda39f988 value <void_type 0x7f7dda3a0c78
void>>>
pointer_to_this <pointer_type 0x7f7dda50ec78>>
addressable used ignored weak decl_5 QI file zz.C line 3 col 3 align 8
initial <error_mark 0x7f7dda39ce40>
arguments <parm_decl 0x7f7dda509f80 this
type <pointer_type 0x7f7dda50e888 type <record_type 0x7f7dda4fbdc8 S>
readonly unsigned DI
size <integer_cst 0x7f7dda393dc0 constant 64>
unit size <integer_cst 0x7f7dda393de0 constant 8>
align 64 symtab 0 alias set -1 canonical type 0x7f7dda50e888>
readonly used unsigned DI file zz.C line 3 col 6 size <integer_cst
0x7f7dda393dc0 64> unit size <integer_cst 0x7f7dda393de0 8>
align 64 context <function_decl 0x7f7dda4fae00 __comp_ctor >
abstract_origin <parm_decl 0x7f7dda509180 this> arg-type <pointer_type
0x7f7dda50e888>>
full-name "void _ZN1SIL_Z3foovEEC1Ev()"
I think two things here are interesting: that decl is WEAK, even though we're
using -fno-weak, and that DECL_INITIAL of that decl is error_mark_node. Not
sure what to do here: with the assert guarded by
if (DECL_INITIAL (node->symbol.decl) != error_mark_node)
the ICE's gone and the final assembly looks ok.
Is LTO misbehaving with -fno-weak, i.e., can it even produce a weak
FUNCTION_DECL like above?