OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [libgfortran/] [mk-sik-inc.sh] - Blame information for rev 860

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 733 jeremybenn
#!/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 "  x = 1_$k" >> tmp$$.f90
11
  echo "  end" >> tmp$$.f90
12
  if $compile -S tmp$$.f90 > /dev/null 2>&1; then
13
    kinds="$kinds $k"
14
    c=`expr $c + 1`
15
  fi
16
  rm -f tmp$$.*
17
done
18
 
19
echo "  integer, parameter :: c = $c"
20
echo "  type (int_info), parameter :: int_infos(c) = (/ &"
21
 
22
i=0
23
for k in $kinds; do
24
  # echo -n is not portable
25
  str="    int_info ($k, range(0_$k))"
26
  i=`expr $i + 1`
27
  if [ $i -lt $c ]; then
28
    echo "$str, &"
29
  else
30
    echo "$str /)"
31
  fi
32
done
33
 
34
exit 0

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.