summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/exprs.c
diff options
context:
space:
mode:
authorNuno Lopes <nunoplopes@sapo.pt>2008-11-16 20:09:07 +0000
committerNuno Lopes <nunoplopes@sapo.pt>2008-11-16 20:09:07 +0000
commite236a482103425102319ac17f2980164e6241a97 (patch)
tree3e54f96690961f04ed5283b0f9364f4e1f06f340 /clang/test/CodeGen/exprs.c
parent420426100cbdb2d8d18cbca2914625cdebc5bef8 (diff)
downloadbcm5719-llvm-e236a482103425102319ac17f2980164e6241a97.tar.gz
bcm5719-llvm-e236a482103425102319ac17f2980164e6241a97.zip
fix folding of comma if given a non-constant operand.
Eli please take a look, as I'm not sure if this gets the extension warning in the right place llvm-svn: 59422
Diffstat (limited to 'clang/test/CodeGen/exprs.c')
-rw-r--r--clang/test/CodeGen/exprs.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/test/CodeGen/exprs.c b/clang/test/CodeGen/exprs.c
index f1c9a5d73fa..275c988ab9b 100644
--- a/clang/test/CodeGen/exprs.c
+++ b/clang/test/CodeGen/exprs.c
@@ -39,3 +39,9 @@ int test5(const float x, float float_number) {
return __builtin_isless(x, float_number);
}
+// this one shouldn't fold
+int ola() {
+ int a=2;
+ if ((0, (int)a) & 2) { return 1; }
+ return 2;
+}
OpenPOWER on IntegriCloud