summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/torture/pr27743.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/torture/pr27743.c')
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr27743.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/torture/pr27743.c b/gcc/testsuite/gcc.dg/torture/pr27743.c
new file mode 100644
index 000000000..47d70457c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr27743.c
@@ -0,0 +1,16 @@
+/* { dg-do run { target { stdint_types } } } */
+
+#include <stdint.h>
+extern void abort(void);
+
+int32_t bar (int32_t a)
+{
+ return ((uint32_t) ((a) >> 2)) >> 15;
+}
+
+int main()
+{
+ if (bar (0xffff3000) != 0x1ffff)
+ abort ();
+ return 0;
+}