summaryrefslogtreecommitdiffstats
path: root/gcc/c-typeck.c
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2009-10-27 15:50:50 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2009-10-27 15:50:50 +0000
commitcb60919f59f4d1d194985ae80af659700d687de9 (patch)
tree522ccf534520423c5fa756e2c5fe5d52a6ed93a5 /gcc/c-typeck.c
parent2cbde60436e84440a6def503f0e8ba9eedf36e7d (diff)
downloadppe42-gcc-cb60919f59f4d1d194985ae80af659700d687de9.tar.gz
ppe42-gcc-cb60919f59f4d1d194985ae80af659700d687de9.zip
PR c/41842
* c-typeck.c (convert_arguments): Return -1 if any of the arguments is error_mark_node. * gcc.dg/pr41842.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@153599 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-typeck.c')
-rw-r--r--gcc/c-typeck.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c
index c7d2bc8da22..9b1f09c4593 100644
--- a/gcc/c-typeck.c
+++ b/gcc/c-typeck.c
@@ -2739,6 +2739,7 @@ convert_arguments (tree typelist, VEC(tree,gc) *values,
{
tree typetail, val;
unsigned int parmnum;
+ bool error_args = false;
const bool type_generic = fundecl
&& lookup_attribute ("type generic", TYPE_ATTRIBUTES(TREE_TYPE (fundecl)));
bool type_generic_remove_excess_precision = false;
@@ -3008,6 +3009,8 @@ convert_arguments (tree typelist, VEC(tree,gc) *values,
parmval = default_conversion (val);
VEC_replace (tree, values, parmnum, parmval);
+ if (parmval == error_mark_node)
+ error_args = true;
if (typetail)
typetail = TREE_CHAIN (typetail);
@@ -3021,7 +3024,7 @@ convert_arguments (tree typelist, VEC(tree,gc) *values,
return -1;
}
- return parmnum;
+ return error_args ? -1 : (int) parmnum;
}
/* This is the entry point used by the parser to build unary operators
OpenPOWER on IntegriCloud