summaryrefslogtreecommitdiffstats
path: root/test/CodeGen/func-return-member.c
blob: e6fc5623904b18372226423da08634836440cc71 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// RUN: clang-cc -emit-llvm < %s 2>&1 | not grep 'cannot codegen this l-value expression yet'

struct frk { float _Complex c; int x; };
struct faz { struct frk f; };
struct fuz { struct faz f; };

extern struct fuz foo(void);

int X;
struct frk F;
float _Complex C;

void bar(void) {
  X = foo().f.f.x;
}

void bun(void) {
  F = foo().f.f;
}

void ban(void) {
  C = foo().f.f.c;
}
OpenPOWER on IntegriCloud