summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/associate_49.f90
blob: 1b2059505566f1217c63a9e97f40858f224acd6e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
! { dg-do run }
!
! Test the fix for PR91588, in which the declaration of 'a' caused
! an ICE.
!
! Contributed by Gerhardt Steinmetz  <gscfq@t-online.de>
!
program p
   character(4), parameter :: parm = '7890'
   associate (z => '1234')
      block
         integer(len(z)) :: a
         if (kind(a) .ne. 4) stop 1
      end block
   end associate
   associate (z => '123')
      block
         integer(len(z)+1) :: a
         if (kind(a) .ne. 4) stop 2
      end block
   end associate
   associate (z => 1_8)
      block
         integer(kind(z)) :: a
         if (kind(a) .ne. 8) stop 3
      end block
   end associate
   associate (z => parm)
      block
         integer(len(z)) :: a
         if (kind(a) .ne. 4) stop 4
      end block
   end associate
end