summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/blockdata_3.f90
blob: 8d1a84da0a83e484d996a58744087fbbc0cdbfc7 (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
! { dg-do compile }
! { dg-options "-W -Wall" }
! Tests the fix for PR29539, in which the derived type in a blockdata
! cause an ICE.  With the fix for PR29565, this now compiles and runs
! correctly.
!
! Contributed by Bernhard Fischer  <aldot@gcc.gnu.org>
!
block data
  common /c/ d(5), cc
  type c_t
    sequence
    integer i
  end type c_t
  type (c_t) :: cc
  data d /5*1./
  data cc%i /5/
end

  common /c/ d(5), cc
  type c_t
    sequence
    integer i
  end type c_t
  type (c_t) :: cc
  print *, d
  print *, cc
end