re PR lto/65015 (LTO produces randomly ordered debug information)
authorRichard Biener <rguenther@suse.de>
Mon, 16 Feb 2015 14:53:23 +0000 (14:53 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Mon, 16 Feb 2015 14:53:23 +0000 (14:53 +0000)
2015-02-16  Richard Biener  <rguenther@suse.de>

PR lto/65015
* varasm.c (default_file_start): For LTO produced units
emit <artificial> as file directive.

From-SVN: r220735

gcc/ChangeLog
gcc/varasm.c

index 4062b065bad9a17566d2fca4370f3a6ead17906f..e049c99a7916be54c7132957c234d2867b776cd3 100644 (file)
@@ -1,3 +1,9 @@
+2015-02-16  Richard Biener  <rguenther@suse.de>
+
+       PR lto/65015
+       * varasm.c (default_file_start): For LTO produced units
+       emit <artificial> as file directive.
+
 2015-02-16  Richard Biener  <rguenther@suse.de>
 
        PR tree-optimization/63593
index 0211306dba26acf05639f32812cbd93936fb4b18..74854993789130493546201e3137bc98f3309ee4 100644 (file)
@@ -7043,7 +7043,13 @@ default_file_start (void)
     fputs (ASM_APP_OFF, asm_out_file);
 
   if (targetm.asm_file_start_file_directive)
-    output_file_directive (asm_out_file, main_input_filename);
+    {
+      /* LTO produced units have no meaningful main_input_filename.  */
+      if (in_lto_p)
+       output_file_directive (asm_out_file, "<artificial>");
+      else
+       output_file_directive (asm_out_file, main_input_filename);
+    }
 }
 
 /* This is a generic routine suitable for use as TARGET_ASM_FILE_END