aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.apple/asm-function-6.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.apple/asm-function-6.c')
-rw-r--r--gcc/testsuite/gcc.apple/asm-function-6.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.apple/asm-function-6.c b/gcc/testsuite/gcc.apple/asm-function-6.c
new file mode 100644
index 00000000000..1ff272e183e
--- /dev/null
+++ b/gcc/testsuite/gcc.apple/asm-function-6.c
@@ -0,0 +1,33 @@
+/* APPLE LOCAL file CW asm blocks */
+/* Test entry points in asm functions. */
+
+/* { dg-do run { target powerpc*-*-* } } */
+/* { dg-options "-fasm-blocks -O2" } */
+
+void abort(void);
+
+int entry1(int);
+int entry2(int);
+int entry3(int);
+
+asm int foo(int x)
+{
+ addi r3,r3,45
+ entry entry1
+ addi r3,r3,1
+ entry static entry2
+ addi r3,r3,1
+ entry extern entry3
+ addi r3,r3,1
+}
+
+int main ()
+{
+ if (entry1(0) != 3)
+ abort();
+ if (entry2(89) != 91)
+ abort();
+ if (entry3(100) != 101)
+ abort();
+ return 0;
+}