Hi,

I noticed that pgplot (pgplot-5.2-1028) is now compiled with g95 on  
intel machines. On my Macbook Pro, this didn't quite work, though.  
The error is as follows:

g95 -c -O /sw/src/fink.build/pgplot-5.2-1028/pgplot/src/pgcnsc.f
/sw/src/fink.build/pgplot-5.2-1028/pgplot/src/pgcnsc.f: In function  
'range_':
/sw/src/fink.build/pgplot-5.2-1028/pgplot/src/pgcnsc.f:42: internal  
compiler error: in gimplify_expr, at gimplify.c:4147
Please submit a full bug report,
with preprocessed source if appropriate.
See http://www.g95.org or mail [EMAIL PROTECTED] for instructions.
make: *** [pgcnsc.o] Error 1


The offending part of this file gcnsc.f is a "statement function"   
named RANGES (P,P1,P2). After I manually replaced that function by a  
"standard"  function definition, everything worked fine, and pgplot  
is now installed. If anyone is interested in this manual fix (which  
is obviously a work-around for a g95 bug), here's what I did:

Only the file pgplot/src/pgcnsc.f needs to be changed.

(1)
comment out the lines defining the statement function:
C      RANGE (P,P1,P2) = (P.GT.MIN(P1,P2)) .AND. (P.LE.MAX(P1,P2))
C     1                  .AND. (P1.NE.P2)

(2)
Change the line
       LOGICAL FLAGS(MAXEMX,MAXEMY,2)
to
       LOGICAL FLAGS(MAXEMX,MAXEMY,2), RANGE

(3)
At the end of the file, append the following:

       logical function range(P,P1,P2)
       real P, P1, P2
       range = ((P.GT.MIN(P1,P2)) .AND. (P.LE.MAX(P1,P2))
      1                  .AND. (P1.NE.P2))
       return
       end

I've tested some of the demos both under xwindow and under AquaTerm,  
and everything seems to work as expected. In particular, the contour  
line drawing (pgdemo3), which caused the compilation problem, works  
as well.

Jens





_______________________________________________
Fink-users mailing list
Fink-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fink-users

Reply via email to