public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "burnus at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/43990] [OOP] ICE in output_constructor_regular_field, at varasm.c:4995
Date: Wed, 05 May 2010 12:41:00 -0000	[thread overview]
Message-ID: <20100505124119.6216.qmail@sourceware.org> (raw)
In-Reply-To: <bug-43990-16146@http.gcc.gnu.org/bugzilla/>



------- 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


  reply	other threads:[~2010-05-05 12:41 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-05  9:27 [Bug fortran/43990] New: " janus at gcc dot gnu dot org
2010-05-05 12:41 ` burnus at gcc dot gnu dot org [this message]
2010-05-05 14:13 ` [Bug fortran/43990] " burnus at gcc dot gnu dot org
2010-05-06 16:28 ` burnus at gcc dot gnu dot org
2010-05-06 16:37 ` burnus at gcc dot gnu dot org
2010-05-16 22:11 ` janus at gcc dot gnu dot org
2010-05-17 17:09 ` dominiq at lps dot ens dot fr
2010-05-17 17:41 ` janus at gcc dot gnu dot org
2010-05-17 19:59 ` janus at gcc dot gnu dot org
2010-05-17 20:05 ` janus at gcc dot gnu dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100505124119.6216.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).