Skip to content

Commit

Permalink
Merge pull request #5287 from JohanEngelen/aligntest
Browse files Browse the repository at this point in the history
Add testcase for parsing of align(*) attribute on stack variables.
  • Loading branch information
9rnsr committed Dec 3, 2015
2 parents 09bbace + 6d986e7 commit 0b15efa
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/compilable/alignment.d
@@ -0,0 +1,12 @@
/* Test alignment of stack variables.
*
* This test should be moved to "runnable" once DMD implements alignment of stack variables.
*/

void main()
{
byte dummy;

align(32) int align32;
assert((cast(size_t)&align32 & cast(size_t)0b11111) == 0);
}

0 comments on commit 0b15efa

Please sign in to comment.