Add test to make sure that #pragma mark/error doesn't error if there are
[oota-llvm.git] / test / CFrontend / 2008-01-26-ReadOnlyByVal.c
1 // RUN: %llvmgcc %s -S -O1 -o - | llvm-as | opt -std-compile-opts | llvm-dis | not grep add
2
3 struct S { int A; int B; char C[1000]; };
4
5 int f(struct S x) __attribute__ ((const));
6
7 static int __attribute__ ((const)) g(struct S x) {
8         x.A = x.B;
9         return f(x);
10 }
11
12 int h(void) {
13         struct S x;
14         int r;
15         x.A = 0;
16         x.B = 9;
17         r = g(x);
18         return r + x.A;
19 }