blob: 9300e2c7669364d2e86a5ccb5d57fd47b7f3a1d7 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
// RUN: %llvmgcc %s -emit-llvm -g -c -o %t1.bc
// RUN: %klee --exit-on-error %t1.bc
// Darwin does not have strong aliases.
// XFAIL: darwin
#include <assert.h>
// alias for global
int b = 52;
extern int a __attribute__((alias("b")));
// alias for function
int __foo() { return 52; }
extern int foo() __attribute__((alias("__foo")));
int *c = &a;
int main() {
assert(a == 52);
assert(foo() == 52);
assert(*c == 52);
return 0;
}
|