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
This commit is contained in:
parent
4cd76837a8
commit
d38f7dcef3
|
@ -1,3 +1,9 @@
|
|||
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)
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
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
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
/* PR c/64778 */
|
||||
/* { dg-do compile } */
|
||||
|
||||
int
|
||||
foo (int p)
|
||||
{
|
||||
int a;
|
||||
a ^= foo (,); /* { dg-error "expected expression before|too many arguments" } */
|
||||
return a;
|
||||
}
|
Loading…
Reference in New Issue