(TREE_OPTIMIZATION (DECL_FUNCTION_SPECIFIC_OPTIMIZATION (decl))));
hstate.add_flag (DECL_CXX_CONSTRUCTOR_P (decl));
hstate.add_flag (DECL_CXX_DESTRUCTOR_P (decl));
+ hstate.add_flag (DECL_STATIC_CHAIN (decl));
set_hash (hstate.end ());
}
}
if (list1 || list2)
- return return_false_with_msg ("Mismatched number of parameters");
+ return return_false_with_msg ("mismatched number of parameters");
+
+ if (DECL_STATIC_CHAIN (decl) != DECL_STATIC_CHAIN (item->decl))
+ return return_false_with_msg ("static chain mismatch");
if (node->num_references () != item->node->num_references ())
return return_false_with_msg ("different number of references");
return return_false ();
}
if (arg1 || arg2)
- return return_false_with_msg ("Mismatched number of arguments");
+ return return_false_with_msg ("mismatched number of arguments");
+
+ if (DECL_STATIC_CHAIN (decl) != DECL_STATIC_CHAIN (m_compared_func->decl))
+ return return_false_with_msg ("static chain mismatch");
if (!dyn_cast <cgraph_node *> (node)->has_gimple_body_p ())
return true;
--- /dev/null
+-- { dg-do link }
+-- { dg-options "-O2 -gnatp -flto" { target lto } }
+
+with Ada.Containers.Hashed_Maps;
+with Ada.Strings.Hash;
+
+procedure Lto27 is
+ subtype Node_Name is String (1 .. 4);
+
+ package Node_Maps is new Ada.Containers.Hashed_Maps
+ (Key_Type => Node_Name,
+ Element_Type => Integer,
+ Hash => Ada.Strings.Hash,
+ Equivalent_Keys => "=");
+
+begin
+ null;
+end;