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 338 |
// { dg-do assemble }
|
// { dg-do assemble }
|
// { dg-options "-O" }
|
// { dg-options "-O" }
|
// GROUPS passed old-abort
|
// GROUPS passed old-abort
|
// gcc puts the array into a register, and then the store_bit_field () code
|
// gcc puts the array into a register, and then the store_bit_field () code
|
// in expmed.c gets confused when it tries to store zero past the end of the
|
// in expmed.c gets confused when it tries to store zero past the end of the
|
// register (because the index is past the array bounds). It ends up calling
|
// register (because the index is past the array bounds). It ends up calling
|
// store_split_bit_field, which then aborts, because we don't have a split bit
|
// store_split_bit_field, which then aborts, because we don't have a split bit
|
// field.
|
// field.
|
//
|
//
|
// Seems easiest to detect this case in the front end, i.e. access outside the
|
// Seems easiest to detect this case in the front end, i.e. access outside the
|
// array bounds, and then force the array to be allocated on the stack instead
|
// array bounds, and then force the array to be allocated on the stack instead
|
// of a register.
|
// of a register.
|
|
|
main()
|
main()
|
{
|
{
|
char i[1];
|
char i[1];
|
|
|
i[1] = 0;
|
i[1] = 0;
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.