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

            Bug ID: 123549
           Summary: ICE on x86_64-linux-gnu: in verify_live_on_entry, at
                    tree-ssa-live.cc:1674 with _Complex and asm goto
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jiangchangwu at smail dot nju.edu.cn
  Target Milestone: ---

Compiler Explorer: https://godbolt.org/z/Pev5ETsdd

*******************************************************************************
gcc version:
Using built-in specs.
COLLECT_GCC=gcc-trunk
COLLECT_LTO_WRAPPER=/compiler/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/16.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../configure --disable-multilib --disable-bootstrap
--enable-languages=c,c++ --prefix=/compiler/gcc-trunk --enable-coverage
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 16.0.0 20251229 (experimental) (GCC)

*******************************************************************************
Program:
$ cat small.c
void a() {
  __asm__ goto("" : : : : b);
  _Complex c;
d:
  asm goto("" : "=r"(c) : : : b);
b:
  __asm__ goto("" : : : : d);
  c + 1;
}

*******************************************************************************
Command Lines:
$ gcc -O0 -c small.c
small.c: In function 'a':
small.c:5:3: sorry, unimplemented: 'asm goto' with complex typed outputs
    5 |   asm goto("" : "=r"(c) : : : b);
      |   ^~~
c$real_13 is defined by:
c$real_13 = 0.0;

It is also live-on-entry to entry BB 2 So it appears to have multiple defs.
c$imag_14 is defined by:
c$imag_14 = 0.0;

It is also live-on-entry to entry BB 2 So it appears to have multiple defs.
during RTL pass: expand
small.c:1:6: internal compiler error: in verify_live_on_entry, at
tree-ssa-live.cc:1674
    1 | void a() {
      |      ^
0x5740443 diagnostics::context::diagnostic_impl(rich_location*,
diagnostics::metadata const*, diagnostics::option_id, char const*,
__va_list_tag (*) [1], diagnostics::kind)
        ???:0
0x5725716 internal_error(char const*, ...)
        ???:0
0x5740c16 fancy_abort(char const*, int, char const*)
        ???:0
0x25fae37 calculate_live_ranges(_var_map*, bool)
        ???:0
0x2589f88 coalesce_ssa_name(_var_map*)
        ???:0
0x2478b72 rewrite_out_of_ssa(ssaexpand*)
        ???: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://gcc.gnu.org/bugs/> for instructions.

Reply via email to