diff gcc/testsuite/gfortran.dg/proc_ptr_23.f90 @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children 84e7813d76e9
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gcc/testsuite/gfortran.dg/proc_ptr_23.f90	Fri Oct 27 22:46:09 2017 +0900
@@ -0,0 +1,19 @@
+! { dg-do run }
+!
+! PR 41106: [F03] Procedure Pointers with CHARACTER results
+!
+! Contributed by Janus Weil <janus@gcc.gnu.org>
+
+character(len=5) :: str
+procedure(character(len=5)), pointer :: pp
+pp => abc
+print *,pp()
+str = pp()
+if (str/='abcde') call abort()
+contains
+ function abc()
+  character(len=5) :: abc
+  abc = 'abcde'
+ end function abc
+end
+