public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "augart at us dot ibm dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug optimization/12082] New: Inappropriate unreachable code warnings
Date: Wed, 27 Aug 2003 20:39:00 -0000	[thread overview]
Message-ID: <20030827203936.12082.augart@us.ibm.com> (raw)

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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

           Summary: Inappropriate unreachable code warnings
           Product: gcc
           Version: 3.3.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: augart at us dot ibm dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu

Options given when GCC was configured/built:
  I configured gcc 3.3.1 with no options; just invoked it as ./configure.

Command line that triggers the bug:
  g++ -v --save-temps -Wunreachable-code  -O3 preprocessModifiedFiles.C -o
preprocessModifiedFiles

Compiler output:

g++ -v --save-temps -Wunreachable-code  -O3 preprocessModifiedFiles.C -o
preprocessModifiedFiles
Reading specs from /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.3.1/specs
Configured with: ./configure --cache-file=config.cache
Thread model: posix
gcc version 3.3.1
 /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.3.1/cc1plus -E -D__GNUG__=3 -quiet
-v -D__GNUC__=3 -D__GNUC_MINOR__=3 -D__GNUC_PATCHLEVEL__=1 -D_GNU_SOURCE
preprocessModifiedFiles.C -Wunreachable-code -O3 preprocessModifiedFiles.ii
ignoring nonexistent directory "NONE/include"
ignoring nonexistent directory "/usr/local/i686-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include/c++/3.3.1
 /usr/local/include/c++/3.3.1/i686-pc-linux-gnu
 /usr/local/include/c++/3.3.1/backward
 /usr/local/include
 /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.3.1/include
 /usr/include
End of search list.
 /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.3.1/cc1plus -fpreprocessed
preprocessModifiedFiles.ii -quiet -dumpbase preprocessModifiedFiles.C -auxbase
preprocessModifiedFiles -O3 -Wunreachable-code -version -o preprocessModifiedFiles.s
GNU C++ version 3.3.1 (i686-pc-linux-gnu)
	compiled by GNU C version 3.3.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
preprocessModifiedFiles.C: In function `int main(int, char**)':
preprocessModifiedFiles.C:1147: warning: will never be executed
preprocessModifiedFiles.C:1147: warning: will never be executed
preprocessModifiedFiles.C:1147: warning: will never be executed
preprocessModifiedFiles.C: In function `int preprocess(const char*, const 
   char*)':
preprocessModifiedFiles.C:773: warning: will never be executed
preprocessModifiedFiles.C:753: warning: will never be executed
preprocessModifiedFiles.C:732: warning: will never be executed
preprocessModifiedFiles.C:747: warning: will never be executed
preprocessModifiedFiles.C:631: warning: will never be executed
preprocessModifiedFiles.C:631: warning: will never be executed
preprocessModifiedFiles.C:629: warning: will never be executed
 /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.3.1/../../../../i686-pc-linux-gnu/bin/as -V -Qy -o preprocessModifiedFiles.o preprocessModifiedFiles.s
GNU assembler version 2.14 (i686-pc-linux-gnu) using BFD version 2.14 20030612
 /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.3.1/collect2 --eh-frame-hdr -m
elf_i386 -dynamic-linker /lib/ld-linux.so.2 -o preprocessModifiedFiles
/usr/lib/crt1.o /usr/lib/crti.o
/usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.3.1/crtbegin.o
-L/usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.3.1
-L/usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.3.1/../../../../i686-pc-linux-gnu/lib
-L/usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.3.1/../../..
preprocessModifiedFiles.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc
/usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.3.1/crtend.o /usr/lib/crtn.o


I will attach the compressed preprocessed file preprocessModifiedFiles.ii after
I've submitted this report to Bugzilla; don't see how to do so upon bug creation.

Why I think this is a bug:
I believe the "will never be executed" warnings are incorrect.

Additional details:
I am running on an IBM Netvista type 6792-MHU computer, under a Red 
Hat 7.3 GNU/Linux distribution.  Linux kernel 2.40.20, 1536MB of RAM,
1GB of swap space.  Pentium 4 (1.80 GHz processor).  Please let me
know if I can provide you with additional information.

I compiled GCC myself from the 3.3.1 tarball, using gcc 2.96.  The
build and install completed normally.  Before I compiled gcc, I
compiled and installed binutils 2.14:

  Bash$ gcc --version
  gcc (GCC) 3.3.1
  [...]
  Bash$ as --version
  GNU assembler 2.14 20030612
  [...]

I have tried to trim down the program text I'm appending, but the
really short versions don't show the warning.  

Sincerely Yours,

--Steven Augart
  Jikes RVM Open Source Java Compiler Project
  http://www.ibm.com/developerworks/oss/jikesrvm/


             reply	other threads:[~2003-08-27 20:39 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-27 20:39 augart at us dot ibm dot com [this message]
2003-08-27 20:41 ` [Bug optimization/12082] " augart at us dot ibm dot com
2003-08-27 20:42 ` augart at us dot ibm dot com
2003-08-27 21:57 ` bangerth at dealii dot org
2003-08-28 17:25 ` augart at us dot ibm dot com
2003-08-28 17:27 ` augart at us dot ibm dot com
2003-08-28 17:28 ` augart at us dot ibm dot com
2003-08-28 17:29 ` augart at us dot ibm dot com
2003-08-28 17:52 ` bangerth at dealii dot org
2003-08-28 17:53 ` [Bug optimization/12082] [3.3/3.4 regression] " bangerth at dealii dot org
2003-08-28 20:45 ` augart at us dot ibm dot com
2003-08-29  0:09 ` janis187 at us dot ibm dot com
2003-09-05  5:32 ` mmitchel at gcc dot gnu dot org
2003-09-06 21:26 ` cvs-commit at gcc dot gnu dot org
2003-09-06 21:50 ` cvs-commit at gcc dot gnu dot org
2003-09-07  3:21 ` pinskia at gcc dot gnu dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030827203936.12082.augart@us.ibm.com \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).