aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/20110902.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.c-torture/compile/20110902.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.c-torture/compile/20110902.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/20110902.c b/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/20110902.c
new file mode 100644
index 000000000..1556e4a36
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/20110902.c
@@ -0,0 +1,14 @@
+static inline __attribute__((always_inline)) int f (unsigned int n, unsigned int size)
+{
+ return (__builtin_constant_p (size != 0 && n > ~0 / size)
+ ? !!(size != 0 && n > ~0 / size)
+ : ({ static unsigned int count[2] = { 0, 0 };
+ int r = !!(size != 0 && n > ~0 / size);
+ count[r]++;
+ r; }));
+}
+
+int g (unsigned int size)
+{
+ return f (size / 4096, 4);
+}