OpenCores
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/] [weak/] [weak-15.c] - Blame information for rev 298

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* { dg-do compile } */
2
/* { dg-require-weak "" } */
3
/* { dg-options "-fno-common" } */
4
 
5
/* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?a" } } */
6
/* { dg-final { scan-assembler-not "weak\[^ \t\]*\[ \t\]_?b" } } */
7
/* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?c" } } */
8
/* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?d" } } */
9
 
10
#pragma weak a
11
extern char a[];
12
 
13
char *user_a(void)
14
{
15
  return a+1;
16
}
17
 
18
int x;
19
int extern inline b(int y)
20
{
21
  return x+y;
22
}
23
 
24
extern int b(int y);
25
 
26
int user_b(int z)
27
{
28
  return b(z);
29
}
30
 
31
#pragma weak c
32
extern int c;
33
 
34
int *user_c = &c;
35
 
36
#pragma weak d
37
extern char d[];
38
 
39
char *user_d = &d[1];

powered by: WebSVN 2.1.0

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