https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109521
Bug ID: 109521 Summary: Checking ICE (canonical types differ for identical types) Product: gcc Version: 13.0 URL: https://bugs.gentoo.org/904339 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: sjames at gcc dot gnu.org Target Milestone: --- Host: x86_64-pc-linux-gnu Target: x86_64-pc-linux-gnu Build: x86_64-pc-linux-gnu Created attachment 54865 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54865&action=edit optimise.ii.orig.xz Had this when building form-4.3.0. Originally reported downstream in Gentoo at https://bugs.gentoo.org/904339. To trigger this, I had to use -U_GLIBCXX_ASSERTIONS as I have it enabled by default for my GCC (Gentoo has it enabled by default for hardened, but not all setups). Obviously this doesn't matter once preprocessed though. Needs a checking build. ``` $ g++ -DHAVE_CONFIG_H -I. -I.. -O2 -Wall -Wextra -Wpadded -Wno-misleading-indentation -Wno-stringop-overflow -U_GLIBCXX_ASSERTIONS -c sources/optimize.cc ‘ during GIMPLE pass: uninit In function ‘void find_Horner_MCTS()’: canonical types differ for identical types ‘UBYTE [7]’ {aka ‘unsigned char [7]’} and ‘unsigned char [7]’ 2208 | void find_Horner_MCTS () { | ^~~~~~~~~~~~~~~~ 0x68ea0a comptypes(tree_node*, tree_node*, int) /usr/src/debug/sys-devel/gcc-13.0.1_pre20230409-r4/gcc-13-20230409/gcc/cp/typeck.cc:1710 0x22768b9 cxx_types_compatible_p(tree_node*, tree_node*) /usr/src/debug/sys-devel/gcc-13.0.1_pre20230409-r4/gcc-13-20230409/gcc/cp/cp-objcp-common.cc:130 0x11ed84a c_fold_indirect_ref_for_warn /usr/src/debug/sys-devel/gcc-13.0.1_pre20230409-r4/gcc-13-20230409/gcc/c-family/c-pretty-print.cc:1851 0x11edf79 c_fold_indirect_ref_for_warn /usr/src/debug/sys-devel/gcc-13.0.1_pre20230409-r4/gcc-13-20230409/gcc/c-family/c-pretty-print.cc:1918 0x11ee249 print_mem_ref /usr/src/debug/sys-devel/gcc-13.0.1_pre20230409-r4/gcc-13-20230409/gcc/c-family/c-pretty-print.cc:1981 0x7b8b72 expr_to_string(tree_node*) /usr/src/debug/sys-devel/gcc-13.0.1_pre20230409-r4/gcc-13-20230409/gcc/cp/error.cc:3315 0x21adbb0 cp_printer /usr/src/debug/sys-devel/gcc-13.0.1_pre20230409-r4/gcc-13-20230409/gcc/cp/error.cc:4484 0x1a71e85 pp_format(pretty_printer*, text_info*) /usr/src/debug/sys-devel/gcc-13.0.1_pre20230409-r4/gcc-13-20230409/gcc/pretty-print.cc:1475 0x1a710c3 diagnostic_report_diagnostic(diagnostic_context*, diagnostic_info*) /usr/src/debug/sys-devel/gcc-13.0.1_pre20230409-r4/gcc-13-20230409/gcc/diagnostic.cc:1592 0x1aef8c9 diagnostic_impl /usr/src/debug/sys-devel/gcc-13.0.1_pre20230409-r4/gcc-13-20230409/gcc/diagnostic.cc:1756 0x1aef8c9 warning_at(unsigned int, int, char const*, ...) /usr/src/debug/sys-devel/gcc-13.0.1_pre20230409-r4/gcc-13-20230409/gcc/diagnostic.cc:1893 0x9eda7e maybe_warn_operand /usr/src/debug/sys-devel/gcc-13.0.1_pre20230409-r4/gcc-13-20230409/gcc/tree-ssa-uninit.cc:731 0x1d83413 warn_uninitialized_vars /usr/src/debug/sys-devel/gcc-13.0.1_pre20230409-r4/gcc-13-20230409/gcc/tree-ssa-uninit.cc:1098 0x22271fa execute_late_warn_uninitialized /usr/src/debug/sys-devel/gcc-13.0.1_pre20230409-r4/gcc-13-20230409/gcc/tree-ssa-uninit.cc:1406 0x22271fa execute /usr/src/debug/sys-devel/gcc-13.0.1_pre20230409-r4/gcc-13-20230409/gcc/tree-ssa-uninit.cc:1451 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. ``` Reduction in progress.