1; RUN: llc < %s
2; PR2612
3
4; Triggers a crash on assertion as NVPTX does not support 0-sized arrays.
5; UNSUPPORTED: nvptx
6
7@current_foo = internal global {  } zeroinitializer
8
9define i32 @foo() {
10entry:
11        %retval = alloca i32
12        store i32 0, i32* %retval
13        %local_foo = alloca {  }
14        load {  }, {  }* @current_foo
15        store {  } %0, {  }* %local_foo
16        br label %return
17
18return:
19        load i32, i32* %retval
20        ret i32 %1
21}
22