PR c/5675
[official-gcc.git] / libgfortran / mk-srk-inc.sh
blobd036d682679606f2a6b9ff1c98090e4c2c8f59e1
1 #!/bin/sh
3 compile="$1"
4 kinds=""
5 possible_kinds="4 8 10 16"
6 c=0
8 for k in $possible_kinds; do
9 echo " real (kind=$k) :: x" > tmp$$.f90
10 echo " end" >> tmp$$.f90
11 if $compile -c tmp$$.f90 > /dev/null 2>&1; then
12 kinds="$kinds $k"
13 c=`expr $c + 1`
15 rm -f tmp$$.*
16 done
18 echo " integer, parameter :: c = $c"
19 echo " type (real_info), parameter :: real_infos(c) = (/ &"
21 i=0
22 for k in $kinds; do
23 # echo -n is not portable
24 str=" real_info ($k, precision(0.0_$k), range(0.0_$k))"
25 i=`expr $i + 1`
26 if [ $i -lt $c ]; then
27 echo "$str, &"
28 else
29 echo "$str /)"
31 done
33 exit 0