Probably since the introduction of those two patches 2009-07-27 Tobias Burnus <bur...@net-b.de>
PR fortran/40863 * c99_functions.c: Define complex I, if not defined. Create prototypes for C99 functions to silence warnings. * gfortran.map: Add missing functions to GFORTRAN_C99_1.0 and new GFORTRAN_C99_1.1. 2009-07-25 Tobias Burnus <bur...@net-b.de> PR fortran/33197 * intrinsics/c99_functions.c (cacosf,cacos,cacosl,casinf, casin,casind,catanf,catan,catanl,cacoshf,cacosh,cacoshl, casinhf,casinh,casinhf,catanhf,catanh,catanhl): New functions. * c99_protos.h: Add prototypes for those. libgfortran fails to build on Solaris 10 and 11: /vol/gcc/src/gcc-dist/libgfortran/intrinsics/c99_functions.c: In function 'casinf': /vol/gcc/src/gcc-dist/libgfortran/intrinsics/c99_functions.c:1585:11: error: '_Imaginary_I' undeclared (first use in this function) /vol/gcc/src/gcc-dist/libgfortran/intrinsics/c99_functions.c:1585:11: error: (Each undeclared identifier is reported only once /vol/gcc/src/gcc-dist/libgfortran/intrinsics/c99_functions.c:1585:11: error: for each function it appears in.) and many more such errors. The problem fails to be twofold: <complex.h> states: /* * Compilation environments for Solaris must provide the _Imaginary datatype * and the compiler intrinsics _Complex_I and _Imaginary_I */ #define _Complex_I _Complex_I #define complex _Complex #define _Imaginary_I _Imaginary_I #define imaginary _Imaginary #undef I #define I _Imaginary_I but gcc obviously fails to do that. Maybe this can be worked around with fixincludes, but until this is fixed somehow, libgfortran needs to work around the problem. IRIX 6.5 is very likely affected as well: there, <complex.h> has #define complex _Complex #define _Complex_I ((float _Complex) (__I__)) #define imaginary _Imaginary // #define _Imaginary_I ((float _Imaginary) 1) #define _Imaginary_I __I__ #define I _Imaginary_I and __I__ seems to be a compiler builtin. -- Summary: [4.5 regression] libgfortran fails to build on Solaris 10+: '_Imaginary_I' undeclared Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libfortran AssignedTo: burnus at gcc dot gnu dot org ReportedBy: ro at gcc dot gnu dot org GCC host triplet: *-*-solaris2.1[01] http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41169