[clang][bytecode] Reject memcpy dummy pointers after null check (#118460)
[llvm-project.git] / flang / test / Driver / include-header.f90
blob28b75e072544e4b178a6659516584c5ef00d7a84
1 ! Ensure argument -I works as expected with an included header.
3 !--------------------------
4 ! FLANG DRIVER (flang)
5 !--------------------------
6 ! RUN: not %flang -E %s 2>&1 | FileCheck %s --check-prefix=UNINCLUDED
7 ! RUN: %flang -E -I %S/Inputs %s 2>&1 | FileCheck %s --check-prefix=SINGLEINCLUDE
8 ! RUN: %flang -E -I %S/Inputs -I %S/Inputs/header-dir %s 2>&1 | FileCheck %s --check-prefix=MAINDIRECTORY
9 ! RUN: %flang -E -I %S/Inputs/header-dir -I %S/Inputs %s 2>&1 | FileCheck %s --check-prefix=SUBDIRECTORY
11 !----------------------------------------
12 ! FRONTEND FLANG DRIVER (flang_fc1)
13 !----------------------------------------
14 ! RUN: not %flang_fc1 -E %s 2>&1 | FileCheck %s --check-prefix=UNINCLUDED
15 ! RUN: %flang_fc1 -E -I %S/Inputs %s 2>&1 | FileCheck %s --check-prefix=SINGLEINCLUDE
16 ! RUN: %flang_fc1 -E -I %S/Inputs -I %S/Inputs/header-dir %s 2>&1 | FileCheck %s --check-prefix=MAINDIRECTORY
17 ! RUN: %flang_fc1 -E -I %S/Inputs/header-dir -I %S/Inputs %s 2>&1 | FileCheck %s --check-prefix=SUBDIRECTORY
19 ! UNINCLUDED:#include: Source file 'basic-header-one.h' was not found
20 ! UNINCLUDED-NOT:program b
21 ! UNINCLUDED-NOT:program c
23 ! SINGLEINCLUDE:program MainDirectoryOne
24 ! SINGLEINCLUDE-NOT:program X
25 ! SINGLEINCLUDE-NOT:program B
26 ! SINGLEINCLUDE:program MainDirectoryTwo
27 ! SINGLEINCLUDE-NOT:program Y
28 ! SINGLEINCLUDE-NOT:program C
30 ! MAINDIRECTORY:program MainDirectoryOne
31 ! MAINDIRECTORY-NOT:program SubDirectoryOne
32 ! MAINDIRECTORY-NOT:program B
33 ! MAINDIRECTORY:program MainDirectoryTwo
34 ! MAINDIRECTORY-NOT:program SubDirectoryTwo
35 ! MAINDIRECTORY-NOT:program C
37 ! SUBDIRECTORY:program SubDirectoryOne
38 ! SUBDIRECTORY-NOT:program MainDirectoryOne
39 ! SUBDIRECTORY-NOT:program B
40 ! SUBDIRECTORY:program SubDirectoryTwo
41 ! SUBDIRECTORY-NOT:program MainDirectoryTwo
42 ! SUBDIRECTORY-NOT:program C
44 ! include-test-one.f90
45 #include <basic-header-one.h>
46 #ifdef X
47 program X
48 #else
49 program B
50 #endif
51 end
53 ! include-test-two.f90
54 #include "basic-header-two.h"
55 #ifdef Y
56 program Y
57 #else
58 program C
59 #endif
60 end