public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug bootstrap/31523]  New: bootstrap xgcc internal compiler error (using -O3)
@ 2007-04-10  9:18 anirkko at insel dot ch
  2007-04-13 21:46 ` [Bug bootstrap/31523] " anirkko at insel dot ch
                   ` (15 more replies)
  0 siblings, 16 replies; 17+ messages in thread
From: anirkko at insel dot ch @ 2007-04-10  9:18 UTC (permalink / raw)
  To: gcc-bugs

Bootstrap of gcc-4.1.2 failed with an internal compiler error
("Please submit a full bug report") from ./gcc/xgcc when compiling
libstdc++-v3/libsupc++/del_op.cc, using gcc-3.4.3 as the bootstrap
compiler on sparc-sun-solaris2.6 with following configure options
and bootstrap flags (below), producing the follwing output (further
below), with the follwing -save-temps generated .ii file (furthest
below):

setenv CONFIG_SHELL /bin/ksh
configure --prefix="/usr/local/gcc/$GCC_V" \
    --disable-shared \
    --with-gnu-as --with-as=/usr/local/bin/gas \
    --with-gnu-ld --with-ld=/usr/local/bin/gld \
    --with-cpu=supersparc \
    --enable-version-specific-runtime-libs \
    --enable-languages=c,ada,c++,objc,obj-c++,treelang \
    --disable-nls
gmake CFLAGS='-O3 -mcpu=supersparc -mno-app-regs' \
    CXXFLAGS='-O3 -mcpu=supersparc -mno-app-regs' \
    LIBCFLAGS='-O3 -mcpu=supersparc -mno-app-regs' \
    LIBCXXFLAGS='-O3 -mcpu=supersparc -mno-app-regs -fno-implicit-templates' \
    BOOT_CFLAGS='-O3 -mcpu=supersparc -mno-app-regs' \
    bootstrap

