This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libfortran/15234] [gfortran] libgfortran doesn't compile on Tru64 UNIX
- From: "ro at techfak dot uni-bielefeld dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 May 2004 19:10:43 -0000
- Subject: [Bug libfortran/15234] [gfortran] libgfortran doesn't compile on Tru64 UNIX
- References: <20040430190236.15234.ro@techfak.uni-bielefeld.de>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From ro at techfak dot uni-bielefeld dot de 2004-05-17 19:10 -------
Subject: Re: [gfortran] libgfortran doesn't compile on Tru64 UNIX
Bootstrap on alpha-dec-osf5.1b doesn't succeed either, but this time it's a
different failure:
/vol/gnu/src/gcc/gcc-dist/libgfortran/intrinsics/associated.c:26: error: parse error before numeric constant
This happens because <sys/types.h> has
#define TRUE 1
#define FALSE 0
so we get
enum { 0 = 0, 1 = 1 };
But even with the obvious patch below, I run into another error:
/vol/gnu/src/gcc/gcc-dist/libgfortran/generated/exp_c4.c:29: error: conflicting types for 'cabsf'
/vol/gcc/obj/gcc-3.5.0-20040517/5.1b-gcc/gcc/include/math.h:315: error: previous declaration of 'cabsf' was here
make[3]: *** [exp_c4.lo] Error 1
I.e.
GFC_REAL_4 cabsf (GFC_COMPLEX_4 z);
vs.
extern float cabsf ( float, float );
This is similar to PR libfortran/15266, which isn't fixed yet, either.
Rainer
Mon May 17 20:56:21 2004 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
* intrinsics/associated.c: Renamed FALSE, TRUE to GFC_FALSE,
GFC_TRUE.
Index: intrinsics/associated.c
===================================================================
RCS file: /cvs/gcc/gcc/libgfortran/intrinsics/associated.c,v
retrieving revision 1.2
diff -u -p -r1.2 associated.c
--- intrinsics/associated.c 13 May 2004 06:41:02 -0000 1.2
+++ intrinsics/associated.c 17 May 2004 18:59:06 -0000
@@ -23,7 +23,7 @@ Boston, MA 02111-1307, USA. */
#define associated prefix(associated)
-enum { FALSE = 0, TRUE = 1 };
+enum { GFC_FALSE = 0, GFC_TRUE = 1 };
GFC_LOGICAL_4
@@ -32,19 +32,19 @@ associated (const gfc_array_void *pointe
int n, rank;
if (GFC_DESCRIPTOR_DATA (pointer) != GFC_DESCRIPTOR_DATA (target))
- return FALSE;
+ return GFC_FALSE;
if (GFC_DESCRIPTOR_DTYPE (pointer) != GFC_DESCRIPTOR_DTYPE (target))
- return FALSE;
+ return GFC_FALSE;
rank = GFC_DESCRIPTOR_RANK (pointer);
for (n = 0; n < rank; n++)
{
if (pointer->dim[n].stride != target->dim[n].stride)
- return FALSE;
+ return GFC_FALSE;
if ((pointer->dim[n].ubound - pointer->dim[n].lbound)
!= (target->dim[n].ubound - target->dim[n].lbound))
- return FALSE;
+ return GFC_FALSE;
}
- return TRUE;
+ return GFC_TRUE;
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15234