[PATCH PR Fortran/89286] Intrinsic sign and GNU Extension
Steve Kargl
sgk@troutmask.apl.washington.edu
Wed Jul 10 16:14:00 GMT 2019
On Wed, Jul 10, 2019 at 02:50:47PM +0100, Mark Eggleston wrote:
> The attached patch treats the intrinsic SIGN in the same way as MOD and
> DIM as it has the same arguments.
>
> Tested using make -j 8 check-fortran on x86_64
>
> Conditional compilation using #ifdef __GFC_REAL_16__ has been employed
> where appropriate in the test cases so should be OK on platforms without
> REAL(16).
>
> Change logs:
>
> gcc/fortran
>
>    Mark Eggleston <mark.eggleston@codethink.com>
>
> Â Â Â PR fortran/89286
> Â Â Â Â Â Â Â * check.c (gfc_check_sign): Deleted.
> Â Â Â * intrinsic.c (add_functions): Call add_sym_2 with gfc_check_a_p
> Â Â Â instead of gfc_check_sign for "sign".
> Â Â Â * intrinsic.h: Remove declaration of gfc_check_sign.
> Â Â Â * iresolve.c (gfc_resolve_sign): Check for largest kind of the actual
> Â Â Â arguments and convert the smaller. Set return kind to be the largest.
> Â Â Â * simplify.c (gfc_simplify_sign): Use the largest kind of the actual
> Â Â Â arguments for return
> Â Â Â * intrinsic.texi: Add GNU extension notes for return value to SIGN.
>
> gcc/testsuite
>
> Â Â Â Mark Eggleston <mark.eggleston@codethink.com>
>
> Â Â Â PR fortran/89240
> Â Â Â * gfortran.dg/sign_gnu_extension_1.f90: New test.
> Â Â Â * gfortran.dg/sign_gnu_extension_2.f90: New test.
> Â Â Â * gfortran.dg/pr78619.f90: Check for "must have" instead of "must be".
>
> If OK please can someone commit as I do not have the privileges.
>
We really need to get you commit access to the tree.
I also am not a fan of this type of change. Having spent the
last few days working on fixing BOZ to conform to F2018, I'm
finding all sorts of undocumented "extensions". Personally,
I think gfortran should be moving towards the standard by
deprecating of these types of extensions.
--
Steve
More information about the Gcc-patches
mailing list