diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2011-10-28 23:26:52 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2011-10-28 23:26:52 +0000 |
commit | ee591a90c2e26c1ba33a4befb364a1c35fb2c311 (patch) | |
tree | 95cdcee2e48a995e8ba560c3d2aad1a6298813a0 /test/Sema/const-eval.c | |
parent | 50af19cb8aec23a182c9032e98e13f5da7707440 (diff) |
Fix assertion in constant expression evaluation. The LHS of a floating-point
binary operator isn't an rvalue if it's an assignment operator.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143250 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/const-eval.c')
-rw-r--r-- | test/Sema/const-eval.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/Sema/const-eval.c b/test/Sema/const-eval.c index bdb40ae54b..6dcc6db765 100644 --- a/test/Sema/const-eval.c +++ b/test/Sema/const-eval.c @@ -86,3 +86,5 @@ void rdar8875946() { double _Complex P; float _Complex P2 = 3.3f + P; } + +double d = (d = 0.0); // expected-error {{not a compile-time constant}} |