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]

internal compiler error when turning on optimization (1/3)


To: egcs-bugs@cygnus.com
Subject: internal compiler error when turning on optimization
Gcc: nnml:sent-mail
Mime-Version: 1.0 (generated by tm-edit 7.108)
Content-Type: multipart/mixed;
 boundary="Multipart_Mon_Mar__9_00:48:38_1998-1"
Content-Transfer-Encoding: 7bit

--Multipart_Mon_Mar__9_00:48:38_1998-1
Content-Type: text/plain; charset=US-ASCII


The attached piece of preprocessed code causes an internal compiler
error when the optimization is turned on.  Compiling without
optimization is fine.

-- Marat

(distribution RedHat 5.0)

dogwood:~/proj/test>cat /proc/version 
Linux version 2.0.32 (root@porky.redhat.com) (gcc version 2.7.2.3) #1 Wed Nov 19 00:46:45 EST 1997

dogwood:~/proj/test>uname -a
Linux dogwood.CS.Berkeley.EDU 2.0.32 #1 Wed Nov 19 00:46:45 EST 1997 i686 unknown

dogwood:~/proj/test>g++ -v -O -c egcs-bug.i -o foo.o
Reading specs from /home/local/lib/gcc-lib/i686-pc-linux-gnu/egcs-2.90.23/specs
gcc version egcs-2.90.23 980102 (egcs-1.0.1 release)
 /home/local/lib/gcc-lib/i686-pc-linux-gnu/egcs-2.90.23/cc1plus egcs-bug.i -quiet -O -version -o /tmp/cca17911.s
GNU C++ version egcs-2.90.23 980102 (egcs-1.0.1 release) (i686-pc-linux-gnu) compiled by GNU C version egcs-2.90.23 980102 (egcs-1.0.1 release).
EditReport.cc: In method `void EditReport::add_edit(enum EditReport::Type, void *, int)':
EditReport.cc:56: Internal compiler error.
EditReport.cc:56: Please submit a full bug report to `egcs-bugs@cygnus.com'.



--Multipart_Mon_Mar__9_00:48:38_1998-1
Content-Type: application/octet-stream
Content-Disposition: attachment; filename="egcs-bug.i"
Content-Transfer-Encoding: 7bit

# 1 "EditReport.cc"
 
 
 
 
 
 
 
 


#pragma implementation


# 1 "EditReport.h" 1
 
 
 
 
 
 
 
 
 
 
 



#pragma interface



class ostream;

 
class EditReport {
  public:
    EditReport();
    EditReport(const EditReport *);
    ~EditReport();

     
    enum Type {
	Insert,				 
	Delete,				 
	Change,				 
    };
    struct Edit {
	Type type;			 
	void *element;			 
					 
	int pos;			 
    };

     
    int length() const { return l; }
    const Edit *edit(int i) const { return &ed[i]; }

     
    void add_edit(Type type, void *element, int pos);

     
    void clear() { l = 0; }

     
    EditReport *verify();
    void print();

  private:
    int l;
    int size;
    Edit *ed;

    void realloc();
};

 
 
 
 
EditReport *min_edit_distance(int fromlen, void **from,
			      int tolen, void **to,
			      bool permit_change=false);

 
ostream &operator<<(ostream &, const EditReport &);


# 14 "EditReport.cc" 2

# 1 "/home/local/include/g++/stream.h" 1 3
 


























 
 
 


# 1 "/home/local/include/g++/iostream.h" 1 3
 

























#pragma interface



# 1 "/home/local/include/g++/streambuf.h" 1 3
 


























#pragma interface


   



extern "C" {
# 1 "/usr/include/libio.h" 1 3
 























 



# 1 "/usr/include/features.h" 1 3
 





















 















































 













 





 



 







 
# 117 "/usr/include/features.h" 3


 









 



















































 








 












 

# 1 "/usr/include/sys/cdefs.h" 1 3
 




















# 1 "/usr/include/features.h" 1 3
 

















# 222 "/usr/include/features.h" 3

# 22 "/usr/include/sys/cdefs.h" 2 3


 







# 54 "/usr/include/sys/cdefs.h" 3


 







 



# 86 "/usr/include/sys/cdefs.h" 3



 








 







# 205 "/usr/include/features.h" 2 3



 

 








# 1 "/usr/include/gnu/stubs.h" 1 3
 





























# 219 "/usr/include/features.h" 2 3




# 29 "/usr/include/libio.h" 2 3


# 1 "/usr/include/_G_config.h" 1 3
 





 

# 1 "/usr/include/gnu/types.h" 1 3
 






















 
typedef unsigned char __u_char;
typedef unsigned short __u_short;
typedef unsigned int __u_int;
typedef unsigned long __u_long;

typedef unsigned long long int __u_quad_t;
typedef long long int __quad_t;
# 41 "/usr/include/gnu/types.h" 3

typedef __quad_t *__qaddr_t;

typedef __u_quad_t __dev_t;		 
typedef __u_int __uid_t;		 
typedef __u_int __gid_t;		 
typedef __u_long __ino_t;		 
typedef __u_int __mode_t;		 
typedef __u_int __nlink_t; 		 
typedef long int __off_t;		 
typedef __quad_t __loff_t;		 
typedef int __pid_t;			 
typedef int __ssize_t;			 

typedef struct
  {
    int __val[2];
  } __fsid_t;				 

 
typedef int __daddr_t;			 
typedef char *__caddr_t;
typedef long int __time_t;
typedef long int __swblk_t;		 

typedef long int __clock_t;

 
typedef unsigned long int __fd_mask;

 


 




 
typedef struct
  {
     
    __fd_mask fds_bits[1024  / (8 * sizeof (__fd_mask)) ];
  } __fd_set;


typedef int __key_t;


# 9 "/usr/include/_G_config.h" 2 3



# 1 "/home/local/lib/gcc-lib/i686-pc-linux-gnu/egcs-2.90.23/include/stddef.h" 1 3






 


# 19 "/home/local/lib/gcc-lib/i686-pc-linux-gnu/egcs-2.90.23/include/stddef.h" 3



 


 





 


# 61 "/home/local/lib/gcc-lib/i686-pc-linux-gnu/egcs-2.90.23/include/stddef.h" 3


 





 


















 





 

 

# 131 "/home/local/lib/gcc-lib/i686-pc-linux-gnu/egcs-2.90.23/include/stddef.h" 3


 

 
































typedef unsigned int size_t;


















 




 

# 258 "/home/local/lib/gcc-lib/i686-pc-linux-gnu/egcs-2.90.23/include/stddef.h" 3









typedef unsigned int  wint_t;




 

# 302 "/home/local/lib/gcc-lib/i686-pc-linux-gnu/egcs-2.90.23/include/stddef.h" 3




 





















# 12 "/usr/include/_G_config.h" 2 3

















typedef int _G_int16_t __attribute__ ((__mode__ (__HI__)));
typedef int _G_int32_t __attribute__ ((__mode__ (__SI__)));
typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__)));
typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__)));




 










 




 














# 31 "/usr/include/libio.h" 2 3














 

# 1 "/home/local/lib/gcc-lib/i686-pc-linux-gnu/egcs-2.90.23/include/stdarg.h" 1 3
 



























































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