Commit bb686a19 by Volker Reichelt Committed by Volker Reichelt

re PR c/35750 (ICE with invalid old-style parameter declaration)

	PR c/35750
	* c-decl.c (store_parm_decls_oldstyle): Skip invalid parameters.

	* gcc.dg/old-style-param-1.c: New test.

From-SVN: r133771
parent dec55d76
2008-03-31 Volker Reichelt <v.reichelt@netcologne.de>
PR c/35750
* c-decl.c (store_parm_decls_oldstyle): Skip invalid parameters.
2008-03-31 Andrew Pinski <andrew_pinski@playstation.sony.com>
PR middle-end/30186
......
......@@ -6483,7 +6483,9 @@ store_parm_decls_oldstyle (tree fndecl, const struct c_arg_info *arg_info)
/* Type for passing arg must be consistent with that
declared for the arg. ISO C says we take the unqualified
type for parameters declared with qualified type. */
if (!comptypes (TYPE_MAIN_VARIANT (DECL_ARG_TYPE (parm)),
if (TREE_TYPE (parm) != error_mark_node
&& TREE_TYPE (type) != error_mark_node
&& !comptypes (TYPE_MAIN_VARIANT (DECL_ARG_TYPE (parm)),
TYPE_MAIN_VARIANT (TREE_VALUE (type))))
{
if (TYPE_MAIN_VARIANT (TREE_TYPE (parm))
......
2008-03-31 Volker Reichelt <v.reichelt@netcologne.de>
PR c/35750
* gcc.dg/old-style-param-1.c: New test.
2008-03-31 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/object_overflow.adb: New test.
/* PR c/35750 */
void foo(int[]);
void foo(x) int x[](); {} /* { dg-error "array of functions" } */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment