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]
Other format: [Raw text]

Re: HEAD: m68k-linux bootstrap error due to warning


 > From: Matthias Klose <doko at cs dot tu-berlin dot de>
 > 
 > Hi Kaveh No Error Ghazi,
 > 
 > trying to build HEAD on m68k-linux. I do see this warning both in
 > stage2 and stage3. The make compare succeeds.
 > 
 > 	Matthias
 > 
 > stage1/xgcc -Bstage1/ -B/usr/lib/gcc-experimental/m68k-linux/bin/ -c
 >   -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes
 >   -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long
 >   -fno-common -DHAVE_CONFIG_H -I. -I. -I../../src/gcc
 >   -I../../src/gcc/. -I../../src/gcc/config -I../../src/gcc/../include
 >   ../../src/gcc/bb-reorder.c -o bb-reorder.o
 > ../../src/gcc/bb-reorder.c: In function `find_traces':
 > ../../src/gcc/bb-reorder.c:190: warning: `count_threshold' might be used uninitialized in this function


This looks like a bug in GCC.  The variable `count_threshold' is
clearly initialized and done so in a way that GCC should be able to
recognize.

Perhaps you should file a PR.  It doesn't occur for me on solaris2 or
irix6 so it may be specific to your target.

		--Kaveh


  /* Find the traces.  */
  for (i = 0; i < N_ROUNDS; i++)
    {
      gcov_type count_threshold;   <<<<<<<<<<------  line 190

      if (rtl_dump_file)
        fprintf (rtl_dump_file, "STC - round %d\n", i + 1);

      if (max_entry_count < INT_MAX / 1000)
        count_threshold = max_entry_count * exec_threshold[i] / 1000;
      else
        count_threshold = max_entry_count / 1000 * exec_threshold[i];

      find_traces_1_round (REG_BR_PROB_BASE * branch_threshold[i] / 1000,
                           max_entry_frequency * exec_threshold[i] / 1000,
                           count_threshold, traces, n_traces, i, &heap);
    }


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