Debian Codegraph @

gcc/testsuite/g++.dg/conversion/pr66211.C

raw
1 // PR c++/66211
2 // { dg-do compile }
3
4 void f(int&){}
5
6 int main()
7 {
8 int x = 0;
9 double y = 1;
10 f(1 > 0 ? x : y); // { dg-error "cannot bind non-const lvalue reference of type .int&. to a value of type .double" }
11 }