blob: 8b7afba446608f5bb9936683078b191a229832df [file] [edit]
! RUN: rm -rf %t && split-file %s %t
! RUN: %flang_fc1 -fsyntax-only -module-dir %t %t/m.f90
! RUN: %flang_fc1 -fdebug-dump-symbols -Werror -module-dir %t %t/use.f90 2>&1 | FileCheck %s
! The alignment requested with !DIR$ ALIGN in a module is restored when the
! module file is read. The warning about the directive is issued where the
! module is compiled, not where it is used.
!--- m.f90
module align_modfile_m
!dir$ align(64) :: a
real :: a(10)
real :: b
end module
!--- use.f90
subroutine use_all
use align_modfile_m
a = 0.
end subroutine
subroutine use_renamed
use align_modfile_m, only: c => a
c = 0.
end subroutine
! CHECK-NOT: warning:
! CHECK: a, PUBLIC {{.*}}alignment: 64
! CHECK-NOT: alignment:
! CHECK-NOT: warning: