Created attachment 1505748 [details] C++ example with the error code. Description of problem: internal compiler error: in reshape_init_r, at cp/decl.c:6152 Version-Release number of selected component (if applicable): RedHat 7 with devtoolset 7.1 Compiling using GCC 7.3 with C++17 enabled. How reproducible: Using gcc 7.3 and the option "-O3 --std=c++17 -Wall -Wextra" I attached an CPP example file Steps to Reproduce: 1. gcc -O3 --std=c++17 -Wall -Wextra -c -o example.o example.cpp Actual results: source>: In instantiation of 'constexpr const std::array<Data, 2> Foo<FooTA>::test': <source>:45:18: required from here <source>:21:33: internal compiler error: in reshape_init_r, at cp/decl.c:6152 static constexpr auto const test = std::array { ^~~~ Please submit a full bug report, with preprocessed source if appropriate. Expected results: No error Additional info:
This looks like a new bug, also present in gcc mainline. I'll reduce and open an upstream PR. We'll evaluate the fix once we've fixed this on trunk.
Fixed upstream, will backport to gcc-8 and DTS 8.1.
Patch backported to gcc-8, will be in the next update from Fedora.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHEA-2019:4134