public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/59468] New: ICE on invalid C++ code with LTO in gimple_get_virt_method_for_binfo, at gimple-fold.c:3224
@ 2013-12-11 12:52 d.g.gorbachev at gmail dot com
  2013-12-11 13:22 ` [Bug lto/59468] [4.9 Regression] " rguenth at gcc dot gnu.org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: d.g.gorbachev at gmail dot com @ 2013-12-11 12:52 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59468

            Bug ID: 59468
           Summary: ICE on invalid C++ code with LTO in
                    gimple_get_virt_method_for_binfo, at
                    gimple-fold.c:3224
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: lto
          Assignee: unassigned at gcc dot gnu.org
          Reporter: d.g.gorbachev at gmail dot com

Created attachment 31416
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31416&action=edit
Testcase (compile with `-O2 -flto -shared')

GCC 4.9.0 20131208 (experimental) - r205795.

lto1: internal compiler error: in gimple_get_virt_method_for_binfo, at
gimple-fold.c:3224
0x8408889 gimple_get_virt_method_for_binfo(long long, tree_node*)
    ../../gcc-4.9/gcc/gimple-fold.c:3223
0x845f414 record_target_from_binfo
    ../../gcc-4.9/gcc/ipa-devirt.c:667
0x845f4f2 record_target_from_binfo
    ../../gcc-4.9/gcc/ipa-devirt.c:684
0x845f4f2 record_target_from_binfo
    ../../gcc-4.9/gcc/ipa-devirt.c:684
0x845f609 possible_polymorphic_call_targets_1
    ../../gcc-4.9/gcc/ipa-devirt.c:708
0x845f670 possible_polymorphic_call_targets_1
    ../../gcc-4.9/gcc/ipa-devirt.c:714
0x8460e0f possible_polymorphic_call_targets(tree_node*, long long,
ipa_polymorphic_call_context, bool*, void**)
    ../../gcc-4.9/gcc/ipa-devirt.c:1295
0x8265d1d possible_polymorphic_call_targets(cgraph_edge*, bool*, void**)
    ../../gcc-4.9/gcc/ipa-utils.h:114
0x848cd5d walk_polymorphic_call_targets
    ../../gcc-4.9/gcc/ipa.c:174
0x848d40a symtab_remove_unreachable_nodes(bool, _IO_FILE*)
    ../../gcc-4.9/gcc/ipa.c:397
0x8578656 execute_todo
    ../../gcc-4.9/gcc/passes.c:1884

Some older 4.9.0 builds give a message like "lto1: fatal error: LTO_tags out of
range: Range is 0 to 353, value is 356". Other builds, such as 4.9.0 20131027
(r204109) crash with:

lto1: internal compiler error: Segmentation fault
0x85c19c0 crash_signal
    ../../gcc-4.9/gcc/toplev.c:334
0x84953be lto_file_decl_data_get_var_decl
    ../../gcc-4.9/gcc/lto-streamer.h:1190
0x84953be lto_input_tree_ref(lto_input_block*, data_in*, function*, LTO_tags)
    ../../gcc-4.9/gcc/lto-streamer-in.c:244
0x849553a lto_input_tree_1(lto_input_block*, data_in*, LTO_tags, unsigned int)
    ../../gcc-4.9/gcc/lto-streamer-in.c:1242
0x81403ae lto_read_decls
    ../../gcc-4.9/gcc/lto/lto.c:1914
0x8140726 lto_file_finalize
    ../../gcc-4.9/gcc/lto/lto.c:2167
0x8140764 lto_create_files_from_ids
    ../../gcc-4.9/gcc/lto/lto.c:2177
0x8140822 lto_file_read
    ../../gcc-4.9/gcc/lto/lto.c:2217
0x8140b51 read_cgraph_and_symbols
    ../../gcc-4.9/gcc/lto/lto.c:2823
0x81410c9 lto_main()
    ../../gcc-4.9/gcc/lto/lto.c:3254

With GCC 4.7.4:

In file included from 1.C:25:0,
                 from :12:
2.C:15:8: warning: type of '_ZTV1S' does not match original declaration
[enabled by default]
In file included from :8:0:
1.C:15:8: note: previously declared here
In file included from 1.C:25:0,
                 from :12:
2.C:6:8: warning: type of '_ZTV1X' does not match original declaration [enabled
by default]
In file included from :4:0:
1.C:6:8: note: previously declared here

There are no errors or warnings with GCC 4.8.3.


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2014-03-14  8:45 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-11 12:52 [Bug lto/59468] New: ICE on invalid C++ code with LTO in gimple_get_virt_method_for_binfo, at gimple-fold.c:3224 d.g.gorbachev at gmail dot com
2013-12-11 13:22 ` [Bug lto/59468] [4.9 Regression] " rguenth at gcc dot gnu.org
2013-12-11 14:23 ` rguenth at gcc dot gnu.org
2013-12-11 15:06 ` d.g.gorbachev at gmail dot com
2013-12-16 13:29 ` hubicka at gcc dot gnu.org
2013-12-16 22:40 ` d.g.gorbachev at gmail dot com
2013-12-16 23:03 ` hubicka at gcc dot gnu.org
2013-12-19 15:40 ` rguenth at gcc dot gnu.org
2014-02-11 18:07 ` d.g.gorbachev at gmail dot com
2014-02-11 22:54 ` hubicka at gcc dot gnu.org
2014-03-14  8:45 ` jakub at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).