aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorFrancois-Xavier Coudert <fxcoudert@gcc.gnu.org>2007-04-12 20:59:43 +0000
committerFrançois-Xavier Coudert <fxcoudert@gcc.gnu.org>2007-04-12 20:59:43 +0000
commit1d6657b0c0ee30abb4379edab4e9d208f56ad68e (patch)
tree6b73a00c7984ce14cd0f3f9f7abe58629dda637e /gcc
parentb5a31c9b43237577337b3ab4f27f9f43c4316ec6 (diff)
downloadgcc-1d6657b0c0ee30abb4379edab4e9d208f56ad68e.zip
gcc-1d6657b0c0ee30abb4379edab4e9d208f56ad68e.tar.gz
gcc-1d6657b0c0ee30abb4379edab4e9d208f56ad68e.tar.bz2
c_by_val.c: Use GCC extensions instead of including <complex.h>.
* gfortran.dg/c_by_val.c: Use GCC extensions instead of including <complex.h>. From-SVN: r123768
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gfortran.dg/c_by_val.c14
2 files changed, 14 insertions, 5 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 9f48f14..269cc6f 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2007-04-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
+
+ * gfortran.dg/c_by_val.c: Use GCC extensions instead of including
+ <complex.h>.
+
2007-04-12 Tobias Schlüter <tobi@gcc.gnu.org>
PR fortran/31250
diff --git a/gcc/testsuite/gfortran.dg/c_by_val.c b/gcc/testsuite/gfortran.dg/c_by_val.c
index 9835769..6176686 100644
--- a/gcc/testsuite/gfortran.dg/c_by_val.c
+++ b/gcc/testsuite/gfortran.dg/c_by_val.c
@@ -1,14 +1,18 @@
/* Passing from fortran to C by value, using %VAL. */
#include <inttypes.h>
-#include <complex.h>
+
+/* We used to #include <complex.h>, but this fails for some platforms
+ (like cygwin) who don't have it yet. */
+#define complex __complex__
+#define _Complex_I (1.0iF)
extern void f_to_f__ (float*, float, float*, float**);
extern void f_to_f8__ (double*, double, double*, double**);
extern void i_to_i__ (int*, int, int*, int**);
extern void i_to_i8__ (int64_t*, int64_t, int64_t*, int64_t**);
-extern void c_to_c__ (float _Complex*, float _Complex, float _Complex*, float _Complex**);
-extern void c_to_c8__ (double _Complex*, double _Complex, double _Complex*, double _Complex**);
+extern void c_to_c__ (complex float*, complex float, complex float*, complex float**);
+extern void c_to_c8__ (complex double*, complex double, complex double*, complex double**);
extern void abort (void);
void
@@ -52,7 +56,7 @@ i_to_i8__(int64_t *retval, int64_t i1, int64_t *i2, int64_t **i3)
}
void
-c_to_c__(float _Complex *retval, float _Complex c1, float _Complex *c2, float _Complex **c3)
+c_to_c__(complex float *retval, complex float c1, complex float *c2, complex float **c3)
{
if ( c1 != *c2 ) abort();
if ( c1 != *(*c3) ) abort();
@@ -62,7 +66,7 @@ c_to_c__(float _Complex *retval, float _Complex c1, float _Complex *c2, float _C
}
void
-c_to_c8__(double _Complex *retval, double _Complex c1, double _Complex *c2, double _Complex **c3)
+c_to_c8__(complex double *retval, complex double c1, complex double *c2, complex double **c3)
{
if ( c1 != *c2 ) abort();
if ( c1 != *(*c3) ) abort();