summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/host_assoc_call_2.f90
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gfortran.dg/host_assoc_call_2.f90')
-rw-r--r--gcc/testsuite/gfortran.dg/host_assoc_call_2.f9018
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/host_assoc_call_2.f90 b/gcc/testsuite/gfortran.dg/host_assoc_call_2.f90
new file mode 100644
index 000000000..a74f37343
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/host_assoc_call_2.f90
@@ -0,0 +1,18 @@
+! { dg-do compile }
+! Tests the fix for PR36700, in which the call to the function would
+! cause an ICE.
+!
+! Contributed by <terry@chem.gu.se>
+!
+module Diatoms
+ implicit none
+contains
+ function InitialDiatomicX () result(v4) ! { dg-error "has a type" }
+ real(kind = 8), dimension(4) :: v4
+ v4 = 1
+ end function InitialDiatomicX
+ subroutine FindDiatomicPeriod
+ call InitialDiatomicX () ! { dg-error "which is not consistent with the CALL" }
+ end subroutine FindDiatomicPeriod
+end module Diatoms
+! { dg-final { cleanup-modules "Diatoms" } }