diff options
author | Jakub Jelinek <jakub@redhat.com> | 2008-10-28 11:34:51 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2008-10-28 11:34:51 +0100 |
commit | 5229689d71b35d2e94c1c2f80147927bf5470c07 (patch) | |
tree | 8348ceeaf745bd11ba0b12ed05934a14f7afdf0f /gcc/testsuite/gcc.c-torture | |
parent | 9d54866d5491de12e6ccdc031516595d3c2d9077 (diff) | |
download | gcc-5229689d71b35d2e94c1c2f80147927bf5470c07.zip gcc-5229689d71b35d2e94c1c2f80147927bf5470c07.tar.gz gcc-5229689d71b35d2e94c1c2f80147927bf5470c07.tar.bz2 |
re PR middle-end/37931 (ice: verify_gimple failed)
PR middle-end/37931
* fold-const.c (distribute_bit_expr): Convert common, left and
right arguments to type.
* gcc.c-torture/execute/pr37931.c: New test.
From-SVN: r141406
Diffstat (limited to 'gcc/testsuite/gcc.c-torture')
-rw-r--r-- | gcc/testsuite/gcc.c-torture/execute/pr37931.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr37931.c b/gcc/testsuite/gcc.c-torture/execute/pr37931.c new file mode 100644 index 0000000..0077a21 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/pr37931.c @@ -0,0 +1,23 @@ +/* PR middle-end/37931 */ + +extern void abort (void); + +int +foo (int a, unsigned int b) +{ + return (a | 1) & (b | 1); +} + +int +main (void) +{ + if (foo (6, 0xc6) != 7) + abort (); + if (foo (0x80, 0xc1) != 0x81) + abort (); + if (foo (4, 4) != 5) + abort (); + if (foo (5, 4) != 5) + abort (); + return 0; +} |