#2403: compile failure with gfortran 10 when using CCTK_PointerTo
| Reporter: | Roland Haas |
| Status: | new |
| Milestone: | |
| Version: | |
| Type: | bug |
| Priority: | blocker |
| Component: |
Compiling with gfortran currently fails with (among others):
COMPILING CactusExamples/DemoInterp/src/Interp1D.F
/Users/jenkins/Cactus/configs/sim/build/DemoInterp/Interp1D.f:191:37:
183 | interp_coords(1) = CCTK_PointerTo(xcoord)
| 2
......
191 | out_arrays(2) = CCTK_PointerTo(compinterp1)
| 1
Error: Type mismatch between actual argument at (1) and actual argument at (2) (COMPLEX(8)/REAL(8)).
and there seems to be little we can do about this since CCTK_PointerTo does have to accept all kinds of arguments. The same issue should also affect things like eg MPI_Send which takes pointers to arbitrary arrays.
This can be turned into a warning by adding -fallow-argument-mismatch to F90FLAGS (see https://github.com/Unidata/netcdf-fortran/issues/212), though the option only exists for gfortran 10 so cannot be added to the default set of flags.
If the issue indeed also affects MPI I would expect that the next version of gfortran no longer produces the warning.
--
Ticket URL: https://bitbucket.org/einsteintoolkit/tickets/issues/2403/compile-failure-with-gfortran-10-when