<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Fatal error g++ (GCC) 12.0.0 20210625 in APFloat.h"
   href="https://bugs.llvm.org/show_bug.cgi?id=50928">50928</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Fatal error g++ (GCC) 12.0.0 20210625 in APFloat.h
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Support Libraries
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>dr.duncan.p.simpson@gmx.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Building llvm with g++ (GCC) 12.0.0 20210625 (experimental) fails due to:
[  0%] Building CXX object
lib/Support/CMakeFiles/LLVMSupport.dir/APFixedPoint.cpp.o
In file included from /usr/local/include/c++/12.0.0/memory:76,
                 from
/home/dps/src/llvm/llvm-project/llvm/include/llvm/ADT/SmallVector.h:29,
                 from
/home/dps/src/llvm/llvm-project/llvm/include/llvm/ADT/SmallString.h:16,
                 from
/home/dps/src/llvm/llvm-project/llvm/include/llvm/ADT/APFixedPoint.h:20,
                 from
/home/dps/src/llvm/llvm-project/llvm/lib/Support/APFixedPoint.cpp:14:
/usr/local/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]’:
/home/dps/src/llvm/llvm-project/llvm/include/llvm/ADT/APFloat.h:634:40: 
required from here
/usr/local/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
/home/dps/src/llvm/llvm-project/llvm/lib/Support/APFixedPoint.cpp:14:
/home/dps/src/llvm/llvm-project/llvm/include/llvm/ADT/APFixedPoint.h:25:7:
note: forward declaration of ‘class llvm::APFloat’
   25 | class APFloat;
      |       ^~~~~~~ 

I think this is probably an issue with the llvm source code and not a g++ bug.
g++ 10 seems to accept this code so presumably what changed is what counts as
instantiation. I would suggest that instead of using getFirst it would be
simpler to make getIEEE a virtual method but that might be a larger change.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>