2 /* Ensure that fix-it hints are offered at every optimization level, even when
3 "-g" is enabled (coverage for every optimization level without -g is given
4 by the other cases within g++.dg/torture/accessor-fixits-*.C). */
5 // { dg-additional-options "-g" }
10 double get_ratio() const { return m_ratio; }
13 double m_ratio; // { dg-line field_decl }
18 if (ptr->m_ratio >= 0.5) // { dg-error "'double foo::m_ratio' is private within this context" }
20 // { dg-message "declared private here" "" { target *-*-* } field_decl }
21 // { dg-message "'double foo::m_ratio' can be accessed via 'double foo::get_ratio\\(\\) const'" "" { target *-*-* } .-3 }