This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: report on a crash of linux-2.2.7.SuSE
- To: Andries dot Brouwer at cwi dot nl
- Subject: Re: report on a crash of linux-2.2.7.SuSE
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Sat, 10 Jul 1999 21:05:44 -0600
- cc: egcs-bugs at egcs dot cygnus dot com, garloff at suse dot de, linux-gcc at vger dot rutgers dot edu, linux-kernel at vger dot rutgers dot edu
- Reply-To: law at cygnus dot com
In message <UTC199907102242.AAA17825.aeb@papegaai.cwi.nl>you write:
> # cc -Wall -O2 -c foo.c
> foo.c: In function `foo':
> foo.c:18: warning: `mbo' might be used uninitialized in this function
> #
>
> Strange.. - mbo is used after an assignment to it.
> How can it be uninitialized?
> And the strange part is, this is a minimal example:
> every simplification of this example makes the complaint go away.
> (Changing fn to be void (*fn)(void); or deleting the
> `else printk("fn NULL?\n");' part, or deleting the `return;',
> or changing the panic into a printk.
> Also deleting the -O2 flag makes the complaint go away.)
This happens because the code to detect this case is really dumb and gets
confused by global code motion algorithms such as the one we use for global
cse.
jeff