From a220c9da9ea61712651df770e4699404f83e77da Mon Sep 17 00:00:00 2001 From: Kyrylo Tkachov Date: Fri, 16 Jan 2015 18:14:37 +0000 Subject: [PATCH] [ARM] PR 62066: Call va_end on early return from va_list processing function PR target/62066 * config/arm/arm-builtins.c (arm_expand_neon_args): Call va_end before early return 0. From-SVN: r219763 --- gcc/ChangeLog | 6 ++++++ gcc/config/arm/arm-builtins.c | 3 +++ 2 files changed, 9 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4c7441dbf3e..f95d05d2e4d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-01-16 Kyrylo Tkachov + + PR target/62066 + * config/arm/arm-builtins.c (arm_expand_neon_args): Call va_end before + early return 0. + 2015-01-16 Bernd Edlinger * sanitizer.def (BUILT_IN_TSAN_VPTR_UPDATE): Fixed parameters. diff --git a/gcc/config/arm/arm-builtins.c b/gcc/config/arm/arm-builtins.c index 37f27d74694..7a451133f86 100644 --- a/gcc/config/arm/arm-builtins.c +++ b/gcc/config/arm/arm-builtins.c @@ -2064,7 +2064,10 @@ arm_expand_neon_args (rtx target, machine_mode map_mode, int fcode, case NEON_ARG_MEMORY: /* Check if expand failed. */ if (op[argc] == const0_rtx) + { + va_end (ap); return 0; + } gcc_assert (MEM_P (op[argc])); PUT_MODE (op[argc], mode[argc]); /* ??? arm_neon.h uses the same built-in functions for signed -- 2.30.2