aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/pr99350.f90
blob: 7f751b9fdcc4d043cdfef7b7251cfcb0fa33e234 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
! { dg-do compile }
!
! Contributed by Gerhard Steinmetz  <gscfq@t-online.de>
!
program p
   type t
      character(:), pointer :: a
   end type
   type(t) :: z
   character((0.)/0), target :: c = 'abc' ! { dg-error "Division by zero" }
   z%a => c
! The associate statement was not needed to trigger the ICE.
   associate (y => z%a)
      print *, y
   end associate
end