| 1 |
/* { dg-do run } */ |
| 2 |
/* { dg-require-effective-target hwaddress_exec } */ |
| 3 |
/* |
| 4 |
Test taken from LLVM |
| 5 |
compiler-rt/test/hwasan/TestCases/check-interface.cpp |
| 6 |
*/ |
| 7 |
// Utilizes all flavors of __hwasan_load/store interface functions to verify |
| 8 |
// that the instrumentation and the interface provided by HWASan do match. |
| 9 |
// In case of a discrepancy, this test fails to link. |
| 10 |
|
| 11 |
typedef __UINT8_TYPE__ uint8_t; |
| 12 |
typedef __UINT16_TYPE__ uint16_t; |
| 13 |
typedef __UINT32_TYPE__ uint32_t; |
| 14 |
typedef __UINT64_TYPE__ uint64_t; |
| 15 |
|
| 16 |
#define F(T) void f_##T(T *a, T *b) { *a = *b; } |
| 17 |
|
| 18 |
F(uint8_t) |
| 19 |
F(uint16_t) |
| 20 |
F(uint32_t) |
| 21 |
F(uint64_t) |
| 22 |
|
| 23 |
typedef unsigned V32 __attribute__((__vector_size__(32))); |
| 24 |
F(V32) |
| 25 |
|
| 26 |
int main() {} |