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/] [dllimport6.C] - Rev 832

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

// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw*} }
//  Mark class static members as dllimport.

struct Baz
{
  Baz(int a_ =0) : a(a_) {}; 
  int a;
};

class  __attribute__ ((dllimport)) Bar
{
  public:
    static const int two = 2;
    static const int three;
    static const Baz null_baz;
};

int foo()
{
  Bar foobar;
  const int* baz = &Bar::two; 
  int a = foobar.two;
  int b = foobar.three;
  int c = foobar.null_baz.a;
  return (a + b + c + *baz);
}

// { dg-final { scan-assembler __imp___ZN3Bar3twoE } }
// { dg-final { scan-assembler __imp___ZN3Bar5threeE } }
// { dg-final { scan-assembler __imp___ZN3Bar8null_bazE } }

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.