diff options
Diffstat (limited to 'libgfortran/m4')
-rw-r--r-- | libgfortran/m4/cshift1.m4 | 14 | ||||
-rw-r--r-- | libgfortran/m4/dotprod.m4 | 7 | ||||
-rw-r--r-- | libgfortran/m4/dotprodc.m4 | 7 | ||||
-rw-r--r-- | libgfortran/m4/dotprodl.m4 | 6 | ||||
-rw-r--r-- | libgfortran/m4/eoshift1.m4 | 16 | ||||
-rw-r--r-- | libgfortran/m4/eoshift3.m4 | 16 | ||||
-rw-r--r-- | libgfortran/m4/iforeach.m4 | 8 | ||||
-rw-r--r-- | libgfortran/m4/ifunction.m4 | 14 | ||||
-rw-r--r-- | libgfortran/m4/in_pack.m4 | 8 | ||||
-rw-r--r-- | libgfortran/m4/in_unpack.m4 | 7 | ||||
-rw-r--r-- | libgfortran/m4/iparm.m4 | 42 | ||||
-rw-r--r-- | libgfortran/m4/matmul.m4 | 7 | ||||
-rw-r--r-- | libgfortran/m4/matmull.m4 | 6 | ||||
-rw-r--r-- | libgfortran/m4/maxloc0.m4 | 8 | ||||
-rw-r--r-- | libgfortran/m4/maxloc1.m4 | 8 | ||||
-rw-r--r-- | libgfortran/m4/maxval.m4 | 8 | ||||
-rw-r--r-- | libgfortran/m4/minloc0.m4 | 8 | ||||
-rw-r--r-- | libgfortran/m4/minloc1.m4 | 8 | ||||
-rw-r--r-- | libgfortran/m4/minval.m4 | 8 | ||||
-rw-r--r-- | libgfortran/m4/reshape.m4 | 7 | ||||
-rw-r--r-- | libgfortran/m4/shape.m4 | 6 | ||||
-rw-r--r-- | libgfortran/m4/specific.m4 | 14 | ||||
-rw-r--r-- | libgfortran/m4/specific2.m4 | 14 | ||||
-rw-r--r-- | libgfortran/m4/transpose.m4 | 7 |
24 files changed, 100 insertions, 154 deletions
diff --git a/libgfortran/m4/cshift1.m4 b/libgfortran/m4/cshift1.m4 index 382537b..46ae7ce 100644 --- a/libgfortran/m4/cshift1.m4 +++ b/libgfortran/m4/cshift1.m4 @@ -24,15 +24,11 @@ Boston, MA 02111-1307, USA. */ #include <assert.h> #include <string.h> #include "libgfortran.h"' -include(types.m4)dnl -define(htype_kind, regexp(file, `_\([0-9]+\)\.', `\1'))dnl -define(htype_code,`i'rtype_name)dnl -define(htype,get_arraytype(i,htype_kind))dnl -define(htype_name, get_typename(i,htype_kind))dnl +include(iparm.m4)dnl void -`__cshift1_'htype_kind (const gfc_array_char * ret, const gfc_array_char * array, - const htype * h, const htype_name * pwhich) +`__cshift1_'atype_kind (const gfc_array_char * ret, const gfc_array_char * array, + const atype * h, const atype_name * pwhich) { /* r.* indicates the return array. */ index_type rstride[GFC_MAX_DIMENSIONS - 1]; @@ -49,7 +45,7 @@ void ` /* h.* indicates the shift array. */' index_type hstride[GFC_MAX_DIMENSIONS - 1]; index_type hstride0; - const htype_name *hptr; + const atype_name *hptr; index_type count[GFC_MAX_DIMENSIONS - 1]; index_type extent[GFC_MAX_DIMENSIONS - 1]; @@ -58,7 +54,7 @@ void index_type len; index_type n; int which; - htype_name sh; + atype_name sh; if (pwhich) which = *pwhich - 1; diff --git a/libgfortran/m4/dotprod.m4 b/libgfortran/m4/dotprod.m4 index 051475f..bde4c20 100644 --- a/libgfortran/m4/dotprod.m4 +++ b/libgfortran/m4/dotprod.m4 @@ -23,12 +23,7 @@ Boston, MA 02111-1307, USA. */ #include <stdlib.h> #include <assert.h> #include "libgfortran.h"' -include(types.m4)dnl -define(rtype_code, regexp(file, `_\([ir][0-9]+\)\.', `\1'))dnl -define(rtype_letter,substr(rtype_code, 0, 1))dnl -define(rtype_kind, substr(rtype_code, 1))dnl -define(rtype,get_arraytype(rtype_letter,rtype_kind))dnl -define(rtype_name, get_typename(rtype_letter, rtype_kind))dnl +include(iparm.m4)dnl typedef GFC_ARRAY_DESCRIPTOR(GFC_MAX_DIMENSIONS, char) char_array; diff --git a/libgfortran/m4/dotprodc.m4 b/libgfortran/m4/dotprodc.m4 index 0e77c0a..eb97efa 100644 --- a/libgfortran/m4/dotprodc.m4 +++ b/libgfortran/m4/dotprodc.m4 @@ -24,12 +24,7 @@ Boston, MA 02111-1307, USA. */ #include <stdlib.h> #include <assert.h> #include "libgfortran.h"' -include(types.m4)dnl -define(rtype_code, regexp(file, `_\(c[0-9]+\)\.', `\1'))dnl -define(rtype_letter,substr(rtype_code, 0, 1))dnl -define(rtype_kind, substr(rtype_code, 1))dnl -define(rtype,get_arraytype(rtype_letter,rtype_kind))dnl -define(rtype_name, get_typename(rtype_letter, rtype_kind))dnl +include(iparm.m4)dnl typedef GFC_ARRAY_DESCRIPTOR(GFC_MAX_DIMENSIONS, char) char_array; diff --git a/libgfortran/m4/dotprodl.m4 b/libgfortran/m4/dotprodl.m4 index 7cbe600..8f886d3 100644 --- a/libgfortran/m4/dotprodl.m4 +++ b/libgfortran/m4/dotprodl.m4 @@ -23,11 +23,7 @@ Boston, MA 02111-1307, USA. */ #include <stdlib.h> #include <assert.h> #include "libgfortran.h"' -include(types.m4)dnl -define(rtype_kind, regexp(file, `_l\([0-9]+\)\.', `\1'))dnl -define(rtype_code,`l'rtype_kind)dnl -define(rtype,get_arraytype(l,rtype_kind))dnl -define(rtype_name, get_typename(l, rtype_kind))dnl +include(iparm.m4)dnl rtype_name `__dot_product_'rtype_code (gfc_array_l4 * a, gfc_array_l4 * b) diff --git a/libgfortran/m4/eoshift1.m4 b/libgfortran/m4/eoshift1.m4 index 304d003..a7852e0 100644 --- a/libgfortran/m4/eoshift1.m4 +++ b/libgfortran/m4/eoshift1.m4 @@ -24,18 +24,14 @@ Boston, MA 02111-1307, USA. */ #include <assert.h> #include <string.h> #include "libgfortran.h"' -include(types.m4)dnl -define(htype_kind, regexp(file, `_\([0-9]+\)\.', `\1'))dnl -define(htype_code,`i'rtype_name)dnl -define(htype,get_arraytype(i,htype_kind))dnl -define(htype_name, get_typename(i,htype_kind))dnl +include(iparm.m4)dnl static const char zeros[16] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; void -`__eoshift1_'htype_kind (const gfc_array_char * ret, const gfc_array_char * array, - const htype * h, const char * pbound, const htype_name * pwhich) +`__eoshift1_'atype_kind (const gfc_array_char * ret, const gfc_array_char * array, + const atype * h, const char * pbound, const atype_name * pwhich) { /* r.* indicates the return array. */ index_type rstride[GFC_MAX_DIMENSIONS - 1]; @@ -52,7 +48,7 @@ void ` /* h.* indicates the shift array. */' index_type hstride[GFC_MAX_DIMENSIONS - 1]; index_type hstride0; - const htype_name *hptr; + const atype_name *hptr; index_type count[GFC_MAX_DIMENSIONS - 1]; index_type extent[GFC_MAX_DIMENSIONS - 1]; @@ -61,8 +57,8 @@ void index_type len; index_type n; int which; - htype_name sh; - htype_name delta; + atype_name sh; + atype_name delta; if (pwhich) which = *pwhich - 1; diff --git a/libgfortran/m4/eoshift3.m4 b/libgfortran/m4/eoshift3.m4 index b86a80c..a540752 100644 --- a/libgfortran/m4/eoshift3.m4 +++ b/libgfortran/m4/eoshift3.m4 @@ -24,18 +24,14 @@ Boston, MA 02111-1307, USA. */ #include <assert.h> #include <string.h> #include "libgfortran.h"' -include(types.m4)dnl -define(htype_kind, regexp(file, `_\([0-9]+\)\.', `\1'))dnl -define(htype_code,`i'rtype_name)dnl -define(htype,get_arraytype(i,htype_kind))dnl -define(htype_name, get_typename(i,htype_kind))dnl +include(iparm.m4)dnl static const char zeros[16] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; void -`__eoshift3_'htype_kind (gfc_array_char * ret, gfc_array_char * array, - htype * h, const gfc_array_char * bound, htype_name * pwhich) +`__eoshift3_'atype_kind (gfc_array_char * ret, gfc_array_char * array, + atype * h, const gfc_array_char * bound, atype_name * pwhich) { /* r.* indicates the return array. */ index_type rstride[GFC_MAX_DIMENSIONS - 1]; @@ -52,7 +48,7 @@ void ` /* h.* indicates the shift array. */' index_type hstride[GFC_MAX_DIMENSIONS - 1]; index_type hstride0; - const htype_name *hptr; + const atype_name *hptr; /* b.* indicates the bound array. */ index_type bstride[GFC_MAX_DIMENSIONS - 1]; index_type bstride0; @@ -65,8 +61,8 @@ void index_type len; index_type n; int which; - htype_name sh; - htype_name delta; + atype_name sh; + atype_name delta; if (pwhich) which = *pwhich - 1; diff --git a/libgfortran/m4/iforeach.m4 b/libgfortran/m4/iforeach.m4 index 2397036..4106ddc 100644 --- a/libgfortran/m4/iforeach.m4 +++ b/libgfortran/m4/iforeach.m4 @@ -4,13 +4,13 @@ dnl This file is part of the GNU Fortran 95 Runtime Library (libgfortran) dnl Distributed under the GNU LGPL. See COPYING for details. define(START_FOREACH_FUNCTION, `void -`__'name`'rtype_qual`_'type_code (rtype * retarray, atype *array) +`__'name`'rtype_qual`_'atype_code (rtype * retarray, atype *array) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; index_type sstride[GFC_MAX_DIMENSIONS]; index_type dstride; - type_name *base; + atype_name *base; rtype_name *dest; index_type rank; index_type n; @@ -86,7 +86,7 @@ define(FINISH_FOREACH_FUNCTION, }')dnl define(START_MASKED_FOREACH_FUNCTION, `void -`__m'name`'rtype_qual`_'type_code (rtype * retarray, atype *array, gfc_array_l4 * mask) +`__m'name`'rtype_qual`_'atype_code (rtype * retarray, atype *array, gfc_array_l4 * mask) { index_type count[GFC_MAX_DIMENSIONS]; index_type extent[GFC_MAX_DIMENSIONS]; @@ -94,7 +94,7 @@ define(START_MASKED_FOREACH_FUNCTION, index_type mstride[GFC_MAX_DIMENSIONS]; index_type dstride; rtype_name *dest; - type_name *base; + atype_name *base; GFC_LOGICAL_4 *mbase; int rank; index_type n; diff --git a/libgfortran/m4/ifunction.m4 b/libgfortran/m4/ifunction.m4 index 9544584..74cc1e6 100644 --- a/libgfortran/m4/ifunction.m4 +++ b/libgfortran/m4/ifunction.m4 @@ -13,19 +13,19 @@ dnl retarray, array, pdim and mstride should not be used. dnl The variable n is declared as index_type and may be used. dnl Other variable declarations may be placed at the start of the code, dnl The types of the array parameter and the return value are -dnl type_name and rtype_name respectively. +dnl atype_name and rtype_name respectively. dnl Execution should be allowed to continue to the end of the block. dnl You should not return or break from the inner loop of the implementation. dnl Care should also be taken to avoid using the names defined in iparm.m4 define(START_ARRAY_FUNCTION, `void -`__'name`'rtype_qual`_'type_code (rtype * retarray, atype *array, index_type *pdim) +`__'name`'rtype_qual`_'atype_code (rtype * retarray, atype *array, index_type *pdim) { index_type count[GFC_MAX_DIMENSIONS - 1]; index_type extent[GFC_MAX_DIMENSIONS - 1]; index_type sstride[GFC_MAX_DIMENSIONS - 1]; index_type dstride[GFC_MAX_DIMENSIONS - 1]; - type_name *base; + atype_name *base; rtype_name *dest; index_type rank; index_type n; @@ -70,7 +70,7 @@ define(START_ARRAY_FUNCTION, while (base) { - type_name *src; + atype_name *src; rtype_name result; src = base; { @@ -120,7 +120,7 @@ define(FINISH_ARRAY_FUNCTION, }')dnl define(START_MASKED_ARRAY_FUNCTION, `void -`__m'name`'rtype_qual`_'type_code (rtype * retarray, atype * array, index_type *pdim, gfc_array_l4 * mask) +`__m'name`'rtype_qual`_'atype_code (rtype * retarray, atype * array, index_type *pdim, gfc_array_l4 * mask) { index_type count[GFC_MAX_DIMENSIONS - 1]; index_type extent[GFC_MAX_DIMENSIONS - 1]; @@ -128,7 +128,7 @@ define(START_MASKED_ARRAY_FUNCTION, index_type dstride[GFC_MAX_DIMENSIONS - 1]; index_type mstride[GFC_MAX_DIMENSIONS - 1]; rtype_name *dest; - type_name *base; + atype_name *base; GFC_LOGICAL_4 *mbase; int rank; int dim; @@ -189,7 +189,7 @@ define(START_MASKED_ARRAY_FUNCTION, while (base) { - type_name *src; + atype_name *src; GFC_LOGICAL_4 *msrc; rtype_name result; src = base; diff --git a/libgfortran/m4/in_pack.m4 b/libgfortran/m4/in_pack.m4 index 4998ed5..d17abc4 100644 --- a/libgfortran/m4/in_pack.m4 +++ b/libgfortran/m4/in_pack.m4 @@ -23,13 +23,7 @@ Boston, MA 02111-1307, USA. */ #include <stdlib.h> #include <assert.h> #include "libgfortran.h"' -include(types.m4)dnl -define(rtype_kind, regexp(file, `_.\([0-9]+\)\.', `\1'))dnl -define(rtype_letter, regexp(file, `_\(.\)[0-9]+\.', `\1'))dnl -define(rtype_code,rtype_letter`'rtype_name)dnl -define(rtype,get_arraytype(rtype_letter,rtype_kind))dnl -define(rtype_name, get_typename(rtype_letter, rtype_kind))dnl - +include(iparm.m4)dnl /* Allocates a block of memory with internal_malloc if the array needs repacking. */ diff --git a/libgfortran/m4/in_unpack.m4 b/libgfortran/m4/in_unpack.m4 index fe344ca..fa6f6be 100644 --- a/libgfortran/m4/in_unpack.m4 +++ b/libgfortran/m4/in_unpack.m4 @@ -24,12 +24,7 @@ Boston, MA 02111-1307, USA. */ #include <assert.h> #include <string.h> #include "libgfortran.h"' -include(types.m4)dnl -define(rtype_kind, regexp(file, `_.\([0-9]+\)\.', `\1'))dnl -define(rtype_letter, regexp(file, `_\(.\)[0-9]+\.', `\1'))dnl -define(rtype_code,rtype_letter`'rtype_name)dnl -define(rtype,get_arraytype(rtype_letter,rtype_kind))dnl -define(rtype_name, get_typename(rtype_letter, rtype_kind))dnl +include(iparm.m4)dnl dnl Only the kind (ie size) is used to name the function. void diff --git a/libgfortran/m4/iparm.m4 b/libgfortran/m4/iparm.m4 index 6cbd7b2..7b1cdeb 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 diff --git a/libgfortran/m4/matmul.m4 b/libgfortran/m4/matmul.m4 index fcf63a6..26b241d 100644 --- a/libgfortran/m4/matmul.m4 +++ b/libgfortran/m4/matmul.m4 @@ -23,12 +23,7 @@ Boston, MA 02111-1307, USA. */ #include <stdlib.h> #include <assert.h> #include "libgfortran.h"' -include(types.m4)dnl -define(rtype_code, regexp(file, `_\([irc][0-9]+\)\.', `\1'))dnl -define(rtype_letter,substr(rtype_code, 0, 1))dnl -define(rtype_kind, substr(rtype_code, 1))dnl -define(rtype,get_arraytype(rtype_letter,rtype_kind))dnl -define(rtype_name, get_typename(rtype_letter, rtype_kind))dnl +include(iparm.m4)dnl /* Dimensions: retarray(x,y) a(x, count) b(count,y). Either a or b can be rank 1. In this case x or y is 1. */ diff --git a/libgfortran/m4/matmull.m4 b/libgfortran/m4/matmull.m4 index e522a93..4ee32fb 100644 --- a/libgfortran/m4/matmull.m4 +++ b/libgfortran/m4/matmull.m4 @@ -23,11 +23,7 @@ Boston, MA 02111-1307, USA. */ #include <stdlib.h> #include <assert.h> #include "libgfortran.h"' -include(types.m4)dnl -define(rtype_kind, regexp(file, `_l\([0-9]+\)\.', `\1'))dnl -define(rtype_code,`l'rtype_kind)dnl -define(rtype,get_arraytype(l,rtype_kind))dnl -define(rtype_name, get_typename(l, rtype_kind))dnl +include(iparm.m4)dnl /* Dimensions: retarray(x,y) a(x, count) b(count,y). Either a or b can be rank 1. In this case x or y is 1. */ diff --git a/libgfortran/m4/maxloc0.m4 b/libgfortran/m4/maxloc0.m4 index 89ecacb..ade2a26 100644 --- a/libgfortran/m4/maxloc0.m4 +++ b/libgfortran/m4/maxloc0.m4 @@ -30,9 +30,9 @@ include(iparm.m4)dnl include(iforeach.m4)dnl FOREACH_FUNCTION( -` type_name maxval; +` atype_name maxval; - maxval = type_min;' + maxval = atype_min;' , ` if (*base > maxval) { @@ -42,9 +42,9 @@ FOREACH_FUNCTION( }') MASKED_FOREACH_FUNCTION( -` type_name maxval; +` atype_name maxval; - maxval = type_min;' + maxval = atype_min;' , ` if (*mbase && *base > maxval) { diff --git a/libgfortran/m4/maxloc1.m4 b/libgfortran/m4/maxloc1.m4 index 0eb259f..550a1f7 100644 --- a/libgfortran/m4/maxloc1.m4 +++ b/libgfortran/m4/maxloc1.m4 @@ -29,8 +29,8 @@ Boston, MA 02111-1307, USA. */ include(iparm.m4)dnl include(ifunction.m4)dnl ARRAY_FUNCTION(0, -` type_name maxval; - maxval = type_min; +` atype_name maxval; + maxval = atype_min; result = 1;', ` if (*src > maxval) { @@ -39,8 +39,8 @@ ARRAY_FUNCTION(0, }') MASKED_ARRAY_FUNCTION(0, -` type_name maxval; - maxval = type_min; +` atype_name maxval; + maxval = atype_min; result = 1;', ` if (*msrc && *src > maxval) { diff --git a/libgfortran/m4/maxval.m4 b/libgfortran/m4/maxval.m4 index b6a5666..845b822 100644 --- a/libgfortran/m4/maxval.m4 +++ b/libgfortran/m4/maxval.m4 @@ -27,13 +27,13 @@ Boston, MA 02111-1307, USA. */ include(iparm.m4)dnl include(ifunction.m4)dnl -ARRAY_FUNCTION(type_min, -` result = type_min;', +ARRAY_FUNCTION(atype_min, +` result = atype_min;', ` if (*src > result) result = *src;') -MASKED_ARRAY_FUNCTION(type_min, -` result = type_min;', +MASKED_ARRAY_FUNCTION(atype_min, +` result = atype_min;', ` if (*msrc && *src > result) result = *src;') diff --git a/libgfortran/m4/minloc0.m4 b/libgfortran/m4/minloc0.m4 index 5411418..e61ab8d 100644 --- a/libgfortran/m4/minloc0.m4 +++ b/libgfortran/m4/minloc0.m4 @@ -30,9 +30,9 @@ include(iparm.m4)dnl include(iforeach.m4)dnl FOREACH_FUNCTION( -` type_name minval; +` atype_name minval; - minval = type_max;' + minval = atype_max;' , ` if (*base < minval) { @@ -42,9 +42,9 @@ FOREACH_FUNCTION( }') MASKED_FOREACH_FUNCTION( -` type_name minval; +` atype_name minval; - minval = type_max;' + minval = atype_max;' , ` if (*mbase && *base < minval) { diff --git a/libgfortran/m4/minloc1.m4 b/libgfortran/m4/minloc1.m4 index e3101c6..e3b1866 100644 --- a/libgfortran/m4/minloc1.m4 +++ b/libgfortran/m4/minloc1.m4 @@ -29,8 +29,8 @@ Boston, MA 02111-1307, USA. */ include(iparm.m4)dnl include(ifunction.m4)dnl ARRAY_FUNCTION(0, -` type_name minval; - minval = type_max; +` atype_name minval; + minval = atype_max; result = 1;', ` if (*src < minval) { @@ -39,8 +39,8 @@ ARRAY_FUNCTION(0, }') MASKED_ARRAY_FUNCTION(0, -` type_name minval; - minval = type_max; +` atype_name minval; + minval = atype_max; result = 1;', ` if (*msrc && *src < minval) { diff --git a/libgfortran/m4/minval.m4 b/libgfortran/m4/minval.m4 index 2c1be2b..cdee06c 100644 --- a/libgfortran/m4/minval.m4 +++ b/libgfortran/m4/minval.m4 @@ -27,13 +27,13 @@ Boston, MA 02111-1307, USA. */ include(iparm.m4)dnl include(ifunction.m4)dnl -ARRAY_FUNCTION(type_max, -` result = type_max;', +ARRAY_FUNCTION(atype_max, +` result = atype_max;', ` if (*src < result) result = *src;') -MASKED_ARRAY_FUNCTION(type_max, -` result = type_max;', +MASKED_ARRAY_FUNCTION(atype_max, +` result = atype_max;', ` if (*msrc && *src < result) result = *src;') diff --git a/libgfortran/m4/reshape.m4 b/libgfortran/m4/reshape.m4 index b8143fe..7400f31 100644 --- a/libgfortran/m4/reshape.m4 +++ b/libgfortran/m4/reshape.m4 @@ -23,12 +23,7 @@ Boston, MA 02111-1307, USA. */ #include <stdlib.h> #include <assert.h> #include "libgfortran.h"' -include(types.m4)dnl -define(rtype_kind, regexp(file, `_.\([0-9]+\)\.', `\1'))dnl -define(rtype_letter, regexp(file, `_\(.\)[0-9]+\.', `\1'))dnl -define(rtype_code,rtype_letter`'rtype_name)dnl -define(rtype,get_arraytype(rtype_letter,rtype_kind))dnl -define(rtype_name, get_typename(rtype_letter, rtype_kind))dnl +include(iparm.m4)dnl typedef GFC_ARRAY_DESCRIPTOR(1, index_type) shape_type; diff --git a/libgfortran/m4/shape.m4 b/libgfortran/m4/shape.m4 index 826077e..6c58658 100644 --- a/libgfortran/m4/shape.m4 +++ b/libgfortran/m4/shape.m4 @@ -23,11 +23,7 @@ Boston, MA 02111-1307, USA. */ #include <stdlib.h> #include <assert.h> #include "libgfortran.h"' -include(types.m4)dnl -define(rtype_kind, regexp(file, `_i\([0-9]+\)\.', `\1'))dnl -define(rtype_code,`i'rtype_name)dnl -define(rtype,get_arraytype(i,rtype_kind))dnl -define(rtype_name, get_typename(i, rtype_kind))dnl +include(iparm.m4)dnl void `__shape_'rtype_kind (rtype * ret, const rtype * array) diff --git a/libgfortran/m4/specific.m4 b/libgfortran/m4/specific.m4 index bf88857..a6cea73 100644 --- a/libgfortran/m4/specific.m4 +++ b/libgfortran/m4/specific.m4 @@ -1,16 +1,16 @@ include(head.m4) -define(type_code,regexp(file,`_\([ircl][0-9]+\).f90',`\1'))dnl -define(type_letter,substr(type_code, 0, 1))dnl -define(type_kind,substr(type_code, 1))dnl +define(atype_code,regexp(file,`_\([ircl][0-9]+\).f90',`\1'))dnl +define(atype_letter,substr(atype_code, 0, 1))dnl +define(atype_kind,substr(atype_code, 1))dnl define(get_typename2, `$1 (kind=$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(type_name, get_typename(type_letter,type_kind))dnl +define(atype_name, get_typename(atype_letter,atype_kind))dnl define(name, regexp(regexp(file, `[^/]*$', `\&'), `^_\([^_]*\)_', `\1'))dnl -define(function_name,`specific__'name`_'type_code)dnl +define(function_name,`specific__'name`_'atype_code)dnl elemental function function_name (parm) - type_name, intent (in) :: parm - type_name :: function_name + atype_name, intent (in) :: parm + atype_name :: function_name function_name = name (parm) end function diff --git a/libgfortran/m4/specific2.m4 b/libgfortran/m4/specific2.m4 index ca0d831..dab90b0 100644 --- a/libgfortran/m4/specific2.m4 +++ b/libgfortran/m4/specific2.m4 @@ -1,16 +1,16 @@ include(head.m4) -define(type_code,regexp(file,`_\([ircl][0-9]+\).f90',`\1'))dnl -define(type_letter,substr(type_code, 0, 1))dnl -define(type_kind,substr(type_code, 1))dnl +define(atype_code,regexp(file,`_\([ircl][0-9]+\).f90',`\1'))dnl +define(atype_letter,substr(atype_code, 0, 1))dnl +define(atype_kind,substr(atype_code, 1))dnl define(get_typename2, `$1 (kind=$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(type_name, get_typename(type_letter,type_kind))dnl +define(atype_name, get_typename(atype_letter,atype_kind))dnl define(name, regexp(regexp(file, `[^/]*$', `\&'), `^_\([^_]*\)_', `\1'))dnl -define(function_name,`specific__'name`_'type_code)dnl +define(function_name,`specific__'name`_'atype_code)dnl elemental function function_name (p1, p2) - type_name, intent (in) :: p1, p2 - type_name :: function_name + atype_name, intent (in) :: p1, p2 + atype_name :: function_name function_name = name (p1, p2) end function diff --git a/libgfortran/m4/transpose.m4 b/libgfortran/m4/transpose.m4 index 35df64b..fbc4950 100644 --- a/libgfortran/m4/transpose.m4 +++ b/libgfortran/m4/transpose.m4 @@ -22,12 +22,7 @@ Boston, MA 02111-1307, USA. */ #include "config.h" #include <assert.h> #include "libgfortran.h"' -include(types.m4)dnl -define(rtype_kind, regexp(file, `_.\([0-9]+\)\.', `\1'))dnl -define(rtype_letter, regexp(file, `_\(.\)[0-9]+\.', `\1'))dnl -define(rtype_code,rtype_letter`'rtype_name)dnl -define(rtype,get_arraytype(rtype_letter,rtype_kind))dnl -define(rtype_name, get_typename(rtype_letter, rtype_kind))dnl +include(iparm.m4)dnl void `__transpose_'rtype_kind (rtype * ret, rtype * source) |