diff options
Diffstat (limited to 'test/CodeGenCXX/const-init-cxx11.cpp')
-rw-r--r-- | test/CodeGenCXX/const-init-cxx11.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/CodeGenCXX/const-init-cxx11.cpp b/test/CodeGenCXX/const-init-cxx11.cpp index 84459fdbb0..6f13faa2fc 100644 --- a/test/CodeGenCXX/const-init-cxx11.cpp +++ b/test/CodeGenCXX/const-init-cxx11.cpp @@ -190,8 +190,8 @@ namespace MemberPtr { namespace CrossFuncLabelDiff { // Make sure we refuse to constant-fold the variable b. - constexpr long a() { return (long)&&lbl + (0 && ({lbl: 0;})); } - void test() { static long b = (long)&&lbl - a(); lbl: return; } + constexpr long a(bool x) { return x ? 0 : (long)&&lbl + (0 && ({lbl: 0;})); } + void test() { static long b = (long)&&lbl - a(false); lbl: return; } // CHECK: sub nsw i64 ptrtoint (i8* blockaddress(@_ZN18CrossFuncLabelDiff4testEv, {{.*}}) to i64), // CHECK: store i64 {{.*}}, i64* @_ZZN18CrossFuncLabelDiff4testEvE1b, align 8 } |