blob: 9a4f47651b74e536242f9e838c43449384fa83df [file] [log] [blame]
Daniel Dunbard7d5f022009-03-24 02:24:46 +00001// RUN: clang-cc -triple i386-pc-linux-gnu -emit-llvm -o %t %s &&
Daniel Dunbar0ac86f02009-03-18 19:51:01 +00002// RUN: grep 'declare i32 @f0() readnone$' %t &&
3// RUN: grep 'declare i32 @f1() readonly$' %t &&
4// RUN: grep 'declare void @f2(.* noalias sret)$' %t &&
5// RUN: grep 'declare void @f3(.* noalias sret)$' %t &&
6// RUN: grep 'declare void @f4(.* byval)$' %t &&
7// RUN: grep 'declare void @f5(.* byval)$' %t &&
8// RUN: true
9// PR3835
10
11typedef int T0;
12typedef struct { int a[16]; } T1;
13
14T0 __attribute__((const)) f0(void);
15T0 __attribute__((pure)) f1(void);
16T1 __attribute__((const)) f2(void);
17T1 __attribute__((pure)) f3(void);
18void __attribute__((const)) f4(T1 a);
19void __attribute__((pure)) f5(T1 a);
20
21void *ps[] = { f0, f1, f2, f3, f4, f5 };