diff options
Diffstat (limited to 'clang/test')
-rw-r--r-- | clang/test/Frontend/fixed_point.c | 57 | ||||
-rw-r--r-- | clang/test/Frontend/fixed_point_bit_widths.c | 43 | ||||
-rw-r--r-- | clang/test/Frontend/fixed_point_errors.c | 27 | ||||
-rw-r--r-- | clang/test/Frontend/fixed_point_errors.cpp | 5 | ||||
-rw-r--r-- | clang/test/Frontend/fixed_point_not_enabled.c | 15 |
5 files changed, 0 insertions, 147 deletions
diff --git a/clang/test/Frontend/fixed_point.c b/clang/test/Frontend/fixed_point.c deleted file mode 100644 index d64bd55aa0b..00000000000 --- a/clang/test/Frontend/fixed_point.c +++ /dev/null @@ -1,57 +0,0 @@ -// RUN: %clang_cc1 -x c -ffixed-point -ast-dump %s | FileCheck %s --strict-whitespace - -/* Various contexts where type _Accum can appear. */ - -// Primary fixed point types -signed short _Accum s_short_accum; -signed _Accum s_accum; -signed long _Accum s_long_accum; -unsigned short _Accum u_short_accum; -unsigned _Accum u_accum; -unsigned long _Accum u_long_accum; - -// Aliased fixed point types -short _Accum short_accum; -_Accum accum; -long _Accum long_accum; - -// CHECK: |-VarDecl {{.*}} s_short_accum 'short _Accum' -// CHECK-NEXT: |-VarDecl {{.*}} s_accum '_Accum' -// CHECK-NEXT: |-VarDecl {{.*}} s_long_accum 'long _Accum' -// CHECK-NEXT: |-VarDecl {{.*}} u_short_accum 'unsigned short _Accum' -// CHECK-NEXT: |-VarDecl {{.*}} u_accum 'unsigned _Accum' -// CHECK-NEXT: |-VarDecl {{.*}} u_long_accum 'unsigned long _Accum' -// CHECK-NEXT: |-VarDecl {{.*}} short_accum 'short _Accum' -// CHECK-NEXT: |-VarDecl {{.*}} accum '_Accum' -// CHECK-NEXT: |-VarDecl {{.*}} long_accum 'long _Accum' - -#define MIX_TYPE_SPEC(SPEC, SIGN, SIZE, ID) \ - SPEC SIGN SIZE _Accum ID; \ - SIGN SPEC SIZE _Accum ID ## 2; \ - SIGN SIZE SPEC _Accum ID ## 3; \ - SIGN SIZE _Accum SPEC ID ## 4; - -/* Mixing fixed point types with other type specifiers */ - -#define MIX_VOLATILE(SIGN, SIZE, ID) MIX_TYPE_SPEC(volatile, SIGN, SIZE, ID) -#define MIX_ATOMIC(SIGN, SIZE, ID) MIX_TYPE_SPEC(_Atomic, SIGN, SIZE, ID) -#define MIX_CONST(SIGN, SIZE, ID) MIX_TYPE_SPEC(const, SIGN, SIZE, ID) - -MIX_VOLATILE(signed, short, vol_s_short_accum) -MIX_ATOMIC(signed, short, atm_s_short_accum) -MIX_CONST(signed, short, const_s_short_accum) - -// CHECK-NEXT: |-VarDecl {{.*}} vol_s_short_accum 'volatile short _Accum' -// CHECK-NEXT: |-VarDecl {{.*}} vol_s_short_accum2 'volatile short _Accum' -// CHECK-NEXT: |-VarDecl {{.*}} vol_s_short_accum3 'volatile short _Accum' -// CHECK-NEXT: |-VarDecl {{.*}} vol_s_short_accum4 'volatile short _Accum' - -// CHECK-NEXT: |-VarDecl {{.*}} atm_s_short_accum '_Atomic(short _Accum)' -// CHECK-NEXT: |-VarDecl {{.*}} atm_s_short_accum2 '_Atomic(short _Accum)' -// CHECK-NEXT: |-VarDecl {{.*}} atm_s_short_accum3 '_Atomic(short _Accum)' -// CHECK-NEXT: |-VarDecl {{.*}} atm_s_short_accum4 '_Atomic(short _Accum)' - -// CHECK-NEXT: |-VarDecl {{.*}} const_s_short_accum 'const short _Accum' -// CHECK-NEXT: |-VarDecl {{.*}} const_s_short_accum2 'const short _Accum' -// CHECK-NEXT: |-VarDecl {{.*}} const_s_short_accum3 'const short _Accum' -// CHECK-NEXT: `-VarDecl {{.*}} const_s_short_accum4 'const short _Accum' diff --git a/clang/test/Frontend/fixed_point_bit_widths.c b/clang/test/Frontend/fixed_point_bit_widths.c deleted file mode 100644 index 8ad9ffbd6d4..00000000000 --- a/clang/test/Frontend/fixed_point_bit_widths.c +++ /dev/null @@ -1,43 +0,0 @@ -// RUN: %clang -x c -ffixed-point -S -emit-llvm -o - %s | FileCheck %s - -int size_SsA = sizeof(signed short _Accum); -int size_SA = sizeof(signed _Accum); -int size_SlA = sizeof(signed long _Accum); -int align_SsA = __alignof(signed short _Accum); -int align_SA = __alignof(signed _Accum); -int align_SlA = __alignof(signed long _Accum); - -int size_UsA = sizeof(unsigned short _Accum); -int size_UA = sizeof(unsigned _Accum); -int size_UlA = sizeof(unsigned long _Accum); -int align_UsA = __alignof(unsigned short _Accum); -int align_UA = __alignof(unsigned _Accum); -int align_UlA = __alignof(unsigned long _Accum); - -int size_sA = sizeof(short _Accum); -int size_A = sizeof(_Accum); -int size_lA = sizeof(long _Accum); -int align_sA = __alignof(short _Accum); -int align_A = __alignof(_Accum); -int align_lA = __alignof(long _Accum); - -// CHECK: @size_SsA = dso_local global i{{[0-9]+}} 2 -// CHECK-NEXT: @size_SA = dso_local global i{{[0-9]+}} 4 -// CHECK-NEXT: @size_SlA = dso_local global i{{[0-9]+}} 8 -// CHECK-NEXT: @align_SsA = dso_local global i{{[0-9]+}} 2 -// CHECK-NEXT: @align_SA = dso_local global i{{[0-9]+}} 4 -// CHECK-NEXT: @align_SlA = dso_local global i{{[0-9]+}} 8 - -// CHECK-NEXT: @size_UsA = dso_local global i{{[0-9]+}} 2 -// CHECK-NEXT: @size_UA = dso_local global i{{[0-9]+}} 4 -// CHECK-NEXT: @size_UlA = dso_local global i{{[0-9]+}} 8 -// CHECK-NEXT: @align_UsA = dso_local global i{{[0-9]+}} 2 -// CHECK-NEXT: @align_UA = dso_local global i{{[0-9]+}} 4 -// CHECK-NEXT: @align_UlA = dso_local global i{{[0-9]+}} 8 - -// CHECK-NEXT: @size_sA = dso_local global i{{[0-9]+}} 2 -// CHECK-NEXT: @size_A = dso_local global i{{[0-9]+}} 4 -// CHECK-NEXT: @size_lA = dso_local global i{{[0-9]+}} 8 -// CHECK-NEXT: @align_sA = dso_local global i{{[0-9]+}} 2 -// CHECK-NEXT: @align_A = dso_local global i{{[0-9]+}} 4 -// CHECK-NEXT: @align_lA = dso_local global i{{[0-9]+}} 8 diff --git a/clang/test/Frontend/fixed_point_errors.c b/clang/test/Frontend/fixed_point_errors.c deleted file mode 100644 index 0158dc68c42..00000000000 --- a/clang/test/Frontend/fixed_point_errors.c +++ /dev/null @@ -1,27 +0,0 @@ -// RUN: %clang_cc1 -verify -ffixed-point %s - -/* We do not yet support long long. No recommended bit widths are given for this - * size. */ - -long long _Accum longlong_accum; // expected-error{{'long long _Accum' is invalid}} -unsigned long long _Accum u_longlong_accum; // expected-error{{'long long _Accum' is invalid}} - -/* Although _Complex types work with floating point numbers, the extension - * provides no info for complex fixed point types. */ - -_Complex signed short _Accum cmplx_s_short_accum; // expected-error{{'_Complex _Accum' is invalid}} -_Complex signed _Accum cmplx_s_accum; // expected-error{{'_Complex _Accum' is invalid}} -_Complex signed long _Accum cmplx_s_long_accum; // expected-error{{'_Complex _Accum' is invalid}} -_Complex unsigned short _Accum cmplx_u_short_accum; // expected-error{{'_Complex _Accum' is invalid}} -_Complex unsigned _Accum cmplx_u_accum; // expected-error{{'_Complex _Accum' is invalid}} -_Complex unsigned long _Accum cmplx_u_long_accum; // expected-error{{'_Complex _Accum' is invalid}} -_Complex short _Accum cmplx_s_short_accum; // expected-error{{'_Complex _Accum' is invalid}} -_Complex _Accum cmplx_s_accum; // expected-error{{'_Complex _Accum' is invalid}} -_Complex long _Accum cmplx_s_long_accum; // expected-error{{'_Complex _Accum' is invalid}} - -/* Bad combinations */ -float _Accum f_accum; // expected-error{{cannot combine with previous 'float' declaration specifier}} -double _Accum d_accum; // expected-error{{cannot combine with previous 'double' declaration specifier}} -_Bool _Accum b_accum; // expected-error{{cannot combine with previous '_Bool' declaration specifier}} -char _Accum c_accum; // expected-error{{cannot combine with previous 'char' declaration specifier}} -int _Accum i_accum; // expected-error{{cannot combine with previous 'int' declaration specifier}} diff --git a/clang/test/Frontend/fixed_point_errors.cpp b/clang/test/Frontend/fixed_point_errors.cpp deleted file mode 100644 index aa95bb10c5d..00000000000 --- a/clang/test/Frontend/fixed_point_errors.cpp +++ /dev/null @@ -1,5 +0,0 @@ -// RUN: %clang_cc1 -x c++ -ffixed-point %s -verify - -// Name namgling is not provided for fixed point types in c++ - -_Accum accum; // expected-error{{unknown type name '_Accum'}} diff --git a/clang/test/Frontend/fixed_point_not_enabled.c b/clang/test/Frontend/fixed_point_not_enabled.c deleted file mode 100644 index e5c82f54b62..00000000000 --- a/clang/test/Frontend/fixed_point_not_enabled.c +++ /dev/null @@ -1,15 +0,0 @@ -// RUN: %clang_cc1 -x c -verify %s - -// Primary fixed point types -signed short _Accum s_short_accum; // expected-error{{compile with '-ffixed-point' to enable fixed point types}} -signed _Accum s_accum; // expected-error{{compile with '-ffixed-point' to enable fixed point types}} -signed long _Accum s_long_accum; // expected-error{{compile with '-ffixed-point' to enable fixed point types}} -unsigned short _Accum u_short_accum; // expected-error{{compile with '-ffixed-point' to enable fixed point types}} -unsigned _Accum u_accum; // expected-error{{compile with '-ffixed-point' to enable fixed point types}} -unsigned long _Accum u_long_accum; // expected-error{{compile with '-ffixed-point' to enable fixed point types}} - -// Aliased fixed point types -short _Accum short_accum; // expected-error{{compile with '-ffixed-point' to enable fixed point types}} -_Accum accum; // expected-error{{compile with '-ffixed-point' to enable fixed point types}} - // expected-warning@-1{{type specifier missing, defaults to 'int'}} -long _Accum long_accum; // expected-error{{compile with '-ffixed-point' to enable fixed point types}} |