Author: jrose
Date: Sat Aug 14 15:46:10 2010
New Revision: 111079
URL: http://llvm.org/viewvc/llvm-project?rev=111079&view=rev
Log:
Add a test for alloca region extents.
Modified:
cfe/trunk/test/Analysis/outofbound.c
Modified: cfe/trunk/test/Analysis/outofbound.c
URL:
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/outofbound.c?rev=111079&r1=111078&r2=111079&view=diff
==============================================================================
--- cfe/trunk/test/Analysis/outofbound.c (original)
+++ cfe/trunk/test/Analysis/outofbound.c Sat Aug 14 15:46:10 2010
@@ -71,3 +71,11 @@
y[5] = 5; // expected-warning{{out-of-bound}}
}
}
+
+void alloca_region(int a) {
+ if (a == 5) {
+ char *x = __builtin_alloca(a);
+ x[4] = 4; // no-warning
+ x[5] = 5; // expected-warning{{out-of-bound}}
+ }
+}
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits