https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94929
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Known to fail| |6.4.0, 7.5.0, 8.4.0 CC| |polacek at redhat dot com Ever confirmed|0 |1 Keywords| |rejects-valid Status|RESOLVED |NEW Known to work| |10.0, 11.0, 5.5.0, 9.2.0 Last reconfirmed| |2020-05-03 Resolution|DUPLICATE |--- --- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> --- Hmm, although this was fixed for gcc 9.2 by the patch for PR 90736 it seems to be a different root cause. This compiled with GCC 5 but not 6, 7 or 8: template<typename T> constexpr const T& max(const T& a, const T& b) { return a < b ? b : a; } struct One {}; struct Two {}; struct Foo { alignas(max(alignof(One), alignof(Two))) char value; }; This regressed with r230365, "Merge C++ delayed folding branch." Marek, looks like backporting r272219 would fix this.