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/34266] New: ICE


/*
% uname -a
Linux lepidus 2.4.21-sgi302r24 #1 SMP Fri Oct 22 22:43:12 PDT 2004 ia64 ia64
ia64 GNU/Linux
% gcc -v
Using built-in specs.
Target: ia64-unknown-linux-gnu
Configured with: /usr/local/gcc-4.2.2/src/gcc-4.2.2/configure
--enable-languages=c,c++,fortran --with-gnu-as
--with-as=/usr/local/binutils-2.17/ia64-Linux-gcc-4.1.1/bin/as --with-gnu-ld
--with-ld=/usr/local/binutils-2.17/ia64-Linux-gcc-4.1.1/bin/ld
--with-gmp=/usr/local/gmp-4.2.1/ia64-Linux-gcc-4.2.0
--with-mpfr=/usr/local/mpfr-2.2.1/ia64-Linux-gmp-4.2.1-gcc-4.2.0
--prefix=/usr/local/gcc-4.2.2/ia64-Linux
Thread model: posix
gcc version 4.2.2
%
% gcc -funroll-loops -O2 -c foo.c    // gives ICE
%
% gcc -funroll-loops -O1 -c foo.c    // compiles successfully
% gcc -O2 -c foo.c                   // compiles successfully
%
% gcc-4.3-20071123 -funroll-loops -O2 -c foo.c
                                     // compiles successfully
*/


/*
from GNU gmp "longlong.h"
*/
#define umul_ppmm(ph, pl, m0, m1) \
    __asm__ ("xma.hu %0 = %2, %3, f0\n\txma.l %1 = %2, %3, f0"          \
             : "=&f" (ph), "=f" (pl)                                    \
             : "f" (m0), "f" (m1))

/* cut down from sage-2.8.14/flint-0.9-r1075.p1/ZmodF_mul.c */
inline
void bar(long* out, long a)
{
   umul_ppmm(*out, *out, a, a);
   *out += a * a;
}

void foo(long* out, long* in, long len)
{
   int i;   for (i = 0; i < len; i++)
      bar(out, in[i]);
}


-- 
           Summary: ICE
           Product: gcc
           Version: 4.2.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: kate01123 at gmail dot com
 GCC build triplet: ia64-unknown-linux-gnu
  GCC host triplet: ia64-unknown-linux-gnu
GCC target triplet: ia64-unknown-linux-gnu


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


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