summaryrefslogtreecommitdiff
path: root/test/Sema/offsetof-64.c
blob: 1cabec9842f574e9d84f2d463e607007ca9ae0f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// RUN: %clang_cc1 -fsyntax-only -verify %s -triple x86_64-linux-gnu
// expected-no-diagnostics

// PR15216
// Don't crash when taking computing the offset of structs with large arrays.
const unsigned long Size = (1l << 62);

struct Chunk {
  char padding[Size];
  char more_padding[1][Size];
  char data;
};

int test1 = __builtin_offsetof(struct Chunk, data);