]> git.ipfire.org Git - thirdparty/gcc.git/commit
lto-wrapper.cc: Delete offload_names temp files in case of error [PR106686]
authorTobias Burnus <tobias@codesourcery.com>
Mon, 22 Aug 2022 07:53:25 +0000 (09:53 +0200)
committerTobias Burnus <tobias@codesourcery.com>
Mon, 22 Aug 2022 07:53:25 +0000 (09:53 +0200)
commit36423e873e82a0fcdf6450963d684ed843ee74fe
tree6ea64860121afdfb559316caf610ec25da374001
parent2e67ccf9bb71950e5bb98de365b06e336b06fa87
lto-wrapper.cc: Delete offload_names temp files in case of error [PR106686]

Usually, the caller takes care of the .o files for the offload compilers
(suffix: ".target.o"). However, if an error occurs during processing
(e.g. fatal error by lto1), they were not deleted.

gcc/ChangeLog:

PR lto/106686
* lto-wrapper.cc (free_array_of_ptrs): Move before tool_cleanup.
(tool_cleanup): Unlink offload_names.
(compile_offload_image): Take filename argument to set it early.
(compile_images_for_offload_targets): Update call; set
offload_names to NULL after freeing the array.

(cherry picked from commit e228683b244c6afbe3bdfef7ba607fbda813bd0f)
gcc/ChangeLog.omp
gcc/lto-wrapper.cc