Path: utzoo!dptcdc!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!pasteur!cory.Berkeley.EDU!talvola From: talvola@cory.Berkeley.EDU (Erik Talvola) Newsgroups: comp.lang.c Subject: Microsoft C v5.1 bug Message-ID: <12502@pasteur.Berkeley.EDU> Date: 16 Apr 89 21:25:12 GMT Sender: news@pasteur.Berkeley.EDU Reply-To: talvola@cory.Berkeley.EDU (Erik Talvola) Distribution: usa Organization: University of California, Berkeley Lines: 40 I noticed that someone else posted a Microsoft C bug, so I thought I'd post my favorite one. I haven't yet sent this to Microsoft, because all my registration stuff is at home (while I'm at school...), but maybe someone from Microsoft will see it (unlikely). The program: --------------------------------------------------------- main(int argc, char **argv) { unsigned char workbm[16][16]; unsigned char colors[16][16]; unsigned char pic[8][4][8][2]; int i,j,k; pic[i][(j>=8)*2][j % 8][0] += workbm[k][j]; pic[i][(j>=8)*2][j % 8][1] = colors[k][j]; } --------------------------------------------------------- Yes, it looks hideous, but look at the result of a compilation with Compact or Large model... C:\UC> cl -AC editbug.c Microsoft (R) C Optimizing Compiler Version 5.10 Copyright (c) Microsoft Corp 1984, 1985, 1986, 1987, 1988. All rights reserved. editbug.c editbug.c(8) : fatal error C1001: Internal Compiler Error (compiler file '@(#)code.c:1.46', line 393) Contact Microsoft Technical Support ---------------------------------------------------------- The problem does not exist under Quick C, only Microsoft C, and only appears when Compact or Large model is used. Has anyone else ever had Microsoft C give them an Internal Compiler Error? -- Erik Talvola | "It's just what we need... a colossal negative talvola@cory.berkeley.edu | space wedgie of great power coming right at us ..!ucbvax!cory!talvola | at warp speed." -- Star Drek