produced this output:
/package/gcc/gcc-4.1.2_obj0/./gcc/xgcc -shared-libgcc
-B/package/gcc/gcc-4.1.2_obj0/./gcc -nostdinc++
-L/package/gcc/gcc-4.1.2_obj0/sparc-sun-solaris2.6/libstdc++-v3/src
-L/package/gcc/gcc-4.1.2_obj0/sparc-sun-solaris2.6/libstdc++-v3/src/.libs
-B/usr/local/gcc/gcc-4.1.2/sparc-sun-solaris2.6/bin/
-B/usr/local/gcc/gcc-4.1.2/sparc-sun-solaris2.6/lib/ -isystem
/usr/local/gcc/gcc-4.1.2/sparc-sun-solaris2.6/include -isystem
/usr/local/gcc/gcc-4.1.2/sparc-sun-solaris2.6/sys-include
-I/package/gcc/gcc-4.1.2/libstdc++-v3/../gcc
-I/package/gcc/gcc-4.1.2_obj0/sparc-sun-solaris2.6/libstdc++-v3/include/sparc-sun-solaris2.6
-I/package/gcc/gcc-4.1.2_obj0/sparc-sun-solaris2.6/libstdc++-v3/include
-I/package/gcc/gcc-4.1.2/libstdc++-v3/libsupc++  -O3 -mcpu=supersparc
-mno-app-regs  -fno-implicit-templates  -Wall -Wextra -Wwrite-strings
-Wcast-qual  -fdiagnostics-show-location=once  -ffunction-sections
-fdata-sections  -c -o del_op.lo
/package/gcc/gcc-4.1.2/libstdc++-v3/libsupc++/del_op.cc
/package/gcc/gcc-4.1.2_obj0/./gcc/xgcc -shared-libgcc
-B/package/gcc/gcc-4.1.2_obj0/./gcc -nostdinc++
-L/package/gcc/gcc-4.1.2_obj0/sparc-sun-solaris2.6/libstdc++-v3/src
-L/package/gcc/gcc-4.1.2_obj0/sparc-sun-solaris2.6/libstdc++-v3/src/.libs
-B/usr/local/gcc/gcc-4.1.2/sparc-sun-solaris2.6/bin/
-B/usr/local/gcc/gcc-4.1.2/sparc-sun-solaris2.6/lib/ -isystem
/usr/local/gcc/gcc-4.1.2/sparc-sun-solaris2.6/include -isystem
/usr/local/gcc/gcc-4.1.2/sparc-sun-solaris2.6/sys-include
-I/package/gcc/gcc-4.1.2/libstdc++-v3/../gcc
-I/package/gcc/gcc-4.1.2_obj0/sparc-sun-solaris2.6/libstdc++-v3/include/sparc-sun-solaris2.6
-I/package/gcc/gcc-4.1.2_obj0/sparc-sun-solaris2.6/libstdc++-v3/include
-I/package/gcc/gcc-4.1.2/libstdc++-v3/libsupc++ -O3 -mcpu=supersparc
-mno-app-regs -fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual
-fdiagnostics-show-location=once -ffunction-sections -fdata-sections -c
/package/gcc/gcc-4.1.2/libstdc++-v3/libsupc++/del_op.cc -o del_op.o
/package/gcc/gcc-4.1.2_obj0/./gcc/include/sys/types.h:171: internal compiler
error: in maybe_process_template_type_declaration, at cp/name-lookup.c:4748
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
gmake[5]: *** [del_op.lo] Error 1
gmake[5]: Leaving directory
`/package/gcc/gcc-4.1.2_obj0/sparc-sun-solaris2.6/libstdc++-v3/libsupc++'
gmake[4]: *** [all-recursive] Error 1
gmake[4]: Leaving directory
`/package/gcc/gcc-4.1.2_obj0/sparc-sun-solaris2.6/libstdc++-v3'
gmake[3]: *** [all] Error 2
gmake[3]: Leaving directory
`/package/gcc/gcc-4.1.2_obj0/sparc-sun-solaris2.6/libstdc++-v3'
gmake[2]: *** [all-target-libstdc++-v3] Error 2
gmake[2]: Leaving directory `/package/gcc/gcc-4.1.2_obj0'
gmake[1]: *** [all] Error 2
gmake[1]: Leaving directory `/package/gcc/gcc-4.1.2_obj0'
gmake: *** [bootstrap] Error 2

The .ii file produced by the last xgcc command with -save-temps is:

# 1 "/package/gcc/gcc-4.1.2/libstdc++-v3/libsupc++/del_op.cc"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "/package/gcc/gcc-4.1.2/libstdc++-v3/libsupc++/del_op.cc"
# 31 "/package/gcc/gcc-4.1.2/libstdc++-v3/libsupc++/del_op.cc"
# 1 "/package/gcc/gcc-4.1.2/libstdc++-v3/libsupc++/new" 1
# 41 "/package/gcc/gcc-4.1.2/libstdc++-v3/libsupc++/new"
# 1
"/package/gcc/gcc-4.1.2_obj0/sparc-sun-solaris2.6/libstdc++-v3/include/cstddef"
1
# 48
"/package/gcc/gcc-4.1.2_obj0/sparc-sun-solaris2.6/libstdc++-v3/include/cstddef"

# 49
"/package/gcc/gcc-4.1.2_obj0/sparc-sun-solaris2.6/libstdc++-v3/include/cstddef"
3

# 1 "/package/gcc/gcc-4.1.2_obj0/./gcc/include/stddef.h" 1 3 4
# 152 "/package/gcc/gcc-4.1.2_obj0/./gcc/include/stddef.h" 3 4
typedef int ptrdiff_t;
# 214 "/package/gcc/gcc-4.1.2_obj0/./gcc/include/stddef.h" 3 4
typedef unsigned int size_t;
# 51
"/package/gcc/gcc-4.1.2_obj0/sparc-sun-solaris2.6/libstdc++-v3/include/cstddef"
2 3

namespace std
{
  using ::ptrdiff_t;
  using ::size_t;
}
# 42 "/package/gcc/gcc-4.1.2/libstdc++-v3/libsupc++/new" 2
# 1 "/package/gcc/gcc-4.1.2/libstdc++-v3/libsupc++/exception" 1
# 40 "/package/gcc/gcc-4.1.2/libstdc++-v3/libsupc++/exception"
#pragma GCC visibility push(default)

extern "C++" {

namespace std
{
# 54 "/package/gcc/gcc-4.1.2/libstdc++-v3/libsupc++/exception"
  class exception
  {
  public:
    exception() throw() { }
    virtual ~exception() throw();


    virtual const char* what() const throw();
  };



  class bad_exception : public exception
  {
  public:
    bad_exception() throw() { }


    virtual ~bad_exception() throw();
  };


  typedef void (*terminate_handler) ();

  typedef void (*unexpected_handler) ();


  terminate_handler set_terminate(terminate_handler) throw();


  void terminate() __attribute__ ((__noreturn__));


  unexpected_handler set_unexpected(unexpected_handler) throw();


  void unexpected() __attribute__ ((__noreturn__));
# 102 "/package/gcc/gcc-4.1.2/libstdc++-v3/libsupc++/exception"
  bool uncaught_exception() throw();
}

namespace __gnu_cxx
{
# 117 "/package/gcc/gcc-4.1.2/libstdc++-v3/libsupc++/exception"
  void __verbose_terminate_handler ();
}

}

#pragma GCC visibility pop
# 43 "/package/gcc/gcc-4.1.2/libstdc++-v3/libsupc++/new" 2

#pragma GCC visibility push(default)

extern "C++" {

namespace std
{





  class bad_alloc : public exception
  {
  public:
    bad_alloc() throw() { }


    virtual ~bad_alloc() throw();
  };

  struct nothrow_t { };
  extern const nothrow_t nothrow;


  typedef void (*new_handler)();

  new_handler set_new_handler(new_handler) throw();
}
# 84 "/package/gcc/gcc-4.1.2/libstdc++-v3/libsupc++/new"
void* operator new(std::size_t) throw (std::bad_alloc);
void* operator new[](std::size_t) throw (std::bad_alloc);
void operator delete(void*) throw();
void operator delete[](void*) throw();
void* operator new(std::size_t, const std::nothrow_t&) throw();
void* operator new[](std::size_t, const std::nothrow_t&) throw();
void operator delete(void*, const std::nothrow_t&) throw();
void operator delete[](void*, const std::nothrow_t&) throw();


inline void* operator new(std::size_t, void* __p) throw() { return __p; }
inline void* operator new[](std::size_t, void* __p) throw() { return __p; }


inline void operator delete (void*, void*) throw() { }
inline void operator delete[](void*, void*) throw() { }

}

#pragma GCC visibility pop
# 32 "/package/gcc/gcc-4.1.2/libstdc++-v3/libsupc++/del_op.cc" 2
# 1
"/package/gcc/gcc-4.1.2_obj0/sparc-sun-solaris2.6/libstdc++-v3/include/sparc-sun-solaris2.6/bits/c++config.h"
1
# 35
"/package/gcc/gcc-4.1.2_obj0/sparc-sun-solaris2.6/libstdc++-v3/include/sparc-sun-solaris2.6/bits/c++config.h"
# 1
"/package/gcc/gcc-4.1.2_obj0/sparc-sun-solaris2.6/libstdc++-v3/include/sparc-sun-solaris2.6/bits/os_defines.h"
1
# 36
"/package/gcc/gcc-4.1.2_obj0/sparc-sun-solaris2.6/libstdc++-v3/include/sparc-sun-solaris2.6/bits/c++config.h"
2


# 1
"/package/gcc/gcc-4.1.2_obj0/sparc-sun-solaris2.6/libstdc++-v3/include/sparc-sun-solaris2.6/bits/cpu_defines.h"
1
# 39
"/package/gcc/gcc-4.1.2_obj0/sparc-sun-solaris2.6/libstdc++-v3/include/sparc-sun-solaris2.6/bits/c++config.h"
2




namespace __gnu_debug_def { }

namespace __gnu_debug
{
  using namespace __gnu_debug_def;
}
# 33 "/package/gcc/gcc-4.1.2/libstdc++-v3/libsupc++/del_op.cc" 2

# 1
"/package/gcc/gcc-4.1.2_obj0/sparc-sun-solaris2.6/libstdc++-v3/include/cstdlib"
1
# 48
"/package/gcc/gcc-4.1.2_obj0/sparc-sun-solaris2.6/libstdc++-v3/include/cstdlib"

# 49
"/package/gcc/gcc-4.1.2_obj0/sparc-sun-solaris2.6/libstdc++-v3/include/cstdlib"
3
# 71
"/package/gcc/gcc-4.1.2_obj0/sparc-sun-solaris2.6/libstdc++-v3/include/cstdlib"
3
# 1 "/package/gcc/gcc-4.1.2_obj0/./gcc/include/stdlib.h" 1 3 4
# 25 "/package/gcc/gcc-4.1.2_obj0/./gcc/include/stdlib.h" 3 4
#pragma ident "@(#)stdlib.h     1.40    97/06/30 SMI"

# 1 "/usr/include/sys/feature_tests.h" 1 3 4
# 11 "/usr/include/sys/feature_tests.h" 3 4
#pragma ident "@(#)feature_tests.h      1.13    97/06/26 SMI"


extern "C" {
# 126 "/usr/include/sys/feature_tests.h" 3 4
}
# 28 "/package/gcc/gcc-4.1.2_obj0/./gcc/include/stdlib.h" 2 3 4



# 1 "/usr/include/sys/wait.h" 1 3 4
# 16 "/usr/include/sys/wait.h" 3 4
#pragma ident "@(#)wait.h       1.20    97/03/02 SMI"



# 1 "/package/gcc/gcc-4.1.2_obj0/./gcc/include/sys/types.h" 1 3 4
# 25 "/package/gcc/gcc-4.1.2_obj0/./gcc/include/sys/types.h" 3 4
#pragma ident "@(#)types.h      1.51    97/05/06 SMI"


# 1 "/usr/include/sys/isa_defs.h" 1 3 4
# 9 "/usr/include/sys/isa_defs.h" 3 4
#pragma ident "@(#)isa_defs.h   1.11    97/03/21 SMI"
# 138 "/usr/include/sys/isa_defs.h" 3 4
extern "C" {
# 344 "/usr/include/sys/isa_defs.h" 3 4
}
# 29 "/package/gcc/gcc-4.1.2_obj0/./gcc/include/sys/types.h" 2 3 4




# 1 "/usr/include/sys/machtypes.h" 1 3 4
# 16 "/usr/include/sys/machtypes.h" 3 4
#pragma ident "@(#)machtypes.h  1.11    96/04/29 SMI"




extern "C" {
# 33 "/usr/include/sys/machtypes.h" 3 4
typedef struct _physadr_t { int r[1]; } *physadr_t;

typedef struct _label_t { int val[2]; } label_t;



typedef unsigned char lock_t;


}
# 34 "/package/gcc/gcc-4.1.2_obj0/./gcc/include/sys/types.h" 2 3 4
# 42 "/package/gcc/gcc-4.1.2_obj0/./gcc/include/sys/types.h" 3 4
# 1 "/package/gcc/gcc-4.1.2_obj0/./gcc/include/sys/int_types.h" 1 3 4
# 18 "/package/gcc/gcc-4.1.2_obj0/./gcc/include/sys/int_types.h" 3 4
#pragma ident "@(#)int_types.h  1.4     96/09/25 SMI"
# 54 "/package/gcc/gcc-4.1.2_obj0/./gcc/include/sys/int_types.h" 3 4
extern "C" {
# 71 "/package/gcc/gcc-4.1.2_obj0/./gcc/include/sys/int_types.h" 3 4
typedef char int8_t;





typedef short int16_t;
typedef int int32_t;




typedef long long int64_t;



typedef unsigned char uint8_t;
typedef unsigned short uint16_t;
typedef unsigned int uint32_t;




typedef unsigned long long uint64_t;
# 103 "/package/gcc/gcc-4.1.2_obj0/./gcc/include/sys/int_types.h" 3 4
typedef int64_t intmax_t;
typedef uint64_t uintmax_t;
# 119 "/package/gcc/gcc-4.1.2_obj0/./gcc/include/sys/int_types.h" 3 4
typedef int intptr_t;
typedef unsigned int uintptr_t;







typedef char int_least8_t;





typedef short int_least16_t;
typedef int int_least32_t;




typedef long long int_least64_t;



typedef unsigned char uint_least8_t;
typedef unsigned short uint_least16_t;
typedef unsigned int uint_least32_t;




typedef unsigned long long uint_least64_t;




}
# 43 "/package/gcc/gcc-4.1.2_obj0/./gcc/include/sys/types.h" 2 3 4


extern "C" {
# 54 "/package/gcc/gcc-4.1.2_obj0/./gcc/include/sys/types.h" 3 4
typedef long long longlong_t;
typedef unsigned long long u_longlong_t;
# 71 "/package/gcc/gcc-4.1.2_obj0/./gcc/include/sys/types.h" 3 4
typedef unsigned char uchar_t;
typedef unsigned short ushort_t;
typedef unsigned int uint_t;
typedef unsigned long ulong_t;

typedef char * caddr_t;
typedef long daddr_t;
typedef short cnt_t;

typedef ulong_t paddr_t;
typedef uchar_t use_t;
typedef short sysid_t;
typedef short index_t;
# 96 "/package/gcc/gcc-4.1.2_obj0/./gcc/include/sys/types.h" 3 4
typedef long off_t;




typedef longlong_t off64_t;




typedef ulong_t ino_t;
typedef long blkcnt_t;
typedef ulong_t fsblkcnt_t;
typedef ulong_t fsfilcnt_t;







typedef u_longlong_t ino64_t;
typedef longlong_t blkcnt64_t;
typedef u_longlong_t fsblkcnt64_t;
typedef u_longlong_t fsfilcnt64_t;



typedef enum { _B_FALSE, _B_TRUE } boolean_t;
# 137 "/package/gcc/gcc-4.1.2_obj0/./gcc/include/sys/types.h" 3 4
typedef int64_t pad64_t;
typedef uint64_t upad64_t;
# 150 "/package/gcc/gcc-4.1.2_obj0/./gcc/include/sys/types.h" 3 4
typedef longlong_t offset_t;
typedef u_longlong_t u_offset_t;
typedef u_longlong_t len_t;
typedef longlong_t diskaddr_t;
# 171 "/package/gcc/gcc-4.1.2_obj0/./gcc/include/sys/types.h" 3 4
typedef union {
 offset_t _f;
 struct {
  long _u;
  off_t _l;
 } _p;
} lloff_t;
# 191 "/package/gcc/gcc-4.1.2_obj0/./gcc/include/sys/types.h" 3 4
typedef union {
 diskaddr_t _f;
 struct {
  long _u;
  daddr_t _l;
 } _p;
} lldaddr_t;


typedef ulong_t k_fltset_t;
# 209 "/package/gcc/gcc-4.1.2_obj0/./gcc/include/sys/types.h" 3 4
typedef long id_t;
# 218 "/package/gcc/gcc-4.1.2_obj0/./gcc/include/sys/types.h" 3 4
typedef uint_t useconds_t;




typedef ulong_t major_t;
typedef ulong_t minor_t;




typedef short pri_t;
# 242 "/package/gcc/gcc-4.1.2_obj0/./gcc/include/sys/types.h" 3 4
typedef ushort_t o_mode_t;
typedef short o_dev_t;
typedef ushort_t o_uid_t;
typedef o_uid_t o_gid_t;
typedef short o_nlink_t;
typedef short o_pid_t;
typedef ushort_t o_ino_t;





typedef int key_t;
typedef ulong_t mode_t;



typedef long uid_t;


typedef uid_t gid_t;
typedef ulong_t nlink_t;
typedef ulong_t dev_t;
typedef long pid_t;






typedef unsigned int pthread_t;
typedef unsigned int pthread_key_t;

typedef struct _pthread_mutex {
 struct {
  uint8_t __pthread_mutex_flag[4];
  uint32_t __pthread_mutex_type;
 } __pthread_mutex_flags;
 union {
  struct {
   uint8_t __pthread_mutex_pad[8];
  } __pthread_mutex_lock64;
  upad64_t __pthread_mutex_owner64;
 } __pthread_mutex_lock;
 upad64_t __pthread_mutex_data;
} pthread_mutex_t;

typedef struct _pthread_cond {
 struct {
  uint8_t __pthread_cond_flag[4];
  uint32_t __pthread_cond_type;
 } __pthread_cond_flags;
 upad64_t __pthread_cond_data;
} pthread_cond_t;




typedef struct _pthread_attr {
 void *__pthread_attrp;
} pthread_attr_t;





typedef struct _pthread_mutexattr {
 void *__pthread_mutexattrp;
} pthread_mutexattr_t;





typedef struct _pthread_condattr {
 void *__pthread_condattrp;
} pthread_condattr_t;




typedef struct _once {
 upad64_t __pthread_once_pad[4];
} pthread_once_t;
# 338 "/package/gcc/gcc-4.1.2_obj0/./gcc/include/sys/types.h" 3 4
typedef int ssize_t;





typedef long time_t;




typedef long clock_t;




typedef int clockid_t;




typedef int timer_t;





typedef unsigned char unchar;
typedef unsigned short ushort;
typedef unsigned int uint;
typedef unsigned long ulong;
# 412 "/package/gcc/gcc-4.1.2_obj0/./gcc/include/sys/types.h" 3 4
typedef long hostid_t;
# 421 "/package/gcc/gcc-4.1.2_obj0/./gcc/include/sys/types.h" 3 4
typedef unsigned char u_char;
typedef unsigned short u_short;
typedef unsigned int u_int;
typedef unsigned long u_long;
typedef struct _quad { long val[2]; } quad;





# 1 "/usr/include/sys/select.h" 1 3 4
# 11 "/usr/include/sys/select.h" 3 4
#pragma ident "@(#)select.h     1.11    96/06/20 SMI"




# 1 "/usr/include/sys/time.h" 1 3 4
# 22 "/usr/include/sys/time.h" 3 4
#pragma ident "@(#)time.h       2.52    96/11/15 SMI"
# 32 "/usr/include/sys/time.h" 3 4
extern "C" {
# 44 "/usr/include/sys/time.h" 3 4
struct timeval {
 time_t tv_sec;
 long tv_usec;
};






struct timezone {
 int tz_minuteswest;
 int tz_dsttime;
};





}







# 1 "/package/gcc/gcc-4.1.2_obj0/./gcc/include/sys/types.h" 1 3 4
# 72 "/usr/include/sys/time.h" 2 3 4



extern "C" {
# 126 "/usr/include/sys/time.h" 3 4
struct itimerval {
 struct timeval it_interval;
 struct timeval it_value;
};
# 179 "/usr/include/sys/time.h" 3 4
typedef struct timespec {
 time_t tv_sec;
 long tv_nsec;
} timespec_t;




typedef struct timespec timestruc_t;
# 221 "/usr/include/sys/time.h" 3 4
typedef struct itimerspec {
 struct timespec it_interval;
 struct timespec it_value;
} itimerspec_t;





typedef longlong_t hrtime_t;
# 323 "/usr/include/sys/time.h" 3 4
int adjtime(struct timeval *, struct timeval *);
# 332 "/usr/include/sys/time.h" 3 4
int getitimer(int, struct itimerval *);





int setitimer(int, struct itimerval *, struct itimerval *);
# 369 "/usr/include/sys/time.h" 3 4
int settimeofday(struct timeval *, void *);

hrtime_t gethrtime(void);
hrtime_t gethrvtime(void);
# 389 "/usr/include/sys/time.h" 3 4
int gettimeofday(struct timeval *, void *);
# 399 "/usr/include/sys/time.h" 3 4
# 1 "/package/gcc/gcc-4.1.2_obj0/./gcc/include/time.h" 1 3 4
# 27 "/package/gcc/gcc-4.1.2_obj0/./gcc/include/time.h" 3 4
#pragma ident "@(#)time.h       1.25    96/03/12 SMI"




extern "C" {
# 62 "/package/gcc/gcc-4.1.2_obj0/./gcc/include/time.h" 3 4
struct tm {
 int tm_sec;
 int tm_min;
 int tm_hour;
 int tm_mday;
 int tm_mon;
 int tm_year;
 int tm_wday;
 int tm_yday;
 int tm_isdst;
};



extern clock_t clock(void);
extern double difftime(time_t, time_t);
extern time_t mktime(struct tm *);
extern time_t time(time_t *);
extern char *asctime(const struct tm *);
extern char *ctime(const time_t *);
extern struct tm *gmtime(const time_t *);
extern struct tm *localtime(const time_t *);
extern size_t strftime(char *, size_t, const char *, const struct tm *);



extern struct tm *gmtime_r(const time_t *, struct tm *);
extern struct tm *localtime_r(const time_t *, struct tm *);





extern char *strptime(const char *, const char *, struct tm *);






# 1 "/usr/include/sys/time.h" 1 3 4
# 103 "/package/gcc/gcc-4.1.2_obj0/./gcc/include/time.h" 2 3 4
# 1 "/usr/include/sys/siginfo.h" 1 3 4
# 15 "/usr/include/sys/siginfo.h" 3 4
#pragma ident "@(#)siginfo.h    1.39    96/06/28 SMI"




extern "C" {





union sigval {
 int sival_int;
 void *sival_ptr;
};
# 43 "/usr/include/sys/siginfo.h" 3 4
struct sigevent {
 int sigev_notify;
 union {
  int _sigev_signo;
  void (*_sigev_notify_function)(union sigval);
 } _sigev_un;
 union sigval sigev_value;
 int _sigev_pad1;
 void *_sigev_notify_attributes;
 int _sigev_pad2;
};
# 88 "/usr/include/sys/siginfo.h" 3 4
# 1 "/usr/include/sys/machsig.h" 1 3 4
# 16 "/usr/include/sys/machsig.h" 3 4
#pragma ident "@(#)machsig.h    1.12    96/04/29 SMI"





extern "C" {
# 108 "/usr/include/sys/machsig.h" 3 4
}
# 89 "/usr/include/sys/siginfo.h" 2 3 4
# 184 "/usr/include/sys/siginfo.h" 3 4
typedef struct siginfo {



 int si_signo;
 int si_code;
 int si_errno;

 union {

  int __pad[((128 / sizeof (int)) - 3)];

  struct {
   pid_t __pid;
   union {
    struct {
     uid_t __uid;

     union sigval __value;



    } __kill;
    struct {
     clock_t __utime;
     int __status;
     clock_t __stime;
    } __cld;
   } __pdata;
  } __proc;

  struct {
   void *__addr;
   int __trapno;
   caddr_t __pc;
  } __fault;

  struct {

   int __fd;
   long __band;
  } __file;

  struct {
   caddr_t __faddr;
   timestruc_t __tstamp;
   short __syscall;
   char __nsysarg;
   char __fault;
   long __sysarg[8];
   long __mstate[17];
  } __prof;

 } __data;

} siginfo_t;
# 248 "/usr/include/sys/siginfo.h" 3 4
typedef struct k_siginfo {

 int si_signo;
 int si_code;
 int si_errno;

 union {
  struct {
   pid_t __pid;
   union {
    struct {
     uid_t __uid;
     union sigval __value;
    } __kill;
    struct {
     clock_t __utime;
     int __status;
     clock_t __stime;
    } __cld;
   } __pdata;
  } __proc;

  struct {
   void *__addr;
   int __trapno;
   caddr_t __pc;
  } __fault;

  struct {

   int __fd;
   long __band;
  } __file;

  struct {
   caddr_t __faddr;
   timestruc_t __tstamp;
   short __syscall;
   char __nsysarg;
   char __fault;



  } __prof;

 } __data;

} k_siginfo_t;

typedef struct sigqueue {
 struct sigqueue *sq_next;
 k_siginfo_t sq_info;
 void (*sq_func)(struct sigqueue *);
 void *sq_backptr;

} sigqueue_t;
# 333 "/usr/include/sys/siginfo.h" 3 4
}
# 104 "/package/gcc/gcc-4.1.2_obj0/./gcc/include/time.h" 2 3 4
extern int clock_getres(clockid_t, struct timespec *);
extern int clock_gettime(clockid_t, struct timespec *);
extern int clock_settime(clockid_t, const struct timespec *);

extern int timer_create(clockid_t, struct sigevent *, timer_t *);
extern int timer_delete(timer_t);
extern int timer_getoverrun(timer_t);
extern int timer_gettime(timer_t, struct itimerspec *);
extern int timer_settime(timer_t, int, const struct itimerspec *,
  struct itimerspec *);
extern int nanosleep(const struct timespec *, struct timespec *);





extern void tzset(void);

extern char *tzname[2];


extern long _sysconf(int);






extern long timezone;
extern int daylight;
# 146 "/package/gcc/gcc-4.1.2_obj0/./gcc/include/time.h" 3 4
extern struct tm *getdate(const char *);






extern int getdate_err;
# 258 "/package/gcc/gcc-4.1.2_obj0/./gcc/include/time.h" 3 4
extern char *asctime_r(const struct tm *, char *, int);
extern char *ctime_r(const time_t *, char *, int);
# 304 "/package/gcc/gcc-4.1.2_obj0/./gcc/include/time.h" 3 4
}
# 400 "/usr/include/sys/time.h" 2 3 4





# 1 "/usr/include/sys/select.h" 1 3 4
# 406 "/usr/include/sys/time.h" 2 3 4





}
# 17 "/usr/include/sys/select.h" 2 3 4



extern "C" {
# 34 "/usr/include/sys/select.h" 3 4
typedef long fd_mask;

typedef long fds_mask;
# 62 "/usr/include/sys/select.h" 3 4
typedef struct fd_set {



 long fds_bits[(((1024)+(((sizeof (fds_mask) * 8))-1))/((sizeof (fds_mask) *
8)))];
} fd_set;
# 86 "/usr/include/sys/select.h" 3 4
extern int select(int, fd_set *, fd_set *, fd_set *, struct timeval *);






}
# 432 "/package/gcc/gcc-4.1.2_obj0/./gcc/include/sys/types.h" 2 3 4
# 448 "/package/gcc/gcc-4.1.2_obj0/./gcc/include/sys/types.h" 3 4
}
# 21 "/usr/include/sys/wait.h" 2 3 4



# 1 "/usr/include/sys/resource.h" 1 3 4
# 15 "/usr/include/sys/resource.h" 3 4
#pragma ident "@(#)resource.h   1.21    96/06/03 SMI"






extern "C" {
# 55 "/usr/include/sys/resource.h" 3 4
typedef unsigned long rlim_t;
# 71 "/usr/include/sys/resource.h" 3 4
struct rlimit {
 rlim_t rlim_cur;
 rlim_t rlim_max;
};




typedef u_longlong_t rlim64_t;





struct rlimit64 {
 rlim64_t rlim_cur;
 rlim64_t rlim_max;
};
# 114 "/usr/include/sys/resource.h" 3 4
struct rusage {
 struct timeval ru_utime;
 struct timeval ru_stime;
 long ru_maxrss;
 long ru_ixrss;
 long ru_idrss;
 long ru_isrss;
 long ru_minflt;
 long ru_majflt;
 long ru_nswap;
 long ru_inblock;
 long ru_oublock;
 long ru_msgsnd;
 long ru_msgrcv;
 long ru_nsignals;
 long ru_nvcsw;
 long ru_nivcsw;
};
# 148 "/usr/include/sys/resource.h" 3 4
extern int setrlimit(int, const struct rlimit *);
extern int getrlimit(int, struct rlimit *);




extern int setrlimit64(int, const struct rlimit64 *);
extern int getrlimit64(int, struct rlimit64 *);


extern int getpriority(int, id_t);
extern int setpriority(int, id_t, int);
extern int getrusage(int, struct rusage *);
# 183 "/usr/include/sys/resource.h" 3 4
}
# 25 "/usr/include/sys/wait.h" 2 3 4

# 1 "/usr/include/sys/procset.h" 1 3 4
# 16 "/usr/include/sys/procset.h" 3 4
#pragma ident "@(#)procset.h    1.17    96/04/24 SMI"


extern "C" {
# 40 "/usr/include/sys/procset.h" 3 4
typedef enum

 idtype

  {
 P_PID,
 P_PPID,
 P_PGID,

 P_SID,
 P_CID,
 P_UID,
 P_GID,
 P_ALL,
 P_LWPID
} idtype_t;
# 64 "/usr/include/sys/procset.h" 3 4
typedef enum idop {
 POP_DIFF,


 POP_AND,


 POP_OR,


 POP_XOR


} idop_t;







typedef struct procset {
 idop_t p_op;




 idtype_t p_lidtype;


 id_t p_lid;

 idtype_t p_ridtype;


 id_t p_rid;
} procset_t;
# 143 "/usr/include/sys/procset.h" 3 4
}
# 27 "/usr/include/sys/wait.h" 2 3 4



extern "C" {
# 86 "/usr/include/sys/wait.h" 3 4
extern pid_t wait(int *);
extern pid_t waitpid(pid_t, int *, int);


extern int waitid(idtype_t, id_t, siginfo_t *, int);
extern pid_t wait3(int *, int, struct rusage *);
# 108 "/usr/include/sys/wait.h" 3 4
}
# 32 "/package/gcc/gcc-4.1.2_obj0/./gcc/include/stdlib.h" 2 3 4



extern "C" {


typedef struct {
 int quot;
 int rem;
} div_t;

typedef struct {
 long quot;
 long rem;
} ldiv_t;


typedef struct {
 long long quot;
 long long rem;
} lldiv_t;
# 105 "/package/gcc/gcc-4.1.2_obj0/./gcc/include/stdlib.h" 3 4
extern unsigned char __ctype[];



extern double atof(const char *);
extern int atoi(const char *);
extern long int atol(const char *);
extern double strtod(const char *, char **);
extern long int strtol(const char *, char **, int);
extern unsigned long int strtoul(const char *, char **, int);

extern int rand(void);
extern void srand(unsigned int);


extern int rand_r(unsigned int *);


extern void *calloc(size_t, size_t);
extern void free(void *);
extern void *malloc(size_t);
extern void *realloc(void *, size_t);

extern void abort(void);
extern int atexit(void (*)(void));
extern void exit(int);
extern void _exithandle(void);
extern char *getenv(const char *);
extern int system(const char *);

extern void *bsearch(const void *, const void *, size_t, size_t,
 int (*)(const void *, const void *));
extern void qsort(void *, size_t, size_t,
 int (*)(const void *, const void *));

extern int abs(int);
extern div_t div(int, int);
extern long int labs(long);
extern ldiv_t ldiv(long, long);

extern int mbtowc(wchar_t *, const char *, size_t);
extern int mblen(const char *, size_t);
extern int wctomb(char *, wchar_t);

extern size_t mbstowcs(wchar_t *, const char *, size_t);
extern size_t wcstombs(char *, const wchar_t *, size_t);




extern double drand48(void);
extern double erand48(unsigned short *);
extern long jrand48(unsigned short *);
extern void lcong48(unsigned short *);
extern long lrand48(void);
extern long mrand48(void);
extern long nrand48(unsigned short *);
extern unsigned short *seed48(unsigned short *);
extern void srand48(long);
extern int putenv(const char *);
extern void setkey(const char *);





extern void swab(const char *, char *, int);




extern int mkstemp(char *);


extern int mkstemp64(char *);






extern long a64l(const char *);
extern char *ecvt(double, int, int *, int *);
extern char *fcvt(double, int, int *, int *);
extern char *gcvt(double, int, char *);
extern int getsubopt(char **, char *const *, char **);
extern int grantpt(int);
extern char *initstate(unsigned, char *, size_t);
extern char *l64a(long);
extern char *mktemp(char *);
extern char *ptsname(int);
extern long random(void);
extern char *realpath(const char *, char *);
extern char *setstate(const char *);
extern void srandom(unsigned);
extern int ttyslot(void);
extern int unlockpt(int);
extern void *valloc(size_t);




extern int dup2(int, int);
extern char *qecvt(long double, int, int *, int *);
extern char *qfcvt(long double, int, int *, int *);
extern char *qgcvt(long double, int, char *);
extern char *getcwd(char *, size_t);
extern const char *getexecname(void);
extern char *getlogin(void);
extern int getopt(int, char *const *, const char *);
extern char *optarg;
extern int optind, opterr, optopt;
extern char *getpass(const char *);
extern char *getpassphrase(const char *);
extern int getpw(uid_t, char *);
extern int isatty(int);
extern void *memalign(size_t, size_t);
extern char *ttyname(int);


extern long long atoll(const char *);
extern long long llabs(long long);
extern lldiv_t lldiv(long long, long long);
extern char *lltostr(long long, char *);
extern long long strtoll(const char *, char **, int);
extern unsigned long long strtoull(const char *, char **, int);
extern char *ulltostr(unsigned long long, char *);
# 369 "/package/gcc/gcc-4.1.2_obj0/./gcc/include/stdlib.h" 3 4
}
# 72
"/package/gcc/gcc-4.1.2_obj0/sparc-sun-solaris2.6/libstdc++-v3/include/cstdlib"
2 3
# 103
"/package/gcc/gcc-4.1.2_obj0/sparc-sun-solaris2.6/libstdc++-v3/include/cstdlib"
3
namespace std
{
  using ::div_t;
  using ::ldiv_t;

  using ::abort;
  using ::abs;
  using ::atexit;
  using ::atof;
  using ::atoi;
  using ::atol;
  using ::bsearch;
  using ::calloc;
  using ::div;
  using ::exit;
  using ::free;
  using ::getenv;
  using ::labs;
  using ::ldiv;
  using ::malloc;





  using ::qsort;
  using ::rand;
  using ::realloc;
  using ::srand;
  using ::strtod;
  using ::strtol;
  using ::strtoul;
  using ::system;





  inline long
  abs(long __i) { return labs(__i); }

  inline ldiv_t
  div(long __i, long __j) { return ldiv(__i, __j); }
}
# 35 "/package/gcc/gcc-4.1.2/libstdc++-v3/libsupc++/del_op.cc" 2



using std::free;






 void
operator delete (void *ptr) throw ()
{
  if (ptr)
    free (ptr);
}


-- 
           Summary: bootstrap xgcc internal compiler error (using -O3)
           Product: gcc
           Version: 4.1.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: bootstrap
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: anirkko at insel dot ch
 GCC build triplet: sparc-sun-solaris2.6
  GCC host triplet: sparc-sun-solaris2.6
GCC target triplet: sparc-sun-solaris2.6


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


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug bootstrap/31523] bootstrap xgcc internal compiler error (using -O3)
  2007-04-10  9:18 [Bug bootstrap/31523] New: bootstrap xgcc internal compiler error (using -O3) anirkko at insel dot ch
@ 2007-04-13 21:46 ` anirkko at insel dot ch
  2007-04-13 21:48 ` pinskia at gcc dot gnu dot org
                   ` (14 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: anirkko at insel dot ch @ 2007-04-13 21:46 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from anirkko at insel dot ch  2007-04-13 22:46 -------
*** Bug 31565 has been marked as a duplicate of this bug. ***


-- 


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


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug bootstrap/31523] bootstrap xgcc internal compiler error (using -O3)
  2007-04-10  9:18 [Bug bootstrap/31523] New: bootstrap xgcc internal compiler error (using -O3) anirkko at insel dot ch
  2007-04-13 21:46 ` [Bug bootstrap/31523] " anirkko at insel dot ch
@ 2007-04-13 21:48 ` pinskia at gcc dot gnu dot org
  2007-04-16  6:00 ` ebotcazou at gcc dot gnu dot org
                   ` (13 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-04-13 21:48 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pinskia at gcc dot gnu dot org  2007-04-13 22:47 -------
Can you try without setting the CFLAGS, etc. because what might be happening is
the base compiler miscompiling the new compiler?


-- 


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


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug bootstrap/31523] bootstrap xgcc internal compiler error (using -O3)
  2007-04-10  9:18 [Bug bootstrap/31523] New: bootstrap xgcc internal compiler error (using -O3) anirkko at insel dot ch
  2007-04-13 21:46 ` [Bug bootstrap/31523] " anirkko at insel dot ch
  2007-04-13 21:48 ` pinskia at gcc dot gnu dot org
