diff options
author | Francois-Xavier Coudert <coudert@clipper.ens.fr> | 2006-09-29 22:41:11 +0200 |
---|---|---|
committer | François-Xavier Coudert <fxcoudert@gcc.gnu.org> | 2006-09-29 20:41:11 +0000 |
commit | 4a44c1a228783f56c4c4b7e7aeee102115a6696d (patch) | |
tree | 7729eb205e524dc696b58941e5b286bf2193392d /libgfortran | |
parent | 57270ac1c83cfc0f586fadb24e35f633e6b86b30 (diff) | |
download | gcc-4a44c1a228783f56c4c4b7e7aeee102115a6696d.zip gcc-4a44c1a228783f56c4c4b7e7aeee102115a6696d.tar.gz gcc-4a44c1a228783f56c4c4b7e7aeee102115a6696d.tar.bz2 |
re PR libfortran/18791 (CABS specifics declared of wrong type)
PR fortran/18791
* gfortran.dg/specifics_1.f90: New test.
* gfortran.fortran-torture/execute/specifics.f90: Add tests for
complex specifics.
* m4/specific.m4: Special-case cabs so that its return type is
real. Special-case conjg so that their suffices are _4, _8, _10 and
_16 instead of _c4, _c8, _c10 and _c16.
* intrinsics/f2c_specifics.F90: Special-case conjg functions so
that their suffices are _4 and _8 instead of _c4 and _c8.
* generated/_conjg_c4.F90: Regenerate.
* generated/_conjg_c8.F90: Regenerate.
* generated/_conjg_c10.F90: Regenerate.
* generated/_conjg_c16.F90: Regenerate.
* generated/_abs_c4.F90: Regenerate.
* generated/_abs_c8.F90: Regenerate.
* generated/_abs_c10.F90: Regenerate.
* generated/_abs_c16.F90: Regenerate.
From-SVN: r117317
Diffstat (limited to 'libgfortran')
-rw-r--r-- | libgfortran/generated/_abs_c10.F90 | 2 | ||||
-rw-r--r-- | libgfortran/generated/_abs_c16.F90 | 2 | ||||
-rw-r--r-- | libgfortran/generated/_abs_c4.F90 | 2 | ||||
-rw-r--r-- | libgfortran/generated/_abs_c8.F90 | 2 | ||||
-rw-r--r-- | libgfortran/generated/_conjg_c10.F90 | 6 | ||||
-rw-r--r-- | libgfortran/generated/_conjg_c16.F90 | 6 | ||||
-rw-r--r-- | libgfortran/generated/_conjg_c4.F90 | 6 | ||||
-rw-r--r-- | libgfortran/generated/_conjg_c8.F90 | 6 | ||||
-rw-r--r-- | libgfortran/m4/specific.m4 | 5 |
9 files changed, 19 insertions, 18 deletions
diff --git a/libgfortran/generated/_abs_c10.F90 b/libgfortran/generated/_abs_c10.F90 index 8e76b34..33a5895 100644 --- a/libgfortran/generated/_abs_c10.F90 +++ b/libgfortran/generated/_abs_c10.F90 @@ -42,7 +42,7 @@ elemental function specific__abs_c10 (parm) complex (kind=10), intent (in) :: parm - complex (kind=10) :: specific__abs_c10 + real (kind=10) :: specific__abs_c10 specific__abs_c10 = abs (parm) end function diff --git a/libgfortran/generated/_abs_c16.F90 b/libgfortran/generated/_abs_c16.F90 index acc7f22..021546d 100644 --- a/libgfortran/generated/_abs_c16.F90 +++ b/libgfortran/generated/_abs_c16.F90 @@ -42,7 +42,7 @@ elemental function specific__abs_c16 (parm) complex (kind=16), intent (in) :: parm - complex (kind=16) :: specific__abs_c16 + real (kind=16) :: specific__abs_c16 specific__abs_c16 = abs (parm) end function diff --git a/libgfortran/generated/_abs_c4.F90 b/libgfortran/generated/_abs_c4.F90 index a87fcf6..6def6b1 100644 --- a/libgfortran/generated/_abs_c4.F90 +++ b/libgfortran/generated/_abs_c4.F90 @@ -42,7 +42,7 @@ elemental function specific__abs_c4 (parm) complex (kind=4), intent (in) :: parm - complex (kind=4) :: specific__abs_c4 + real (kind=4) :: specific__abs_c4 specific__abs_c4 = abs (parm) end function diff --git a/libgfortran/generated/_abs_c8.F90 b/libgfortran/generated/_abs_c8.F90 index 294c002..bd549a5 100644 --- a/libgfortran/generated/_abs_c8.F90 +++ b/libgfortran/generated/_abs_c8.F90 @@ -42,7 +42,7 @@ elemental function specific__abs_c8 (parm) complex (kind=8), intent (in) :: parm - complex (kind=8) :: specific__abs_c8 + real (kind=8) :: specific__abs_c8 specific__abs_c8 = abs (parm) end function diff --git a/libgfortran/generated/_conjg_c10.F90 b/libgfortran/generated/_conjg_c10.F90 index 1fa158d..e03a21b 100644 --- a/libgfortran/generated/_conjg_c10.F90 +++ b/libgfortran/generated/_conjg_c10.F90 @@ -40,11 +40,11 @@ #if defined (HAVE_GFC_COMPLEX_10) -elemental function specific__conjg_c10 (parm) +elemental function specific__conjg_10 (parm) complex (kind=10), intent (in) :: parm - complex (kind=10) :: specific__conjg_c10 + complex (kind=10) :: specific__conjg_10 - specific__conjg_c10 = conjg (parm) + specific__conjg_10 = conjg (parm) end function diff --git a/libgfortran/generated/_conjg_c16.F90 b/libgfortran/generated/_conjg_c16.F90 index 13c8e14..876575e 100644 --- a/libgfortran/generated/_conjg_c16.F90 +++ b/libgfortran/generated/_conjg_c16.F90 @@ -40,11 +40,11 @@ #if defined (HAVE_GFC_COMPLEX_16) -elemental function specific__conjg_c16 (parm) +elemental function specific__conjg_16 (parm) complex (kind=16), intent (in) :: parm - complex (kind=16) :: specific__conjg_c16 + complex (kind=16) :: specific__conjg_16 - specific__conjg_c16 = conjg (parm) + specific__conjg_16 = conjg (parm) end function diff --git a/libgfortran/generated/_conjg_c4.F90 b/libgfortran/generated/_conjg_c4.F90 index a4409c9..ca615ec 100644 --- a/libgfortran/generated/_conjg_c4.F90 +++ b/libgfortran/generated/_conjg_c4.F90 @@ -40,11 +40,11 @@ #if defined (HAVE_GFC_COMPLEX_4) -elemental function specific__conjg_c4 (parm) +elemental function specific__conjg_4 (parm) complex (kind=4), intent (in) :: parm - complex (kind=4) :: specific__conjg_c4 + complex (kind=4) :: specific__conjg_4 - specific__conjg_c4 = conjg (parm) + specific__conjg_4 = conjg (parm) end function diff --git a/libgfortran/generated/_conjg_c8.F90 b/libgfortran/generated/_conjg_c8.F90 index f1c1254..b58de8e 100644 --- a/libgfortran/generated/_conjg_c8.F90 +++ b/libgfortran/generated/_conjg_c8.F90 @@ -40,11 +40,11 @@ #if defined (HAVE_GFC_COMPLEX_8) -elemental function specific__conjg_c8 (parm) +elemental function specific__conjg_8 (parm) complex (kind=8), intent (in) :: parm - complex (kind=8) :: specific__conjg_c8 + complex (kind=8) :: specific__conjg_8 - specific__conjg_c8 = conjg (parm) + specific__conjg_8 = conjg (parm) end function diff --git a/libgfortran/m4/specific.m4 b/libgfortran/m4/specific.m4 index e473eff..a0d03dc 100644 --- a/libgfortran/m4/specific.m4 +++ b/libgfortran/m4/specific.m4 @@ -6,7 +6,8 @@ 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(atype_name, get_typename(atype_letter,atype_kind))dnl define(name, regexp(regexp(file, `[^/]*$', `\&'), `^_\([^_]*\)_', `\1'))dnl -define(function_name,`specific__'name`_'atype_code)dnl +define(rtype_name,get_typename(ifelse(name,abs,ifelse(atype_letter,c,r,atype_letter),atype_letter),atype_kind))dnl +define(function_name,ifelse(name,conjg,`specific__conjg_'atype_kind,`specific__'name`_'atype_code))dnl define(type,ifelse(atype_letter,l,LOGICAL,ifelse(atype_letter,i,INTEGER,ifelse(atype_letter,r,REAL,ifelse(atype_letter,c,COMPLEX,UNKNOW)))))dnl define(Q,ifelse(atype_kind,4,F,ifelse(atype_kind,8,`',ifelse(atype_kind,10,L,ifelse(atype_kind,16,L,`_'atype_kind)))))dnl @@ -33,7 +34,7 @@ ifelse(NEEDED,NONE,`',`#ifdef HAVE_'prefix`'NEEDED`'Q) elemental function function_name (parm) atype_name, intent (in) :: parm - atype_name :: function_name + rtype_name :: function_name function_name = name (parm) end function |