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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [weak/] [weak-15.c] - Rev 774

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

/* { dg-do compile } */
/* { dg-require-weak "" } */
/* { dg-options "-fno-common" } */
 
/* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?a" } } */
/* { dg-final { scan-assembler-not "weak\[^ \t\]*\[ \t\]_?b" } } */
/* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?c" } } */
/* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?d" } } */
 
#pragma weak a
extern char a[];
 
char *user_a(void)
{
  return a+1;
}
 
int x;
int extern inline b(int y)
{
  return x+y;
}
 
extern int b(int y);
 
int user_b(int z)
{
  return b(z);
}
 
#pragma weak c
extern int c;
 
int *user_c = &c;
 
#pragma weak d
extern char d[];
 
char *user_d = &d[1];
 

Go to most recent revision | 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.