From 0238e1e98acdae2b16fcda3d54c3e95a21c0750f Mon Sep 17 00:00:00 2001 From: "Steven G. Kargl" Date: Mon, 10 Aug 2015 17:42:00 +0000 Subject: [PATCH] [multiple changes] 2015-08-10 Steven G. Kargl PR libfortran/67140 * gfortran.map: Add _gfortran_mvbits_i16. * intrinsics/mvbits.c: Generate mvbits for c_int128_t. 2015-08-10 Francois-Xavier Coudert PR libfortran/67140 * gfortran.dg/pr67140.f90: New test. From-SVN: r226764 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gfortran.dg/pr67140.f90 | 12 ++++++++++++ libgfortran/ChangeLog | 6 ++++++ libgfortran/gfortran.map | 1 + libgfortran/intrinsics/mvbits.c | 8 ++++++++ 5 files changed, 32 insertions(+) create mode 100644 gcc/testsuite/gfortran.dg/pr67140.f90 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index bf858e2d9d7..146a73067a1 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2015-08-10 Francois-Xavier Coudert + + PR libfortran/67140 + * gfortran.dg/pr67140.f90: New test. + 2015-08-10 Thomas Schwinge PR libgomp/65742 diff --git a/gcc/testsuite/gfortran.dg/pr67140.f90 b/gcc/testsuite/gfortran.dg/pr67140.f90 new file mode 100644 index 00000000000..0a6782c3c3f --- /dev/null +++ b/gcc/testsuite/gfortran.dg/pr67140.f90 @@ -0,0 +1,12 @@ +! { dg-do run } +! +! Check that MVBITS is available for the largest integer kind (PR 67140) +! +program test + use iso_fortran_env + integer, parameter :: k = integer_kinds(size(integer_kinds)) + + integer(kind=k) :: i = 6 + call mvbits(7_k,2,2,i,0) + if (i /= 5) call abort +end diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index 0cfc80de21b..dd9143bf845 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,9 @@ +2015-08-10 Steven G. Kargl + + PR libfortran/67140 + * gfortran.map: Add _gfortran_mvbits_i16. + * intrinsics/mvbits.c: Generate mvbits for c_int128_t. + 2015-08-09 Francois-Xavier Coudert PR libfortran/66936 diff --git a/libgfortran/gfortran.map b/libgfortran/gfortran.map index 73cdde78571..66840639889 100644 --- a/libgfortran/gfortran.map +++ b/libgfortran/gfortran.map @@ -1284,6 +1284,7 @@ GFORTRAN_1.7 { __ieee_arithmetic_MOD_ieee_value_16; __ieee_exceptions_MOD_ieee_support_flag_10; __ieee_exceptions_MOD_ieee_support_flag_16; + _gfortran_mvbits_i16; } GFORTRAN_1.6; F2C_1.0 { diff --git a/libgfortran/intrinsics/mvbits.c b/libgfortran/intrinsics/mvbits.c index 19b8fc9f6ed..cb9dd6c30bd 100644 --- a/libgfortran/intrinsics/mvbits.c +++ b/libgfortran/intrinsics/mvbits.c @@ -83,4 +83,12 @@ SUB_NAME (const TYPE *from, const int *frompos, const int *len, TYPE *to, # undef SUB_NAME # undef TYPE # undef UTYPE + +# define TYPE GFC_INTEGER_16 +# define UTYPE GFC_UINTEGER_16 +# define SUB_NAME mvbits_i16 +# include "mvbits.c" +# undef SUB_NAME +# undef TYPE +# undef UTYPE #endif -- 2.30.2