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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* PR c++/57793 */
kono
parents:
diff changeset
2
kono
parents:
diff changeset
3 struct A { unsigned a : 1; unsigned b : 1; };
kono
parents:
diff changeset
4 struct B /* { dg-error "type .B. is too large" "" { target { c++ && ilp32 } } } */
kono
parents:
diff changeset
5 {
kono
parents:
diff changeset
6 unsigned char c[0x40000000]; /* { dg-error "size of array .c. is too large" "" { target { ! int32plus } } } */
kono
parents:
diff changeset
7 unsigned char d[0x40000ff0];/* { dg-error "size of array .d. is too large" "" { target { ! int32plus } } } */
kono
parents:
diff changeset
8 struct A e;
kono
parents:
diff changeset
9 }; /* { dg-error "type .struct B. is too large" "" { target { c && ilp32 } } } */
kono
parents:
diff changeset
10
kono
parents:
diff changeset
11 void *foo (struct B *p)
kono
parents:
diff changeset
12 {
kono
parents:
diff changeset
13 if (p->e.a)
kono
parents:
diff changeset
14 return (void *) 0;
kono
parents:
diff changeset
15 p->e.b = 1;
kono
parents:
diff changeset
16 return p->c;
kono
parents:
diff changeset
17 }
kono
parents:
diff changeset
18
kono
parents:
diff changeset
19 void
kono
parents:
diff changeset
20 bar (struct B *p)
kono
parents:
diff changeset
21 {
kono
parents:
diff changeset
22 foo (p);
kono
parents:
diff changeset
23 }