summaryrefslogtreecommitdiffstats
path: root/clang/test/Preprocessor/pic.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/Preprocessor/pic.c')
-rw-r--r--clang/test/Preprocessor/pic.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/test/Preprocessor/pic.c b/clang/test/Preprocessor/pic.c
new file mode 100644
index 00000000000..1a2300b1a13
--- /dev/null
+++ b/clang/test/Preprocessor/pic.c
@@ -0,0 +1,10 @@
+// RUN: clang -static -dM -E -o %t %s &&
+// RUN: grep '#define __PIC__' %t | count 0 &&
+// RUN: grep '#define __pic__' %t | count 0 &&
+// RUN: clang -fpic -dM -E -o %t %s &&
+// RUN: grep '#define __PIC__ 1' %t | count 1 &&
+// RUN: grep '#define __pic__ 1' %t | count 1 &&
+// RUN: clang -fPIC -dM -E -o %t %s &&
+// RUN: grep '#define __PIC__ 2' %t | count 1 &&
+// RUN: grep '#define __pic__ 2' %t | count 1 &&
+// RUN: true
OpenPOWER on IntegriCloud