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++.dg/] [ext/] [instantiate1.C] - Diff between revs 301 and 338

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

Rev 301 Rev 338
// Test that 'extern template' suppresses instantiations.
// Test that 'extern template' suppresses instantiations.
// { dg-do compile }
// { dg-do compile }
// { dg-options "" }
// { dg-options "" }
template  void f (T) { }
template  void f (T) { }
extern template void f (int);
extern template void f (int);
template  struct A {
template  struct A {
  void f ();
  void f ();
};
};
template  void A::f () { }
template  void A::f () { }
extern template struct A;
extern template struct A;
// { dg-final { scan-assembler-not "\n_?_Z1fIiEvT_(:|\n|\t)" } }
// { dg-final { scan-assembler-not "\n_?_Z1fIiEvT_(:|\n|\t)" } }
void test_f_int () { f(42); }
void test_f_int () { f(42); }
// { dg-final { scan-assembler-not "\n_?_ZN1AIiE1fEv(:|\n|\t)" } }
// { dg-final { scan-assembler-not "\n_?_ZN1AIiE1fEv(:|\n|\t)" } }
void test_A_int_f () { A a; a.f (); }
void test_A_int_f () { A a; a.f (); }
// { dg-final { scan-assembler "\n_?_Z1fIdEvT_(:|\n|\t)" } }
// { dg-final { scan-assembler "\n_?_Z1fIdEvT_(:|\n|\t)" } }
void test_f_double () { f (2.0); }
void test_f_double () { f (2.0); }
// { dg-final { scan-assembler "\n_?_ZN1AIdE1fEv(:|\n|\t)" } }
// { dg-final { scan-assembler "\n_?_ZN1AIdE1fEv(:|\n|\t)" } }
void test_A_double_f () { A b; b.f (); }
void test_A_double_f () { A b; b.f (); }
 
 

powered by: WebSVN 2.1.0

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