[Bug driver/33980] Precompiled header file not removed on error

2023-05-19 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=33980

Andrew Pinski  changed:

   What|Removed |Added

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

--- Comment #8 from Andrew Pinski  ---
Fixed finally.

[Bug driver/33980] Precompiled header file not removed on error

2023-05-19 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=33980

--- Comment #7 from CVS Commits  ---
The trunk branch has been updated by Andrew Pinski :

https://gcc.gnu.org/g:cddb6dd6668843db351807ab8d2ff7440109f39a

commit r14-1000-gcddb6dd6668843db351807ab8d2ff7440109f39a
Author: Andrew Pinski 
Date:   Fri May 19 06:12:49 2023 +

Fix driver/33980: Precompiled header file not removed on error

So the problem here is that in the spec files, we were not marking the pch
output file to be removed on error.
The way to fix this is to mark the --output-pch argument as the output
file argument.
For the C++ specs file, we had to move around where the %V was located
such that it would be after the %w marker as %V marker clears the
outputfiles.

OK? Bootstrapped and tested on x86_64-linux-gnu.

gcc/cp/ChangeLog:

PR driver/33980
* lang-specs.h ("@c++-header"): Add %w after
the --output-pch.
("@c++-system-header"): Likewise.
("@c++-user-header"): Likewise.

gcc/ChangeLog:

PR driver/33980
* gcc.cc (default_compilers["@c-header"]): Add %w
after the --output-pch.

[Bug driver/33980] Precompiled header file not removed on error

2023-05-18 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=33980

--- Comment #6 from Andrew Pinski  ---
Created attachment 55114
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55114&action=edit
Patch which I am testing

[Bug driver/33980] Precompiled header file not removed on error

2023-05-18 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=33980

Andrew Pinski  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
  Component|pch |driver
   Assignee|unassigned at gcc dot gnu.org  |pinskia at gcc dot 
gnu.org

--- Comment #5 from Andrew Pinski  ---
I think I have a simple patch for this.