home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / gnu / g / bug / 2124 < prev    next >
Encoding:
Text File  |  1993-01-05  |  1.6 KB  |  60 lines

  1. Newsgroups: gnu.g++.bug
  2. Path: sparky!uunet!cs.utexas.edu!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!bbn.com!jpalmucc
  3. From: jpalmucc@bbn.com
  4. Subject: GCC 2.3.3 compiler crash
  5. Message-ID: <9301042100.AA00154@life.ai.mit.edu>
  6. Sender: gnulists@ai.mit.edu
  7. Organization: GNUs Not Usenet
  8. Distribution: gnu
  9. Date: Mon, 4 Jan 1993 10:49:21 GMT
  10. Approved: bug-g++@prep.ai.mit.edu
  11. Lines: 47
  12.  
  13. The *incorrect* code below crashes the compiler.
  14.  
  15. CODE:
  16.  
  17. template <class T>
  18. class Foo
  19. {
  20.   public:
  21.      Foo( int (*nfn)(T &, T &) );
  22. };
  23.  
  24. int test(int a,int b)
  25. {
  26.      return a == b;
  27. }
  28.  
  29. int main()
  30. {
  31.      Foo<int> foo(test);
  32. }
  33.  
  34.  
  35.  
  36. COMPILER OUTPUT:
  37.  
  38. cd /nfs/kariba/u1/jpalmucci/lbug/
  39. g++ -v -c gcc1.cc
  40. ld.so: warning: /usr/lib/libc.so.1.6 has older revision than expected 7
  41. Reading specs from /usr/local/gnu/lib/gcc-lib/sparc-sun-sunos4.1/2.3.3/specs
  42. gcc version 2.3.3
  43.  /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
  44. ld.so: warning: /usr/lib/libc.so.1.6 has older revision than expected 7
  45. GNU CPP version 2.3.3 (sparc)
  46.  /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
  47. ld.so: warning: /usr/lib/libc.so.1.6 has older revision than expected 7
  48. GNU C++ version 2.3.3 (sparc) compiled by GNU C version 2.3.3.
  49. gcc1.cc: In function `int  main ()':
  50. gcc1.cc:16: Internal compiler error.
  51. gcc1.cc:16: Please report this to `bug-g++@prep.ai.mit.edu'.
  52.  
  53. Compilation exited abnormally with code 1 at Mon Jan  4 15:44:28
  54.  
  55. Have fun.
  56.  
  57. Jeff Palmucci
  58. BBN
  59.  
  60.