summaryrefslogtreecommitdiff
path: root/libgfortran/m4/iparm.m4
diff options
context:
space:
mode:
authorpbrook <pbrook@138bc75d-0d04-0410-961f-82ee72b054a4>2004-05-18 19:03:26 +0000
committerpbrook <pbrook@138bc75d-0d04-0410-961f-82ee72b054a4>2004-05-18 19:03:26 +0000
commitcdafa1f61b036a6e3fa3904da1307a8811665f38 (patch)
tree569bf2d4b68fde558de654650a2688d76b403819 /libgfortran/m4/iparm.m4
parent4ab8a95bc578ef3c0e732ae1f25bac63ff7652f7 (diff)
downloadgcc-cdafa1f61b036a6e3fa3904da1307a8811665f38.tar.gz
* Makefile.am: Remove references to types.m4.
* m4/iparm.m4: Merge with types.m4. * m4/types.m4: Remove. * m4/cshift1.m4, m4/dotprod.m4, m4/dotprodc.m4, m4/dotprodl.m4, m4/eoshift1.m4, m4/eoshift3.m4, m4/iforeach.m4, m4/ifunction.m4, m4/in_pack.m4, m4/in_unpack.m4, m4/iparm.m4, m4/matmul.m4, m4/matmull.m4, m4/maxloc0.m4, m4/maxloc1.m4, m4/maxval.m4, m4/minloc0.m4, m4/minloc1.m4, m4/minval.m4, m4/reshape.m4, m4/shape.m4, m4/specific.m4, m4/specific2.m4, m4/transpose.m4): Update to use new iparm.m4. * generated/*.c: Regenerate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@82003 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran/m4/iparm.m4')
-rw-r--r--libgfortran/m4/iparm.m442
1 files changed, 24 insertions, 18 deletions
diff --git a/libgfortran/m4/iparm.m4 b/libgfortran/m4/iparm.m4
index 6cbd7b247a8..7b1cdebefc8 100644
--- a/libgfortran/m4/iparm.m4
+++ b/libgfortran/m4/iparm.m4
@@ -3,24 +3,30 @@ dnl Works out all the function types from the filename.
dnl This file is part of the GNU Fortran 95 Runtime Library (libgfortran)
dnl Distributed under the GNU LGPL. See COPYING for details.
dnl M4 macro file to get type names from filenames
-include(`types.m4')
-define(type_letter, regexp(file, `_\([irlc]\)[^_]*$', \1))dnl
-define(type_kind, regexp(file, `_[irlc]\([0-9]*\)[^_]*$', \1))dnl
-define(rtype_kind, regexp(file, `_\([0-9]*\)_[irlc][0-9]*[^_]*$', `\1'))dnl
-define(type_code, type_letter`'type_kind)dnl
-define(type_name, get_typename(type_letter,type_kind))dnl
-define(atype, get_arraytype(type_letter,type_kind))dnl
-ifelse(rtype_kind,,
-`define(rtype_letter,type_letter)dnl
-define(rtype_name, type_name)dnl
-define(rtype_code, type_code)dnl
-define(rtype, atype)dnl
+define(get_typename2, `GFC_$1_$2')dnl
+define(get_typename, `get_typename2(ifelse($1,i,INTEGER,ifelse($1,r,REAL,ifelse($1,l,LOGICAL,ifelse($1,c,COMPLEX,unknown)))),`$2')')dnl
+define(get_arraytype, `gfc_array_$1$2')dnl
+define(define_type, `dnl
+ifelse(regexp($2,`^[0-9]'),-1,`dnl
+define($1_letter, substr($2, 0, 1))dnl
+define($1_kind, substr($2, 1))dnl
+',`dnl
+define($1_letter,i)dnl
+define($1_kind,$2)dnl
+')dnl
+define($1_code,$1_letter`'$1_kind)dnl
+define($1,get_arraytype($1_letter,$1_kind))dnl
+define($1_name, get_typename($1_letter, $1_kind))')dnl
+dnl
+define_type(atype, regexp(file, `_\(.?[0-9]*\)\.c$', `\1'))dnl
+define(rtype_tmp, regexp(file, `_\(.?[0-9]*\)_[^_]*\.c$', `\1'))dnl
+ifelse(rtype_tmp,,`dnl
+define_type(rtype, atype_code)dnl
define(rtype_qual,`')dnl
-',
-`define(rtype_letter,i)dnl
-define(rtype_name, get_typename(rtype_letter,rtype_kind))dnl
-define(rtype, get_arraytype(rtype_letter,rtype_kind))dnl
+',`dnl
+define_type(rtype, rtype_tmp)dnl
define(rtype_qual,`_'rtype_kind)dnl
')dnl
-define(type_max, type_name`_HUGE')dnl
-define(type_min, `-'type_max)dnl
+define(atype_max, atype_name`_HUGE')dnl
+define(atype_min, `-'atype_max)dnl
+define(name, regexp(regexp(file, `[^/]*$', `\&'), `^\([^_]*\)_', `\1'))dnl