• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #define bos(O, T)	__builtin_object_size(O, T)
2 
3 struct s {
4 	char arr[8];
5 	__INT32_TYPE__ i;
6 	__INT32_TYPE__ padding;
7 };
8 
9 static struct s s;
10 
obj_int1(void)11 int obj_int1(void) { return bos(&s.i, 1) == 4; }
obj_arr1(void)12 int obj_arr1(void) { return bos(&s.arr[1], 1) == 7; }
13 
14 /*
15  * check-name: builtin-objsize1
16  * check-command: test-linearize -Wno-decl $file
17  * check-known-to-fail
18  *
19  * check-output-ignore
20  * check-output-returns: 1
21  */
22