Patchwork [google/integration] Fix testsuite error introduced in r174121

login
register
mail settings
Submitter Simon Baldwin
Date May 27, 2011, 12:35 p.m.
Message ID <20110527123506.5151A1DA1CA@topo.tor.corp.google.com>
Download mbox | patch
Permalink /patch/97676/
State New
Headers show

Comments

Simon Baldwin - May 27, 2011, 12:35 p.m.
Fix testsuite error introduced in r174121.

r174121 introduces a new warn_self_assign options variable that conflicts
with a static function in gcc/testsuite/g{cc,++}.dg/plugin/selfassign.c.
Import a small portion of r172992 to avoid the problem.

Okay for google/integration?

gcc/testsuite/ChangeLog.google-integration:
2011-05-27  Simon Baldwin  <simonb@google.com>

	* testsuite/gcc.dg/plugin/selfassign.c (check_self_assign): Renamed
	from warn_self_assign.
	(execute_warn_self_assign): Call a function by its new name.
	* testsuite/g++.dg/plugin/selfassign.c (check_self_assign): Renamed
	from warn_self_assign.
	(execute_warn_self_assign): Call a function by its new name.
Diego Novillo - May 27, 2011, 12:40 p.m.
On Fri, May 27, 2011 at 08:35, Simon Baldwin <simonb@google.com> wrote:
> Fix testsuite error introduced in r174121.
>
> r174121 introduces a new warn_self_assign options variable that conflicts
> with a static function in gcc/testsuite/g{cc,++}.dg/plugin/selfassign.c.
> Import a small portion of r172992 to avoid the problem.
>
> Okay for google/integration?
>
> gcc/testsuite/ChangeLog.google-integration:
> 2011-05-27  Simon Baldwin  <simonb@google.com>
>
>        * testsuite/gcc.dg/plugin/selfassign.c (check_self_assign): Renamed
>        from warn_self_assign.
>        (execute_warn_self_assign): Call a function by its new name.
>        * testsuite/g++.dg/plugin/selfassign.c (check_self_assign): Renamed
>        from warn_self_assign.
>        (execute_warn_self_assign): Call a function by its new name.

OK.


Diego.

Patch

Index: gcc/testsuite/gcc.dg/plugin/selfassign.c
===================================================================
--- gcc/testsuite/gcc.dg/plugin/selfassign.c	(revision 174121)
+++ gcc/testsuite/gcc.dg/plugin/selfassign.c	(working copy)
@@ -194,7 +194,7 @@  compare_and_warn (gimple stmt, tree lhs,
 /* Check and warn if STMT is a self-assign statement.  */
 
 static void
-warn_self_assign (gimple stmt)
+check_self_assign (gimple stmt)
 {
   tree rhs, lhs;
 
@@ -247,7 +247,7 @@  execute_warn_self_assign (void)
   FOR_EACH_BB (bb)
     {
       for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi))
-        warn_self_assign (gsi_stmt (gsi));
+        check_self_assign (gsi_stmt (gsi));
     }
 
   return 0;
Index: gcc/testsuite/g++.dg/plugin/selfassign.c
===================================================================
--- gcc/testsuite/g++.dg/plugin/selfassign.c	(revision 174121)
+++ gcc/testsuite/g++.dg/plugin/selfassign.c	(working copy)
@@ -194,7 +194,7 @@  compare_and_warn (gimple stmt, tree lhs,
 /* Check and warn if STMT is a self-assign statement.  */
 
 static void
-warn_self_assign (gimple stmt)
+check_self_assign (gimple stmt)
 {
   tree rhs, lhs;
 
@@ -247,7 +247,7 @@  execute_warn_self_assign (void)
   FOR_EACH_BB (bb)
     {
       for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi))
-        warn_self_assign (gsi_stmt (gsi));
+        check_self_assign (gsi_stmt (gsi));
     }
 
   return 0;