Bug 32647 - spill failures with hard-register variable
Summary: spill failures with hard-register variable
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.3.0
: P3 normal
Target Milestone: 4.8.0
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code, ra
Depends on: 9085 24319 32004
Blocks: 55277
  Show dependency treegraph
 
Reported: 2007-07-06 12:20 UTC by Paolo Bonzini
Modified: 2021-12-24 21:02 UTC (History)
4 users (show)

See Also:
Host:
Target: i686-pc-linux-gnu
Build:
Known to work: 11.1.0, 4.8.1, 5.1.0, 9.1.0
Known to fail: 3.3.6, 4.1.2, 4.2.1, 4.3.0
Last reconfirmed: 2008-09-14 04:32:39


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paolo Bonzini 2007-07-06 12:20:56 UTC
This testcase fails with a spill failure for class AREG:

void f(int a)
{
  register int reg asm ("eax") = 0;
  a /= 1000;
  asm volatile ("nop" : "+r"(reg), "+r"(a));
}
Comment 1 Andrew Pinski 2008-09-14 04:34:56 UTC
Related to PR 22072.
Comment 2 Uroš Bizjak 2012-11-19 18:50:46 UTC
Adding CC.
Comment 3 Uroš Bizjak 2012-11-26 19:32:14 UTC
LRA ICEs with following backtrace (-O2) on x86_64:

pr32647.c: In function ‘f’:
pr32647.c:6:1: internal compiler error: in assign_by_spills, at lra-assigns.c:1212
 }
 ^
0x7f41a1 assign_by_spills
        ../../gcc-svn/trunk/gcc/lra-assigns.c:1212
0x7f41a1 lra_assign()
        ../../gcc-svn/trunk/gcc/lra-assigns.c:1364
0x7f1626 lra(_IO_FILE*)
        ../../gcc-svn/trunk/gcc/lra.c:2306
0x7b9038 do_reload
        ../../gcc-svn/trunk/gcc/ira.c:4624
0x7b9038 rest_of_handle_reload
        ../../gcc-svn/trunk/gcc/ira.c:4737

The failure is similar to PR55277.
Comment 4 Andrew Pinski 2021-12-24 21:02:06 UTC
Fixed back in GCC 4.8.0 (most likely by the patch which fixed PR 55277).