1 // SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause)
4 * BTF-to-C dumper tests for implicit and explicit padding between fields and
5 * at the end of a struct.
7 * Copyright (c) 2019 Facebook
9 /* ----- START-EXPECTED-OUTPUT ----- */
10 struct padded_implicitly
{
16 /* ------ END-EXPECTED-OUTPUT ------ */
18 /* ----- START-EXPECTED-OUTPUT ----- */
20 *struct padded_explicitly {
27 /* ------ END-EXPECTED-OUTPUT ------ */
29 struct padded_explicitly
{
31 int: 1; /* algo will explicitly pad with full 32 bits here */
35 /* ----- START-EXPECTED-OUTPUT ----- */
37 *struct padded_a_lot {
46 /* ------ END-EXPECTED-OUTPUT ------ */
50 /* 32 bit of implicit padding here, which algo will make explicit */
56 /* ----- START-EXPECTED-OUTPUT ----- */
58 *struct padded_cache_line {
68 /* ------ END-EXPECTED-OUTPUT ------ */
70 struct padded_cache_line
{
72 int b
__attribute__((aligned(32)));
75 /* ----- START-EXPECTED-OUTPUT ----- */
77 *struct zone_padding {
85 * struct zone_padding __pad__;
89 /* ------ END-EXPECTED-OUTPUT ------ */
93 } __attribute__((__aligned__(8)));
99 struct zone_padding __pad__
;
103 struct padded_implicitly _1
;
104 struct padded_explicitly _2
;
105 struct padded_a_lot _3
;
106 struct padded_cache_line _4
;