[llvm-commits] [test-suite] r106870 - /test-suite/trunk/SingleSource/UnitTests/DefaultInitDynArrays.cpp

Fariborz Jahanian fjahanian at apple.com
Fri Jun 25 14:10:08 PDT 2010


Added a clang test case in r106887. Let's see if it survives  
BuildBot's variety of testing methods.

- Fariborz

On Jun 25, 2010, at 12:08 PM, Chandler Carruth wrote:

> On Fri, Jun 25, 2010 at 11:29 AM, Fariborz Jahanian <fjahanian at apple.com 
> > wrote:
> Author: fjahanian
> Date: Fri Jun 25 13:29:00 2010
> New Revision: 106870
>
> URL: http://llvm.org/viewvc/llvm-project?rev=106870&view=rev
> Log:
> Test case for PR7490 (clang PR).
>
> Any reason we can't reduce this to a FileCheck test on the IR within  
> Clang's codegen test suite? That would make it easier to spot  
> regressions...
>
>
>
> Added:
>    test-suite/trunk/SingleSource/UnitTests/DefaultInitDynArrays.cpp
>
> Added: test-suite/trunk/SingleSource/UnitTests/ 
> DefaultInitDynArrays.cpp
> URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/UnitTests/DefaultInitDynArrays.cpp?rev=106870&view=auto
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> = 
> ======================================================================
> --- test-suite/trunk/SingleSource/UnitTests/DefaultInitDynArrays.cpp  
> (added)
> +++ test-suite/trunk/SingleSource/UnitTests/DefaultInitDynArrays.cpp  
> Fri Jun 25 13:29:00 2010
> @@ -0,0 +1,20 @@
> +#include <assert.h>
> +
> +void func() {
> +  int *buckets = new int[111]();
> +  for (int i = 0; i < 111; i++)
> +    assert(buckets[i] == 0);
> +  for (int i = 0; i < 111; i++)
> +    buckets[i] = i;
> +
> +  delete [] buckets;
> +}
> +
> +int main(int argc, char **argv) {
> +    func();
> +    func();
> +    func();
> +    func();
> +    func();
> +    return 0;
> +}
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20100625/de45728d/attachment.html>


More information about the llvm-commits mailing list