blob: 309a68416ae1392a1a0f1c4b0a21f020ec5c4977 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
/* PR48985 */
/* { dg-do run } */
/* { dg-options "-std=gnu89" } */
/* { dg-skip-if "packed attribute missing for struct s" { "epiphany-*-*" } { "*" } { "" } } */
extern void abort (void);
struct s {
int i;
char c[];
} s = { 1, "01234" };
__SIZE_TYPE__ f (void) { return __builtin_object_size (&s.c, 0); }
int
main()
{
if (f() != sizeof ("01234"))
abort ();
return 0;
}
|