summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authoruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>2009-01-04 17:51:05 +0000
committeruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>2009-01-04 17:51:05 +0000
commit7bcd0dfd339d5eda6db1ae52f12c348f1fb13ea6 (patch)
tree01d3b8da516b028a7d9a846954e671bcf811056e /gcc
parente48f3020ea46b73a92024377faa96a622d4cc894 (diff)
downloadgcc-7bcd0dfd339d5eda6db1ae52f12c348f1fb13ea6.tar.gz
* gcc.dg/struct-ret-3.c: Include unistd.h.
(main): Exit early if system memory page size is larger than 4096 bytes. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@143056 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog8
-rw-r--r--gcc/testsuite/gcc.dg/struct-ret-3.c6
2 files changed, 13 insertions, 1 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 752b12ed9d4..a38b9d165a2 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2009-01-04 Uros Bizjak <ubizjak@gmail.com>
+
+ * gcc.dg/struct-ret-3.c: Include unistd.h.
+ (main): Exit early if system memory page size is
+ larger than 4096 bytes.
+
2009-01-04 Daniel Franke <franke.daniel@gmail.com>
PR fortran/38718
@@ -75,7 +81,7 @@
* gcc.c-torture/compile/pr38564.c: New testcase.
2008-12-29 Dorit Nuzman <dorit@il.ibm.com>
- Ira Rosen <irar@il.ibm.com>
+ Ira Rosen <irar@il.ibm.com>
PR tree-optimization/38529
* gcc.dg/vect/pr38529.c: New test.
diff --git a/gcc/testsuite/gcc.dg/struct-ret-3.c b/gcc/testsuite/gcc.dg/struct-ret-3.c
index 4a603cbe681..c384d49c590 100644
--- a/gcc/testsuite/gcc.dg/struct-ret-3.c
+++ b/gcc/testsuite/gcc.dg/struct-ret-3.c
@@ -7,6 +7,7 @@
#include <string.h>
#include <stdio.h>
#include <errno.h>
+#include <unistd.h>
unsigned long ossAlignX(unsigned long i, unsigned long X)
{
@@ -69,6 +70,11 @@ int main(void)
char buf[sizeof(struct stuff)+4096];
struct stuff *u = (struct stuff *)ossAlignX((unsigned long)&buf[0], 4096);
+
+ /* This test assumes system memory page size of 4096 bytes or less. */
+ if (sysconf(_SC_PAGESIZE) > 4096)
+ return 0;
+
memset(u, 1, sizeof(struct stuff));
u->c1[0] = '\xAA';
u->c2[0] = '\xBB';