OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [g++.old-deja/] [g++.pt/] [explicit70.C] - Diff between revs 305 and 338

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

Rev 305 Rev 338
// { dg-do assemble  }
// { dg-do assemble  }
template 
template 
void f(T) {}
void f(T) {}
template 
template 
struct S {
struct S {
  static T t;
  static T t;
};
};
template 
template 
T S::t;
T S::t;
template void f(int);
template void f(int);
template void f(int); // { dg-error "duplicate explicit instantiation" }
template void f(int); // { dg-error "duplicate explicit instantiation" }
template int S::t;
template int S::t;
template int S::t; // { dg-error "duplicate explicit instantiation" }
template int S::t; // { dg-error "duplicate explicit instantiation" }
template class S;
template class S;
template class S; // { dg-error "duplicate explicit instantiation" }
template class S; // { dg-error "duplicate explicit instantiation" }
extern template void f(double); // { dg-error "extern" } extern not allowed
extern template void f(double); // { dg-error "extern" } extern not allowed
inline template class S; // { dg-error "inline" } inline not allowed
inline template class S; // { dg-error "inline" } inline not allowed
template 
template 
struct S {};
struct S {};
template class S; // OK - explicit instantiation of partial
template class S; // OK - explicit instantiation of partial
                         // specialization
                         // specialization
template <>
template <>
struct S {};
struct S {};
template class S; // OK - explicit instantiation after
template class S; // OK - explicit instantiation after
template <>
template <>
void f(long double) {}
void f(long double) {}
template void f(long double); // OK - explicit instantiation after
template void f(long double); // OK - explicit instantiation after
template 
template 
void g(T);
void g(T);
template void g(int); // { dg-error "no definition available" "no def" }
template void g(int); // { dg-error "no definition available" "no def" }
// { dg-message "instantiated" "inst" { target *-*-* } 43 }
// { dg-message "instantiated" "inst" { target *-*-* } 43 }
 
 

powered by: WebSVN 2.1.0

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