Files
derek.holloway 7502bf64a4
CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

81 lines
3.1 KiB
Objective-C

// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fobjc-runtime=macosx-fragile-10.5 -fobjc-gc -emit-llvm -o %t %s
// RUN: grep -F '@objc_assign_global' %t | count 26
@class NSObject;
typedef const struct __CFDictionary * CFDictionaryRef;
typedef struct {
id element;
id elementArray[10];
__strong CFDictionaryRef cfElement;
__strong CFDictionaryRef cfElementArray[10];
} struct_with_ids_t;
// assignments to these should generate objc_assign_global
@interface A
@end
typedef struct s0 {
A *a[4];
} T;
T g0;
extern id FileExternID;
static id FileStaticID;
id GlobalId;
id GlobalArray[20];
NSObject *GlobalObject;
NSObject *GlobalObjectArray[20];
__strong CFDictionaryRef Gdict;
__strong CFDictionaryRef Gdictarray[10];
struct_with_ids_t GlobalStruct;
struct_with_ids_t GlobalStructArray[10];
#define ASSIGNTEST(expr, global) expr = rhs
void *rhs = 0;
int main(void) {
static id staticGlobalId;
static id staticGlobalArray[20];
static NSObject *staticGlobalObject;
static NSObject *staticGlobalObjectArray[20];
static __strong CFDictionaryRef staticGdict;
static __strong CFDictionaryRef staticGdictarray[10];
static struct_with_ids_t staticGlobalStruct;
static struct_with_ids_t staticGlobalStructArray[10];
extern id ExID;
id localID;
ASSIGNTEST(GlobalId, GlobalAssigns); // objc_assign_global
ASSIGNTEST(GlobalArray[0], GlobalAssigns); // objc_assign_global
ASSIGNTEST(GlobalObject, GlobalAssigns); // objc_assign_global
ASSIGNTEST(GlobalObjectArray[0], GlobalAssigns); // objc_assign_global
ASSIGNTEST(Gdict, GlobalAssigns); // objc_assign_global
ASSIGNTEST(Gdictarray[1], GlobalAssigns); // objc_assign_global
ASSIGNTEST(GlobalStruct.element, GlobalAssigns); // objc_assign_global
ASSIGNTEST(GlobalStruct.elementArray[0], GlobalAssigns); // objc_assign_global
ASSIGNTEST(GlobalStruct.cfElement, GlobalAssigns); // objc_assign_global
ASSIGNTEST(GlobalStruct.cfElementArray[0], GlobalAssigns); // objc_assign_global
ASSIGNTEST(staticGlobalId, GlobalAssigns); // objc_assign_global
ASSIGNTEST(staticGlobalArray[0], GlobalAssigns); // objc_assign_global
ASSIGNTEST(staticGlobalObject, GlobalAssigns); // objc_assign_global
ASSIGNTEST(staticGlobalObjectArray[0], GlobalAssigns); // objc_assign_global
ASSIGNTEST(staticGdict, GlobalAssigns); // objc_assign_global
ASSIGNTEST(staticGdictarray[1], GlobalAssigns); // objc_assign_global
ASSIGNTEST(staticGlobalStruct.element, GlobalAssigns); // objc_assign_global
ASSIGNTEST(staticGlobalStruct.elementArray[0], GlobalAssigns); // objc_assign_global
ASSIGNTEST(staticGlobalStruct.cfElement, GlobalAssigns); // objc_assign_global
ASSIGNTEST(staticGlobalStruct.cfElementArray[0], GlobalAssigns); // objc_assign_global
ExID = 0;
localID = 0;
FileStaticID = 0;
FileExternID=0;
g0.a[0] = 0;
((T*) &g0)->a[0] = 0;
}