https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126828
Bug ID: 126828
Summary: internal compiler error related to the Eigen library
Product: gcc
Version: 16.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: josopait at goopax dot com
Target Milestone: ---
This program fails to compile with gcc 16:
#include <Eigen/Eigen>
using Eigen::Vector;
template<typename T>
void func()
{
constexpr uint blocksize = 8;
auto p = [&](uint k)
{
Vector<float, blocksize> vals;
};
}
> g++-16 prog.cpp -I /usr/include/eigen3
In file included from /usr/include/eigen3/Eigen/Core:295,
from /usr/include/eigen3/Eigen/Dense:1,
from /usr/include/eigen3/Eigen/Eigen:1,
from prog.cpp:1:
/usr/include/eigen3/Eigen/src/Core/Matrix.h: In substitution of 'template<class
Type, int Size> using Eigen::Vector = Eigen::Matrix<Type, Size, 1> [with Type =
float; int Size = ((int)blocksize)]':
prog.cpp:11:30: required from here
11 | Vector<float, blocksize> vals;
| ^
/usr/include/eigen3/Eigen/src/Core/Matrix.h:551:7: internal compiler error:
Segmentation fault
551 | using Vector = Matrix<Type, Size, 1>;
| ^~~~~~
0x55dcc0ed0ced diagnostics::context::diagnostic_impl(rich_location*,
diagnostics::metadata const*, diagnostics::option_id, char const*,
__va_list_tag (*) [1], diagnostics::kind)
???:0
0x55dcc0ec93e6 internal_error(char const*, ...)
???:0
0x55dcbf39a80b coerce_template_parms(tree_node*, tree_node*, tree_node*, int,
bool)
???:0
0x55dcbf3a4201 lookup_template_class(tree_node*, tree_node*, tree_node*,
tree_node*, int)
???:0
0x55dcbf385807 tsubst(tree_node*, tree_node*, int, tree_node*)
???:0
0x55dcbf3a2180 instantiate_template(tree_node*, tree_node*, int)
???:0
0x55dcbf3a424e lookup_template_class(tree_node*, tree_node*, tree_node*,
tree_node*, int)
???:0
0x55dcbf3d888d finish_template_type(tree_node*, tree_node*, int)
???:0
0x55dcbf35c450 c_parse_file()
???:0
0x55dcbf4a067b c_common_parse_file()
???:0
/usr/libexec/gcc/x86_64-pc-linux-gnu/16/cc1plus -quiet -I /usr/include/eigen3
-D_GNU_SOURCE prog.cpp -quiet -dumpdir a- -dumpbase prog.cpp -dumpbase-ext .cpp
-mtune=generic -march=x86-64 -mtls-dialect=gnu2 -foffload-options=-l_GCC_stdc++
-foffload-options=-l_GCC_m -foffload-options=-fno-stack-protector
-fcf-protection -foffload-options=-fcf-protection=none -o /tmp/cc5MM7WS.s
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://bugs.gentoo.org/> for instructions.