Skip to content

Commit 98a6abc

Browse files
author
rguenth
committed
2017-08-29 Richard Biener <[email protected]>
* dwarf2out.c (add_dwarf_attr): When checking is enabled verify we do not add a DW_AT_inline attribute twice. (gen_subprogram_die): Remove code setting DW_AT_inline on DECL_ABSTRACT_P nodes. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@251409 138bc75d-0d04-0410-961f-82ee72b054a4
1 parent 27c5dc8 commit 98a6abc

File tree

2 files changed

+17
-22
lines changed

2 files changed

+17
-22
lines changed

gcc/ChangeLog

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
2017-08-29 Richard Biener <[email protected]>
2+
3+
* dwarf2out.c (add_dwarf_attr): When checking is enabled verify
4+
we do not add a DW_AT_inline attribute twice.
5+
(gen_subprogram_die): Remove code setting DW_AT_inline on
6+
DECL_ABSTRACT_P nodes.
7+
18
2017-08-29 Richard Sandiford <[email protected]>
29

310
* gimplify.c (gimplify_call_expr): Copy the nothrow flag to

gcc/dwarf2out.c

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4122,6 +4122,16 @@ add_dwarf_attr (dw_die_ref die, dw_attr_node *attr)
41224122
if (die == NULL)
41234123
return;
41244124

4125+
if (flag_checking)
4126+
{
4127+
/* Check we do not add duplicate attrs. Can't use get_AT here
4128+
because that recurses to the specification/abstract origin DIE. */
4129+
dw_attr_node *a;
4130+
unsigned ix;
4131+
FOR_EACH_VEC_SAFE_ELT (die->die_attr, ix, a)
4132+
gcc_assert (a->dw_attr != attr->dw_attr || a->dw_attr != DW_AT_inline);
4133+
}
4134+
41254135
vec_safe_reserve (die->die_attr, 1);
41264136
vec_safe_push (die->die_attr, *attr);
41274137
}
@@ -22082,28 +22092,6 @@ gen_subprogram_die (tree decl, dw_die_ref context_die)
2208222092
add_AT_flag (subr_die, DW_AT_rvalue_reference, 1);
2208322093
}
2208422094
}
22085-
/* Tag abstract instances with DW_AT_inline. */
22086-
else if (DECL_ABSTRACT_P (decl))
22087-
{
22088-
if (DECL_DECLARED_INLINE_P (decl))
22089-
{
22090-
if (cgraph_function_possibly_inlined_p (decl))
22091-
add_AT_unsigned (subr_die, DW_AT_inline, DW_INL_declared_inlined);
22092-
else
22093-
add_AT_unsigned (subr_die, DW_AT_inline, DW_INL_declared_not_inlined);
22094-
}
22095-
else
22096-
{
22097-
if (cgraph_function_possibly_inlined_p (decl))
22098-
add_AT_unsigned (subr_die, DW_AT_inline, DW_INL_inlined);
22099-
else
22100-
add_AT_unsigned (subr_die, DW_AT_inline, DW_INL_not_inlined);
22101-
}
22102-
22103-
if (DECL_DECLARED_INLINE_P (decl)
22104-
&& lookup_attribute ("artificial", DECL_ATTRIBUTES (decl)))
22105-
add_AT_flag (subr_die, DW_AT_artificial, 1);
22106-
}
2210722095
/* For non DECL_EXTERNALs, if range information is available, fill
2210822096
the DIE with it. */
2210922097
else if (!DECL_EXTERNAL (decl) && !early_dwarf)

0 commit comments

Comments
 (0)