smallest=""
for k in $possible_integer_kinds; do
echo " integer (kind=$k) :: i" > tmp$$.f90
+ echo " i = 1_$k" >> tmp$$.f90
echo " end" >> tmp$$.f90
if $compile -S tmp$$.f90 > /dev/null 2>&1; then
s=`expr 8 \* $k`
echo "#define GFC_DEFAULT_CHAR ${smallest}"
echo ""
+REAL_10_FOUND=
for k in $possible_real_kinds; do
echo " real (kind=$k) :: x" > tmp$$.f90
+ echo " x = 1.0_$k" >> tmp$$.f90
echo " end" >> tmp$$.f90
if $compile -S tmp$$.f90 > /dev/null 2>&1; then
case $k in
4) ctype="float" ; suffix="f" ;;
8) ctype="double" ; suffix="" ;;
- 10) ctype="long double" ; suffix="l" ;;
- 16) ctype="long double" ; suffix="l" ;;
+ 10) ctype="long double" ; suffix="l" ; REAL_10_FOUND=1 ;;
+ 16) ctype="long double"
+ suffix="l"
+ # Disable REAL(16) if it is just __float128
+ # until the library is fixed
+ if [ -n "$REAL_10_FOUND" ]; then
+ continue
+ fi
+ ;;
*) echo "$0: Unknown type" >&2 ; exit 1 ;;
esac
echo "#define HAVE_GFC_REAL_${k}"
echo "#define HAVE_GFC_COMPLEX_${k}"
echo "#define GFC_REAL_${k}_HUGE ${huge}${suffix}"
+ echo "#define GFC_REAL_${k}_LITERAL_SUFFIX ${suffix}"
+ if [ "x$suffix" = "x" ]; then
+ echo "#define GFC_REAL_${k}_LITERAL(X) (X)"
+ else
+ echo "#define GFC_REAL_${k}_LITERAL(X) (X ## ${suffix})"
+ fi
echo "#define GFC_REAL_${k}_DIGITS ${digits}"
echo "#define GFC_REAL_${k}_RADIX ${radix}"
echo ""