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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |marxin at gcc dot gnu.org

--- Comment #7 from Martin Liška <marxin at gcc dot gnu.org> ---
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

Reply via email to