re PR target/65184 (ICE: in expand_expr_addr_expr_1, at expr.c:7760 with -mabi=ms -fcheck-pointer-bounds -mmpx)

gcc/

	PR target/65184
	* gcc/config/i386/i386.c (ix86_pass_by_reference) Bounds
	are never passed by reference.

gcc/testsuite/

	PR target/65184
	* gcc.target/i386/pr65184.c: New.

From-SVN: r221106
This commit is contained in:
Ilya Enkovich 2015-03-02 10:47:54 +00:00 committed by Ilya Enkovich
parent 321a5ceb81
commit df265bd262
4 changed files with 33 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2015-03-02 Ilya Enkovich <ilya.enkovich@intel.com>
PR target/65184
* gcc/config/i386/i386.c (ix86_pass_by_reference) Bounds
are never passed by reference.
2015-03-02 Ilya Enkovich <ilya.enkovich@intel.com>
PR target/65183

View File

@ -7914,6 +7914,11 @@ ix86_pass_by_reference (cumulative_args_t cum_v, machine_mode mode,
{
CUMULATIVE_ARGS *cum = get_cumulative_args (cum_v);
/* Bounds are never passed by reference. */
if ((type && POINTER_BOUNDS_TYPE_P (type))
|| POINTER_BOUNDS_MODE_P (mode))
return false;
/* See Windows x64 Software Convention. */
if (TARGET_64BIT && (cum ? cum->call_abi : ix86_abi) == MS_ABI)
{

View File

@ -1,3 +1,8 @@
2015-03-02 Ilya Enkovich <ilya.enkovich@intel.com>
PR target/65184
* gcc.target/i386/pr65184.c: New.
2015-03-02 Ilya Enkovich <ilya.enkovich@intel.com>
PR target/65183

View File

@ -0,0 +1,17 @@
/* { dg-do compile } */
/* { dg-require-effective-target mpx } */
/* { dg-options "-O2 -mabi=ms -fcheck-pointer-bounds -mmpx" } */
void
foo (int *a)
{
if (a[0] != a[1] * 2333)
__builtin_abort ();
}
void
bar (int *a)
{
if (a[0] != a[1] * 2333)
__builtin_abort ();
}