This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch, fortran] PR90903 - Implement runtime checks for bit manipulation intrinsics
- From: Harald Anlauf <anlauf at gmx dot de>
- To: gfortran <fortran at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Sun, 14 Jul 2019 21:37:27 +0200
- Subject: Re: [Patch, fortran] PR90903 - Implement runtime checks for bit manipulation intrinsics
- References: <5D0FF0E8.3090108@gmx.de>
Ping!
On 06/23/19 23:36, Harald Anlauf wrote:
> Dear all,
>
> the attached patch provides run-time checks for the bit manipulation
> intrinsic functions (IBSET/IBCLR/BTEST/SHIFT[RLA]/ISHFT/ISHFTC).
> I am using only one testcase whose purpose is mainly to verify that
> there are no false positives, which I consider essential, and one
> "failing" test at the end.
>
> What is still missing are run-time checks for the subroutine MVBITS.
> I am not sure yet how to handle that case (frontend or library?),
> and I am open to suggestions. For this purpose I intend to leave
> the PR open until a good solution is found.
>
> Regtested on x86_64-pc-linux-gnu. OK for trunk?
>
> Harald
>
> 2019-06-23 Harald Anlauf <anlauf@gmx.de>
>
> PR fortran/90903
> * libgfortran.h: Add mask for -fcheck=bits option.
> * options.c (gfc_handle_runtime_check_option): Add option "bits"
> to run-time checks selectable via -fcheck.
> * trans-intrinsic.c (gfc_conv_intrinsic_btest)
> (gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ibits)
> (gfc_conv_intrinsic_shift, gfc_conv_intrinsic_ishft)
> (gfc_conv_intrinsic_ishftc): Implement run-time checks for the
> POS, LEN, SHIFT, and SIZE arguments.
> * gfortran.texi: Document run-time checks for bit manipulation
> intrinsics.
> * invoke.texi: Document new -fcheck=bits option.
>
> 2019-06-23 Harald Anlauf <anlauf@gmx.de>
>
> PR fortran/90903
> * gfortran.dg/check_bits_1.f90: New testcase.
>