http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48467
Richard Guenther <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |ASSIGNED Last reconfirmed| |2011.04.06 10:01:51 AssignedTo|unassigned at gcc dot |rguenth at gcc dot gnu.org |gnu.org | Ever Confirmed|0 |1 --- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-04-06 10:01:51 UTC --- Confirmed. What we could do is try to arrange for the WPA lto1 stage to receive -o /dev/null, as it will not produce regular output. Or to simply avoid calling init_asm_output () for -fwpa. So, sth like Index: toplev.c =================================================================== --- toplev.c (revision 172023) +++ toplev.c (working copy) @@ -1743,7 +1743,8 @@ lang_dependent_init (const char *name) return 0; input_location = save_loc; - init_asm_output (name); + if (!flag_wpa) + init_asm_output (name); /* If stack usage information is desired, open the output file. */ if (flag_stack_usage) @@ -1848,8 +1849,6 @@ finalize (bool no_backend) fatal_error ("error writing to %s: %m", asm_file_name); if (fclose (asm_out_file) != 0) fatal_error ("error closing %s: %m", asm_file_name); - if (flag_wpa) - unlink_if_ordinary (asm_file_name); } if (stack_usage_file) which likely needs fixups throughout the compiler in case of missing asm_out_file checks.