On Wed, 2023-10-04 at 23:19 +0100, Roger Sayle wrote:
> 
> The recent patch to remove poly_int_pod triggers a bug in g++ 4.8.5's
> C++ 11 support which mistakenly believes poly_uint16 has a non-trivial
> constructor.  This in turn prohibits it from being used as a member in
> a union (rtxunion) that constructed statically, resulting in a (fatal)
> error during stage 1.  A workaround is to add an explicit constructor
> to the problematic union, which allows mainline to be bootstrapped with
> the system compiler on older RedHat 7 systems.
> 
> This patch has been tested on x86_64-pc-linux-gnu where it allows a
> bootstrap to complete when using g++ 4.8.5 as the host compiler.
> Ok for mainline?
> 
> 
> 2023-10-04  Roger Sayle  <ro...@nextmovesoftware.com>
> 
> gcc/ChangeLog
>       * rtl.h (rtx_def::u): Add explicit constructor to workaround
>       issue using g++ 4.8 as a host compiler.

AFAIK G++ 5.1 also has a bug (https://gcc.gnu.org/PR65801) breaking
building recent GCC.  I don't think it's really "maintainable" to ensure
current GCC able to be built with a buggy host compiler.

-- 
Xi Ruoyao <xry...@xry111.site>
School of Aerospace Science and Technology, Xidian University

Reply via email to