URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Go to most recent revision |
Only display areas with differences |
Details |
Blame |
View Log
Rev 301 |
Rev 338 |
// Test that completing an array declared with a typedef doesn't change
|
// Test that completing an array declared with a typedef doesn't change
|
// the typedef.
|
// the typedef.
|
|
|
// { dg-do run }
|
// { dg-do run }
|
|
|
typedef int iArr[];
|
typedef int iArr[];
|
|
|
const iArr array4={
|
const iArr array4={
|
1, 2, 3, 4
|
1, 2, 3, 4
|
};
|
};
|
|
|
const iArr array3={
|
const iArr array3={
|
1, 2, 3
|
1, 2, 3
|
};
|
};
|
|
|
const iArr array5={
|
const iArr array5={
|
1, 2, 3, 4, 5
|
1, 2, 3, 4, 5
|
};
|
};
|
|
|
int main()
|
int main()
|
{
|
{
|
if (sizeof (array4)/sizeof (array4[0]) != 4
|
if (sizeof (array4)/sizeof (array4[0]) != 4
|
|| sizeof (array3)/sizeof (array3[0]) != 3
|
|| sizeof (array3)/sizeof (array3[0]) != 3
|
|| sizeof (array5)/sizeof (array5[0]) != 5)
|
|| sizeof (array5)/sizeof (array5[0]) != 5)
|
return 1;
|
return 1;
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.