Description of Problem: When compiling the test program with -O2 -Wunreachable-code, the compiler says: thisfile.c: In function `run_timer': thisfile.c:35: warning: will never be executed Which is not correct. gcc-3.0 seems to be ok. I hope the optimizer isn't using the same information that the warning is because the test program prints: run_timer: testing run_timer: compiler lied so the return must be executed (or the code must be rearranged so that another return is executed). Version-Release number of selected component (if applicable): gcc-2.96-85 version 2.96 20000731 (Red Hat Linux 7.1 2.96-85) How Reproducible: Works everytime for me with the test program that I will attach to the bug report. Steps to Reproduce: 1. gcc -O2 -Wunreachable-code thisfile.c 2. ./a.out Actual Results: thisfile.c: In function `run_timer': thisfile.c:35: warning: will never be executed run_timer: testing run_timer: compiler lied Expected Results: No warning (well, at least not that warning) from the compiler. Testcase output would be the same but the message would no longer be correct (the compiler wouldn't have lied). Additional Information:
Created attachment 33420 [details] small test case
This is a false positive warning, comment in jump.c even mentions this: CSE and inlining can duplicate insns, so it's possible to get spurious warnings from this. But I really don't want to touch this part of the 2.96-RH compiler at this point, it would mean destabilizing it just for a couple of false positive warnings.