From: Jakub Jelinek Date: Fri, 23 Mar 2018 09:05:56 +0000 (+0100) Subject: re PR inline-asm/85022 (internal compiler error: in write_dependence_p, at alias... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6f5799be393e835b4cce70d070ae30039fdf38a7;p=gcc.git re PR inline-asm/85022 (internal compiler error: in write_dependence_p, at alias.c:3003) 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. From-SVN: r258795 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9b228657048..0be26ef2b16 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,9 @@ 2018-03-23 Jakub Jelinek + PR inline-asm/85022 + * alias.c (write_dependence_p): Don't require for x_canonicalized + non-VOIDmode if x has VOIDmode. + PR sanitizer/85029 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base), just don't try to optimize it rather than assert it never happens. 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)) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 87c8970d364..14e78332f97 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,8 @@ 2018-03-23 Jakub Jelinek + PR inline-asm/85022 + * c-c++-common/torture/pr85022.c: New test. + PR sanitizer/85029 * g++.dg/ubsan/pr85029.C: New test. diff --git a/gcc/testsuite/c-c++-common/torture/pr85022.c b/gcc/testsuite/c-c++-common/torture/pr85022.c new file mode 100644 index 00000000000..3ec2c781aa1 --- /dev/null +++ b/gcc/testsuite/c-c++-common/torture/pr85022.c @@ -0,0 +1,9 @@ +/* PR inline-asm/85022 */ + +extern struct B b; + +void +foo () +{ + __asm ("" : "+m" (b)); +}