RFA: Fix testsuite/91065

Message ID 5D1BD22B.6040907@riscy-ip.com
State New
Headers show
Series
  • RFA: Fix testsuite/91065
Related show

Commit Message

Joern Wolfgang Rennecke July 2, 2019, 9:52 p.m.
Regression tested running plugin.exp testing gcc configured with 
--enable-checking=all (failure fixed),
--enable-checking=yes, and without --enable-checking (both no change).
2019-07-02  Joern Rennecke  <joern.rennecke@riscy-ip.com>

	PR testsuite/91065
	* testsuite/gcc.dg/plugin/start_unit_plugin.c: Register a root tab
	to reference fake_var.

Comments

Jeff Law July 2, 2019, 11:02 p.m. | #1
On 7/2/19 3:52 PM, Joern Wolfgang Rennecke wrote:
> Regression tested running plugin.exp testing gcc configured with

> --enable-checking=all (failure fixed),

> --enable-checking=yes, and without --enable-checking (both no change).

> 

> pr91065-patch.txt

> 

> 2019-07-02  Joern Rennecke  <joern.rennecke@riscy-ip.com>

> 

> 	PR testsuite/91065

> 	* testsuite/gcc.dg/plugin/start_unit_plugin.c: Register a root tab

> 	to reference fake_var.

OK
jeff

Patch

Index: /data/gcc-10-exp/gcc/gcc/testsuite/gcc.dg/plugin/start_unit_plugin.c
===================================================================
--- /data/gcc-10-exp/gcc/gcc/testsuite/gcc.dg/plugin/start_unit_plugin.c	(revision 272931)
+++ /data/gcc-10-exp/gcc/gcc/testsuite/gcc.dg/plugin/start_unit_plugin.c	(working copy)
@@ -40,6 +40,19 @@  gate_start_unit (void)
 
 static void start_unit_callback (void *gcc_data, void *user_data)
 {
+  static const struct ggc_root_tab root[] = {
+    {
+      &fake_var,
+      1,
+      sizeof (fake_var),
+      &gt_ggc_mx_tree_node,
+      &gt_pch_nx_tree_node
+    },
+    LAST_GGC_ROOT_TAB
+  };
+
+  register_callback ("start_unit", PLUGIN_REGISTER_GGC_ROOTS, NULL,
+		     (void *)root);
   if (integer_type_node) {
     fake_var = build_decl (UNKNOWN_LOCATION, VAR_DECL, 
                            get_identifier ("_fake_var_"),