aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/asm-function-11.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/asm-function-11.C')
-rw-r--r--gcc/testsuite/g++.dg/asm-function-11.C24
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/asm-function-11.C b/gcc/testsuite/g++.dg/asm-function-11.C
new file mode 100644
index 00000000000..c46d4c5a292
--- /dev/null
+++ b/gcc/testsuite/g++.dg/asm-function-11.C
@@ -0,0 +1,24 @@
+/* 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()
+{
+ lwz r1,-8+tDummyStruct.fSample(r2)
+ stw r1,-8+tDummyStruct.fSample(r2)
+ lwz r1,-8-(tDummyStruct.fSample-tDummyStruct.fDummy)(r2)
+ stw r1,-8-(tDummyStruct.fSample-tDummyStruct.fDummy)(r2)
+}
+
+int main (int argc, char * const argv[])
+{
+ foo();
+}
+
+