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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.dg/] [ext/] [dllimport3.C] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw*} }
2
 
3
// PR 10148  Dllimport attribute of object is overriden by later
4
// redefinition without attribute.
5
 
6
struct Foo
7
{
8
  int a;
9
};
10
 
11
 __attribute__((dllimport)) struct Foo f;
12
 
13
void Bar(void)
14
{
15
  void* dummy  = (void*) &f;
16
}
17
 
18
struct Foo f;   // { dg-warning "referenced with dll linkage" }
19
 
20
// Dllimport'd symbols do not have a constant address, so following
21
// assignment would require static_initialization_and_destruction
22
// if attribute is retained.
23
 
24
void* dummy = &f;

powered by: WebSVN 2.1.0

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