From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6355 invoked by alias); 5 May 2010 12:41:51 -0000 Received: (qmail 6217 invoked by uid 48); 5 May 2010 12:41:19 -0000 Date: Wed, 05 May 2010 12:41:00 -0000 Message-ID: <20100505124119.6216.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/43990] [OOP] ICE in output_constructor_regular_field, at varasm.c:4995 In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "burnus at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-05/txt/msg00419.txt.bz2 ------- 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. unit size align 32 symtab 0 alias set -1 canonical type 0x2aaaaab58b28 precision 1 min max > unsigned SI file test.f90 line 4 col 0 size unit size align 32 offset_align 128 offset constant 0> bit offset constant 0> context chain > (gdb) call debug_tree(exp) unit size align 64 symtab 0 alias set -1 canonical type 0x2aaaaac28498 fields unsigned SI file test.f90 line 4 col 0 size unit size align 32 offset_align 128 offset bit offset context chain > pointer_to_this chain > constant lngt 2 idx val constant 1> idx public unsigned DI size unit size align 64 symtab 0 alias set -1 canonical type 0x2aaaaac28738> unsigned DI file test.f90 line 5 col 0 size unit size align 64 offset_align 128 offset bit offset context chain unsigned DI file test.f90 line 5 col 0 size unit size align 64 offset_align 128 offset bit offset context >> val constant 0>> -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43990