[Bug middle-end/117329] -Wnull-dereference error indicator in the wrong place.

2024-10-29 Thread o.putaans at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117329 --- Comment #6 from Oskars Putans --- (In reply to Andrew Pinski from comment #5) > That is ok because the underlying issue is the same though. Only the line > info for the `var = a;` assignment is there. Could I get confirmation of Wnull-deref

[Bug middle-end/117329] -Wnull-dereference error indicator in the wrong place.

2024-10-29 Thread o.putaans at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117329 --- Comment #4 from Oskars Putans --- (In reply to Andrew Pinski from comment #1) > I can't reproduce the warning for Wnull-dereference but I do get a warning > for -O2 -Warray-bounds that has the same line as what you reported. Oh no.. It see

[Bug middle-end/117329] -Wnull-dereference error indicator in the wrong place.

2024-10-29 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117329 --- Comment #5 from Andrew Pinski --- (In reply to Oskars Putans from comment #4) > (In reply to Andrew Pinski from comment #1) > > I can't reproduce the warning for Wnull-dereference but I do get a warning > > for -O2 -Warray-bounds that has t

[Bug middle-end/117329] -Wnull-dereference error indicator in the wrong place.

2024-10-29 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117329 Andrew Pinski changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed|

[Bug middle-end/117329] -Wnull-dereference error indicator in the wrong place.

2024-10-29 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117329 --- Comment #2 from Andrew Pinski --- By the time the warning happens, we only have line 7 in the IR left: [/app/example.cpp:7:13] [/app/example.cpp:7:9] MEM[(struct T2 *)4B].var = 5;

[Bug middle-end/117329] -Wnull-dereference error indicator in the wrong place.

2024-10-29 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117329 --- Comment #1 from Andrew Pinski --- I can't reproduce the warning for Wnull-dereference but I do get a warning for -O2 -Warray-bounds that has the same line as what you reported.