aboutsummaryrefslogtreecommitdiff
path: root/libgfortran/runtime
diff options
context:
space:
mode:
authorStefan Schulze Frielinghaus <stefansf@linux.ibm.com>2024-04-12 11:06:24 +0200
committerStefan Schulze Frielinghaus <stefansf@linux.ibm.com>2024-04-12 11:06:24 +0200
commit67e1433a94f8ca82e2c36b79af44256430c73c38 (patch)
tree7ad4b110ffe53064f1c4f5eeb001cac4c3743ce6 /libgfortran/runtime
parent8c6f13d2cc1884921e7c532e03786f0344bededd (diff)
downloadgcc-67e1433a94f8ca82e2c36b79af44256430c73c38.zip
gcc-67e1433a94f8ca82e2c36b79af44256430c73c38.tar.gz
gcc-67e1433a94f8ca82e2c36b79af44256430c73c38.tar.bz2
analyzer: Bail out on function pointer for -Wanalyzer-allocation-size
On s390 pr94688.c is failing due to excess error pr94688.c:6:5: warning: allocated buffer size is not a multiple of the pointee's size [CWE-131] [-Wanalyzer-allocation-size] This is because on s390 functions are by default aligned to an 8-byte boundary and during function type construction size is set to function boundary. Thus, for the assignment a.0_1 = (void (*<T237>) ()) &a; we have that the right-hand side is pointing to a 4-byte memory region whereas the size of the function pointer is 8 byte and a warning is emitted. Since -Wanalyzer-allocation-size is not about pointers to code, bail out early. gcc/analyzer/ChangeLog: * region-model.cc (region_model::check_region_size): Bail out early on function pointers.
Diffstat (limited to 'libgfortran/runtime')
0 files changed, 0 insertions, 0 deletions