This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/16819] [3.4/3.5 regression] internal error (non-static function call, empty struct as arg)


------- Additional Comments From bangerth at dealii dot org  2004-07-29 13:37 -------
Here's something likely smaller: 
------------------------ 
extern int printf (char *, ...); 
int errors = 0; 
 
void failed() 
{ printf (""); errors++; } 
 
union ytd { double yvd[1]; } yvg; 
 
union xtg 
{ unsigned char xvm; } xvn; 
 
struct xtc 
{ unsigned char xvf; unsigned int xvd[2]; } xvo[2]; 
 
struct xtb 
{ unsigned int *xvc; unsigned char xvb; double xva[2][1]; } xvp; 
 
union xta { } xvq; 
 
void yfa(union ytd ypc) 
{ if (yvg.yvd[0] != ypc.yvd[0]) failed (); } 
 
void xfa(union xtg xpa, 
            struct xtc xpb[2], 
            struct xtb xpc, 
            union xta xpd) { 
  if (xvn.xvm != xpa.xvm)             failed (); 
  if (xvo[1].xvf != xpb[1].xvf)       failed (); 
  if (xvo[0].xvd[0] != xpb[0].xvd[0]) failed (); 
  if (xvp.xvc != xpc.xvc)             failed (); 
  if (xvp.xvb != xpc.xvb)             failed (); 
  if (xvp.xva[1][0] != xpc.xva[1][0]) failed (); 
  if (xvp.xva[0][0] != xpc.xva[0][0]) failed (); 
} 
 
int main() { 
  yfa (yvg); 
  xfa (xvn, xvo, xvp, xvq); 
} 
------------------------------ 
 
g/x> /home/bangerth/bin/gcc-3.5-pre/bin/gcc -O3 -c x.c 
x.c: In function `main': 
x.c:39: error: unable to find a register to spill in class `AREG' 
x.c:39: error: this is the insn: 
(insn:HI 74 85 75 0 (set (reg:HI 1 dx [94]) 
        (unspec:HI [ 
                (compare:CCFPU (reg:DF 9 st(1) [orig:72 yvg.yvd ] [72]) 
                    (reg:DF 8 st [orig:73 ypc ] [73])) 
            ] 24)) 21 {*cmpfp_2u_1} (nil) 
    (expr_list:REG_DEAD (reg:DF 9 st(1) [orig:72 yvg.yvd ] [72]) 
        (expr_list:REG_DEAD (reg:DF 8 st [orig:73 ypc ] [73]) 
            (nil)))) 
x.c:39: internal compiler error: in spill_failure, at reload1.c:1887 
Please submit a full bug report, 
with preprocessed source if appropriate. 
See <URL:http://gcc.gnu.org/bugs.html> for instructions. 
 
While the ICE happens in the same place in reload1 all the time, the exact 
insn that fails is different. If someone fixes this PR, please also check 
the original testcase. 
 
W. 

-- 


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]