This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/36902] Array bound warning with dead code after optimization
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 Jul 2008 21:18:29 -0000
- Subject: [Bug middle-end/36902] Array bound warning with dead code after optimization
- References: <bug-36902-682@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from pinskia at gcc dot gnu dot org 2008-07-22 21:18 -------
> The warning is very fragile: if the buffer in main() is not static then
> there is no failure; is the size is passed as a constant there is no error.
Not really, if you read my comment, you will understand why this is not that
fragile after all. I can make it even worse if you do a couple of things to
trick one optimization pass up enough so we warn in the first VRP but don't
optimize it away until the last VRP pass. But really this is the normal issue
with optimizers warnings and is a hard problem to solve in general and I don't
think we can count this as a regression really.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |diagnostic
Last reconfirmed|0000-00-00 00:00:00 |2008-07-22 21:18:28
date| |
Summary|[4.3/4.4 Regression]: Bogus |Array bound warning with
|array bound warning |dead code after optimization
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36902