From: Yunzhong Gao Date: Mon, 14 Oct 2013 22:51:23 +0000 (+0000) Subject: Adding a regression test for PR17578. It is marked xfail until the bug is fixed. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b85695d94b8aa2679e28278ed5ae63074770173c;p=clang Adding a regression test for PR17578. It is marked xfail until the bug is fixed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192638 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/CodeGenCXX/offsetof.cpp b/test/CodeGenCXX/offsetof.cpp new file mode 100644 index 0000000000..7e257e6af9 --- /dev/null +++ b/test/CodeGenCXX/offsetof.cpp @@ -0,0 +1,14 @@ +// RUN: %clang_cc1 -emit-llvm -x c++ < %s +// XFAIL: * + +// PR17578 +struct Base { + int a; +}; +struct Derived : virtual Base +{}; + +void foo() +{ + int xx = __builtin_offsetof(Derived, a); +}