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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.dg/] [ext/] [selectany1.C] - Diff between revs 149 and 154

Only display areas with differences | Details | Blame | View Log

Rev 149 Rev 154
// { dg-do compile { target i?86-pc-cygwin } }
// { dg-do compile { target i?86-pc-cygwin } }
// { dg-do compile { target i?86-pc-mingw* } }
// { dg-do compile { target i?86-pc-mingw* } }
// Check that selectany attribute puts symbols into link-once sections.
// Check that selectany attribute puts symbols into link-once sections.
// { dg-final { scan-assembler "\.section\t\.data\\\$foo\[^\n\]*\n\t\.linkonce discard" } }
// { dg-final { scan-assembler "\.section\t\.data\\\$foo\[^\n\]*\n\t\.linkonce discard" } }
// { dg-final { scan-assembler "\.section\t\.data\\\$x\[^\n\]*\n\t\.linkonce discard" } }
// { dg-final { scan-assembler "\.section\t\.data\\\$x\[^\n\]*\n\t\.linkonce discard" } }
// { dg-final { scan-assembler-dem "\nguard variable for x:" } }
// { dg-final { scan-assembler-dem "\nguard variable for x:" } }
__declspec (selectany) int foo = 1;
__declspec (selectany) int foo = 1;
class X
class X
{
{
private:
private:
  int m_i;
  int m_i;
public:
public:
  X(int i): m_i(i){}
  X(int i): m_i(i){}
  ~X(){};
  ~X(){};
};
};
__declspec(selectany) X x(1);
__declspec(selectany) X x(1);
 
 

powered by: WebSVN 2.1.0

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