public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/49401] New: Warning regression for 'uninitialized' variable on non-existant code path (in mep-pragma.c)
@ 2011-06-14  8:59 amylaar at gcc dot gnu.org
  2013-02-28 10:01 ` [Bug other/49401] " amylaar at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: amylaar at gcc dot gnu.org @ 2011-06-14  8:59 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49401

           Summary: Warning regression for 'uninitialized' variable on
                    non-existant code path (in mep-pragma.c)
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Keywords: build, diagnostic
          Severity: normal
          Priority: P3
         Component: other
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: amylaar@gcc.gnu.org
            Blocks: 44756
              Host: x86_64-unknown-linux-gnu


Created attachment 24517
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24517
Preprocessed source file

GCC 4.7.0 20110613 (experimental) (revision 174993) warns about a construct
in mep-pragma.c which was fine with 4.7.0 20110412.  An if clause tests
if a variable is within a particular range, and then has a switch that
initialized another variable for each possible value of the first variable
in the tested-for range.  GCC 4.7.0 20110613 now says that the second variable
might be uninitialized.

amylaar@gcc20:~/pr46489/jun13/multi2/mep-elf/gcc$
/home/amylaar/inst/20110412/libexec/gcc/x86_64-unknown-linux-gnu/4.7.0/cc1
-fpreprocessed mep-pragma.i -quiet -dumpbase mep-pragma.c -mtune=generic
-march=x86-64 -auxbase mep-pragma -g -O2 -Wextra -Wall -Wwrite-strings
-Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute
-pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror
-Wold-style-definition -Wc++-compat -version -fno-common -o mep-pragma.s
GNU C (GCC) version 4.7.0 20110412 (experimental) (x86_64-unknown-linux-gnu)
        compiled by GNU C version 4.7.0 20110412 (experimental), GMP version
4.3.2, MPFR version 3.0.0-p3, MPC version 0.8.2
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
GNU C (GCC) version 4.7.0 20110412 (experimental) (x86_64-unknown-linux-gnu)
        compiled by GNU C version 4.7.0 20110412 (experimental), GMP version
4.3.2, MPFR version 3.0.0-p3, MPC version 0.8.2
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: 41657c4e14ab8d46a76879065321da34
amylaar@gcc20:~/pr46489/jun13/multi2/mep-elf/gcc$ echo $?
0



amylaar@gcc20:~/pr46489/jun13/multi2/mep-elf/gcc$
/home/amylaar/inst/20110613/libexec/gcc/x86_64-unknown-linux-gnu/4.7.0/cc1
-fpreprocessed mep-pragma.i -quiet -dumpbase mep-pragma.c -mtune=generic
-march=x86-64 -auxbase mep-pragma -g -O2 -Wextra -Wall -Wwrite-strings
-Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute
-pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror
-Wold-style-definition -Wc++-compat -version -fno-common -o mep-pragma.s
GNU C (GCC) version 4.7.0 20110613 (experimental) (x86_64-unknown-linux-gnu)
        compiled by GNU C version 4.7.0 20110613 (experimental), GMP version
4.3.2, MPFR version 3.0.0-p3, MPC version 0.8.2
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
GNU C (GCC) version 4.7.0 20110613 (experimental) (x86_64-unknown-linux-gnu)
        compiled by GNU C version 4.7.0 20110613 (experimental), GMP version
4.3.2, MPFR version 3.0.0-p3, MPC version 0.8.2
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: 843a960cd48831f97b6a22dedb2d6c40
../../../gcc/gcc/config/mep/mep-pragma.c: In function ‘mep_pragma_coprocessor’:
../../../gcc/gcc/config/mep/mep-pragma.c:298:54: error: ‘rclass’ may be used
uninitialized in this function [-Werror=maybe-uninitialized]
../../../gcc/gcc/config/mep/mep-pragma.c:271:18: note: ‘rclass’ was declared
here
cc1: all warnings being treated as errors


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug other/49401] Warning regression for 'uninitialized' variable on non-existant code path (in mep-pragma.c)
  2011-06-14  8:59 [Bug other/49401] New: Warning regression for 'uninitialized' variable on non-existant code path (in mep-pragma.c) amylaar at gcc dot gnu.org
@ 2013-02-28 10:01 ` amylaar at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: amylaar at gcc dot gnu.org @ 2013-02-28 10:01 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49401

--- Comment #1 from Jorn Wolfgang Rennecke <amylaar at gcc dot gnu.org> 2013-02-28 10:01:16 UTC ---
mep-elf builds OK now.
However, this is also a diagnostics issue, that has to be checked with
the preprocessed source from the attachment.
gcc (GCC) 4.8.0 20130225 on i686-pc-linux-gnu says now:
../../../gcc/gcc/tree.h:3225:11: error: identifier ‘thread_local’ conflicts
with C++ keyword [-Werror=c++-compat]
so I suppose that's OK.
However, the bug was reported for host x86_64-unknown-linux-gnu, so we need to
test with a recent compiler bootstrapped on that host to verify.
Our optimizers often behave differently with differently sized HOST_WIDE_INT.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-02-28 10:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-14  8:59 [Bug other/49401] New: Warning regression for 'uninitialized' variable on non-existant code path (in mep-pragma.c) amylaar at gcc dot gnu.org
2013-02-28 10:01 ` [Bug other/49401] " amylaar at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).