This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/43270] array-bounds false negative
- From: "matt at use dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 6 Mar 2010 00:18:43 -0000
- Subject: [Bug tree-optimization/43270] array-bounds false negative
- References: <bug-43270-8137@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #9 from matt at use dot net 2010-03-06 00:18 -------
Alright. Even though PC-Lint now correctly warns, and GCC still does not, I
have updated the attached example yet again to avoid the next constraint you
mention.
GCC still does not detect the array-bounds issue, even when the array whose
bound is being violated it is neither the first nor the last field in the
struct/class. I tried using primitive types, complex types, references/pointer,
and arrays for the fields in question. GCC still never detects the issue.
Even for existing code that uses this pattern for flexible array members, a
private array that has not been otherwise initialized in the ctor, which is
accessed out of bounds in said ctor, seems unlikely. Perhaps I will enter that
as a separate bug, but I hope that this latest code example (which still
decently matches the real code I had the bug with) is worthy of the bug being
detected.
--
matt at use dot net changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |UNCONFIRMED
Resolution|WONTFIX |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43270