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
97 lines
2.3 KiB
C
97 lines
2.3 KiB
C
// RUN: %clang_cc1 %s -verify -fsyntax-only -Wno-strict-prototypes
|
|
|
|
void foo(void);
|
|
void foo(void) {}
|
|
void foo(void);
|
|
void foo(void); // expected-note {{previous declaration is here}}
|
|
|
|
void foo(int); // expected-error {{conflicting types for 'foo'}}
|
|
|
|
int funcdef()
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
int funcdef();
|
|
|
|
int funcdef2() { return 0; } // expected-note {{previous definition is here}}
|
|
int funcdef2() { return 0; } // expected-error {{redefinition of 'funcdef2'}}
|
|
|
|
// PR2502
|
|
void (*f)(void);
|
|
void (*f)() = 0;
|
|
|
|
typedef __attribute__(( ext_vector_type(2) )) int Vi2;
|
|
typedef __attribute__(( ext_vector_type(2) )) float Vf2;
|
|
|
|
Vf2 g0; // expected-note {{previous definition is here}}
|
|
Vi2 g0; // expected-error {{redefinition of 'g0'}}
|
|
|
|
_Complex int g1; // expected-note {{previous definition is here}}
|
|
_Complex float g1; // expected-error {{redefinition of 'g1'}}
|
|
|
|
extern char i6096412[10];
|
|
extern char i6096412[];
|
|
void foo6096412(void) {
|
|
int x = sizeof(i6096412);
|
|
}
|
|
|
|
|
|
typedef int test1_IA[];
|
|
typedef int test1_A10[10];
|
|
static test1_A10 *test1_f(void);
|
|
void test1_g(void)
|
|
{
|
|
{
|
|
extern test1_IA *test1_f(void);
|
|
}
|
|
(void)sizeof(*test1_f());
|
|
}
|
|
|
|
typedef int test2_IA[];
|
|
typedef int test2_A10[10];
|
|
|
|
static test2_A10 *test2_f(void);
|
|
static test2_IA *test2_f(void);
|
|
|
|
void test2_g(void)
|
|
{
|
|
(void)sizeof(*test2_f());
|
|
}
|
|
|
|
int (*test3_f())[10];
|
|
int (*test3_f())[];
|
|
int test3_k = sizeof(*test3_f());
|
|
|
|
void test4_f(int);
|
|
void test4_f(a)
|
|
char a;
|
|
{
|
|
int v[sizeof(a) == 1 ? 1 : -1];
|
|
}
|
|
|
|
int test5_f(int (*)[10]);
|
|
int test5_f(int (*x)[]) {
|
|
return sizeof(*x); // expected-error {{invalid application of 'sizeof' to an incomplete type 'int[]'}}
|
|
}
|
|
|
|
void test6_f(int (*a)[11]);
|
|
void test6_f(a)
|
|
int (*a)[];
|
|
{}
|
|
void test6_g() {
|
|
int arr[10];
|
|
test6_f(&arr); // expected-error {{incompatible pointer types passing 'int (*)[10]' to parameter of type 'int (*)[11]}}
|
|
}
|
|
|
|
void test7_f(int (*)[10]);
|
|
void test7_f(int (*)[]); // expected-note {{passing argument to parameter here}}
|
|
void test7_g() {
|
|
int x[5];
|
|
test7_f(&x); // expected-error {{incompatible pointer types passing 'int (*)[5]' to parameter of type 'int (*)[10]}}
|
|
}
|
|
|
|
char d;
|
|
char test8_gh62447[d.undef == 8]; // expected-error {{member reference base type 'char' is not a structure or union}}
|
|
char test8_gh62447[d.undef == 4]; // expected-error {{member reference base type 'char' is not a structure or union}}
|