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

            Bug ID: 118767
           Summary: [ICE] internal compiler error: segmentation fault when
                    using more than one placeholder "_" during
                    destructuring in range-based-for loop
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ldalessandro at gmail dot com
  Target Milestone: ---

The following gives a uninformative ICE (possibly trying to report an error?).

  #include <vector>
  void bar() {
    std::vector<std::pair<int, int>> v;
    for (auto [_, _] : v);
  }

I believe this code is valid in 26.

live: https://godbolt.org/z/cbceoa43c
  • [Bug c++/118767] New: [ICE] int... ldalessandro at gmail dot com via Gcc-bugs

Reply via email to