diff options
author | Andrew Pinski <apinski@marvell.com> | 2021-11-09 09:56:10 +0000 |
---|---|---|
committer | Andrew Pinski <apinski@marvell.com> | 2021-11-09 19:01:57 +0000 |
commit | f7844b6a777cb47fec7208d7bd594f6ce66f1daa (patch) | |
tree | 1ce4db903a8a2080883ecb15bbc34474f9edaf97 /gcc/testsuite/gcc.c-torture/execute | |
parent | 56af35de3d11960100996b96034dc9ccd7c75ca3 (diff) | |
download | gcc-f7844b6a777cb47fec7208d7bd594f6ce66f1daa.zip gcc-f7844b6a777cb47fec7208d7bd594f6ce66f1daa.tar.gz gcc-f7844b6a777cb47fec7208d7bd594f6ce66f1daa.tar.bz2 |
[Committed] Fix tree-optimization/103152: Still one more -signed1bit issue
When I fixed PR 102622, I accidently left behind a TYPE_PRECISION
check which I had there for checking before hand. This check
is not needed as the code will handle it correctly anyways.
Committed as obvious after a bootstrap/test on x86_64-linux-gnu.
PR tree-optimization/10352
gcc/ChangeLog:
* match.pd: Remove check of TYPE_PRECISION for
the a?0:pow2 case.
gcc/testsuite/ChangeLog:
* gcc.c-torture/execute/pr10352-1.c: New test.
Diffstat (limited to 'gcc/testsuite/gcc.c-torture/execute')
-rw-r--r-- | gcc/testsuite/gcc.c-torture/execute/pr10352-1.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr10352-1.c b/gcc/testsuite/gcc.c-torture/execute/pr10352-1.c new file mode 100644 index 0000000..babb9d4 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/pr10352-1.c @@ -0,0 +1,12 @@ +/* this is another case where phiopt + would create -signed1bit which is undefined. */ +struct { + int a:1; +} b; +int *c = (int *)&b, d; +int main() { + d = c && (b.a = (d < 0) ^ 3); + if (d != 1) + __builtin_abort(); + return 0; +} |