[ARM] PR 62066: Call va_end on early return from va_list processing function
authorktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 16 Jan 2015 18:14:37 +0000 (18:14 +0000)
committerktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 16 Jan 2015 18:14:37 +0000 (18:14 +0000)
PR target/62066
* config/arm/arm-builtins.c (arm_expand_neon_args): Call va_end before
early return 0.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@219763 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/arm/arm-builtins.c

index 4c7441d..f95d05d 100644 (file)
@@ -1,3 +1,9 @@
+2015-01-16  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
+
+       PR target/62066
+       * config/arm/arm-builtins.c (arm_expand_neon_args): Call va_end before
+       early return 0.
+
 2015-01-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
 
        * sanitizer.def (BUILT_IN_TSAN_VPTR_UPDATE): Fixed parameters.
index 37f27d7..7a45113 100644 (file)
@@ -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