summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2004-06-18 23:18:04 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2004-06-18 23:18:04 +0000
commit3f64b52655c2300a20fbf2d8fce9d097c70e8ee9 (patch)
tree56f332ef132620677079e02c58e64b807ca1df98 /gcc
parent3b3a787af56c561b8d789cc6d8b107ee89535205 (diff)
downloadgcc-3f64b52655c2300a20fbf2d8fce9d097c70e8ee9.tar.gz
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@83370 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog12
-rw-r--r--gcc/testsuite/gcc.dg/compat/compat-common.h9
-rw-r--r--gcc/testsuite/gcc.dg/compat/scalar-by-value-3_x.c10
-rw-r--r--gcc/testsuite/gcc.dg/compat/scalar-by-value-3_y.c10
-rw-r--r--gcc/testsuite/gcc.dg/compat/scalar-by-value-4_x.c6
-rw-r--r--gcc/testsuite/gcc.dg/compat/scalar-by-value-4_y.c6
-rw-r--r--gcc/testsuite/gcc.dg/compat/scalar-return-3_x.c10
-rw-r--r--gcc/testsuite/gcc.dg/compat/scalar-return-3_y.c10
-rw-r--r--gcc/testsuite/gcc.dg/compat/scalar-return-4_x.c6
-rw-r--r--gcc/testsuite/gcc.dg/compat/scalar-return-4_y.c6
10 files changed, 53 insertions, 32 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index f7e42f1587d..c948f43c2cb 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,5 +1,17 @@
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.
* g++.dg/opt/range-test-1.C: New test.
diff --git a/gcc/testsuite/gcc.dg/compat/compat-common.h b/gcc/testsuite/gcc.dg/compat/compat-common.h
index 95b945fae41..a109c1ed1f2 100644
--- a/gcc/testsuite/gcc.dg/compat/compat-common.h
+++ b/gcc/testsuite/gcc.dg/compat/compat-common.h
@@ -24,5 +24,14 @@
#define DEBUG_FINI
#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 int fails;
diff --git a/gcc/testsuite/gcc.dg/compat/scalar-by-value-3_x.c b/gcc/testsuite/gcc.dg/compat/scalar-by-value-3_x.c
index 6d20fef1d32..6f550b4baec 100644
--- a/gcc/testsuite/gcc.dg/compat/scalar-by-value-3_x.c
+++ b/gcc/testsuite/gcc.dg/compat/scalar-by-value-3_x.c
@@ -145,12 +145,12 @@ testit##NAME (void) \
}
#ifndef SKIP_COMPLEX_INT
-T(ci, _Complex int, (2,3))
-T(cl, _Complex long, (3,4))
-T(cll, _Complex long long, (5,6))
+T(ci, _Complex int, CINT (2, 3))
+T(cl, _Complex long, CINT (3, 4))
+T(cll, _Complex long long, CINT (5, 6))
#endif
-T(cd, _Complex double, (7.0,8.0))
-T(cld, _Complex long double, (8.0,9.0))
+T(cd, _Complex double, CDBL (7.0, 8.0))
+T(cld, _Complex long double, CDBL (8.0, 9.0))
#undef T
diff --git a/gcc/testsuite/gcc.dg/compat/scalar-by-value-3_y.c b/gcc/testsuite/gcc.dg/compat/scalar-by-value-3_y.c
index 7c6822af993..1e12cc92c62 100644
--- a/gcc/testsuite/gcc.dg/compat/scalar-by-value-3_y.c
+++ b/gcc/testsuite/gcc.dg/compat/scalar-by-value-3_y.c
@@ -85,9 +85,9 @@ testva##NAME (int n, ...) \
}
#ifndef SKIP_COMPLEX_INT
-T(ci, _Complex int, (2,3))
-T(cl, _Complex long, (3,4))
-T(cll, _Complex long long, (5,6))
+T(ci, _Complex int, CINT (2, 3))
+T(cl, _Complex long, CINT (3, 4))
+T(cll, _Complex long long, CINT (5, 6))
#endif
-T(cd, _Complex double, (7.0,8.0))
-T(cld, _Complex long double, (8.0,9.0))
+T(cd, _Complex double, CDBL (7.0, 8.0))
+T(cld, _Complex long double, CDBL (8.0, 9.0))
diff --git a/gcc/testsuite/gcc.dg/compat/scalar-by-value-4_x.c b/gcc/testsuite/gcc.dg/compat/scalar-by-value-4_x.c
index 20f58d20ea7..adc8ece5690 100644
--- a/gcc/testsuite/gcc.dg/compat/scalar-by-value-4_x.c
+++ b/gcc/testsuite/gcc.dg/compat/scalar-by-value-4_x.c
@@ -69,10 +69,10 @@ testit##NAME (void) \
}
#ifndef SKIP_COMPLEX_INT
-T(cc, _Complex char, (0,1))
-T(cs, _Complex short, (1,2))
+T(cc, _Complex char, CINT (0, 1))
+T(cs, _Complex short, CINT (1, 2))
#endif
-T(cf, _Complex float, (6.0,7.0))
+T(cf, _Complex float, CDBL (6.0, 7.0))
#undef T
diff --git a/gcc/testsuite/gcc.dg/compat/scalar-by-value-4_y.c b/gcc/testsuite/gcc.dg/compat/scalar-by-value-4_y.c
index 8205b825989..0db32ab53c9 100644
--- a/gcc/testsuite/gcc.dg/compat/scalar-by-value-4_y.c
+++ b/gcc/testsuite/gcc.dg/compat/scalar-by-value-4_y.c
@@ -68,7 +68,7 @@ test##NAME (TYPE x01, TYPE x02, TYPE x03, TYPE x04, \
}
#ifndef SKIP_COMPLEX_INT
-T(cc, _Complex char, (0,1))
-T(cs, _Complex short, (1,2))
+T(cc, _Complex char, CINT (0, 1))
+T(cs, _Complex short, CINT (1, 2))
#endif
-T(cf, _Complex float, (6.0,7.0))
+T(cf, _Complex float, CDBL (6.0, 7.0))
diff --git a/gcc/testsuite/gcc.dg/compat/scalar-return-3_x.c b/gcc/testsuite/gcc.dg/compat/scalar-return-3_x.c
index 34ced255180..c153f6f19df 100644
--- a/gcc/testsuite/gcc.dg/compat/scalar-return-3_x.c
+++ b/gcc/testsuite/gcc.dg/compat/scalar-return-3_x.c
@@ -84,12 +84,12 @@ testit##NAME (void) \
}
#ifndef SKIP_COMPLEX_INT
-T(ci, _Complex int, (2,3))
-T(cl, _Complex long, (3,4))
-T(cll, _Complex long long, (4,5))
+T(ci, _Complex int, CINT (2, 3))
+T(cl, _Complex long, CINT (3, 4))
+T(cll, _Complex long long, CINT (4, 5))
#endif
-T(cd, _Complex double, (2.0,3.0))
-T(cld, _Complex long double, (3.0,4.0))
+T(cd, _Complex double, CDBL (2.0, 3.0))
+T(cld, _Complex long double, CDBL (3.0, 4.0))
#undef T
diff --git a/gcc/testsuite/gcc.dg/compat/scalar-return-3_y.c b/gcc/testsuite/gcc.dg/compat/scalar-return-3_y.c
index 5894fd39706..31dddd0a033 100644
--- a/gcc/testsuite/gcc.dg/compat/scalar-return-3_y.c
+++ b/gcc/testsuite/gcc.dg/compat/scalar-return-3_y.c
@@ -63,9 +63,9 @@ testva##NAME (int n, ...) \
}
#ifndef SKIP_COMPLEX_INT
-T(ci, _Complex int, (2,3))
-T(cl, _Complex long, (3,4))
-T(cll, _Complex long long, (4,5))
+T(ci, _Complex int, CINT (2, 3))
+T(cl, _Complex long, CINT (3, 4))
+T(cll, _Complex long long, CINT (4, 5))
#endif
-T(cd, _Complex double, (2.0,3.0))
-T(cld, _Complex long double, (3.0,4.0))
+T(cd, _Complex double, CDBL (2.0, 3.0))
+T(cld, _Complex long double, CDBL (3.0, 4.0))
diff --git a/gcc/testsuite/gcc.dg/compat/scalar-return-4_x.c b/gcc/testsuite/gcc.dg/compat/scalar-return-4_x.c
index 232b0a700ad..0ea764958d0 100644
--- a/gcc/testsuite/gcc.dg/compat/scalar-return-4_x.c
+++ b/gcc/testsuite/gcc.dg/compat/scalar-return-4_x.c
@@ -37,10 +37,10 @@ testit##NAME (void) \
}
#ifndef SKIP_COMPLEX_INT
-T(cc, _Complex char, (0,1))
-T(cs, _Complex short, (1,2))
+T(cc, _Complex char, CINT (0, 1))
+T(cs, _Complex short, CINT (1 + 2))
#endif
-T(cf, _Complex float, (1.0,2.0))
+T(cf, _Complex float, CDBL (1.0, 2.0))
#undef T
diff --git a/gcc/testsuite/gcc.dg/compat/scalar-return-4_y.c b/gcc/testsuite/gcc.dg/compat/scalar-return-4_y.c
index caaa031b3b5..175fb6ccb50 100644
--- a/gcc/testsuite/gcc.dg/compat/scalar-return-4_y.c
+++ b/gcc/testsuite/gcc.dg/compat/scalar-return-4_y.c
@@ -38,7 +38,7 @@ test1##NAME (TYPE x01) \
}
#ifndef SKIP_COMPLEX_INT
-T(cc, _Complex char, (0,1))
-T(cs, _Complex short, (1,2))
+T(cc, _Complex char, CINT (0, 1))
+T(cs, _Complex short, CINT (1, 2))
#endif
-T(cf, _Complex float, (1.0,2.0))
+T(cf, _Complex float, CDBL (1.0, 2.0))