Commit bc9c2952 by Andreas Jaeger

complex-6.c: New.

	* gcc.c-torture/execute/complex-6.c: New.

	* reg-stack.c (convert_regs_exit): Push the registers to stack in
	proper order.

From-SVN: r54915
parent faa964e5
2002-06-23 Jan Hubicka <jh@suse.cz>
* reg-stack.c (convert_regs_exit): Push the registers to stack in
proper order.
2002-06-22 Ulrich Weigand <uweigand@de.ibm.com>
PR middle-end/6963
......
......@@ -2462,7 +2462,7 @@ convert_regs_exit ()
output_stack->top = value_reg_high - value_reg_low;
for (reg = value_reg_low; reg <= value_reg_high; ++reg)
{
output_stack->reg[reg - value_reg_low] = reg;
output_stack->reg[value_reg_high - reg] = reg;
SET_HARD_REG_BIT (output_stack->reg_set, reg);
}
}
......
2002-06-23 Andreas Jaeger <aj@suse.de>
* gcc.c-torture/execute/complex-6.c: New.
2002-06-22 Neil Booth <neil@daikokuya.co.uk>
* gcc.dg/cpp/trad/comment-2.c. gcc.dg/cpp/trad/funlike-2.c,
......
/* This test tests complex conjugate and passing/returning of
complex parameter. */
#include <stdlib.h>
#include <stdio.h>
int err;
#define TEST(TYPE, FUNC) \
__complex__ TYPE \
ctest_ ## FUNC (__complex__ TYPE x) \
{ \
__complex__ TYPE res; \
\
res = ~x; \
\
return res; \
} \
\
void \
test_ ## FUNC (void) \
{ \
__complex__ TYPE res, x; \
\
x = 1.0 + 2.0i; \
\
res = ctest_ ## FUNC (x); \
\
if (res != 1.0 - 2.0i) \
{ \
printf ("test_" #FUNC " failed\n"); \
++err; \
} \
}
TEST(float, float)
TEST(double, double)
TEST(long double, long_double)
TEST(int, int)
TEST(long int, long_int)
int
main (void)
{
err = 0;
test_float ();
test_double ();
test_long_double ();
test_int ();
test_long_int ();
if (err != 0)
abort ();
return 0;
}
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