This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/77693] ICE in rtl_for_decl_init, at dwarf2out.c:17378
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 23 Sep 2016 08:31:56 +0000
- Subject: [Bug fortran/77693] ICE in rtl_for_decl_init, at dwarf2out.c:17378
- Auto-submitted: auto-generated
- References: <bug-77693-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77693
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |wrong-code
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
(gdb) p debug_rtx (rtl)
(mem/u/c:SC (symbol_ref/f:DI ("*.LC1") [flags 0x2] <var_decl 0x7ffff6a6e630
*.LC1>) [0 S8 A32])
(gdb) p init
$3 = <complex_cst 0x7ffff6a37ee0>
and we see a comment:
/* Other aggregates, and complex values, could be represented using
CONCAT: FIXME! */
but, of course
(gdb) p type
$6 = <pointer_type 0x7ffff6a4d000>
so the issue is really that we have
<var_decl 0x7ffff7ff6990 a
type <pointer_type 0x7ffff6a4d000
type <complex_type 0x7ffff68a21f8 complex(kind=4) type <real_type
0x7ffff68a0540 real(kind=4)>
asm_written SC
size <integer_cst 0x7ffff6887bb8 constant 64>
unit size <integer_cst 0x7ffff6887bd0 constant 8>
align 32 symtab -156936400 alias set 2 canonical type
0x7ffff68a21f8
pointer_to_this <pointer_type 0x7ffff6a4d000>>
asm_written public unsigned DI size <integer_cst 0x7ffff6887bb8 64>
unit size <integer_cst 0x7ffff6887bd0 8>
align 64 symtab -156936480 alias set 1 canonical type 0x7ffff6a4d000
pointer_to_this <pointer_type 0x7ffff6a51e70>>
readonly static unsigned DI file t.f90 line 2 col 0 size <integer_cst
0x7ffff6887bb8 64> unit size <integer_cst 0x7ffff6887bd0 8>
align 64 context <function_decl 0x7ffff6a61e00 p> initial <complex_cst
0x7ffff6a37ee0> chain <var_decl 0x7ffff7ff6a20 z>>
thus a pointer variable with a complex_cst initializer.
-> FE issue.
And if the code is valid then it's wrong-code as well. The FE needs to
output a CONST_DECL for the complex constant and the initializer for A
needs to be the address of that.