This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/51929] New: ICE: verify_cgraph_node failed with -O2 -fno-guess-branch-probability -fipa-cp-clone --param ipa-cp-eval-threshold=0 --param max-inline-insns-single=1
- From: "zsojka at seznam dot cz" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 21 Jan 2012 10:37:32 +0000
- Subject: [Bug middle-end/51929] New: ICE: verify_cgraph_node failed with -O2 -fno-guess-branch-probability -fipa-cp-clone --param ipa-cp-eval-threshold=0 --param max-inline-insns-single=1
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51929
Bug #: 51929
Summary: ICE: verify_cgraph_node failed with -O2
-fno-guess-branch-probability -fipa-cp-clone --param
ipa-cp-eval-threshold=0 --param
max-inline-insns-single=1
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: zsojka@seznam.cz
Host: x86_64-pc-linux-gnu
Target: x86_64-pc-linux-gnu
Created attachment 26401
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26401
reduced testcase
Compiler output:
$ g++ -O2 -fno-guess-branch-probability -fipa-cp-clone --param
ipa-cp-eval-threshold=0 --param max-inline-insns-single=1 testcase.C
testcase.C:35:19: error: edge points to wrong declaration:
<function_decl 0x7f2b78da9400 _ZN12basic_stringIvED2Ev.constprop.4
type <function_type 0x7f2b78da4f18
type <void_type 0x7f2b78c1ebd0 void type_6 VOID
align 8 symtab 0 alias set -1 canonical type 0x7f2b78c1ebd0
pointer_to_this <pointer_type 0x7f2b78c1ec78>>
QI
size <integer_cst 0x7f2b78c21120 constant 8>
unit size <integer_cst 0x7f2b78c21140 constant 1>
align 8 symtab 0 alias set -1 canonical type 0x7f2b78da4f18
arg-types <tree_list 0x7f2b78c109d8 value <void_type 0x7f2b78c1ebd0
void>>>
static autoinline decl_5 QI file testcase.C line 8 col 3 align 16 context
<record_type 0x7f2b78d73dc8 basic_string> initial <block 0x7f2b78da66e0>
abstract_origin <function_decl 0x7f2b78d83300 basic_string>
result <result_decl 0x7f2b78d9a400 D.2358 type <void_type 0x7f2b78c1ebd0
void>
used ignored VOID file testcase.C line 11 col 3
align 8 context <function_decl 0x7f2b78da9400
_ZN12basic_stringIvED2Ev.constprop.4> abstract_origin <result_decl
0x7f2b78d84880 D.2292>>
full-name "basic_string< <template-parameter-1-1> >::~basic_string() [with
<template-parameter-1-1> = void]"
pending-inline-info 0x7f2b78d85a50 template-info 0x7f2b78d7e9c0
struct-function 0x7f2b78da3b40>
Instead of: <function_decl 0x7f2b78d83400 __comp_dtor
type <method_type 0x7f2b78d892a0
type <void_type 0x7f2b78c1ebd0 void type_6 VOID
align 8 symtab 0 alias set -1 canonical type 0x7f2b78c1ebd0
pointer_to_this <pointer_type 0x7f2b78c1ec78>>
QI
size <integer_cst 0x7f2b78c21120 constant 8>
unit size <integer_cst 0x7f2b78c21140 constant 1>
align 8 symtab 0 alias set -1 canonical type 0x7f2b78d892a0 method
basetype <record_type 0x7f2b78d73dc8 basic_string>
arg-types <tree_list 0x7f2b78d7ffc8 value <pointer_type 0x7f2b78d890a8>
chain <tree_list 0x7f2b78c109d8 value <void_type 0x7f2b78c1ebd0
void>>>
pointer_to_this <pointer_type 0x7f2b78d89e70>>
addressable used public static external autoinline decl_5 QI defer-output
file testcase.C line 8 col 3 align 16 context <record_type 0x7f2b78d73dc8
basic_string> initial <block 0x7f2b78d88640> abstract_origin <function_decl
0x7f2b78d83300 basic_string>
arguments <parm_decl 0x7f2b78c0e908 this
type <pointer_type 0x7f2b78d891f8 type <record_type 0x7f2b78d73dc8
basic_string>
readonly unsigned DI
size <integer_cst 0x7f2b78c05f60 constant 64>
unit size <integer_cst 0x7f2b78c05f80 constant 8>
align 64 symtab 0 alias set -1 canonical type 0x7f2b78d891f8>
readonly used unsigned DI file testcase.C line 8 col 18 size
<integer_cst 0x7f2b78c05f60 64> unit size <integer_cst 0x7f2b78c05f80 8>
align 64 context <function_decl 0x7f2b78d83400 __comp_dtor >
abstract_origin <parm_decl 0x7f2b78c0e7f8 this> arg-type <pointer_type
0x7f2b78d891f8>>
result <result_decl 0x7f2b78d84a00 D.2295 type <void_type 0x7f2b78c1ebd0
void>
ignored VOID file testcase.C line 11 col 3
align 8 context <function_decl 0x7f2b78d83400 __comp_dtor >>
full-name "basic_string< <template-parameter-1-1> >::~basic_string() [with
<template-parameter-1-1> = void]"
pending-inline-info 0x7f2b78d85b40 template-info 0x7f2b78d7e9c0
struct-function 0x7f2b78c11960>
basic_stringbuf::basic_stringbuf()/9 @0x7f2b78d8f240 (asm:
_ZN15basic_stringbufC2Ev.constprop.3) (inline copy in (static initializers for
testcase.C)/16) availability:local analyzed reachable body local finalized
called by: stringstream::stringstream()/3 (1.00 per call) (inlined) (can
throw external)
calls: void basic_stringbuf::_M_stringbuf_init()/20 (1.00 per call) (can
throw external) basic_string< <template-parameter-1-1> >::~basic_string() [with
<template-parameter-1-1> = void]/12 (1.00 per call) (can throw external)
References: var:stringstream ss_01 (addr) var:stringstream ss_01 (addr)
fn:<built-in>/19 (addr)
Refering this function:
testcase.C:35:19: internal compiler error: verify_cgraph_node failed
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
(gdb) bt
#0 0x00007ffff61e4790 in exit () from /lib64/libc.so.6
#1 0x0000000001350802 in diagnostic_action_after_output (context=0x1b01ea0,
diagnostic=Unhandled dwarf expression opcode 0xfa
) at /mnt/svn/gcc-trunk/gcc/diagnostic.c:243
#2 0x000000000135096e in diagnostic_report_diagnostic (context=0x1b01ea0,
diagnostic=0x7fffffffd3b0) at /mnt/svn/gcc-trunk/gcc/diagnostic.c:552
#3 0x0000000001351620 in internal_error (gmsgid=<optimized out>) at
/mnt/svn/gcc-trunk/gcc/diagnostic.c:845
#4 0x000000000084027c in verify_cgraph_node (node=0x7ffff5c16240) at
/mnt/svn/gcc-trunk/gcc/cgraphunit.c:795
#5 0x0000000000840ad8 in verify_cgraph () at
/mnt/svn/gcc-trunk/gcc/cgraphunit.c:810
#6 verify_cgraph () at /mnt/svn/gcc-trunk/gcc/cgraphunit.c:802
#7 0x000000000084299e in cgraph_materialize_all_clones () at
/mnt/svn/gcc-trunk/gcc/cgraphunit.c:2607
#8 0x0000000000842b08 in cgraph_optimize () at
/mnt/svn/gcc-trunk/gcc/cgraphunit.c:2181
#9 0x000000000084374a in cgraph_finalize_compilation_unit () at
/mnt/svn/gcc-trunk/gcc/cgraphunit.c:1327
#10 0x000000000066199b in cp_write_global_declarations () at
/mnt/svn/gcc-trunk/gcc/cp/decl2.c:4051
#11 0x0000000000b8109c in compile_file () at
/mnt/svn/gcc-trunk/gcc/toplev.c:573
#12 do_compile () at /mnt/svn/gcc-trunk/gcc/toplev.c:1938
#13 toplev_main (argc=20, argv=0x7fffffffd778) at
/mnt/svn/gcc-trunk/gcc/toplev.c:2014
#14 0x00007ffff61cc09d in __libc_start_main () from /lib64/libc.so.6
#15 0x0000000000585bb1 in _start ()
Tested revisions:
r183351 - crash
4.6 - invalid parameter 'ipa-cp-eval-threshold'