summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/pr79886.f90
blob: a62cd1889c7ebcdf4698e04d3d6c4d6f529d7da6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
! PR fortran/79886
! { dg-do compile }
! { dg-options "-Wpadded" }

subroutine pr79886
  type :: foo
    integer (kind=1) :: a
    integer (kind=8) :: b	! { dg-warning "padding struct to align" }
    integer (kind=1) :: c
    integer (kind=8) :: d	! { dg-warning "padding struct to align" }
  end type
  type (foo) :: f
  f%a = 1
  f%b = 2
  f%c = 3
  f%d = 4
end subroutine