aboutsummaryrefslogtreecommitdiff
path: root/gcc/dwarf2out.c
diff options
context:
space:
mode:
authorAldy Hernandez <aldyh@redhat.com>2016-07-19 19:29:42 +0000
committerAldy Hernandez <aldyh@gcc.gnu.org>2016-07-19 19:29:42 +0000
commitf36a3ff7f79ee4c039716557cb6205c5a3ae1924 (patch)
treeffd490f736b674ec1f96169d825b6a32cfcdac17 /gcc/dwarf2out.c
parent4fda19ef2b56cd04d557e44e742984e8318b5c3c (diff)
downloadgcc-f36a3ff7f79ee4c039716557cb6205c5a3ae1924.zip
gcc-f36a3ff7f79ee4c039716557cb6205c5a3ae1924.tar.gz
gcc-f36a3ff7f79ee4c039716557cb6205c5a3ae1924.tar.bz2
re PR debug/71855 (duplicate unspecified_parameters DIE in DWARF for functions with variable arguments)
PR debug/71855 * dwarf2out.c (gen_subprogram_die): Only call gen_unspecified_parameters_die while dumping early dwarf. From-SVN: r238488
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r--gcc/dwarf2out.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 9da2b3b..e3cb586 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -20726,14 +20726,17 @@ gen_subprogram_die (tree decl, dw_die_ref context_die)
void_type_node 2) an unprototyped function declaration (not a
definition). This just means that we have no info about the
parameters at all. */
- if (prototype_p (TREE_TYPE (decl)))
+ if (early_dwarf)
{
- /* This is the prototyped case, check for.... */
- if (stdarg_p (TREE_TYPE (decl)))
+ if (prototype_p (TREE_TYPE (decl)))
+ {
+ /* This is the prototyped case, check for.... */
+ if (stdarg_p (TREE_TYPE (decl)))
+ gen_unspecified_parameters_die (decl, subr_die);
+ }
+ else if (DECL_INITIAL (decl) == NULL_TREE)
gen_unspecified_parameters_die (decl, subr_die);
}
- else if (DECL_INITIAL (decl) == NULL_TREE)
- gen_unspecified_parameters_die (decl, subr_die);
}
if (subr_die != old_die)