diff options
Diffstat (limited to 'gcc/testsuite/gfortran.dg/associate_39.f90')
-rw-r--r-- | gcc/testsuite/gfortran.dg/associate_39.f90 | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/associate_39.f90 b/gcc/testsuite/gfortran.dg/associate_39.f90 new file mode 100644 index 00000000000..16357c32777 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/associate_39.f90 @@ -0,0 +1,19 @@ +! { dg-do compile } +! +! PR 86935: Bad locus in ASSOCIATE statement +! +! Contributed by Janus Weil <janus@gcc.gnu.org> + +implicit none + +type :: t + real :: r = 0.5 + integer :: i = 3 +end type + +type(t) :: x + +associate (r => x%r, & + i => x%ii) ! { dg-error "Invalid association target" } + +end |