public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ipa/107944] New: ICE in cgraph_node::get_untransformed_body since r13-48-g27ee75dbe81bb7
@ 2022-12-01  9:12 marxin at gcc dot gnu.org
  2022-12-01  9:12 ` [Bug ipa/107944] " marxin at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-12-01  9:12 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 107944
           Summary: ICE in cgraph_node::get_untransformed_body since
                    r13-48-g27ee75dbe81bb7
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: ipa
          Assignee: unassigned at gcc dot gnu.org
          Reporter: marxin at gcc dot gnu.org
                CC: jamborm at gcc dot gnu.org, marxin at gcc dot gnu.org
  Target Milestone: ---

Created attachment 53994
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53994&action=edit
Reproducer

I noticed that while building libbackend.a with -flto and partial linking and I
tried to reduce it to something smaller. However, the result is still pretty
big.

$ g++ -w -O2 -flto -c *.ii -fno-exceptions -Wfatal-errors && g++ -Wfatal-errors
-flinker-output=nolto-rel -r -o libbackend.a -flto=1 [123456].o -w
/usr/lib64/gcc/x86_64-suse-linux/12/../../../../x86_64-suse-linux/bin/ld: 3.o
(symbol from plugin): in function `global_trees_6':
(.text+0x0): multiple definition of `integer_types_0'; 1.o (symbol from
plugin):(.text+0x0): first defined here
/usr/lib64/gcc/x86_64-suse-linux/12/../../../../x86_64-suse-linux/bin/ld: 3.o
(symbol from plugin): in function `global_trees_6':
(.text+0x0): multiple definition of `__trans_tmp_2'; 2.o (symbol from
plugin):(.text+0x0): first defined here
/usr/lib64/gcc/x86_64-suse-linux/12/../../../../x86_64-suse-linux/bin/ld: 3.o
(symbol from plugin): in function `global_trees_6':
(.text+0x0): multiple definition of `__trans_tmp_3'; 2.o (symbol from
plugin):(.text+0x0): first defined here
/usr/lib64/gcc/x86_64-suse-linux/12/../../../../x86_64-suse-linux/bin/ld: 6.o
(symbol from plugin): in function `__trans_tmp_1':
(.text+0x0): multiple definition of `__trans_tmp_1'; 2.o (symbol from
plugin):(.text+0x0): first defined here
/usr/lib64/gcc/x86_64-suse-linux/12/../../../../x86_64-suse-linux/bin/ld: 6.o
(symbol from plugin): in function `__trans_tmp_1':
(.text+0x0): multiple definition of `space_nelems'; 4.o (symbol from
plugin):(.text+0x0): first defined here
/usr/lib64/gcc/x86_64-suse-linux/12/../../../../x86_64-suse-linux/bin/ld: 6.o
(symbol from plugin): in function `__trans_tmp_1':
(.text+0x0): multiple definition of `reserve_reserve'; 4.o (symbol from
plugin):(.text+0x0): first defined here
1.ii:67:8: note: type ‘struct tree_base’ itself violates the C++ One Definition
Rule
   67 | struct tree_base {
      |        ^
2.ii:452:8: note: the incompatible type is defined here
  452 | struct tree_base {
      |        ^
2.ii:456:12: note: type ‘struct <anon>’ itself violates the C++ One Definition
Rule
  456 |     struct {
      |            ^
3.ii:340:18: note: the incompatible type is defined here
  340 |           struct {
      |                  ^
2.ii:143:7: note: type name ‘hash_table<hash_map<tree_node*, tree_node*,
simple_hashmap_traits<default_hash_traits<tree_node*>, tree_node*>
>::hash_entry, false, xcallocator>’ should match type name ‘hash_table<int,
false, xcallocator>’
  143 | class hash_table {
      |       ^
3.ii:237:131: note: the incompatible type is defined here
  237 |         template <typename Descriptor, bool Lazy = false,          
template <typename Type> class Allocator = xcallocator> class hash_table {
      |                                                                        
                                                          ^
2.ii:143:7: note: type ‘struct hash_table’ itself violates the C++ One
Definition Rule
  143 | class hash_table {
      |       ^
3.ii:237:131: note: the incompatible type is defined here
  237 |         template <typename Descriptor, bool Lazy = false,          
template <typename Type> class Allocator = xcallocator> class hash_table {
      |                                                                        
                                                          ^
lto-wrapper: warning: using serial compilation of 3 LTRANS jobs
lto-wrapper: note: see the ‘-flto’ option documentation for more information
during IPA pass: inline
In function ‘reserve’,
    inlined from ‘reserve’ at 4.ii:210:19,
    inlined from ‘reserve’ at 4.ii:199:35,
    inlined from ‘safe_push’ at 4.ii:220:10,
    inlined from ‘optimize_stmt’ at 4.ii:2254:36:
4.ii:142:52: internal compiler error: Segmentation fault
  142 |   unsigned alloc = vec_prefix::calculate_allocation(v ? &v->m_vecpfx :
0,
      |                                                    ^
0x102f987 internal_error(char const*, ...)
        ???:0
0x117935b cgraph_node::get_untransformed_body()
        ???:0
0x123f6e9 optimize_inline_calls(tree_node*)
        ???:0
0x123e4d2 inline_transform(cgraph_node*)
        ???:0
0x123da5f execute_all_ipa_transforms(bool)
        ???:0
0x15ebe1b cgraph_node::expand()
        ???:0
0x15e2f6d symbol_table::compile()
        ???:0
0x15d0368 lto_main()
        ???:0
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://bugs.opensuse.org/> for instructions.
lto-wrapper: fatal error: g++ returned 1 exit status
compilation terminated.
/usr/lib64/gcc/x86_64-suse-linux/12/../../../../x86_64-suse-linux/bin/ld:
error: lto-wrapper failed
collect2: error: ld returned 1 exit status

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

end of thread, other threads:[~2023-02-02 11:30 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-01  9:12 [Bug ipa/107944] New: ICE in cgraph_node::get_untransformed_body since r13-48-g27ee75dbe81bb7 marxin at gcc dot gnu.org
2022-12-01  9:12 ` [Bug ipa/107944] " marxin at gcc dot gnu.org
2022-12-01  9:52 ` [Bug ipa/107944] [12/13 Regression] " rguenth at gcc dot gnu.org
2022-12-21 10:59 ` [Bug ipa/107944] [11/12/13 " rguenth at gcc dot gnu.org
2022-12-28  9:21 ` marxin at gcc dot gnu.org
2023-01-18 14:44 ` cvs-commit at gcc dot gnu.org
2023-02-01 17:58 ` cvs-commit at gcc dot gnu.org
2023-02-02 11:28 ` cvs-commit at gcc dot gnu.org
2023-02-02 11:30 ` jamborm 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).