Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/c-c++-common/pr57793.c @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children |
rev | line source |
---|---|
111 | 1 /* PR c++/57793 */ |
2 | |
3 struct A { unsigned a : 1; unsigned b : 1; }; | |
4 struct B /* { dg-error "type .B. is too large" "" { target { c++ && ilp32 } } } */ | |
5 { | |
6 unsigned char c[0x40000000]; /* { dg-error "size of array .c. is too large" "" { target { ! int32plus } } } */ | |
7 unsigned char d[0x40000ff0];/* { dg-error "size of array .d. is too large" "" { target { ! int32plus } } } */ | |
8 struct A e; | |
9 }; /* { dg-error "type .struct B. is too large" "" { target { c && ilp32 } } } */ | |
10 | |
11 void *foo (struct B *p) | |
12 { | |
13 if (p->e.a) | |
14 return (void *) 0; | |
15 p->e.b = 1; | |
16 return p->c; | |
17 } | |
18 | |
19 void | |
20 bar (struct B *p) | |
21 { | |
22 foo (p); | |
23 } |