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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [g++.old-deja/] [g++.other/] [conv7.C] - Rev 305

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

// { dg-do assemble  }
// { dg-options "-Wconversion" }
// 
// Copyright (C) 2001 Free Software Foundation, Inc.
// Contributed by Nathan Sidwell 5 May 2001 <nathan@codesourcery.com>

// Bug 2726. We ICE'd trying to say something about possibly confusing
// conversion overload resolution.

class foo
{
};

template<class T>
class bar
{
public:
    operator const T&() const ;
    operator T&() ;

};


template<class T, class Ref, class NodePtr, class ListPtr>
class iterator_template
{
public:
    iterator_template();
    Ref operator*() const;

};

struct IdlDeclarator
{
};

typedef bar< IdlDeclarator > IdlDeclarator_bar;
int
yyparse()

{

  iterator_template<IdlDeclarator_bar,IdlDeclarator_bar&,foo*,foo*> declIter;
  const IdlDeclarator& declarator = *declIter;
  return 1;
}

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

powered by: WebSVN 2.1.0

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