Commit 9e25209f by Eric Botcazou Committed by Eric Botcazou

re PR middle-end/65409 (ICE in store_field)

	PR middle-end/65409
	* expr.c (store_field): Do not do a direct block copy if the source is
	a PARALLEL with BLKmode.

From-SVN: r221453
parent 2aab918d
2015-03-16 Eric Botcazou <ebotcazou@adacore.com>
PR middle-end/65409
* expr.c (store_field): Do not do a direct block copy if the source is
a PARALLEL with BLKmode.
2015-03-16 Tom de Vries <tom@codesourcery.com>
PR middle-end/65414
......
......@@ -6645,11 +6645,12 @@ store_field (rtx target, HOST_WIDE_INT bitsize, HOST_WIDE_INT bitpos,
&& mode != TYPE_MODE (TREE_TYPE (exp)))
temp = convert_modes (mode, TYPE_MODE (TREE_TYPE (exp)), temp, 1);
/* If the modes of TEMP and TARGET are both BLKmode, both
must be in memory and BITPOS must be aligned on a byte
boundary. If so, we simply do a block copy. Likewise
for a BLKmode-like TARGET. */
if (GET_MODE (temp) == BLKmode
/* If TEMP is not a PARALLEL (see below) and its mode and that of TARGET
are both BLKmode, both must be in memory and BITPOS must be aligned
on a byte boundary. If so, we simply do a block copy. Likewise for
a BLKmode-like TARGET. */
if (GET_CODE (temp) != PARALLEL
&& GET_MODE (temp) == BLKmode
&& (GET_MODE (target) == BLKmode
|| (MEM_P (target)
&& GET_MODE_CLASS (GET_MODE (target)) == MODE_INT
......
2015-03-16 Eric Botcazou <ebotcazou@adacore.com>
* testsuite/g++.dg/pr65049.C: New test.
2015-03-16 Tom de Vries <tom@codesourcery.com>
* gcc.target/i386/fuse-caller-save-rec.c: Add PR64895 xfail on scans.
......
// PR middle-end/65409
// Reported by Ignacy Gawedzki <bugs@qult.net>
struct Foo
{
Foo() {}
int a;
int b;
char c;
};
Foo copy_foo(Foo);
struct Bar : Foo
{
Bar(Foo t) : Foo(copy_foo(t)) {}
};
Bar a = Foo();
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