[Bug c++/78137] New: [C++1z] braced initializer in defaulted function argument causes ICE
eric.niebler at gmail dot com
gcc-bugzilla@gcc.gnu.org
Thu Oct 27 21:31:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78137
Bug ID: 78137
Summary: [C++1z] braced initializer in defaulted function
argument causes ICE
Product: gcc
Version: 7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: eric.niebler at gmail dot com
Target Milestone: ---
With -std=gnu++1z, the following code ICEs the compiler:
```
struct S {};
template <class T = S>
void foo(T t = {}) {}
int main() {
foo();
}
```
Result:
test.cpp: In function ‘int main()’:
test.cpp:6:7: internal compiler error: in build_over_call, at cp/call.c:7847
foo();
^
The same code compiles successfully with -std=gnu++14.
More information about the Gcc-bugs
mailing list