c++: Fix langspecs with -fsyntax-only [PR98591]
authorNathan Sidwell <nathan@acm.org>
Fri, 15 Jan 2021 16:48:54 +0000 (08:48 -0800)
committerNathan Sidwell <nathan@acm.org>
Fri, 15 Jan 2021 16:56:20 +0000 (08:56 -0800)
commit492b90f33dfb37576dc7ae424d67b2be8b959bf2
tree4b1e530bbf268ab2ac27b844ea2a9f738fea35a1
parent5a783f42d77b2f00a1ed171c119b020e8df8e521
c++: Fix langspecs with -fsyntax-only [PR98591]

-fsyntax-only is handled specially in the driver and causes it to add
 '-o /dev/null' (or a suitable OS-specific variant thereof).  PCH is
 handled in the language driver.  I'd not sufficiently protected the
 -fmodule-only action of adding a dummy assembler from the actions of
 -fsyntax-only, so we ended up with two -o options.

PR c++/98591
gcc/cp/
* lang-specs.h: Fix handling of -fmodule-only with -fsyntax-only.
gcc/cp/lang-specs.h
gcc/testsuite/g++.dg/modules/pr98591.H [new file with mode: 0644]