Re: gcc bug tickled by non-SMP linux-2.1.37-pre2

Jarno Paananen (
Fri, 02 May 1997 08:03:40 +0300

Horst von Brand <> wrote:

> I recently reported that .../arch/i386/kernel/init_task.c crashes
> gcc- Further investigation uncovered a subtle bug tickled by
> the union init_task_union initialization, due to the fact that spinlock_t is
> defined as an empty struct in .../include/asm-i386/spinlock.h, and is
> initialized as such here. I just reported the bug to the gcc folks, see
> below and enjoy (or weep, as the case may be). I hate to put something into
> spinlock_t just to get away with this (gcc does optimize empty structs
> away). Any other thoughts?

I also experienced this with gcc and narrowed it down to that union
too. For some time I used Pentium Compiler Group's pgcc to compile my kernels,
and experienced strange, consistent, signal 11's and such occasionally (what
would you expect from beta snapshot). Using gcc to compile those
offending files always helped. Nowadays I use mostly gcc with libc6
and also compile kernels with it. Anyway, this time I thought, maybe pgcc
would help this time and took the latest snapshot (970425 or something) and
voila... the whole pre-2.1.37-2 plus some fixes for uniprocessor machines
compiled perfectly (although with more warnings as pgcc warns about
comparisons between signed and unsigned variables). Running it happily for
third day or so with nothing alarming yet.