aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2024-07-18 09:22:10 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2024-07-18 10:07:40 +0200
commit39f89e0daf6933fc888b79aa15f358b145c212ee (patch)
tree003006e0def049ca03f8c2eb6fb8989ee39055a2 /gcc
parentf443de1de36fd9d5a02dc56574ede8348f210adb (diff)
downloadgcc-39f89e0daf6933fc888b79aa15f358b145c212ee.zip
gcc-39f89e0daf6933fc888b79aa15f358b145c212ee.tar.gz
gcc-39f89e0daf6933fc888b79aa15f358b145c212ee.tar.bz2
testsuite: Fix up builtin-clear-padding-3.c for -funsigned-char
As reported on gcc-regression, this test FAILs on aarch64, but my r15-2090 change didn't change anything on the generated assembly, just added the forgotten dg-do run directive to the test, so the test has been failing forever, just we didn't know it. I can actually reproduce it on x86_64 with -funsigned-char too, s2.b.a has int type and -1 is stored to it, so we should compare it against -1 rather than (char) -1; the latter is appropriate for testing char fields into which we've stored -1. 2024-07-18 Jakub Jelinek <jakub@redhat.com> * c-c++-common/torture/builtin-clear-padding-3.c (main): Compare s2.b.a against -1 rather than (char) -1. (cherry picked from commit 958ee138748fae4371e453eb9b357f576abbe83e)
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/c-c++-common/torture/builtin-clear-padding-3.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/testsuite/c-c++-common/torture/builtin-clear-padding-3.c b/gcc/testsuite/c-c++-common/torture/builtin-clear-padding-3.c
index 27bf8f6..2c67316 100644
--- a/gcc/testsuite/c-c++-common/torture/builtin-clear-padding-3.c
+++ b/gcc/testsuite/c-c++-common/torture/builtin-clear-padding-3.c
@@ -34,7 +34,7 @@ main ()
foo (&s1, 0);
foo (&s2, 0);
__builtin_clear_padding (&s2);
- if (s2.b.a != (char) -1)
+ if (s2.b.a != -1)
__builtin_abort ();
__builtin_clear_padding (&s2.b.a);
__builtin_memset (&s2.b.a + 1, 0, sizeof (union U) - sizeof (s2.b.a));