Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build failure with gfortran 10 #123

Open
opoplawski opened this issue Jan 28, 2020 · 1 comment
Open

Build failure with gfortran 10 #123

opoplawski opened this issue Jan 28, 2020 · 1 comment

Comments

@opoplawski
Copy link
Contributor

gcc/gfortran 10 has landed in Fedora Rawhide with some stricter type checking for fortran codes. The ncl package now fails to build with:

c1fm1b.f:35:33:
   33 |    52     CALL DC1F2KB(IDO,L1,NA,C,INC2,CH,2,WA(IW))
      |                                 2
   34 |           GO TO 120
   35 |    62     CALL DC1F2KB(IDO,L1,NA,CH,2,C,INC2,WA(IW))
      |                                 1
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(8)/COMPLEX(8)).
c1fm1b.f:39:33:
   37 |    53     CALL DC1F3KB(IDO,L1,NA,C,INC2,CH,2,WA(IW))
      |                                 2
   38 |           GO TO 120
   39 |    63     CALL DC1F3KB(IDO,L1,NA,CH,2,C,INC2,WA(IW))
      |                                 1
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(8)/COMPLEX(8)).
c1fm1b.f:43:33:
   41 |    54     CALL DC1F4KB(IDO,L1,NA,C,INC2,CH,2,WA(IW))
      |                                 2
   42 |           GO TO 120
   43 |    64     CALL DC1F4KB(IDO,L1,NA,CH,2,C,INC2,WA(IW))
      |                                 1
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(8)/COMPLEX(8)).
c1fm1b.f:47:33:
   45 |    55     CALL DC1F5KB(IDO,L1,NA,C,INC2,CH,2,WA(IW))
      |                                 2
   46 |           GO TO 120
   47 |    65     CALL DC1F5KB(IDO,L1,NA,CH,2,C,INC2,WA(IW))
      |                                 1
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(8)/COMPLEX(8)).
c1fm1b.f:51:40:
   49 |    56     CALL DC1FGKB(IDO,IP,L1,LID,NA,C,C,INC2,CH,CH,2,WA(IW))
      |                                        2
   50 |           GO TO 120
   51 |    66     CALL DC1FGKB(IDO,IP,L1,LID,NA,CH,CH,2,C,C,INC2,WA(IW))
      |                                        1
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(8)/COMPLEX(8)).

and

r1mach.f:167:27:
  167 |                CALL I1MCRA(SMALL, K, 16, 0, 0)
      |                           1
Error: Rank mismatch in argument 'a' at (1) (scalar and rank-1)
r1mach.f:168:27:
  168 |                CALL I1MCRA(LARGE, K, 32751, 16777215, 16777215)
      |                           1
Error: Rank mismatch in argument 'a' at (1) (scalar and rank-1)
r1mach.f:169:27:
  169 |                CALL I1MCRA(RIGHT, K, 15520, 0, 0)
      |                           1
Error: Rank mismatch in argument 'a' at (1) (scalar and rank-1)
r1mach.f:170:27:
  170 |                CALL I1MCRA(DIVER, K, 15536, 0, 0)
      |                           1
Error: Rank mismatch in argument 'a' at (1) (scalar and rank-1)
r1mach.f:171:27:
  171 |                CALL I1MCRA(LOG10, K, 16339, 4461392, 10451455)
      |                           1
Error: Rank mismatch in argument 'a' at (1) (scalar and rank-1)
cfwrit.f:41:34:
   39 |         CALL BINWRI(IUNIT, WRLEN, CHSTRT, IOS, STATUS)
      |                                  2
   40 |       ELSE IF (ITYP .EQ. 1) THEN
   41 |         CALL BINWRI(IUNIT, NWRDS, BUFFER, IOS, STATUS)
      |                                  1
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(4)/INTEGER(4)).
binput.f:246:32:
  226 |       CALL BINWRI(UNIT, LENDEV, DGISTR, IOS, STATUS)
      |                                2
