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

Subversion Repositories openrisc

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

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-pc-cygwin } }
2
// { dg-do compile { target i?86-*-mingw* x86_64-*-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
 
9
__declspec (selectany) int foo = 1;
10
 
11
class X
12
{
13
private:
14
  int m_i;
15
public:
16
  X(int i): m_i(i){}
17
  ~X(){}
18
};
19
 
20
__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.