xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGen/compound.c (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 < %s -emit-llvm
2*f4a2713aSLionel Sambuc int A;
3*f4a2713aSLionel Sambuc long long B;
4*f4a2713aSLionel Sambuc int C;
5*f4a2713aSLionel Sambuc int *P;
test1()6*f4a2713aSLionel Sambuc void test1() {
7*f4a2713aSLionel Sambuc   C = (A /= B);
8*f4a2713aSLionel Sambuc 
9*f4a2713aSLionel Sambuc   P -= 4;
10*f4a2713aSLionel Sambuc 
11*f4a2713aSLionel Sambuc   C = P - (P+10);
12*f4a2713aSLionel Sambuc }
13*f4a2713aSLionel Sambuc 
14*f4a2713aSLionel Sambuc short x;
test2(char c)15*f4a2713aSLionel Sambuc void test2(char c) { x += c; }
16*f4a2713aSLionel Sambuc 
foo(char * strbuf)17*f4a2713aSLionel Sambuc void foo(char *strbuf) {
18*f4a2713aSLionel Sambuc   int stufflen = 4;
19*f4a2713aSLionel Sambuc   strbuf += stufflen;
20*f4a2713aSLionel Sambuc }
21*f4a2713aSLionel Sambuc 
22*f4a2713aSLionel Sambuc 
23*f4a2713aSLionel Sambuc // Aggregate cast to void
f(union uu p)24*f4a2713aSLionel Sambuc union uu { int a;}; void f(union uu p) { (void) p;}
25*f4a2713aSLionel Sambuc 
26