home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / gnu / g / bug / 2062 < prev    next >
Encoding:
Text File  |  1992-12-22  |  1.9 KB  |  70 lines

  1. Newsgroups: gnu.g++.bug
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!peanuts.informatik.uni-tuebingen.de!jw
  3. From: jw@peanuts.informatik.uni-tuebingen.de (Joerg Wedeck)
  4. Subject: bug in g++ 2.3.2 ?
  5. Message-ID: <9212211420.AA01357@life>
  6. Sender: gnulists@ai.mit.edu
  7. Organization: GNUs Not Usenet
  8. Distribution: gnu
  9. Date: Mon, 21 Dec 1992 16:20:05 GMT
  10. Approved: bug-g++@prep.ai.mit.edu
  11. Lines: 57
  12.  
  13. Hi,
  14.  
  15. i probably have found a bug in g++ 2.3.2. Please look at the
  16. following program (in the following named test.C):
  17.  
  18.  
  19. #include <stream.h>
  20.  
  21. extern "C" int rand();
  22.  
  23. class test {
  24.   int a, b;
  25. public:
  26.   test() {a=b=0;}
  27.   test(int i) {a=b=i;}
  28. };
  29.  
  30. main()
  31. {
  32.   test a,b;
  33.   int r;
  34.  
  35.   r = rand();
  36.   a = (test) r;        // this works fine
  37.   b = (test) rand();     // this line causes the problem
  38. }
  39.  
  40. Compilation of this program results in following error message:
  41.  
  42. snoopy% g++ -v test.C
  43. Reading specs from /usr/local/gnu/lib/gcc-lib/sun4os4/2.3.2/specs
  44. gcc version 2.3.2
  45.  /usr/local/gnu/lib/gcc-lib/sun4os4/2.3.2/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 test.C /usr/tmp/cca14760.i
  46. GNU CPP version 2.3.2 (sparc)
  47.  /usr/local/gnu/lib/gcc-lib/sun4os4/2.3.2/cc1plus /usr/tmp/cca14760.i -quiet -dumpbase test.cc -version -o /usr/tmp/cca14760.s
  48. GNU C++ version 2.3.2 (sparc) compiled by GNU C version 2.3.2.
  49. test.C: In function `int  main ()':
  50. test.C:19: Internal compiler error.
  51. test.C:19: Please report this to `bug-g++@prep.ai.mit.edu'.
  52. snoopy%
  53.  
  54.  
  55. Regards,
  56.  
  57.     Joerg
  58.  
  59. --
  60. --------------------------------+-------------------------------------
  61. Joerg Wedeck                    | E-Mail: jw@peanuts.informatik\
  62. Universitaet Tuebingen          |               .uni-tuebingen.de
  63. Lehrstuhl fuer Techn. Informatik|
  64. Sand 13                         |
  65. 7400 Tuebingen                  |
  66. Germany                         |
  67. --------------------------------+-------------------------------------
  68.  
  69.  
  70.