aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/options.c
diff options
context:
space:
mode:
authorHarald Anlauf <anlauf@gmx.de>2019-07-16 19:58:15 +0000
committerHarald Anlauf <anlauf@gcc.gnu.org>2019-07-16 19:58:15 +0000
commitdf1afcca584270fcb6b8902492758b5ec261a4d5 (patch)
tree877d574bcb5078adbad39bbac737be31206f86d7 /gcc/fortran/options.c
parent460bf043c8266dd080308f4783137aee0d0f862c (diff)
downloadgcc-df1afcca584270fcb6b8902492758b5ec261a4d5.zip
gcc-df1afcca584270fcb6b8902492758b5ec261a4d5.tar.gz
gcc-df1afcca584270fcb6b8902492758b5ec261a4d5.tar.bz2
re PR fortran/90903 (Implement runtime checks for bit manipulation intrinsics)
2019-07-16 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. PR fortran/90903 * gfortran.dg/check_bits_1.f90: New testcase. From-SVN: r273535
Diffstat (limited to 'gcc/fortran/options.c')
-rw-r--r--gcc/fortran/options.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/fortran/options.c b/gcc/fortran/options.c
index 3bc79ef..ef37ccc 100644
--- a/gcc/fortran/options.c
+++ b/gcc/fortran/options.c
@@ -580,12 +580,12 @@ gfc_handle_runtime_check_option (const char *arg)
int result, pos = 0, n;
static const char * const optname[] = { "all", "bounds", "array-temps",
"recursion", "do", "pointer",
- "mem", NULL };
+ "mem", "bits", NULL };
static const int optmask[] = { GFC_RTCHECK_ALL, GFC_RTCHECK_BOUNDS,
GFC_RTCHECK_ARRAY_TEMPS,
GFC_RTCHECK_RECURSION, GFC_RTCHECK_DO,
GFC_RTCHECK_POINTER, GFC_RTCHECK_MEM,
- 0 };
+ GFC_RTCHECK_BITS, 0 };
while (*arg)
{