comparison clang/test/Sema/attr-mode.c @ 207:2e18cbf3894f

LLVM12
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Tue, 08 Jun 2021 06:07:14 +0900
parents 1d019706d866
children c4bab56944e8
comparison
equal deleted inserted replaced
173:0572611fdcc8 207:2e18cbf3894f
2 // RUN: -verify %s 2 // RUN: -verify %s
3 // RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -DTEST_64BIT_X86 -fsyntax-only \ 3 // RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -DTEST_64BIT_X86 -fsyntax-only \
4 // RUN: -verify %s 4 // RUN: -verify %s
5 // RUN: %clang_cc1 -triple powerpc64-pc-linux-gnu -DTEST_64BIT_PPC64 -fsyntax-only \ 5 // RUN: %clang_cc1 -triple powerpc64-pc-linux-gnu -DTEST_64BIT_PPC64 -fsyntax-only \
6 // RUN: -verify %s 6 // RUN: -verify %s
7 // RUN: %clang_cc1 -triple powerpc64-pc-linux-gnu -DTEST_F128_PPC64 -fsyntax-only \
8 // RUN: -verify -target-feature +float128 %s
7 // RUN: %clang_cc1 -triple x86_64-pc-linux-gnux32 -DTEST_64BIT_X86 -fsyntax-only \ 9 // RUN: %clang_cc1 -triple x86_64-pc-linux-gnux32 -DTEST_64BIT_X86 -fsyntax-only \
8 // RUN: -verify %s 10 // RUN: -verify %s
9 // RUN: %clang_cc1 -triple mips-linux-gnu -DTEST_MIPS_32 -fsyntax-only \ 11 // RUN: %clang_cc1 -triple mips-linux-gnu -DTEST_MIPS_32 -fsyntax-only \
10 // RUN: -verify %s 12 // RUN: -verify %s
11 // RUN: %clang_cc1 -triple mips64-linux-gnuabin32 -DTEST_MIPS_N32 -fsyntax-only \ 13 // RUN: %clang_cc1 -triple mips64-linux-gnuabin32 -DTEST_MIPS_N32 -fsyntax-only \
88 typedef _Complex float c128ibm __attribute__ ((mode (TC))); 90 typedef _Complex float c128ibm __attribute__ ((mode (TC)));
89 void f_ft128_arg(long double *x); 91 void f_ft128_arg(long double *x);
90 void f_ft128_complex_arg(_Complex long double *x); 92 void f_ft128_complex_arg(_Complex long double *x);
91 void test_TFtype(f128ibm *a) { f_ft128_arg (a); } 93 void test_TFtype(f128ibm *a) { f_ft128_arg (a); }
92 void test_TCtype(c128ibm *a) { f_ft128_complex_arg (a); } 94 void test_TCtype(c128ibm *a) { f_ft128_complex_arg (a); }
95 #elif TEST_F128_PPC64
96 typedef int invalid_7 __attribute((mode(KF))); // expected-error{{type of machine mode does not match type of base type}}
97 typedef int invalid_8 __attribute((mode(KI))); // expected-error{{unknown machine mode}}
98 typedef _Complex float cf128 __attribute__((mode(KC)));
99 typedef float f128 __attribute__((mode(KF)));
100 void f_f128_arg(__float128 *x);
101 void f_f128_complex_arg(_Complex __float128 *x);
102 void test_KFtype(f128 *a) { f_f128_arg(a); }
103 void test_KCtype(cf128 *a) { f_f128_complex_arg(a); }
93 #elif TEST_MIPS_32 104 #elif TEST_MIPS_32
94 typedef unsigned int gcc_unwind_word __attribute__((mode(unwind_word))); 105 typedef unsigned int gcc_unwind_word __attribute__((mode(unwind_word)));
95 int foo[sizeof(gcc_unwind_word) == 4 ? 1 : -1]; 106 int foo[sizeof(gcc_unwind_word) == 4 ? 1 : -1];
96 #elif TEST_MIPS_N32 107 #elif TEST_MIPS_N32
97 typedef unsigned int gcc_unwind_word __attribute__((mode(unwind_word))); 108 typedef unsigned int gcc_unwind_word __attribute__((mode(unwind_word)));