From c3a29423de8cfb7e2b5642b9d44eb21e4b286aec Mon Sep 17 00:00:00 2001 From: Roger Sayle Date: Wed, 1 Jun 2005 19:17:37 +0000 Subject: intrinsic.c (add_conv): No longer take a "simplify" argument as its always gfc_convert_constant... * intrinsic.c (add_conv): No longer take a "simplify" argument as its always gfc_convert_constant, instead take a "standard" argument. (add_conversions): Change all existing calls of add_conv to pass GFC_STD_F77 as appropriate. Additionally, if we're allowing GNU extensions support integer-logical and logical-integer conversions. (gfc_convert_type_warn): Warn about use the use of these conversions as a extension when appropriate, i.e. with -pedantic. * simplify.c (gfc_convert_constant): Add support for integer to logical and logical to integer conversions, using gfc_int2log and gfc_log2int. * arith.c (gfc_log2int, gfc_int2log): New functions. * arith.h (gfc_log2int, gfc_int2log): Prototype here. * gfortran.texi: Document this new GNU extension. * gfortran.dg/logint-1.f: New test case. * gfortran.dg/logint-2.f: Likewise. * gfortran.dg/logint-3.f: Likewise. From-SVN: r100461 --- gcc/fortran/arith.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gcc/fortran/arith.h') diff --git a/gcc/fortran/arith.h b/gcc/fortran/arith.h index 1a718d4..f75b826 100644 --- a/gcc/fortran/arith.h +++ b/gcc/fortran/arith.h @@ -80,6 +80,8 @@ gfc_expr *gfc_complex2int (gfc_expr *, int); gfc_expr *gfc_complex2real (gfc_expr *, int); gfc_expr *gfc_complex2complex (gfc_expr *, int); gfc_expr *gfc_log2log (gfc_expr *, int); +gfc_expr *gfc_log2int (gfc_expr *, int); +gfc_expr *gfc_int2log (gfc_expr *, int); #endif /* GFC_ARITH_H */ -- cgit v1.1