https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116226
--- Comment #4 from Sam James <sjames at gcc dot gnu.org> ---
I just added a crude break on internal_error:

(gdb) bt
#0  _Z14internal_errorPKcz (gmsgid=0x55555840fd48 "tree check: %s, have %s in
%s, at %s:%d") at
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/diagnostic-global-context.cc:486
#1  0x0000555556ab3d81 in _Z17tree_check_failedPK9tree_nodePKciS3_z
(node=<optimized out>, file=<optimized out>, line=<optimized out>,
function=<optimized out>)
    at /usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/tree.cc:9001
#2  0x00005555558d2491 in _Z10tree_checkPK9tree_nodePKciS3_9tree_code
(__t=<optimized out>, __f=0x55555832d940
"/var/tmp/portage/sys-devel/gcc-15.0.9999/work/gcc-15.0.9999/gcc/tree.h",
    __l=6509, __g=0x55555823138e "get_len", __c=INTEGER_CST) at
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/tree.h:3920
#3  _ZNK2wi13extended_treeILi131072EE7get_lenEv (this=<optimized out>) at
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/tree.h:6509
#4 
_ZN2wi10int_traitsI16generic_wide_intINS_13extended_treeILi131072EEEEE9decomposeEPljRKS4_
(precision=131072, x=...)
    at /usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/wide-int.h:1050
#5 
_ZN20wide_int_ref_storageILb1ELb0EEC4I16generic_wide_intIN2wi13extended_treeILi131072EEEEEERKT_j
(this=<synthetic pointer>, x=..., precision=131072)
    at /usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/wide-int.h:1099
#6 
_ZN16generic_wide_intI20wide_int_ref_storageILb1ELb0EEEC4IS_IN2wi13extended_treeILi131072EEEEEERKT_j
(this=<synthetic pointer>, x=..., precision=131072)
    at /usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/wide-int.h:855
#7 
_ZN2wi5lts_pI16generic_wide_intINS_13extended_treeILi131072EEEES4_EEbRKT_RKT0_
(x=..., y=...) at
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/wide-int.h:2296
#8  0x0000555557dfc868 in
_ZN2wi5les_pI16generic_wide_intINS_13extended_treeILi131072EEEES4_EEbRKT_RKT0_
(x=..., y=...)
    at /usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/wide-int.h:2364
#9 
_ZleI16generic_wide_intIN2wi13extended_treeILi131072EEEES4_ENS1_13binary_traitsIT_T0_XsrNS1_10int_traitsIS6_EE14precision_typeEXsrNS8_IS7_EE14precision_typeEE23signed_predicate_resultERKS6_RKS7_
(x=..., y=...) at
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/wide-int.h:3812
#10 _Z15tree_int_cst_lePK9tree_nodeS1_ (t1=0x7ffff348d198, t2=<optimized out>)
at /usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/tree.h:6684
#11 0x0000555557ecf778 in check_out_of_bounds_and_warn (location=2147484371,
ref=0x7ffff3cf1930, low_sub_org=0x7ffff39429d8, low_sub=0x7ffff348d198,
up_sub=0x7ffff3f73560,
    up_bound=0x7ffff348d168, up_bound_p1=0x7ffff33c5cd8, vr=0x7fffffffd570,
ignore_off_by_one=false, for_array_bound=true, out_of_bound=<synthetic
pointer>)
    at
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/gimple-array-bounds.cc:298
#12 _ZN20array_bounds_checker15check_array_refEjP9tree_nodeP6gimpleb
(this=<optimized out>, location=2147484371, ref=0x7ffff3cf1930, stmt=<optimized
out>, ignore_off_by_one=false)
    at
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/gimple-array-bounds.cc:391
#13 0x0000555557eb28d1 in
_ZN20array_bounds_checker18check_array_boundsEPP9tree_nodePiPv (tp=<optimized
out>, walk_subtree=0x7fffffffd974, data=<optimized out>)
    at
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/gimple-array-bounds.cc:811
#14 0x000055555735b89f in
_Z11walk_tree_1PP9tree_nodePFS0_S1_PiPvES3_P8hash_setIS0_Lb0E19default_hash_traitsIS0_EEPFS0_S1_S2_S5_S3_SA_E
(tp=0x7ffff39470e8, func=<optimized out>,
    data=0x7fffffffda10, pset=<optimized out>, lh=0x0) at
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/tree.cc:11477
#15 0x00005555575451c0 in
_Z14walk_gimple_opP6gimplePFP9tree_nodePS2_PiPvEP14walk_stmt_info
(stmt=0x7ffff39470a0,
    callback_op=0x555557eb2730
<_ZN20array_bounds_checker18check_array_boundsEPP9tree_nodePiPv>,
wi=0x7fffffffda10)
    at
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/gimple-walk.cc:212
#16 0x0000555557eb26f8 in
_ZN29check_array_bounds_dom_walker19before_dom_childrenEP15basic_block_def
(this=0x7fffffffdb30, bb=0x7ffff3930b40)
    at
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/gimple-array-bounds.cc:873
#17 0x0000555557512533 in _ZN10dom_walker4walkEP15basic_block_def
(this=0x7fffffffdb30, bb=0x7ffff3930b40) at
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/domwalk.cc:311
#18 0x00005555564347f1 in _ZN20array_bounds_checker5checkEv
(this=this@entry=0x7fffffffdb70) at
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/gimple-array-bounds.cc:887
#19 0x0000555556434770 in _ZN17pass_array_bounds7executeEP8function
(this=<optimized out>, fun=0x7ffff3cd86c0)
    at
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/gimple-array-bounds.cc:924
#20 0x000055555591180b in _Z16execute_one_passP8opt_pass (pass=0x555559227570)
at /usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/passes.cc:2647
#21 0x00005555574834fc in execute_pass_list_1 (pass=0x555559227570) at
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/passes.cc:2756
#22 0x0000555557483519 in execute_pass_list_1 (pass=0x555559226cf0) at
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/passes.cc:2757
#23 0x0000555557482eb9 in _Z17execute_pass_listP8functionP8opt_pass
(fn=0x7ffff3cd86c0, pass=<optimized out>) at
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/passes.cc:2767
#24 0x00005555573fb771 in _ZN11cgraph_node6expandEv (this=0x7ffff3cda990) at
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/cgraphunit.cc:1845
#25 0x000055555737f086 in expand_all_functions () at
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/cgraphunit.cc:2028
#26 _ZN12symbol_table7compileEv (this=0x7ffff7206000) at
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/cgraphunit.cc:2404
#27 0x0000555557c5c159 in _ZN12symbol_table25finalize_compilation_unitEv
(this=0x7ffff7206000) at
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/cgraphunit.cc:2589
#28 0x0000555557c120b1 in compile_file () at
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/toplev.cc:478
#29 0x0000555557bd8bea in do_compile () at
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/toplev.cc:2170
#30 _ZN6toplev4mainEiPPc (this=this@entry=0x7fffffffde66, argc=<optimized out>,
argv=<optimized out>) at
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/toplev.cc:2330
#31 0x0000555557bd7e5b in main (argc=<optimized out>, argv=<optimized out>) at
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/main.cc:39
(gdb)

I don't know why all the mangling is buggered.

Reply via email to