// RUN: %clang_cc1 %s -triple=armv7-none-none-eabi -verify -Wunaligned-access -S -emit-llvm -o %t
// REQUIRES: arm-registered-target
//
// This test suite tests the warning triggered by the -Wunaligned-access option.
// The warning occurs when a struct or other type of record contains a field
// that is itself a record. The outer record must be a packed structure, while
// while the inner record must be unpacked. This is the fundamental condition
// for the warning to be triggered. Some of these tests may have three layers.
//
// The command line option -fsyntax-only is not used as Clang needs to be
// forced to layout the structs used in this test.
// The triple in the command line above is used for the assumptions about
// size and alignment of types.
// Set 1
;
;
;
;
;
;
;
;
;
;
;
;
// Set 2
;
;
;
;
;
;
;
;
;
;
;
// Set 3
;
;
;
;
// Set 4
;
;
;
;
;
;
;
;
;
;
;
// Set 5
;
;
;
;
;
// Set 6
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
struct U1 s1;
struct U2 s2;
struct U3 s3;
struct U4 s4;
struct U5 s5;
struct U6 s6;
struct U7 s7;
struct U8 s8;
struct U9 s9;
struct U10 s10;
struct U11 s11;
struct U12 s12;
struct U13 s13;
struct U14 s14;
struct U15 s15;
struct U16 s16;
struct U17 s17;
struct U18 s18;
struct U19 s19;
struct U20 s20;
struct U21 s21;
struct U22 s22;
struct U23 s23;
struct U24 s24;
struct U25 s25;
struct U26 s26;
struct U27 s27;
struct U28 s28;
struct U29 s29;
struct U30 s30;
struct U31 s31;
struct U32 s32;
struct U33 s33;
struct U34 s34;
struct U35 s35;
struct U36 s36;
struct U37 s37;
struct U38 s38;
struct U39 s39;
struct U40 s40;
struct U41 s41;
struct U42 s42;
struct U43 s43;
struct U44 s44;
struct U45 s45;
struct U46 s46;
struct U47 s47;
struct U48 s48;
struct U49 s49;
struct U50 s50;
struct U51 s51;
struct U52 s52;
struct U53 s53;
struct U54 s54;