https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92139
Bug ID: 92139 Summary: Segmentation fault on constraints verification Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: mateusz.pusz at gmail dot com Target Milestone: --- While trying to compile preprocessed file from the attachment the compiler crashes with the following stack trace: [build] /usr/local/gcc-10/bin/g++-10 -I../../src/include -isystem /home/mpusz/.conan/data/range-v3/0.9.1/ericniebler/stable/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/include -isystem /home/mpusz/.conan/data/fmt/6.0.0/_/_/package/1291f461f6832a5b3098e2156f727f267fd98612/include -Wall -Wextra -Wformat=2 -pedantic -Wshadow -Wunused -Wnon-virtual-dtor -Woverloaded-virtual -Wold-style-cast -Wcast-qual -Wcast-align -Wlogical-op -Wuseless-cast -Wduplicated-cond -Wduplicated-branches -Wnull-dereference -Werror -g -fconcepts -Wno-literal-suffix -Wno-non-template-friend -Wno-pedantic -std=gnu++2a -MD -MT test/unit_test/static/CMakeFiles/unit_tests_static.dir/quantity_test.cpp.o -MF test/unit_test/static/CMakeFiles/unit_tests_static.dir/quantity_test.cpp.o.d -o test/unit_test/static/CMakeFiles/unit_tests_static.dir/quantity_test.cpp.o -c ../../test/unit_test/static/quantity_test.cpp [build] In file included from ../../src/include/units/dimensions/length.h:26, [build] from ../../src/include/units/dimensions/velocity.h:25, [build] from ../../test/unit_test/static/quantity_test.cpp:23: [build] ../../src/include/units/quantity.h: In constructor ‘constexpr units::quantity<U, Rep>::quantity(const Q2&) [with Q2 = units::quantity<units::metre, int>; U = units::metre; Rep = int]’: [build] ../../src/include/units/quantity.h:206:18: internal compiler error: Segmentation fault [build] 206 | requires same_dim<dimension, typename Q2::dimension> && [build] | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [build] 0xba89ff crash_signal [build] ../../gcc_trunk/gcc/toplev.c:326 [build] 0x70a11d tsubst(tree_node*, tree_node*, int, tree_node*) [build] ../../gcc_trunk/gcc/cp/pt.c:14896 [build] 0x714626 tsubst_template_args(tree_node*, tree_node*, int, tree_node*) [build] ../../gcc_trunk/gcc/cp/pt.c:12917 [build] 0x70b157 tsubst(tree_node*, tree_node*, int, tree_node*) [build] ../../gcc_trunk/gcc/cp/pt.c:14772 [build] 0x714626 tsubst_template_args(tree_node*, tree_node*, int, tree_node*) [build] ../../gcc_trunk/gcc/cp/pt.c:12917 [build] 0x707592 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool, bool) [build] ../../gcc_trunk/gcc/cp/pt.c:18697 [build] 0x70e5f6 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool, bool) [build] ../../gcc_trunk/gcc/cp/pt.c:18630 [build] 0x70e5f6 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool) [build] ../../gcc_trunk/gcc/cp/pt.c:18288 [build] 0x644a19 satisfy_atom [build] ../../gcc_trunk/gcc/cp/constraint.cc:2343 [build] 0x6450d2 satisfy_conjunction [build] ../../gcc_trunk/gcc/cp/constraint.cc:2403 [build] 0x6450f4 satisfy_conjunction [build] ../../gcc_trunk/gcc/cp/constraint.cc:2399 [build] 0x64521d satisfy_constraint [build] ../../gcc_trunk/gcc/cp/constraint.cc:2427 [build] 0x645533 satisfy_associated_constraints [build] ../../gcc_trunk/gcc/cp/constraint.cc:2445 [build] 0x645533 constraints_satisfied_p [build] ../../gcc_trunk/gcc/cp/constraint.cc:2529 [build] 0x61646a add_function_candidate [build] ../../gcc_trunk/gcc/cp/call.c:2262 [build] 0x6187ed add_template_candidate_real [build] ../../gcc_trunk/gcc/cp/call.c:3399 [build] 0x618d14 add_template_candidate [build] ../../gcc_trunk/gcc/cp/call.c:3440 [build] 0x618d14 add_candidates [build] ../../gcc_trunk/gcc/cp/call.c:5748 [build] 0x61bbca add_candidates [build] ../../gcc_trunk/gcc/cp/call.c:5672 [build] 0x61bbca build_new_method_call_1 [build] ../../gcc_trunk/gcc/cp/call.c:9812 [build] Please submit a full bug report, [build] with preprocessed source if appropriate. [build] Please include the complete backtrace with any bug report. [build] See <https://gcc.gnu.org/bugs/> for instructions.