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

            Bug ID: 100416
           Summary: profiledbootstrap broken on (at least) arm and aarch64
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: bootstrap
          Assignee: unassigned at gcc dot gnu.org
          Reporter: acoplan at gcc dot gnu.org
  Target Milestone: ---

It seems that -fprofile-generate tickles extra -Wmaybe-uninitialized warnings,
which in turn is causing profiledbootstrap to fail on (at least) arm and
aarch64.

For example, one of the failures is building simplify-rtx.c (here on aarch64):

In file included from /home/alecop01/toolchain/src/gcc/gcc/coretypes.h:472,
                 from /home/alecop01/toolchain/src/gcc/gcc/simplify-rtx.c:23:
/home/alecop01/toolchain/src/gcc/gcc/machmode.h: In function ‘rtx_def*
simplify_const_binary_operation(rtx_code, machine_mode, rtx, rtx)’:
/home/alecop01/toolchain/src/gcc/gcc/machmode.h:569:25: error: ‘*(unsigned
int*)((char*)&int_mode + offsetof(scalar_int_mode, scalar_int_mode::m_mode))’
may be used uninitialized in this function [-Werror=maybe-uninitialized]
  569 |   return mode_precision[mode];
      |                         ^~~~
/home/alecop01/toolchain/src/gcc/gcc/simplify-rtx.c:4733:19: note: ‘*(unsigned
int*)((char*)&int_mode + offsetof(scalar_int_mode, scalar_int_mode::m_mode))’
was declared here
 4733 |   scalar_int_mode int_mode;
      |                   ^~~~~~~~
cc1plus: all warnings being treated as errors
Makefile:1142: recipe for target 'simplify-rtx.o' failed

Reply via email to