summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/lrshift_1.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gfortran.dg/lrshift_1.c')
-rw-r--r--gcc/testsuite/gfortran.dg/lrshift_1.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/lrshift_1.c b/gcc/testsuite/gfortran.dg/lrshift_1.c
new file mode 100644
index 000000000..8b451107b
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/lrshift_1.c
@@ -0,0 +1,3 @@
+/* Left and right shift C routines, to compare to Fortran results. */
+int c_lshift_ (int *x, int *y) { return (*x) << (*y); }
+int c_rshift_ (int *x, int *y) { return (*x) >> (*y); }