public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/111342] New: ICE for g++.target/i386/pr105980.C on x86_64-apple-darwin21
@ 2023-09-08 20:16 fxcoudert at gcc dot gnu.org
  2024-02-10 18:19 ` [Bug target/111342] " fxcoudert at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: fxcoudert at gcc dot gnu.org @ 2023-09-08 20:16 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 111342
           Summary: ICE for g++.target/i386/pr105980.C on
                    x86_64-apple-darwin21
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: fxcoudert at gcc dot gnu.org
  Target Milestone: ---

There is an ICE for g++.target/i386/pr105980.C on x86_64-apple-darwin21. It is
linked to the -mforce-indirect-call option passed by the testcase: without that
option, the test can compile fine.



$ cat pr105980.ii 
# 0 "/Users/fx/gcc-upstream/gcc/testsuite/g++.target/i386/pr105980.C"
# 0 "<built-in>"
# 0 "<command-line>"
# 1 "/Users/fx/gcc-upstream/gcc/testsuite/g++.target/i386/pr105980.C"



struct A {
  virtual ~A();
};
struct B : virtual A {};
void bar() { B(); }

$ /Users/fx/ibin/gcc/testsuite/g++/../../cc1plus -fpreprocessed pr105980.ii
-fPIC -quiet -mforce-indirect-call -std=gnu++20 
/Users/fx/gcc-upstream/gcc/testsuite/g++.target/i386/pr105980.C: In member
function ‘virtual void B::_ZTv0_n24_N1BD1Ev()’:
/Users/fx/gcc-upstream/gcc/testsuite/g++.target/i386/pr105980.C:8:19: error:
unrecognizable insn:
    8 | void bar() { B(); }
      |                   ^
(call_insn/j 4 3 5 (call (mem:QI (symbol_ref/i:DI ("_ZN1BD1Ev") [flags 0x8001]
<function_decl 0x10ae9e100 __dt_comp >) [0  S1 A8])
        (const_int 0 [0]))
"/Users/fx/gcc-upstream/gcc/testsuite/g++.target/i386/pr105980.C":7:8 -1
     (nil)
    (nil))


The backtrace, obtained under lldb, is:

  * frame #0: 0x0000000101b76378 cc1plus`internal_error(char const*, ...)
[inlined] auto_diagnostic_group::auto_diagnostic_group(this=<unavailable>) at
diagnostic.cc:2320:14
    frame #1: 0x0000000101b76378 cc1plus`internal_error(gmsgid="in %s, at
%s:%d")
    frame #2: 0x0000000101f92296
cc1plus`fancy_abort(file="/Users/fx/gcc-upstream/gcc/config/i386/i386.md",
line=22310, function="insn_default_length") at diagnostic.cc:2311:18
    frame #3: 0x0000000101ebe875 cc1plus`_fatal_insn(msgid=<unavailable>,
insn=0x00000001046cfd80, file="/Users/fx/gcc-upstream/gcc/config/i386/i386.md",
line=22310, function="insn_default_length") at rtl-error.cc:108:15
    frame #4: 0x0000000101ebe893
cc1plus`_fatal_insn_not_found(insn=<unavailable>, file=<unavailable>,
line=<unavailable>, function=<unavailable>) at rtl-error.cc:116:17
    frame #5: 0x0000000101dd06fb cc1plus`insn_default_length(rtx_insn*) at
i386.md:22310:9
    frame #6: 0x000000010101883d cc1plus`shorten_branches(first=<unavailable>)
at final.cc:1088:35
    frame #7: 0x00000001019f32bc
cc1plus`::x86_output_mi_thunk(file=0x00007ff84841be00,
thunk_fndecl=0x00000001046b5300, delta=<unavailable>,
vcall_offset=<unavailable>, function=<unavailable>) at i386.cc:22087:20
    frame #8: 0x0000000100ead83a cc1plus`expand_thunk(node=0x00000001046cb000,
output_asm_thunks=<unavailable>, force_gimple_thunk=<unavailable>) at
symtab-thunks.cc:388:39
    frame #9: 0x0000000100ebf673
cc1plus`cgraph_node::assemble_thunks_and_aliases(this=0x000000010451bdd0) at
cgraphunit.cc:1763:15
    frame #10: 0x0000000100ebf9a4 cc1plus`cgraph_node::expand() at
cgraphunit.cc:1914:31
    frame #11: 0x0000000100ebf7b0
cc1plus`cgraph_node::expand(this=0x000000010451bdd0)
    frame #12: 0x0000000100ec10c0
cc1plus`symbol_table::compile(this=0x0000000104506000) at cgraphunit.cc:2191:19
    frame #13: 0x0000000100ec4656
cc1plus`symbol_table::finalize_compilation_unit() [inlined]
symbol_table::compile(this=0x0000000104506000) at cgraphunit.cc:2311:3
    frame #14: 0x0000000100ec4645
cc1plus`symbol_table::finalize_compilation_unit(this=0x0000000104506000)
    frame #15: 0x00000001015b5efe cc1plus`::compile_file() at toplev.cc:471:41
    frame #16: 0x0000000101f96942 cc1plus`toplev::main(this=0x00007ff7bfeff8fe,
argc=<unavailable>, argv=<unavailable>) at toplev.cc:2126:24
    frame #17: 0x0000000101f9712e cc1plus`main(argc=8, argv=0x00007ff7bfeffa48)
at main.cc:39:23

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

* [Bug target/111342] ICE for g++.target/i386/pr105980.C on x86_64-apple-darwin21
  2023-09-08 20:16 [Bug target/111342] New: ICE for g++.target/i386/pr105980.C on x86_64-apple-darwin21 fxcoudert at gcc dot gnu.org
@ 2024-02-10 18:19 ` fxcoudert at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: fxcoudert at gcc dot gnu.org @ 2024-02-10 18:19 UTC (permalink / raw)
  To: gcc-bugs

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

Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2024-02-10
     Ever confirmed|0                           |1

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

end of thread, other threads:[~2024-02-10 18:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-08 20:16 [Bug target/111342] New: ICE for g++.target/i386/pr105980.C on x86_64-apple-darwin21 fxcoudert at gcc dot gnu.org
2024-02-10 18:19 ` [Bug target/111342] " fxcoudert 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).