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

login
register
mail settings
Submitter Joern Rennecke
Date Sept. 6, 2013, 9:13 a.m.
Message ID <20130906051316.6dpwtk0jasccs8kw-nzlynne@webmail.spamcop.net>
Download mbox | patch
Permalink /patch/273128/
State New
Headers show

Comments

Joern Rennecke - Sept. 6, 2013, 9:13 a.m.
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.
Richard Guenther - Sept. 6, 2013, 9:20 a.m.
On Fri, Sep 6, 2013 at 11:13 AM, Joern Rennecke
<joern.rennecke@embecosm.com> wrote:
> 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.

Yes.  On those targets NULL == NONLOCAL (0 is just another global address).

> Please find attached the amended patch.
>
> I have verified that this gets the new expected PASSes for atmega128-sim.

Ok.

Thanks,
Richard.

> 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" } } */
>

Patch

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" } } */