This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix PR59543


This fixes PR59543 (confirmed by Jakub for the testcase at least)
by not dropping debug stmts during WPA phase.

LTO profiled-bootstrapped on x86_64-unknown-linux-gnu, applied.

Honza - you can always come up with a better fix for 4.10.

Richard.

2014-03-19  Richard Biener  <rguenther@suse.de>

	PR lto/59543
	* lto-streamer-in.c (input_function): In WPA stage do not drop
	debug stmts.

Index: lto-streamer-in.c
===================================================================
--- lto-streamer-in.c	(revision 208642)
+++ lto-streamer-in.c	(working copy)
@@ -988,7 +988,7 @@ input_function (tree fn_decl, struct dat
 	     We can't remove them earlier because this would cause uid
 	     mismatches in fixups, but we can do it at this point, as
 	     long as debug stmts don't require fixups.  */
-	  if (!MAY_HAVE_DEBUG_STMTS && is_gimple_debug (stmt))
+	  if (!MAY_HAVE_DEBUG_STMTS && !flag_wpa && is_gimple_debug (stmt))
 	    {
 	      gimple_stmt_iterator gsi = bsi;
 	      gsi_next (&bsi);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]