diff options
author | Jim Wilson <wilson@gcc.gnu.org> | 1993-03-05 09:45:15 -0800 |
---|---|---|
committer | Jim Wilson <wilson@gcc.gnu.org> | 1993-03-05 09:45:15 -0800 |
commit | 2d08d5b6566d4c019a85ee1ea957a1d59d4bc8f6 (patch) | |
tree | 7221a0146c7c223ff6cf5aa412ac3f91443d8501 | |
parent | 33d3e559c51bc6f7f8d789a5f8de768bb359fbd1 (diff) | |
download | gcc-2d08d5b6566d4c019a85ee1ea957a1d59d4bc8f6.zip gcc-2d08d5b6566d4c019a85ee1ea957a1d59d4bc8f6.tar.gz gcc-2d08d5b6566d4c019a85ee1ea957a1d59d4bc8f6.tar.bz2 |
(note_mem_written): QImode varying structure memory accesses can alias scalars.
From-SVN: r3654
-rw-r--r-- | gcc/cse.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -6885,9 +6885,12 @@ note_mem_written (written, writes_ptr) { /* A varying address that is a sum indicates an array element, and that's just as good as a structure element - in implying that we need not invalidate scalar variables. */ - if (!(MEM_IN_STRUCT_P (written) - || GET_CODE (XEXP (written, 0)) == PLUS)) + in implying that we need not invalidate scalar variables. + However, we must allow QImode aliasing of scalars, because the + ANSI C standard allows character pointers to alias anything. */ + if (! ((MEM_IN_STRUCT_P (written) + || GET_CODE (XEXP (written, 0)) == PLUS) + && GET_MODE (written) != QImode)) writes_ptr->all = 1; writes_ptr->nonscalar = 1; } |