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

Subversion Repositories openrisc

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

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
//  Mark class static members as dllimport.
3
 
4
struct Baz
5
{
6
  Baz(int a_ =0) : a(a_) {}
7
  int a;
8
};
9
 
10
class  __attribute__ ((dllimport)) Bar
11
{
12
  public:
13
    static const int two = 2;
14
    static const int three;
15
    static const Baz null_baz;
16
};
17
 
18
int foo()
19
{
20
  Bar foobar;
21
  const int* baz = &Bar::two;
22
  int a = foobar.two;
23
  int b = foobar.three;
24
  int c = foobar.null_baz.a;
25
  return (a + b + c + *baz);
26
}
27
 
28
// { dg-final { scan-assembler __imp\[_\]*__ZN3Bar3twoE } }
29
// { dg-final { scan-assembler __imp\[_\]*__ZN3Bar5threeE } }
30
// { dg-final { scan-assembler __imp\[_\]*__ZN3Bar8null_bazE } }

powered by: WebSVN 2.1.0

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