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] - Blame information for rev 708

Go to most recent revision | Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

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