summaryrefslogtreecommitdiffstats
path: root/compiler-rt/test/asan/TestCases/Posix/lto-constmerge-odr.cpp
blob: 9dc1397f6f0e346f3cd3632f20cfa22fc220a2d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// RUN: %clangxx_asan -O3 -flto %s -o %t
// RUN: %run %t 2>&1

// REQUIRES: lto

int main(int argc, const char * argv[]) {
  struct { long width, height; } a = {16, 16};
  struct { long width, height; } b = {16, 16};

  // Just to make sure 'a' and 'b' don't get optimized out.
  asm volatile("" : : "r" (&a), "r" (&b));

  return 0;
}
OpenPOWER on IntegriCloud