re PR lto/87187 (FAIL: gfortran.dg/short_circuiting_3.f90 -g -flto (internal compiler error) on darwin)

2019-01-24  Richard Biener  <rguenther@suse.de>

	PR lto/87187
	* tree-streamer-out.c (write_ts_decl_common_tree_pointers):
	When in "legacy" debug mode make sure to reset self-origins.

From-SVN: r268236
This commit is contained in:
Richard Biener 2019-01-24 12:36:14 +00:00 committed by Richard Biener
parent 12502bf2e9
commit 0e2eb6abeb
2 changed files with 16 additions and 1 deletions

View file

@ -1,3 +1,9 @@
2019-01-24 Richard Biener <rguenther@suse.de>
PR lto/87187
* tree-streamer-out.c (write_ts_decl_common_tree_pointers):
When in "legacy" debug mode make sure to reset self-origins.
2019-01-24 Martin Liska <mliska@suse.cz>
PR gcov-profile/88994

View file

@ -603,7 +603,16 @@ write_ts_decl_common_tree_pointers (struct output_block *ob, tree expr,
special handling in LTO, it must be handled by streamer hooks. */
stream_write_tree (ob, DECL_ATTRIBUTES (expr), ref_p);
stream_write_tree (ob, DECL_ABSTRACT_ORIGIN (expr), ref_p);
/* On non-early-LTO enabled targets we claim we compiled with -g0
but dwarf2out still did its set_decl_origin_self game fooling
itself late. Und that here since we won't have access to the
early generated abstract DIEs. */
tree ao = DECL_ABSTRACT_ORIGIN (expr);
if (debug_info_level == DINFO_LEVEL_NONE
&& ao == expr)
ao = NULL_TREE;
stream_write_tree (ob, ao, ref_p);
if ((VAR_P (expr) || TREE_CODE (expr) == PARM_DECL)
&& DECL_HAS_VALUE_EXPR_P (expr))