]> git.ipfire.org Git - thirdparty/gcc.git/commit
Avoid '-Wmaybe-uninitialized' diagnostic in 'gcc/dwarf2out.c'
authorThomas Schwinge <thomas@codesourcery.com>
Wed, 30 Oct 2019 10:50:58 +0000 (11:50 +0100)
committerThomas Schwinge <tschwinge@gcc.gnu.org>
Wed, 30 Oct 2019 10:50:58 +0000 (11:50 +0100)
commite445df93aeaf5cf18efc23e6d1fb053bfea715c3
tree8f97cf0e9f89b37363ccca6031af4df80e7e6735
parentf26b1e14a6c3aa8ed26a0d4dec4bc0663035967e
Avoid '-Wmaybe-uninitialized' diagnostic in 'gcc/dwarf2out.c'

With '--enable-checking=yes,extra,rtl':

    In file included from [...]/source-gcc/gcc/coretypes.h:433,
                     from [...]/source-gcc/gcc/dwarf2out.c:60:
    [...]/source-gcc/gcc/machmode.h: In function 'dw_loc_descr_node* mem_loc_descriptor(rtx, machine_mode, machine_mode, var_init_status)':
    [...]/source-gcc/gcc/machmode.h:520:42: error: 'int_mode' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      520 |    ? mode_size_inline (mode) : mode_size[mode]);
          |                                          ^~~~
    [...]/source-gcc/gcc/dwarf2out.c:15464:19: note: 'int_mode' was declared here
    15464 |   scalar_int_mode int_mode, inner_mode, op1_mode;
          |                   ^~~~~~~~
    cc1plus: all warnings being treated as errors
    make[3]: *** [dwarf2out.o] Error 1

Backport trunk r270903.

2019-05-06  Richard Biener  <rguenther@suse.de>

* dwarf2out.c (mem_loc_descriptor): Initialize int_mode.

From-SVN: r277608
gcc/ChangeLog
gcc/dwarf2out.c