https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79345
Martin Sebor <msebor at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2017-02-08
CC| |msebor at gcc dot gnu.org
Summary|passing yet-uninitialized |[6/7 Regression] passing
|member as argument to base |yet-uninitialized member as
|class constructor should |argument to base class
|warn (-Wunitialized) |constructor should warn
| |(-Wunitialized)
Ever confirmed|0 |1
--- Comment #2 from Martin Sebor <msebor at gcc dot gnu.org> ---
Confirmed. Bisection points to r222135 (gcc 6.0.0):
------------------------------------------------------------------------
r222135 | jason | 2015-04-15 17:17:29 -0400 (Wed, 15 Apr 2015) | 5 lines
* constexpr.c (cxx_eval_store_expression): Ignore clobbers.
(build_constexpr_constructor_member_initializers): Loop to find
the BIND_EXPR.
* decl.c (start_preparsed_function): Clobber the object at the
beginning of a constructor.
A somewhat simplified test case:
struct A {
A (int);
};
struct B: A {
const bool x = true;
B (): A (x ? 3 : 7) { }
};
void f (void*);
void g ()
{
B b;
f (&b);
}