public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/21518] New: error: unable to find a register to spill in class 'Q_REGS' with -fPIC and -O2
@ 2005-05-11 19:54 couriousous at mandriva dot org
  2005-05-11 19:57 ` [Bug target/21518] " pinskia at gcc dot gnu dot org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: couriousous at mandriva dot org @ 2005-05-11 19:54 UTC (permalink / raw)
  To: gcc-bugs

GCC version:     
gcc (GCC) 4.0.0 (4.0.0-3mdk for Mandriva Linux release 2006.0)     
But also tested with gcc 4.1 CVS 0508     
     
Architecture: ix86     
     
GCC cannot compile the following code when -O2 and -fPIC are used :     
     
     
     
static void drawPointsLines (char type, int first, int *dd) {*dd += 1;}       
       
int do_locator (int *call)       
{       
  int *dd = call;       
  int i = 0, type = 1;       
  if (call == 0)       
      for (; i < 2; i++)       
              dd += type;       
  else       
    {       
      type = *call;       
      for(; i < 2; i++)       
          if (type != i)       
              drawPointsLines (type,0, call);       
    }       
  drawPointsLines(type,0,call);       
  return 0;       
}     
     
     
[couriousous@localhost ~]$ gcc -c -O2 -fPIC gccbug.c    
gccbug.c: In function 'do_locator':    
gccbug.c:19: error: unable to find a register to spill in class 'Q_REGS'    
gccbug.c:19: error: this is the insn:    
(insn:HI 44 43 45 6 (set (reg:SI 0 ax [ type ])    
        (sign_extend:SI (subreg:QI (reg/v:SI 4 si [orig:63 type ] [63]) 0))) 84    
{extendqisi2} (nil)    
    (nil))    
gccbug.c:19: confused by earlier errors, bailing out    
    
But it compile if I remove -fPIC or -O2     
   
BTW, with gcc 3.4.1 cvs 0508 I get the following message in addition to the 
error ( translated from french ):  
Internal compiler error: in spill_failure at reload1.c:1897  
  
This is a regression from gcc 3.4.3   
  
There is maybe more updated information on the Mandriva bugreport:  
http://qa.mandriva.com/show_bug.cgi?id=15840

-- 
           Summary: error: unable to find a register to spill in class
                    'Q_REGS' with -fPIC and -O2
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: couriousous at mandriva dot org
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21518


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

end of thread, other threads:[~2005-09-27 16:20 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-11 19:54 [Bug c/21518] New: error: unable to find a register to spill in class 'Q_REGS' with -fPIC and -O2 couriousous at mandriva dot org
2005-05-11 19:57 ` [Bug target/21518] " pinskia at gcc dot gnu dot org
2005-05-11 21:00 ` [Bug target/21518] [4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
2005-05-11 21:23 ` pinskia at gcc dot gnu dot org
2005-05-11 21:24 ` pinskia at gcc dot gnu dot org
2005-05-12  8:59 ` jakub at gcc dot gnu dot org
2005-05-12 10:59 ` [Bug target/21518] " steven at gcc dot gnu dot org
2005-05-12 12:00 ` [Bug target/21518] [4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
2005-05-12 12:02 ` pinskia at gcc dot gnu dot org
2005-07-06 17:03 ` mmitchel at gcc dot gnu dot org
2005-07-26 23:38 ` steven at gcc dot gnu dot org
2005-09-27 16:20 ` mmitchel at gcc dot gnu dot 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).