This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/48985] bogus buffer overflow warning and abort on static flexible array member
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 31 May 2011 12:54:47 +0000
- Subject: [Bug c/48985] bogus buffer overflow warning and abort on static flexible array member
- Auto-submitted: auto-generated
- References: <bug-48985-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48985
--- Comment #3 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-05-31 12:25:59 UTC ---
Author: rguenth
Date: Tue May 31 12:25:52 2011
New Revision: 174476
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=174476
Log:
2011-05-31 Richard Guenther <rguenther@suse.de>
Backport from mainline
2011-05-19 Richard Guenther <rguenther@suse.de>
PR middle-end/48985
* tree-object-size.c (addr_object_size): If the pointed-to
variable is a decl use DECL_SIZE_UNIT instead of TYPE_SIZE_UNIT.
* gcc.dg/builtin-object-size-11.c: New testcase.
Added:
branches/gcc-4_6-branch/gcc/testsuite/gcc.dg/builtin-object-size-11.c
Modified:
branches/gcc-4_6-branch/gcc/ChangeLog
branches/gcc-4_6-branch/gcc/testsuite/ChangeLog
branches/gcc-4_6-branch/gcc/tree-object-size.c