diff mbox

[1/2] Fix GCC split-stack variadic argument tests

Message ID 1476731542-15838-1-git-send-email-adhemerval.zanella@linaro.com
State New
Headers show

Commit Message

Adhemerval Zanella Netto Oct. 17, 2016, 7:12 p.m. UTC
This test adds the expect va_end after va_start on split-stack tests.

gcc/ChangeLog:

	* gcc/testsuite/gcc.dg/split-3.c (down): Call va_end after va_start.
	* gcc/testsuite/gcc.dg/split-6.c (down): Likewise.
---
 gcc/ChangeLog                  | 5 +++++
 gcc/testsuite/gcc.dg/split-3.c | 1 +
 gcc/testsuite/gcc.dg/split-6.c | 1 +
 3 files changed, 7 insertions(+)

-- 
2.7.4

Comments

Jeff Law Oct. 17, 2016, 7:28 p.m. UTC | #1
On 10/17/2016 01:12 PM, Adhemerval Zanella wrote:
> This test adds the expect va_end after va_start on split-stack tests.

>

> gcc/ChangeLog:

>

> 	* gcc/testsuite/gcc.dg/split-3.c (down): Call va_end after va_start.

> 	* gcc/testsuite/gcc.dg/split-6.c (down): Likewise.

OK.  Would probably fall under the obvious rule.
jeff
diff mbox

Patch

diff --git a/gcc/testsuite/gcc.dg/split-3.c b/gcc/testsuite/gcc.dg/split-3.c
index 64bbb8c..5ba7616 100644
--- a/gcc/testsuite/gcc.dg/split-3.c
+++ b/gcc/testsuite/gcc.dg/split-3.c
@@ -40,6 +40,7 @@  down (int i, ...)
       || va_arg (ap, int) != 9
       || va_arg (ap, int) != 10)
     abort ();
+  va_end (ap);
 
   if (i > 0)
     {
diff --git a/gcc/testsuite/gcc.dg/split-6.c b/gcc/testsuite/gcc.dg/split-6.c
index b32cf8d..b3016ba 100644
--- a/gcc/testsuite/gcc.dg/split-6.c
+++ b/gcc/testsuite/gcc.dg/split-6.c
@@ -37,6 +37,7 @@  down (int i, ...)
       || va_arg (ap, int) != 9
       || va_arg (ap, int) != 10)
     abort ();
+  va_end (ap);
 
   if (i > 0)
     {