https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83860
Bug ID: 83860 Summary: valarray replacement type breaks with auto and more than one operation Product: gcc Version: 7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: bruno.manga95 at gmail dot com Target Milestone: --- The following code results in a segmentation fault: int main() { std::valarray<int> va(16), vb(16), vc(16); auto sum = va + vb + vc; valarray<int> vsum = sum; } If one of the 3 operands is removed from the sum, the code appears to work.