public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/48467] New: [LTO/driver] Anomalous behavior of -save-temps
@ 2011-04-05 18:45 d.g.gorbachev at gmail dot com
2011-04-06 10:02 ` [Bug lto/48467] " rguenth at gcc dot gnu.org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: d.g.gorbachev at gmail dot com @ 2011-04-05 18:45 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48467
Summary: [LTO/driver] Anomalous behavior of -save-temps
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: lto
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: d.g.gorbachev@gmail.com
Created attachment 23884
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23884
DIFF file with 4 tests
1. After running the 1st test, notice the absence of one generated assembler
file (1.s), which is deleted by lto1. In toplev.c,
1851 if (flag_wpa)
1852 unlink_if_ordinary (asm_file_name);
2. As the 2nd and 3rd tests show, it can also be misused as an output file for
lto1, so its original, written by cc1, content gets lost.
3. The 4th test gives good, expected results.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug lto/48467] [LTO/driver] Anomalous behavior of -save-temps
2011-04-05 18:45 [Bug lto/48467] New: [LTO/driver] Anomalous behavior of -save-temps d.g.gorbachev at gmail dot com
@ 2011-04-06 10:02 ` rguenth at gcc dot gnu.org
2011-04-08 13:10 ` rguenth at gcc dot gnu.org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-04-06 10:02 UTC (permalink / raw)
To: gcc-bugs
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.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug lto/48467] [LTO/driver] Anomalous behavior of -save-temps
2011-04-05 18:45 [Bug lto/48467] New: [LTO/driver] Anomalous behavior of -save-temps d.g.gorbachev at gmail dot com
2011-04-06 10:02 ` [Bug lto/48467] " rguenth at gcc dot gnu.org
@ 2011-04-08 13:10 ` rguenth at gcc dot gnu.org
2011-04-08 13:11 ` rguenth at gcc dot gnu.org
2011-04-19 18:54 ` [Bug lto/48467] [LTO] " d.g.gorbachev at gmail dot com
3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-04-08 13:10 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48467
--- Comment #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-04-08 13:10:31 UTC ---
Author: rguenth
Date: Fri Apr 8 13:10:27 2011
New Revision: 172181
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=172181
Log:
2011-04-08 Richard Guenther <rguenther@suse.de>
PR lto/48467
* toplev.c (lang_dependent_init): Do not open asm_out_file
in WPA mode, nor perform debug machinery initialization.
(finalize): Do not unlink asm_out_file in WPA mode.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/toplev.c
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug lto/48467] [LTO/driver] Anomalous behavior of -save-temps
2011-04-05 18:45 [Bug lto/48467] New: [LTO/driver] Anomalous behavior of -save-temps d.g.gorbachev at gmail dot com
2011-04-06 10:02 ` [Bug lto/48467] " rguenth at gcc dot gnu.org
2011-04-08 13:10 ` rguenth at gcc dot gnu.org
@ 2011-04-08 13:11 ` rguenth at gcc dot gnu.org
2011-04-19 18:54 ` [Bug lto/48467] [LTO] " d.g.gorbachev at gmail dot com
3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-04-08 13:11 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48467
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.7.0
--- Comment #3 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-04-08 13:10:51 UTC ---
Fixed for 4.7.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug lto/48467] [LTO] Anomalous behavior of -save-temps
2011-04-05 18:45 [Bug lto/48467] New: [LTO/driver] Anomalous behavior of -save-temps d.g.gorbachev at gmail dot com
` (2 preceding siblings ...)
2011-04-08 13:11 ` rguenth at gcc dot gnu.org
@ 2011-04-19 18:54 ` d.g.gorbachev at gmail dot com
3 siblings, 0 replies; 5+ messages in thread
From: d.g.gorbachev at gmail dot com @ 2011-04-19 18:54 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48467
Dmitry Gorbachev <d.g.gorbachev at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[LTO/driver] Anomalous |[LTO] Anomalous behavior of
|behavior of -save-temps |-save-temps
--- Comment #4 from Dmitry Gorbachev <d.g.gorbachev at gmail dot com> 2011-04-19 18:53:51 UTC ---
Second bug is now bug 48691.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-04-19 18:54 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-05 18:45 [Bug lto/48467] New: [LTO/driver] Anomalous behavior of -save-temps d.g.gorbachev at gmail dot com
2011-04-06 10:02 ` [Bug lto/48467] " rguenth at gcc dot gnu.org
2011-04-08 13:10 ` rguenth at gcc dot gnu.org
2011-04-08 13:11 ` rguenth at gcc dot gnu.org
2011-04-19 18:54 ` [Bug lto/48467] [LTO] " d.g.gorbachev at gmail dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).