aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/pr85138_2.f90
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2018-07-12 16:50:41 +0000
committerJakub Jelinek <jakub@redhat.com>2018-07-12 16:50:41 +0000
commit1ed159550621e4b1cf35ab868e0a7d51e2837724 (patch)
tree9bad8e165e1df1b26197b4700f9f51566152a405 /gcc/testsuite/gfortran.dg/pr85138_2.f90
parentc1e7aa1d88a3110f71b740fc8ea11f3274cae433 (diff)
parentf7d3a6a6300a4c330afca4d8772ac80ab09ac21c (diff)
svn merge -r258208:262569 svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branchredhat/gcc-7-branch
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/redhat/gcc-7-branch@262599 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gfortran.dg/pr85138_2.f90')
-rw-r--r--gcc/testsuite/gfortran.dg/pr85138_2.f9032
1 files changed, 32 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/pr85138_2.f90 b/gcc/testsuite/gfortran.dg/pr85138_2.f90
new file mode 100644
index 00000000000..942cc6684d8
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr85138_2.f90
@@ -0,0 +1,32 @@
+! { dg-do compile }
+module fox_m_fsys_format
+ interface len
+ module procedure str_real_dp_len, str_real_dp_fmt_len
+ end interface
+contains
+ pure function str_real_dp_fmt_len(x, fmt) result(n)
+ real, intent(in) :: x
+ character(len=*), intent(in) :: fmt
+ if (.not.checkFmt(fmt)) then
+ endif
+ end function str_real_dp_fmt_len
+ pure function str_real_dp_len(x) result(n)
+ real, intent(in) :: x
+ end function str_real_dp_len
+ pure function str_real_dp_array_len(xa) result(n)
+ real, dimension(:), intent(in) :: xa
+ end function str_real_dp_array_len
+ pure function str_real_dp_array_fmt_len(xa, fmt) result(n)
+ real, dimension(:), intent(in) :: xa
+ character(len=*), intent(in) :: fmt
+ end function str_real_dp_array_fmt_len
+ pure function str_real_dp_fmt(x, fmt) result(s)
+ real, intent(in) :: x
+ character(len=*), intent(in) :: fmt
+ character(len=len(x, fmt)) :: s
+ end function str_real_dp_fmt
+ pure function checkFmt(fmt) result(good)
+ character(len=*), intent(in) :: fmt
+ logical :: good
+ end function checkFmt
+end module fox_m_fsys_format