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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [ext/] [selectany2.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 for errors with invalid usage of selectany attribute.
5
 
6
extern int foo;
7
__declspec (selectany) int foo = 1;  // OK
8
 
9
struct d
10
{
11
  static int foo;
12
};
13
__declspec (selectany) int d::foo = 1;  // OK
14
 
15
struct  f
16
{
17
  int i;
18
};
19
__declspec (selectany) struct f  F= {1}; // OK
20
 
21
__declspec (selectany) int boo; //{ dg-error "selectany" }
22
 
23
__declspec (selectany) static int bar = 1; // { dg-error "selectany" }
24
int use_bar = bar;  //  Avoid defined but not used warning.
25
 
26
int baz()
27
{
28
  __declspec (selectany)  int foo = 1;  // { dg-error "selectany" }
29
  return foo;
30
}

powered by: WebSVN 2.1.0

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