aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/20020927-1.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.c-torture/compile/20020927-1.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.c-torture/compile/20020927-1.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/20020927-1.c b/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/20020927-1.c
new file mode 100644
index 000000000..b93d8a18d
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/20020927-1.c
@@ -0,0 +1,26 @@
+/* PR optimization/7520 */
+/* ICE at -O3 on x86 due to register life problems caused by
+ the return-without-value in bar. */
+
+int
+foo ()
+{
+ int i;
+ long long int j;
+
+ while (1)
+ {
+ if (j & 1)
+ ++i;
+ j >>= 1;
+ if (j)
+ return i;
+ }
+}
+
+int
+bar ()
+{
+ if (foo ())
+ return;
+}