https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88528
--- Comment #3 from Pavel Roskin <proski at gnu dot org> --- I ran "git bisect" between gcc 7.1.0 (affected) and gcc 8.1.0 (unaffected). Following commit fixed the issue: https://github.com/gcc-mirror/gcc/commit/e0ccd4807edc919735b4d86590b5a9def529f91c 2018-04-11 Marek Polacek <pola...@redhat.com> PR c++/85032 * constexpr.c (potential_constant_expression_1): Consider conversions from classes to literal types potentially constant. The original issue: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85032 It's a short fix that also adds a similar testcase. The fix can be applied to gcc-7-branch. Let's see if it fixes my testcase and also my "real world" issue.