[Bug tree-optimization/88372] alloc_size attribute is ignored on function pointers
msebor at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Dec 14 22:46:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88372
--- Comment #5 from Martin Sebor <msebor at gcc dot gnu.org> ---
Author: msebor
Date: Fri Dec 14 22:45:55 2018
New Revision: 267158
URL: https://gcc.gnu.org/viewcvs?rev=267158&root=gcc&view=rev
Log:
PR tree-optimization/88372 - alloc_size attribute is ignored on function
pointers
gcc/ChangeLog:
PR tree-optimization/88372
* calls.c (maybe_warn_alloc_args_overflow): Handle function pointers.
* tree-object-size.c (alloc_object_size): Same. Simplify.
* doc/extend.texi (Object Size Checking): Update.
(Other Builtins): Add __builtin_object_size.
(Common Type Attributes): Add alloc_size.
(Common Variable Attributes): Ditto.
gcc/testsuite/ChangeLog:
PR tree-optimization/88372
* gcc.dg/Walloc-size-larger-than-18.c: New test.
* gcc.dg/builtin-object-size-19.c: Same.
Added:
trunk/gcc/testsuite/gcc.dg/Walloc-size-larger-than-18.c
trunk/gcc/testsuite/gcc.dg/builtin-object-size-19.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/calls.c
trunk/gcc/doc/extend.texi
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-object-size.c
More information about the Gcc-bugs
mailing list