From: Jakub Jelinek Date: Mon, 15 Dec 2014 18:40:35 +0000 (+0100) Subject: re PR rtl-optimization/63804 (ice in find_oldest_value_reg with -g -O2) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c05816d64ff9c4835485c4b265eadcf8fee48415;p=gcc.git re PR rtl-optimization/63804 (ice in find_oldest_value_reg with -g -O2) PR rtl-optimization/63804 * gcc.dg/pr63804.c: New test. From-SVN: r218758 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 77bd81bbc3b..cdf9ddc5753 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2014-12-15 Jakub Jelinek + + PR rtl-optimization/63804 + * gcc.dg/pr63804.c: New test. + 2014-12-15 Steven Bosscher Jakub Jelinek diff --git a/gcc/testsuite/gcc.dg/pr63804.c b/gcc/testsuite/gcc.dg/pr63804.c new file mode 100644 index 00000000000..f0a02f26ae4 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr63804.c @@ -0,0 +1,52 @@ +/* PR rtl-optimization/63804 */ +/* { dg-do compile } */ +/* { dg-options "-O2 -g" } */ + +struct A { int gen; } e; +int a, d; +long b; +enum B { C }; +struct D +{ + enum B type : 1; + int nr : 1; + struct { unsigned ud; } dw1; +}; +enum B c; + +void +fn1 (int p1) +{ + b = p1 & a; +} + +int fn2 (); +void fn3 (); + +void +fn4 (struct D p1, unsigned p2, int p3) +{ + struct D f, g, h, j = p1, l, m = l; + struct A i = e; + if (i.gen) + p2 = 0; + j.type = c; + g = j; + p1 = g; + fn3 (); + int k = p2, v = p1.nr, p = v; + m.dw1.ud = k; + f = m; + h = f; + struct D n = h; + fn3 (n); + { + d = fn2 (); + int o = d; + fn1 (o); + } + if (i.gen) + fn3 (p1); + b = p & a; + fn3 (p3); +}