Skip to content

Commit 0b41083

Browse files
author
jakub
committed
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: svn+ssh://gcc.gnu.org/svn/gcc/trunk@258795 138bc75d-0d04-0410-961f-82ee72b054a4
1 parent 5d8527b commit 0b41083

File tree

4 files changed

+18
-1
lines changed

4 files changed

+18
-1
lines changed

gcc/ChangeLog

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
2018-03-23 Jakub Jelinek <[email protected]>
22

3+
PR inline-asm/85022
4+
* alias.c (write_dependence_p): Don't require for x_canonicalized
5+
non-VOIDmode if x has VOIDmode.
6+
37
PR sanitizer/85029
48
* sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
59
just don't try to optimize it rather than assert it never happens.

gcc/alias.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2999,7 +2999,8 @@ write_dependence_p (const_rtx mem,
29992999
int ret;
30003000

30013001
gcc_checking_assert (x_canonicalized
3002-
? (x_addr != NULL_RTX && x_mode != VOIDmode)
3002+
? (x_addr != NULL_RTX
3003+
&& (x_mode != VOIDmode || GET_MODE (x) == VOIDmode))
30033004
: (x_addr == NULL_RTX && x_mode == VOIDmode));
30043005

30053006
if (MEM_VOLATILE_P (x) && MEM_VOLATILE_P (mem))

gcc/testsuite/ChangeLog

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
2018-03-23 Jakub Jelinek <[email protected]>
22

3+
PR inline-asm/85022
4+
* c-c++-common/torture/pr85022.c: New test.
5+
36
PR sanitizer/85029
47
* g++.dg/ubsan/pr85029.C: New test.
58

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/* PR inline-asm/85022 */
2+
3+
extern struct B b;
4+
5+
void
6+
foo ()
7+
{
8+
__asm ("" : "+m" (b));
9+
}

0 commit comments

Comments
 (0)