main() {
  int i;
  __typeof(i) j;
  double dd;
  __typeof(dd) dd2;
  typedef struct s *T;
  T a;
  struct s *p;
  typedef __typeof(p) T2;
  T2 b;
  typedef struct s2 *T3;
  T3 c;
  struct s2 *p2;
  typedef __typeof(p2) T4;
  T4 d;
  __typeof(p) e;
  __typeof(p2) f;
  i = 4;
  p = 0;
  p2 = 0;
  i = ({
    __typeof(1) _a = (1);
    __typeof(i) _b = (i);
    _a > _b ? _a : _b;
  });
  dd = ({
    __typeof(dd) _a = (dd);
    __typeof(2.2) _b = (2.2);
    _a > _b ? _a : _b;
  });
  __typeof(__typeof(char *)[4]) y;
  y[2] = "hello";
  __typeof(int[4]) k;
  k[2] = 4;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x4,-0x8(%rbp)
movq   $0x0,-0x30(%rbp)
movq   $0x0,-0x48(%rbp)
movl   $0x1,-0x64(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x68(%rbp)
mov    -0x64(%rbp),%eax
cmp    -0x68(%rbp),%eax
jle    114d <main+0x4d>
mov    -0x64(%rbp),%eax
mov    %eax,-0xc4(%rbp)
jmp    1156 <main+0x56>
mov    -0x68(%rbp),%eax
mov    %eax,-0xc4(%rbp)
mov    -0xc4(%rbp),%eax
mov    %eax,-0x6c(%rbp)
mov    -0x6c(%rbp),%eax
mov    %eax,-0x8(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  0xe89(%rip),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x78(%rbp),%xmm0
ucomisd -0x80(%rbp),%xmm0
jbe    119e <main+0x9e>
movsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
jmp    11ab <main+0xab>
movsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0xd0(%rbp),%xmm0
ff
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
movsd  %xmm0,-0x18(%rbp)
lea    0xe39(%rip),%rax
mov    %rax,-0xa0(%rbp)
movl   $0x4,-0xb8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
xor    %eax,%eax
ret

LLVM IR (-O0):
%struct.s = type opaque
%struct.s2 = type opaque
@.str = [6 x i8] c"hello\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca double
%5 = alloca double
%6 = alloca %struct.s*
%7 = alloca %struct.s*
%8 = alloca %struct.s*
%9 = alloca %struct.s2*
%10 = alloca %struct.s2*
%11 = alloca %struct.s2*
%12 = alloca %struct.s*
%13 = alloca %struct.s2*
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca double
%18 = alloca double
%19 = alloca double
%20 = alloca [4 x i8*]
%21 = alloca [4 x i32]
store i32 0, i32* %1
store i32 4, i32* %2
store %struct.s* null, %struct.s** %7
store %struct.s2* null, %struct.s2** %10
store i32 1, i32* %14
%22 = load i32, i32* %2
store i32 %22, i32* %15
%23 = load i32, i32* %14
%24 = load i32, i32* %15
%25 = icmp sgt i32 %23, %24
br i1 %25, label %26, label %28
26: ; preds = %0
%27 = load i32, i32* %14
br label %30
28: ; preds = %0
%29 = load i32, i32* %15
br label %30
30: ; preds = %28, %26
%31 = phi i32 [ %27, %26 ], [ %29, %28 ]
store i32 %31, i32* %16
%32 = load i32, i32* %16
store i32 %32, i32* %2
%33 = load double, double* %4
store double %33, double* %17
store double 2.200000e+00, double* %18
%34 = load double, double* %17
%35 = load double, double* %18
%36 = fcmp ogt double %34, %35
br i1 %36, label %37, label %39
37: ; preds = %30
%38 = load double, double* %17
br label %41
39: ; preds = %30
%40 = load double, double* %18
br label %41
41: ; preds = %39, %37
%42 = phi double [ %38, %37 ], [ %40, %39 ]
store double %42, double* %19
%43 = load double, double* %19
store double %43, double* %4
%44 = getelementptr inbounds [4 x i8*], [4 x i8*]* %20, i64 0, i64 2
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8** %44
%45 = getelementptr inbounds [4 x i32], [4 x i32]* %21, i64 0, i64 2
store i32 4, i32* %45
%46 = load i32, i32* %1
ret i32 %46
}

LLVM IR (-O2):
%struct.s = type opaque
%struct.s2 = type opaque
define i32 @main() {
ret i32 0
}