This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[testsuite, committed] Add goacc/kernels-alias-ipa-pta-4.c


Hi,

this is an additional test, similar to goacc/kernels-alias-ipa-pta.c but with scalars instead of arrays.

Committed to trunk.

Thanks,
- Tom
Add goacc/kernels-alias-ipa-pta-4.c

2016-01-16  Tom de Vries  <tom@codesourcery.com>

	* c-c++-common/goacc/kernels-alias-ipa-pta-4.c: New test.

---
 .../c-c++-common/goacc/kernels-alias-ipa-pta-4.c    | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/gcc/testsuite/c-c++-common/goacc/kernels-alias-ipa-pta-4.c b/gcc/testsuite/c-c++-common/goacc/kernels-alias-ipa-pta-4.c
new file mode 100644
index 0000000..20b21dc
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/goacc/kernels-alias-ipa-pta-4.c
@@ -0,0 +1,21 @@
+/* { dg-additional-options "-O2" } */
+/* { dg-additional-options "-fipa-pta -fdump-tree-optimized" } */
+
+void
+foo (void)
+{
+  unsigned int a;
+  unsigned int b;
+  unsigned int c;
+
+#pragma acc kernels pcopyout (a, b, c)
+  {
+    a = 0;
+    b = 1;
+    c = a;
+  }
+}
+
+/* { dg-final { scan-tree-dump-times "(?n)= 0;$" 2 "optimized" } } */
+/* { dg-final { scan-tree-dump-times "(?n)= 1;$" 1 "optimized" } } */
+/* { dg-final { scan-tree-dump-times "(?n)= \\*_\[0-9\];$" 0 "optimized" } } */

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]