delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/06/02/01:24:20

Date: Thu, 2 Jun 94 00:50:18 -0400
From: pjones AT acs DOT bu DOT edu (Peter Jones)
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: help: compiler crashing

Hello,

I am using djgpp version 1.11.maint5, with gcc 2.5.7 on my Ambra Pentium 60Mhz,
16MB RAM.  I have been running all this quite often for the past couple of
months, and everything had always worked beautifully, until a couple of nights
ago, when one of the modules in a C++ program I am working on started causing
the compiler to crash with a segmentation violation.  This only happens with
that one particular .cc source file.  Whether or not it happens seems dependent
on the state of the source file;  i.e., if I don't change the source file, the
behavior of the compiler is consistent (with the same compile options).  My
makefile is set to compile all the modules with the -O4 option because speed is
a prime concern.  Most of the time, if I manually compile it with -O1, it will
succeed, although sometimes it will only work with no optimizations at all, and
sometimes it never works.  For a while it seemed like if I went into Windows to
compile, it would succeed with -O4, but then once it reported a segmentation
violation that way and got stuck in an infinite loop when unravelling the call
stack.  If there are any errors or warnings, they seem to get reported before
the crash.  What puzzles me the most is that the changes in the source that 
result in successful or unsuccessful compiles are very small, seemingly very
arbitrary, and spread throughout the file.  The module is three functions 
mostly concerned with integer and floating point math, with a couple of calls
to other modules.  What I am wondering is, has anything like this been reported
or experienced before and the problem discovered?  Is it likely a problem in
gcc or go32 (I would guess gcc)?  If this has been known to happen, would an
upgrade to gcc 2.5.8 solve it?  If so, how can I get that, and can I get it in
a ready to intall form (like I got gcc257bn.zip and gpp257.zip, so I don't have
to build it)?  Thank you very much for any advice,

Peter Jones

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019