https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101236
Bug ID: 101236 Summary: [12 Regression] bits/unique_ptr.h:658:48: error: invalid use of incomplete type ‘class llvm::APFloat’ Product: gcc Version: 12.0 Status: UNCONFIRMED Keywords: rejects-valid Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: marxin at gcc dot gnu.org CC: jwakely at redhat dot com Target Milestone: --- Created attachment 51068 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51068&action=edit test-case Happens when one builds something that uses libLLVM: $ g++ AggregateToScalar.ii -c In file included from /home/marxin/bin/gcc2/include/c++/12.0.0/memory:76, from /usr/include/llvm/ADT/SmallVector.h:30, from /usr/include/llvm/ADT/ArrayRef.h:14, from /usr/include/llvm/ADT/DenseMapInfo.h:18, from /usr/include/llvm/ADT/DenseMap.h:16, from /home/marxin/Programming/cvise/clang_delta/AggregateToScalar.h:16, from /home/marxin/Programming/cvise/clang_delta/AggregateToScalar.cpp:15: /home/marxin/bin/gcc2/include/c++/12.0.0/bits/unique_ptr.h: In instantiation of ‘typename std::add_lvalue_reference<_Tp>::type std::unique_ptr<_Tp [], _Dp>::operator[](std::size_t) const [with _Tp = llvm::APFloat; _Dp = std::default_delete<llvm::APFloat []>; typename std::add_lvalue_reference<_Tp>::type = llvm::APFloat&; std::size_t = long unsigned int]’: /usr/include/llvm/ADT/APFloat.h:634:40: required from here /home/marxin/bin/gcc2/include/c++/12.0.0/bits/unique_ptr.h:658:48: error: invalid use of incomplete type ‘class llvm::APFloat’ 658 | noexcept(noexcept(std::declval<pointer>()[std::declval<size_t&>()])) | ~~~~~~~~~~~~~~~~~~~~~~~^ In file included from /usr/include/clang/AST/APValue.h:17, from /usr/include/clang/AST/Decl.h:16, from /usr/include/clang/AST/Attr.h:18, from /usr/include/clang/AST/RecursiveASTVisitor.h:16, from /home/marxin/Programming/cvise/clang_delta/AggregateToScalar.cpp:19: /usr/include/llvm/ADT/APFixedPoint.h:25:7: note: forward declaration of ‘class llvm::APFloat’ 25 | class APFloat; | ^~~~~~~