This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Hi all,
Here is the patch I promised: this fixes a few problems related to the use of intrinsics as actual arguments. It's a bit long, but it's really straightforward and should be rather easy to review ;-)
I'll try to comment my patch below, please ask if you have any question. First, there are the general front-end changes:
-- the intrinsics list in intrinsic.c was reviewed and the actual_ok field was corrected in each case, according to the Standard. A few GNU intrinsics are kept allowed as actual arguments, for consistency: ACOSH ATANH DACOSH DASINH DATANH DCONJG DIMAG ZABS ZCOS ZEXP ZLOG ZSIN ZSQRT; also, no intrinsic subroutine is allowed as actual argument, so having an actual_ok argument to add_sym_?s functions is useless; the value of actual_ok is propagated into each gfc_intrinsic_sym
-- create a new function gfc_intrinsic_actual_ok in intrinsic.c for the resolution functions to perform checks; it is called in resolve_actual_arglist (resolve.c) and an error message is issued if need be; the CHAR intrinsic is special-cased because it's the only one forbidden (as actual arg) in F95 and allowed in F2003
-- change gfc_get_extern_function_decl in trans-decl.c to call isym->resolve.f3 when an intrinsic has 3 args
Library changes:
-- make m4 generate new files for AIMAG, ASINH, ACOSH and ATANH specifics
-- use a new simple m4 file (misc_specifics.m4) to generate code for other specifics (including character functions)
Smaller changes:
-- a gfc_resolve_index_func function is added to resolve the INDEX intrinsic, so that it can be used as actual argument (PR 16580)
-- intrinsic.texi is updated to mention that DIMAG is a GNU extension -- testcases for all this
Bootstrapped & regtested on i686-linux, OK for 4.2?
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |