Daniel Dunbar | 8fbe78f | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -emit-llvm -o - %s | FileCheck %s |
Daniel Dunbar | 9c7efbb | 2009-11-20 17:23:39 +0000 | [diff] [blame] | 2 | // CHECK: ModuleID |
| 3 | // CHECK-NOT: zeroinitializer |
Stephen Lin | 4362261 | 2013-08-15 06:47:53 +0000 | [diff] [blame] | 4 | // CHECK-LABEL: define i8* @f |
Anders Carlsson | 762e162 | 2009-01-04 02:08:04 +0000 | [diff] [blame] | 5 | |
| 6 | struct s { |
| 7 | int a; |
| 8 | }; |
| 9 | |
| 10 | static void *v; |
| 11 | |
| 12 | static struct s a; |
| 13 | |
| 14 | static struct s a = { |
| 15 | 10 |
| 16 | }; |
| 17 | |
| 18 | void *f() |
| 19 | { |
| 20 | if (a.a) |
| 21 | return v; |
| 22 | } |