diff options
| author | Roman Divacky <rdivacky@FreeBSD.org> | 2010-05-04 16:11:02 +0000 |
|---|---|---|
| committer | Roman Divacky <rdivacky@FreeBSD.org> | 2010-05-04 16:11:02 +0000 |
| commit | d7f7719e5e082c0b8ea2182dcbd2242b7834aa26 (patch) | |
| tree | 70fbd90da02177c8e6ef82adba9fa8ace285a5e3 /test/FrontendC | |
| parent | 9f4a1da9a0a56a0b0a7f8249f34b3cdea6179c41 (diff) | |
Notes
Diffstat (limited to 'test/FrontendC')
| -rw-r--r-- | test/FrontendC/2007-05-16-EmptyStruct.c | 2 | ||||
| -rw-r--r-- | test/FrontendC/2008-11-02-WeakAlias.c | 2 | ||||
| -rw-r--r-- | test/FrontendC/2009-01-20-k8.c | 2 | ||||
| -rw-r--r-- | test/FrontendC/2009-01-21-InvalidIterator.c | 2 | ||||
| -rw-r--r-- | test/FrontendC/2009-04-22-UnknownSize.c | 2 | ||||
| -rw-r--r-- | test/FrontendC/2009-06-14-HighlyAligned.c | 2 | ||||
| -rw-r--r-- | test/FrontendC/2009-12-07-BitFieldAlignment.c | 4 | ||||
| -rw-r--r-- | test/FrontendC/crash-invalid-array.c | 17 | ||||
| -rw-r--r-- | test/FrontendC/cstring-align.c | 5 | ||||
| -rw-r--r-- | test/FrontendC/inline-asm-function.c | 6 |
10 files changed, 33 insertions, 11 deletions
diff --git a/test/FrontendC/2007-05-16-EmptyStruct.c b/test/FrontendC/2007-05-16-EmptyStruct.c index 748aa98351d5..23c0b1d6a3f6 100644 --- a/test/FrontendC/2007-05-16-EmptyStruct.c +++ b/test/FrontendC/2007-05-16-EmptyStruct.c @@ -1,5 +1,5 @@ // PR 1417 -// RUN: %llvmgcc -xc %s -c -o - | llvm-dis | grep "struct.anon = type \{ \}" +// RUN: %llvmgcc -xc %s -c -o - | llvm-dis | grep "struct.anon = type \{\}" struct { } *X; diff --git a/test/FrontendC/2008-11-02-WeakAlias.c b/test/FrontendC/2008-11-02-WeakAlias.c index 4bdc5c7bec93..befafe455149 100644 --- a/test/FrontendC/2008-11-02-WeakAlias.c +++ b/test/FrontendC/2008-11-02-WeakAlias.c @@ -2,4 +2,4 @@ // PR2691 void init_IRQ(void) __attribute__((weak, alias("native_init_IRQ"))); -void native_init_IRQ(void) {}
\ No newline at end of file +void native_init_IRQ(void) {} diff --git a/test/FrontendC/2009-01-20-k8.c b/test/FrontendC/2009-01-20-k8.c index d28302b4ce80..2cd15387390c 100644 --- a/test/FrontendC/2009-01-20-k8.c +++ b/test/FrontendC/2009-01-20-k8.c @@ -1,4 +1,4 @@ -// RUN: %llvmgcc %s -S -march=k8 +// RUN: %llvmgcc %s -S -march=k8 -o /dev/null // XFAIL: * // XTARGET: x86,i386,i686 long double x; diff --git a/test/FrontendC/2009-01-21-InvalidIterator.c b/test/FrontendC/2009-01-21-InvalidIterator.c index 310ea3bfa17b..6ac61f8a748b 100644 --- a/test/FrontendC/2009-01-21-InvalidIterator.c +++ b/test/FrontendC/2009-01-21-InvalidIterator.c @@ -1,4 +1,4 @@ -// RUN: %llvmgcc %s -S -g +// RUN: %llvmgcc %s -S -g -o /dev/null typedef long unsigned int size_t; typedef unsigned short int uint16_t; diff --git a/test/FrontendC/2009-04-22-UnknownSize.c b/test/FrontendC/2009-04-22-UnknownSize.c index 2b90c91fe22c..7db9c0730c80 100644 --- a/test/FrontendC/2009-04-22-UnknownSize.c +++ b/test/FrontendC/2009-04-22-UnknownSize.c @@ -1,4 +1,4 @@ -// RUN: not %llvmgcc -O1 %s -S |& grep {error: storage size} +// RUN: not %llvmgcc -O1 %s -S -o /dev/null |& grep {error: storage size} // PR2958 static struct foo s; struct foo *p = &s; diff --git a/test/FrontendC/2009-06-14-HighlyAligned.c b/test/FrontendC/2009-06-14-HighlyAligned.c index 4678b75b6daf..227db74f47a0 100644 --- a/test/FrontendC/2009-06-14-HighlyAligned.c +++ b/test/FrontendC/2009-06-14-HighlyAligned.c @@ -1,4 +1,4 @@ -// RUN: %llvmgcc %s -S +// RUN: %llvmgcc %s -S -o /dev/null // PR4332 static int highly_aligned __attribute__((aligned(4096))); diff --git a/test/FrontendC/2009-12-07-BitFieldAlignment.c b/test/FrontendC/2009-12-07-BitFieldAlignment.c index a8312a5fd8a9..02ff8bce1821 100644 --- a/test/FrontendC/2009-12-07-BitFieldAlignment.c +++ b/test/FrontendC/2009-12-07-BitFieldAlignment.c @@ -9,7 +9,7 @@ struct S { }; void f0(struct S *a) { -// CHECK: %3 = load i32* %2, align 4 -// CHECK: store i32 %4, i32* %2, align 4 +// CHECK: load {{.*}}, align 4 +// CHECK: store {{.*}}, align 4 a->e = 0; } diff --git a/test/FrontendC/crash-invalid-array.c b/test/FrontendC/crash-invalid-array.c new file mode 100644 index 000000000000..d602f7854585 --- /dev/null +++ b/test/FrontendC/crash-invalid-array.c @@ -0,0 +1,17 @@ +// RUN: not %llvmgcc -O1 %s -S |& grep {error: invalid use of array with unspecified bounds} +// PR6913 + +#include <stdio.h> + +int main() +{ + int x[10][10]; + int (*p)[] = x; // <-- this line is what triggered it + + int i; + + for(i = 0; i < 10; ++i) + { + p[i][i] = i; + } +} diff --git a/test/FrontendC/cstring-align.c b/test/FrontendC/cstring-align.c index 715d0f312690..b9ec281f5677 100644 --- a/test/FrontendC/cstring-align.c +++ b/test/FrontendC/cstring-align.c @@ -1,6 +1,5 @@ // RUN: %llvmgcc %s -c -Os -m32 -emit-llvm -o - | llc -march=x86 -mtriple=i386-apple-darwin10 | FileCheck %s -check-prefix=DARWIN32 // RUN: %llvmgcc %s -c -Os -m64 -emit-llvm -o - | llc -march=x86-64 -mtriple=x86_64-apple-darwin10 | FileCheck %s -check-prefix=DARWIN64 -// XFAIL: * // XTARGET: darwin extern void func(const char *, const char *); @@ -9,10 +8,10 @@ void long_function_name() { func("%s: the function name", __func__); } -// DARWIN64: .align 3 +// DARWIN64: .align 4 // DARWIN64: ___func__. // DARWIN64: .asciz "long_function_name" -// DARWIN32: .align 2 +// DARWIN32: .align 4 // DARWIN32: ___func__. // DARWIN32: .asciz "long_function_name" diff --git a/test/FrontendC/inline-asm-function.c b/test/FrontendC/inline-asm-function.c new file mode 100644 index 000000000000..e5848409865b --- /dev/null +++ b/test/FrontendC/inline-asm-function.c @@ -0,0 +1,6 @@ +// RUN: %llvmgcc -S %s -fasm-blocks -o - -O | grep naked +// 7533078 (partial). + +asm int f() { + xyz +} |
