public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/vendors/ARM/heads/morello)] Fix up testsuite for purecap mmap behaviour
@ 2022-11-11 10:57 Matthew Malcomson
  0 siblings, 0 replies; 2+ messages in thread
From: Matthew Malcomson @ 2022-11-11 10:57 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:b239ebd117db9767f184e484850f71e8c5bc4438

commit b239ebd117db9767f184e484850f71e8c5bc4438
Author: Matthew Malcomson <matthew.malcomson@arm.com>
Date:   Fri Nov 11 10:57:37 2022 +0000

    Fix up testsuite for purecap mmap behaviour
    
    Simply need to use the PROT_MAX macro.

Diff:
---
 gcc/testsuite/gcc.dg/torture/pr69760.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/gcc/testsuite/gcc.dg/torture/pr69760.c b/gcc/testsuite/gcc.dg/torture/pr69760.c
index 53733c7c6a4..aed08e49644 100644
--- a/gcc/testsuite/gcc.dg/torture/pr69760.c
+++ b/gcc/testsuite/gcc.dg/torture/pr69760.c
@@ -17,6 +17,12 @@ test_func (double *a, int L, int m, int n, int N)
     }
 }
 
+#ifdef PROT_MAX
+# define PROT_MAX_RW PROT_MAX (PROT_READ | PROT_WRITE)
+#else
+# define PROT_MAX_RW 0
+#endif
+
 int
 main ()
 {
@@ -29,7 +35,7 @@ main ()
   long pgsz = sysconf(_SC_PAGESIZE);
   if (pgsz < sizeof (double) || pgsz > L * sizeof (double))
     return 0;
-  p = mmap ((void *) 0, L * n * sizeof (double), PROT_NONE,
+  p = mmap ((void *) 0, L * n * sizeof (double), PROT_NONE | PROT_MAX_RW,
 	    MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
   if (p == MAP_FAILED)
     return 0;

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [gcc(refs/vendors/ARM/heads/morello)] Fix up testsuite for purecap mmap behaviour
@ 2022-11-22 12:42 Stam Markianos-Wright
  0 siblings, 0 replies; 2+ messages in thread
From: Stam Markianos-Wright @ 2022-11-22 12:42 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:b239ebd117db9767f184e484850f71e8c5bc4438

commit b239ebd117db9767f184e484850f71e8c5bc4438
Author: Matthew Malcomson <matthew.malcomson@arm.com>
Date:   Fri Nov 11 10:57:37 2022 +0000

    Fix up testsuite for purecap mmap behaviour
    
    Simply need to use the PROT_MAX macro.

Diff:
---
 gcc/testsuite/gcc.dg/torture/pr69760.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/gcc/testsuite/gcc.dg/torture/pr69760.c b/gcc/testsuite/gcc.dg/torture/pr69760.c
index 53733c7c6a4..aed08e49644 100644
--- a/gcc/testsuite/gcc.dg/torture/pr69760.c
+++ b/gcc/testsuite/gcc.dg/torture/pr69760.c
@@ -17,6 +17,12 @@ test_func (double *a, int L, int m, int n, int N)
     }
 }
 
+#ifdef PROT_MAX
+# define PROT_MAX_RW PROT_MAX (PROT_READ | PROT_WRITE)
+#else
+# define PROT_MAX_RW 0
+#endif
+
 int
 main ()
 {
@@ -29,7 +35,7 @@ main ()
   long pgsz = sysconf(_SC_PAGESIZE);
   if (pgsz < sizeof (double) || pgsz > L * sizeof (double))
     return 0;
-  p = mmap ((void *) 0, L * n * sizeof (double), PROT_NONE,
+  p = mmap ((void *) 0, L * n * sizeof (double), PROT_NONE | PROT_MAX_RW,
 	    MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
   if (p == MAP_FAILED)
     return 0;

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-11-22 12:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-11 10:57 [gcc(refs/vendors/ARM/heads/morello)] Fix up testsuite for purecap mmap behaviour Matthew Malcomson
2022-11-22 12:42 Stam Markianos-Wright

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).