------- Additional Comments From reichelt at gcc dot gnu dot org 2005-04-20 16:04 ------- Here's an even simpler testcase that triggers the warning with -O, -O2, -O3:
============================================ struct A { const int& i; int j; A(const int& __i) : i(__i), j(0) {} }; void foo(const int&); inline void bar(const A& a) { foo(a.j); } void baz() { for (int k=0; k<2; ++k) bar(A(0)); } ============================================ -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21124