@ 2007-04-16  6:00 ` ebotcazou at gcc dot gnu dot org
  2007-04-16  8:15 ` anirkko at insel dot ch
                   ` (12 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2007-04-16  6:00 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from ebotcazou at gcc dot gnu dot org  2007-04-16 07:00 -------
Do really have a SuperSPARC?  If no, remove the -mcpu=supersparc option, it is
totally untested these days.  If so, I'd suggest to stick with a 3.x compiler
on this presumably old machine.


-- 

ebotcazou at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ebotcazou at gcc dot gnu dot
                   |                            |org
             Status|UNCONFIRMED                 |WAITING


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


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug bootstrap/31523] bootstrap xgcc internal compiler error (using -O3)
  2007-04-10  9:18 [Bug bootstrap/31523] New: bootstrap xgcc internal compiler error (using -O3) anirkko at insel dot ch
                   ` (2 preceding siblings ...)
  2007-04-16  6:00 ` ebotcazou at gcc dot gnu dot org
@ 2007-04-16  8:15 ` anirkko at insel dot ch
  2007-04-16  8:21 ` anirkko at insel dot ch
                   ` (11 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: anirkko at insel dot ch @ 2007-04-16  8:15 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from anirkko at insel dot ch  2007-04-16 09:15 -------
(In reply to comment #2)
> Can you try without setting the CFLAGS, etc. because what might be happening is
> the base compiler miscompiling the new compiler?
> 

Tried something slightly different: because this happened in C++, I
bootstrapped
gcc-4.1.2 with lang=C,ada and it worked fine, error-free, including passing the
stage2 comparison passed. The resulting gcc-4.1.2 should now be enough to use
as base compiler to build everything else, including c++.
When doing this (same flags and options), I got exactly the same internal
compiler error again. Thus, both the base compiler gcc-3.4.3 and gcc-4.1.2 lead
to the same error.
Will try next without -O3 and other flags to see if one of these generate the
error.


-- 

anirkko at insel dot ch changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |anirkko at insel dot ch


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


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug bootstrap/31523] bootstrap xgcc internal compiler error (using -O3)
  2007-04-10  9:18 [Bug bootstrap/31523] New: bootstrap xgcc internal compiler error (using -O3) anirkko at insel dot ch
                   ` (3 preceding siblings ...)
  2007-04-16  8:15 ` anirkko at insel dot ch
@ 2007-04-16  8:21 ` anirkko at insel dot ch
  2007-04-16  9:00 ` ebotcazou at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: anirkko at insel dot ch @ 2007-04-16  8:21 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from anirkko at insel dot ch  2007-04-16 09:21 -------
(In reply to comment #3)
> Do really have a SuperSPARC?  If no, remove the -mcpu=supersparc option, it is
> totally untested these days.  If so, I'd suggest to stick with a 3.x compiler
> on this presumably old machine.
> 

Several machines from SuperSPARC 110 MHz to multi-CPU UltraSPARC-III 1.3 GHz,
and even the SuperSPARCs still work better than the average PC. Some old SBUS
hardware only works with the old machines. I like to have the same gcc binary
running on all machines, which will also produce binaries that will run on all
machines from Solaris 2.6 to Solaris 10.


-- 


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


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug bootstrap/31523] bootstrap xgcc internal compiler error (using -O3)
  2007-04-10  9:18 [Bug bootstrap/31523] New: bootstrap xgcc internal compiler error (using -O3) anirkko at insel dot ch
                   ` (4 preceding siblings ...)
  2007-04-16  8:21 ` anirkko at insel dot ch
@ 2007-04-16  9:00 ` ebotcazou at gcc dot gnu dot org
  2007-04-18 13:24 ` anirkko at insel dot ch
                   ` (9 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2007-04-16  9:00 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from ebotcazou at gcc dot gnu dot org  2007-04-16 09:59 -------
> Will try next without -O3 and other flags to see if one of these generate the
> error.

Most likely I'd say.  I happen to regularly bootstrap GCC 4.1.x with GCC 3.4.3
and the default options on Solaris 2.5.1 and 2.6 UltraSPARC machines and this
works flawlessly:
  http://gcc.gnu.org/ml/gcc-testresults/2007-02/msg00700.html
  http://gcc.gnu.org/ml/gcc-testresults/2007-02/msg00578.html


-- 


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


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug bootstrap/31523] bootstrap xgcc internal compiler error (using -O3)
  2007-04-10  9:18 [Bug bootstrap/31523] New: bootstrap xgcc internal compiler error (using -O3) anirkko at insel dot ch
                   ` (5 preceding siblings ...)
  2007-04-16  9:00 ` ebotcazou at gcc dot gnu dot org
@ 2007-04-18 13:24 ` anirkko at insel dot ch
  2007-04-18 13:35 ` ebotcazou at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: anirkko at insel dot ch @ 2007-04-18 13:24 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from anirkko at insel dot ch  2007-04-18 14:24 -------
(In reply to comment #2)
> Can you try without setting the CFLAGS, etc. because what might be happening is
> the base compiler miscompiling the new compiler?
> 

The bootstrap works fine with all flags equal to '-O2'
Still worrysome, because somewhere in the installation instructions, it is
recommended to bootstrap the compiler with the flags one intends to later
use it with.
Sometime, will try to find out whether the offending flag is -O3 or
-mcpu=supersparc.
Does it mean the offending flag is broken and should never be used at all?


-- 


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


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug bootstrap/31523] bootstrap xgcc internal compiler error (using -O3)
  2007-04-10  9:18 [Bug bootstrap/31523] New: bootstrap xgcc internal compiler error (using -O3) anirkko at insel dot ch
                   ` (6 preceding siblings ...)
  2007-04-18 13:24 ` anirkko at insel dot ch
@ 2007-04-18 13:35 ` ebotcazou at gcc dot gnu dot org
  2007-04-23 10:35 ` anirkko at insel dot ch
                   ` (7 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2007-04-18 13:35 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from ebotcazou at gcc dot gnu dot org  2007-04-18 14:35 -------
> The bootstrap works fine with all flags equal to '-O2'

Great, thanks for the confirmation.

> Still worrysome, because somewhere in the installation instructions, it is
> recommended to bootstrap the compiler with the flags one intends to later
> use it with.

Please point me to this and I'll immediately propose to delete it.  99% of
the testing of the compiler is done with the default bootstrap settings.

> Does it mean the offending flag is broken and should never be used at all?

-mcpu=supersparc is totally untested these days so bugs can be expected, yes.


-- 

ebotcazou at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|                            |WONTFIX


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


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug bootstrap/31523] bootstrap xgcc internal compiler error (using -O3)
  2007-04-10  9:18 [Bug bootstrap/31523] New: bootstrap xgcc internal compiler error (using -O3) anirkko at insel dot ch
                   ` (7 preceding siblings ...)
  2007-04-18 13:35 ` ebotcazou at gcc dot gnu dot org
@ 2007-04-23 10:35 ` anirkko at insel dot ch
  2007-04-23 10:55 ` ebotcazou at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: anirkko at insel dot ch @ 2007-04-23 10:35 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from anirkko at insel dot ch  2007-04-23 11:35 -------
(In reply to comment #8)
> > The bootstrap works fine with all flags equal to '-O2'
> 
> Great, thanks for the confirmation.
> 
> > Still worrysome, because somewhere in the installation instructions, it is
> > recommended to bootstrap the compiler with the flags one intends to later
> > use it with.
> 
> Please point me to this and I'll immediately propose to delete it.  99% of
> the testing of the compiler is done with the default bootstrap settings.
> 
> > Does it mean the offending flag is broken and should never be used at all?
> 
> -mcpu=supersparc is totally untested these days so bugs can be expected, yes.
> 


> Please point me to this...

It is in the main directory, file FAQ, section "Optimizing the compiler
itself":
   If  you  want to test a particular optimization option, it's useful to
   try  bootstrapping  the  compiler  with  that  option  turned  on.
But please don't let this be removed, because

1) I find the suggestion  useful, and it seems to somewhat parallel the reason
why you want the compiler bootstrap itself through all stages in the first
place: to make sure it can compile itself. Likewise, if it can compile
itself reproducibly through the bootstrap using different options, you have
made sure these options are pretty well tested for real code by the time you
have the compiler finished

2) You closed this bug on the premises that -mcpu=supersparc is the culprit.
Well, it isn't: I now bootstrapped with '-O2 -mcpu=supersparc' and everything
went fine!
Therefore, I still think there is a bug in -O3. (alternatively, in the
combination of the two). Would you consider reopening this bug if it was -O3?
(In this case, I might re-run the bootstrap with only '-O3', next weekend).


