This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/36296] bogus uninitialized warning (loop representation, VRP missed-optimization)
- From: "manu at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Aug 2008 02:33:38 -0000
- Subject: [Bug middle-end/36296] bogus uninitialized warning (loop representation, VRP missed-optimization)
- References: <bug-36296-16207@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #12 from manu at gcc dot gnu dot org 2008-08-19 02:33 -------
The key difference is -ftree-vrp (which is enabled at -O2). With INIT=2, it is
missing the obvious optimization that it detects with INIT=1. I wonder if this
is expected (after all, it is value-RANGE-propagation) or there is a PR open
about this.
Notice that any two consecutive integers trigger the optimization 0,1 but also
1,2 and thus remove the bogus uninitialized warning.
--
manu at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|bogus uninitialized warning |bogus uninitialized warning
|(loop representation) |(loop representation, VRP
| |missed-optimization)
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36296