This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/31227] [4.3 Regression] -Warray-bounds doesn't play together with loop optimizations
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 Mar 2007 21:45:23 -0000
- Subject: [Bug tree-optimization/31227] [4.3 Regression] -Warray-bounds doesn't play together with loop optimizations
- References: <bug-31227-87@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from rguenth at gcc dot gnu dot org 2007-03-16 21:45 -------
# cnt_67 = PHI <27(13)>
<L22>:;
D.1796_118 = &time_14(D)->mon[27];
ivtmp.56_8 = (unsigned int) D.1796_118;
D.1797_117 = &iov[27];
ivtmp.59_7 = (unsigned int) D.1797_117;
# ivtmp.59_76 = PHI <ivtmp.59_112(17), ivtmp.59_7(14)>
# ivtmp.56_62 = PHI <ivtmp.56_61(17), ivtmp.56_8(14)>
# cnt_105 = PHI <cnt_60(17), 27(14)>
<L18>:;
D.1671_51 = MEM[index: ivtmp.56_62, offset: 0x0ffffff98];
if (D.1671_51 != 0B) goto <L19>; else goto <L21>;
The proper way to warn about &time_14(D)->mon[27] (even if it's invalid C
and arguably invalid IL) is to look at the possible dereference sites.
Of course a MEM without base but using (unsigned int)&time_14(D)->mon[27]
as index and a negative offset doesn't make this easy.
This looks related to PR26726.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rakdver at gcc dot gnu dot
| |org
BugsThisDependsOn| |26726
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2007-03-16 21:45:23
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31227