home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: gnu.g++.bug
- Path: sparky!uunet!cs.utexas.edu!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!bbn.com!jpalmucc
- From: jpalmucc@bbn.com
- Subject: GCC 2.3.3 compiler crash
- Message-ID: <9301042100.AA00154@life.ai.mit.edu>
- Sender: gnulists@ai.mit.edu
- Organization: GNUs Not Usenet
- Distribution: gnu
- Date: Mon, 4 Jan 1993 10:49:21 GMT
- Approved: bug-g++@prep.ai.mit.edu
- Lines: 47
-
- The *incorrect* code below crashes the compiler.
-
- CODE:
-
- template <class T>
- class Foo
- {
- public:
- Foo( int (*nfn)(T &, T &) );
- };
-
- int test(int a,int b)
- {
- return a == b;
- }
-
- int main()
- {
- Foo<int> foo(test);
- }
-
-
-
- COMPILER OUTPUT:
-
- cd /nfs/kariba/u1/jpalmucci/lbug/
- g++ -v -c gcc1.cc
- ld.so: warning: /usr/lib/libc.so.1.6 has older revision than expected 7
- Reading specs from /usr/local/gnu/lib/gcc-lib/sparc-sun-sunos4.1/2.3.3/specs
- gcc version 2.3.3
- /usr/local/gnu/lib/gcc-lib/sparc-sun-sunos4.1/2.3.3/cpp -lang-c++ -v -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -Dsparc -Dsun -Dunix -D__sparc__ -D__sun__ -D__unix__ -D__sparc -D__sun -D__unix gcc1.cc /usr/tmp/cca11135.i
- ld.so: warning: /usr/lib/libc.so.1.6 has older revision than expected 7
- GNU CPP version 2.3.3 (sparc)
- /usr/local/gnu/lib/gcc-lib/sparc-sun-sunos4.1/2.3.3/cc1plus /usr/tmp/cca11135.i -quiet -dumpbase gcc1.cc -version -o /usr/tmp/cca11135.s
- ld.so: warning: /usr/lib/libc.so.1.6 has older revision than expected 7
- GNU C++ version 2.3.3 (sparc) compiled by GNU C version 2.3.3.
- gcc1.cc: In function `int main ()':
- gcc1.cc:16: Internal compiler error.
- gcc1.cc:16: Please report this to `bug-g++@prep.ai.mit.edu'.
-
- Compilation exited abnormally with code 1 at Mon Jan 4 15:44:28
-
- Have fun.
-
- Jeff Palmucci
- BBN
-
-