OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [g++.old-deja/] [g++.brendan/] [crash24.C] - Diff between revs 305 and 338

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;
}
}
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.