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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2017-11-01
      Known to work|                            |7.1.0
            Summary|Concept and lambda return   |[7/8 Regression] Concept
                   |type deduction cause        |and lambda return type
                   |compilation to crash with   |deduction cause compilation
                   |"mmap: Cannot allocate      |to crash with "mmap: Cannot
                   |memory"                     |allocate memory"
     Ever confirmed|0                           |1
      Known to fail|                            |7.2.0, 8.0

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Trunk gives a seemingly bogus error before the ICE:

mozilla_jwakely0/crash.cpp: In instantiation of ‘run_test()::<lambda(auto:1&)>
[with auto:1 = const std::__cxx11::basic_string<char>]’:
mozilla_jwakely0/crash.cpp:9:12:   required from here
mozilla_jwakely0/crash.cpp:49:47: error: use of parameter from containing
function
     return object.visit([] (auto& x) { return x.empty(); });
                                               ^
mozilla_jwakely0/crash.cpp:49:35: note: ‘const
std::__cxx11::basic_string<char>& x’ declared here
     return object.visit([] (auto& x) { return x.empty(); });
                             ~~~~~~^
mozilla_jwakely0/crash.cpp:49:58: internal compiler error: Segmentation fault
     return object.visit([] (auto& x) { return x.empty(); });
                                                          ^

Reply via email to