-- 


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


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug bootstrap/31523] bootstrap xgcc internal compiler error (using -O3)
  2007-04-10  9:18 [Bug bootstrap/31523] New: bootstrap xgcc internal compiler error (using -O3) anirkko at insel dot ch
                   ` (8 preceding siblings ...)
  2007-04-23 10:35 ` anirkko at insel dot ch
@ 2007-04-23 10:55 ` ebotcazou at gcc dot gnu dot org
  2007-04-30  8:41 ` anirkko at insel dot ch
                   ` (5 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2007-04-23 10:55 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from ebotcazou at gcc dot gnu dot org  2007-04-23 11:55 -------
> It is in the main directory, file FAQ, section "Optimizing the compiler
> itself":
>    If  you  want to test a particular optimization option, it's useful to
>    try  bootstrapping  the  compiler  with  that  option  turned  on.

OK, but note that it's quite different from what you said.  First, it's not
"recommended", it's "useful to try".  Second, it's only for *testing* the
option, not for production use.

> 1) I find the suggestion  useful, and it seems to somewhat parallel the reason
> why you want the compiler bootstrap itself through all stages in the first
> place: to make sure it can compile itself. Likewise, if it can compile
> itself reproducibly through the bootstrap using different options, you have
> made sure these options are pretty well tested for real code by the time you
> have the compiler finished

OK, that makes sense.

> Therefore, I still think there is a bug in -O3. (alternatively, in the
> combination of the two). Would you consider reopening this bug if it was -O3?
> (In this case, I might re-run the bootstrap with only '-O3', next weekend).

Yes, I'm going to reopen it, but I'm not sure someone will tackle it.


-- 

ebotcazou at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
         Resolution|WONTFIX                     |


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


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug bootstrap/31523] bootstrap xgcc internal compiler error (using -O3)
  2007-04-10  9:18 [Bug bootstrap/31523] New: bootstrap xgcc internal compiler error (using -O3) anirkko at insel dot ch
                   ` (9 preceding siblings ...)
  2007-04-23 10:55 ` ebotcazou at gcc dot gnu dot org
@ 2007-04-30  8:41 ` anirkko at insel dot ch
  2007-05-07  9:29 ` anirkko at insel dot ch
                   ` (4 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: anirkko at insel dot ch @ 2007-04-30  8:41 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from anirkko at insel dot ch  2007-04-30 09:41 -------
(In reply to comment #10)

> > Therefore, I still think there is a bug in -O3. (alternatively, in the
> > combination of the two). Would you consider reopening this bug if it was -O3?
> > (In this case, I might re-run the bootstrap with only '-O3', next weekend).
> 
> Yes, I'm going to reopen it, but I'm not sure someone will tackle it.
> 

Testing several combinations, it turns out the bug is indeed in '-O3' alone:
   Machine: Ultrasparc
   Base compiler: gcc-4.1.2  (bootstrapped with -O2)
Using this setup, bootstrapping
   -works with '-O2'
   -works with '-O2 -mcpu=supersparc -no-app-regs'
   -FAILS with '-O3'
   -FAILS with '-O3 -mcpu=supersparc -no-app-regs'
    (exactly same ICE as reported in the first place, above)
Thus, it is reproduced several times, both with gcc-3.4.3 and gcc-4.1.2 itself
as base compiler.
Would it help to individually test the various sub-options that -O3
switches on? If you could give me these sub-options ranked according
to 'suspectedness' then I could run the script to test them one by one.
Reason: if the responsible sub-option is identified, it could be discarded from
the -O3 defaults for being tested and found unsafe, even if no one has time
to tackle/mend it.


-- 


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


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug bootstrap/31523] bootstrap xgcc internal compiler error (using -O3)
  2007-04-10  9:18 [Bug bootstrap/31523] New: bootstrap xgcc internal compiler error (using -O3) anirkko at insel dot ch
                   ` (10 preceding siblings ...)
  2007-04-30  8:41 ` anirkko at insel dot ch
@ 2007-05-07  9:29 ` anirkko at insel dot ch
  2007-05-07  9:34 ` anirkko at insel dot ch
                   ` (3 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: anirkko at insel dot ch @ 2007-05-07  9:29 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #12 from anirkko at insel dot ch  2007-05-07 10:29 -------
(In reply to comment #10)
...
> Yes, I'm going to reopen it, but I'm not sure someone will tackle it.
> 

The culprit is -finline-functions:

The gcc man page says -O3 adds only 3 additional options. My bootstrapping
script tells me the bug is in -finline-functions. Base compiler = gcc-4.1.2
(itself built without error using -O2), target compiler also gcc-4.1.2, when
using -finline-functions as bootflags, the bootstrapped xgcc fails with
an ICE at exactly the same place as originally reported above.

Should -finline-functions be excluded from the default -O3 options?
(until mended. If it can't be trusted building the comopiler, can it be
trusted for anything else?)

keywords added:
  build (problem occurs during bootstrap)
  wrong-code (compiles and links xgcc, but then xgcc fails later)
  ice-on-valid-code (the xgcc above fails with ICE during the build)


-- 

anirkko at insel dot ch changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |build, ice-on-valid-code,
                   |                            |wrong-code


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


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug bootstrap/31523] bootstrap xgcc internal compiler error (using -O3)
  2007-04-10  9:18 [Bug bootstrap/31523] New: bootstrap xgcc internal compiler error (using -O3) anirkko at insel dot ch
                   ` (11 preceding siblings ...)
  2007-05-07  9:29 ` anirkko at insel dot ch
@ 2007-05-07  9:34 ` anirkko at insel dot ch
  2007-05-07  9:58 ` [Bug bootstrap/31523] bootstrap failure with -O2 -finline-functions ebotcazou at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: anirkko at insel dot ch @ 2007-05-07  9:34 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #13 from anirkko at insel dot ch  2007-05-07 10:33 -------
(In addition to comment #12)

PS: The above was done on sparcv9 (UltraSparc-III)
    with Solaris 8. Thus, the bug is confirmed on
    several machines with several versions of Solaris
    and several versions of binutils (2.14 and 2.17)


-- 


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


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug bootstrap/31523] bootstrap failure with -O2 -finline-functions
  2007-04-10  9:18 [Bug bootstrap/31523] New: bootstrap xgcc internal compiler error (using -O3) anirkko at insel dot ch
                   ` (12 preceding siblings ...)
  2007-05-07  9:34 ` anirkko at insel dot ch
@ 2007-05-07  9:58 ` ebotcazou at gcc dot gnu dot org
  2007-05-10 11:16 ` [Bug rtl-optimization/31523] " ebotcazou at gcc dot gnu dot org
  2007-05-17 14:50 ` ebotcazou at gcc dot gnu dot org
  15 siblings, 0 replies; 17+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2007-05-07  9:58 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #14 from ebotcazou at gcc dot gnu dot org  2007-05-07 10:58 -------
> Should -finline-functions be excluded from the default -O3 options?
> (until mended. If it can't be trusted building the comopiler, can it be
> trusted for anything else?)

-finline-functions is very likely not the root problem, it must uncover some
latent bug elsewhere.  I'm going to try to reproduce the failure.


-- 

ebotcazou at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  GCC build triplet|sparc-sun-solaris2.6        |sparc-sun-solaris2.*
   GCC host triplet|sparc-sun-solaris2.6        |sparc-sun-solaris2.*
 GCC target triplet|sparc-sun-solaris2.6        |sparc-sun-solaris2.*
           Keywords|build, ice-on-valid-code    |
            Summary|bootstrap xgcc internal     |bootstrap failure with -O2 -
                   |compiler error (using -O3)  |finline-functions


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


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug rtl-optimization/31523] bootstrap failure with -O2 -finline-functions
  2007-04-10  9:18 [Bug bootstrap/31523] New: bootstrap xgcc internal compiler error (using -O3) anirkko at insel dot ch
                   ` (13 preceding siblings ...)
  2007-05-07  9:58 ` [Bug bootstrap/31523] bootstrap failure with -O2 -finline-functions ebotcazou at gcc dot gnu dot org
