public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libfortran/41169]  New: [4.5 regression] libgfortran fails to build on Solaris 10+: '_Imaginary_I' undeclared
@ 2009-08-25 20:08 ro at gcc dot gnu dot org
  2009-08-25 20:47 ` [Bug libfortran/41169] " burnus at gcc dot gnu dot org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: ro at gcc dot gnu dot org @ 2009-08-25 20:08 UTC (permalink / raw)
  To: gcc-bugs

Probably since the introduction of those two patches

2009-07-27  Tobias Burnus  <burnus@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  <burnus@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


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2010-06-02 16:50 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-25 20:08 [Bug libfortran/41169] New: [4.5 regression] libgfortran fails to build on Solaris 10+: '_Imaginary_I' undeclared ro at gcc dot gnu dot org
2009-08-25 20:47 ` [Bug libfortran/41169] " burnus at gcc dot gnu dot org
2009-08-25 21:32 ` dje at gcc dot gnu dot org
2009-08-26  8:40 ` rguenth at gcc dot gnu dot org
2009-08-26 17:44 ` ro at gcc dot gnu dot org
2009-08-26 17:51 ` ro at techfak dot uni-bielefeld dot de
2009-08-26 18:59 ` joseph at codesourcery dot com
2009-08-27 16:26 ` ro at techfak dot uni-bielefeld dot de
2009-08-27 16:39 ` joseph at codesourcery dot com
2009-09-02 14:59 ` ro at gcc dot gnu dot org
2009-09-02 15:01 ` ro at gcc dot gnu dot org
2010-06-02 16:50 ` ro at gcc dot gnu dot org

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).