re PR middle-end/16216 (ICE in gimplify_va_arg_expr after error)
PR middle-end/16216 * builtins.c (gimplify_va_arg_expr): Check for valist being an error_mark_node. From-SVN: r83881
This commit is contained in:
parent
beabab5904
commit
97bb4af77a
@ -1,3 +1,9 @@
|
||||
2004-06-29 Richard Henderson <rth@redhat.com>
|
||||
|
||||
PR middle-end/16216
|
||||
* builtins.c (gimplify_va_arg_expr): Check for valist being
|
||||
an error_mark_node.
|
||||
|
||||
2004-06-29 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR target/16195
|
||||
|
@ -4466,9 +4466,12 @@ gimplify_va_arg_expr (tree *expr_p, tree *pre_p, tree *post_p)
|
||||
tree t;
|
||||
|
||||
/* Verify that valist is of the proper type. */
|
||||
|
||||
want_va_type = va_list_type_node;
|
||||
have_va_type = TREE_TYPE (valist);
|
||||
|
||||
if (have_va_type == error_mark_node)
|
||||
return GS_ERROR;
|
||||
|
||||
if (TREE_CODE (want_va_type) == ARRAY_TYPE)
|
||||
{
|
||||
/* If va_list is an array type, the argument may have decayed
|
||||
|
7
gcc/testsuite/gcc.dg/noncompile/20040629-1.c
Normal file
7
gcc/testsuite/gcc.dg/noncompile/20040629-1.c
Normal file
@ -0,0 +1,7 @@
|
||||
/* PR 16216 */
|
||||
|
||||
void func()
|
||||
{
|
||||
const char *pek; int i;
|
||||
pek=__builtin_va_arg(ap,const char*); /* { dg-error "" } */
|
||||
}
|
Loading…
Reference in New Issue
Block a user