regressions tests for PR103770

This adds tests from bugzilla for PR103770 and duplicates.

gcc/testsuite/
	* gcc.dg/pr103770.c: New test.
	* gcc.dg/pr103859.c: New test.
	* gcc.dg/pr105065.c: New test.
This commit is contained in:
Martin Uecker 2022-12-30 14:51:37 +01:00
parent 4269a6567e
commit ebf7dd754a
3 changed files with 66 additions and 0 deletions

View file

@ -0,0 +1,27 @@
/* PR middle-end/103770 */
/* { dg-do compile } */
/* { dg-options "" } */
struct struct_s {
void* ptr;
void* ptr2;
void* ptr3;
};
struct struct_s struct_create(int N, const long vla[N]);
void fun(int N)
{
long vla[N];
struct struct_s st = struct_create(N, vla);
}
extern _Complex float g(int N, int dims[N]);
void f(void)
{
int dims[1];
_Complex float val = g(1, dims);
}

View file

@ -0,0 +1,23 @@
/* PR middle-end/103859 */
/* { dg-do compile } */
/* { dg-options "" } */
typedef struct dcmplx dcmplx;
struct dcmplx {
double re;
double im;
};
dcmplx horner(int n, dcmplx p[n], dcmplx x);
int main(void)
{
int i, n;
dcmplx x[n + 1], f[n + 1];
horner(n + 1, f, x[i]);
return 0;
}

View file

@ -0,0 +1,16 @@
/* PR middle-end/105065 */
/* { dg-do compile } */
/* { dg-options "" } */
typedef struct
{
char filler[17];
} big_struct;
big_struct dummy(int size, char array[size]);
int main()
{
dummy(0, 0);
}