https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111920
Bug ID: 111920 Summary: [14 Regression] encode-{8,9,10}.mm internal compiler error: in tsubst_expr, at cp/pt.cc:21533 Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: objc++ Assignee: unassigned at gcc dot gnu.org Reporter: iains at gcc dot gnu.org Target Milestone: --- This affects both GNU and NeXT runtimes for example, encode-10.mm: p debug_tree(t) <template_type_parm 0x11785a2a0 T type_0 type_6 VOID align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type 0x11785a2a0 tpi <template_parm_index 0x115930690 type <template_type_parm 0x11785a2a0 T> decl <type_decl 0x117862ab0 T type <template_type_parm 0x11785a2a0 T> decl_0 VOID /src-local/gcc-master/gcc/testsuite/obj-c++.dg/encode-10.mm:7:10 align:1 warn_if_not_align:0> index 0 level 1 orig_level 1> pointer_to_this <pointer_type 0x11785a3f0> chain <type_decl 0x117862ab0 T>> p debug_tree(args) <tree_vec 0x117861680 length:1 elt:0 <integer_type 0x1159283f0 char public type_6 QI size <integer_cst 0x115921258 constant 8> unit-size <integer_cst 0x115921270 constant 1> align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type 0x1159283f0 precision:8 min <integer_cst 0x1159212a0 -128> max <integer_cst 0x1159212d0 127> pointer_to_this <pointer_type 0x115932c78>>> p debug_tree(in_decl) <template_decl 0x11785f380 my_encode type <function_type 0x11785a348 type <pointer_type 0x115936498 type <integer_type 0x1159363f0 char> unsigned type_6 DI size <integer_cst 0x115921168 constant 64> unit-size <integer_cst 0x115921180 constant 8> align:64 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type 0x115936498 pointer_to_this <pointer_type 0x11784ab28>> QI size <integer_cst 0x115921258 constant 8> unit-size <integer_cst 0x115921270 constant 1> align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type 0x11785a348 arg-types <tree_list 0x11785c4d8 value <integer_type 0x1159285e8 int> chain <tree_list 0x11591cd98 value <void_type 0x115928f18 void>>> pointer_to_this <pointer_type 0x11785ad20>> VOID /src-local/gcc-master/gcc/testsuite/obj-c++.dg/encode-10.mm:8:13 align:1 warn_if_not_align:0 context <translation_unit_decl 0x115910168 /src-local/gcc-master/gcc/testsuite/obj-c++.dg/encode-10.mm> result <function_decl 0x11785dd00 my_encode type <function_type 0x11785a348> public static external QI /src-local/gcc-master/gcc/testsuite/obj-c++.dg/encode-10.mm:8:13 align:8 warn_if_not_align:0 context <translation_unit_decl 0x115910168 /src-local/gcc-master/gcc/testsuite/obj-c++.dg/encode-10.mm> initial <block 0x11784e300> result <result_decl 0x1178531e0 D.4760 type <pointer_type 0x115936498> unsigned ignored DI /src-local/gcc-master/gcc/testsuite/obj-c++.dg/encode-10.mm:8:7 size <integer_cst 0x115921168 64> unit-size <integer_cst 0x115921180 8> align:64 warn_if_not_align:0 context <function_decl 0x11785dd00 my_encode>> full-name "const char* my_encode(int)" template-info <template_info 0x11785c500 template <template_decl 0x11785f380 my_encode> args <tree_vec 0x117861100 length:1 elt:0 <template_type_parm 0x11785a2a0 T>>> use_template=0 arguments <parm_decl 0x11785f300 variant type <integer_type 0x1159285e8 int> used SI /src-local/gcc-master/gcc/testsuite/obj-c++.dg/encode-10.mm:8:27 size <integer_cst 0x1159213a8 constant 32> unit-size <integer_cst 0x1159213c0 constant 4> align:32 warn_if_not_align:0 context <function_decl 0x11785dd00 my_encode> arg-type <integer_type 0x1159285e8 int>> struct-function 0x115ae7ac8> parms <tree_list 0x11785c488 purpose <integer_cst 0x115921270 1> value <tree_vec 0x1178610e0 type <template_decl 0x11785f380 my_encode> length:1 elt:0 <tree_list 0x11785c460 value <type_decl 0x117862ab0 T>>>> full-name "template<class T> const char* my_encode(int)" chain <var_decl 0x115911f30 suboptarg>> ===== * thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1 frame #0: 0x0000000102b7b695 cc1objplus`internal_error(gmsgid="in %s, at %s:%d") at diagnostic.cc:2180:25 frame #1: 0x0000000102b7bb0f cc1objplus`fancy_abort(file="/src-local/gcc-master/gcc/cp/pt.cc", line=21533, function="tsubst_expr") at diagnostic.cc:2296:18 * frame #2: 0x000000010041b583 cc1objplus`tsubst_expr(t=0x000000011785a2a0, args=0x0000000117861680, complain=3, in_decl=0x000000011785f380) at pt.cc:21533:2 frame #3: 0x0000000100413724 cc1objplus`tsubst_expr(t=0x0000000117861280, args=0x0000000117861680, complain=3, in_decl=0x000000011785f380) at pt.cc:20264:20 frame #4: 0x0000000100413914 cc1objplus`tsubst_expr(t=0x0000000115930750, args=0x0000000117861680, complain=3, in_decl=0x000000011785f380) at pt.cc:20285:13 frame #5: 0x000000010040d8c8 cc1objplus`::tsubst_stmt(t=0x0000000115930750, args=0x0000000117861680, complain=3, in_decl=0x000000011785f380) at pt.cc:19218:7 frame #6: 0x0000000100404a6d cc1objplus`::tsubst_stmt(t=0x0000000117861300, args=0x0000000117861680, complain=3, in_decl=0x000000011785f380) at pt.cc:18199:13 frame #7: 0x00000001004048cb cc1objplus`::tsubst_stmt(t=0x0000000117861220, args=0x0000000117861680, complain=3, in_decl=0x000000011785f380) at pt.cc:18181:4 frame #8: 0x0000000100407f4e cc1objplus`::tsubst_stmt(t=0x0000000115930720, args=0x0000000117861680, complain=3, in_decl=0x000000011785f380) at pt.cc:18553:7 frame #9: 0x00000001004080f8 cc1objplus`::tsubst_stmt(t=0x0000000117854268, args=0x0000000117861680, complain=3, in_decl=0x000000011785f380) at pt.cc:18573:7 frame #10: 0x00000001004048cb cc1objplus`::tsubst_stmt(t=0x0000000117861140, args=0x0000000117861680, complain=3, in_decl=0x000000011785f380) at pt.cc:18181:4 frame #11: 0x0000000100407f4e cc1objplus`::tsubst_stmt(t=0x00000001159306f0, args=0x0000000117861680, complain=3, in_decl=0x000000011785f380) at pt.cc:18553:7 frame #12: 0x0000000100433f3d cc1objplus`::instantiate_body(pattern=0x000000011785f380, args=0x0000000117861680, d=0x0000000117863100, nested_p=false) at pt.cc:26742:16 frame #13: 0x0000000100435bed cc1objplus`instantiate_decl(d=0x0000000117863100, defer_ok=false, expl_inst_class_mem_p=false) at pt.cc:27029:24 frame #14: 0x0000000100435fde cc1objplus`instantiate_pending_templates(retries=0) at pt.cc:27107:26 frame #15: 0x00000001001ed37f cc1objplus`c_parse_final_cleanups() at decl2.cc:5054:37 frame #16: 0x00000001005cd4aa cc1objplus`c_common_parse_file() at c-opts.cc:1296:26 frame #17: 0x000000010230460a cc1objplus`::compile_file() at toplev.cc:444:25 frame #18: 0x000000010230802c cc1objplus`::do_compile(no_backend=false) at toplev.cc:2126:24 frame #19: 0x0000000102308570 cc1objplus`toplev::main(this=0x000000030a5af3ba, argc=24, argv=0x000000030a5af510) at toplev.cc:2282:18 frame #20: 0x0000000102b46db4 cc1objplus`main(argc=24, argv=0x000000030a5af510) at main.cc:39:23 =====