Commit 1acd15e8 by Jakub Jelinek Committed by Jakub Jelinek

compat-common.h (CINT, CDBL): Define.

	* gcc.dg/compat/compat-common.h (CINT, CDBL): Define.
	* gcc.dg/compat/scalar-return-3_x.c: Use it.
	* gcc.dg/compat/scalar-return-3_y.c: Use it.
	* gcc.dg/compat/scalar-return-4_x.c: Use it.
	* gcc.dg/compat/scalar-return-4_y.c: Use it.
	* gcc.dg/compat/scalar-by-value-3_x.c: Use it.
	* gcc.dg/compat/scalar-by-value-3_y.c: Use it.
	* gcc.dg/compat/scalar-by-value-4_x.c: Use it.
	* gcc.dg/compat/scalar-by-value-4_y.c: Use it.

From-SVN: r83370
parent e1af8299
2004-06-19 Jakub Jelinek <jakub@redhat.com> 2004-06-19 Jakub Jelinek <jakub@redhat.com>
* gcc.dg/compat/compat-common.h (CINT, CDBL): Define.
* gcc.dg/compat/scalar-return-3_x.c: Use it.
* gcc.dg/compat/scalar-return-3_y.c: Use it.
* gcc.dg/compat/scalar-return-4_x.c: Use it.
* gcc.dg/compat/scalar-return-4_y.c: Use it.
* gcc.dg/compat/scalar-by-value-3_x.c: Use it.
* gcc.dg/compat/scalar-by-value-3_y.c: Use it.
* gcc.dg/compat/scalar-by-value-4_x.c: Use it.
* gcc.dg/compat/scalar-by-value-4_y.c: Use it.
2004-06-19 Jakub Jelinek <jakub@redhat.com>
* gcc.dg/range-test-1.c: New test. * gcc.dg/range-test-1.c: New test.
* g++.dg/opt/range-test-1.C: New test. * g++.dg/opt/range-test-1.C: New test.
......
...@@ -24,5 +24,14 @@ ...@@ -24,5 +24,14 @@
#define DEBUG_FINI #define DEBUG_FINI
#endif #endif
#ifdef __GNUC__
#define CINT(x, y) (x + __extension__ y##i)
#define CDBL(x, y) (x + __extension__ y##i)
#else
#include <complex.h>
#define CINT(x, y) ((_Complex int) (x + y * _Complex_I))
#define CDBL(x, y) (x + y * _Complex_I)
#endif
extern void abort (void); extern void abort (void);
extern int fails; extern int fails;
...@@ -145,12 +145,12 @@ testit##NAME (void) \ ...@@ -145,12 +145,12 @@ testit##NAME (void) \
} }
#ifndef SKIP_COMPLEX_INT #ifndef SKIP_COMPLEX_INT
T(ci, _Complex int, (2,3)) T(ci, _Complex int, CINT (2, 3))
T(cl, _Complex long, (3,4)) T(cl, _Complex long, CINT (3, 4))
T(cll, _Complex long long, (5,6)) T(cll, _Complex long long, CINT (5, 6))
#endif #endif
T(cd, _Complex double, (7.0,8.0)) T(cd, _Complex double, CDBL (7.0, 8.0))
T(cld, _Complex long double, (8.0,9.0)) T(cld, _Complex long double, CDBL (8.0, 9.0))
#undef T #undef T
......
...@@ -85,9 +85,9 @@ testva##NAME (int n, ...) \ ...@@ -85,9 +85,9 @@ testva##NAME (int n, ...) \
} }
#ifndef SKIP_COMPLEX_INT #ifndef SKIP_COMPLEX_INT
T(ci, _Complex int, (2,3)) T(ci, _Complex int, CINT (2, 3))
T(cl, _Complex long, (3,4)) T(cl, _Complex long, CINT (3, 4))
T(cll, _Complex long long, (5,6)) T(cll, _Complex long long, CINT (5, 6))
#endif #endif
T(cd, _Complex double, (7.0,8.0)) T(cd, _Complex double, CDBL (7.0, 8.0))
T(cld, _Complex long double, (8.0,9.0)) T(cld, _Complex long double, CDBL (8.0, 9.0))
...@@ -69,10 +69,10 @@ testit##NAME (void) \ ...@@ -69,10 +69,10 @@ testit##NAME (void) \
} }
#ifndef SKIP_COMPLEX_INT #ifndef SKIP_COMPLEX_INT
T(cc, _Complex char, (0,1)) T(cc, _Complex char, CINT (0, 1))
T(cs, _Complex short, (1,2)) T(cs, _Complex short, CINT (1, 2))
#endif #endif
T(cf, _Complex float, (6.0,7.0)) T(cf, _Complex float, CDBL (6.0, 7.0))
#undef T #undef T
......
...@@ -68,7 +68,7 @@ test##NAME (TYPE x01, TYPE x02, TYPE x03, TYPE x04, \ ...@@ -68,7 +68,7 @@ test##NAME (TYPE x01, TYPE x02, TYPE x03, TYPE x04, \
} }
#ifndef SKIP_COMPLEX_INT #ifndef SKIP_COMPLEX_INT
T(cc, _Complex char, (0,1)) T(cc, _Complex char, CINT (0, 1))
T(cs, _Complex short, (1,2)) T(cs, _Complex short, CINT (1, 2))
#endif #endif
T(cf, _Complex float, (6.0,7.0)) T(cf, _Complex float, CDBL (6.0, 7.0))
...@@ -84,12 +84,12 @@ testit##NAME (void) \ ...@@ -84,12 +84,12 @@ testit##NAME (void) \
} }
#ifndef SKIP_COMPLEX_INT #ifndef SKIP_COMPLEX_INT
T(ci, _Complex int, (2,3)) T(ci, _Complex int, CINT (2, 3))
T(cl, _Complex long, (3,4)) T(cl, _Complex long, CINT (3, 4))
T(cll, _Complex long long, (4,5)) T(cll, _Complex long long, CINT (4, 5))
#endif #endif
T(cd, _Complex double, (2.0,3.0)) T(cd, _Complex double, CDBL (2.0, 3.0))
T(cld, _Complex long double, (3.0,4.0)) T(cld, _Complex long double, CDBL (3.0, 4.0))
#undef T #undef T
......
...@@ -63,9 +63,9 @@ testva##NAME (int n, ...) \ ...@@ -63,9 +63,9 @@ testva##NAME (int n, ...) \
} }
#ifndef SKIP_COMPLEX_INT #ifndef SKIP_COMPLEX_INT
T(ci, _Complex int, (2,3)) T(ci, _Complex int, CINT (2, 3))
T(cl, _Complex long, (3,4)) T(cl, _Complex long, CINT (3, 4))
T(cll, _Complex long long, (4,5)) T(cll, _Complex long long, CINT (4, 5))
#endif #endif
T(cd, _Complex double, (2.0,3.0)) T(cd, _Complex double, CDBL (2.0, 3.0))
T(cld, _Complex long double, (3.0,4.0)) T(cld, _Complex long double, CDBL (3.0, 4.0))
...@@ -37,10 +37,10 @@ testit##NAME (void) \ ...@@ -37,10 +37,10 @@ testit##NAME (void) \
} }
#ifndef SKIP_COMPLEX_INT #ifndef SKIP_COMPLEX_INT
T(cc, _Complex char, (0,1)) T(cc, _Complex char, CINT (0, 1))
T(cs, _Complex short, (1,2)) T(cs, _Complex short, CINT (1 + 2))
#endif #endif
T(cf, _Complex float, (1.0,2.0)) T(cf, _Complex float, CDBL (1.0, 2.0))
#undef T #undef T
......
...@@ -38,7 +38,7 @@ test1##NAME (TYPE x01) \ ...@@ -38,7 +38,7 @@ test1##NAME (TYPE x01) \
} }
#ifndef SKIP_COMPLEX_INT #ifndef SKIP_COMPLEX_INT
T(cc, _Complex char, (0,1)) T(cc, _Complex char, CINT (0, 1))
T(cs, _Complex short, (1,2)) T(cs, _Complex short, CINT (1, 2))
#endif #endif
T(cf, _Complex float, (1.0,2.0)) T(cf, _Complex float, CDBL (1.0, 2.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