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

            Bug ID: 87747
           Summary: [9 regression] Bootstrap failure if using gcc-4.6 as
                    stage1 compiler
           Product: gcc
           Version: 9.0
            Status: UNCONFIRMED
          Keywords: build
          Severity: normal
          Priority: P3
         Component: bootstrap
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rearnsha at gcc dot gnu.org
                CC: iii at linux dot ibm.com, rsandifo at gcc dot gnu.org
  Target Milestone: ---
            Target: arm-none-linux-gnueabihf
             Build: arm-none-linux-gnueabihf

r264556 introduced a new construct to the initializer for rtx_code_size, but
this relies on the compiler being able to optimize away the expression
(FORMAT)[0] even at -O0.  If it cannot do this, it will generate a static
constructor to initialize the array.

Unfortunately, cselib.c also has a static constructor that is used to
initialize the pool allocator for cselib VALUE constructs and this uses the
rtx_code_size array.

We therefore have a phase ordering problem where the two constructors must be
run in a precise order or the pool allocator will be initialized incorrectly.

How to repeat:
bootstrap the compiler with gcc-4.6 as the stage1 compiler; probably applies to
all targets, but originally reproduced on ubuntu-12.04 for Arm.

Reply via email to