public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jjcogliati-r1 at yahoo dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug lto/42665] Internal compiler exception in with gfortran when using  -fwhole-program -flto -fopenmp
Date: Mon, 11 Jan 2010 17:15:00 -0000	[thread overview]
Message-ID: <20100111171529.24486.qmail@sourceware.org> (raw)
In-Reply-To: <bug-42665-12362@http.gcc.gnu.org/bugzilla/>



------- Comment #9 from jjcogliati-r1 at yahoo dot com  2010-01-11 17:15 -------
My hunch, (and I could be wrong since my knowledge of gcc's tree code was zero
as of Friday morning) is that it is trying to find the array's min and max
size, but that only the min location is available, and that the max value is
undefined.  Since this is fortran code, there are a number of places that I do
that.  Is that plausible, and if so, how would I check this hunch?

Getting permission for me to get you the full code would involve a lot of
bureaucracy (weeks to months).  

(gdb) p type->base
$32 = {code = ARRAY_TYPE, side_effects_flag = 0, constant_flag = 0, 
  addressable_flag = 0, volatile_flag = 0, readonly_flag = 0, 
  unsigned_flag = 0, asm_written_flag = 0, nowarning_flag = 0, used_flag = 0, 
  nothrow_flag = 0, static_flag = 0, public_flag = 0, private_flag = 0, 
  protected_flag = 0, deprecated_flag = 0, saturating_flag = 0, 
  default_def_flag = 0, lang_flag_0 = 0, lang_flag_1 = 0, lang_flag_2 = 0, 
  lang_flag_3 = 0, lang_flag_4 = 0, lang_flag_5 = 0, lang_flag_6 = 0, 
  visited = 0, packed_flag = 0, user_align = 0, spare = 0, address_space = 0}
(gdb) list
3717      /* For array types hash their domain and the string flag.  */
3718      if (TREE_CODE (type) == ARRAY_TYPE
3719          && TYPE_DOMAIN (type))
3720        {
3721          v = iterative_hash_hashval_t (TYPE_STRING_FLAG (type), v);
3722          v = visit (TYPE_DOMAIN (type), state, v,
3723                     sccstack, sccstate, sccstate_obstack);
3724        }
3725    
3726      /* Recurse for aggregates with a single element type.  */
(gdb) where
#0  iterative_hash_expr (t=0x7ffff1e96b70, val=154387133)
    at ../../gcc-4.5-20100107/gcc/tree.c:6592
#1  0x00000000005ee1fc in iterative_hash_gimple_type (type=0x7ffff1df3888, 
    val=<value optimized out>, sccstack=0x7fffffffda38, sccstate=0x126a440, 
    sccstate_obstack=0x7fffffffd9e0)
    at ../../gcc-4.5-20100107/gcc/gimple.c:3713
#2  0x00000000005ee843 in visit (t=0x7ffff1df3888, state=0x126b4b0, 
    v=1159414094, sccstack=0x7fffffffda38, sccstate=0x126a440, 
    sccstate_obstack=0x7fffffffd9e0)
    at ../../gcc-4.5-20100107/gcc/gimple.c:3599
#3  0x00000000005ee276 in iterative_hash_gimple_type (type=0x7ffff1df37e0, 
    val=<value optimized out>, sccstack=0x7fffffffda38, sccstate=0x126a440, 
    sccstate_obstack=0x7fffffffd9e0)
    at ../../gcc-4.5-20100107/gcc/gimple.c:3722
(gdb) down
#2  0x00000000005ee843 in visit (t=0x7ffff1df3888, state=0x126b4b0, 
    v=1159414094, sccstack=0x7fffffffda38, sccstate=0x126a440, 
    sccstate_obstack=0x7fffffffd9e0)
    at ../../gcc-4.5-20100107/gcc/gimple.c:3599
3599          tem = iterative_hash_gimple_type (t, v,
(gdb) down
#1  0x00000000005ee1fc in iterative_hash_gimple_type (type=0x7ffff1df3888, 
    val=<value optimized out>, sccstack=0x7fffffffda38, sccstate=0x126a440, 
    sccstate_obstack=0x7fffffffd9e0)
    at ../../gcc-4.5-20100107/gcc/gimple.c:3713
3713           v = iterative_hash_expr (TYPE_MAX_VALUE (type), v);
(gdb) p type->type.minval
$33 = (tree) 0x7ffff1d995c8
(gdb) p (type->type.minval)->base
$34 = {code = INTEGER_CST, side_effects_flag = 0, constant_flag = 1, 
  addressable_flag = 0, volatile_flag = 0, readonly_flag = 0, 
  unsigned_flag = 0, asm_written_flag = 0, nowarning_flag = 0, used_flag = 0, 
  nothrow_flag = 0, static_flag = 0, public_flag = 0, private_flag = 0, 
  protected_flag = 0, deprecated_flag = 0, saturating_flag = 0, 
  default_def_flag = 0, lang_flag_0 = 0, lang_flag_1 = 0, lang_flag_2 = 0, 
  lang_flag_3 = 0, lang_flag_4 = 0, lang_flag_5 = 0, lang_flag_6 = 0, 
  visited = 0, packed_flag = 0, user_align = 0, spare = 0, address_space = 0}
(gdb) p (type->type.maxval)->base
$35 = {code = ERROR_MARK, side_effects_flag = 0, constant_flag = 0, 
  addressable_flag = 0, volatile_flag = 0, readonly_flag = 0, 
  unsigned_flag = 0, asm_written_flag = 0, nowarning_flag = 0, used_flag = 0, 
  nothrow_flag = 0, static_flag = 0, public_flag = 0, private_flag = 0, 
  protected_flag = 0, deprecated_flag = 0, saturating_flag = 0, 
  default_def_flag = 0, lang_flag_0 = 0, lang_flag_1 = 0, lang_flag_2 = 0, 
  lang_flag_3 = 0, lang_flag_4 = 0, lang_flag_5 = 0, lang_flag_6 = 0, 
  visited = 0, packed_flag = 0, user_align = 0, spare = 0, address_space = 0}


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42665


  parent reply	other threads:[~2010-01-11 17:15 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-08 21:07 [Bug lto/42665] New: " jjcogliati-r1 at yahoo dot com
2010-01-08 21:10 ` [Bug lto/42665] " rguenth at gcc dot gnu dot org
2010-01-08 21:27 ` jjcogliati-r1 at yahoo dot com
2010-01-08 21:39 ` jjcogliati-r1 at yahoo dot com
2010-01-08 21:42 ` rguenther at suse dot de
2010-01-08 22:29 ` jjcogliati-r1 at yahoo dot com
2010-01-08 22:45 ` rguenther at suse dot de
2010-01-11 15:50 ` jjcogliati-r1 at yahoo dot com
2010-01-11 15:54 ` rguenther at suse dot de
2010-01-11 17:15 ` jjcogliati-r1 at yahoo dot com [this message]
2010-01-11 17:23 ` rguenther at suse dot de
2010-01-11 18:58 ` jjcogliati-r1 at yahoo dot com
2010-01-12 21:14 ` jjcogliati-r1 at yahoo dot com
2010-01-13 11:37 ` rguenth at gcc dot gnu dot org
2010-01-13 16:22 ` rguenth at gcc dot gnu dot org
2010-01-13 23:27 ` jjcogliati-r1 at yahoo dot com
2010-01-14  9:39 ` rguenth at gcc dot gnu dot org
2010-01-14  9:46 ` rguenth 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=20100111171529.24486.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).