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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [ext/] [dllimport5.C] - Blame information for rev 801

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

Line No. Rev Author Line
1 693 jeremybenn
// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw* } }
2
//  Report error if static symbol definition has dllimport attribute.
3
 
4
__attribute__((dllimport))
5
 int impvar;                    // OK,  implicit "extern"
6
 
7
 static __attribute__((dllimport))
8
 int static_impvar;     // { dg-error "external linkage" }
9
 
10
 static  __attribute__((dllexport))
11
int static_expvar;      // { dg-error "external linkage" }
12
 
13
static __attribute__((dllimport))
14
void static_impfun(void);       // { dg-error "external linkage" }
15
 
16
void foo()
17
{
18
  __attribute__((dllimport))
19
  int foovar;   // OK,  implicit "extern"
20
  foovar++;
21
}
22
 
23
void bar()
24
{
25
  __attribute__((dllexport))
26
  int barvar;   // { dg-error "external linkage" }
27
  barvar++;
28
}

powered by: WebSVN 2.1.0

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