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:
parent
4269a6567e
commit
ebf7dd754a
3 changed files with 66 additions and 0 deletions
27
gcc/testsuite/gcc.dg/pr103770.c
Normal file
27
gcc/testsuite/gcc.dg/pr103770.c
Normal 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);
|
||||
}
|
||||
|
23
gcc/testsuite/gcc.dg/pr103859.c
Normal file
23
gcc/testsuite/gcc.dg/pr103859.c
Normal 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;
|
||||
}
|
||||
|
16
gcc/testsuite/gcc.dg/pr105065.c
Normal file
16
gcc/testsuite/gcc.dg/pr105065.c
Normal 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);
|
||||
}
|
||||
|
Loading…
Add table
Reference in a new issue