diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-08-30 21:34:37 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-08-30 21:34:37 +0000 |
commit | 5d4b6e9c06cae8242813f303f804f31222500c65 (patch) | |
tree | 02cd41f693c2602a26a17ae6a8a57ac30f5141fa /libgfortran/mk-sik-inc.sh | |
parent | dfd033af4bae5f6a98854d83bb4f6bdbc7dc933f (diff) | |
download | gcc-5d4b6e9c06cae8242813f303f804f31222500c65.tar.gz |
* Makefile.am (gfor_helper_src): Split selected_kind.f90.
(gfor_built_src): Add selected_int_kind.inc selected_real_kind.inc.
(selected_int_kind.inc selected_real_kind.inc): New rules.
* Makefile.in: Regenerate.
* mk-sik-inc.sh, mk-srk-inc.sh: New files.
* intrinsics/selected_int_kind.f90: Split from selected_kind.f90,
include table of detected kinds.
* intrinsics/selected_real_kind.f90: Similarly.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@86801 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran/mk-sik-inc.sh')
-rwxr-xr-x | libgfortran/mk-sik-inc.sh | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/libgfortran/mk-sik-inc.sh b/libgfortran/mk-sik-inc.sh new file mode 100755 index 00000000000..536eda70c88 --- /dev/null +++ b/libgfortran/mk-sik-inc.sh @@ -0,0 +1,32 @@ +#!/bin/sh + +compile="$1" +kinds="" +possible_kinds="1 2 4 8 16" +c=0 + +for k in $possible_kinds; do + echo " integer (kind=$k) :: x" > tmp$$.f90 + echo " end" >> tmp$$.f90 + if $compile -c 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 (int_info), parameter :: int_infos(c) = (/ &" + +i=0 +for k in $kinds; do + echo -n " int_info ($k, range(0_$k))" + i=`expr $i + 1` + if [ $i -lt $c ]; then + echo ", &" + else + echo " /)" + fi +done + +exit 0 |