diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/expmed.c | 3 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 2 | ||||
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/20020304-2.c | 10 |
4 files changed, 19 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1ea58af..13fb80d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2002-03-05 Jakub Jelinek <jakub@redhat.com> + * expmed.c (emit_store_flag): Don't test BITS_PER_WORD * 2 + wide volatile memory by parts. + +2002-03-05 Jakub Jelinek <jakub@redhat.com> + * ssa-ccp.c (ssa_ccp_substitute_constants): Don't crash if def is NULL. diff --git a/gcc/expmed.c b/gcc/expmed.c index 6f9a939..6d58ea9 100644 --- a/gcc/expmed.c +++ b/gcc/expmed.c @@ -4278,7 +4278,8 @@ emit_store_flag (target, code, op0, op1, mode, unsignedp, normalizep) the comparison into one involving a single word. */ if (GET_MODE_BITSIZE (mode) == BITS_PER_WORD * 2 && GET_MODE_CLASS (mode) == MODE_INT - && op1 == const0_rtx) + && op1 == const0_rtx + && (GET_CODE (op0) != MEM || ! MEM_VOLATILE_P (op0))) { if (code == EQ || code == NE) { diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 378dba7..7762357 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -2,6 +2,8 @@ * gcc.dg/20020304-1.c: New test. + * gcc.c-torture/compile/20020304-2.c: New test. + 2002-03-04 Zack Weinberg <zack@codesourcery.com> * gcc.c-torture/compile/20020304-1.c: New test case diff --git a/gcc/testsuite/gcc.c-torture/compile/20020304-2.c b/gcc/testsuite/gcc.c-torture/compile/20020304-2.c new file mode 100644 index 0000000..9a162d4 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/20020304-2.c @@ -0,0 +1,10 @@ +/* This testcase ICEd because a SUBREG of MEM/v was never + simplified. */ +volatile unsigned long long *a; + +unsigned char +foo (void) +{ + unsigned char b = (*a != 0); + return b; +} |