Commit 59ddadab by Markus Trippelsdorf Committed by Paolo Carlini

re PR c++/55418 (Valgrind: Conditional jump or move depends on uninitialised…

re PR c++/55418 (Valgrind: Conditional jump or move depends on uninitialised value(s) in implicitly_declare_fn() method.c:1623)

2012-11-23  Markus Trippelsdorf  <markus@trippelsdorf.de>

	PR c++/55418
	* method.c (implicitly_declare_fn): Properly initialize trivial_p.

From-SVN: r193758
parent 1a65a008
2012-11-23 Markus Trippelsdorf <markus@trippelsdorf.de>
PR c++/55418
* method.c (implicitly_declare_fn): Properly initialize trivial_p.
2012-11-22 Jason Merrill <jason@redhat.com> 2012-11-22 Jason Merrill <jason@redhat.com>
PR c++/55137 PR c++/55137
......
...@@ -1518,7 +1518,6 @@ implicitly_declare_fn (special_function_kind kind, tree type, ...@@ -1518,7 +1518,6 @@ implicitly_declare_fn (special_function_kind kind, tree type,
tree name; tree name;
HOST_WIDE_INT saved_processing_template_decl; HOST_WIDE_INT saved_processing_template_decl;
bool deleted_p; bool deleted_p;
bool trivial_p;
bool constexpr_p; bool constexpr_p;
/* Because we create declarations for implicitly declared functions /* Because we create declarations for implicitly declared functions
...@@ -1597,12 +1596,13 @@ implicitly_declare_fn (special_function_kind kind, tree type, ...@@ -1597,12 +1596,13 @@ implicitly_declare_fn (special_function_kind kind, tree type,
tree inherited_base = (inherited_ctor tree inherited_base = (inherited_ctor
? DECL_CONTEXT (inherited_ctor) ? DECL_CONTEXT (inherited_ctor)
: NULL_TREE); : NULL_TREE);
bool trivial_p = false;
if (inherited_ctor && TREE_CODE (inherited_ctor) == TEMPLATE_DECL) if (inherited_ctor && TREE_CODE (inherited_ctor) == TEMPLATE_DECL)
{ {
/* For an inheriting constructor template, just copy these flags from /* For an inheriting constructor template, just copy these flags from
the inherited constructor template for now. */ the inherited constructor template for now. */
raises = TYPE_RAISES_EXCEPTIONS (TREE_TYPE (inherited_ctor)); raises = TYPE_RAISES_EXCEPTIONS (TREE_TYPE (inherited_ctor));
trivial_p = false;
deleted_p = DECL_DELETED_FN (DECL_TEMPLATE_RESULT (inherited_ctor)); deleted_p = DECL_DELETED_FN (DECL_TEMPLATE_RESULT (inherited_ctor));
constexpr_p constexpr_p
= DECL_DECLARED_CONSTEXPR_P (DECL_TEMPLATE_RESULT (inherited_ctor)); = DECL_DECLARED_CONSTEXPR_P (DECL_TEMPLATE_RESULT (inherited_ctor));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment