Re: gcc -O2 on alpha miscompiles ifupdown?
Please check with a gcc-2.95.3 prerelease compiled by Chris
(http://master.debian.org/~doko/alpha) or with the test release
currently in incoming.
Current gcc snapshots (2.97) can be found in experimental (currently in
incoming).
Jim Crilly writes:
> > Anthony Towns (aj@azure.humbug.org.au) wrote:
> >
> > > Like the subject says; if I build ifupdown (0.6.4-1) on alpha with -O2
> > > it breaks, if I build it with -O0, it's fine. With -O2, trying to trace
> > > what's going on with gdb doesn't seem to work (it jumps all over the
> > > place, fairly meaninglessly).
> > >
> > > In theory, ifupdown should just be a fairly normal ANSI C program. Most
> > > of the data structures aren't too complicated, and at worse there are
> > > a few function pointers. I think everything's fully typed, and there
> > > shouldn't be any weird casting. There was some buggy realloc's in the
> > > past (reallocing 4 bytes, instead of 4*sizeof(obj) bytes, mainly),
> > > but I believe they're all gone.
> >
> > I haven't looked at this (yet?), but I would guess it to be more bugs
> > in gcc 2.95 we are using. If you look at the gcc 2.96 changelog you'll
> > see there are quite a few bug fixes, a lot of them on Alpha. We've
> > been plauged with bad gcc optimization on Alpha for about as long as I
> > can remember.
> >
> > If no one knows for sure, I may have time in the next couple of days
> > to play with it and see. Chris Chimelis (chris@debian.org) is the one
> > to talk to about gcc bugs on Alpha. I would say either don't use -O2
> > (duh) or use a different gcc (probably not gonna happen anytime soon).
> >
> > Ron
>
> Just wanted to note I see a similar problem compiling the DAC960 driver in
> the 2.4 (2.2.X one works fine) kernel, with -O2 gcc segfaults, with -O0 it
> works.
>
> Sorry for not giving more information but my Alpha's at work right now and
> I'm not, I can send more on Monday if anyone want.
Reply to: