PR c++/83490
* config/i386/i386.c (init_cumulative_args): Don't check TYPE_EMPTY_P
on an error node.
* g++.dg/abi/pr83490.C: New test.
From-SVN: r255824
+2017-12-19 Marek Polacek <polacek@redhat.com>
+
+ PR c++/83490
+ * config/i386/i386.c (init_cumulative_args): Don't check TYPE_EMPTY_P
+ on an error node.
+
2017-12-19 Claudiu Zissulescu <claziss@synopsys.com>
* config/arc/arc.c (overriderregs): New variable.
bool seen_empty_type = false;
FOREACH_FUNCTION_ARGS (fntype, argtype, iter)
{
- if (VOID_TYPE_P (argtype))
+ if (argtype == error_mark_node || VOID_TYPE_P (argtype))
break;
if (TYPE_EMPTY_P (argtype))
seen_empty_type = true;
+2017-12-19 Marek Polacek <polacek@redhat.com>
+
+ PR c++/83490
+ * g++.dg/abi/pr83490.C: New test.
+
2017-12-19 H.J. Lu <hongjiu.lu@intel.com>
PR middle-end/83471
--- /dev/null
+// PR c++/83490
+// { dg-options "-Wabi" }
+
+struct A
+{
+ A foo(void i = 0); // { dg-error "incomplete type|invalid use" }
+};
+
+void bar()
+{
+ A().foo();
+}
+
+A A::foo(void i) // { dg-error "incomplete type|invalid use" }
+{
+ return A();
+}