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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [alias-7.c] - Blame information for rev 801

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

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-do run } */
2
/* { dg-require-alias "" } */
3
/* { dg-options "-O2" } */
4
 
5
extern void abort (void);
6
 
7
#define ASMNAME(cname)  ASMNAME2 (__USER_LABEL_PREFIX__, cname)
8
#define ASMNAME2(prefix, cname) STRING (prefix) cname
9
#define STRING(x)    #x
10
 
11
int foo __asm__ (ASMNAME ("foo")) __attribute__((nocommon));
12
extern __typeof (foo) bar __attribute__ ((weak, alias ("foo")));
13
 
14
int
15
main (void)
16
{
17
  if (&foo != &bar || foo || bar)
18
    abort ();
19
  return bar;
20
}

powered by: WebSVN 2.1.0

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