blob: 77f859b2c0aebb275ecb93045a3f5cc7a4c2aa6d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
// { dg-do assemble }
// prms-id: 3836
void f(int &i) { // { dg-error "" } ref line
i = 10;
}
int main()
{
int i=1, j=2;
f(i);
f((int)j); // { dg-error "" } passing in to non-const
if (j != 2)
return 1;
}
|