blob: 409d14e22d39a7a7c0cd287c007a4d39349c1c14 [file] [log] [blame]
Daniel Dunbara5728872009-12-15 20:14:24 +00001// RUN: %clang_cc1 -triple i386-pc-linux-gnu -emit-llvm -o %t %s
Daniel Dunbar4fcfde42009-11-08 01:45:36 +00002// RUN: grep 'declare i32 @f0() readnone$' %t
3// RUN: grep 'declare i32 @f1() readonly$' %t
Chris Lattnerfb97cf22010-04-20 05:44:43 +00004// RUN: grep 'declare void @f2(.* sret)$' %t
5// RUN: grep 'declare void @f3(.* sret)$' %t
Daniel Dunbar4fcfde42009-11-08 01:45:36 +00006// RUN: grep 'declare void @f4(.* byval)$' %t
7// RUN: grep 'declare void @f5(.* byval)$' %t
Daniel Dunbar0ac86f02009-03-18 19:51:01 +00008// PR3835
9
10typedef int T0;
11typedef struct { int a[16]; } T1;
12
13T0 __attribute__((const)) f0(void);
14T0 __attribute__((pure)) f1(void);
15T1 __attribute__((const)) f2(void);
16T1 __attribute__((pure)) f3(void);
17void __attribute__((const)) f4(T1 a);
18void __attribute__((pure)) f5(T1 a);
19
20void *ps[] = { f0, f1, f2, f3, f4, f5 };