https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108071

--- Comment #7 from Sergei Trofimovich <slyfox at gcc dot gnu.org> ---
Got a build failure of clang-14 on this week's gcc. Minimal example:

This week's gcc-13 fails:

$ result-bad/bin/g++ -c bug.cc.cc
bug.cc.cc: In member function 'void Linker::ConstructJob(const ArgList&)
const':
bug.cc.cc:19:18: error: call of overloaded 'OptSpecifier(const<unnamed enum>)'
is ambiguous
   19 |   Args.AddAllArgs({OPT_u});
      |   ~~~~~~~~~~~~~~~^~~~~~~~~
bug.cc.cc:9:3: note: candidate: 'OptSpecifier::OptSpecifier(unsigned int)'
    9 |   OptSpecifier(unsigned);
      |   ^~~~~~~~~~~~
bug.cc.cc:8:12: note: candidate: 'OptSpecifier::OptSpecifier(bool)'
    8 |   explicit OptSpecifier(bool);
      |            ^~~~~~~~~~~~
bug.cc.cc:7:8: note: candidate: 'constexpr OptSpecifier::OptSpecifier(const
OptSpecifier&)'
    7 | struct OptSpecifier {
      |        ^~~~~~~~~~~~
bug.cc.cc:7:8: note: candidate: 'constexpr
OptSpecifier::OptSpecifier(OptSpecifier&&)'

Lat week's gcc-13 is ok:

$ result-good/bin/g++ -c bug.cc.cc

Version:

$ result-bad/bin/g++ -v
Using built-in specs.
COLLECT_GCC=/<<NIX>>/gcc-13.0.0/bin/g++
COLLECT_LTO_WRAPPER=/<<NIX>>/gcc-13.0.0/libexec/gcc/x86_64-unknown-linux-gnu/13.0.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with:
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 13.0.0 20221211 (experimental) (GCC)

Original clang-14 build failure this example was extracted from:

/build/clang-src-14.0.6/clang/lib/Driver/ToolChains/RISCVToolchain.cpp: In
member function 'virtual void
clang::driver::tools::RISCV::Linker::ConstructJob(clang::driver::Compilation&,
const clang::driver::JobAction&, const clang::driver::InputInfo&, const
clang::driver::InputInfoList&, const llvm::opt::ArgList&, const char*) const':
/build/clang-src-14.0.6/clang/lib/Driver/ToolChains/RISCVToolchain.cpp:189:18:
error: call of overloaded 'OptSpecifier(const clang::driver::options::ID)' is
ambiguous
  189 |   Args.AddAllArgs(CmdArgs,
      |   ~~~~~~~~~~~~~~~^~~~~~~~~
  190 |                   {options::OPT_T_Group, options::OPT_e,
options::OPT_s,
      |                  
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  191 |                    options::OPT_t, options::OPT_Z_Flag,
options::OPT_r});
      |                   
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from
/nix/store/6fphk1hf305pdli056km8qxv66bavb5a-llvm-14.0.6-dev/include/llvm/Option/Option.h:14,
                 from
/nix/store/6fphk1hf305pdli056km8qxv66bavb5a-llvm-14.0.6-dev/include/llvm/Option/Arg.h:19,
                 from
/nix/store/6fphk1hf305pdli056km8qxv66bavb5a-llvm-14.0.6-dev/include/llvm/Option/ArgList.h:19,
                 from
/build/clang-src-14.0.6/clang/include/clang/Driver/Types.h:14,
                 from
/build/clang-src-14.0.6/clang/include/clang/Driver/Action.h:13,
                 from
/build/clang-src-14.0.6/clang/lib/Driver/ToolChains/Cuda.h:13,
                 from
/build/clang-src-14.0.6/clang/lib/Driver/ToolChains/Gnu.h:12,
                 from
/build/clang-src-14.0.6/clang/lib/Driver/ToolChains/RISCVToolchain.h:12,
                 from
/build/clang-src-14.0.6/clang/lib/Driver/ToolChains/RISCVToolchain.cpp:9:
/nix/store/6fphk1hf305pdli056km8qxv66bavb5a-llvm-14.0.6-dev/include/llvm/Option/OptSpecifier.h:24:16:
note: candidate: 'llvm::opt::OptSpecifier::OptSpecifier(unsigned int)'
   24 |   /*implicit*/ OptSpecifier(unsigned ID) : ID(ID) {}
      |                ^~~~~~~~~~~~
/nix/store/6fphk1hf305pdli056km8qxv66bavb5a-llvm-14.0.6-dev/include/llvm/Option/OptSpecifier.h:23:12:
note: candidate: 'llvm::opt::OptSpecifier::OptSpecifier(bool)' (deleted)
   23 |   explicit OptSpecifier(bool) = delete;
      |            ^~~~~~~~~~~~
/nix/store/6fphk1hf305pdli056km8qxv66bavb5a-llvm-14.0.6-dev/include/llvm/Option/OptSpecifier.h:18:7:
note: candidate: 'constexpr llvm::opt::OptSpecifier::OptSpecifier(const
llvm::opt::OptSpecifier&)'
   18 | class OptSpecifier {
      |       ^~~~~~~~~~~~
/nix/store/6fphk1hf305pdli056km8qxv66bavb5a-llvm-14.0.6-dev/include/llvm/Option/OptSpecifier.h:18:7:
note: candidate: 'constexpr
llvm::opt::OptSpecifier::OptSpecifier(llvm::opt::OptSpecifier&&)'
make[2]: *** [lib/Driver/CMakeFiles/obj.clangDriver.dir/build.make:874:
lib/Driver/CMakeFiles/obj.clangDriver.dir/ToolChains/RISCVToolchain.cpp.o]
Error 1 shuffle=1857759387
make[1]: *** [CMakeFiles/Makefile2:7653:
lib/Driver/CMakeFiles/obj.clangDriver.dir/all] Error 2 shuffle=1857759387
make[1]: *** Waiting for unfinished jobs....

Reply via email to