https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103114
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
--- gcc/cp/parser.c.jj 2021-10-28 20:07:48.571193189 +0200
+++ gcc/cp/parser.c 2021-11-08 10:18:02.042896144 +0100
@@ -4804,9 +4804,9 @@ cp_parser_userdef_numeric_literal (cp_pa
else /* if (id_equal (suffix_id, "il")) */
type = long_double_type_node;
- value = build_complex (build_complex_type (type),
- fold_convert (type, integer_zero_node),
- fold_convert (type, value));
+ value = fold_build2 (COMPLEX_EXPR, build_complex_type (type),
+ fold_convert (type, integer_zero_node),
+ fold_convert (type, value));
}
if (cp_parser_uncommitted_to_tentative_parse_p (parser))
does that indeed, for the usual case it will do fold_binary_loc -> const_binop
-> build_complex.