Commit d38f7dce by Jakub Jelinek Committed by Jakub Jelinek

re PR c/64778 (ICE on invalid code on x86_64-linux-gnu: tree check: expected…

re PR c/64778 (ICE on invalid code on x86_64-linux-gnu: tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in create_tmp_from_val, at gimplify.c:491)

	PR c/64778
	* c-typeck.c (convert_arguments): Return -1 if there are
	error_args, even if we've diagnosed too many arguments.

	* gcc.dg/pr64778.c: New test.

From-SVN: r220138
parent 4cd76837
2015-01-26 Jakub Jelinek <jakub@redhat.com>
PR c/64778
* c-typeck.c (convert_arguments): Return -1 if there are
error_args, even if we've diagnosed too many arguments.
2015-01-21 Richard Biener <rguenther@suse.de>
PR middle-end/64313
......
......@@ -3143,7 +3143,7 @@ convert_arguments (location_t loc, vec<location_t> arg_loc, tree typelist,
else
error_at (loc, "too many arguments to function %qE", function);
inform_declaration (fundecl);
return parmnum;
return error_args ? -1 : (int) parmnum;
}
if (selector && argnum > 2)
......
2015-01-26 Jakub Jelinek <jakub@redhat.com>
PR c/64778
* gcc.dg/pr64778.c: New test.
2015-01-26 Jakub Jelinek <jakub@redhat.com>
PR middle-end/64421
* gcc.dg/vect/pr64421.c: New test.
......
/* PR c/64778 */
/* { dg-do compile } */
int
foo (int p)
{
int a;
a ^= foo (,); /* { dg-error "expected expression before|too many arguments" } */
return a;
}
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