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

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [20021029-1.c] - Blame information for rev 404

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

Line No. Rev Author Line
1 298 jeremybenn
/* Test whether difference of local labels doesn't force
2
   variables into writable sections.  */
3
/* { dg-do compile { target fpic } } */
4
/* { dg-options "-O2 -fpic" } */
5
/* { dg-options "-O2 -fpic -mpt-fixed" { target sh64*-*-* } } */
6
/* { dg-final { scan-assembler-not ".data.rel.ro.local" } } */
7
 
8
int foo (int a)
9
{
10
  static const int ar[] = { &&l1 - &&l1, &&l2 - &&l1 };
11
  void *p = &&l1 + ar[a];
12
  goto *p;
13
  l1:
14
    return 1;
15
  l2:
16
    return 2;
17
}

powered by: WebSVN 2.1.0

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