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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [ext/] [instantiate1.C] - Blame information for rev 821

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

Line No. Rev Author Line
1 693 jeremybenn
// Test that 'extern template' suppresses instantiations.
2
// { dg-do compile }
3
// { dg-options "" }
4
 
5
template  void f (T) { }
6
extern template void f (int);
7
 
8
template  struct A {
9
  void f ();
10
};
11
template  void A::f () { }
12
extern template struct A;
13
 
14
// { dg-final { scan-assembler-not "\n_?_Z1fIiEvT_(:|\n|\t)" } }
15
void test_f_int () { f(42); }
16
 
17
// { dg-final { scan-assembler-not "\n_?_ZN1AIiE1fEv(:|\n|\t)" } }
18
void test_A_int_f () { A a; a.f (); }
19
 
20
// { dg-final { scan-assembler "\n_?_Z1fIdEvT_(:|\n|\t)" } }
21
void test_f_double () { f (2.0); }
22
 
23
// { dg-final { scan-assembler "\n_?_ZN1AIdE1fEv(:|\n|\t)" } }
24
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.