[Bug lto/42665] Internal compiler exception in with gfortran when using -fwhole-program -flto -fopenmp

jjcogliati-r1 at yahoo dot com gcc-bugzilla@gcc.gnu.org
Mon Jan 11 18:58:00 GMT 2010



------- Comment #11 from jjcogliati-r1 at yahoo dot com  2010-01-11 18:58 -------
(In reply to comment #10)
> Subject: Re:  Internal compiler exception in with gfortran
>  when using  -fwhole-program -flto -fopenmp
> 
> On Mon, 11 Jan 2010, jjcogliati-r1 at yahoo dot com wrote:
> 
> > 
> > 
> > ------- 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?
> 
> It should never be error_mark_node ...

Okay, so:
(gdb) down
#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
3722          v = visit (TYPE_DOMAIN (type), state, v,
(gdb) p type->type.values->type.maxval->base
$67 = {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}

That should not have happened, since it is ERROR_MARK

I think the assert that would have triggered would need to check:
TREE_CODE (TYPE_MAX_VALUE (TYPE_DOMAIN (type) )) != ERROR_MARK
tho it would probably need to check a few of the intermediate values.


-- 


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



More information about the Gcc-bugs mailing list