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

            Bug ID: 118388
           Summary: Segmentation fault in invalid friend declaration with
                    default argument with -fpermissive
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Keywords: c++-lambda, ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: simartin at gcc dot gnu.org
        Depends on: 118319
  Target Milestone: ---

This is a follow-up of bug #118319.

Even with my upcoming fix for that bug, we still ICE under -fpermissive, and
this needs fixing.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

template <int> struct S{
  friend void foo (int a = []{}());
};

void foo(int a){};

int main(){
  S<0> t;    
  foo();
}

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118319
[Bug 118319] [12/13/14/15 Regression] ICE Segmentation fault in friend
declaration with default argument assigned to an empty lambda expression

Reply via email to