aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMarkus Trippelsdorf <markus@trippelsdorf.de>2012-11-23 15:34:45 +0000
committerPaolo Carlini <paolo@gcc.gnu.org>2012-11-23 15:34:45 +0000
commit59ddadabe4e3d98b2f2cf1df5adbf36b8ee4e05b (patch)
treeb5043d8ef5fc46b85560edbcbec9161b3aaa5267 /gcc
parent1a65a0083e884e3c57bfc2b9d8c0caac7ea4a334 (diff)
downloadgcc-59ddadabe4e3d98b2f2cf1df5adbf36b8ee4e05b.zip
gcc-59ddadabe4e3d98b2f2cf1df5adbf36b8ee4e05b.tar.gz
gcc-59ddadabe4e3d98b2f2cf1df5adbf36b8ee4e05b.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/method.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index c991780..47734c5 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+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>
PR c++/55137
diff --git a/gcc/cp/method.c b/gcc/cp/method.c
index 6dcb63a..778daa8 100644
--- a/gcc/cp/method.c
+++ b/gcc/cp/method.c
@@ -1518,7 +1518,6 @@ implicitly_declare_fn (special_function_kind kind, tree type,
tree name;
HOST_WIDE_INT saved_processing_template_decl;
bool deleted_p;
- bool trivial_p;
bool constexpr_p;
/* Because we create declarations for implicitly declared functions
@@ -1597,12 +1596,13 @@ implicitly_declare_fn (special_function_kind kind, tree type,
tree inherited_base = (inherited_ctor
? DECL_CONTEXT (inherited_ctor)
: NULL_TREE);
+ bool trivial_p = false;
+
if (inherited_ctor && TREE_CODE (inherited_ctor) == TEMPLATE_DECL)
{
/* For an inheriting constructor template, just copy these flags from
the inherited constructor template for now. */
raises = TYPE_RAISES_EXCEPTIONS (TREE_TYPE (inherited_ctor));
- trivial_p = false;
deleted_p = DECL_DELETED_FN (DECL_TEMPLATE_RESULT (inherited_ctor));
constexpr_p
= DECL_DECLARED_CONSTEXPR_P (DECL_TEMPLATE_RESULT (inherited_ctor));