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
52 lines
2.6 KiB
C
52 lines
2.6 KiB
C
// RUN: %clang_cc1 %s -fsyntax-only -verify -pedantic -Wno-strict-prototypes -Wno-zero-length-array
|
|
|
|
int array_acceptor_case1(unsigned long *par1) { // #case1
|
|
return par1 != (unsigned long *)0;
|
|
}
|
|
|
|
int array_acceptor_case2(unsigned long *par1) { // #case2
|
|
return par1 != (unsigned long *)0;
|
|
}
|
|
|
|
int array_acceptor_case3(unsigned long *par1) { // #case3
|
|
return par1 != (unsigned long *)0;
|
|
}
|
|
|
|
struct S {
|
|
int a;
|
|
};
|
|
|
|
int array_acceptor_case4(struct S *par1) { // #case4
|
|
return par1 != (struct S *)0;
|
|
}
|
|
|
|
int array_acceptor_case5(struct S *par1) { // #case5
|
|
return par1 != (struct S *)0;
|
|
}
|
|
|
|
int array_tester() {
|
|
unsigned long mdarr[5][6];
|
|
double mddarr[5][6];
|
|
unsigned long sdarr[30];
|
|
unsigned long mdarr3d[5][6][2];
|
|
unsigned long mdarr4d[5][6][2][1];
|
|
unsigned long mdarrz4d[5][6][0][1];
|
|
struct S mdsarr[5][6][2];
|
|
|
|
array_acceptor_case1(sdarr);
|
|
array_acceptor_case1(mdarr); // expected-error {{incompatible pointer types passing 'unsigned long[5][6]' to parameter of type 'unsigned long *'}} \
|
|
// expected-note@#case1 {{passing argument to parameter 'par1' here}}
|
|
array_acceptor_case1(mdarr3d); // expected-error {{incompatible pointer types passing 'unsigned long[5][6][2]' to parameter of type 'unsigned long *'}} \
|
|
// expected-note@#case1 {{passing argument to parameter 'par1' here}}
|
|
array_acceptor_case1(mdarr4d); // expected-error {{incompatible pointer types passing 'unsigned long[5][6][2][1]' to parameter of type 'unsigned long *'}} \
|
|
// expected-note@#case1 {{passing argument to parameter 'par1' here}}
|
|
array_acceptor_case2(mddarr); // expected-error {{incompatible pointer types passing 'double[5][6]' to parameter of type 'unsigned long *'}} \
|
|
// expected-note@#case2 {{passing argument to parameter 'par1' here}}
|
|
array_acceptor_case4(mddarr); // expected-error {{incompatible pointer types passing 'double[5][6]' to parameter of type 'struct S *'}} \
|
|
// expected-note@#case4 {{passing argument to parameter 'par1' here}}
|
|
array_acceptor_case3(mdarrz4d); // expected-error {{incompatible pointer types passing 'unsigned long[5][6][0][1]' to parameter of type 'unsigned long *'}} \
|
|
// expected-note@#case3 {{passing argument to parameter 'par1' here}}
|
|
array_acceptor_case5(mdsarr); // expected-error {{incompatible pointer types passing 'struct S[5][6][2]' to parameter of type 'struct S *'}} \
|
|
// expected-note@#case5 {{passing argument to parameter 'par1' here}}
|
|
}
|