[Bug c++/93496] Miscompile of range-for over braced-init-list in constructor of class with virtual inheritance

justin.lapolla.hpe at gmail dot com gcc-bugzilla@gcc.gnu.org
Thu Jan 30 13:53:00 GMT 2020


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93496

--- Comment #2 from Justin LaPolla <justin.lapolla.hpe at gmail dot com> ---
1. Was the root cause found and fixed intentionally? Or was it fixed
incidentally because of other unrelated changes that happened to cover the bug?

2. Do you have a regression test in place that would detect this bug if it
appeared in future GCC versions?

3. My current project requires that we compile with GCC 8.1.0. To avoid this
bug, we are disallowing virtual inheritance in our code by compiling with
`-Werror=virtual-inheritance'. Is this sufficient? Can you provide guidance on
how to best avoid hitting this bug in GCC 8.1.0?


More information about the Gcc-bugs mailing list