gcc/testsuite/g++.old-deja/g++.law/inline4.C
raw| 1 | // { dg-do run } |
| 2 | // GROUPS passed inlining |
| 3 | // inline file |
| 4 | // Message-Id: <9306020823.AA14027@joker> |
| 5 | // From: [email protected] |
| 6 | // Subject: gcc-2.4.2 template function bug (1) |
| 7 | // Date: Wed, 2 Jun 93 10:23:14 +0200 |
| 8 | |
| 9 | extern "C" int printf (const char *, ...); |
| 10 | |
| 11 | template <class T> inline T func(const T& x) { return x; } |
| 12 | |
| 13 | inline int func(const int& x) { return x; } |
| 14 | |
| 15 | |
| 16 | int main() |
| 17 | { int x; |
| 18 | func(x); |
| 19 | printf ("PASS\n"); |
| 20 | } |
| 21 |