[Bug c++/92494] New: ICE on function templates with placeholder return type decltype([]{}) and return type doesn't match
boostcpp at gmail dot com
gcc-bugzilla@gcc.gnu.org
Wed Nov 13 09:12:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92494
Bug ID: 92494
Summary: ICE on function templates with placeholder return type
decltype([]{}) and return type doesn't match
Product: gcc
Version: 10.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: boostcpp at gmail dot com
Target Milestone: ---
Following code produce the ICE on GCC 9 and the GCC 10 latest HEAD:
template < typename T >
decltype([]{}) f( )
{ return 0 ; }
int main ()
{ f<void>() ; }
https://wandbox.org/permlink/Cto4TbyBw0U3ywkB
Expected behaviour:
main.cpp: In function ‘<lambda()> f()’:
main.cpp:3:10: error: could not convert ‘0’ from ‘int’ to ‘<lambda()>’
Actual behaviour:
g++: internal compiler error: Segmentation fault signal terminated program
cc1plus
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.
More information about the Gcc-bugs
mailing list