[Bug c++/65896] Erroneous uninitialized variable access error in constexpr function with temporary variables
david at doublewise dot net
gcc-bugzilla@gcc.gnu.org
Mon Apr 27 01:12:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65896
David Stone <david at doublewise dot net> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |david at doublewise dot net
--- Comment #1 from David Stone <david at doublewise dot net> ---
I have simplified the test case further:
struct base {};
struct derived : base {
constexpr derived():
base{},
m_value(0) {
}
int m_value;
};
constexpr int by_ref(derived && value) {
return value.m_value;
}
constexpr int value = by_ref(derived{});
More information about the Gcc-bugs
mailing list