1 // PR c++/47783 2 // { dg-do compile } 3 // { dg-options "-Wunused -W" } 4 5 struct R 6 { 7 int &i; 8 }; 9 10 void foo(R r,int & s)11 foo (R r, int &s) 12 { 13 r.i = 7; 14 s = 8; 15 } 16 17 int bar()18 bar () 19 { 20 int x = 1, y = 1; 21 R r = { x }; 22 foo (r, y); 23 return x + y; 24 } 25