[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: egcs on alpha



On Wed, 9 Dec 1998, Lonnie Sauter wrote:

> I am having trouble with the latest version of egcs for alpha (actually
> it is the same on i386).  The version on my alpha is  2.91.58-5.  I am
> doing some simple dynamic allocation for matrices.  I have some c
> routines using malloc which I changed to c++ new double[] commands
> thinking I did something wrong.
> 
> It turns out that if I use an older gcc (2.7.x) it works fine.  I have
> two questions for you.  Is it 'easy' to have two gcc's (egcs) on one
> system?  I tried to compile 2.7.2 from debian sources to no avail.  I
> think I can get the compile working, but hence my question.

Yes, you can SOMEWHAT, but we don't have a version of gcc 2.7.2 that'll
work anymore.  The old one that we used to have was so heavily patched
that no one person can find all of the patches anymore.  The only one that
*MIGHT* be able to is Richard Henderson (rth@cygnus.com) since he wrote
the patches, but even that's doubtful since he has been working on egcs
pretty hard.  Also, the older gcc on Alpha was REALLY buggy and
practically unusable.

> One last question I have is do you think the latest release will help?
> BTW I am not allocating huge matricies.  They are around 15x15 with
> double precision.

It might, but that's doubtful.  One thing that the Alpha egcs has a
problem with, though, is optimisation.  If you're compiling your programme
with -O2, try -O0 and see if that helps.  Also, enable -mieee just in
case.  If you're segfaulting, then it may be an underflow that's causing
it rather than the compiler (solved by -mieee and related options).  Also,
you may want to go back and recheck your coding.  gcc wasn't as strict as
egcs is about proper coding (use -Wall and a few of the other -W
switches...some of which aren't covered by -Wall, believe it or not).  It
may compile it, but it may be failing logically somewhere.  I would also
suggest using gdb to figure out what's going on internally with the
binary.  It might just be a pointer problem or such.

Lastly, if all else fails, it may be a good idea to send the code to the
egcs team to try to debug the problem.  If it's happening on both i386 and
alpha, though, it can only be the code or the core compiler components
themselves.  If you want, send me the code and I'll see what I can figure
out when I get a chance.

C


Reply to: