Thread View: gnu.gcc.bug
1 messages
1 total messages
Started by Local Administrator
Sun, 13 Sep 1992 02:09
Problems compiling gnu-diff1.15 using gcc2.2.2 on Sun
Author: 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
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads