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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.dg/] [parse/] [conv_op1.C] - Blame information for rev 154

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

Line No. Rev Author Line
1 149 jeremybenn
 
2
// { dg-do compile }
3
 
4
// Copyright (C) 2002 Free Software Foundation, Inc.
5
// Contributed by Nathan Sidwell 21 Dec 2002 
6
 
7
// PR 8572. ICE with templated conversion operators.
8
 
9
template  struct A
10
{
11
  struct B { };
12
  operator B* () const;
13
  B *Foo ();
14
};
15
 
16
template  typename A::B *A::Foo ()
17
{
18
  return 0;
19
}
20
 
21
template  A::operator typename A::B* () const
22
{
23
  return 0;
24
}
25
 
26
void Foo (A &p)
27
{
28
  p.Foo ();
29
  static_cast ::B *> (p);
30
}

powered by: WebSVN 2.1.0

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