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

            Bug ID: 125111
           Summary: [reflection] "internal compiler error: error reporting
                    routines re-entered" when calling`std::meta::extract`
                    with reference to function
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ensadc at mailnesia dot com
  Target Milestone: ---

https://godbolt.org/z/MsG4qxd6e
====
#include <meta>

using FT = void();
extern FT& f;

constexpr auto x = ^^f;
constexpr auto pf = std::meta::extract<FT&>(x);

====
Compiling above with `-std=c++26 -freflection` leads to "error: arrays of
functions are not meaningful" and then "internal compiler error: error
reporting routines re-entered."

It seems that GCC is trying to form `FT(*)[]` as required by N5032
[meta.reflection.extract]/(5.2), but gets mad in this process.

Even if there's no ICE, the error message could be improved.

Reply via email to