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

            Bug ID: 98463
           Summary: [11 Regression] internal compiler error: in
                    output_constructor_regular_field, at varasm.c:5491
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: romain.geissler at amadeus dot com
  Target Milestone: ---

Hi,

The following C++ code fails to compile with gcc trunk but works on gcc 9 and
10 (tested on compiler explorer):


#include <memory>

struct A
{
    std::unique_ptr<int> _member;

    virtual ~A(){}
};

A a;


Compiled without any CXXFLAGS on x64 Linux. Compiler explorer shows:

<source>:10:4: internal compiler error: in output_constructor_regular_field, at
varasm.c:5491
   10 | A a;
      |    ^
0x1cba449 internal_error(char const*, ...)
        ???:0
0x6b0031 fancy_abort(char const*, int, char const*)
        ???:0
0x13ceaf3 assemble_variable(tree_node*, int, int, int)
        ???:0
0xb4207f symbol_table::finalize_compilation_unit()
        ???:0
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
Compiler returned: 1

Cheers,
Romain

Reply via email to