Bail out HARD_REGISTER vars in asan (PR sanitizer/81224).

2017-06-28  Martin Liska  <mliska@suse.cz>

	PR sanitizer/81224
	* asan.c (instrument_derefs): Bail out inner references
	that are hard register variables.
2017-06-28  Martin Liska  <mliska@suse.cz>

	PR sanitizer/81224
	* gcc.dg/asan/pr81224.c: New test.

From-SVN: r249728
This commit is contained in:
Martin Liska 2017-06-28 09:59:23 +02:00 committed by Martin Liska
parent 576f123b83
commit 6dc61b4533
4 changed files with 25 additions and 0 deletions

View file

@ -1,3 +1,9 @@
2017-06-28 Martin Liska <mliska@suse.cz>
PR sanitizer/81224
* asan.c (instrument_derefs): Bail out inner references
that are hard register variables.
2017-06-28 Jakub Jelinek <jakub@redhat.com>
PR target/81175

View file

@ -1875,6 +1875,9 @@ instrument_derefs (gimple_stmt_iterator *iter, tree t,
|| bitsize != size_in_bytes * BITS_PER_UNIT)
return;
if (VAR_P (inner) && DECL_HARD_REGISTER (inner))
return;
if (VAR_P (inner)
&& offset == NULL_TREE
&& bitpos >= 0

View file

@ -1,3 +1,8 @@
2017-06-28 Martin Liska <mliska@suse.cz>
PR sanitizer/81224
* gcc.dg/asan/pr81224.c: New test.
2017-06-28 Eric Botcazou <ebotcazou@adacore.com>
* gcc.dg/tree-prof/val-profiler-threads-1.c (main): Fix 2nd argument

View file

@ -0,0 +1,11 @@
/* PR sanitizer/80659 */
/* { dg-do compile { target { i?86-*-* x86_64-*-* } } } */
/* { dg-additional-options "-msse2" } */
int a;
int
b ()
{
register __attribute__ ((__vector_size__ (4 * sizeof (int)))) int c asm("xmm0");
return c[a];
}