aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/trans.h
diff options
context:
space:
mode:
authorHarald Anlauf <anlauf@gmx.de>2020-09-21 21:50:36 +0200
committerHarald Anlauf <anlauf@gmx.de>2020-09-21 21:50:36 +0200
commit5c5ce6099082b642294091c83461c928bd028ea1 (patch)
tree03fa12b75d3c0a820e83d45d9a270a832f3fb347 /gcc/fortran/trans.h
parent762c16eba6b815090c56564a293cd059aea2e1d6 (diff)
downloadgcc-5c5ce6099082b642294091c83461c928bd028ea1.zip
gcc-5c5ce6099082b642294091c83461c928bd028ea1.tar.gz
gcc-5c5ce6099082b642294091c83461c928bd028ea1.tar.bz2
PR fortran/90903 [part2] - Add runtime checking for the MVBITS intrinsic
Implement inline expansion of the intrinsic elemental subroutine MVBITS with optional runtime checks for valid argument range. gcc/fortran/ChangeLog: * iresolve.c (gfc_resolve_mvbits): Remove unneeded conversion of FROMPOS, LEN and TOPOS arguments to fit a C int. * trans-intrinsic.c (gfc_conv_intrinsic_mvbits): Add inline expansion of MVBITS intrinsic elemental subroutine and add code for runtime argument checking. (gfc_conv_intrinsic_subroutine): Recognise MVBITS intrinsic, but defer handling to gfc_trans_call. * trans-stmt.c (replace_ss): (gfc_trans_call): Adjust to handle inline expansion, scalarization of intrinsic subroutine MVBITS in gfc_conv_intrinsic_mvbits. * trans.h (gfc_conv_intrinsic_mvbits): Add prototype for gfc_conv_intrinsic_mvbits. gcc/testsuite/ChangeLog: * gfortran.dg/check_bits_2.f90: New test. Co-authored-by: Paul Thomas <pault@gcc.gnu.org>
Diffstat (limited to 'gcc/fortran/trans.h')
-rw-r--r--gcc/fortran/trans.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/fortran/trans.h b/gcc/fortran/trans.h
index d257963..16b4215 100644
--- a/gcc/fortran/trans.h
+++ b/gcc/fortran/trans.h
@@ -818,6 +818,10 @@ bool gfc_omp_private_outer_ref (tree);
struct gimplify_omp_ctx;
void gfc_omp_firstprivatize_type_sizes (struct gimplify_omp_ctx *, tree);
+/* In trans-intrinsic.c. */
+void gfc_conv_intrinsic_mvbits (gfc_se *, gfc_actual_arglist *,
+ gfc_loopinfo *);
+
/* Runtime library function decls. */
extern GTY(()) tree gfor_fndecl_pause_numeric;
extern GTY(()) tree gfor_fndecl_pause_string;