summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/struct-packed-align.c
Commit message (Collapse)AuthorAgeFilesLines
* [FIX][NFC] Update clang sema testDiogo N. Sampaio2019-08-081-1/+1
| | | | | | | | Try to fix Sema test for default alignment for when compiling to ARM, but not to android, due r9427aa2d543b llvm-svn: 368301
* Restore previous structure ABI behavior for bit-fields with the packed ↵Aaron Ballman2017-08-081-1/+13
| | | | | | | | | | attribute for PS4 targets. An ABI change was introduced in r254596 that modified structure layouts when the 'packed' attribute was used on one-byte bitfields. Since the PS4 target needs to maintain backwards compatibility for all structure layouts, this change reintroduces the old behavior for PS4 targets only. It also introduces PS4 specific cases to the relevant test. Patch by Matthew Voss. llvm-svn: 310388
* Fix clang/test/Sema/struct-packed-align.c. "Windows" is not MS compiler.NAKAMURA Takumi2015-12-031-1/+1
| | | | llvm-svn: 254614
* PR25575: Make GCC 4.4+ comatible layout for packed bit-fileds of char type, ↵Alexey Bataev2015-12-031-1/+22
| | | | | | | | | patch by D. Polukhin This CL is for discussion how to better fix bit-filed layout compatibility issue with GCC (see PR25575 for test case and more details). Current clang behavior is compatible with GCC 4.1-4.3 series but it was fixed in 4.4+. Ignoring packed attribute looks very odd and because it was also fixed in GCC 4.4+, it makes sense also fix it in clang. Differential Revision: http://reviews.llvm.org/D14872 llvm-svn: 254596
* Implement target-specific __attribute__((aligned)) valueUlrich Weigand2015-04-211-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The GCC construct __attribute__((aligned)) is defined to set alignment to "the default alignment for the target architecture" according to the GCC documentation: The default alignment is sufficient for all scalar types, but may not be enough for all vector types on a target that supports vector operations. The default alignment is fixed for a particular target ABI. clang currently hard-coded an alignment of 16 bytes for that construct, which is correct on some platforms (including X86), but wrong on others (including SystemZ). Since this value is ABI-relevant, it is important to get correct for compatibility purposes. This patch adds a new TargetInfo member "DefaultAlignForAttributeAligned" that targets can set to the appropriate default __attribute__((aligned)) value. Note that I'm deliberately *not* using the existing "SuitableAlign" value, which is used to set the pre-defined macro __BIGGEST_ALIGNMENT__, since those two values may not be the same on all platforms. In fact, on X86, __attribute__((aligned)) always uses 16-byte alignment, while __BIGGEST_ALIGNMENT__ may be larger if AVX-2 or AVX-512 are supported. (This is actually not yet correctly implemented in clang either.) The patch provides a value for DefaultAlignForAttributeAligned only for SystemZ, and leaves the default for all other targets at 16, which means no visible change in behavior on all other targets. (The value is still wrong for some other targets, but I'd prefer to leave it to the target maintainers for those platforms to fix.) llvm-svn: 235397
* clang/test/Sema/struct-packed-align.c: Add the case in MS mode that ↵NAKAMURA Takumi2014-08-041-4/+6
| | | | | | | | | | alignment doesn't affect packing. Also, revert a couple of suppressions. r214298, "Suppress clang/test/Sema/struct-packed-align.c for targeting LLP64." r214301, "Suppress clang/test/Sema/struct-packed-align.c also on msvc for investigating." llvm-svn: 214794
* Trailing linefeed.NAKAMURA Takumi2014-08-041-4/+0
| | | | llvm-svn: 214793
* Suppress clang/test/Sema/struct-packed-align.c also on msvc for investigating.NAKAMURA Takumi2014-07-301-0/+3
| | | | | | FIXME: This test is incompatible to MS compat mode. FIXME: Don't suppress this also on mingw. :-p llvm-svn: 214301
* Suppress clang/test/Sema/struct-packed-align.c for targeting LLP64.NAKAMURA Takumi2014-07-301-0/+1
| | | | llvm-svn: 214298
* Prior to adding the new "expected-no-diagnostics" directive to ↵Andy Gibbs2012-10-191-0/+1
| | | | | | VerifyDiagnosticConsumer, make the necessary adjustment to 580 test-cases which will henceforth require this new directive. llvm-svn: 166280
* Fix PR9253, allowing attribute(aligned) to reduce the alignment ofChris Lattner2011-02-191-0/+15
| | | | | | a typedef. llvm-svn: 126059
* Support __attribute__((packed)) (along with other attributes) at theDouglas Gregor2010-03-291-0/+8
| | | | | | end of a struct/class/union in C++, from Justin Bogner! llvm-svn: 99811
* Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.Daniel Dunbar2009-12-151-1/+1
| | | | | | | | | - This is designed to make it obvious that %clang_cc1 is a "test variable" which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it can be useful to redefine what gets run as 'clang -cc1' (for example, to set a default target). llvm-svn: 91446
* Rename clang to clang-cc.Daniel Dunbar2009-03-241-1/+1
| | | | | | Tests and drivers updated, still need to shuffle dirs. llvm-svn: 67602
* __attribute__((aligned)) was being ignored!Daniel Dunbar2009-02-181-0/+8
| | | | | | This knocks out another 8 gcc/compat/i386 & x86_64 failures. llvm-svn: 64947
* Merge postfix attributes on record decls.Daniel Dunbar2008-10-031-0/+12
| | | | llvm-svn: 57019
* Cleanup/refactoring of Sema struct layout. This patch unifies the structEli Friedman2008-05-301-0/+20
| | | | | | | | | | and union codepaths and fixes some minor bugs. I'm reasonably confident this is accurate, at least for X86. I'll correct any bugs as I find them; I haven't found any for a while, though. llvm-svn: 51762
* Fix rdar://5921025 a crash on the included testcase.Chris Lattner2008-05-091-0/+7
| | | | llvm-svn: 50885
* Add more testsAnders Carlsson2008-02-161-8/+35
| | | | llvm-svn: 47217
* Make sizeof and __alignof work correctly with packed structs.Anders Carlsson2008-02-161-0/+37
llvm-svn: 47202
OpenPOWER on IntegriCloud