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

--- Comment #6 from Martin Liška <marxin at gcc dot gnu.org> ---
(In reply to Jan Hubicka from comment #3)
> Still works for me
> hubicka@lomikamen-jh:~$ /aux/hubicka/trunk-install/bin/g++ 1.ii 2.F -O2 -flto
> /usr/local/bin/ld: /tmp/ccpfzvWm.ltrans0.ltrans.o: in function `main':
> <artificial>:(.text.startup+0x5): undefined reference to `_gfortran_set_args'
> /usr/local/bin/ld: <artificial>:(.text.startup+0x14): undefined reference to
> `_gfortran_set_options'
> collect2: error: ld returned 1 exit status
> 
> also with system compiler on tumbleweed
> There is extra cat in 1.ii, perhaps it is truncated?

I've just uploaded test-cases, please test it. Using TW GCC:

$ g++ --version
g++ (SUSE Linux) 9.1.1 20190723 [gcc-9-branch revision 273734]

$ g++ 1.ii 2.F -flto -O2 
2.F:1:3: warning: type of ‘ltregul’ does not match original declaration
[-Wlto-type-mismatch]
    1 |  common /ltregul/ zeroeps
      |   ^
lto1: internal compiler error: in warn_types_mismatch, at ipa-devirt.c:1133
0x7fc5fcd15bca __libc_start_main
        ../csu/libc-start.c:308

Reply via email to