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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [template/] [qualified-id2.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
// PR c++/44587
2
// { dg-do run }
3
 
4
template  struct A { static const char *p; };
5
template  const char *A::p = N;
6
template  struct B { static const char c[1]; typedef A::c> C; };
7
template  const char B::c[1] = "";
8
template  struct D { static const char c[1]; typedef A C; };
9
template  const char D::c[1] = "";
10
 
11
template  struct E { static int *ip; };
12
template  int* E::ip = &I;
13
template  struct F { static int i; typedef E::i> C; };
14
template  int F::i;
15
template  struct G { static int i; typedef E C; };
16
template  int G::i;
17
 
18
#define AS(X) if (!(X)) return 1;
19
int main()
20
{
21
  AS(B::C::p == B::c);
22
  AS(B::C::p == B::c);
23
  AS(B::C::p != B::c);
24
  AS(D::C::p == D::c);
25
  AS(D::C::p == D::c);
26
  AS(D::C::p != D::c);
27
}

powered by: WebSVN 2.1.0

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