URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 305 |
Rev 384 |
// { dg-do run }
|
// { dg-do run }
|
// g++ 1.37.1 bug 900331_04
|
// g++ 1.37.1 bug 900331_04
|
|
|
// g++ is unable to correctly parse declarations of formal parameters and
|
// g++ is unable to correctly parse declarations of formal parameters and
|
// local objects which have pointer-to-array types or reference-to-array
|
// local objects which have pointer-to-array types or reference-to-array
|
// types.
|
// types.
|
|
|
// Cfront 2.0 passes this test.
|
// Cfront 2.0 passes this test.
|
|
|
// keywords: syntax, arrays, pointers, references, local, formal
|
// keywords: syntax, arrays, pointers, references, local, formal
|
|
|
int array[10];
|
int array[10];
|
|
|
int (*global_array_ptr)[10] = &array;
|
int (*global_array_ptr)[10] = &array;
|
int (&global_array_ref)[10] = array;
|
int (&global_array_ref)[10] = array;
|
|
|
void function0 (int (*formal_array_ptr)[10]) { // { dg-bogus "" } s
|
void function0 (int (*formal_array_ptr)[10]) { // { dg-bogus "" } s
|
}
|
}
|
|
|
void function1 (int (&formal_array_ref)[10]) { // { dg-bogus "" } s
|
void function1 (int (&formal_array_ref)[10]) { // { dg-bogus "" } s
|
}
|
}
|
|
|
void function2 ()
|
void function2 ()
|
{
|
{
|
int (*local_array_ptr)[10] = &array; // { dg-bogus "" } s
|
int (*local_array_ptr)[10] = &array; // { dg-bogus "" } s
|
}
|
}
|
|
|
void function3 ()
|
void function3 ()
|
{
|
{
|
int (&local_array_ref)[10] = array; // { dg-bogus "" }
|
int (&local_array_ref)[10] = array; // { dg-bogus "" }
|
}
|
}
|
|
|
int main () { return 0; }
|
int main () { return 0; }
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.