https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79905
Bug ID: 79905 Summary: ICE in canonical types differ for identical types __vector(4) int and V4i {aka __vector(4) int} Product: gcc Version: 7.0 Status: UNCONFIRMED Keywords: ice-on-invalid-code Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: marxin at gcc dot gnu.org Target Milestone: --- Host: ppc64le-linux-gnu Created attachment 40889 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40889&action=edit test-case Following ICEs on ppc64le-linux-gnu (with cross-compiler): $ ppc64le-linux-gnu-g++ altivec.cpp altivec.cpp: In function ‘void test_vec_step(__vector(8) short int)’: altivec.cpp:20:12: error: ‘vec_step’ was not declared in this scope int res1[vec_step(arg1) == 8 ? 1 : -1]; ^~~~~~~~ altivec.cpp:20:12: note: suggested alternative: ‘vector’ int res1[vec_step(arg1) == 8 ? 1 : -1]; ^~~~~~~~ vector altivec.cpp: In function ‘void test1()’: altivec.cpp:44:13: internal compiler error: canonical types differ for identical types __vector(4) int and V4i {aka __vector(4) int} f(vAltiVec); ^ 0x75287f comptypes(tree_node*, tree_node*, int) .././../gcc/cp/typeck.c:1434 0x5ed46c standard_conversion .././../gcc/cp/call.c:1187 0x5f8748 implicit_conversion .././../gcc/cp/call.c:1839 0x5facc1 add_function_candidate .././../gcc/cp/call.c:2197 0x5fca7f add_candidates .././../gcc/cp/call.c:5504 0x5ff341 perform_overload_resolution .././../gcc/cp/call.c:4148 0x6018ce build_new_function_call(tree_node*, vec<tree_node*, va_gc, vl_embed>**, bool, int) .././../gcc/cp/call.c:4233 0x7a4bac finish_call_expr(tree_node*, vec<tree_node*, va_gc, vl_embed>**, bool, bool, int) .././../gcc/cp/semantics.c:2441 0x71c67b cp_parser_postfix_expression .././../gcc/cp/parser.c:6994 0x71aa94 cp_parser_unary_expression .././../gcc/cp/parser.c:8102 0x724fd7 cp_parser_cast_expression .././../gcc/cp/parser.c:8780 0x72556d cp_parser_binary_expression .././../gcc/cp/parser.c:8881 0x725e30 cp_parser_assignment_expression .././../gcc/cp/parser.c:9168 0x7289ea cp_parser_expression .././../gcc/cp/parser.c:9337 0x728fa9 cp_parser_expression_statement .././../gcc/cp/parser.c:10885 0x73a70c cp_parser_statement .././../gcc/cp/parser.c:10701 0x73ba14 cp_parser_statement_seq_opt .././../gcc/cp/parser.c:11027 0x73bb1f cp_parser_compound_statement .././../gcc/cp/parser.c:10981 0x73652d cp_parser_function_body .././../gcc/cp/parser.c:21438 0x73652d cp_parser_ctor_initializer_opt_and_function_body .././../gcc/cp/parser.c:21474