[Bug c/99340] -Werror=maybe-uninitialized warning with -fPIE, but not -fPIC

2021-04-12 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99340 Martin Sebor changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Bug c/99340] -Werror=maybe-uninitialized warning with -fPIE, but not -fPIC

2021-03-02 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99340 --- Comment #6 from Richard Biener --- GCC 9 warns as well. I think this was a false negative which is now fixed. Note GCC 10.1.0 and GCC 10.2.0 warn for me as well, so something must have regressed this between 10.2.0 and g:eddcb627ccfbd97e025

[Bug c/99340] -Werror=maybe-uninitialized warning with -fPIE, but not -fPIC

2021-03-02 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99340 Martin Liška changed: What|Removed |Added Status|WAITING |NEW CC|

[Bug c/99340] -Werror=maybe-uninitialized warning with -fPIE, but not -fPIC

2021-03-02 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99340 --- Comment #4 from Martin Liška --- (In reply to Matthias Klose from comment #3) > Created attachment 50284 [details] > preprocessed source > > original test case before reducing > > gcc -std=gnu99 -Werror=uninitialized -Werror=maybe-uninitial

[Bug c/99340] -Werror=maybe-uninitialized warning with -fPIE, but not -fPIC

2021-03-02 Thread doko at debian dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99340 --- Comment #3 from Matthias Klose --- Created attachment 50284 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50284&action=edit preprocessed source original test case before reducing gcc -std=gnu99 -Werror=uninitialized -Werror=maybe-uni

[Bug c/99340] -Werror=maybe-uninitialized warning with -fPIE, but not -fPIC

2021-03-02 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99340 --- Comment #2 from Richard Biener --- PIC allows interposing ags_midi_buffer_util_get_varlength and thus possibly initializing the argument. PIE does not allow this so we see it is not initialized. I suppose the change on the branch is for som