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

--- Comment #3 from Paul Thomas <pault at gcc dot gnu.org> ---
(In reply to Dominique d'Humieres from comment #2)
> > What are the precise circumstances that you see this, please?
> 
> [Book15] f90/bug% gfc
> /opt/gcc/_clean/gcc/testsuite/gfortran.dg/submodule_1.f90 -flto
> lto1: error: two or more sections for
> .gnu.lto___foo_interface_MOD___vtab_foo_interface_Foo.b6ec16be3917c0c
> ...
> [Book15] f90/bug% gfc -v
> Using built-in specs.
> COLLECT_GCC=gfc
> COLLECT_LTO_WRAPPER=/opt/gcc/gcc6w/libexec/gcc/x86_64-apple-darwin14.4.0/6.0.
> 0/lto-wrapper
> Target: x86_64-apple-darwin14.4.0
> Configured with: ../work/configure --prefix=/opt/gcc/gcc6w
> --enable-languages=c,c++,fortran,objc,obj-c++,ada,java,lto
> --with-gmp=/opt/mp-new --with-system-zlib --with-isl=/opt/mp-new
> --enable-lto --enable-plugin --with-arch=corei7 --with-cpu=corei7
> Thread model: posix
> gcc version 6.0.0 20150703 (experimental) [trunk revision 225405] (GCC) 
> 
> clean revision r225405.

With revision 226054 it is only submodule_6.f08 that fails with the rather
unhelpful message:
[pault@localhost submodules]$ ~/irun/bin/gfortran -flto
~/svn/trunk/gcc/testsuite/gfortran.dg/submodule_6.f08
lto1: internal compiler error: output_operand: invalid expression as operand
0x7313a3 output_operand_lossage(char const*, ...)
        ../../trunk/gcc/final.c:3417
0x731c75 output_addr_const(_IO_FILE*, rtx_def*)
        ../../trunk/gcc/final.c:4006
0xd5f94e assemble_integer_with_op(char const*, rtx_def*)
        ../../trunk/gcc/varasm.c:2721
0xd5f9b6 default_assemble_integer(rtx_def*, unsigned int, int)
        ../../trunk/gcc/varasm.c:2737
0xd5fa2a assemble_integer(rtx_def*, unsigned int, unsigned int, int)
        ../../trunk/gcc/varasm.c:2753
0xd651a0 output_constant
        ../../trunk/gcc/varasm.c:4773
0xd67b8b assemble_variable_contents
        ../../trunk/gcc/varasm.c:2069
0xd6f2da assemble_variable(tree_node*, int, int, int)
        ../../trunk/gcc/varasm.c:2291
0xd75d94 varpool_node::assemble_decl()
        ../../trunk/gcc/varpool.c:585
0x658dc3 output_in_order
        ../../trunk/gcc/cgraphunit.c:2162
0x6592db symbol_table::compile()
        ../../trunk/gcc/cgraphunit.c:2403
0x5c2b78 lto_main()
        ../../trunk/gcc/lto/lto.c:3286
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
lto-wrapper: fatal error: /home/pault/irun/bin/gfortran returned 1 exit status
compilation terminated.
/usr/bin/ld: lto-wrapper failed

I will try to isolate the line(s) that cause the ICE. However, I must confess
that I know zip-all about lto :-(

Paul

Reply via email to