summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/ia64/20010423-1.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.target/ia64/20010423-1.c')
-rw-r--r--gcc/testsuite/gcc.target/ia64/20010423-1.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/ia64/20010423-1.c b/gcc/testsuite/gcc.target/ia64/20010423-1.c
new file mode 100644
index 00000000000..4cec79370de
--- /dev/null
+++ b/gcc/testsuite/gcc.target/ia64/20010423-1.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+int __sync_fetch_and_add_si (int *, int);
+
+inline unsigned int
+bar (volatile unsigned int *mem, unsigned int val)
+{
+ return __sync_fetch_and_add_si((int *)mem, (int)val);
+}
+
+volatile unsigned int x;
+
+void foo (unsigned short *a)
+{
+ *a = bar (&x, 1) + 1;
+}