struct-ret-3.c: Include unistd.h.

* gcc.dg/struct-ret-3.c: Include unistd.h.
	(main): Exit early if system memory page size is
	larger than 4096 bytes.

From-SVN: r143056
This commit is contained in:
Uros Bizjak 2009-01-04 18:51:05 +01:00
parent dcc31d1148
commit 4c77d7f403
2 changed files with 13 additions and 1 deletions

View File

@ -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.

View File

@ -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';