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

            Bug ID: 111010
           Summary: [13 regression] error: unable to find a register to
                    spill compiling GCDAProfiling.c
           Product: gcc
           Version: 13.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ro at gcc dot gnu.org
  Target Milestone: ---
              Host: i386-pc-solaris2.11
            Target: i386-pc-solaris2.11
             Build: i386-pc-solaris2.11

Building current LLVM main with GCC 13.1.0 fails on Solaris/amd64, compiling
compiler-rt/lib/profile/GCDAProfiling.c.  I could reduce that file to the
attached
testcase:

$ gcc -O3 -m32 -fPIC -c GCDAProfiling.i -w
GCDAProfiling.i: In function ā€˜cā€™:
GCDAProfiling.i:21:1: error: unable to find a register to spill
   21 | }
      | ^
GCDAProfiling.i:21:1: error: this is the insn:
(insn 109 333 249 9 (set (reg:DI 300)
        (ior:DI (ashift:DI (zero_extend:DI (mem:SI (plus:SI (mult:SI (reg:SI
377 [orig:229 _118 ] [229])
                                (const_int 4 [0x4]))
                            (reg/f:SI 338 [orig:83 a.0_1 ] [83])) [3
MEM[(unsigned int *)_11]+0 S4 A32]))
                (const_int 32 [0x20]))
            (zero_extend:DI (mem:SI (plus:SI (mult:SI (reg:SI 299 [233])
                            (const_int 4 [0x4]))
                        (reg/f:SI 338 [orig:83 a.0_1 ] [83])) [3 MEM[(unsigned
int *)_15]+0 S4 A32])))) "GCDAProfiling.i":15:7 680 {*concatsidi3_3}
     (expr_list:REG_DEAD (reg:SI 377 [orig:229 _118 ] [229])
        (expr_list:REG_DEAD (reg/f:SI 338 [orig:83 a.0_1 ] [83])
            (expr_list:REG_DEAD (reg:SI 299 [233])
                (nil)))))

The corresponding cc1 invocation is

cc1 -fpreprocessed GCDAProfiling.i -quiet -m32 -mtune=generic -march=pentium4
-O3 -w -fPIC

The testcase compiles on the gcc-12 branch and trunk, so this is gcc-13 branch
regression only.

However, it does compile with a Linux/x86_64 gcc 13.1.0.

Reply via email to