Commit 6f5799be by Jakub Jelinek Committed by Jakub Jelinek

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
parent ee3a999f
2018-03-23 Jakub Jelinek <jakub@redhat.com> 2018-03-23 Jakub Jelinek <jakub@redhat.com>
PR inline-asm/85022
* alias.c (write_dependence_p): Don't require for x_canonicalized
non-VOIDmode if x has VOIDmode.
PR sanitizer/85029 PR sanitizer/85029
* sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base), * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
just don't try to optimize it rather than assert it never happens. just don't try to optimize it rather than assert it never happens.
......
...@@ -2999,7 +2999,8 @@ write_dependence_p (const_rtx mem, ...@@ -2999,7 +2999,8 @@ write_dependence_p (const_rtx mem,
int ret; int ret;
gcc_checking_assert (x_canonicalized 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)); : (x_addr == NULL_RTX && x_mode == VOIDmode));
if (MEM_VOLATILE_P (x) && MEM_VOLATILE_P (mem)) if (MEM_VOLATILE_P (x) && MEM_VOLATILE_P (mem))
......
2018-03-23 Jakub Jelinek <jakub@redhat.com> 2018-03-23 Jakub Jelinek <jakub@redhat.com>
PR inline-asm/85022
* c-c++-common/torture/pr85022.c: New test.
PR sanitizer/85029 PR sanitizer/85029
* g++.dg/ubsan/pr85029.C: New test. * g++.dg/ubsan/pr85029.C: New test.
......
/* PR inline-asm/85022 */
extern struct B b;
void
foo ()
{
__asm ("" : "+m" (b));
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment