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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 693 jeremybenn
// Tests for various visibility mismatch situations.
2
 
3
// { dg-require-visibility "" }
4
 
5
// { dg-final { scan-not-hidden "_ZN1A1fEv" } }
6
 
7
struct __attribute ((visibility ("hidden"))) A
8
{
9
  // This is OK, A::f gets default visibility.
10
  __attribute ((visibility ("default"))) void f ();
11
};
12
 
13
void A::f() { }
14
 
15
// This gets a warning because B objects might rely
16
// on hidden symbols from A.
17
struct B                        // { dg-warning "visibility" }
18
{
19
  A a;
20
};
21
 
22
// This one has explicit visibility, so it doesn't get a warning.
23
struct __attribute ((visibility ("default"))) C
24
{
25
  A a;
26
};

powered by: WebSVN 2.1.0

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