reg-stack.c (stack_result): Unconditionally use FUNCTION_OUTGOING_VALUE resp.
* reg-stack.c (stack_result): Unconditionally use FUNCTION_OUTGOING_VALUE resp. FUNCTION_VALUE. * g++.old-deja/g++.other/regstack.C: New test. From-SVN: r40457
This commit is contained in:
parent
a58dc194c8
commit
9cf218a30f
4 changed files with 41 additions and 5 deletions
|
@ -1,3 +1,8 @@
|
|||
2001-03-14 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* reg-stack.c (stack_result): Unconditionally use
|
||||
FUNCTION_OUTGOING_VALUE resp. FUNCTION_VALUE.
|
||||
|
||||
Wed Mar 14 16:36:25 CET 2001 Jan Hubicka <jh@suse.cz>
|
||||
|
||||
* expr.c (emit_move_insn_1): Split push of complex value when
|
||||
|
|
|
@ -786,11 +786,7 @@ stack_result (decl)
|
|||
return 0;
|
||||
|
||||
result = DECL_RTL (DECL_RESULT (decl));
|
||||
/* ?!? What is this code supposed to do? Can this code actually
|
||||
trigger if we kick out aggregates above? */
|
||||
if (result != 0
|
||||
&& ! (GET_CODE (result) == REG
|
||||
&& REGNO (result) < FIRST_PSEUDO_REGISTER))
|
||||
if (result != 0)
|
||||
{
|
||||
#ifdef FUNCTION_OUTGOING_VALUE
|
||||
result
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2001-03-14 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* g++.old-deja/g++.other/regstack.C: New test.
|
||||
|
||||
2001-03-12 Nathan Sidwell <nathan@codesourcery.com>
|
||||
|
||||
* g++.old-deja/g++.other/ref4.C: New test.
|
||||
|
|
31
gcc/testsuite/g++.old-deja/g++.other/regstack.C
Normal file
31
gcc/testsuite/g++.old-deja/g++.other/regstack.C
Normal file
|
@ -0,0 +1,31 @@
|
|||
// Special g++ Options: -O2
|
||||
// Skip if not target: i?86-*-*
|
||||
|
||||
inline double foo (double x)
|
||||
{
|
||||
register double r;
|
||||
asm volatile ("fsqrt" : "=t" (r) : "0" (x));
|
||||
return r;
|
||||
}
|
||||
|
||||
struct X
|
||||
{
|
||||
~X() {}
|
||||
};
|
||||
|
||||
int b;
|
||||
|
||||
double bar (X x)
|
||||
{
|
||||
if (b)
|
||||
return 1.0;
|
||||
return 36.0 * foo (36.0);
|
||||
}
|
||||
|
||||
int main ()
|
||||
{
|
||||
X x;
|
||||
if (bar (x) != 216.0)
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
Loading…
Add table
Reference in a new issue