Fix *_CST ICEs connected to MPX.

2017-03-20  Martin Liska  <mliska@suse.cz>

	PR target/79769
	PR target/79770
	* tree-chkp.c (chkp_find_bounds_1): Handle REAL_CST,
	COMPLEX_CST and VECTOR_CST.
2017-03-20  Martin Liska  <mliska@suse.cz>

	PR target/79769
	PR target/79770
	* g++.dg/pr79769.C: New test.
	* gcc.target/i386/mpx/pr79770.c: New test.

From-SVN: r246275
This commit is contained in:
Martin Liska 2017-03-20 11:04:06 +01:00 committed by Martin Liska
parent e325aba2a7
commit 918112d378
5 changed files with 39 additions and 0 deletions

View File

@ -1,3 +1,10 @@
2017-03-20 Martin Liska <mliska@suse.cz>
PR target/79769
PR target/79770
* tree-chkp.c (chkp_find_bounds_1): Handle REAL_CST,
COMPLEX_CST and VECTOR_CST.
2017-03-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
PR target/78857

View File

@ -1,3 +1,10 @@
2017-03-20 Martin Liska <mliska@suse.cz>
PR target/79769
PR target/79770
* g++.dg/pr79769.C: New test.
* gcc.target/i386/mpx/pr79770.c: New test.
2017-03-20 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
PR target/78857

View File

@ -0,0 +1,4 @@
/* { dg-do compile { target { { i?86-*-* x86_64-*-* } && { ! x32 } } } } */
/* { dg-options "-fcheck-pointer-bounds -mmpx -mabi=ms" } */
void a (_Complex) { a (3); }

View File

@ -0,0 +1,19 @@
/* { dg-do compile { target lp64 } } */
/* { dg-options "-fcheck-pointer-bounds -mmpx -mabi=ms -Wno-psabi" } */
typedef unsigned U __attribute__ ((vector_size (64)));
typedef unsigned __int128 V __attribute__ ((vector_size (64)));
static inline V
bar (U u, U x, V v)
{
v = (V)(U) { 0, ~0 };
v[x[0]] <<= u[-63];
return v;
}
V
foo (U u)
{
return bar (u, (U) {}, (V) {});
}

View File

@ -3731,6 +3731,8 @@ chkp_find_bounds_1 (tree ptr, tree ptr_src, gimple_stmt_iterator *iter)
break;
case INTEGER_CST:
case COMPLEX_CST:
case VECTOR_CST:
if (integer_zerop (ptr_src))
bounds = chkp_get_none_bounds ();
else