aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/20010605-3.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.c-torture/compile/20010605-3.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.c-torture/compile/20010605-3.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/20010605-3.c b/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/20010605-3.c
new file mode 100644
index 000000000..a43c0b1e4
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/20010605-3.c
@@ -0,0 +1,20 @@
+struct A { unsigned long buf[100]; };
+int foo(unsigned int *x)
+{
+ unsigned int a;
+
+ if (!x)
+ return -22;
+
+#ifdef __ia64__
+ if (({
+ register long b asm ("r8") = 0;
+ register long c asm ("r9") = 0;
+ asm ("" : "=r"(c), "=r"(b) : "m"(*(struct A *)x), "1"(b));
+ a = (unsigned int) c;
+ b; }))
+ return -14;
+#endif
+
+ return 0;
+}