public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug optimization/12082] New: Inappropriate unreachable code warnings
@ 2003-08-27 20:39 augart at us dot ibm dot com
  2003-08-27 20:41 ` [Bug optimization/12082] " augart at us dot ibm dot com
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: augart at us dot ibm dot com @ 2003-08-27 20:39 UTC (permalink / raw)
  To: gcc-bugs

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/


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

* [Bug optimization/12082] Inappropriate unreachable code warnings
  2003-08-27 20:39 [Bug optimization/12082] New: Inappropriate unreachable code warnings augart at us dot ibm dot com
@ 2003-08-27 20:41 ` augart at us dot ibm dot com
  2003-08-27 20:42 ` augart at us dot ibm dot com
                   ` (13 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: augart at us dot ibm dot com @ 2003-08-27 20:41 UTC (permalink / raw)
  To: gcc-bugs

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



------- Additional Comments From augart at us dot ibm dot com  2003-08-27 20:41 -------
Created an attachment (id=4666)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=4666&action=view)
preprocessModifiedFiles.ii.bz2

This is the preprocessor output, compressed with "bzip2 -9"


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

* [Bug optimization/12082] Inappropriate unreachable code warnings
  2003-08-27 20:39 [Bug optimization/12082] New: Inappropriate unreachable code warnings augart at us dot ibm dot com
  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
                   ` (12 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: augart at us dot ibm dot com @ 2003-08-27 20:42 UTC (permalink / raw)
  To: gcc-bugs

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


augart at us dot ibm dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Attachment #4666|application/x-tar           |application/x-bzip2
          mime type|                            |


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

* [Bug optimization/12082] Inappropriate unreachable code warnings
  2003-08-27 20:39 [Bug optimization/12082] New: Inappropriate unreachable code warnings augart at us dot ibm dot com
  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
                   ` (11 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: bangerth at dealii dot org @ 2003-08-27 21:57 UTC (permalink / raw)
  To: gcc-bugs

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



------- Additional Comments From bangerth at dealii dot org  2003-08-27 21:57 -------
I can confirm this, the warnings are clearly bogus. Slightly changing the code makes 
the locations of the problem go away or move randomly. It takes someone with some 
more time than me right now to reduce this, though. 
 
One of the things that startle me is that it reports warnings in functions with the wrong 
name (i.e. it says the problem is in function "main", but the given line number is in 
another function). Maybe this has something to do with inlining then. 
 
W.


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

* [Bug optimization/12082] Inappropriate unreachable code warnings
  2003-08-27 20:39 [Bug optimization/12082] New: Inappropriate unreachable code warnings augart at us dot ibm dot com
                   ` (2 preceding siblings ...)
  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
                   ` (10 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: augart at us dot ibm dot com @ 2003-08-28 17:25 UTC (permalink / raw)
  To: gcc-bugs

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



------- Additional Comments From augart at us dot ibm dot com  2003-08-28 17:25 -------
I have found a smaller test case that shows the bug (down to 36 lines including
7 blank lines).  

I am attaching "bad1.i", a preprocessed C file that triggers the warning.

Here is the output from compiling bad1.i with gcc 3.3.1:
bilbo:~/JikesRVM/gccbug > cc --save-temps -v -Wunreachable-code -O3 -o bad1.S -S
bad1.i
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/cc1 -fpreprocessed bad1.i -quiet
-dumpbase bad1.i -auxbase-strip bad1.S -O3 -Wunreachable-code -version -o bad1.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
bad1.c: In function `main':
bad1.c:13: warning: will never be executed
bilbo:~/JikesRVM/gccbug > 

The bug does not appear when I compile the very similar source file good1.c:

bilbo:~/JikesRVM/gccbug > cc --save-temps -v -Wunreachable-code -O3 -o good1.S
-S good1.i
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/cc1 -fpreprocessed good1.i
-quiet -dumpbase good1.i -auxbase-strip good1.S -O3 -Wunreachable-code -version
-o good1.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
bilbo:~/JikesRVM/gccbug > 

Nor does it appear when I compile good2.i, which is bad1.i without the for loop:

bilbo:~/JikesRVM/gccbug > cc --save-temps -v -Wunreachable-code -O3 -o good2.S
-S good2.i
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/cc1 -fpreprocessed good2.i
-quiet -dumpbase good2.i -auxbase-strip good2.S -O3 -Wunreachable-code -version
-o good2.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
bilbo:~/JikesRVM/gccbug >


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

* [Bug optimization/12082] Inappropriate unreachable code warnings
  2003-08-27 20:39 [Bug optimization/12082] New: Inappropriate unreachable code warnings augart at us dot ibm dot com
                   ` (3 preceding siblings ...)
  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
                   ` (9 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: augart at us dot ibm dot com @ 2003-08-28 17:27 UTC (permalink / raw)
  To: gcc-bugs

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



------- Additional Comments From augart at us dot ibm dot com  2003-08-28 17:27 -------
Created an attachment (id=4673)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=4673&action=view)
bad1.i: preprocessed C that triggers the problem.

 preprocessed C that triggers the problem.

Here is the output from compiling bad1.i with gcc 3.3.1:
bilbo:~/JikesRVM/gccbug > cc --save-temps -v -Wunreachable-code -O3 -o bad1.S
-S bad1.i
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/cc1 -fpreprocessed bad1.i
-quiet -dumpbase bad1.i -auxbase-strip bad1.S -O3 -Wunreachable-code -version
-o bad1.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
bad1.c: In function `main':
bad1.c:13: warning: will never be executed
bilbo:~/JikesRVM/gccbug >


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

* [Bug optimization/12082] Inappropriate unreachable code warnings
  2003-08-27 20:39 [Bug optimization/12082] New: Inappropriate unreachable code warnings augart at us dot ibm dot com
                   ` (4 preceding siblings ...)
  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
                   ` (8 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: augart at us dot ibm dot com @ 2003-08-28 17:28 UTC (permalink / raw)
  To: gcc-bugs

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



------- Additional Comments From augart at us dot ibm dot com  2003-08-28 17:28 -------
Created an attachment (id=4674)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=4674&action=view)
good1.i, one-line change that makes the problem go away

good1.i, one-line change that makes the problem go away


bilbo:~/JikesRVM/gccbug > cc --save-temps -v -Wunreachable-code -O3 -o good1.S
-S good1.i
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/cc1 -fpreprocessed good1.i
-quiet -dumpbase good1.i -auxbase-strip good1.S -O3 -Wunreachable-code -version
-o good1.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
bilbo:~/JikesRVM/gccbug >


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

* [Bug optimization/12082] Inappropriate unreachable code warnings
  2003-08-27 20:39 [Bug optimization/12082] New: Inappropriate unreachable code warnings augart at us dot ibm dot com
                   ` (5 preceding siblings ...)
  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
                   ` (7 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: augart at us dot ibm dot com @ 2003-08-28 17:29 UTC (permalink / raw)
  To: gcc-bugs

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



------- Additional Comments From augart at us dot ibm dot com  2003-08-28 17:29 -------
Created an attachment (id=4675)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=4675&action=view)
good2.i, preprocessed C source that doesn't show the problem.

The bug doesn't appear when I compile good2.i, which is bad1.i without the for
loop:

bilbo:~/JikesRVM/gccbug > cc --save-temps -v -Wunreachable-code -O3 -o good2.S
-S good2.i
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/cc1 -fpreprocessed good2.i
-quiet -dumpbase good2.i -auxbase-strip good2.S -O3 -Wunreachable-code -version
-o good2.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
bilbo:~/JikesRVM/gccbug > 
bilbo:~/JikesRVM/gccbug >


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

* [Bug optimization/12082] Inappropriate unreachable code warnings
  2003-08-27 20:39 [Bug optimization/12082] New: Inappropriate unreachable code warnings augart at us dot ibm dot com
                   ` (6 preceding siblings ...)
  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
                   ` (6 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: bangerth at dealii dot org @ 2003-08-28 17:52 UTC (permalink / raw)
  To: gcc-bugs

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


bangerth at dealii dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2003-08-28 17:52:27
               date|                            |


------- Additional Comments From bangerth at dealii dot org  2003-08-28 17:52 -------
bad1.c is a nice example, but you didn't go all the way :-) Here's something even smaller: 
------------------------------------------- 
int g(); 
void f (int i) { 
  for (; g();) 
    if (g()) { 
      ++i; 
      break; 
    } 
} 
------------------------------------ 
tmp/g> ~/bin/gcc-3.3/bin/gcc -Wunreachable-code -O3 -c x.c 
x.c: In function `f': 
x.c:5: warning: will never be executed 
 
That's clearly bogus. The same happens with present mainline, with an additional 
twist: there's an empty line sneaking into the message: 
tmp/g> ../build-gcc/gcc-install/bin/gcc -Wunreachable-code -O3 -c x.c 
x.c: In function `f': 
 
x.c:5: warning: will never be executed 
 
Thanks fro reducing your testcase! 
W.


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

* [Bug optimization/12082] [3.3/3.4 regression] Inappropriate unreachable code warnings
  2003-08-27 20:39 [Bug optimization/12082] New: Inappropriate unreachable code warnings augart at us dot ibm dot com
                   ` (7 preceding siblings ...)
  2003-08-28 17:52 ` bangerth at dealii dot org
@ 2003-08-28 17:53 ` bangerth at dealii dot org
  2003-08-28 20:45 ` augart at us dot ibm dot com
                   ` (5 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: bangerth at dealii dot org @ 2003-08-28 17:53 UTC (permalink / raw)
  To: gcc-bugs

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


bangerth at dealii dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P2                          |P1
            Summary|Inappropriate unreachable   |[3.3/3.4 regression]
                   |code warnings               |Inappropriate unreachable
                   |                            |code warnings
   Target Milestone|---                         |3.3.2


------- Additional Comments From bangerth at dealii dot org  2003-08-28 17:53 -------
Forgot to say this -- it's a regression in 3.3 and mailine w.r.t. 3.2. 
 
W.


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

* [Bug optimization/12082] [3.3/3.4 regression] Inappropriate unreachable code warnings
  2003-08-27 20:39 [Bug optimization/12082] New: Inappropriate unreachable code warnings augart at us dot ibm dot com
                   ` (8 preceding siblings ...)
  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
                   ` (4 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: augart at us dot ibm dot com @ 2003-08-28 20:45 UTC (permalink / raw)
  To: gcc-bugs

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



------- Additional Comments From augart at us dot ibm dot com  2003-08-28 20:45 -------
Wolfgang Bangerth's test case in Comment #7 is superior to any of the attached
ones that I wrote.  (I added comment #9 unaware that Wolfgang had added #7 and #8).


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

* [Bug optimization/12082] [3.3/3.4 regression] Inappropriate unreachable code warnings
  2003-08-27 20:39 [Bug optimization/12082] New: Inappropriate unreachable code warnings augart at us dot ibm dot com
                   ` (9 preceding siblings ...)
  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
                   ` (3 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: janis187 at us dot ibm dot com @ 2003-08-29  0:09 UTC (permalink / raw)
  To: gcc-bugs

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


janis187 at us dot ibm dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jh at suse dot cz


------- Additional Comments From janis187 at us dot ibm dot com  2003-08-29 00:09 -------
The regression in PR 12082 was introduced or exposed by this patch:

--- gcc/gcc/ChangeLog ---

Don Feb 28 11:07:36 CET 2002  Jan Hubicka  <jh@suse.cz>

        * basic-block.h (BB_REACHABLE): Renumber.
        (BB_DIRTY, BB_NEW): New flags.
        (clear_bb_flags): Declare.
        (update_life_info_in_dirty_blocks): Declare.
        * cfg.c (clear_bb_flags): New function.
        * cfgrtl.c (create_basic_block_structure): Set flags to BB_NEW.
        * emit-rtl.c (add_insn_after, add_insn_before, remove_insn,
        reorder_insns, emit_insn_after): Mark block as dirty.
        * flow.c (update_life_info): Fix clearing of PROP_LOG_LINKS.
        (update_life_info_in_dirty_blocks): New function.
        * recog.c (apply_change_group): Dirtify block.

        * cse.c (cse_insn): Reorder emitting of jump insn to keep
        cfg consistent.
        * gcse.c (delete_null_pointer_checks): Likewise.

        * toplev.c (dump_file_index): Move cse2 after bp,
        add DFI_null
        (dump_file_info): Similary.
        (rest_of_compilation): Avoid most of CFG rebuilds;
        do first if converision after null pointer checks, do cse2
        after branch prediction; avoid full liveness rebuild after
        initializing subregs.
        * invoke.texi (-d options): Document -du, renumber.

        * cfgcleanup.c (bb_flags): Remove BB_UPDATE_LIFE.
        (notice_new_block): Do not set BB_UPDATE_LIFE.
        (try_forward_edges, merge_blocks_move_predecessor_nojumps,
         merge_blocks_move_successor_nojumps, merge_blocks,
         try_crossjump_to_edge): Likewise.
        (try_optimize_cfg): Likewise; use update_life_info_in_dirty_blocks.
        * cfgrtl.c (merge_blocks_nomove): Copy b's flags to a.
        * ifcvt.c (SET_UPDATE_LIFE, UPDATE_LIFE): Kill.
        (merge_of_block): Do not use life_data_ok.
        (find_if_case_1): Do not use SET_UPDATE_LIFE.
        (if_convert): Use BB_DIRTY mechanizm to update life.
        * lcm.c (optimize_mode_switching): Update
        update_life_info_in_dirty_blocks

The regression hunt took place on i686-pc-linux-gnu using Wolfgang's
small test case from comment #7 compiled with "-O3 -Wunreachable-code".


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

* [Bug optimization/12082] [3.3/3.4 regression] Inappropriate unreachable code warnings
  2003-08-27 20:39 [Bug optimization/12082] New: Inappropriate unreachable code warnings augart at us dot ibm dot com
                   ` (10 preceding siblings ...)
  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
                   ` (2 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2003-09-05  5:32 UTC (permalink / raw)
  To: gcc-bugs

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


mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |jh at suse dot cz
                   |dot org                     |
             Status|NEW                         |ASSIGNED


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

* [Bug optimization/12082] [3.3/3.4 regression] Inappropriate unreachable code warnings
  2003-08-27 20:39 [Bug optimization/12082] New: Inappropriate unreachable code warnings augart at us dot ibm dot com
                   ` (11 preceding siblings ...)
  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
  14 siblings, 0 replies; 16+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2003-09-06 21:26 UTC (permalink / raw)
  To: gcc-bugs

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



------- Additional Comments From cvs-commit at gcc dot gnu dot org  2003-09-06 21:26 -------
Subject: Bug 12082

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_3-branch
Changes by:	hubicka@gcc.gnu.org	2003-09-06 21:26:52

Modified files:
	gcc            : ChangeLog calls.c cfgcleanup.c 

Log message:
	PR target/12070
	* calls.c (emit_library_call_value_1): Fix saving of BLKmode arguments.
	
	PR opt/12082
	* cfgcleanup.c (try_simplify_condjump): Avoid unreachable code warning.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.16114.2.724&r2=1.16114.2.725
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/calls.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.244.2.10&r2=1.244.2.11
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cfgcleanup.c.diff?cvsroot=gcc&only_with_tag=gcc-3_3-branch&r1=1.68.2.5&r2=1.68.2.6


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

* [Bug optimization/12082] [3.3/3.4 regression] Inappropriate unreachable code warnings
  2003-08-27 20:39 [Bug optimization/12082] New: Inappropriate unreachable code warnings augart at us dot ibm dot com
                   ` (12 preceding siblings ...)
  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
  14 siblings, 0 replies; 16+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2003-09-06 21:50 UTC (permalink / raw)
  To: gcc-bugs

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



------- Additional Comments From cvs-commit at gcc dot gnu dot org  2003-09-06 21:50 -------
Subject: Bug 12082

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	hubicka@gcc.gnu.org	2003-09-06 21:50:22

Modified files:
	gcc            : ChangeLog calls.c cfgcleanup.c 

Log message:
	PR target/12070
	* calls.c (emit_library_call_value_1): Fix saving of BLKmode arguments.
	
	PR opt/12082
	* cfgcleanup.c (try_simplify_condjump): Avoid unreachable code warning.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.988&r2=2.989
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/calls.c.diff?cvsroot=gcc&r1=1.297&r2=1.298
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cfgcleanup.c.diff?cvsroot=gcc&r1=1.91&r2=1.92


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

* [Bug optimization/12082] [3.3/3.4 regression] Inappropriate unreachable code warnings
  2003-08-27 20:39 [Bug optimization/12082] New: Inappropriate unreachable code warnings augart at us dot ibm dot com
                   ` (13 preceding siblings ...)
  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
  14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-09-07  3:21 UTC (permalink / raw)
  To: gcc-bugs

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


pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


------- Additional Comments From pinskia at gcc dot gnu dot org  2003-09-07 03:21 -------
Fixed by the patch above for 3.3.2 and 3.4.


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

end of thread, other threads:[~2003-09-07  3:21 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-27 20:39 [Bug optimization/12082] New: Inappropriate unreachable code warnings augart at us dot ibm dot com
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

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).