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]

optimization/2826: arm-linux-gcc ice



>Number:         2826
>Category:       optimization
>Synopsis:       ice when cross-compiling glibc for arm-linux
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    unassigned
>State:          open
>Class:          ice-on-legal-code
>Submitter-Id:   net
>Arrival-Date:   Tue May 15 08:36:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Enhanced Compiler Suit
>Release:        3.0 20010514 (prerelease)
>Organization:
>Environment:
System: Linux ABDERA 2.2.14-6.1.1 #1 Thu Apr 13 20:01:58 EDT 2000 i686 unknown
Architecture: i686

	
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: arm-unknown-linux-gnu
configured with: ../gcc-20010430/configure --prefix=/home/egcs/experimental --target=arm-linux --verbose --with-cpu=xscale
>Description:
Cross compiling glibc-2.2.3 (linuxthreads-2.2.3) results in two kind of problems : this bugreport describes one of those problems :
Compiling the program found in the 'how to repeat' part results in an ice :

[egcs@ABDERA build]$  arm-linux-gcc -v -v-O2 -S stat64_problem.i
Reading specs from /home/egcs/experimental/lib/gcc-lib/arm-linux/3.0/specs
arm-linux-gcc: unrecognized option `-v-O2'
Configured with: ../gcc-20010430/configure --prefix=/home/egcs/experimental --target=arm-linux --verbose --with-cpu=xscale
Thread model: posix
gcc version 3.0 20010514 (prerelease)
 /home/egcs/experimental/lib/gcc-lib/arm-linux/3.0/cc1 -fpreprocessed stat64_problem.i -quiet -dumpbase stat64_problem.i -version -o stat64_problem.s
GNU CPP version 3.0 20010514 (prerelease) (cpplib) (ARM GNU/Linux with ELF)
GNU C version 3.0 20010514 (prerelease) (arm-linux)
	compiled by GNU C version 3.0 20010430 (prerelease).
[egcs@ABDERA build]$ arm-linux-gcc -v -v -O2 -S stat64_problem.i
Reading specs from /home/egcs/experimental/lib/gcc-lib/arm-linux/3.0/specs
Configured with: ../gcc-20010430/configure --prefix=/home/egcs/experimental --target=arm-linux --verbose --with-cpu=xscale
Thread model: posix
gcc version 3.0 20010514 (prerelease)
 /home/egcs/experimental/lib/gcc-lib/arm-linux/3.0/cc1 -fpreprocessed stat64_problem.i -quiet -dumpbase stat64_problem.i -O2 -version -o stat64_problem.s
GNU CPP version 3.0 20010514 (prerelease) (cpplib) (ARM GNU/Linux with ELF)
GNU C version 3.0 20010514 (prerelease) (arm-linux)
	compiled by GNU C version 3.0 20010430 (prerelease).
stat64_problem.i: In function `__statvfs64':
stat64_problem.i:76: Internal compiler error in find_reloads, at reload.c:3698
Please submit a full bug report, with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.


Compiling for 'strongarm' (-mcpu=strongarm) results in the same problem


>How-To-Repeat:
create a crosscompile version of gcc for arm-linux, compile following program   with :
(-mcpu=strongarm also shows the problem)
arm-linux-gcc -v -v-O2 -S -mcpu=xscale stat64_problem.i


/* stat64_problem.i */
__extension__ typedef unsigned long long int __u_quad_t;
__extension__ typedef long long int __quad_t;

typedef unsigned int size_t;

extern void *memcpy (void *__restrict __dest,
                     __const void *__restrict __src, size_t __n) ;
typedef unsigned long __u_long;
typedef __u_long __fsblkcnt_t;
typedef __u_long __fsfilcnt_t;
typedef __u_quad_t __fsblkcnt64_t;
typedef __u_quad_t __fsfilcnt64_t;

struct statvfs64
  {
    unsigned long int f_bsize;
    unsigned long int f_frsize;
    __fsblkcnt64_t f_blocks;
    __fsblkcnt64_t f_bfree;
    __fsblkcnt64_t f_bavail;
    __fsfilcnt64_t f_files;
    __fsfilcnt64_t f_ffree;
    __fsfilcnt64_t f_favail;
    unsigned long int f_fsid;
    int __f_unused;
    unsigned long int f_flag;
    unsigned long int f_namemax;
    int __f_spare[6];
  };


struct statvfs
  {
    unsigned long int f_bsize;
    unsigned long int f_frsize;

    __fsblkcnt_t f_blocks;
    __fsblkcnt_t f_bfree;
    __fsblkcnt_t f_bavail;
    __fsfilcnt_t f_files;
    __fsfilcnt_t f_ffree;
    __fsfilcnt_t f_favail;
    unsigned long int f_fsid;
    int __f_unused;
    unsigned long int f_flag;
    unsigned long int f_namemax;
    int __f_spare[6];
  };

extern int statvfs (__const char *__restrict __file,
                    struct statvfs *__restrict __buf) ;

int
__statvfs64 (const char *file, struct statvfs64 *buf)
{
  struct statvfs buf32;

  if (statvfs (file, &buf32) < 0)
    return -1;

  buf->f_bsize = buf32.f_bsize;
  buf->f_frsize = buf32.f_frsize;
  buf->f_blocks = buf32.f_blocks;
  buf->f_bfree = buf32.f_bfree;
  buf->f_bavail = buf32.f_bavail;
  buf->f_files = buf32.f_files;
  buf->f_ffree = buf32.f_ffree;
  buf->f_favail = buf32.f_favail;
  buf->f_fsid = buf32.f_fsid;
  buf->f_flag = buf32.f_flag;
  buf->f_namemax = buf32.f_namemax;
  memcpy (buf->__f_spare, buf32.__f_spare, sizeof (buf32.__f_spare));

  return 0;
}
extern __typeof (__statvfs64) statvfs64 __attribute__ ((weak, alias ("__statvfs64")));


/* end of stat64_problem.i */


>Fix:

compiling with '--no-schedule-insns' works fine...

>Release-Note:
>Audit-Trail:
>Unformatted:


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