OSDN Git Service

* lib/g++-dg.exp (g++-dg-test): Add "repo" option.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.old-deja / g++.robertl / eb79.C
1 // { dg-do assemble  }
2 // Makes bogus x86 assembly code.
3 #include <iostream>
4
5 using namespace std;
6
7 template<class T>
8 T max(T a, T b)
9 {
10   return (a > b) ? a : b;
11 }
12
13 // Prototypes (enable one or the other)
14 double max<>(double, double);      // { dg-error "" } bogus code
15 // int max(int, int);
16
17 int main()
18 {
19   int i = 123;
20   double d = 1234.5678;
21
22   cout.precision(12);
23   cout << max(d, i) << endl;  // { dg-error "" } 
24   cout << max(i, d) << endl;  // { dg-error "" } 
25   return 0;
26 }