Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -triple i386-pc-linux-gnu -emit-llvm -o %t %s |
Daniel Dunbar | 4fcfde4 | 2009-11-08 01:45:36 +0000 | [diff] [blame] | 2 | // 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 |
Daniel Dunbar | 0ac86f0 | 2009-03-18 19:51:01 +0000 | [diff] [blame] | 8 | // PR3835 |
| 9 | |
| 10 | typedef int T0; |
| 11 | typedef struct { int a[16]; } T1; |
| 12 | |
| 13 | T0 __attribute__((const)) f0(void); |
| 14 | T0 __attribute__((pure)) f1(void); |
| 15 | T1 __attribute__((const)) f2(void); |
| 16 | T1 __attribute__((pure)) f3(void); |
| 17 | void __attribute__((const)) f4(T1 a); |
| 18 | void __attribute__((pure)) f5(T1 a); |
| 19 | |
| 20 | void *ps[] = { f0, f1, f2, f3, f4, f5 }; |