This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: report on a crash of linux-2.2.7.SuSE



  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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]