+2020-01-20 Richard Biener <rguenther@suse.de>
+
+ PR debug/92763
+ * dwarf2out.c (prune_unused_types): Unconditionally mark
+ called function DIEs.
+
2020-01-20 Martin Liska <mliska@suse.cz>
PR tree-optimization/93199
for (i = 0; base_types.iterate (i, &base_type); i++)
prune_unused_types_mark (base_type, 1);
- /* For -fvar-tracking-assignments, also set the mark on nodes that could be
- referenced by DW_TAG_call_site DW_AT_call_origin (i.e. direct call
- callees). */
+ /* Also set the mark on nodes that could be referenced by
+ DW_TAG_call_site DW_AT_call_origin (i.e. direct call callees) or
+ by DW_TAG_inlined_subroutine origins. */
cgraph_node *cnode;
FOR_EACH_FUNCTION (cnode)
if (cnode->referred_to_p (false))
if (die == NULL || die->die_mark)
continue;
for (cgraph_edge *e = cnode->callers; e; e = e->next_caller)
- if (e->caller != cnode
- && opt_for_fn (e->caller->decl, flag_var_tracking_assignments))
+ if (e->caller != cnode)
{
prune_unused_types_mark (die, 1);
break;
--- /dev/null
+// { dg-do compile }
+// { dg-additional-options "-fno-var-tracking-assignments -fopenmp" }
+
+struct A
+{
+ typedef int T;
+ #pragma omp declare reduction (y : T : [&omp_out, &omp_in]() { omp_out += omp_in; return 0; }()) initializer (omp_priv = [omp_orig]() { return omp_orig; }())
+ static void foo ();
+};
+
+void
+A::foo ()
+{
+ int r = 0, s = 0;
+ #pragma omp parallel for reduction (y : r, s)
+ for (int i = 0; i < 1; i++)
+ {
+ }
+}