gcc/libgfortran/m4/iparm.m4
Thomas Koenig 9a0fb43ea1 re PR fortran/26769 (Implement transpose() and reshape() for real instead of using integer)
2006-03-25  Thomas Koenig  <Thomas.Koenig@online.de>

	PR fortran/26769
	* iresolve.c (gfc_resolve_reshape):  Remove doubling of
	kind for complex. For real(kind=10), call reshape_r10.
	(gfc_resolve_transpose):  For real(kind=10), call
	transpose_r10.

2006-03-25  Thomas Koenig  <Thomas.Koenig@online.de>

	PR fortran/26769
	* Makefile.am:  Add transpose_r10.c and reshape_r10.c.
	* aclocal.m4:  Regenerate using aclocal 1.9.3.
	* Makefile.in:  Regenerate using automake 1.9.3.
	* m4/iparm.m4 (rtype_ccode):  If rtype_letter is `i',
	evaluate to rtype_kind, otherwise to rtype_code.
	* generated/transpose_r10.c:  Add.
	* generated/reshape_r10.c:  Add.

2006-03-25  Thomas Koenig  <Thomas.Koenig@online.de>

	PR fortran/26769
	* gfortran.dg/transpose_reshape_r10.f90:  New test case.

From-SVN: r112381
2006-03-25 21:15:48 +00:00

34 lines
1.3 KiB
Plaintext

dnl Support macro file for intrinsic functions.
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 GPL with exception. See COPYING for details.
dnl M4 macro file to get type names from filenames
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
',`dnl
define_type(rtype, rtype_tmp)dnl
define(rtype_qual,`_'rtype_kind)dnl
')dnl
define(atype_max, atype_name`_HUGE')dnl
define(atype_min, `-'atype_max)dnl
define(name, regexp(regexp(file, `[^/]*$', `\&'), `^\([^_]*\)_', `\1'))dnl
define(rtype_ccode,ifelse(rtype_letter,`i',rtype_kind,rtype_code))dnl