summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/cray_pointers_4.f90
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gfortran.dg/cray_pointers_4.f90')
-rw-r--r--gcc/testsuite/gfortran.dg/cray_pointers_4.f9014
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/cray_pointers_4.f90 b/gcc/testsuite/gfortran.dg/cray_pointers_4.f90
new file mode 100644
index 000000000..85e7ae758
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/cray_pointers_4.f90
@@ -0,0 +1,14 @@
+! { dg-do compile }
+! { dg-options "-fcray-pointer" }
+
+subroutine err1
+ integer :: in_common1, in_common2, v, w, equiv1, equiv2
+ common /in_common1/ in_common1
+ pointer (ipt1, in_common1) ! { dg-error "conflicts with COMMON" }
+ pointer (ipt2, in_common2)
+ common /in_common2/ in_common2 ! { dg-error "conflicts with COMMON" }
+ equivalence (v, equiv1)
+ pointer (ipt3, equiv1) ! { dg-error "conflicts with EQUIVALENCE" }
+ pointer (ipt4, equiv2)
+ equivalence (w, equiv2) ! { dg-error "conflicts with EQUIVALENCE" }
+end subroutine err1