Newsgroups: comp.unix.ultrix Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!caen!umich!sharkey!bnlux1.bnl.gov!mms From: mms@bnlux1.bnl.gov (Morris Strongson) Subject: DEC RISC cc chokes on large auto array Message-ID: <1991May6.193136.9722@bnlux1.bnl.gov> Sender: mms@bnlux1.bnl.gov (Morris Strongson) Organization: Brookhaven National Laboratory, Upton, NY 11973 Date: Mon, 6 May 1991 19:31:36 GMT The following complicated C program gives a "Segmentation fault (core dumped)" message when compiled and run under the cc compiler that comes with Ultrix 4.1 on our DECsystem 5000 (RISC). The value for UIDMAX I really wanted was 65536, but all values starting with 64971 cause it to crash (64970 works). The original was much bigger, but this boils the problem down to its essential parts. Moving the array above main works as well. -------------------------begin included prograsm----------- #define UIDMAX 64971 main() { long x[UIDMAX][2]; /* 0 for total, 1 for file count */ printf("entering disksort\n"); } -------------------------end included prograsm----------- This seems to be a rather basic (poor choice of word) program, and I find it rather distressing that something this simple would fail. Is there a later version of the compiler available? Thanks. Morris Strongson INTERNET: mms@bnlux1.bnl.gov BITNET: mms@bnlux0.BITNET -- Morris Strongson INTERNET: mms@bnlux0.bnl.gov BITNET: mms@bnlux0.BITNET UUCP: ...philabs!sbcs!bnlux0!mms or bnlux0!mms@uunet.uu.net