diff options
| author | Yunzhong Gao <Yunzhong_Gao@playstation.sony.com> | 2013-10-14 22:51:23 +0000 |
|---|---|---|
| committer | Yunzhong Gao <Yunzhong_Gao@playstation.sony.com> | 2013-10-14 22:51:23 +0000 |
| commit | 37868073aee3e9475e8cdaae8b38c5486586102b (patch) | |
| tree | 004409601f0fc258dfa125afc83082bef5fbe676 /clang/test | |
| parent | 53c885c37a41c76ac4cf3ff3233a53b243f8f4e9 (diff) | |
| download | bcm5719-llvm-37868073aee3e9475e8cdaae8b38c5486586102b.tar.gz bcm5719-llvm-37868073aee3e9475e8cdaae8b38c5486586102b.zip | |
Adding a regression test for PR17578. It is marked xfail until the bug is fixed.
llvm-svn: 192638
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/CodeGenCXX/offsetof.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/offsetof.cpp b/clang/test/CodeGenCXX/offsetof.cpp new file mode 100644 index 00000000000..7e257e6af9f --- /dev/null +++ b/clang/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); +} |

