On Fri, Feb 27, 2015 at 02:31:38PM +0100, Andreas Schwab wrote:
> Sebastian Pop <seb...@gmail.com> writes:
> 
> > +void
> > +baz (void)
> > +{
> > +  while (1)
> > +    {
> > +      a = foo ();
> > +      b = foo ();
> 
> FAIL: gcc.dg/tree-ssa/ssa-dom-thread-9.c (test for excess errors)
> Excess errors:
> /daten/aranym/gcc/gcc-20150227/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-9.c:45:11:
>  error: too few arguments to function 'foo'
> /daten/aranym/gcc/gcc-20150227/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-9.c:46:11:
>  error: too few arguments to function 'foo'

Indeed.  Unfortunately, the reduced testcase that got reported
only triggers the ICE if it contains the two issues
1) K&R style definition, so the caller can call it with no arguments
2) missing return in foo in some cases

Thus the r221020 not only replaced a warning with two errors, but also
turned a testcase that tested the FSM bug into one that doesn't.

Fixed thusly, verified it succeeds with current trunk and fails (ICEs) with
a few days old trunk, and committed as obvious to trunk.

2015-02-27  Jakub Jelinek  <ja...@redhat.com>

        PR tree-optimization/65048
        * gcc.dg/tree-ssa/ssa-dom-thread-9.c: Add -std=gnu89 to dg-options.
        (foo): Use K&R style definition.

--- gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-9.c.jj 2015-02-26 
22:00:09.000000000 +0100
+++ gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-9.c    2015-02-27 
15:30:09.102675253 +0100
@@ -1,12 +1,13 @@
 /* PR 65048 */
 /* { dg-do compile } */
-/* { dg-options "-O3" } */
+/* { dg-options "-O3 -std=gnu89" } */
 
 int a, b, c, d;
 void fn (void);
 
 int
-foo (int x)
+foo (x)
+     int x;
 {
   switch (x)
     {


        Jakub

Reply via email to