re PR target/5740 (sparcv9 ICE on complex_value.cc in libstdc++ test suite)

PR target/5740
	* expr.c (emit_group_load): Use extract_bit_field if
	needed for CONCAT arguments.

	* g++.dg/opt/conj1.C: New test.

From-SVN: r50975
This commit is contained in:
Jakub Jelinek 2002-03-18 16:08:31 +01:00 committed by Jakub Jelinek
parent 0f4237c2da
commit cbb9274487
4 changed files with 39 additions and 6 deletions

View File

@ -1,3 +1,9 @@
2002-03-18 Jakub Jelinek <jakub@redhat.com>
PR target/5740
* expr.c (emit_group_load): Use extract_bit_field if
needed for CONCAT arguments.
2002-03-18 Richard Earnshaw <rearnsha@arm.com>
PR target/4863

View File

@ -2004,12 +2004,17 @@ emit_group_load (dst, orig_src, ssize)
}
else if (GET_CODE (src) == CONCAT)
{
if (bytepos == 0
&& bytelen == GET_MODE_SIZE (GET_MODE (XEXP (src, 0))))
tmps[i] = XEXP (src, 0);
else if (bytepos == (HOST_WIDE_INT) GET_MODE_SIZE (GET_MODE (XEXP (src, 0)))
&& bytelen == GET_MODE_SIZE (GET_MODE (XEXP (src, 1))))
tmps[i] = XEXP (src, 1);
if ((bytepos == 0
&& bytelen == GET_MODE_SIZE (GET_MODE (XEXP (src, 0))))
|| (bytepos == (HOST_WIDE_INT) GET_MODE_SIZE (GET_MODE (XEXP (src, 0)))
&& bytelen == GET_MODE_SIZE (GET_MODE (XEXP (src, 1)))))
{
tmps[i] = XEXP (src, bytepos != 0);
if (! CONSTANT_P (tmps[i])
&& (GET_CODE (tmps[i]) != REG || GET_MODE (tmps[i]) != mode))
tmps[i] = extract_bit_field (tmps[i], bytelen * BITS_PER_UNIT,
0, 1, NULL_RTX, mode, mode, ssize);
}
else if (bytepos == 0)
{
rtx mem = assign_stack_temp (GET_MODE (src),

View File

@ -1,3 +1,7 @@
2002-03-18 Jakub Jelinek <jakub@redhat.com>
* g++.dg/opt/conj1.C: New test.
2002-03-17 Mark Mitchell <mark@codesourcery.com>
* g++.dg/template/qualttp20.C: Revert previous change.

View File

@ -0,0 +1,18 @@
// PR target/5740
// This testcase ICEd on SPARC -m64 because emit_group_load tried
// to move a DFmode register into DImode register directly.
// { dg-do compile }
// { dg-options "-O2" }
struct C
{
C (double y, double z) { __real__ x = y; __imag__ x = z; }
double r () const { return __real__ x; }
double i () const { return __imag__ x; }
__complex__ double x;
};
C conj (const C& z)
{
return C (z.r (), -z.i ());
}