......
  246 |       CALL BINWRI(UNIT, LENLIN, PLAVBL, IOS, STATUS)
      |                                1
Error: Type mismatch between actual argument at (1) and actual argument at (2) (LOGICAL(4)/INTEGER(4)).
binput.f:298:32:
  226 |       CALL BINWRI(UNIT, LENDEV, DGISTR, IOS, STATUS)
      |                                2
......
  298 |       CALL BINWRI(UNIT, LENBND, PLBTEC, IOS, STATUS)
      |                                1
Error: Rank mismatch between actual argument at (1) and actual argument at (2) (rank-1 and scalar)
pcffme.f:35:23:
   19 |       CALL GBYTES(IBFC,TYPFLG,0,16,0,1)
      |                       2
......
   35 |       CALL GBYTES(IBFC,CHRPNT,8*TABPNT,16,0,NUMCHR)
      |                       1
Error: Rank mismatch between actual argument at (1) and actual argument at (2) (scalar and rank-1)
stinit.f:322:25:
  322 |          CALL STCMAG(U,V,RDM,0)
      |                         1
Error: Rank mismatch in argument 'rm' at (1) (rank-2 and scalar)
gcelcd.f:42:20:
   35 |         CALL GOPDEC(MOPLEN,MWHCPR,1,IOS,STATUS)
      |                    2
......
   42 |         CALL GOPDEC(CLPDAT,MOPLEN,4,IOS,STATUS)
      |                    1
Error: Rank mismatch between actual argument at (1) and actual argument at (2) (scalar and rank-1)
g01ca.f:88:21:
   83 |         CALL GPUTPR (MPXPY, MVDCFW, 6, RERR)
      |                     2
......
   88 |         CALL GPUTPR (GDFCP,  MINTFW, 1, RERR)
      |                     1
Error: Rank mismatch between actual argument at (1) and actual argument at (2) (rank-1 and scalar)
g01ca.f:89:21:
   83 |         CALL GPUTPR (MPXPY, MVDCFW, 6, RERR)
      |                     2
......
   89 |         CALL GPUTPR (GNORUN, MEFW, 1, RERR)
      |                     1
Error: Rank mismatch between actual argument at (1) and actual argument at (2) (rank-1 and scalar)
g01ca.f:95:25:
   83 |         CALL GPUTPR (MPXPY, MVDCFW, 6, RERR)
      |                     2    
......
   95 |             CALL GPUTPR (GPAD, 8, 1, RERR)
      |                         1
Error: Rank mismatch between actual argument at (1) and actual argument at (2) (rank-1 and scalar)
g01ca.f:132:25:
   83 |         CALL GPUTPR (MPXPY, MVDCFW, 6, RERR)
      |                     2    
......
  132 |             CALL GPUTPR (GPAD, 8, 1, RERR)
      |                         1
Error: Rank mismatch between actual argument at (1) and actual argument at (2) (rank-1 and scalar)
g01ca.f:177:25:
   83 |         CALL GPUTPR (MPXPY, MVDCFW, 6, RERR)
      |                     2    
......
  177 |             CALL GPUTPR (GPAD, 8, 1, RERR)
      |                         1
Error: Rank mismatch between actual argument at (1) and actual argument at (2) (rank-1 and scalar)
gwica.f:87:21:
   82 |         CALL GWPTPR (WPXPY, MVDCFW, 6, RERR)
      |                     2
......
   87 |         CALL GWPTPR (GDFCP,  MINTFW, 1, RERR)
      |                     1
Error: Rank mismatch between actual argument at (1) and actual argument at (2) (rank-1 and scalar)
gwica.f:88:21:
   82 |         CALL GWPTPR (WPXPY, MVDCFW, 6, RERR)
      |                     2
......
   88 |         CALL GWPTPR (GNORUN, MEFW, 1, RERR)
      |                     1
Error: Rank mismatch between actual argument at (1) and actual argument at (2) (rank-1 and scalar)
gwica.f:94:27:
   82 |         CALL GWPTPR (WPXPY, MVDCFW, 6, RERR)
      |                     2      
