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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.dg/] [template/] [dependent-expr5.C] - Diff between revs 149 and 154

Only display areas with differences | Details | Blame | View Log

Rev 149 Rev 154
// { dg-do compile }
// { dg-do compile }
// Copyright 2005 Free Software Foundation
// Copyright 2005 Free Software Foundation
// contributed by Alexandre Oliva 
// contributed by Alexandre Oliva 
// inspired in the failure reported in Red Hat bugzilla #168260.
// inspired in the failure reported in Red Hat bugzilla #168260.
template void bind(F f) {}
template void bind(F f) {}
template void bindm(F f) {}
template void bindm(F f) {}
template void bindm(F (T::*f)(void)) {} // { dg-error "note" }
template void bindm(F (T::*f)(void)) {} // { dg-error "note" }
template void bindn(F f) {}
template void bindn(F f) {}
template void bindn(F (*f)(T)) {}
template void bindn(F (*f)(T)) {}
template void bindb(F f) {}
template void bindb(F f) {}
template void bindb(F (*f)(T)) {} // { dg-error "note" }
template void bindb(F (*f)(T)) {} // { dg-error "note" }
template void bindb(F (T::*f)(void)) {} // { dg-error "note" }
template void bindb(F (T::*f)(void)) {} // { dg-error "note" }
struct foo {
struct foo {
  static int baist;
  static int baist;
  int bait;
  int bait;
  void barf ();
  void barf ();
  static void barf (int);
  static void barf (int);
  struct bar {
  struct bar {
    static int baikst;
    static int baikst;
    int baikt;
    int baikt;
    void bark ();
    void bark ();
    static void bark (int);
    static void bark (int);
    bar() {
    bar() {
      bind (&baist);
      bind (&baist);
      bind (&foo::baist);
      bind (&foo::baist);
      bind (&bait); // { dg-error "nonstatic data member" }
      bind (&bait); // { dg-error "nonstatic data member" }
      bind (&foo::bait);
      bind (&foo::bait);
      bind (&baikst);
      bind (&baikst);
      bind (&bar::baikst);
      bind (&bar::baikst);
      bind (&baikt); // ok, this->baikt
      bind (&baikt); // ok, this->baikt
      bind (&bar::baikt);
      bind (&bar::baikt);
      bind (&barf); // { dg-error "no matching function" }
      bind (&barf); // { dg-error "no matching function" }
      bind (&foo::barf); // { dg-error "no matching function" }
      bind (&foo::barf); // { dg-error "no matching function" }
      bindm (&barf); // { dg-error "no matching function" }
      bindm (&barf); // { dg-error "no matching function" }
      bindm (&foo::barf);
      bindm (&foo::barf);
      bindn (&barf);
      bindn (&barf);
      bindn (&foo::barf);
      bindn (&foo::barf);
      bindb (&barf);
      bindb (&barf);
      bindb (&foo::barf); // { dg-error "ambiguous" }
      bindb (&foo::barf); // { dg-error "ambiguous" }
      bind (&bark); // { dg-error "no matching function" }
      bind (&bark); // { dg-error "no matching function" }
      bind (&bar::bark); // { dg-error "no matching function" }
      bind (&bar::bark); // { dg-error "no matching function" }
      bindm (&bark); // { dg-error "no matching function" }
      bindm (&bark); // { dg-error "no matching function" }
      bindm (&bar::bark);
      bindm (&bar::bark);
      bindn (&bark);
      bindn (&bark);
      bindn (&bar::bark);
      bindn (&bar::bark);
      bindb (&bark);
      bindb (&bark);
      bindb (&bar::bark); // { dg-error "ambiguous" }
      bindb (&bar::bark); // { dg-error "ambiguous" }
    }
    }
  };
  };
  template 
  template 
  struct barT {
  struct barT {
    static int baikst;
    static int baikst;
    int baikt;
    int baikt;
    void bark ();
    void bark ();
    static void bark (int);
    static void bark (int);
    barT() {
    barT() {
      bind (&baist);
      bind (&baist);
      bind (&foo::baist);
      bind (&foo::baist);
      bind (&bait); // { dg-error "nonstatic data member" }
      bind (&bait); // { dg-error "nonstatic data member" }
      bind (&foo::bait);
      bind (&foo::bait);
      bind (&baikst);
      bind (&baikst);
      bind (&barT::baikst);
      bind (&barT::baikst);
      bind (&baikt); // ok, this->baikt
      bind (&baikt); // ok, this->baikt
      bind (&barT::baikt);
      bind (&barT::baikt);
      bind (&barf); // { dg-error "no matching function" }
      bind (&barf); // { dg-error "no matching function" }
      bind (&foo::barf); // { dg-error "no matching function" }
      bind (&foo::barf); // { dg-error "no matching function" }
      bindm (&barf); // { dg-error "no matching function" }
      bindm (&barf); // { dg-error "no matching function" }
      bindm (&foo::barf);
      bindm (&foo::barf);
      bindn (&barf);
      bindn (&barf);
      bindn (&foo::barf);
      bindn (&foo::barf);
      bindb (&barf);
      bindb (&barf);
      bindb (&foo::barf); // { dg-error "ambiguous" }
      bindb (&foo::barf); // { dg-error "ambiguous" }
      bind (&bark); // { dg-error "no matching function" }
      bind (&bark); // { dg-error "no matching function" }
      bind (&barT::bark); // { dg-error "no matching function" }
      bind (&barT::bark); // { dg-error "no matching function" }
      bindm (&bark); // { dg-error "no matching function" }
      bindm (&bark); // { dg-error "no matching function" }
      bindm (&barT::bark);
      bindm (&barT::bark);
      bindn (&bark);
      bindn (&bark);
      bindn (&barT::bark);
      bindn (&barT::bark);
      bindb (&bark);
      bindb (&bark);
      bindb (&barT::bark); // { dg-error "ambiguous" }
      bindb (&barT::bark); // { dg-error "ambiguous" }
    }
    }
  };
  };
  bar bard;
  bar bard;
  barT bart;
  barT bart;
} bad;
} bad;
 
 

powered by: WebSVN 2.1.0

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