* Re: [gcc r14-2455] riscv: Prepare backend for index registers [not found] <20230712081314.F1263385800C@sourceware.org> @ 2023-07-14 10:28 ` Andreas Schwab 2023-07-17 6:48 ` Christoph Müllner 0 siblings, 1 reply; 8+ messages in thread From: Andreas Schwab @ 2023-07-14 10:28 UTC (permalink / raw) To: Christoph Müllner; +Cc: Kito Cheng, gcc-patches Why didn't you test that? ../../gcc/config/riscv/riscv.cc: In function 'int riscv_regno_ok_for_index_p(int)': ../../gcc/config/riscv/riscv.cc:864:33: error: unused parameter 'regno' [-Werror=unused-parameter] 864 | riscv_regno_ok_for_index_p (int regno) | ~~~~^~~~~ cc1plus: all warnings being treated as errors make[3]: *** [Makefile:2499: riscv.o] Error 1 -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different." ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gcc r14-2455] riscv: Prepare backend for index registers 2023-07-14 10:28 ` [gcc r14-2455] riscv: Prepare backend for index registers Andreas Schwab @ 2023-07-17 6:48 ` Christoph Müllner 2023-07-17 7:24 ` Andreas Schwab 2023-07-17 7:31 ` Andrew Pinski 0 siblings, 2 replies; 8+ messages in thread From: Christoph Müllner @ 2023-07-17 6:48 UTC (permalink / raw) To: Andreas Schwab; +Cc: Kito Cheng, gcc-patches On Fri, Jul 14, 2023 at 12:28 PM Andreas Schwab <schwab@linux-m68k.org> wrote: > > Why didn't you test that? Thanks for reporting, and sorry for introducing this warning. I test all patches before sending them. In the case of RISC-V backend patches, I build a 2-stage cross-toolchain and run all regression tests for RV32 and RV64 (using QEMU). Testing is done with and without patches applied to identify regressions. The build process shows a lot of warnings. Therefore I did not investigate finding a way to use -Werror. This means that looking for compiler warnings is a manual step, and I might miss one while scrolling through the logs. Sorry for the inconvenience, Christoph > > ../../gcc/config/riscv/riscv.cc: In function 'int riscv_regno_ok_for_index_p(int)': > ../../gcc/config/riscv/riscv.cc:864:33: error: unused parameter 'regno' [-Werror=unused-parameter] > 864 | riscv_regno_ok_for_index_p (int regno) > | ~~~~^~~~~ > cc1plus: all warnings being treated as errors > make[3]: *** [Makefile:2499: riscv.o] Error 1 > > -- > Andreas Schwab, schwab@linux-m68k.org > GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 > "And now for something completely different." ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gcc r14-2455] riscv: Prepare backend for index registers 2023-07-17 6:48 ` Christoph Müllner @ 2023-07-17 7:24 ` Andreas Schwab 2023-07-17 7:33 ` Christoph Müllner 2023-07-17 7:31 ` Andrew Pinski 1 sibling, 1 reply; 8+ messages in thread From: Andreas Schwab @ 2023-07-17 7:24 UTC (permalink / raw) To: Christoph Müllner; +Cc: Kito Cheng, gcc-patches On Jul 17 2023, Christoph Müllner wrote: > The build process shows a lot of warnings. Then you are using a bad compiler. The build is 100% -Werror clean. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different." ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gcc r14-2455] riscv: Prepare backend for index registers 2023-07-17 7:24 ` Andreas Schwab @ 2023-07-17 7:33 ` Christoph Müllner 2023-07-17 7:44 ` Andreas Schwab 0 siblings, 1 reply; 8+ messages in thread From: Christoph Müllner @ 2023-07-17 7:33 UTC (permalink / raw) To: Andreas Schwab; +Cc: Kito Cheng, gcc-patches On Mon, Jul 17, 2023 at 9:24 AM Andreas Schwab <schwab@linux-m68k.org> wrote: > > On Jul 17 2023, Christoph Müllner wrote: > > > The build process shows a lot of warnings. > > Then you are using a bad compiler. The build is 100% -Werror clean. My host compiler is: gcc version 13.1.1 20230614 (Red Hat 13.1.1-4) (GCC) Some examples: > /home/cm/src/gcc/riscv-mainline/gcc/text-art/table.cc: In member function ‘int text_art::table_geometry::table_x_to_canvas_x(int) const’: > /home/cm/src/gcc/riscv-mainline/gcc/text-art/table.cc:561:15: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] > 561 | if (table_x == m_col_start_x.size ()) > | ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ > /home/cm/src/gcc/riscv-mainline/gcc/text-art/table.cc: In function ‘void selftest::test_spans_3()’: > /home/cm/src/gcc/riscv-mainline/gcc/text-art/table.cc:947:62: warning: unquoted keyword ‘char’ in format [-Wformat-diag] > 947 | "'buf' (char[%i])", > | ^~~~ > /home/cm/src/gcc/riscv-mainline/gcc/gengtype-lex.l: In function ‘int yylex(const char**)’: > gengtype-lex.cc:356:15: warning: this statement may fall through [-Wimplicit-fallthrough=] > 356 | */ > | ~~ ^ > In file included from /home/cm/src/gcc/riscv-mainline/libgcc/unwind-dw2.c:410: > ./md-unwind-support.h: In function 'riscv_fallback_frame_state': > ./md-unwind-support.h:67:6: warning: assignment to 'struct sigcontext *' from incompatible pointer type 'mcontext_t *' [-Wincompatible-pointer-types] > 67 | sc = &rt_->uc.uc_mcontext; > | ^ > /home/cm/src/gcc/riscv-mainline/libgcc/config/riscv/atomic.c:36:8: warning: conflicting types for built-in function '__sync_fetch_and_add_1'; expected 'unsigned char(volatile void *, unsigned char)' [-Wbuiltin-declaration-mismatch] > 36 | type __sync_fetch_and_ ## opname ## _ ## size (type *p, type v) \ > | ^~~~~~~~~~~~~~~~~ Please let me know if I am doing something wrong. BR Christoph > > -- > Andreas Schwab, schwab@linux-m68k.org > GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 > "And now for something completely different." ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gcc r14-2455] riscv: Prepare backend for index registers 2023-07-17 7:33 ` Christoph Müllner @ 2023-07-17 7:44 ` Andreas Schwab 2023-07-17 8:11 ` Christoph Müllner 0 siblings, 1 reply; 8+ messages in thread From: Andreas Schwab @ 2023-07-17 7:44 UTC (permalink / raw) To: Christoph Müllner; +Cc: Kito Cheng, gcc-patches On Jul 17 2023, Christoph Müllner wrote: > My host compiler is: gcc version 13.1.1 20230614 (Red Hat 13.1.1-4) (GCC) Too old. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different." ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gcc r14-2455] riscv: Prepare backend for index registers 2023-07-17 7:44 ` Andreas Schwab @ 2023-07-17 8:11 ` Christoph Müllner 0 siblings, 0 replies; 8+ messages in thread From: Christoph Müllner @ 2023-07-17 8:11 UTC (permalink / raw) To: Andreas Schwab, Andrew Pinski; +Cc: Kito Cheng, gcc-patches On Mon, Jul 17, 2023 at 9:44 AM Andreas Schwab <schwab@linux-m68k.org> wrote: > > On Jul 17 2023, Christoph Müllner wrote: > > > My host compiler is: gcc version 13.1.1 20230614 (Red Hat 13.1.1-4) (GCC) > > Too old. Ok understood. Thanks, Christoph > > -- > Andreas Schwab, schwab@linux-m68k.org > GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 > "And now for something completely different." ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gcc r14-2455] riscv: Prepare backend for index registers 2023-07-17 6:48 ` Christoph Müllner 2023-07-17 7:24 ` Andreas Schwab @ 2023-07-17 7:31 ` Andrew Pinski 2023-07-17 8:11 ` Christoph Müllner 1 sibling, 1 reply; 8+ messages in thread From: Andrew Pinski @ 2023-07-17 7:31 UTC (permalink / raw) To: Christoph Müllner; +Cc: Andreas Schwab, Kito Cheng, gcc-patches On Sun, Jul 16, 2023 at 11:49 PM Christoph Müllner <christoph.muellner@vrull.eu> wrote: > > On Fri, Jul 14, 2023 at 12:28 PM Andreas Schwab <schwab@linux-m68k.org> wrote: > > > > Why didn't you test that? > > Thanks for reporting, and sorry for introducing this warning. > > I test all patches before sending them. > In the case of RISC-V backend patches, I build a 2-stage > cross-toolchain and run all regression tests for RV32 and RV64 (using > QEMU). > Testing is done with and without patches applied to identify regressions. > > The build process shows a lot of warnings. Therefore I did not > investigate finding a way to use -Werror. > This means that looking for compiler warnings is a manual step, and I > might miss one while scrolling through the logs. If you are building a cross compiler, and want to clean up warnings, first build a native compiler and then build the cross using that. Also maybe it is finding a way to do native bootstraps on riscv to do testing of patches rather than doing just cross builds when testing backend patches. Especially when I have found the GCC testsuite but the bootstrap is more likely to find backend issues and such. Thanks, Andrew > > Sorry for the inconvenience, > Christoph > > > > > > ../../gcc/config/riscv/riscv.cc: In function 'int riscv_regno_ok_for_index_p(int)': > > ../../gcc/config/riscv/riscv.cc:864:33: error: unused parameter 'regno' [-Werror=unused-parameter] > > 864 | riscv_regno_ok_for_index_p (int regno) > > | ~~~~^~~~~ > > cc1plus: all warnings being treated as errors > > make[3]: *** [Makefile:2499: riscv.o] Error 1 > > > > -- > > Andreas Schwab, schwab@linux-m68k.org > > GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 > > "And now for something completely different." ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [gcc r14-2455] riscv: Prepare backend for index registers 2023-07-17 7:31 ` Andrew Pinski @ 2023-07-17 8:11 ` Christoph Müllner 0 siblings, 0 replies; 8+ messages in thread From: Christoph Müllner @ 2023-07-17 8:11 UTC (permalink / raw) To: Andrew Pinski; +Cc: Andreas Schwab, Kito Cheng, gcc-patches On Mon, Jul 17, 2023 at 9:31 AM Andrew Pinski <pinskia@gmail.com> wrote: > > On Sun, Jul 16, 2023 at 11:49 PM Christoph Müllner > <christoph.muellner@vrull.eu> wrote: > > > > On Fri, Jul 14, 2023 at 12:28 PM Andreas Schwab <schwab@linux-m68k.org> wrote: > > > > > > Why didn't you test that? > > > > Thanks for reporting, and sorry for introducing this warning. > > > > I test all patches before sending them. > > In the case of RISC-V backend patches, I build a 2-stage > > cross-toolchain and run all regression tests for RV32 and RV64 (using > > QEMU). > > Testing is done with and without patches applied to identify regressions. > > > > The build process shows a lot of warnings. Therefore I did not > > investigate finding a way to use -Werror. > > This means that looking for compiler warnings is a manual step, and I > > might miss one while scrolling through the logs. > > If you are building a cross compiler, and want to clean up warnings, > first build a native compiler and then build the cross using that. Ok, will adjust my workflow accordingly. > Also maybe it is finding a way to do native bootstraps on riscv to do > testing of patches rather than doing just cross builds when testing > backend patches. > Especially when I have found the GCC testsuite but the bootstrap is > more likely to find backend issues and such. Yes, using the patch-under-testing to build a toolchain can identify issues that the testsuite can't find. I did that a couple of times in a QEMU environment, but I prefer the cross-toolchain approach because it is faster. For patches that have a bigger impact, I test the toolchain with SPEC CPU 2017. Thanks, Christoph > > Thanks, > Andrew > > > > > Sorry for the inconvenience, > > Christoph > > > > > > > > > > ../../gcc/config/riscv/riscv.cc: In function 'int riscv_regno_ok_for_index_p(int)': > > > ../../gcc/config/riscv/riscv.cc:864:33: error: unused parameter 'regno' [-Werror=unused-parameter] > > > 864 | riscv_regno_ok_for_index_p (int regno) > > > | ~~~~^~~~~ > > > cc1plus: all warnings being treated as errors > > > make[3]: *** [Makefile:2499: riscv.o] Error 1 > > > > > > -- > > > Andreas Schwab, schwab@linux-m68k.org > > > GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 > > > "And now for something completely different." ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2023-07-17 8:11 UTC | newest] Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <20230712081314.F1263385800C@sourceware.org> 2023-07-14 10:28 ` [gcc r14-2455] riscv: Prepare backend for index registers Andreas Schwab 2023-07-17 6:48 ` Christoph Müllner 2023-07-17 7:24 ` Andreas Schwab 2023-07-17 7:33 ` Christoph Müllner 2023-07-17 7:44 ` Andreas Schwab 2023-07-17 8:11 ` Christoph Müllner 2023-07-17 7:31 ` Andrew Pinski 2023-07-17 8:11 ` Christoph Müllner
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).