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

            Bug ID: 100836
           Summary: microblaze-linux: RTX may be used uninitialized in
                    this function
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jbg...@lug-owl.de
  Target Milestone: ---

Hi!

After having started my testing efforts again, I found these two warnings which
might be legit for microblaze-linux.

Configured as:

../gcc/configure --target=microblaze-linux --enable-werror-always
--enable-languages=all --disable-gcov --disable-shared --disable-threads
--without-headers
--prefix=/var/lib/laminar/run/gcc-microblaze-linux/1/toolchain-install

using a recent master commit (1a87f8381085de50726634e8cb4a651c05b272b5) along
with a recent GCC as $CXX.

...and then it's built with:
make all-gcc
[...]
[all 2021-05-30 10:48:15] /usr/lib/gcc-snapshot/bin/g++  -fno-PIE -c   -g -O2
-DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE   -fno-exceptions -fno-rtti
-fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings
-Wcast-qual -Wno-error=format-diag -Wmissing-format-attribute
-Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros
-Wno-overlength-strings -Werror -fno-common  -DHAVE_CONFIG_H -I. -I.
-I../../gcc/gcc -I../../gcc/gcc/. -I../../gcc/gcc/../include
-I../../gcc/gcc/../libcpp/include -I../../gcc/gcc/../libcody 
-I../../gcc/gcc/../libdecnumber -I../../gcc/gcc/../libdecnumber/dpd
-I../libdecnumber -I../../gcc/gcc/../libbacktrace   -o microblaze.o -MT
microblaze.o -MMD -MP -MF ./.deps/microblaze.TPo
../../gcc/gcc/config/microblaze/microblaze.c
[all 2021-05-30 10:48:18] ../../gcc/gcc/config/microblaze/microblaze.c: In
function 'rtx_def* microblaze_legitimize_address(rtx, rtx, machine_mode)':
[all 2021-05-30 10:48:18] ../../gcc/gcc/config/microblaze/microblaze.c:1105:11:
error: 'reg' may be used uninitialized in this function
[-Werror=maybe-uninitialized]
[all 2021-05-30 10:48:18]  1105 |       rtx reg;
[all 2021-05-30 10:48:18]       |           ^~~
[all 2021-05-30 10:48:19] In file included from ../../gcc/gcc/rtl.h:3938,
[all 2021-05-30 10:48:19]                  from
../../gcc/gcc/config/microblaze/microblaze.c:29:
[all 2021-05-30 10:48:19] ./genrtl.h: In function 'bool
microblaze_expand_move(machine_mode, rtx_def**)':
[all 2021-05-30 10:48:19] ./genrtl.h:38:16: error: 'p1' may be used
uninitialized in this function [-Werror=maybe-uninitialized]
[all 2021-05-30 10:48:19]    38 |   XEXP (rt, 1) = arg1;
[all 2021-05-30 10:48:19] ../../gcc/gcc/config/microblaze/microblaze.c:3415:15:
note: 'p1' was declared here
[all 2021-05-30 10:48:19]  3415 |       rtx p0, p1, result, temp;
[all 2021-05-30 10:48:19]       |               ^~
[all 2021-05-30 10:48:20] cc1plus: all warnings being treated as errors
[all 2021-05-30 10:48:20] make[1]: *** [Makefile:2406: microblaze.o] Error 1
[all 2021-05-30 10:48:20] make[1]: Leaving directory
'/var/lib/laminar/run/gcc-microblaze-linux/1/toolchain-build/gcc'
[all 2021-05-30 10:48:20] make: *** [Makefile:4414: all-gcc] Error 2
[laminar] Executing cfg/after

Reply via email to