@@ -1161,7 +1161,7 @@ build_struct_literal (tree type, vec <constructor_elt, va_gc> *init)
if (COMPLEX_FLOAT_TYPE_P (type))
{
gcc_assert (vec_safe_length (init) == 2);
- return build_complex (type, (*init)[0].value, (*init)[1].value);
+ return complex_expr (type, (*init)[0].value, (*init)[1].value);
}
vec <constructor_elt, va_gc> *ve = NULL;
new file mode 100644
@@ -0,0 +1,14 @@
+// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105004
+// { dg-do compile }
+
+private struct _Complex(T)
+{
+ T re;
+ T im;
+}
+enum __c_complex_float : _Complex!float;
+
+__c_complex_float pr105004(float re, float im)
+{
+ return typeof(return)(re, im);
+}