summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/compile/loadhicc.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.c-torture/compile/loadhicc.c')
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/loadhicc.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/compile/loadhicc.c b/gcc/testsuite/gcc.c-torture/compile/loadhicc.c
new file mode 100644
index 00000000000..a7540894f5e
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/loadhicc.c
@@ -0,0 +1,15 @@
+typedef int xtype;
+
+foo (p, pc)
+ xtype *p;
+ char *pc;
+{
+ xtype a;
+ unsigned b = 0;
+
+ a = *p;
+ p[1] = a;
+ if ((unsigned) p[1] > 0)
+ return 1;
+ return a;
+}