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

optimization/8913: internal compiler error: in simplify_gen_subreg, at simplify-rtx.c


>Number:         8913
>Category:       optimization
>Synopsis:       internal compiler error: in simplify_gen_subreg, at simplify-rtx.c
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          ice-on-legal-code
>Submitter-Id:   net
>Arrival-Date:   Thu Dec 12 05:56:02 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Rasmus Hahn
>Release:        gcc version 3.3 from cvs 20021206 to 20021212
>Organization:
>Environment:
i686-pc-linux-gnu
gcc-3.3 compiled with one week old gcc-3.3
>Description:
This is an error in the c++ compiler when compiling with optimization turned on.
Internal compiler error when using template class as constructor arg. Program: see ho-to-repeat.
If no destructor is given or no optimization is used program compiles.
This bug is not in my version of gcc-3.1 so it arrived somewhere since then.
$ gcc -v
Reading specs from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-threads --enable-languages=c,c++,objective-c : (reconfigured) ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-threads --enable-languages=c,c++,objc
Thread model: posix
gcc version 3.3 20021206 (experimental)

$ g++ -c -O compiler-3.3-20021206-failure.cc 
compiler-3.3-20021206-failure.cc: In function `void test()':
compiler-3.3-20021206-failure.cc:10: internal compiler error: in 
   simplify_gen_subreg, at simplify-rtx.c:2673
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.

>How-To-Repeat:
template <class CLS> struct Ref { 
  Ref(const CLS *obj){ }
  ~Ref(); /* presence of destructor decl causes ICE with -O */
};

struct Object { };

struct User : public Object {
  User (Ref<Object> obj) { }
};
 
void test() {
  User a (0);
}
>Fix:

>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]