1// REQUIRES: x86-registered-target
2// RUN: %clang_cc1 -triple i386-apple-darwin10 -fblocks -g -S %s -o -
3
4// rdar://7590323
5typedef struct dispatch_queue_s *dispatch_queue_t;
6__attribute__((visibility("default")))
7extern struct dispatch_queue_s _dispatch_main_q;
8typedef struct dispatch_item_s *dispatch_item_t;
9typedef void (^dispatch_legacy_block_t)(dispatch_item_t);
10dispatch_item_t LEGACY_dispatch_call(dispatch_queue_t dq,
11                                     dispatch_legacy_block_t dispatch_block,
12                                     dispatch_legacy_block_t callback_block) {
13  dispatch_queue_t lq = _dispatch_queue_get_current() ?: (&_dispatch_main_q);
14  dispatch_async(dq, ^{
15      if (callback_block) {
16        dispatch_async(lq, ^{
17          }
18          );
19      }
20    }
21    );
22}
23
24// radar://9008853
25typedef struct P {
26  int x;
27} PS;
28# 1 ""
29void foo() {
30  PS p2;
31}
32