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]

Re: Ping: RFA: testsuite patches (1/6): keeps_null_pointer_checks effect on pta/alias dump files


Quoting Richard Biener <richard.guenther@gmail.com>:

I'd say rather than just disabling the scan for
keeps_null_pointer_checks you should add
appropriate scanning for those targets as well (I expect you just
don't see the 'NULL's in the points-to sets).

Well, for gcc.dg/ipa/ipa-pta-14.c, which doesn't have NONLOCAL otherwise,
you instead see NONLOCAL.

Please find attached the amended patch.

I have verified that this gets the new expected PASSes for atmega128-sim.
2013-09-06  Joern Rennecke  <joern.rennecke@embecosm.com>

        * gcc.dg/ipa/ipa-pta-14.c (scan-ipa-dump) [keeps_null_pointer_checks]:
        Don't expect NULL in foo.result set.
        * gcc.dg/tree-ssa/pta-escape-1.c (scan-tree-dump): Don't expect NULL
        in ESCAPED set.
        * gcc.dg/tree-ssa/pta-escape-2.c: Likewise.
        * gcc.dg/tree-ssa/pta-escape-3.c: Likewise.

diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-pta-14.c b/gcc/testsuite/gcc.dg/ipa/ipa-pta-14.c
index e8abc32..ed59cbf 100644
--- a/gcc/testsuite/gcc.dg/ipa/ipa-pta-14.c
+++ b/gcc/testsuite/gcc.dg/ipa/ipa-pta-14.c
@@ -22,7 +22,8 @@ int main()
   a.p = (void *)&c;
   p = foo(&a, &a);
   /* { dg-final { scan-ipa-dump "foo.result = { NULL a\[^ \]* c\[^ \]* }" "pta" { xfail *-*-* } } } */
-  /* { dg-final { scan-ipa-dump "foo.result = { NULL a\[^ \]* a\[^ \]* c\[^ \]* }" "pta" } } */
+  /* { dg-final { scan-ipa-dump "foo.result = { NULL a\[^ \]* a\[^ \]* c\[^ \]* }" "pta" { target { ! keeps_null_pointer_checks } } } } */
+  /* { dg-final { scan-ipa-dump "foo.result = { NONLOCAL a\[^ \]* a\[^ \]* c\[^ \]* }" "pta" { target { keeps_null_pointer_checks } } } } */
   ((struct X *)p)->p = (void *)0;
   if (a.p != (void *)0)
     abort ();
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pta-escape-1.c b/gcc/testsuite/gcc.dg/tree-ssa/pta-escape-1.c
index a424417..dcfae5d 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/pta-escape-1.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pta-escape-1.c
@@ -33,5 +33,6 @@ int main()
   return 0;
 }
 
-/* { dg-final { scan-tree-dump "ESCAPED = { NULL ESCAPED NONLOCAL x }" "alias" } } */
+/* { dg-final { scan-tree-dump "ESCAPED = { NULL ESCAPED NONLOCAL x }" "alias" { target { ! keeps_null_pointer_checks } } } } */
+/* { dg-final { scan-tree-dump "ESCAPED = { ESCAPED NONLOCAL x }" "alias" { target { keeps_null_pointer_checks } } } } */
 /* { dg-final { cleanup-tree-dump "alias" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pta-escape-2.c b/gcc/testsuite/gcc.dg/tree-ssa/pta-escape-2.c
index 8580382..e613959 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/pta-escape-2.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pta-escape-2.c
@@ -34,5 +34,6 @@ int main()
   return 0;
 }
 
-/* { dg-final { scan-tree-dump "ESCAPED = { NULL ESCAPED NONLOCAL x }" "alias" } } */
+/* { dg-final { scan-tree-dump "ESCAPED = { NULL ESCAPED NONLOCAL x }" "alias" { target { ! keeps_null_pointer_checks } } } } */
+/* { dg-final { scan-tree-dump "ESCAPED = { ESCAPED NONLOCAL x }" "alias" { target { keeps_null_pointer_checks } } } } */
 /* { dg-final { cleanup-tree-dump "alias" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pta-escape-3.c b/gcc/testsuite/gcc.dg/tree-ssa/pta-escape-3.c
index 5a121a0..870dcf6 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/pta-escape-3.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pta-escape-3.c
@@ -38,5 +38,6 @@ int main()
   return 0;
 }
 
-/* { dg-final { scan-tree-dump "ESCAPED = { NULL ESCAPED NONLOCAL x }" "alias" } } */
+/* { dg-final { scan-tree-dump "ESCAPED = { NULL ESCAPED NONLOCAL x }" "alias" { target { ! keeps_null_pointer_checks } } } } */
+/* { dg-final { scan-tree-dump "ESCAPED = { ESCAPED NONLOCAL x }" "alias" { target { keeps_null_pointer_checks } } } } */
 /* { dg-final { cleanup-tree-dump "alias" } } */

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