]> git.ipfire.org Git - thirdparty/gcc.git/blame - libgfortran/mk-srk-inc.sh
i386: Add clear_ratio to processor_costs
[thirdparty/gcc.git] / libgfortran / mk-srk-inc.sh
CommitLineData
5d4b6e9c 1#!/bin/sh
2
3compile="$1"
4kinds=""
5possible_kinds="4 8 10 16"
6c=0
7
8for k in $possible_kinds; do
9 echo " real (kind=$k) :: x" > tmp$$.f90
f77b95e7 10 echo " x = 1.0_$k" >> tmp$$.f90
5d4b6e9c 11 echo " end" >> tmp$$.f90
bd978a47 12 if $compile -S tmp$$.f90 > /dev/null 2>&1; then
5d4b6e9c 13 kinds="$kinds $k"
14 c=`expr $c + 1`
15 fi
16 rm -f tmp$$.*
17done
18
19echo " integer, parameter :: c = $c"
20echo " type (real_info), parameter :: real_infos(c) = (/ &"
21
22i=0
23for k in $kinds; do
6da9c1a2 24 # echo -n is not portable
1011a9ca 25 str=" real_info ($k, precision(0.0_$k), range(0.0_$k), radix(0.0_$k))"
5d4b6e9c 26 i=`expr $i + 1`
27 if [ $i -lt $c ]; then
6da9c1a2 28 echo "$str, &"
5d4b6e9c 29 else
6da9c1a2 30 echo "$str /)"
5d4b6e9c 31 fi
32done
33
34exit 0