summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/unsorted/xbg.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.c-torture/unsorted/xbg.c')
-rw-r--r--gcc/testsuite/gcc.c-torture/unsorted/xbg.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/unsorted/xbg.c b/gcc/testsuite/gcc.c-torture/unsorted/xbg.c
new file mode 100644
index 000000000..b600964d4
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/unsorted/xbg.c
@@ -0,0 +1,14 @@
+typedef short type;
+
+short
+foo (type *sp, int a)
+{
+ type t;
+ int i;
+
+ t = sp[a];
+ i = (int)(type)sp[a];
+ if (i)
+ return 0;
+ return t;
+}