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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [g++.dg/] [ext/] [selectany1.C] - Blame information for rev 338

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 301 jeremybenn
// { dg-do compile { target i?86-pc-cygwin } }
2
// { dg-do compile { target i?86-pc-mingw* } }
3
 
4
// Check that selectany attribute puts symbols into link-once sections.
5
 
6
// { dg-final { scan-assembler "\.section\t\.data\\\$foo\[^\n\]*\n\t\.linkonce discard" } }
7
// { dg-final { scan-assembler "\.section\t\.data\\\$x\[^\n\]*\n\t\.linkonce discard" } }
8
// { dg-final { scan-assembler-dem "\nguard variable for x:" } }
9
 
10
__declspec (selectany) int foo = 1;
11
 
12
class X
13
{
14
private:
15
  int m_i;
16
public:
17
  X(int i): m_i(i){}
18
  ~X(){}
19
};
20
 
21
__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.