OSDN Git Service

./:
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / plugin / selfassign.c
index 9e7e84c..f804222 100644 (file)
@@ -2,6 +2,7 @@
    self-assignment statements.  */
 /* { dg-options "-O" } */
 
+#include "gcc-plugin.h"
 #include "config.h"
 #include "system.h"
 #include "coretypes.h"
 #include "tree.h"
 #include "tree-pass.h"
 #include "intl.h"
-#include "gcc-plugin.h"
 
 
+int plugin_is_GPL_compatible;
+
 /* Indicate whether to check overloaded operator '=', which is performed by
    default. To disable it, use -fplugin-arg-NAME-no-check-operator-eq.  */
 bool check_operator_eq = true;
@@ -185,9 +187,9 @@ compare_and_warn (gimple stmt, tree lhs, tree rhs)
          specifying LHS in the message.  */
       lhs = get_non_ssa_expr (lhs);
       if (lhs)
-        warning (0, G_("%H%qE is assigned to itself"), &location, lhs);
+        warning_at (location, 0, G_("%qE is assigned to itself"), lhs);
       else
-        warning (0, G_("%Hself-assignment detected"), &location);
+        warning_at (location, 0, G_("self-assignment detected"));
     }
 }
 
@@ -297,7 +299,7 @@ int
 plugin_init (struct plugin_name_args *plugin_info,
              struct plugin_gcc_version *version)
 {
-  struct plugin_pass pass_info;
+  struct register_pass_info pass_info;
   const char *plugin_name = plugin_info->base_name;
   int argc = plugin_info->argc;
   struct plugin_argument *argv = plugin_info->argv;