https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70338
Bug ID: 70338 Summary: ICE combining debug symbols, range-for in lambda in function template accessing captured variable-size array Product: gcc Version: 5.3.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: blaffablaffa at gmail dot com Target Milestone: --- Created attachment 38045 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38045&action=edit testcase The testcase in attachment causes a segfault with 5.3.1 only when compiled with -g(gdb) or -g(gdb)2 or -g(gdb)3. It appears that some debug symbol generation cannot handle a complex interaction between template functions, variable-length arrays and range-for. I have included in the test case examples of functions that do not crash, taking out some of the elements that put together cause the ICE.