summaryrefslogtreecommitdiffstats
path: root/test/CodeGen/unaligned-field.c
blob: 5aa59c2799177ede878087269bfceba3c47229e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fms-extensions -emit-llvm < %s | FileCheck %s
// Test that __unaligned does not impact the layout of the fields.

struct A
{
    char a;
    __unaligned int b;
} a;
// CHECK: %struct.A = type { i8, i32 }

struct A2
{
    int b;
    char a;
    __unaligned int c;
} a2;
// CHECK: %struct.A2 = type { i32, i8, i32 }