diff options
author | Tobias Burnus <burnus@net-b.de> | 2007-12-17 12:24:06 +0100 |
---|---|---|
committer | Tobias Burnus <burnus@gcc.gnu.org> | 2007-12-17 12:24:06 +0100 |
commit | 7f59aaba14dbcbd17ed63e0828d66742b61a5466 (patch) | |
tree | e8705e0181e2d4ccabb8c644946ca73825f1c20d | |
parent | ca7b051775437a3002bdfd9a7d0aebb092095f05 (diff) | |
download | gcc-7f59aaba14dbcbd17ed63e0828d66742b61a5466.zip gcc-7f59aaba14dbcbd17ed63e0828d66742b61a5466.tar.gz gcc-7f59aaba14dbcbd17ed63e0828d66742b61a5466.tar.bz2 |
intrinsic.c (add_functions): Undo change; mark float and sngl as STD_F77.
2007-12-17 Tobias Burnus <burnus@net-b.de>
* intrinsic.c (add_functions): Undo change; mark float and
sngl as STD_F77.
* intrinsic.texi (FLOAT, SNGL): Change standard to F77 and later.
* gfortran.texi (BOZ): Make note about FLOAT etc. clearer.
2007-12-17 Tobias Burnus <burnus@net-b.de>
* gfortran.dg/initialization_16.f90: Update as FLOAT/SNGL are
part of Fortran 77/95/2003.
From-SVN: r131007
-rw-r--r-- | gcc/fortran/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/fortran/gfortran.texi | 4 | ||||
-rw-r--r-- | gcc/fortran/intrinsic.c | 4 | ||||
-rw-r--r-- | gcc/fortran/intrinsic.texi | 4 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/initialization_16.f90 | 6 |
6 files changed, 21 insertions, 9 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 5f6e1dc..fe8f609 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,10 @@ +2007-12-17 Tobias Burnus <burnus@net-b.de> + + * intrinsic.c (add_functions): Undo change; mark float and + sngl as STD_F77. + * intrinsic.texi (FLOAT, SNGL): Change standard to F77 and later. + * gfortran.texi (BOZ): Make note about FLOAT etc. clearer. + 2007-12-16 Tobias Burnus <burnus@net-b.de> PR fortran/34495 diff --git a/gcc/fortran/gfortran.texi b/gcc/fortran/gfortran.texi index 84795fb..9fda225 100644 --- a/gcc/fortran/gfortran.texi +++ b/gcc/fortran/gfortran.texi @@ -1101,8 +1101,8 @@ are also allowed as argument of @code{REAL}, @code{DBLE}, @code{INT} and @code{CMPLX}; the result is the same as if the integer BOZ literal had been converted by @code{TRANSFER} to, respectively, @code{real}, @code{double precision}, @code{integer} or @code{complex}. -The GNU Fortran intrinsic procedure @code{FLOAT}, @code{DFLOAT}, -@code{COMPLEX} and @code{DCMPLX} are treated alike. +As GNU Fortran extension the intrinsic procedures @code{FLOAT}, +@code{DFLOAT}, @code{COMPLEX} and @code{DCMPLX} are treated alike. As an extension, GNU Fortran allows hexadecimal BOZ literal constants to be specified using the @code{X} prefix, in addition to the standard diff --git a/gcc/fortran/intrinsic.c b/gcc/fortran/intrinsic.c index aaaa620..039e228 100644 --- a/gcc/fortran/intrinsic.c +++ b/gcc/fortran/intrinsic.c @@ -2047,11 +2047,11 @@ add_functions (void) gfc_check_fn_c, gfc_simplify_realpart, gfc_resolve_realpart, a, BT_UNKNOWN, dr, REQUIRED); - add_sym_1 ("float", GFC_ISYM_REAL, CLASS_ELEMENTAL, ACTUAL_NO, BT_REAL, dr, GFC_STD_GNU, + add_sym_1 ("float", GFC_ISYM_REAL, CLASS_ELEMENTAL, ACTUAL_NO, BT_REAL, dr, GFC_STD_F77, gfc_check_i, gfc_simplify_float, NULL, a, BT_INTEGER, di, REQUIRED); - add_sym_1 ("sngl", GFC_ISYM_REAL, CLASS_ELEMENTAL, ACTUAL_NO, BT_REAL, dr, GFC_STD_GNU, + add_sym_1 ("sngl", GFC_ISYM_REAL, CLASS_ELEMENTAL, ACTUAL_NO, BT_REAL, dr, GFC_STD_F77, NULL, gfc_simplify_sngl, NULL, a, BT_REAL, dd, REQUIRED); diff --git a/gcc/fortran/intrinsic.texi b/gcc/fortran/intrinsic.texi index dce838d..f31ca25 100644 --- a/gcc/fortran/intrinsic.texi +++ b/gcc/fortran/intrinsic.texi @@ -3850,7 +3850,7 @@ end program test_fdate @code{FLOAT(I)} converts the integer @var{I} to a default real value. @item @emph{Standard}: -GNU extension +F77 and later @item @emph{Class}: Elemental function @@ -9700,7 +9700,7 @@ to a default real value. This is an archaic form of @code{REAL} that is specific to one type for @var{A}. @item @emph{Standard}: -GNU extension +F77 and later @item @emph{Class}: Elemental function diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index bd18305..62b67a8 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2007-12-17 Tobias Burnus <burnus@net-b.de> + + * gfortran.dg/initialization_16.f90: Update as FLOAT/SNGL are + part of Fortran 77/95/2003. + 2007-12-17 Dorit Nuzman <dorit@il.ibm.com> PR tree-optimization/34445 diff --git a/gcc/testsuite/gfortran.dg/initialization_16.f90 b/gcc/testsuite/gfortran.dg/initialization_16.f90 index 185099a..a717eee 100644 --- a/gcc/testsuite/gfortran.dg/initialization_16.f90 +++ b/gcc/testsuite/gfortran.dg/initialization_16.f90 @@ -9,7 +9,7 @@ program main implicit none real, parameter :: r1 = real(33) ! { dg-error "Fortran 2003: Function 'real' as initialization expression" } real, parameter :: r2 = dble(33) ! { dg-error "Fortran 2003: Function 'dble' as initialization expression" } - real, parameter :: r4 = cmplx(33,33)! { dg-error "Fortran 2003: Function 'cmplx' as initialization expression" } - print *, sngl(1.0d0) ! { dg-error "not included in the selected standard" } - print *, float(1.0) ! { dg-error "not included in the selected standard" } + complex, parameter :: z = cmplx(33,33)! { dg-error "Fortran 2003: Function 'cmplx' as initialization expression" } + real, parameter :: r4 = sngl(3.d0) ! { dg-error "Fortran 2003: Function 'sngl' as initialization expression" } + real, parameter :: r5 = float(33) ! { dg-error "Fortran 2003: Function 'float' as initialization expression" } end program main |