Supporting BFLOAT16 in ISO_Fortran_env: not recommended
j3-fortran.org
j3-fortran.org
https://fortran-lang.discourse.group/t/supporting-bfloat16-i...
I look forward to trying it in my project ( http://www.libprima.net ), although LLVM Flang is not ready to use last time I tried.
As a side note, the Classic Flang ( https://github.com/flang-compiler/flang ) does not support kind = 3.
```
export CC=gcc
CFLAGS="-Wall -Wextra -Wpedantic -Werror"
export FC=gfortran
export FFLAGS='-Wall -Wextra -Wpedantic -Werror -fimplicit-none -frecursive -fcheck=all -fstack-check -Wno-function-elimination'
# Build
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=. -LAH -DCMAKE_C_FLAGS="${CFLAGS}" -DCMAKE_Fortran_FLAGS="${FFLAGS}" .
cmake --build . --target install
cmake --build . --target tests
# Test
ctest --output-on-failure -V -E stress
```
The flang-new driver doesn't support all of the options that you specified; I used "-pedantic -Werror -fimplicit-none", and observed no warnings.
I am particularly glad to hear that no flang-new raised no warning when compiling PRIMA. That is exactly what I wanted to achieve. PRIMA does not tolerate any warning. Each warning is regarded as a bug and gets fixed.
How should I install flang-new? Isn't compiling from the source the only way? I remember doing it once a few months ago, but the binary I got did not succeed in compiling PRIMA. Not sure what I missed. Maybe I should give it another go, especially for trying BFLOAT16!
Many thanks.