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