aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/analyzer
diff options
context:
space:
mode:
authorJoern Rennecke <joern.rennecke@riscy-ip.com>2024-08-12 11:13:24 +0100
committerJoern Rennecke <joern.rennecke@riscy-ip.com>2024-08-12 11:27:12 +0100
commit46bd63d872ffb9733c4fff51033447f26ce56576 (patch)
tree375ebcc0648d4b64ecd2c8962e8f9da268f854fa /gcc/testsuite/c-c++-common/analyzer
parent40b9a7beb79acbea569be3066768cfb62c0f7c31 (diff)
downloadgcc-46bd63d872ffb9733c4fff51033447f26ce56576.zip
gcc-46bd63d872ffb9733c4fff51033447f26ce56576.tar.gz
gcc-46bd63d872ffb9733c4fff51033447f26ce56576.tar.bz2
This fixes problems with tests that exceed a data type or the maximum stack frame size on 16 bit targets.
Note: GCC has a limitation that a stack frame cannot exceed half the address space. For two tests the decision to modify or skip them seems not so clear-cut; I choose to modify gcc.dg/pr47893.c to use types that fit the numbers, as that seemed to have little impact on the test, and skip gcc.dg/pr115646.c for 16 bit, as layout of structs with bitfields members can have quite subtle rules. gcc/testsuite/ * gcc.dg/pr107523.c: Make sure variables can fit numbers. * gcc.dg/pr47893.c: Add dg-require-effective-target size20plus clause. * c-c++-common/torture/builtin-clear-padding-2.c: dg-require-effective-target size20plus. * gcc.dg/pr115646.c: dg-require-effective-target int32plus. * c-c++-common/analyzer/coreutils-sum-pr108666.c: For c++, expect a warning about exceeding maximum object size if not size20plus. * gcc.dg/torture/inline-mem-cpy-1.c: Like the included file, dg-require-effective-target ptr32plus. * gcc.dg/torture/inline-mem-cmp-1.c: Likewise.
Diffstat (limited to 'gcc/testsuite/c-c++-common/analyzer')
-rw-r--r--gcc/testsuite/c-c++-common/analyzer/coreutils-sum-pr108666.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/testsuite/c-c++-common/analyzer/coreutils-sum-pr108666.c b/gcc/testsuite/c-c++-common/analyzer/coreutils-sum-pr108666.c
index dadd27e..c41b61d 100644
--- a/gcc/testsuite/c-c++-common/analyzer/coreutils-sum-pr108666.c
+++ b/gcc/testsuite/c-c++-common/analyzer/coreutils-sum-pr108666.c
@@ -35,7 +35,7 @@ bsd_sum_stream(FILE* stream, void* resstream, uintmax_t* length)
int checksum = 0;
uintmax_t total_bytes = 0;
static const size_t buffer_length = 32768;
- uint8_t* buffer = (uint8_t *) malloc(buffer_length);
+ uint8_t* buffer = (uint8_t *) malloc(buffer_length); /* { dg-warning "argument 1 value '32768' exceeds maximum object size 32767" "" { target { c++ && { ! size20plus } } } } */
if (!buffer)
return -1;