Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 1 | ; This one fails because the LLVM runtime is allowing two null pointers of |
| 2 | ; the same type to be created! |
| 3 | |
Tanya Lattner | 15b014b | 2008-03-09 08:16:40 +0000 | [diff] [blame] | 4 | ; RUN: echo {%T = type i32} | llvm-as > %t.2.bc |
Dan Gohman | 2d65d35 | 2009-08-25 15:38:29 +0000 | [diff] [blame] | 5 | ; RUN: llvm-as %s -o %t.1.bc |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 6 | ; RUN: llvm-link %t.1.bc %t.2.bc |
| 7 | |
| 8 | %T = type opaque |
| 9 | |
Tanya Lattner | 15b014b | 2008-03-09 08:16:40 +0000 | [diff] [blame] | 10 | declare %T* @create() |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 11 | |
Tanya Lattner | 15b014b | 2008-03-09 08:16:40 +0000 | [diff] [blame] | 12 | define void @test() { |
| 13 | %X = call %T* @create( ) ; <%T*> [#uses=1] |
| 14 | %v = icmp eq %T* %X, null ; <i1> [#uses=0] |
Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 15 | ret void |
| 16 | } |
| 17 | |