Hi,

this fixes a call arguments mismatch in gcc.dg/torture/pr78218.c when compiling for nvptx.


I've verified that the test-case is still failing when the patch for PR81731 is reverted.

Committed.

Thanks,
- Tom
Fix call arguments mismatch in gcc.dg/torture/pr78218.c

2017-08-06  Tom de Vries  <t...@codesourcery.com>

	PR testsuite/81731
	* gcc.dg/torture/pr78218.c (struct v): New type, factored type out of
	variable 'a' definition.
	(b): Remove unused variable.
	(gp): New variable.
	(check): Add parameter corresponding to call in main, and handle.

---
 gcc/testsuite/gcc.dg/torture/pr78218.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/gcc/testsuite/gcc.dg/torture/pr78218.c b/gcc/testsuite/gcc.dg/torture/pr78218.c
index b3e2892..fd6ddc9 100644
--- a/gcc/testsuite/gcc.dg/torture/pr78218.c
+++ b/gcc/testsuite/gcc.dg/torture/pr78218.c
@@ -1,15 +1,18 @@
 /* { dg-do run } */
 
-struct 
+struct v
 {
   int v;
-} a[2];
+};
 
-int b; 
+struct v a[2];
+
+struct v *gp;
 
 void __attribute__((noinline,noclone))
-check ()
+check (struct v *p)
 {
+  gp = p;
   if (a[0].v != 1)
     __builtin_abort ();
 }

Reply via email to