aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/gfortran.dg/pr92993.f9021
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/pr92993.f90 b/gcc/testsuite/gfortran.dg/pr92993.f90
new file mode 100644
index 0000000..b733553
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr92993.f90
@@ -0,0 +1,21 @@
+! { dg-do compile }
+!
+! Original by G. Steinmetz
+
+function f(x)
+ integer, intent(in) :: x
+ integer :: f
+ f = x
+end
+
+program p
+ interface
+ function f(x) ! { dg-error "POINTER attribute mismatch in function result" }
+ integer, intent(in) :: x
+ integer, pointer :: f
+ end
+ end interface
+ integer :: a(2) = [1, 2]
+ if ( a(2) .ne. f(a(2)) ) stop 1
+end
+