Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 1 | // RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm %s -o - | FileCheck %s |
Eli Friedman | 09a8a0e | 2009-12-27 05:43:15 +0000 | [diff] [blame] | 2 | |
| 3 | // Check that the following construct, which is similar to one which occurs |
Richard Smith | e24f5fc | 2011-11-17 22:56:20 +0000 | [diff] [blame] | 4 | // in Firefox, is folded correctly. |
Eli Friedman | 09a8a0e | 2009-12-27 05:43:15 +0000 | [diff] [blame] | 5 | struct A { char x; }; |
| 6 | struct B { char y; }; |
| 7 | struct C : A,B {}; |
| 8 | unsigned char x = ((char*)(B*)(C*)0x1000) - (char*)0x1000; |
| 9 | |
| 10 | // CHECK: @x = global i8 1 |