]> granicus.if.org Git - clang/commitdiff
make sure the size of constant arrays is respected
authorNuno Lopes <nunoplopes@sapo.pt>
Wed, 13 Aug 2008 23:28:57 +0000 (23:28 +0000)
committerNuno Lopes <nunoplopes@sapo.pt>
Wed, 13 Aug 2008 23:28:57 +0000 (23:28 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54769 91177308-0d34-0410-b5e6-96231b3b80d8

test/CodeGen/c-strings.c

index baff4ddfc1bada5aaed22f9b83265177d30e6764..a5a7ccd3b9c1a38174220334f5c1a79dd6887022 100644 (file)
@@ -1,7 +1,8 @@
 // RUN: clang -emit-llvm -o %t %s &&
 // RUN: grep "hello" %t | count 3 &&
 // RUN: grep 'c"hello\\00"' %t | count 2 &&
-// RUN: grep 'c"hello\\00\\00\\00"' %t | count 1
+// RUN: grep 'c"hello\\00\\00\\00"' %t | count 1 &&
+// RUN: grep 'c"ola"' %t | count 1
 
 /* Should be 3 hello string, two global (of different sizes), the rest
    are shared. */
@@ -32,3 +33,4 @@ void f4() {
   gaz(&x);
 }
 
+char x[3] = "ola";