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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.dg/] [template/] [qual2.C] - Blame information for rev 823

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

Line No. Rev Author Line
1 149 jeremybenn
// { dg-do run }
2
 
3
// Copyright (C) 2003 Free Software Foundation, Inc.
4
// Contributed by Nathan Sidwell 23 Jan 2003 
5
 
6
// PR9415. Forgot a lookup was scoped
7
 
8
int here;
9
int there;
10
 
11
struct B
12
{
13
  virtual int activate() {return !here++;}
14
};
15
 
16
template 
17
struct TPL : public B
18
{
19
  int activate()
20
  {
21
    return !there++ && B::activate();
22
  }
23
};
24
 
25
int main ()
26
{
27
  TPL i;
28
  return !i.activate ();
29
}

powered by: WebSVN 2.1.0

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