mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-11-23 19:03:59 +08:00
01349049e8
2010-06-25 Tobias Burnus <burnus@net-b.de> * intrinsic.h (gfc_check_selected_real_kind, gfc_simplify_selected_real_kind): Update prototypes. * intrinsic.c (add_functions): Add radix support to selected_real_kind. * check.c (gfc_check_selected_real_kind): Ditto. * simplify.c (gfc_simplify_selected_real_kind): Ditto. * trans-decl.c (gfc_build_intrinsic_function_decls): Change call from selected_real_kind to selected_real_kind2008. * intrinsic.texi (SELECTED_REAL_KIND): Update for radix. (PRECISION, RANGE, RADIX): Add cross @refs. 2010-06-25 Tobias Burnus <burnus@net-b.de> * intrinsics/selected_real_kind.f90 (_gfortran_selected_real_kind2008): Add function. (_gfortran_selected_real_kind): Stub which calls _gfortran_selected_real_kind2008. * gfortran.map (GFORTRAN_1.4): Add _gfortran_selected_real_kind2008. * mk-srk-inc.sh: Save also RADIX. 2010-06-25 Tobias Burnus <burnus@net-b.de> * selected_real_kind_2.f90: New. * selected_real_kind_3.f90: New. From-SVN: r161411
35 lines
653 B
Bash
Executable File
35 lines
653 B
Bash
Executable File
#!/bin/sh
|
|
|
|
compile="$1"
|
|
kinds=""
|
|
possible_kinds="4 8 10 16"
|
|
c=0
|
|
|
|
for k in $possible_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
|
|
kinds="$kinds $k"
|
|
c=`expr $c + 1`
|
|
fi
|
|
rm -f tmp$$.*
|
|
done
|
|
|
|
echo " integer, parameter :: c = $c"
|
|
echo " type (real_info), parameter :: real_infos(c) = (/ &"
|
|
|
|
i=0
|
|
for k in $kinds; do
|
|
# echo -n is not portable
|
|
str=" real_info ($k, precision(0.0_$k), range(0.0_$k), radix(0.0_$k))"
|
|
i=`expr $i + 1`
|
|
if [ $i -lt $c ]; then
|
|
echo "$str, &"
|
|
else
|
|
echo "$str /)"
|
|
fi
|
|
done
|
|
|
|
exit 0
|