staging: rtl8192u: remove redundant assignment to pointer crypt
[linux/fpc-iii.git] / tools / testing / selftests / bpf / progs / btf_dump_test_case_packing.c
blob1cef3bec1dc7f630bebb4d471118033a9166283d
1 // SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause)
3 /*
4 * BTF-to-C dumper tests for struct packing determination.
6 * Copyright (c) 2019 Facebook
7 */
8 /* ----- START-EXPECTED-OUTPUT ----- */
9 struct packed_trailing_space {
10 int a;
11 short b;
12 } __attribute__((packed));
14 struct non_packed_trailing_space {
15 int a;
16 short b;
19 struct packed_fields {
20 short a;
21 int b;
22 } __attribute__((packed));
24 struct non_packed_fields {
25 short a;
26 int b;
29 struct nested_packed {
30 char: 4;
31 int a: 4;
32 long int b;
33 struct {
34 char c;
35 int d;
36 } __attribute__((packed)) e;
37 } __attribute__((packed));
39 union union_is_never_packed {
40 int a: 4;
41 char b;
42 char c: 1;
45 union union_does_not_need_packing {
46 struct {
47 long int a;
48 int b;
49 } __attribute__((packed));
50 int c;
53 union jump_code_union {
54 char code[5];
55 struct {
56 char jump;
57 int offset;
58 } __attribute__((packed));
61 /*------ END-EXPECTED-OUTPUT ------ */
63 int f(struct {
64 struct packed_trailing_space _1;
65 struct non_packed_trailing_space _2;
66 struct packed_fields _3;
67 struct non_packed_fields _4;
68 struct nested_packed _5;
69 union union_is_never_packed _6;
70 union union_does_not_need_packing _7;
71 union jump_code_union _8;
72 } *_)
74 return 0;