re PR fortran/31562 (FAIL: gfortran.dg/value_4.f90 -O0 execution test)
2007-04-12 Tobias Burnus <burnus@net-b.de> PR fortran/31562 * gfortran.dg/value_4.c: Use GNU extensions for complex instead of a struct. From-SVN: r123780
This commit is contained in:
parent
6725add54e
commit
4026df75ea
|
@ -1,3 +1,9 @@
|
||||||
|
2007-04-12 Tobias Burnus <burnus@net-b.de>
|
||||||
|
|
||||||
|
PR fortran/31562
|
||||||
|
* gfortran.dg/value_4.c: Use GNU extensions for complex
|
||||||
|
instead of a struct.
|
||||||
|
|
||||||
2007-04-13 Richard Guenther <rguenther@suse.de>
|
2007-04-13 Richard Guenther <rguenther@suse.de>
|
||||||
|
|
||||||
PR tree-optimization/21258
|
PR tree-optimization/21258
|
||||||
|
|
|
@ -3,10 +3,14 @@
|
||||||
|
|
||||||
Contributed by Paul Thomas <pault@gcc.gnu.org> */
|
Contributed by Paul Thomas <pault@gcc.gnu.org> */
|
||||||
|
|
||||||
typedef struct { float r, i; } complex;
|
/* 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 float *f_to_f__ (float, float*);
|
extern float *f_to_f__ (float, float*);
|
||||||
extern int *i_to_i__ (int, int*);
|
extern int *i_to_i__ (int, int*);
|
||||||
extern void c_to_c__ (complex*, complex, complex*);
|
extern void c_to_c__ (complex float*, complex float, complex float*);
|
||||||
extern void abort (void);
|
extern void abort (void);
|
||||||
|
|
||||||
/* In f_to_f and i_to_i we return the second argument, so that we do
|
/* In f_to_f and i_to_i we return the second argument, so that we do
|
||||||
|
@ -35,14 +39,11 @@ i_to_i__(int i1, int *i2)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
c_to_c__(complex *retval, complex c1, complex *c2)
|
c_to_c__(complex float *retval, complex float c1, complex float *c2)
|
||||||
{
|
{
|
||||||
if ( c1.r != c2->r ) abort();
|
if ( c1 != *c2 ) abort();
|
||||||
if ( c1.i != c2->i ) abort();
|
c1 = 0.0 + 0.0 * _Complex_I;
|
||||||
c1.r = 0.0;
|
*retval = *c2 * 4.0;
|
||||||
c1.i = 0.0;
|
|
||||||
retval->r = c2->r * 4.0;
|
|
||||||
retval->i = c2->i * 4.0;
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue