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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.target/] [ia64/] [visibility-1.c] - Blame information for rev 801

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

Line No. Rev Author Line
1 691 jeremybenn
/* Test visibility attribute.  */
2
/* { dg-do compile { target ia64*-*-linux* } } */
3
/* { dg-options "-O2 -fpic" } */
4
/* { dg-final { scan-assembler "\\.hidden.*variable_j" } } */
5
/* { dg-final { scan-assembler "\\.hidden.*variable_m" } } */
6
/* { dg-final { scan-assembler "\\.protected.*baz" } } */
7
/* { dg-final { scan-assembler "gprel.*variable_i" } } */
8
/* { dg-final { scan-assembler "gprel.*variable_j" } } */
9
/* { dg-final { scan-assembler "ltoff.*variable_k" } } */
10
/* { dg-final { scan-assembler "gprel.*variable_l" } } */
11
/* { dg-final { scan-assembler "gprel.*variable_m" } } */
12
/* { dg-final { scan-assembler "ltoff.*variable_n" } } */
13
 
14
static int variable_i;
15
int variable_j __attribute__((visibility ("hidden")));
16
int variable_k;
17
struct A { char a[64]; };
18
static struct A variable_l __attribute__((section (".sbss")));
19
struct A variable_m __attribute__((visibility ("hidden"), section(".sbss")));
20
struct A variable_n __attribute__((section (".sbss")));
21
 
22
void foo (void)
23
{
24
  variable_i = 0;
25
  variable_j = 0;
26
  variable_k = 0;
27
}
28
 
29
void bar (void)
30
{
31
  variable_l.a[10] = 0;
32
  variable_m.a[10] = 0;
33
  variable_n.a[10] = 0;
34
}
35
 
36
void __attribute__((visibility ("protected"))) baz (void)
37
{
38
}

powered by: WebSVN 2.1.0

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