configure.ac | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-)
New commits: commit 3b53760bcd304c0a3efc58188d80cb963c24b484 Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Tue Mar 29 16:16:34 2022 +0200 Commit: Stephan Bergmann <sberg...@redhat.com> CommitDate: Tue Mar 29 17:23:10 2022 +0200 Check for yet another consteval bug ...which caused at least recent Clang 15 trunk configured with LLVM_ENABLE_ASSERTIONS=ON to crash when building --with-latest-c++ e.g. sal/qa/rtl/strings/test_oustring_stringliterals.cxx since 21584b304b21bfe6b99b6f29018c6b754ea28fc0 "make OUString(OUStringLiteral) constructor constexpr" Change-Id: Icef2ae27bfc518b127aabfc4767212b4b6a95a77 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132273 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sberg...@redhat.com> diff --git a/configure.ac b/configure.ac index 250de34971ab..9d97f42c4030 100644 --- a/configure.ac +++ b/configure.ac @@ -14350,9 +14350,13 @@ dnl from consteval constructor initializing const variable", dnl <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98752> "wrong 'error: ‘this’ is not a constant dnl expression' with consteval constructor", <https://bugs.llvm.org/show_bug.cgi?id=50063> "code dnl using consteval: 'clang/lib/CodeGen/Address.h:38: llvm::Value* -dnl clang::CodeGen::Address::getPointer() const: Assertion `isValid()' failed.'", or +dnl clang::CodeGen::Address::getPointer() const: Assertion `isValid()' failed.'", dnl <https://developercommunity.visualstudio.com/t/1581879> "Bogus error C7595 with consteval -dnl constructor in ternary expression (/std:c++latest)": +dnl constructor in ternary expression (/std:c++latest)", or +dnl <https://github.com/llvm/llvm-project/issues/54612> "C++20, consteval, anonymous union: +dnl llvm/lib/IR/Instructions.cpp:1491: void llvm::StoreInst::AssertOK(): Assertion +dnl `cast<PointerType>(getOperand(1)->getType())->isOpaqueOrPointeeTypeMatches(getOperand(0)->getType()) +dnl && "Ptr must be a pointer to Val type!"' failed.": AC_LANG_PUSH([C++]) save_CXX=$CXX if test "$COM" = MSC && test "$COM_IS_CLANG" != TRUE; then @@ -14384,6 +14388,16 @@ AC_RUN_IFELSE([AC_LANG_PROGRAM([ struct S4 { consteval S4() = default; }; void f4(bool b) { b ? S4() : S4(); } + + struct S5 { + consteval S5() { c = 0; } + char * f() { return &c; } + union { + char c; + int i; + }; + }; + auto s5 = S5().f(); ], [ return (s.i == 1) ? 0 : 1; ])], [