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

            Bug ID: 106364
           Summary: ICE when compiling inline asm with -m32
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: tlwang at uwaterloo dot ca
  Target Milestone: ---

See below.

// Target: x86_64-pc-linux-gnu
// Configured with: /tmp/tmp.KjYQzLjtrV-gcc-builder/gcc/configure
--enable-languages=c,c++,lto --enable-checking-yes --enable-multiarch
--prefix=/scratch/software/gcc-trunk --disable-bootstrap
// Thread model: posix
// Supported LTO compression algorithms: zlib
// gcc version 13.0.0 20220719 (experimental) [master -g2180cdd8a] (GCC)
//
// inline_asm_program0_preprocessed.c: In function ‘l’:
// inline_asm_program0_preprocessed.c:6:5: error: ‘asm’ operand has impossible
constraints
//     6 |     asm(""
//       |     ^~~
// during RTL pass: reload
// inline_asm_program0_preprocessed.c:9:1: internal compiler error: maximum
number of LRA assignment passes is achieved (30)
//     9 | }
//       | ^
// 0xe5fd80 lra_assign(bool&)
//      /tmp/tmp.KjYQzLjtrV-gcc-builder/gcc/gcc/lra-assigns.cc:1694
// 0xe5a76c lra(_IO_FILE*)
//      /tmp/tmp.KjYQzLjtrV-gcc-builder/gcc/gcc/lra.cc:2426
// 0xe0e159 do_reload
//      /tmp/tmp.KjYQzLjtrV-gcc-builder/gcc/gcc/ira.cc:5940
// 0xe0e159 execute
//      /tmp/tmp.KjYQzLjtrV-gcc-builder/gcc/gcc/ira.cc:6126
// Please submit a full bug report, with preprocessed source.
// Please include the complete backtrace with any bug report.
// See <https://gcc.gnu.org/bugs/> for instructions.

// /scratch/software/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/13.0.0/cc1
-quiet -imultilib 32 -imultiarch i386-linux-gnu
inline_asm_program0_preprocessed.c -quiet -dumpdir a- -dumpbase
inline_asm_program0_preprocessed.c -dumpbase-ext .c -m32 -mtune=generic
-march=x86-64 -O0 -w -freport-bug -o - -frandom-seed=0 -fdump-noaddr

# 0 "inline_asm_program0_preprocessed.c"
# 0 "<built-in>"
# 0 "<command-line>"
# 1 "/usr/include/stdc-predef.h" 1 3 4
# 0 "<command-line>" 2
# 1 "inline_asm_program0_preprocessed.c"
a, b, c, d, e, f, g, h, i;
long long j;
char k;
l() {
  for (;; l())
    asm(""
        : "+a"(h), "+r"(b), "=r"(a), "+r"(f), "+r"(e), "+r"(i), "=r"(g),
          "+r"(j), "=r"(d), "+r"(b), "+r"(k), "=r"(c));
}

Reply via email to