summaryrefslogtreecommitdiff
path: root/gcc/tree-object-size.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-object-size.c')
-rw-r--r--gcc/tree-object-size.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/gcc/tree-object-size.c b/gcc/tree-object-size.c
index d35922c38ff..fcf9316a395 100644
--- a/gcc/tree-object-size.c
+++ b/gcc/tree-object-size.c
@@ -25,7 +25,6 @@ along with GCC; see the file COPYING3. If not see
#include "tm.h"
#include "tree.h"
#include "diagnostic-core.h"
-#include "tree-pretty-print.h"
#include "gimple-pretty-print.h"
#include "tree-flow.h"
#include "tree-pass.h"
@@ -974,14 +973,12 @@ collect_object_sizes_for (struct object_size_info *osi, tree var)
break;
case GIMPLE_NOP:
- {
- tree decl = SSA_NAME_VAR (var);
-
- if (TREE_CODE (decl) != PARM_DECL && DECL_INITIAL (decl))
- expr_object_size (osi, var, DECL_INITIAL (decl));
- else
- expr_object_size (osi, var, decl);
- }
+ if (SSA_NAME_VAR (var)
+ && TREE_CODE (SSA_NAME_VAR (var)) == PARM_DECL)
+ expr_object_size (osi, var, SSA_NAME_VAR (var));
+ else
+ /* Uninitialized SSA names point nowhere. */
+ object_sizes[object_size_type][varno] = unknown[object_size_type];
break;
case GIMPLE_PHI: