https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80423
--- Comment #11 from Markus Trippelsdorf <trippels at gcc dot gnu.org> --- With the proposed patch: trippels@gcc2-power8 llvm_build % cat ClangOffloadBundler.ii typedef unsigned char uint8_t; struct A { template <int N> A(unsigned char (&)[N]); }; void fn1(A) { uint8_t a[]{0}; fn1(a); } trippels@gcc2-power8 llvm_build % /home/trippels/gcc_test/usr/local/bin/g++ -c ClangOffloadBundler.ii ClangOffloadBundler.ii: In function ‘void fn1(A)’: ClangOffloadBundler.ii:7:8: internal compiler error: canonical types differ for identical types unsigned char [1] and uint8_t [1] {aka unsigned char [1]} fn1(a); ^ 0x1038d76b comptypes(tree_node*, tree_node*, int) ../../gcc/gcc/cp/typeck.c:1433 0x10191a53 reference_related_p(tree_node*, tree_node*) ../../gcc/gcc/cp/call.c:1442 0x101a68b3 reference_binding ../../gcc/gcc/cp/call.c:1595 0x101a793b implicit_conversion ../../gcc/gcc/cp/call.c:1837 0x101a9c5b add_function_candidate ../../gcc/gcc/cp/call.c:2196 0x101ab0c7 add_template_candidate_real ../../gcc/gcc/cp/call.c:3208 0x101abc57 add_template_candidate ../../gcc/gcc/cp/call.c:3252 0x101abc57 add_candidates ../../gcc/gcc/cp/call.c:5483 0x101a5933 build_user_type_conversion_1 ../../gcc/gcc/cp/call.c:3799 0x101a7853 implicit_conversion ../../gcc/gcc/cp/call.c:1898 0x101a9c5b add_function_candidate ../../gcc/gcc/cp/call.c:2196 0x101aba8f add_candidates ../../gcc/gcc/cp/call.c:5496 0x101ac593 perform_overload_resolution ../../gcc/gcc/cp/call.c:4143 0x101afef3 build_new_function_call(tree_node*, vec<tree_node*, va_gc, vl_embed>**, bool, int) ../../gcc/gcc/cp/call.c:4232 0x103fd9f3 finish_call_expr(tree_node*, vec<tree_node*, va_gc, vl_embed>**, bool, bool, int) ../../gcc/gcc/cp/semantics.c:2441 0x10348197 cp_parser_postfix_expression ../../gcc/gcc/cp/parser.c:6992 0x10348f9f cp_parser_unary_expression ../../gcc/gcc/cp/parser.c:8103 0x1034a613 cp_parser_cast_expression ../../gcc/gcc/cp/parser.c:8781 0x1034af87 cp_parser_binary_expression ../../gcc/gcc/cp/parser.c:8882 0x1034bab7 cp_parser_assignment_expression ../../gcc/gcc/cp/parser.c:9169