Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / Sema / align_value.c
blob7b367eba669139d9ac3be1ac0ab06e1223207c39
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
3 typedef double * __attribute__((align_value(64))) aligned_double;
5 void foo(aligned_double x, double * y __attribute__((align_value(32)))) { };
7 // expected-error@+1 {{requested alignment is not a power of 2}}
8 typedef double * __attribute__((align_value(63))) aligned_double1;
10 // expected-error@+1 {{requested alignment is not a power of 2}}
11 typedef double * __attribute__((align_value(-2))) aligned_double2;
13 // expected-error@+1 {{attribute takes one argument}}
14 typedef double * __attribute__((align_value(63, 4))) aligned_double3;
16 // expected-error@+1 {{attribute takes one argument}}
17 typedef double * __attribute__((align_value())) aligned_double3a;
19 // expected-error@+1 {{attribute takes one argument}}
20 typedef double * __attribute__((align_value)) aligned_double3b;
22 // expected-error@+1 {{'align_value' attribute requires integer constant}}
23 typedef double * __attribute__((align_value(4.5))) aligned_double4;
25 // expected-warning@+1 {{'align_value' attribute only applies to a pointer or reference ('int' is invalid)}}
26 typedef int __attribute__((align_value(32))) aligned_int;
28 typedef double * __attribute__((align_value(32*2))) aligned_double5;
30 // expected-warning@+1 {{'align_value' attribute only applies to variables and typedefs}}
31 void bar(void) __attribute__((align_value(32)));