This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/33257] New: guaranteed-true test not optimized away when input values later used
- From: "raeburn at raeburn dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 31 Aug 2007 07:44:32 -0000
- Subject: [Bug rtl-optimization/33257] New: guaranteed-true test not optimized away when input values later used
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
I wrote a simple test of division and remainder results that should always be
true ((a/b)*b+(a%b)==a, with a hardcoded constant for b). In testing a current
source tree (trunk rev 127954), I found that the test properly went away...
unless I later printed out the quotient and remainder values. If I passed them
to printf, the test is still performed, even though it can't fail, and its
intermediate values are not used.
--
Summary: guaranteed-true test not optimized away when input
values later used
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: rtl-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: raeburn at raeburn dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33257