Flang error in Cactus/src/util/PointerTo.F90
Flang 12.0.0 (the LLVM Fortran compiler) reports an error in Cactus/src/util/PointerTo.F90
. I can make the code compile when I disable the setting #define HAVE_CCTK_F_TYPE_STAR
in cctk_Config.h.
1621195405.31277 Compiling /home/eschnetter/src/CarpetX/Cactus/src/util/PointerTo.F90
current_wd=`pwd` ; cd /home/eschnetter/src/CarpetX/Cactus/configs/sim-llvm/scratch ; /home/eschnetter/src/CarpetX/Cactus/view-compil
ers-llvm/bin/flang -pipe -g -march=native -fcray-pointer -ffixed-line-length-none -O3 -ffp-contract=fast -fno-math-errno -fno-rounding-math -funsafe-math-optimizations -Wall -Wshadow -Wsurprising -I"/home/eschnetter/src/CarpetX/Cactus/view-llvm/include" -I"/home/
eschnetter/src/CarpetX/Cactus/view-llvm/include" -I"/home/eschnetter/src/CarpetX/spack/opt/spack/linux-ubuntu18.04-skylake_avx512/gc
c-10.3.0/openmpi-4.0.5-r5fts4e7cvxadfzjtlq4pjjuv7e5pcoq/include" -I"/home/eschnetter/src/CarpetX/Cactus/src" -I"/home/eschnetter/src/CarpetX/Cactus/src/include" -I"/home/eschnetter/src/CarpetX/Cactus/configs/sim-llvm/config-data" -I"/home/eschnetter/src/CarpetX/Ca
ctus/configs/sim-llvm/bindings/include" -I"/home/eschnetter/src/CarpetX/Cactus/src/include" -I"/home/eschnetter/src/CarpetX/Cactus/a
rrangements" -I"/home/eschnetter/src/CarpetX/Cactus/configs/sim-llvm/bindings/Configuration/Thorns" -I"/home/eschnetter/src/CarpetX/
Cactus/configs/sim-llvm/bindings/include/Cactus" -I"/home/eschnetter/src/CarpetX/Cactus/src/util" -I"/home/eschnetter/src/CarpetX/Cactus/configs/sim-llvm/bindings/include/Cactus" -c -o $current_wd/PointerTo.F90.o $current_wd/PointerTo.f90
/home/eschnetter/src/CarpetX/Cactus/configs/sim-llvm/build/Cactus/util/PointerTo.f90:409:22: error: Assumed type argument requires a
n explicit interface
address = transfer(c_loc(var), address)
^^^^^^^^^^
Comments (7)
-
-
- marked as minor
Downgrade to minor since the flang compiler is not used in any ET release.
-
reporter - attached config.log
<div class="preview-container wiki-content"><!-- loaded via ajax --></div> <div class="mask"></div> </div>
</div> </form>
-
reporter These are the relevant lines in
config.log
:configure:2105: checking whether the Fortran compiler (/home/eschnetter/src/CarpetX/Cactus/view-compilers-llvm/bin/flang ) supports TYPE(*) for CCTK_PointerTo configure:2130: /home/eschnetter/src/CarpetX/Cactus/view-compilers-llvm/bin/flang -c -pipe -g -march=native -fcray-pointer -ffixed-line-length-none conftest.f 1>&5 conftest.f:7:22: error: Assumed type argument requires an explicit interface b = transfer(c_loc(a), b) ^^^^^^^^ /home/eschnetter/src/CarpetX/Cactus/view-compilers-llvm/bin/f18: Semantic errors in conftest.f flang: in /home/eschnetter/src/CarpetX/Cactus/configs/sim-llvm-debug/config-data, f18 failed with exit status 0: /home/eschnetter/src/CarpetX/Cactus/view-compilers-llvm/bin/f18 -module-suffix .f18.mod -intrinsic-module-directory /home/eschnetter/src/CarpetX/Cactus/view-compilers-llvm/include/flang -c -pipe -g -march=native -fcray-pointer -ffixed-line-length-none conftest.f
That is, the error is reported, but somehow doesn’t make it back to the configure script.
-
- marked as major
ok, bumping this to major again since the error really should be reported.
-
uh
f18 failed with exit status 0
is not very great behaviour by flang. Looks like a bug in the f18 compiler to me, in that it does not set a non-zero exit code when finding this particular error. -
Looking into this might be a hard hackathon task (since it involves autoconf in some capacity).
- Log in to comment
Can you supply the file
configs/sim-llvm/config-data/config.log
, please?The configure test there uses:
which is (almost other than the
c_intptr_t
) the same code as infPointerTo.F90
:so I would have expected some configure test failing and the define not to be set.