]> git.ipfire.org Git - thirdparty/gcc.git/blob - libgfortran/mk-sik-inc.sh
2008-01-16 Steven Bosscher <steven@gcc.gnu.org>
[thirdparty/gcc.git] / libgfortran / mk-sik-inc.sh
1 #!/bin/sh
2
3 compile="$1"
4 kinds=""
5 possible_kinds="1 2 4 8 16"
6 c=0
7
8 for k in $possible_kinds; do
9 echo " integer (kind=$k) :: x" > tmp$$.f90
10 echo " end" >> tmp$$.f90
11 if $compile -S tmp$$.f90 > /dev/null 2>&1; then
12 kinds="$kinds $k"
13 c=`expr $c + 1`
14 fi
15 rm -f tmp$$.*
16 done
17
18 echo " integer, parameter :: c = $c"
19 echo " type (int_info), parameter :: int_infos(c) = (/ &"
20
21 i=0
22 for k in $kinds; do
23 # echo -n is not portable
24 str=" int_info ($k, range(0_$k))"
25 i=`expr $i + 1`
26 if [ $i -lt $c ]; then
27 echo "$str, &"
28 else
29 echo "$str /)"
30 fi
31 done
32
33 exit 0