[AMDGPU][True16][CodeGen] true16 codegen pattern for v_med3_u/i16 (#121850)
[llvm-project.git] / clang / test / CodeGenCXX / warn-padded-bitfields.cpp
blobf9882d03564fe6e7f25a0ec96fe994ef2494a183
1 // RUN: %clang_cc1 -triple=x86_64-none-none -Wpadded-bitfield -verify=expected %s -emit-llvm-only
3 struct S1 {
4 unsigned a : 1;
5 unsigned long long : 0; // expected-warning {{padding struct 'S1' with 63 bits to align anonymous bit-field}}
6 };
8 struct S2 {
9 unsigned a : 1;
10 unsigned long long b : 64; // expected-warning {{padding struct 'S2' with 63 bits to align 'b'}}
13 struct S3 {
14 char a : 1;
15 short b : 16; // expected-warning {{padding struct 'S3' with 15 bits to align 'b'}}
18 struct [[gnu::packed]] S4 {
19 char a : 1;
20 short b : 16;
23 struct S5 {
24 unsigned a : 1;
25 unsigned long long b : 63;
28 struct S6 {
29 unsigned a : 1;
30 unsigned long long b;
33 struct S7 {
34 int word;
35 struct {
36 int filler __attribute__ ((aligned (8)));
40 // The warnings are emitted when the layout of the structs is computed, so we have to use them.
41 void f(S1, S2, S3, S4, S5, S6, S7){}