2021-03-09 21:57:43 +08:00
|
|
|
! Checks that the module file:
|
|
|
|
! * is _saved_
|
|
|
|
! * is saved in the _directory specified by the user_
|
|
|
|
! We use `-fsyntax-only` as it stops after the semantic checks (the module file is generated when sema checks are run)
|
2021-02-23 01:03:19 +08:00
|
|
|
|
2021-03-09 21:57:43 +08:00
|
|
|
!--------------------------
|
2022-05-19 17:31:03 +08:00
|
|
|
! -module-dir <value>
|
2021-03-09 21:57:43 +08:00
|
|
|
!--------------------------
|
|
|
|
! RUN: rm -rf %t && mkdir -p %t/dir-flang
|
|
|
|
! RUN: cd %t && %flang -fsyntax-only -module-dir %t/dir-flang %s
|
|
|
|
! RUN: ls %t/dir-flang/testmodule.mod && not ls %t/testmodule.mod
|
2021-02-23 01:03:19 +08:00
|
|
|
|
2022-05-19 17:31:03 +08:00
|
|
|
!--------------------------
|
|
|
|
! -module-dir<value>
|
|
|
|
!--------------------------
|
|
|
|
! RUN: rm -rf %t && mkdir -p %t/dir-flang
|
|
|
|
! RUN: cd %t && %flang -fsyntax-only -module-dir%t/dir-flang %s
|
|
|
|
! RUN: ls %t/dir-flang/testmodule.mod && not ls %t/testmodule.mod
|
|
|
|
|
2021-03-09 21:57:43 +08:00
|
|
|
!---------------------------
|
2022-05-19 17:31:03 +08:00
|
|
|
! -J <value>
|
2021-03-09 21:57:43 +08:00
|
|
|
!---------------------------
|
|
|
|
! RUN: rm -rf %t && mkdir -p %t/dir-flang
|
|
|
|
! RUN: cd %t && %flang -fsyntax-only -J %t/dir-flang %s
|
|
|
|
! RUN: ls %t/dir-flang/testmodule.mod && not ls %t/testmodule.mod
|
2021-02-23 01:03:19 +08:00
|
|
|
|
2021-03-09 21:57:43 +08:00
|
|
|
!------------------------------
|
2022-05-19 17:31:03 +08:00
|
|
|
! -J<value>
|
2021-03-09 21:57:43 +08:00
|
|
|
!------------------------------
|
|
|
|
! RUN: rm -rf %t && mkdir -p %t/dir-flang
|
|
|
|
! RUN: cd %t && %flang -fsyntax-only -J%t/dir-flang %s
|
|
|
|
! RUN: ls %t/dir-flang/testmodule.mod && not ls %t/testmodule.mod
|
2021-02-23 01:03:19 +08:00
|
|
|
|
|
|
|
module testmodule
|
|
|
|
type::t2
|
|
|
|
end type
|
|
|
|
end
|