......
   94 |               CALL GWPTPR (GPAD, 8, 1, RERR)
      |                           1
Error: Rank mismatch between actual argument at (1) and actual argument at (2) (rank-1 and scalar)
gwica.f:127:25:
   82 |         CALL GWPTPR (WPXPY, MVDCFW, 6, RERR)
      |                     2    
......
  127 |             CALL GWPTPR (GPAD, 8, 1, RERR)
      |                         1
Error: Rank mismatch between actual argument at (1) and actual argument at (2) (rank-1 and scalar)
gwica.f:168:25:
   82 |         CALL GWPTPR (WPXPY, MVDCFW, 6, RERR)
      |                     2    
......
  168 |             CALL GWPTPR (GPAD, 8, 1, RERR)
      |                         1
Error: Rank mismatch between actual argument at (1) and actual argument at (2) (rank-1 and scalar)
tsbyte.f:58:19:
   42 |           CALL SBYTES(ITEST,IONE,IBIT,NBITS,NSKIP,ITER)
      |                      2
......
   58 |        CALL SBYTES(ISCR,MASK0,IBIT,NBITS,NSKIP,ITER)
      |                   1
Error: Rank mismatch between actual argument at (1) and actual argument at (2) (scalar and rank-1)
tsbyte.f:79:19:
   42 |           CALL SBYTES(ITEST,IONE,IBIT,NBITS,NSKIP,ITER)
      |                      2
......
   79 |        CALL SBYTES(ISCR,ISCR(18),IBIT,NBITS,NSKIP,ITER)
      |                   1
Error: Rank mismatch between actual argument at (1) and actual argument at (2) (scalar and rank-1)
EzmapDemo.f:541:25:
  541 |             IAIC=IGETAI (IAMA,CFUX(.5),CFUY(.5),IAAI,IAGI,NGPS,NOGU,1)
      |                         1
Error: Rank mismatch in argument 'iama' at (1) (scalar and rank-1)
EzmapDemo.f:568:25:
  568 |             IAIC=IGETAI (IAMA,CFUX(.5),CFUY(.5),IAAI,IAGI,NGPS,NOGU,1)
      |                         1
Error: Rank mismatch in argument 'iama' at (1) (scalar and rank-1)
EzmapDemo.f:2779:35:
 2779 |                       CALL ARGTAI (IAMA,XPOS,YPOS,IAAI,IAGI,NGPS,NAIR,
      |                                   1
......
 4453 |         CALL ARGTAI (IAMA,XCOP,YCOP,IAAI,IAGI,MNAI,NOAI,1)
      |                     2              
Error: Rank mismatch between actual argument at (1) and actual argument at (2) (scalar and rank-1)
ezfft_dp.f:401:72:
  401 |       CALL DRFFTB1OLD(N,R,WSAVE,WSAVE(N+1),WSAVE(2*N+1))
      |                                                                        1
Error: Type mismatch in argument 'ifac' at (1); passed REAL(8) to INTEGER(4)
ezfft_dp.f:149:72:
  149 |       CALL DRFFTF1OLD(N,R,WSAVE,WSAVE(N+1),WSAVE(2*N+1))
      |                                                                        1
Error: Type mismatch in argument 'ifac' at (1); passed REAL(8) to INTEGER(4)
ezfft_dp.f:506:72:
  506 |       CALL DEZFFT1(N,WSAVE(2*N+1),WSAVE(3*N+1))
      |                                                                        1
Error: Type mismatch in argument 'ifac' at (1); passed REAL(8) to INTEGER(4)
ezfft_dp.f:613:72:
  613 |       CALL DRFFTI1OLD(N,WSAVE(N+1),WSAVE(2*N+1))
      |                                                                        1
Error: Type mismatch in argument 'ifac' at (1); passed REAL(8) to INTEGER(4)
@queenmedley
Copy link

You need to add compile option.
"-fallow-argument-mismatch"
https://gcc.gnu.org/gcc-10/changes.html (see Fortran section)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants