[Bug fortran/66762] ICE when compiling gfortran.dg/submodule_[16].f90 with -flto

pault at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sun Sep 27 17:55:00 GMT 2015


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66762

--- Comment #8 from Paul Thomas <pault at gcc dot gnu.org> ---
(In reply to Martin Liška from comment #7)
> I tried to investigate:
> gfortran ./gcc/testsuite/gfortran.dg/submodule_6.f08 -flto
> 
> If I compare corresponding argument passed to output_addr_const w/o LTO, I
> see:
> (const_int 54796891 [0x344225b])
> 
> ,instead of:
> (mem/u/f/c:DI (symbol_ref/f:DI ("*.LC0") [flags 0x2] <var_decl
> 0x7fbb9b3d52d0 *.LC0>) [0  S8 A64])
> 
> Thus it looks for me that in case of LTO, it is unable to resolve offset of
> the variable *.LC0:
> 
>  <var_decl 0x7ffff6a2c2d0 *.LC0
>     type <pointer_type 0x7ffff6e23888
>         type <record_type 0x7ffff6e237e0 t_a BLK
>             size <integer_cst 0x7ffff6c2bc30 constant 0>
>             unit size <integer_cst 0x7ffff6c2bbe8 constant 0>
>             align 8 symtab 0 alias set 0 canonical type 0x7ffff6e1ef18
> context <namespace_decl 0x7ffff6e225f0 mod_a>
>             pointer_to_this <pointer_type 0x7ffff6e23888> chain <type_decl
> 0x7ffff6e22688 D.3955>>
>         unsigned DI
>         size <integer_cst 0x7ffff6c2bbb8 constant 64>
>         unit size <integer_cst 0x7ffff6c2bbd0 constant 8>
>         align 64 symtab 0 alias set 0 canonical type 0x7ffff6c44738>
>     readonly addressable static unsigned ignored in-constant-pool DI file
> (null) line 0 col 0 size <integer_cst 0x7ffff6c2bbb8 64> unit size
> <integer_cst 0x7ffff6c2bbd0 8>
>     align 64 initial <constructor 0x7ffff6e24390>>
> 
> Martin

Dear Martin,

Thanks for taking a look. I am sorry to have taken so long to get back to you
but I have had a myriad of other things to do.

Do you by any chance know, which variable is causing the trouble? I am afraid
that *.LCO doesn't help me very much. This is wading around in a part of gcc
that I know essentially nothing about.

If it is lto___mod_a_MOD___vtab_mod_a_T_a, then is the multiplicity of sections
that is preventing the resolution of the offset?

Thanks in advance

Paul


More information about the Gcc-bugs mailing list