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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [array-quals-1.c] - Rev 689

Compare with Previous | Blame | View Log

/* Test for various combinations of const, arrays and typedefs:
   should never actually get const on the final array type, but
   all should end up in a read-only section.  PR c/12165.  */
/* Origin: Joseph Myers <jsm@polyomino.org.uk> */
/* { dg-do compile } */
/* The MMIX port always switches to the .data section at the end of a file.  */
/* { dg-final { scan-assembler-not "\\.data(?!\\.rel\\.ro)" { xfail powerpc*-*-aix* mmix-*-* x86_64-*-mingw* picochip--*-* } } } */
static const int a[2] = { 1, 2 };
const int a1[2] = { 1, 2 };
typedef const int ci;
static ci b[2] = { 3, 4 };
ci b1[2] = { 3, 4 };
typedef int ia[2];
static const ia c = { 5, 6 };
const ia c1 = { 5, 6 };
typedef const int cia[2];
static cia d = { 7, 8 };
cia d1 = { 7, 8 };
static cia e[2] = { { 1, 2 }, { 3, 4 } };
cia e1[2] = { { 1, 2 }, { 3, 4 } };
void *const p = &a;
void *const q = &b;
void *const r = &c;
void *const s = &d;
void *const t = &e;
void *const p1 = &a1;
void *const q1 = &b1;
void *const r1 = &c1;
void *const s1 = &d1;
void *const t1 = &e1;
 

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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