blob: 5475d1c5de5a121cb916373812fd8889cae8e07e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
// RUN: %clang %s -Wall -emit-llvm -g %O0opt -c -o %t.bc
// RUN: rm -rf %t.klee-out
// RUN: %klee --output-dir=%t.klee-out --exit-on-error %t.bc
#include <assert.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
// Global should be aligned on a 128-byte boundary
int foo __attribute__((aligned(128)));
int main() {
int bar __attribute__((aligned(256)));
// Check alignment of global
assert(((size_t)&foo) % 128 == 0);
// Check alignment of local
assert(((size_t)&bar) % 256 == 0);
return 0;
}
|