diff options
author | Eli Friedman <eli.friedman@gmail.com> | 2012-02-21 22:41:33 +0000 |
---|---|---|
committer | Eli Friedman <eli.friedman@gmail.com> | 2012-02-21 22:41:33 +0000 |
commit | 51e47df5a57430f1b691b04258e663cce68aef9d (patch) | |
tree | 9a406576e50e18aff9b96303e5960c9ca6e53112 /test/Sema/const-eval.c | |
parent | 2789d8e753a9bdd36f2f90ba03ba4fb7521bcbb1 (diff) |
Fix a crash in the diangostic code in EvalConstant. PR12043.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151100 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/const-eval.c')
-rw-r--r-- | test/Sema/const-eval.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/Sema/const-eval.c b/test/Sema/const-eval.c index 22ac67adad..a9c8806b5d 100644 --- a/test/Sema/const-eval.c +++ b/test/Sema/const-eval.c @@ -112,3 +112,8 @@ int castViaInt[*(int*)(unsigned long)"test"]; // expected-error {{variable lengt // PR11391. struct PR11391 { _Complex float f; } pr11391; EVAL_EXPR(42, __builtin_constant_p(pr11391.f = 1)) + +// PR12043 +float varfloat; +const float constfloat = 0; +EVAL_EXPR(43, varfloat && constfloat) // expected-error {{must have a constant size}} |