re PR c/48985 (bogus buffer overflow warning and abort on static flexible array member)
authorRichard Guenther <rguenther@suse.de>
Thu, 19 May 2011 10:45:26 +0000 (10:45 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Thu, 19 May 2011 10:45:26 +0000 (10:45 +0000)
commite497b9bd88db2302ddc32317bd600c8176c579db
tree5585ebe56b49c389bde1eddb7ee80e0ff227a9cf
parent31b3ca64f48e85c780d9d98730231ff2961c4d32
re PR c/48985 (bogus buffer overflow warning and abort on static flexible array member)

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.

From-SVN: r173901
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/builtin-object-size-11.c [new file with mode: 0644]
gcc/tree-object-size.c