blob: 7beefc7b690d8479595f977c8abe8488ec47e1ee [file] [log] [blame]
Eric Christopher7c923422010-12-02 02:13:27 +00001// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s -check-prefix=CHECK-DEFAULT
2// RUN: %clang_cc1 %s -fno-common -emit-llvm -o - | FileCheck %s -check-prefix=CHECK-NOCOMMON
Daniel Dunbar069afd52009-03-26 16:37:00 +00003
Eric Christopher7c923422010-12-02 02:13:27 +00004// CHECK-DEFAULT: @x = common global
5// CHECK-NOCOMMON: @x = global
Daniel Dunbar069afd52009-03-26 16:37:00 +00006int x;
Eric Christophera6cf1e72010-12-02 02:45:55 +00007
8// CHECK-DEFAULT: @ABC = global
9// CHECK-NOCOMMON: @ABC = global
10typedef void* (*fn_t)(long a, long b, char *f, int c);
11fn_t ABC __attribute__ ((nocommon));
12
13// CHECK-DEFAULT: @y = common global
14// CHECK-NOCOMMON: @y = common global
15int y __attribute__((common));