* Bug with _Complex_I on Solaris 10 and Open Solaris.
@ 2010-01-15 10:43 Dr. David Kirkby
0 siblings, 0 replies; only message in thread
From: Dr. David Kirkby @ 2010-01-15 10:43 UTC (permalink / raw)
To: gcc-help
See the code below. It compiles fine on Linux, and also with the Sun compiler on
both Open Solaris (x86) and Solaris 10 (SPARC).
However, it fails with every gcc version I've tried, and every Solaris system (3
tested).
This is what I expect, which is what I get on Linux
I've submitted bug reports for Solaris 10 (SPARC)
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42753
and Open Solaris (x86)
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42755
Can anyone suggest a workaround?
Dave
drkirkby@hawk:~$ cat simple_complex.c
#include "stdio.h"
#include "complex.h"
#if defined(_Complex_I)
#define CYTHON_CCOMPLEX 1
#else
#define CYTHON_CCOMPLEX 0
#endif
#if CYTHON_CCOMPLEX
typedef double _Complex __pyx_t_double_complex;
#else
typedef struct { double real, imag; } __pyx_t_double_complex;
#endif
#if CYTHON_CCOMPLEX
static __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x,
double y) {
return x + y*(__pyx_t_double_complex)_Complex_I;
//return 0;
}
#else
static __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x,
double y) {
__pyx_t_double_complex z;
z.real = x;
z.imag = y;
return z;
}
#endif
int main(int argc, char** argv) {
printf("CYTHON_CCOMPLEX %d\n", CYTHON_CCOMPLEX);
return 0;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-01-15 10:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-15 10:43 Bug with _Complex_I on Solaris 10 and Open Solaris Dr. David Kirkby
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).