diff options
Diffstat (limited to 'gcc/testsuite/gfortran.dg/equiv_constraint_3.f90')
-rw-r--r-- | gcc/testsuite/gfortran.dg/equiv_constraint_3.f90 | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/equiv_constraint_3.f90 b/gcc/testsuite/gfortran.dg/equiv_constraint_3.f90 new file mode 100644 index 000000000..6d7c36313 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/equiv_constraint_3.f90 @@ -0,0 +1,13 @@ +! { dg-do compile } +! PR20900 - USE associated variables cannot be equivalenced. +! Contributed by Joost VandeVondele <jv244@cam.ac.uk> +MODULE TEST + INTEGER :: I +END MODULE +! note 11.7 +USE TEST, ONLY : K=>I +INTEGER :: L +EQUIVALENCE(K,L) ! { dg-error "conflicts with USE ASSOCIATED attribute" } +END + +! { dg-final { cleanup-modules "TEST" } } |