[Bug lto/90369] error: could not unlink output file

2019-08-30 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90369

Richard Biener  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED
   Target Milestone|--- |9.2

--- Comment #6 from Richard Biener  ---
GCC 8 and earlier do not have nice names for the debug temps and thus not
suffer from this.

[Bug lto/90369] error: could not unlink output file

2019-07-12 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90369

--- Comment #5 from Richard Biener  ---
Author: rguenth
Date: Fri Jul 12 14:42:14 2019
New Revision: 273446

URL: https://gcc.gnu.org/viewcvs?rev=273446&root=gcc&view=rev
Log:
2019-07-12  Richard Biener  

Backport from mainline
2019-07-04  Jakub Jelinek  

PR tree-optimization/91063
* tree-vect-stmts.c (vect_init_vector): Call gsi_remove to remove
stmt from stmts sequence before calling vect_init_vector_1.
Formatting fix.

* gcc.dg/gomp/pr91063.c: New test.

2019-07-04  Richard Biener  

PR ipa/91062
* tree-pass.h (execute_all_ipa_transforms): Add a flag
parameter whether to disable GC collection.
* passes.c (execute_one_ipa_transform_pass): Likewise, and
honor it.
(execute_all_ipa_transforms): Likewise and pass it down.
* cgraph.c (cgraph_node::get_body): Do not invoke garbage
collection from applying IPA transforms.
* cgraphunit.c (cgraph_node::expand): Allow garbage collection
from applying IPA transforms.

2019-06-27  Richard Biener  

PR testsuite/91004
* g++.dg/torture/pr34850.C: Fix overly reduced testcase.

2019-06-26  Richard Biener  

PR ipa/90982
* tree-inline.c (remap_ssa_name): Copy SSA range info.

* g++.dg/torture/pr90982.C: New testcase.

2019-06-24  Richard Biener  

PR tree-optimization/90972
* tree-vect-stmts.c (vect_init_vector): Handle CONSTANT_CLASS_P
in common code, dealing with STRING_CST properly.

* gcc.dg/torture/pr90972.c: New testcase.

2019-06-21  Richard Biener  

PR debug/90914
* dwarf2out.c (prune_unused_types_walk): Always consider
function-local extern declarations as used.

* g++.dg/debug/pr90914.C: New testcase.

2019-06-18  Richard Biener  

PR debug/90900
* cfgexpand.c (expand_debug_expr): Treat NOTE_P DECL_RTL
as if optimized away.

* gcc.dg/gomp/pr90900.c: New testcase.

2019-05-07  Richard Biener  

PR lto/90369
* lto-wrapper.c (debug_objcopy): Use the original filename
including archive offset for the filename used for -save-temps.

Added:
branches/gcc-9-branch/gcc/testsuite/g++.dg/debug/pr90914.C
branches/gcc-9-branch/gcc/testsuite/g++.dg/torture/pr90982.C
branches/gcc-9-branch/gcc/testsuite/gcc.dg/gomp/pr90900.c
branches/gcc-9-branch/gcc/testsuite/gcc.dg/gomp/pr91063.c
branches/gcc-9-branch/gcc/testsuite/gcc.dg/torture/pr90972.c
Modified:
branches/gcc-9-branch/gcc/ChangeLog
branches/gcc-9-branch/gcc/cfgexpand.c
branches/gcc-9-branch/gcc/cgraph.c
branches/gcc-9-branch/gcc/cgraphunit.c
branches/gcc-9-branch/gcc/dwarf2out.c
branches/gcc-9-branch/gcc/lto-wrapper.c
branches/gcc-9-branch/gcc/passes.c
branches/gcc-9-branch/gcc/testsuite/ChangeLog
branches/gcc-9-branch/gcc/testsuite/g++.dg/torture/pr34850.C
branches/gcc-9-branch/gcc/tree-inline.c
branches/gcc-9-branch/gcc/tree-pass.h
branches/gcc-9-branch/gcc/tree-vect-stmts.c

[Bug lto/90369] error: could not unlink output file

2019-05-07 Thread hoganmeier at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90369

--- Comment #4 from krux  ---
The code was automatically reduced, hence the empty linker script.
Looks promising, seems like you found the cause.

[Bug lto/90369] error: could not unlink output file

2019-05-07 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90369

Richard Biener  changed:

   What|Removed |Added

  Known to work||10.0

--- Comment #3 from Richard Biener  ---
Fixed on trunk sofar.

[Bug lto/90369] error: could not unlink output file

2019-05-07 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90369

--- Comment #2 from Richard Biener  ---
Author: rguenth
Date: Tue May  7 08:52:33 2019
New Revision: 270937

URL: https://gcc.gnu.org/viewcvs?rev=270937&root=gcc&view=rev
Log:
2019-05-07  Richard Biener  

PR lto/90369
* lto-wrapper.c (debug_objcopy): Use the original filename
including archive offset for the filename used for -save-temps.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/lto-wrapper.c

[Bug lto/90369] error: could not unlink output file

2019-05-07 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90369

Richard Biener  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2019-05-07
   Assignee|unassigned at gcc dot gnu.org  |rguenth at gcc dot 
gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Richard Biener  ---
Replicating on x86_64-linux native yields (assuming empty.ld is an empty file):

g++ -o f.elf -T empty.ld -Wl,--gc-sections -O2 -save-temps obj.a
/usr/bin/ld: f.elf: not enough room for program headers, try linking with -N
/usr/bin/ld: final link failed: bad value
/usr/bin/ld: error: could not unlink output file
collect2: error: ld returned 1 exit status

not sure if it really makes sense to link using an empty linker script?  Btw,
the removal error is probably from our debug copying magic:

31920 unlink("/tmp/ccXvUkmS")   = 0
31920 unlink("f.elf.ltrans0.ltrans.o")  = 0
31920 unlink("obj.a.debug.temp.o")  = 0
31920 unlink("obj.a.debug.temp.o")  = -1 ENOENT (No such file or directory)
31920 write(2, "/usr/bin/ld", 11)   = 11
31920 write(2, ": error: could not unlink output"..., 38) = 38

which eventually ends up re-using the same temporary file multiple times
for each archieve member.  Going to fix that.