g:329ae1d7751346ba166d34e77a43e8cc33daa1c9, r11-5663 make -k check-gcc RUNTESTFLAGS="dg.exp=g++.dg/template/canon-type-4.C" FAIL: g++.dg/template/canon-type-4.C -std=c++14 (internal compiler error) FAIL: g++.dg/template/canon-type-4.C -std=c++14 (test for excess errors) # of expected passes 3 # of unexpected failures 2 Executing on host: /home/seurer/gcc/git/build/gcc-test/gcc/testsuite/g++/../../xg++ -B/home/seurer/gcc/git/build/gcc-test/gcc/testsuite/g++/../../ /home/seurer/gcc/git/gcc-test/gcc/testsuite/g++.dg/template/canon-type-4.C -fdiagnostics-plain-output -nostdinc++ -I/home/seurer/gcc/git/build/gcc-test/powerpc64-unknown-linux-gnu/libstdc++-v3/include/powerpc64-unknown-linux-gnu -I/home/seurer/gcc/git/build/gcc-test/powerpc64-unknown-linux-gnu/libstdc++-v3/include -I/home/seurer/gcc/git/gcc-test/libstdc++-v3/libsupc++ -I/home/seurer/gcc/git/gcc-test/libstdc++-v3/include/backward -I/home/seurer/gcc/git/gcc-test/libstdc++-v3/testsuite/util -fmessage-length=0 -std=c++14 -pedantic-errors -Wno-long-long -S -o canon-type-4.s (timeout = 300) spawn -ignore SIGHUP /home/seurer/gcc/git/build/gcc-test/gcc/testsuite/g++/../../xg++ -B/home/seurer/gcc/git/build/gcc-test/gcc/testsuite/g++/../../ /home/seurer/gcc/git/gcc-test/gcc/testsuite/g++.dg/template/canon-type-4.C -fdiagnostics-plain-output -nostdinc++ -I/home/seurer/gcc/git/build/gcc-test/powerpc64-unknown-linux-gnu/libstdc++-v3/include/powerpc64-unknown-linux-gnu -I/home/seurer/gcc/git/build/gcc-test/powerpc64-unknown-linux-gnu/libstdc++-v3/include -I/home/seurer/gcc/git/gcc-test/libstdc++-v3/libsupc++ -I/home/seurer/gcc/git/gcc-test/libstdc++-v3/include/backward -I/home/seurer/gcc/git/gcc-test/libstdc++-v3/testsuite/util -fmessage-length=0 -std=c++14 -pedantic-errors -Wno-long-long -S -o canon-type-4.s hash table checking failed: equal operator returns true for a pair of values with a different hash value /home/seurer/gcc/git/gcc-test/gcc/testsuite/g++.dg/template/canon-type-4.C:18:9: internal compiler error: in hashtab_chk_error, at hash-table.c:137 0x1029e5bf hashtab_chk_error() /home/seurer/gcc/git/gcc-test/gcc/hash-table.c:137 0x105c7147 hash_table<spec_hasher, false, xcallocator>::verify(spec_entry* const&, unsigned int) /home/seurer/gcc/git/gcc-test/gcc/hash-table.h:1033 0x105c7343 hash_table<spec_hasher, false, xcallocator>::find_with_hash(spec_entry* const&, unsigned int) /home/seurer/gcc/git/gcc-test/gcc/hash-table.h:918 0x1057cfcf lookup_template_class_1 /home/seurer/gcc/git/gcc-test/gcc/cp/pt.c:9830 0x1057cfcf lookup_template_class(tree_node*, tree_node*, tree_node*, tree_node*, int, int) /home/seurer/gcc/git/gcc-test/gcc/cp/pt.c:10186 0x10580d63 tsubst_aggr_type /home/seurer/gcc/git/gcc-test/gcc/cp/pt.c:13488 0x10564817 tsubst(tree_node*, tree_node*, int, tree_node*) /home/seurer/gcc/git/gcc-test/gcc/cp/pt.c:15374 0x1057a247 coerce_template_parms /home/seurer/gcc/git/gcc-test/gcc/cp/pt.c:8930 0x1057cebb lookup_template_class_1 /home/seurer/gcc/git/gcc-test/gcc/cp/pt.c:9798 0x1057cebb lookup_template_class(tree_node*, tree_node*, tree_node*, tree_node*, int, int) /home/seurer/gcc/git/gcc-test/gcc/cp/pt.c:10186 0x105ee5eb finish_template_type(tree_node*, tree_node*, int) /home/seurer/gcc/git/gcc-test/gcc/cp/semantics.c:3442 0x10500027 cp_parser_template_id /home/seurer/gcc/git/gcc-test/gcc/cp/parser.c:16991 0x10500687 cp_parser_class_name /home/seurer/gcc/git/gcc-test/gcc/cp/parser.c:24213 0x104fad97 cp_parser_qualifying_entity /home/seurer/gcc/git/gcc-test/gcc/cp/parser.c:6861 0x104fad97 cp_parser_nested_name_specifier_opt /home/seurer/gcc/git/gcc-test/gcc/cp/parser.c:6543 0x104fbbab cp_parser_nested_name_specifier /home/seurer/gcc/git/gcc-test/gcc/cp/parser.c:6787 0x10505267 cp_parser_using_declaration /home/seurer/gcc/git/gcc-test/gcc/cp/parser.c:20130 0x1051c43b cp_parser_member_declaration /home/seurer/gcc/git/gcc-test/gcc/cp/parser.c:25448 0x104d7927 cp_parser_member_specification_opt /home/seurer/gcc/git/gcc-test/gcc/cp/parser.c:25310 0x104d7927 cp_parser_class_specifier_1 /home/seurer/gcc/git/gcc-test/gcc/cp/parser.c:24399
Nice bug report, started with r11-5663-g329ae1d7751346ba with: $ g++ -c /home/marxin/Programming/gcc/gcc/testsuite/g++.dg/template/canon-type-4.C -fchecking=2 --param=hash-table-verification-limit=10000000 hash table checking failed: equal operator returns true for a pair of values with a different hash value /home/marxin/Programming/gcc/gcc/testsuite/g++.dg/template/canon-type-4.C:18:9: internal compiler error: in hashtab_chk_error, at hash-table.c:137 18 | B<Y[2]> b; | ^ 0x8bbfb6 hashtab_chk_error() /home/marxin/Programming/gcc/gcc/hash-table.c:137 0xa8a52d hash_table<spec_hasher, false, xcallocator>::verify(spec_entry* const&, unsigned int) /home/marxin/Programming/gcc/gcc/hash-table.h:1033 0xa8a67f hash_table<spec_hasher, false, xcallocator>::find_with_hash(spec_entry* const&, unsigned int) /home/marxin/Programming/gcc/gcc/hash-table.h:918 0xa7794d lookup_template_class_1 /home/marxin/Programming/gcc/gcc/cp/pt.c:9834 0xa79dde lookup_template_class(tree_node*, tree_node*, tree_node*, tree_node*, int, int) /home/marxin/Programming/gcc/gcc/cp/pt.c:10190 0xa79dde tsubst_aggr_type /home/marxin/Programming/gcc/gcc/cp/pt.c:13492 0xa74fe4 coerce_template_parms /home/marxin/Programming/gcc/gcc/cp/pt.c:8934 0xa77861 lookup_template_class_1 /home/marxin/Programming/gcc/gcc/cp/pt.c:9802 0xa7964c lookup_template_class(tree_node*, tree_node*, tree_node*, tree_node*, int, int) /home/marxin/Programming/gcc/gcc/cp/pt.c:10190 0xaa063b finish_template_type(tree_node*, tree_node*, int) /home/marxin/Programming/gcc/gcc/cp/semantics.c:3442 0xa18b11 cp_parser_template_id /home/marxin/Programming/gcc/gcc/cp/parser.c:16994 0xa18cfc cp_parser_class_name /home/marxin/Programming/gcc/gcc/cp/parser.c:24216 0xa14c45 cp_parser_qualifying_entity /home/marxin/Programming/gcc/gcc/cp/parser.c:6864 0xa14c45 cp_parser_nested_name_specifier_opt /home/marxin/Programming/gcc/gcc/cp/parser.c:6546 0xa1ee73 cp_parser_nested_name_specifier /home/marxin/Programming/gcc/gcc/cp/parser.c:6790 0xa1ee73 cp_parser_using_declaration /home/marxin/Programming/gcc/gcc/cp/parser.c:20133 0xa2d7f5 cp_parser_member_declaration /home/marxin/Programming/gcc/gcc/cp/parser.c:25451 0x9fff48 cp_parser_member_specification_opt /home/marxin/Programming/gcc/gcc/cp/parser.c:25313 0x9fff48 cp_parser_class_specifier_1 /home/marxin/Programming/gcc/gcc/cp/parser.c:24402 0xa02323 cp_parser_class_specifier /home/marxin/Programming/gcc/gcc/cp/parser.c:24713 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions.
The master branch has been updated by Nathan Sidwell <nathan@gcc.gnu.org>: https://gcc.gnu.org/g:62fb1b9e0da44a15b0434def20724f989d61e27b commit r11-5708-g62fb1b9e0da44a15b0434def20724f989d61e27b Author: Nathan Sidwell <nathan@acm.org> Date: Thu Dec 3 07:42:09 2020 -0800 c++: Fix array type dependency [PR 98107] I'd missed some paths through build_cplus_array_type, plus, some arrays come via the C-type builder. This propagates dependency in more places and asserts that in the cases where TYPE_DEPENDENT_P_VALID is unset, the type is non-dependent. PR c++/98107 gcc/cp/ * tree.c (build_cplus_array_type): Mark dependency of new variant. (cp_build_qualified_type_real, strip_typedefs): Assert TYPE_DEPENDENT_P_VALID, or not a dependent type.
Fixed 62fb1b9e0da