I am running into the following ICE with the following relatively minimalized test case.
Internal error: assertion failed at: "shared/cfe/edgcpfe/decl_inits.c", line 588
template <char> struct Index { constexpr Index() : value_(0) { } private: int value_; }; template <int> int foo() { static constexpr Index<'i'> i; return 0; } int bar() { return foo<3>(); }
See versions below
[...]:~/test> gcc --version gcc (GCC) 6.3.0 20161221 (Cray Inc.) Copyright (C) 2016 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. [...]:~/test> icpc --version icpc (ICC) 17.0.2 20170213 Copyright (C) 1985-2017 Intel Corporation. All rights reserved. [...]:~/test> gcc -std=c++14 -c -o test.o test.cpp [...]:~/test> icpc -std=c++14 -c -o test.o test.cpp Internal error: assertion failed at: "shared/cfe/edgcpfe/decl_inits.c", line 588 compilation aborted for test.cpp (code 4)
This can be reproduced across lots of platforms and compiler versions, though this particular instance is in the Cray Linux Environment with PrgEnv-intel/6.0.3 and gcc/6.3.0
Thread Topic:
Bug Report