Bug 100836 - microblaze-linux: RTX may be used uninitialized in this function
Summary: microblaze-linux: RTX may be used uninitialized in this function
Status: RESOLVED WORKSFORME
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 12.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: build
Depends on:
Blocks:
 
Reported: 2021-05-30 16:36 UTC by Jan-Benedict Glaw
Modified: 2023-04-13 15:50 UTC (History)
0 users

See Also:
Host:
Target: microblaze-linux
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan-Benedict Glaw 2021-05-30 16:36:37 UTC
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
Comment 1 Jan-Benedict Glaw 2023-04-13 15:50:19 UTC
This is fixed in recent builds, so I'm closing this ticket.