URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Subversion Repositories openrisc_me
[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [readonly-loc.c] - Rev 301
Go to most recent revision | Compare with Previous | Blame | View Log
/* { dg-do compile } */ /* { dg-options "-O" } */ int func() { const int *arr; const int arr2[5]; arr[0] = 1; /* { dg-error "assignment of read-only location" "*(arr)" } */ arr[1] = 1; /* { dg-error "assignment of read-only location" "*(arr + 4u)" } */ arr2[0] = 1; /* { dg-error "assignment of read-only location" "arr2\[0\]" } */ arr2[1] = 1; /* { dg-error "assignment of read-only location" "arr2\[1\]" } */ }
Go to most recent revision | Compare with Previous | Blame | View Log