aboutsummaryrefslogtreecommitdiff
path: root/libjava
diff options
context:
space:
mode:
authorQing Zhao <qing.zhao@oracle.com>2025-08-14 20:27:20 +0000
committerQing Zhao <qing.zhao@oracle.com>2025-08-15 15:28:10 +0000
commit1b34664c6255a7c1802e377be439f0d474dde0bb (patch)
tree92d2a909948fadba6d7104bc782d2385767edde3 /libjava
parent9e7f8568f751013266d2d1c4c0023ac7618f1b24 (diff)
downloadgcc-1b34664c6255a7c1802e377be439f0d474dde0bb.zip
gcc-1b34664c6255a7c1802e377be439f0d474dde0bb.tar.gz
gcc-1b34664c6255a7c1802e377be439f0d474dde0bb.tar.bz2
Generate a call to a .ACCESS_WITH_SIZE for a FAM with counted_by attribute only when it's read from.
Currently, we generate a call to a .ACCESS_WITH_SIZE for a FAM with counted_by attribute for every component_ref that corresponds to such an object. Actually, such .ACCESS_WITH_SIZE calls are useless when they are generated for a written site or an address taken site. In this patch, we only generate a call to .ACCESS_WITH_SIZE for a FAM with counted_by attribute when it's a read. gcc/c/ChangeLog: * c-tree.h (handle_counted_by_for_component_ref): New prototype of build_component_ref and handle_counted_by_for_component_ref. * c-parser.cc (c_parser_postfix_expression): Call the new prototypes of build_component_ref and handle_counted_by_for_component_ref, update comments. * c-typeck.cc (default_function_array_read_conversion): Likewise. (convert_lvalue_to_rvalue): Likewise. (default_conversion): Likewise. (handle_counted_by_p): Update comments. (handle_counted_by_for_component_ref): Delete one argument. (build_component_ref): Delete one argument. Delete the call to handle_counted_by_for_component_ref completely. (build_array_ref): Generate call to .ACCESS_WITH_SIZE for array. gcc/testsuite/ChangeLog: * gcc.dg/flex-array-counted-by-2.c: Adjust testing case.
Diffstat (limited to 'libjava')
0 files changed, 0 insertions, 0 deletions