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

            Bug ID: 100654
           Summary: trunk bootstrap errors with -O0 and -O1
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: bootstrap
          Assignee: unassigned at gcc dot gnu.org
          Reporter: manfred99 at gmx dot ch
  Target Milestone: ---

linux x86_64 and i686 (GCC 7.5 as bootstrap compiler), with BOOT_CFLAGS="-O0
-g":
../../gcc-trunk-source/gcc/gcc/opts.c: In function 'void
print_filtered_help(unsigned int, unsigned int, unsigned int, unsigned int,
gcc_options*, unsigned int)':
../../gcc-trunk-source/gcc/gcc/opts.c:1406:26: error: '  ' directive output may
be truncated writing 2 bytes into a region of size between 1 and 256
[-Werror=format-truncation=]
 1406 |                       "%s  %s", help, _(use_diagnosed_msg));
      |                          ^~
../../gcc-trunk-source/gcc/gcc/opts.c:1405:22: note: 'snprintf' output 3 or
more bytes (assuming 258) into a destination of size 256
 1405 |             snprintf (new_help, sizeof new_help,
      |             ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
 1406 |                       "%s  %s", help, _(use_diagnosed_msg));
      |                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

last successful bootstrap for my daily builds with "-O0" was
99e8df7a4cc0bb1bfa49e69ccb0f7e02c9755e3c (2021-05-05).



with BOOT_CFLAGS="-O1 -g":
../../gcc-trunk-source/gcc/gcc/gimplify.c: In function 'gimplify_status
gimplify_omp_loop(tree_node**, gimple**)':
../../gcc-trunk-source/gcc/gcc/gimplify.c:12967:17: error: 'last' may be used
uninitialized in this function [-Werror=maybe-uninitialized]
12967 |                 if (pass != last)
      |                 ^~


trunk builds fine with "-O2" however.

Reply via email to