[Bug fortran/43990] [OOP] ICE in output_constructor_regular_field, at varasm.c:4995
burnus at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Wed May 5 12:41:00 GMT 2010
------- Comment #1 from burnus at gcc dot gnu dot org 2010-05-05 12:41 -------
if ((local->field != NULL_TREE || local->index != NULL_TREE)
&& fieldpos != local->total_bytes)
{
gcc_assert (fieldpos >= local->total_bytes);
Debugging shows:
field != NULL_TREE, index == NULL_TREE
fieldpos = 0 >= 4 = local->total_bytes
If one sets a break point at 5327, one gets 7 times:
#0 output_constructor (exp=0x2aaaaac16200, size=32, align=256, outer=0x0) at
gcc/gcc/varasm.c:5327
but then one gets
Breakpoint 1, output_constructor (exp=0x2aaaaac16160, size=24, align=128,
outer=0x0) at gcc/gcc/varasm.c:5327
which is the case with the ICE; only in the latter case there is field !=
NULL_TREE. The variable has then the following value - and in particular offset
== 0 and thus also fieldpos == 0.
<field_decl 0x2aaaaac2c098 l
type <boolean_type 0x2aaaaab58b28 logical(kind=4) public unsigned SI
size <integer_cst 0x2aaaaab36960 constant 32>
unit size <integer_cst 0x2aaaaab36668 constant 4>
align 32 symtab 0 alias set -1 canonical type 0x2aaaaab58b28 precision
1 min <integer_cst 0x2aaaaab553c0 0> max <integer_cst 0x2aaaaab55410 1>>
unsigned SI file test.f90 line 4 col 0 size <integer_cst 0x2aaaaab36960 32>
unit size <integer_cst 0x2aaaaab36668 4>
align 32 offset_align 128
offset <integer_cst 0x2aaaaab36690 type <integer_type 0x2aaaaab45000>
constant 0>
bit offset <integer_cst 0x2aaaaab36d98 type <integer_type 0x2aaaaab450a8
bit_size_type> constant 0> context <record_type 0x2aaaaac28498 t> chain
<field_decl 0x2aaaaac2c130 cp>>
(gdb) call debug_tree(exp)
<constructor 0x2aaaaac16160
type <record_type 0x2aaaaac28498 t BLK
size <integer_cst 0x2aaaaab55190 constant 192>
unit size <integer_cst 0x2aaaaab55140 constant 24>
align 64 symtab 0 alias set -1 canonical type 0x2aaaaac28498
fields <field_decl 0x2aaaaac2c098 l type <boolean_type 0x2aaaaab58b28
logical(kind=4)>
unsigned SI file test.f90 line 4 col 0
size <integer_cst 0x2aaaaab36960 constant 32>
unit size <integer_cst 0x2aaaaab36668 constant 4>
align 32 offset_align 128
offset <integer_cst 0x2aaaaab36690 constant 0>
bit offset <integer_cst 0x2aaaaab36d98 constant 0> context
<record_type 0x2aaaaac28498 t> chain <field_decl 0x2aaaaac2c130 cp>>
pointer_to_this <pointer_type 0x2aaaaac28738> chain <type_decl
0x2aaaaab5f730 D.1544>>
constant lngt 2 idx <field_decl 0x2aaaaac2c098 l>
val <integer_cst 0x2aaaaab55410 type <boolean_type 0x2aaaaab58b28
logical(kind=4)> constant 1>
idx <field_decl 0x2aaaaac24ed8 $data
type <pointer_type 0x2aaaaac28738 type <record_type 0x2aaaaac28498 t>
public unsigned DI
size <integer_cst 0x2aaaaab36a28 constant 64>
unit size <integer_cst 0x2aaaaab36a50 constant 8>
align 64 symtab 0 alias set -1 canonical type 0x2aaaaac28738>
unsigned DI file test.f90 line 5 col 0 size <integer_cst 0x2aaaaab36a28
64> unit size <integer_cst 0x2aaaaab36a50 8>
align 64 offset_align 128 offset <integer_cst 0x2aaaaab36690 0> bit
offset <integer_cst 0x2aaaaab36d98 0> context <record_type 0x2aaaaac28540
.class.t.p>
chain <field_decl 0x2aaaaac2c000 $vptr type <pointer_type
0x2aaaaac28690>
unsigned DI file test.f90 line 5 col 0 size <integer_cst
0x2aaaaab36a28 64> unit size <integer_cst 0x2aaaaab36a50 8>
align 64 offset_align 128 offset <integer_cst 0x2aaaaab36690 0> bit
offset <integer_cst 0x2aaaaab36a28 64> context <record_type 0x2aaaaac28540
.class.t.p>>>
val <integer_cst 0x2aaaaac27910 type <pointer_type 0x2aaaaac28738> constant
0>>
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43990
More information about the Gcc-bugs
mailing list