------- Comment #2 from rguenth at gcc dot gnu dot org 2009-06-21 22:09 -------
Confirmed. We ICE mangling trying to mangle decltype(T()*o[0])
#1 0x082ec4c0 in write_expression (expr=0xb7fdeed4)
at /home/richard/src/trunk/gcc/cp/mangle.c:2415
2415 write_expression (operand);
(gdb) p expr
$1 = (tree) 0xb7fdeed4
(gdb) call debug_generic_expr (expr)
o[0
Breakpoint 2, internal_error (
because that ARRAY_REF has a non-array object that is referenced:
(gdb) call debug_tree (expr)
<array_ref 0xb7fdeed4
arg 0 <parm_decl 0xb7d7039c o
type <record_type 0xb7d6e380 M type_0 type_5 type_6 VOID
align 8 symtab 0 alias set -1 canonical type 0xb7d6e380
full-name "class M<owidth, 3u, oT>"
no-binfo use_template=1 interface-unknown
chain <type_decl 0xb7d6e3f0 M>>
used VOID file t.ii line 9 col 35
align 8 context <function_decl 0xb7d53280 mggggg> arg-type <record_type
0xb7d6e380 M>>
arg 1 <integer_cst 0xb7cbf8a4 type <integer_type 0xb7ccf310 int> constant
0>>
likely this testcase should be diagnosed as invalid.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |ice-on-invalid-code
Last reconfirmed|0000-00-00 00:00:00 |2009-06-21 22:09:02
date| |
Version|unknown |4.5.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40512