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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [cpp0x/] [constexpr-deref.C] - Blame information for rev 774

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

Line No. Rev Author Line
1 693 jeremybenn
// { dg-options -std=c++0x }
2
 
3
struct A
4
{
5
  const int *p[2];
6
};
7
 
8
constexpr const int * f(const int *p) { return p; }
9
 
10
int main()
11
{
12
  constexpr int i = 42;
13
  constexpr int j = *&i;     // OK
14
  constexpr int k = *A{{&i}}.p[0]; // OK
15
  constexpr int l = *f(&i);           // OK
16
}

powered by: WebSVN 2.1.0

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