aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20100805-1.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20100805-1.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20100805-1.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20100805-1.c b/gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20100805-1.c
new file mode 100644
index 000000000..5b476960e
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20100805-1.c
@@ -0,0 +1,15 @@
+unsigned int foo (unsigned int a, unsigned int b)
+{
+ unsigned i;
+ a = a & 1;
+ for (i = 0; i < b; ++i)
+ a = a << 1 | a >> (sizeof (unsigned int) * 8 - 1);
+ return a;
+}
+extern void abort (void);
+int main()
+{
+ if (foo (1, sizeof (unsigned int) * 8 + 1) != 2)
+ abort ();
+ return 0;
+}