OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.old-deja/] [g++.brendan/] [crash24.C] - Blame information for rev 699

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 699 jeremybenn
// { dg-do assemble  }
2
// { dg-options "-O" }
3
// GROUPS passed old-abort
4
// gcc puts the array into a register, and then the store_bit_field () code
5
// in expmed.c gets confused when it tries to store zero past the end of the
6
// register (because the index is past the array bounds).   It ends up calling
7
// store_split_bit_field, which then aborts, because we don't have a split bit
8
// field.
9
//
10
// Seems easiest to detect this case in the front end, i.e. access outside the
11
// array bounds, and then force the array to be allocated on the stack instead
12
// of a register.
13
 
14
main()
15
{
16
  char i[1];
17
 
18
  i[1] = 0;
19
}

powered by: WebSVN 2.1.0

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