summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pic-macro-define.c
diff options
context:
space:
mode:
authorfjahanian <fjahanian@138bc75d-0d04-0410-961f-82ee72b054a4>2005-08-24 18:22:12 +0000
committerfjahanian <fjahanian@138bc75d-0d04-0410-961f-82ee72b054a4>2005-08-24 18:22:12 +0000
commitf4447a5d43593683a99ab182766d0be41ba4a52f (patch)
treeded4a0527da18fb1860de81c2bc1e0f27467e8fb /gcc/testsuite/gcc.dg/pic-macro-define.c
parenteb1877fe3f3ddbcf8fa464f6aac45b577e2a592e (diff)
downloadgcc-f4447a5d43593683a99ab182766d0be41ba4a52f.tar.gz
Define __PIC__ for darwin targets.
OKed by Mike Stump. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@103447 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/pic-macro-define.c')
-rw-r--r--gcc/testsuite/gcc.dg/pic-macro-define.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pic-macro-define.c b/gcc/testsuite/gcc.dg/pic-macro-define.c
new file mode 100644
index 00000000000..7bda6fedfef
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pic-macro-define.c
@@ -0,0 +1,10 @@
+/* { dg-do run { target "i?86-*-*-darwin" powerpc*-*-darwin* } } */
+/* { dg-options "-fPIC" } */
+
+#if defined __PIC__
+int main() {
+ return 0;
+}
+#else
+ error "NO __PIC__ DEFINED"
+#endif