home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.sgi.bugs
- 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
- From: almgren@math.uchicago.edu (Robert Almgren)
- Subject: C++ and -mips2
- Message-ID: <1993Jan9.153935.9091@midway.uchicago.edu>
- Keywords: C++, mips2
- Sender: news@uchinews.uchicago.edu (News System)
- Reply-To: almgren@math.uchicago.edu
- Organization: The University of Chicago, Department of Mathematics
- Date: Sat, 9 Jan 1993 15:39:35 GMT
- Lines: 37
-
-
- The program below compiles and runs properly with
-
- CC -o prog prog.C
-
- but dumps core, apparently on the assignment, when compiled with
-
- CC -mips2 -o prog prog.C
-
- It does the same with the -v2 flag.
-
- Am I overlooking something obvious, or is something wrong with the
- compiler? (System is Crimson R4000; compilers are 3.10 release).
-
- Robert Almgren
-
- University of Chicago
- almgren@math.uchicago.edu
-
- =====================================================================
- File "prog.C"
-
- #include <stdlib.h>
- #include <stdio.h>
-
- main()
- {
- printf("Beginning of program; allocating d\n");
-
- double *d = new double[3];
- printf("d has been allocated; setting d[0]\n");
-
- d[0] = 1.;
- printf("d[0] has been set; quitting\n");
- }
-
- =====================================================================
-