This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/48985] bogus buffer overflow warning and abort on static flexible array member


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]