1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s 2*f4a2713aSLionel Sambuc // PR2603 3*f4a2713aSLionel Sambuc 4*f4a2713aSLionel Sambuc struct A { 5*f4a2713aSLionel Sambuc char num_fields; 6*f4a2713aSLionel Sambuc }; 7*f4a2713aSLionel Sambuc 8*f4a2713aSLionel Sambuc struct B { 9*f4a2713aSLionel Sambuc char a, b[1]; 10*f4a2713aSLionel Sambuc }; 11*f4a2713aSLionel Sambuc 12*f4a2713aSLionel Sambuc const struct A Foo = { 13*f4a2713aSLionel Sambuc // CHECK: i8 1 14*f4a2713aSLionel Sambuc (char *)(&( (struct B *)(16) )->b[0]) - (char *)(16) 15*f4a2713aSLionel Sambuc }; 16