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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [cpp0x/] [constexpr-array-ptr7.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
// PR c++/49290
2
// { dg-options -std=c++0x }
3
 
4
typedef unsigned T;
5
struct S
6
{
7
  constexpr T foo (void);
8
  unsigned s1[16];
9
};
10
 
11
constexpr T
12
S::foo ()
13
{
14
  return *(T *) (s1 + 10);
15
}
16
 
17
constexpr S s = { 0,1,2,3,4,5,6,7,8,9,10 };
18
 
19
#define SA(X) static_assert ((X), #X)
20
SA(s.foo() == 10);

powered by: WebSVN 2.1.0

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