[Bug c++/108071] [13 Regression] Build failure in Libreoffice since r13-4565

2022-12-14 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108071

--- Comment #10 from CVS Commits  ---
The master branch has been updated by Jason Merrill :

https://gcc.gnu.org/g:4ef521bbc63f8a3883d507a8b6c1f95f442df3fe

commit r13-4712-g4ef521bbc63f8a3883d507a8b6c1f95f442df3fe
Author: Jason Merrill 
Date:   Wed Dec 14 17:42:52 2022 -0500

c++: fix initializer_list transformation [PR108071]

In these testcases, we weren't adequately verifying that constructing the
element type from an array element would have the same effect as
constructing it from one of the initializers.

PR c++/108071
PR c++/105838

gcc/cp/ChangeLog:

* call.cc (struct conversion_obstack_sentinel): New.
(maybe_init_list_as_array): Compare conversion of dummy argument.

gcc/testsuite/ChangeLog:

* g++.dg/cpp0x/initlist131.C: New test.
* g++.dg/cpp0x/initlist132.C: New test.
* g++.dg/cpp0x/initlist133.C: New test.

[Bug c++/108071] [13 Regression] Build failure in Libreoffice since r13-4565

2022-12-12 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108071

Jason Merrill  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #9 from Jason Merrill  ---
Reverted the offending commit for now.

[Bug c++/108071] [13 Regression] Build failure in Libreoffice since r13-4565

2022-12-12 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108071

Jason Merrill  changed:

   What|Removed |Added

   Assignee|unassigned at gcc dot gnu.org  |jason at gcc dot gnu.org
 Status|NEW |ASSIGNED

[Bug c++/108071] [13 Regression] Build failure in Libreoffice since r13-4565

2022-12-12 Thread slyfox at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108071

--- Comment #8 from Sergei Trofimovich  ---
(In reply to Sergei Trofimovich from comment #7)
> Got a build failure of clang-14 on this week's gcc. Minimal example:

Forgot the example itself:

// $ cat bug.cc.cc
#include 

class OptSpecifier;
struct ArrayRef {
  ArrayRef(std::initializer_list);
};
struct OptSpecifier {
  explicit OptSpecifier(bool);
  OptSpecifier(unsigned);
};
struct ArgList {
  void AddAllArgs(ArrayRef) const;
};
enum { OPT_u };
struct Linker {
  void ConstructJob(const ArgList &) const;
};
void Linker::ConstructJob(const ArgList ) const {
  Args.AddAllArgs({OPT_u});
}

[Bug c++/108071] [13 Regression] Build failure in Libreoffice since r13-4565

2022-12-12 Thread slyfox at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108071

--- Comment #7 from Sergei Trofimovich  ---
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)'
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=/<>/gcc-13.0.0/bin/g++
COLLECT_LTO_WRAPPER=/<>/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

[Bug c++/108071] [13 Regression] Build failure in Libreoffice since r13-4565

2022-12-12 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108071

--- Comment #6 from Jonathan Wakely  ---
The ConstCharArrayDetector is getting instantiated with const char* const
instead of const char[1], so the partial specialization doesn't match.

[Bug c++/108071] [13 Regression] Build failure in Libreoffice since r13-4565

2022-12-12 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108071

Jonathan Wakely  changed:

   What|Removed |Added

   Last reconfirmed||2022-12-12 0:00

--- Comment #5 from Jonathan Wakely  ---
Reduced:

#include 

template< typename T1, typename T2 = void >
struct ConstCharArrayDetector
{
static const bool ok = false;
};
template< std::size_t N, typename T >
struct ConstCharArrayDetector< const char[ N ], T >
{
typedef T Type;
};

struct Dummy { };

struct OUString
{
  template
OUString(T&, typename ConstCharArrayDetector::Type = Dummy())
{ }
};

struct Sequence {
  Sequence(std::initializer_list);
};

Sequence s = {""};

[Bug c++/108071] [13 Regression] Build failure in Libreoffice since r13-4565

2022-12-12 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108071

--- Comment #4 from Jakub Jelinek  ---
Trying to reduce it now.

[Bug c++/108071] [13 Regression] Build failure in Libreoffice since r13-4565

2022-12-12 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108071

Jakub Jelinek  changed:

   What|Removed |Added

   Last reconfirmed|2022-12-12 00:00:00 |
 CC||jakub at gcc dot gnu.org,
   ||jason at gcc dot gnu.org
 Status|WAITING |NEW
Summary|[13 regression] Build   |[13 Regression] Build
   |failure in Libreoffice  |failure in Libreoffice
   ||since r13-4565
   Priority|P3  |P1

--- Comment #3 from Jakub Jelinek  ---
Started with r13-4565-gbd0485f20f4794f9787237706a6308473a8e9415

[Bug c++/108071] [13 regression] Build failure in Libreoffice

2022-12-12 Thread manuel.lauss at googlemail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108071

--- Comment #2 from Manuel Lauss  ---
(In reply to Richard Biener from comment #1)
I get the same errors, but the whole file can be compiled without errors with
gcc-12 (it needs to be preprocessed with gcc-12 as well), and with a gcc-13
checkout from 9 days ago.
So in the last 9 days, something was introduced which caused these errors to
appear.

[Bug c++/108071] [13 regression] Build failure in Libreoffice

2022-12-12 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108071

Richard Biener  changed:

   What|Removed |Added

 Status|UNCONFIRMED |WAITING
   Last reconfirmed||2022-12-12
   Target Milestone|--- |13.0
 Ever confirmed|0   |1
Summary|13 regression: Build|[13 regression] Build
   |failure in Libreoffice  |failure in Libreoffice

--- Comment #1 from Richard Biener  ---
I get

/tmp/t.i: In member function 'virtual
com::sun::star::uno::Sequence
{anonymous}::AnyCompareFactory::getSupportedServiceNames()':
/tmp/t.i:47993:51: error: no matching function for call to
'rtl::OUString::OUString(const char* const)'
47993 | return { "com.sun.star.ucb.AnyCompareFactory" };
  |   ^

and loads of warnings before/after.  That's with no options - what options do
you use and what's your error?