home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / sys / sgi / bugs / 96 < prev    next >
Encoding:
Text File  |  1993-01-09  |  1.4 KB  |  50 lines

  1. Newsgroups: comp.sys.sgi.bugs
  2. Path: sparky!uunet!cs.utexas.edu!wupost!spool.mu.edu!agate!usenet.ins.cwru.edu!magnus.acs.ohio-state.edu!cis.ohio-state.edu!pacific.mps.ohio-state.edu!linac!uchinews!math.uchicago.edu!almgren
  3. From: almgren@math.uchicago.edu (Robert Almgren)
  4. Subject: C++ and -mips2
  5. Message-ID: <1993Jan9.153935.9091@midway.uchicago.edu>
  6. Keywords: C++, mips2
  7. Sender: news@uchinews.uchicago.edu (News System)
  8. Reply-To: almgren@math.uchicago.edu
  9. Organization: The University of Chicago, Department of Mathematics
  10. Date: Sat, 9 Jan 1993 15:39:35 GMT
  11. Lines: 37
  12.  
  13.  
  14. The program below compiles and runs properly with
  15.  
  16.     CC -o prog prog.C
  17.  
  18. but dumps core, apparently on the assignment, when compiled with
  19.  
  20.     CC -mips2 -o prog prog.C
  21.  
  22. It does the same with the -v2 flag.
  23.  
  24. Am I overlooking something obvious, or is something wrong with the
  25. compiler?  (System is Crimson R4000; compilers are 3.10 release).
  26.  
  27.                     Robert Almgren
  28.  
  29.                     University of Chicago
  30.                     almgren@math.uchicago.edu
  31.  
  32. =====================================================================
  33.             File "prog.C"
  34.  
  35. #include <stdlib.h>
  36. #include <stdio.h>
  37.  
  38. main()
  39. {
  40.     printf("Beginning of program; allocating d\n");
  41.  
  42.     double *d = new double[3];
  43.     printf("d has been allocated; setting d[0]\n");
  44.  
  45.     d[0] = 1.;
  46.     printf("d[0] has been set; quitting\n");
  47. }
  48.  
  49. =====================================================================
  50.