diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-08-14 13:13:41 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-08-14 13:13:41 +0000 |
commit | 62cc770a6675526d3ab8388ec39fde3087047dab (patch) | |
tree | 7194779d0703475b4e3427ebc4e5f9580a30f224 /gcc/lto/lto-lang.c | |
parent | 0dd26645a9f54544ab5987a07e4acc168eb501cc (diff) | |
download | gcc-62cc770a6675526d3ab8388ec39fde3087047dab.tar.gz |
2014-08-14 Richard Biener <rguenther@suse.de>
PR lto/62067
* lto-lang.c (def_fn_type): Fix error handling wrt va_end.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213960 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/lto/lto-lang.c')
-rw-r--r-- | gcc/lto/lto-lang.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/gcc/lto/lto-lang.c b/gcc/lto/lto-lang.c index b3b9ff7caf7..9e8524acac2 100644 --- a/gcc/lto/lto-lang.c +++ b/gcc/lto/lto-lang.c @@ -524,6 +524,7 @@ def_fn_type (builtin_type def, builtin_type ret, bool var, int n, ...) tree *args = XALLOCAVEC (tree, n); va_list list; int i; + bool err = false; va_start (list, n); for (i = 0; i < n; ++i) @@ -531,22 +532,22 @@ def_fn_type (builtin_type def, builtin_type ret, bool var, int n, ...) builtin_type a = (builtin_type) va_arg (list, int); t = builtin_types[a]; if (t == error_mark_node) - goto egress; + err = true; args[i] = t; } va_end (list); t = builtin_types[ret]; + if (err) + t = error_mark_node; if (t == error_mark_node) - goto egress; - if (var) + ; + else if (var) t = build_varargs_function_type_array (t, n, args); else t = build_function_type_array (t, n, args); - egress: builtin_types[def] = t; - va_end (list); } /* Used to help initialize the builtin-types.def table. When a type of |