@ 2007-05-10 11:16 ` ebotcazou at gcc dot gnu dot org
  2007-05-17 14:50 ` ebotcazou at gcc dot gnu dot org
  15 siblings, 0 replies; 17+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2007-05-10 11:16 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #17 from ebotcazou at gcc dot gnu dot org  2007-05-10 12:16 -------
Reduced C++ testcase:

typedef enum { _B_FALSE, _B_TRUE } boolean_t;
typedef union { int i; } u;

cp/lex.c:make_aggr_type is miscompiled when cxx_make_type is inlined into it.

Amazingly enough, this is the same problem as PR rtl-optimization/31691.


*** This bug has been marked as a duplicate of 31691 ***


-- 

ebotcazou at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
          Component|bootstrap                   |rtl-optimization
         Resolution|                            |DUPLICATE


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


^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Bug rtl-optimization/31523] bootstrap failure with -O2 -finline-functions
  2007-04-10  9:18 [Bug bootstrap/31523] New: bootstrap xgcc internal compiler error (using -O3) anirkko at insel dot ch
                   ` (14 preceding siblings ...)
  2007-05-10 11:16 ` [Bug rtl-optimization/31523] " ebotcazou at gcc dot gnu dot org
@ 2007-05-17 14:50 ` ebotcazou at gcc dot gnu dot org
  15 siblings, 0 replies; 17+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2007-05-17 14:50 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #18 from ebotcazou at gcc dot gnu dot org  2007-05-17 15:50 -------
*** Bug 27901 has been marked as a duplicate of this bug. ***


-- 

ebotcazou at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |paulg at chiark dot greenend
                   |                            |dot org dot uk


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


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2007-05-17 14:50 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-04-10  9:18 [Bug bootstrap/31523] New: bootstrap xgcc internal compiler error (using -O3) anirkko at insel dot ch
2007-04-13 21:46 ` [Bug bootstrap/31523] " anirkko at insel dot ch
2007-04-13 21:48 ` pinskia at gcc dot gnu dot org
2007-04-16  6:00 ` ebotcazou at gcc dot gnu dot org
2007-04-16  8:15 ` anirkko at insel dot ch
2007-04-16  8:21 ` anirkko at insel dot ch
2007-04-16  9:00 ` ebotcazou at gcc dot gnu dot org
2007-04-18 13:24 ` anirkko at insel dot ch
2007-04-18 13:35 ` ebotcazou at gcc dot gnu dot org
2007-04-23 10:35 ` anirkko at insel dot ch
2007-04-23 10:55 ` ebotcazou at gcc dot gnu dot org
2007-04-30  8:41 ` anirkko at insel dot ch
2007-05-07  9:29 ` anirkko at insel dot ch
2007-05-07  9:34 ` anirkko at insel dot ch
2007-05-07  9:58 ` [Bug bootstrap/31523] bootstrap failure with -O2 -finline-functions ebotcazou at gcc dot gnu dot org
2007-05-10 11:16 ` [Bug rtl-optimization/31523] " ebotcazou at gcc dot gnu dot org
2007-05-17 14:50 ` ebotcazou at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).