1 /* { dg-do compile } */
2 /* { dg-options "-mstrict-align -O3" } */
3
4 #define NULL 0
5
6 typedef unsigned uint32_t;
7 typedef struct __attribute__((__packed__))
8 {
9 uint32_t nTagID;
10 uint32_t nValueBufferSize;
11 uint32_t nValueLength;
12
13 } PropertyTags_t;
14
15 typedef struct
16 {
17 char *szName;
18 uint32_t nBufferSize;
19 uint32_t nLength;
20
21 } Something_t;
22
23 void SetTag(PropertyTags_t *pTag, uint32_t nBufferSize, uint32_t nLength);
24
25 void TestCase(Something_t *pSome, uint32_t nBufferSize, uint32_t nLength)
26 {
27 if (pSome != NULL)
28 {
29 PropertyTags_t sTag = { 0 };
30
31 SetTag(&sTag, nBufferSize, nLength);
32
33 pSome->nBufferSize = sTag.nValueBufferSize;
34 pSome->nLength = sTag.nValueLength;
35 }
36 }
37
38 /* { dg-final { scan-assembler-not "ldr\td" } } */