aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/backend/rust-compile-struct-field-expr.h
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2025-07-01 19:37:39 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2025-07-01 19:37:39 +0200
commitf5282f7402939fdec910ef3743d38edac864eec8 (patch)
tree27bcd105f8ce12f7500b1219079cdb8862b74100 /gcc/rust/backend/rust-compile-struct-field-expr.h
parent15670d4477ce219c017bd52417a6074b981fb197 (diff)
downloadgcc-f5282f7402939fdec910ef3743d38edac864eec8.zip
gcc-f5282f7402939fdec910ef3743d38edac864eec8.tar.gz
gcc-f5282f7402939fdec910ef3743d38edac864eec8.tar.bz2
testsuite: Fix up gcc.target/powerpc/builtin_altivec_tr_stxvr_runnable.c test (test UB) [PR120919]
In my reading of the test and the instructions emitted by the builtins, it invokes UB 4 times, each time overwriting one byte after some variable (sc, then ss, then si and then sll). If we are lucky, like at -O0 -mcpu=power10, there is just padding there or something that doesn't make the tests fail, if unlucky like with -O0 -mcpu=power10 -fstack-protector-strong, &sc + 1 == &expected_sc and so it overwrites the expected_sc variable. The test fails when testing with RUNTESTFLAGS="--target_board=unix/'{,-fstack-protector-strong}'" on power10. The following patch fixes that by using arrays of 2 elements, so that the overwriting of 1 byte happens to the part of the same variable. 2025-07-01 Jakub Jelinek <jakub@redhat.com> PR testsuite/120919 * gcc.target/powerpc/builtin_altivec_tr_stxvr_runnable.c (main): Change sc, ss, si and sll vars from scalars to arrays of 2 elements, initialize and test just the first one though.
Diffstat (limited to 'gcc/rust/backend/rust-compile-struct-field-expr.h')
0 files changed, 0 insertions, 0 deletions