void f2() {
  int a[2][2] = {{1, 2}, {3, 4}};
  int b[3][3] = {{1, 2}, {3, 4}};
  int *c[2] = {&a[1][1], &b[2][2]};
  int *d[2][2] = {{&a[1][1], &b[2][2]}, {&a[0][0], &b[1][1]}};
  int *e[3][3] = {{&a[1][1], &b[2][2]}, {&a[0][0], &b[1][1]}};
  char ext[3][3] = {".Y", ".U", ".V"};
}


x86 assembly (clang, -O0):
<f2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x130,%rsp
mov    0xede(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xedb(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    -0x40(%rbp),%rdi
xor    %esi,%esi
mov    $0x24,%edx
call   1030 <memset@plt>
movl   $0x1,-0x40(%rbp)
movl   $0x2,-0x3c(%rbp)
movl   $0x3,-0x34(%rbp)
movl   $0x4,-0x30(%rbp)
lea    -0x10(%rbp),%rax
add    $0x8,%rax
add    $0x4,%rax
mov    %rax,-0x50(%rbp)
lea    -0x40(%rbp),%rax
add    $0x18,%rax
add    $0x8,%rax
mov    %rax,-0x48(%rbp)
lea    -0x10(%rbp),%rax
add    $0x8,%rax
add    $0x4,%rax
mov    %rax,-0x70(%rbp)
lea    -0x40(%rbp),%rax
add    $0x18,%rax
add    $0x8,%rax
mov    %rax,-0x68(%rbp)
lea    -0x10(%rbp),%rax
mov    %rax,-0x60(%rbp)
lea    -0x40(%rbp),%rax
add    $0xc,%rax
add    $0x4,%rax
mov    %rax,-0x58(%rbp)
lea    -0xc0(%rbp),%rcx
mov    %rcx,-0xe8(%rbp)
lea    -0x10(%rbp),%rax
add    $0x8,%rax
add    $0x4,%rax
mov    %rax,-0xc0(%rbp)
mov    %rcx,%rax
add    $0x8,%rax
lea    -0x40(%rbp),%rdx
add    $0x18,%rdx
add    $0x8,%rdx
mov    %rdx,-0xb8(%rbp)
add    $0x8,%rax
add    $0x18,%rcx
mov    %rcx,-0xe0(%rbp)
mov    %rax,-0xd8(%rbp)
mov    -0xd8(%rbp),%rax
mov    -0xe0(%rbp),%rcx
movq   $0x0,(%rax)
add    $0x8,%rax
mov    %rax,-0xf0(%rbp)
cmp    %rcx,%rax
mov    %rax,-0xd8(%rbp)
jne    1206 <f2+0xf6>
mov    -0xe8(%rbp),%rdx
mov    %rdx,%rcx
add    $0x18,%rcx
mov    %rcx,-0x108(%rbp)
lea    -0x10(%rbp),%rax
mov    %rax,0x18(%rdx)
mov    %rcx,%rax
add    $0x8,%rax
lea    -0x40(%rbp),%rsi
add    $0xc,%rsi
add    $0x4,%rsi
mov    %rsi,0x20(%rdx)
add    $0x8,%rax
add    $0x18,%rcx
mov    %rcx,-0x100(%rbp)
mov    %rax,-0xf8(%rbp)
mov    -0xf8(%rbp),%rax
mov    -0x100(%rbp),%rcx
movq   $0x0,(%rax)
add    $0x8,%rax
mov    %rax,-0x110(%rbp)
cmp    %rcx,%rax
mov    %rax,-0xf8(%rbp)
jne    1280 <f2+0x170>
mov    -0xe8(%rbp),%rcx
mov    -0x108(%rbp),%rax
add    $0x18,%rax
add    $0x48,%rcx
mov    %rcx,-0x120(%rbp)
mov    %rax,-0x118(%rbp)
mov    -0x118(%rbp),%rdi
mov    %rdi,-0x130(%rbp)
xor    %esi,%esi
mov    $0x18,%edx
call   1030 <memset@plt>
mov    -0x130(%rbp),%rax
mov    -0x120(%rbp),%rcx
add    $0x18,%rax
mov    %rax,-0x128(%rbp)
cmp    %rcx,%rax
mov    %rax,-0x118(%rbp)
jne    12d4 <f2+0x1c4>
mov    0xcf2(%rip),%rax
mov    %rax,-0xc9(%rbp)
mov    0xced(%rip),%al
mov    %al,-0xc1(%rbp)
add    $0x130,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f2>:
ret

LLVM IR (-O0):
@__const.f2.a = [2 x [2 x i32]] [[2 x i32] [i32 1, i32 2], [2 x i32] [i32 3, i32 4]]
@__const.f2.ext = [3 x [3 x i8]] [[3 x i8] c".Y\00", [3 x i8] c".U\00", [3 x i8] c".V\00"]
define void @f2() {
%1 = alloca [2 x [2 x i32]]
%2 = alloca [3 x [3 x i32]]
%3 = alloca [2 x i32*]
%4 = alloca [2 x [2 x i32*]]
%5 = alloca [3 x [3 x i32*]]
%6 = alloca [3 x [3 x i8]]
%7 = bitcast [2 x [2 x i32]]* %1 to i8*
%8 = bitcast [3 x [3 x i32]]* %2 to i8*
%9 = bitcast i8* %8 to [3 x [3 x i32]]*
%10 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %9, i32 0, i32 0
%11 = getelementptr inbounds [3 x i32], [3 x i32]* %10, i32 0, i32 0
store i32 1, i32* %11
%12 = getelementptr inbounds [3 x i32], [3 x i32]* %10, i32 0, i32 1
store i32 2, i32* %12
%13 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %9, i32 0, i32 1
%14 = getelementptr inbounds [3 x i32], [3 x i32]* %13, i32 0, i32 0
store i32 3, i32* %14
%15 = getelementptr inbounds [3 x i32], [3 x i32]* %13, i32 0, i32 1
store i32 4, i32* %15
%16 = getelementptr inbounds [2 x i32*], [2 x i32*]* %3, i64 0, i64 0
%17 = getelementptr inbounds [2 x [2 x i32]], [2 x [2 x i32]]* %1, i64 0, i64 1
%18 = getelementptr inbounds [2 x i32], [2 x i32]* %17, i64 0, i64 1
store i32* %18, i32** %16
%19 = getelementptr inbounds i32*, i32** %16, i64 1
%20 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %2, i64 0, i64 2
%21 = getelementptr inbounds [3 x i32], [3 x i32]* %20, i64 0, i64 2
store i32* %21, i32** %19
%22 = getelementptr inbounds [2 x [2 x i32*]], [2 x [2 x i32*]]* %4, i64 0, i64 0
%23 = getelementptr inbounds [2 x i32*], [2 x i32*]* %22, i64 0, i64 0
%24 = getelementptr inbounds [2 x [2 x i32]], [2 x [2 x i32]]* %1, i64 0, i64 1
%25 = getelementptr inbounds [2 x i32], [2 x i32]* %24, i64 0, i64 1
store i32* %25, i32** %23
%26 = getelementptr inbounds i32*, i32** %23, i64 1
%27 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %2, i64 0, i64 2
%28 = getelementptr inbounds [3 x i32], [3 x i32]* %27, i64 0, i64 2
store i32* %28, i32** %26
%29 = getelementptr inbounds [2 x i32*], [2 x i32*]* %22, i64 1
%30 = getelementptr inbounds [2 x i32*], [2 x i32*]* %29, i64 0, i64 0
%31 = getelementptr inbounds [2 x [2 x i32]], [2 x [2 x i32]]* %1, i64 0, i64 0
%32 = getelementptr inbounds [2 x i32], [2 x i32]* %31, i64 0, i64 0
store i32* %32, i32** %30
%33 = getelementptr inbounds i32*, i32** %30, i64 1
%34 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %2, i64 0, i64 1
%35 = getelementptr inbounds [3 x i32], [3 x i32]* %34, i64 0, i64 1
store i32* %35, i32** %33
%36 = getelementptr inbounds [3 x [3 x i32*]], [3 x [3 x i32*]]* %5, i64 0, i64 0
%37 = getelementptr inbounds [3 x i32*], [3 x i32*]* %36, i64 0, i64 0
%38 = getelementptr inbounds [2 x [2 x i32]], [2 x [2 x i32]]* %1, i64 0, i64 1
%39 = getelementptr inbounds [2 x i32], [2 x i32]* %38, i64 0, i64 1
store i32* %39, i32** %37
%40 = getelementptr inbounds i32*, i32** %37, i64 1
%41 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %2, i64 0, i64 2
%42 = getelementptr inbounds [3 x i32], [3 x i32]* %41, i64 0, i64 2
store i32* %42, i32** %40
%43 = getelementptr inbounds i32*, i32** %40, i64 1
%44 = getelementptr inbounds i32*, i32** %37, i64 3
br label %45
45: ; preds = %45, %0
%46 = phi i32** [ %43, %0 ], [ %47, %45 ]
store i32* null, i32** %46
%47 = getelementptr inbounds i32*, i32** %46, i64 1
%48 = icmp eq i32** %47, %44
br i1 %48, label %49, label %45
49: ; preds = %45
%50 = getelementptr inbounds [3 x i32*], [3 x i32*]* %36, i64 1
%51 = getelementptr inbounds [3 x i32*], [3 x i32*]* %50, i64 0, i64 0
%52 = getelementptr inbounds [2 x [2 x i32]], [2 x [2 x i32]]* %1, i64 0, i64 0
%53 = getelementptr inbounds [2 x i32], [2 x i32]* %52, i64 0, i64 0
store i32* %53, i32** %51
%54 = getelementptr inbounds i32*, i32** %51, i64 1
%55 = getelementptr inbounds [3 x [3 x i32]], [3 x [3 x i32]]* %2, i64 0, i64 1
%56 = getelementptr inbounds [3 x i32], [3 x i32]* %55, i64 0, i64 1
store i32* %56, i32** %54
%57 = getelementptr inbounds i32*, i32** %54, i64 1
%58 = getelementptr inbounds i32*, i32** %51, i64 3
br label %59
59: ; preds = %59, %49
%60 = phi i32** [ %57, %49 ], [ %61, %59 ]
store i32* null, i32** %60
%61 = getelementptr inbounds i32*, i32** %60, i64 1
%62 = icmp eq i32** %61, %58
br i1 %62, label %63, label %59
63: ; preds = %59
%64 = getelementptr inbounds [3 x i32*], [3 x i32*]* %50, i64 1
%65 = getelementptr inbounds [3 x i32*], [3 x i32*]* %36, i64 3
br label %66
66: ; preds = %66, %63
%67 = phi [3 x i32*]* [ %64, %63 ], [ %69, %66 ]
%68 = bitcast [3 x i32*]* %67 to i8*
%69 = getelementptr inbounds [3 x i32*], [3 x i32*]* %67, i64 1
%70 = icmp eq [3 x i32*]* %69, %65
br i1 %70, label %71, label %66
71: ; preds = %66
%72 = bitcast [3 x [3 x i8]]* %6 to i8*
ret void
}

LLVM IR (-O2):
define void @f2() {
ret void
}