Debian Codegraph @

gcc/testsuite/g++.old-deja/g++.jason/overload22.C

raw
1 // { dg-do assemble }
2 // PRMS Id: 4574
3 // Bug: g++ prefers int to double for float& argument
4
5 inline double abs (double x) { return x;}
6 inline int abs (int i) { return i; }
7
8 float& fn(float& f)
9 {
10 return f;
11 }
12
13 void foo()
14 {
15 float f = 23.45;
16 abs(fn(f)); // gets bogus warning
17 }