https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79387
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |8.0 --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Testcase for x86-64: const char someData[] = {1, 2, 3}; template <const long addr> class A {}; constexpr const long p = someData + 1; A<p> a; But this was fixed in GCC 8.1: <source>:7:4: error: template argument '(long int)(((const char*)(& someData)) + 1)' for type 'long int' not a constant integer A<p> a; ^ Compiler returned: 1