Bug#882855: g++-7: internal compiler error: in maybe_undo_parenthesized_ref on for initialization list

2017-11-28 Thread David Cadé
Package: g++-7 Version: 7.2.0-16 Followup-For: Bug #882855 Dear Maintainer, here is some more information. g++-5 doesn't return an internal compiler error, but g++-6 and later are. I've also tested with g++ from the gcc-snapshot package, it returns the same error. Here is the transcript:

Bug#882855: g++-7: internal compiler error: in maybe_undo_parenthesized_ref on for initialization list

2017-11-27 Thread David Cadé
Package: g++-7 Version: 7.2.0-16 Severity: important Dear Maintainer, The following C++ program, when compiled with g++, returns an internal compiler error. int rand(); template struct s { int count() { return rand(); } }; template int f(s a) { int const x = a.count(); in