diff options
Diffstat (limited to 'gcc/tree-stdarg.c')
-rw-r--r-- | gcc/tree-stdarg.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/tree-stdarg.c b/gcc/tree-stdarg.c index 46fc339a55a..7f16092f436 100644 --- a/gcc/tree-stdarg.c +++ b/gcc/tree-stdarg.c @@ -627,8 +627,7 @@ check_all_va_list_escapes (struct stdarg_info *si) static bool gate_optimize_stdarg (void) { - /* This optimization is only for stdarg functions. */ - return cfun->stdarg != 0; + return true; } @@ -645,6 +644,10 @@ execute_optimize_stdarg (void) const char *funcname = NULL; tree cfun_va_list; + /* This optimization is only for stdarg functions. */ + if (cfun->stdarg == 0) + return 0; + cfun->va_list_gpr_size = 0; cfun->va_list_fpr_size = 0; memset (&si, 0, sizeof (si)); |