aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.apple/non-lazy-ptr-test.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.apple/non-lazy-ptr-test.c')
-rw-r--r--gcc/testsuite/gcc.apple/non-lazy-ptr-test.c40
1 files changed, 40 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.apple/non-lazy-ptr-test.c b/gcc/testsuite/gcc.apple/non-lazy-ptr-test.c
new file mode 100644
index 00000000000..e496784d32b
--- /dev/null
+++ b/gcc/testsuite/gcc.apple/non-lazy-ptr-test.c
@@ -0,0 +1,40 @@
+/* { dg-do compile { target powerpc*-apple-darwin* } } */
+/* { dg-options "-S" } */
+
+typedef void PF (void);
+
+static void f(void) {
+}
+
+void f1(void) {
+}
+
+extern void f2(void) {
+}
+
+static void f3(void);
+
+__private_extern__ void pe(void)
+{
+}
+
+PF* g (void) { f(); return f; }
+PF* x (void) { return f1; }
+PF* y (void) { f2(); return f2; }
+PF* z (void) { return f3; }
+PF* w (void) { pe(); return pe; }
+
+int main()
+{
+ (*g())();
+ (*x())();
+ (*y())();
+ (*z())();
+ (*w())();
+ return 0;
+}
+
+void f3(void) {
+}
+
+/* { dg-final { scan-assembler-not "non_lazy_ptr" } } */