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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [other/] [const2.C] - Blame information for rev 717

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

Line No. Rev Author Line
1 693 jeremybenn
// PR c++/3331: just because 'this' is readonly and bars[0].b is readonly
2
// doesn't mean that the result of the member reference is readonly.
3
 
4
struct foo
5
{
6
  int a;
7
 
8
  struct bar
9
  { int foo::* b ;};
10
 
11
  static const bar bars[];
12
 
13
  void bad ()
14
  {
15
    this->*(bars[0].b) = 42; // { dg-bogus "read-only" "" }
16
  }
17
};
18
 
19
const foo::bar foo::bars[] = { { &foo::a } };
20
 
21
int main ()
22
{ }

powered by: WebSVN 2.1.0

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