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]

Re: optimization/7063: internal compiler error: Internal compiler error in failed_reload, at reload1.c:5047


Hi,

the bug can reproduced with the following code snippet:

------------------------snip here----------------------
void foo()
{
   char                      (*c)[2];
   float                     *fp;
   int                       i, j;
   union { float r; int i; } u;

   for ( i=0; i<j; ++i )
      if (j==1)
      {
         ++fp;
         u.r = *fp; c[i][0] = u.i>0 ? 0 : (u.r+=1, u.i);
         u.r = *fp; c[i][0] = u.i>0 ? 0 : (u.r+=1, u.i);
      }
}
------------------------snip here----------------------

Just compile it with "gcc -march=athlon -O2 -fforce-addr -c" to get
the following error message:

bug.c: In function `foo':
bug.c:15: could not find a spill register
(insn 50 48 51 (set (subreg:SF (reg:QI 67) 0)
        (plus:SF (subreg:SF (reg/v:SI 0 eax [62]) 0)
            (reg:SF 8 st(0) [69]))) 525 {*fop_sf_comm_nosse} (nil)
    (expr_list:REG_DEAD (reg/v:SI 0 eax [62])
        (nil)))
bug.c:15: Internal compiler error in failed_reload, at reload1.c:5050
Please submit a full bug report, [etc.]

The bug is in gcc 3.1, recent snapshots of 3.1.1 and the main trunk.
It's a regression from gcc 3.0.x.

By the way, in the tar archive that was attached to the bug report
there was another file (psout.i) that causes an athlon-related ICE.
I opened another PR for that one (PR 7134).

Greetings,
Volker Reichelt

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7063
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7134



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