blob: 320c790c5e2d7a4e89ff7de8ebfc300765eccac9 [file] [log] [blame]
Richard Smithe24f5fc2011-11-17 22:56:20 +00001// RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s
Eli Friedman09a8a0e2009-12-27 05:43:15 +00002
3// Check that the following construct, which is similar to one which occurs
Richard Smithe24f5fc2011-11-17 22:56:20 +00004// in Firefox, is folded correctly.
Eli Friedman09a8a0e2009-12-27 05:43:15 +00005struct A { char x; };
6struct B { char y; };
7struct C : A,B {};
8unsigned char x = ((char*)(B*)(C*)0x1000) - (char*)0x1000;
9
10// CHECK: @x = global i8 1