aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/asm-function-10.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/asm-function-10.C')
-rw-r--r--gcc/testsuite/g++.dg/asm-function-10.C21
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/asm-function-10.C b/gcc/testsuite/g++.dg/asm-function-10.C
new file mode 100644
index 00000000000..c3ebc52bf65
--- /dev/null
+++ b/gcc/testsuite/g++.dg/asm-function-10.C
@@ -0,0 +1,21 @@
+/* APPLE LOCAL file CW asm blocks */
+/* { dg-do assemble { target powerpc*-*-darwin* } } */
+/* { dg-options "-fasm-blocks" } */
+
+struct tDummyStruct
+{
+ unsigned long fDummy;
+ unsigned long fSample;
+};
+
+asm void foo()
+{
+ lwzu r1,(sizeof(tDummyStruct))(r2) // works
+ lwzu r1,sizeof(tDummyStruct)(r2)
+}
+
+int main (int argc, char * const argv[])
+{
+ foo();
+}
+