I found an ICE in debian gcc-4.0_4.0.2-4 when building rsplib and about five
other packages. I've reduced it to a short file which follows. It fails with no
special options.

| [EMAIL PROTECTED]:/build/buildd/wkg$ gcc buggy.c
| buggy.c: In function 'buggy':
| buggy.c:17: internal compiler error: in
| instantiate_virtual_regs_lossage, at function.c:1442
| Please submit a full bug report,
| with preprocessed source if appropriate.
| See <URL:http://gcc.gnu.org/bugs.html> for instructions.
| For Debian GNU/Linux specific bug reporting instructions,
| see <URL:file:///usr/share/doc/gcc-4.0/README.Bugs>.

static unsigned int buggy(const unsigned int v1,
        const unsigned int v2, const unsigned int v3)
{
        const long long v1_64 = (long long)v1;
        const long long v2_64 = (long long)v2;
        const long long v3_64 = (long long)v3;
        long long v = v1_64 + v2_64 + v3_64;
        if(v < 0)
        {
                v = 0;
        }
        else if(v > (long long)0xffffffff)
        {
                v = (long long)0xffffffff;
        }
        return((unsigned int)v);
}


-- 
           Summary: [m68k] ICE in instantiate_virtual_regs_lossage
           Product: gcc
           Version: 4.0.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: stephen at marenka dot net
 GCC build triplet: m68k-linux-gnu
  GCC host triplet: m68k-linux-gnu
GCC target triplet: m68k-linux-gnu


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

Reply via email to