]> gcc.gnu.org Git - gcc.git/blame - libgfortran/mk-srk-inc.sh
Daily bump.
[gcc.git] / libgfortran / mk-srk-inc.sh
CommitLineData
625be286
RH
1#!/bin/sh
2
2e764ae1
TB
3if test "$#" -ne 2; then
4 echo "Usage $0 real_kinds compile"
5 exit 1
6fi
7
8# Possible kinds must be listed in ascending order
9possible_real_kinds="$1"
10compile="$2"
11
625be286 12kinds=""
625be286
RH
13c=0
14
2e764ae1 15for k in $possible_real_kinds; do
625be286 16 echo " real (kind=$k) :: x" > tmp$$.f90
7666351c 17 echo " x = 1.0_$k" >> tmp$$.f90
625be286 18 echo " end" >> tmp$$.f90
4349e292 19 if $compile -S tmp$$.f90 > /dev/null 2>&1; then
625be286
RH
20 kinds="$kinds $k"
21 c=`expr $c + 1`
22 fi
23 rm -f tmp$$.*
24done
25
26echo " integer, parameter :: c = $c"
27echo " type (real_info), parameter :: real_infos(c) = (/ &"
28
29i=0
30for k in $kinds; do
130abd17 31 # echo -n is not portable
01349049 32 str=" real_info ($k, precision(0.0_$k), range(0.0_$k), radix(0.0_$k))"
625be286
RH
33 i=`expr $i + 1`
34 if [ $i -lt $c ]; then
130abd17 35 echo "$str, &"
625be286 36 else
130abd17 37 echo "$str /)"
625be286
RH
38 fi
39done
40
41exit 0
This page took 1.537742 seconds and 5 git commands to generate.