Chris Lattner | 962b790 | 2009-08-05 04:56:58 +0000 | [diff] [blame^] | 1 | // RUN: clang-cc -emit-llvm -o - %s | FileCheck %s |
Anders Carlsson | 689bba8 | 2008-12-03 05:51:23 +0000 | [diff] [blame] | 2 | |
| 3 | // This checks that the global won't be marked as common. |
| 4 | // (It shouldn't because it's being initialized). |
| 5 | |
| 6 | int a; |
| 7 | int a = 242; |
Chris Lattner | 962b790 | 2009-08-05 04:56:58 +0000 | [diff] [blame^] | 8 | // CHECK: @a = global i32 242 |
| 9 | |
| 10 | // This shouldn't be emitted as common because it has an explicit section. |
| 11 | // rdar://7119244 |
| 12 | int b __attribute__((section("foo"))); |
| 13 | |
| 14 | // CHECK: @b = global i32 0, section "foo" |