This is the mail archive of the gcc@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]

Testcase for a new ICE


This test case fails on mainline now for i386 and x86-64. The problem is hit 
in compilation of the kernel and glibc. The testcase here is distilled from 
linux/drivers/char/mem.c:

*** --- ***

typedef struct { long p; } pt;

inline pt f(pt _p)
{
  long p = _p.p;

  return (pt) { (p) };
}

static int mmap_mem(void)
{
  pt p;
  p = f(p);

  return 0;
}

*** --- ***

The offending line seems to be the return in the function. If that is not 
doing that struct building, this doesn't ICE.

bo@idefix> x86_64-unknown-linux-gcc -O2 -v mem1.i
Laeser specifikationer fra 
/home/bo/Work/crossbuild/x86-64/lib/gcc-lib/x86_64-unknown-linux/3.1/specs
Configured with: /home/bo/Work/crossbuild/cvs-sources/gcc/configure 
--prefix=/home/bo/Work/crossbuild/x86-64 --target=x86_64-unknown-linux 
--enable-languages=c,c++ --enable-threads=posix --disable-shared : 
(reconfigured) /home/bo/Work/crossbuild/cvs-sources/gcc/configure 
--prefix=/home/bo/Work/crossbuild/x86-64 --target=x86_64-unknown-linux 
--enable-languages=c,c++ --enable-threads=posix --disable-shared
Thread model: posix
gcc version 3.1 20011211 (experimental)
 /home/bo/Work/crossbuild/x86-64/lib/gcc-lib/x86_64-unknown-linux/3.1/cc1 
-fpreprocessed mem1.i -quiet -dumpbase mem1.i -O2 -version -o /tmp/ccaSYrAz.s
GNU CPP version 3.1 20011211 (experimental) (cpplib) (x86-64 Linux/ELF)
GNU C version 3.1 20011211 (experimental) (x86_64-unknown-linux)
        compiled by GNU C version 2.95.3 20010315 (SuSE).
mem1.i: In function `mmap_mem':
mem1.i:5: Internal compiler error in make_decl_rtl, at varasm.c:832
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.

Bo.

-- 

     Bo Thorsen                 |   Praestevejen 4
     Free software developer    |   5290 Marslev
     SuSE Labs                  |   Denmark


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