aboutsummaryrefslogtreecommitdiffstats
path: root/test/regression/aligned.c
Commit message (Collapse)AuthorAgeFilesLines
* Revised attachment of name attributes to structs, unions, enumsXavier Leroy2019-02-251-0/+7
| | | | | | | | | | | | | | | | | | Consider: ``` struct s { ... } __attribute((aligned(N))); struct t { ... } __attribute((aligned(N))) struct t x; ``` In the first case, the aligned attribute should be attached to struct s, so that further references to struct s are aligned. In the second case, the aligned attribute should be attached to the variable x, because if we attach it to struct t, it will be ignored and cause a warning. This commit changes the attachment rule so that it treats both cases right. Extend regression test for "aligned" attribute accordingly, by testing aligned attribute applied to a name of struct type.
* Add regression test for "aligned" attributeXavier Leroy2019-02-251-0/+108
Expected results were obtained with GCC 5.4 and Clang 8.0