1 /* PR middle-end/36043 target/58744 target/65408 */
2 /* { dg-do run { target mmap } } */
3 /* { dg-options "-O2" } */
7 #define MAP_ANONYMOUS MAP_ANON
13 #define MAP_FAILED ((void *)-1)
21 } __attribute__((packed
)) pr58744
;
37 __attribute__ ((noinline
, noclone
))
41 if (x
.r
!= 1 || x
.g
!= 2 || x
.b
!= 3)
45 __attribute__ ((noinline
, noclone
))
52 __attribute__ ((noinline
, noclone
))
56 if (x
.r
!= 1 || x
.g
!= 2 || x
.b
!= 3)
60 __attribute__ ((noinline
, noclone
))
67 __attribute__ ((noinline
, noclone
))
71 if (x
.r
!= 1 || x
.g
!= 2 || x
.b
!= 3)
75 __attribute__ ((noinline
, noclone
))
85 char *p
= mmap ((void *) 0, 131072, PROT_READ
| PROT_WRITE
,
86 MAP_PRIVATE
| MAP_ANONYMOUS
, -1, 0);
89 char *endp
= p
+ 65536;
90 if (munmap (endp
, 65536) < 0)
93 pr58744
*s1
= (pr58744
*) endp
- 1;
99 pr36043
*s2
= (pr36043
*) endp
- 1;
105 pr65408
*s3
= (pr65408
*) endp
- 1;