This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/65140] New: crash with function multiversioning and LTO


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

            Bug ID: 65140
           Summary: crash with function multiversioning and LTO
           Product: gcc
           Version: 4.9.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jens.maurer at gmx dot net

The first example for function multiversioning given at
https://gcc.gnu.org/wiki/FunctionMultiVersioning crashes when compiled with
-flto.


Reduced example:

__attribute__ ((target ("default")))
void foo() { }

__attribute__ ((target ("sse4.2")))
void foo() { }

int main ()
{
  foo();
}


Compiler output:

$ g++ -v -flto x.cc 
...
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-4.9.2/configure --enable-languages=c,c++
--with-system-zlib --enable-lto --with-abi=m64 --disable-multilib
Thread model: posix
gcc version 4.9.2 (GCC) 
...
x.cc: In function âfoo() [clone .resolver]â:
x.cc:11:1: internal compiler error: Segmentation fault
 }
 ^
0x990c0f crash_signal
        ../../gcc-4.9.2/gcc/toplev.c:337
0x8bd90e tree_is_indexable
        ../../gcc-4.9.2/gcc/lto-streamer-out.c:139
0x8bf56f lto_output_tree(output_block*, tree_node*, bool, bool)
        ../../gcc-4.9.2/gcc/lto-streamer-out.c:1352
0x8bfc74 output_function
        ../../gcc-4.9.2/gcc/lto-streamer-out.c:1832
0x8bfc74 lto_output()
        ../../gcc-4.9.2/gcc/lto-streamer-out.c:2084
0x8f39a1 write_lto
        ../../gcc-4.9.2/gcc/passes.c:2298
0x8f6550 ipa_write_summaries_1
        ../../gcc-4.9.2/gcc/passes.c:2360
0x8f6550 ipa_write_summaries()
        ../../gcc-4.9.2/gcc/passes.c:2417
0x71eb2a ipa_passes
        ../../gcc-4.9.2/gcc/cgraphunit.c:2078
0x71eb2a compile()
        ../../gcc-4.9.2/gcc/cgraphunit.c:2174
0x71ece4 finalize_compilation_unit()
        ../../gcc-4.9.2/gcc/cgraphunit.c:2329
0x5d30a3 cp_write_global_declarations()
        ../../gcc-4.9.2/gcc/cp/decl2.c:4643
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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]