Article View: gnu.gcc.bug
Article #1134Problems compiling gnu-diff1.15 using gcc2.2.2 on Sun
From: Local Administrator
Date: Sun, 13 Sep 1992 02:09
Date: Sun, 13 Sep 1992 02:09
49 lines
2089 bytes
2089 bytes
Hi! I've bumped into a (small) problem with gcc. When compiling the gnu-diff source using the -O options, everything is just fine. But if I try the -O2 option, it dumps core very early. This is the fist time I'm sending a bug-report for gcc, so have patience with my efforts to explain the problem!;-) PROBLEM ------- Compiling gnu-diff1.15 with -O2 option, using gcc version 2.2.2. Dumps core early in the program, before producing any output. The commands used to test is [in the source dir. of gnu-diff]: ./diff diff.c diff3.c -> core dump ./diff README COPYING -> No core dump!! When compiling using gcc with the -O option, both examples works ok. It also works ok when compiling with Suns cc, with -O2 or even -O4 option. I'm using no other options that the optimization option -O or -O2. I'm using a Sun SparcStation ELC, running SunOS 4.1.2, I've installed gcc according the the installation instructions, and it has worked good until now. [Actually I couldn't get PERL 4.0.35 to work using gcc, it also dumped core some times.] WHEN DOES IT HAPPENS? --------------------- Don't know, it works for some file, but not for others. WHERE IN THE SOURCE OF THE COMPILED PROGRAM? -------------------------------------------- In analyze.c, function diag, line 93, looking like this: bd[bmid] = xlim; I haven't tested this very much, but it has crashed at this point all the times I've tested it [using gdb4.6]. For some files, bmid is positive and for some it's negative, but it crashes in both cases. [I think the array is adjusted to allow negative indexing]. Hope any of this makes sense. Thanks, -- Leif
Technical Details
Message-ID:
<199209122209.AA04898@ifm.liu.se>Path:
arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!ifm.liu.se!localShow Full Headers
Complete Article Headers
Newsgroups: gnu.gcc.bug Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!ifm.liu.se!local From: local@ifm.liu.se (Local Administrator) Subject: Problems compiling gnu-diff1.15 using gcc2.2.2 on Sun Message-ID: <199209122209.AA04898@ifm.liu.se> Sender: gnulists@ai.mit.edu Organization: GNUs Not Usenet Distribution: gnu Date: Sun, 13 Sep 1992 02:09:58 GMT Approved: bug-gcc@prep.ai.mit.edu Lines: 50