aboutsummaryrefslogtreecommitdiff
path: root/gcc/alias.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2018-03-23 09:05:56 +0000
committerJakub Jelinek <jakub@redhat.com>2018-03-23 09:05:56 +0000
commitd6b0d5499547e66ef00a26403f84cd381f147519 (patch)
tree82f63b45b22c73fedcb4d8e30cf05af034f31330 /gcc/alias.c
parentda155e5c6b2e321d23d4a8bd8bddafa69dcb212d (diff)
PR inline-asm/85022
* alias.c (write_dependence_p): Don't require for x_canonicalized non-VOIDmode if x has VOIDmode. * c-c++-common/torture/pr85022.c: New test. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@258795 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/alias.c')
-rw-r--r--gcc/alias.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/alias.c b/gcc/alias.c
index 5fa15cbd102..eac36a51519 100644
--- a/gcc/alias.c
+++ b/gcc/alias.c
@@ -2999,7 +2999,8 @@ write_dependence_p (const_rtx mem,
int ret;
gcc_checking_assert (x_canonicalized
- ? (x_addr != NULL_RTX && x_mode != VOIDmode)
+ ? (x_addr != NULL_RTX
+ && (x_mode != VOIDmode || GET_MODE (x) == VOIDmode))
: (x_addr == NULL_RTX && x_mode == VOIDmode));
if (MEM_VOLATILE_P (x) && MEM_VOLATILE_P (mem))