* [Bug c++/89976] missing uninitialized warning for uninitialized struct member (VOPs)
[not found] <bug-89976-4@http.gcc.gnu.org/bugzilla/>
@ 2020-06-23 21:03 ` msebor at gcc dot gnu.org
2021-04-01 23:10 ` msebor at gcc dot gnu.org
` (9 subsequent siblings)
10 siblings, 0 replies; 11+ messages in thread
From: msebor at gcc dot gnu.org @ 2020-06-23 21:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89976
Bug 89976 depends on bug 49754, which changed state.
Bug 49754 Summary: Wuninitialized does not work with structs/unions/arrays
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49754
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/89976] missing uninitialized warning for uninitialized struct member (VOPs)
[not found] <bug-89976-4@http.gcc.gnu.org/bugzilla/>
2020-06-23 21:03 ` [Bug c++/89976] missing uninitialized warning for uninitialized struct member (VOPs) msebor at gcc dot gnu.org
@ 2021-04-01 23:10 ` msebor at gcc dot gnu.org
2021-04-16 21:30 ` [Bug tree-optimization/89976] [9/10/11 Regression] missing -Wuninitialized for struct member due to sra and TREE_NO_WARNING msebor at gcc dot gnu.org
` (8 subsequent siblings)
10 siblings, 0 replies; 11+ messages in thread
From: msebor at gcc dot gnu.org @ 2021-04-01 23:10 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89976
Bug 89976 depends on bug 79658, which changed state.
Bug 79658 Summary: [-Wuninitialized] referencing uninitialized field of POD struct should warn
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79658
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/89976] [9/10/11 Regression] missing -Wuninitialized for struct member due to sra and TREE_NO_WARNING
[not found] <bug-89976-4@http.gcc.gnu.org/bugzilla/>
2020-06-23 21:03 ` [Bug c++/89976] missing uninitialized warning for uninitialized struct member (VOPs) msebor at gcc dot gnu.org
2021-04-01 23:10 ` msebor at gcc dot gnu.org
@ 2021-04-16 21:30 ` msebor at gcc dot gnu.org
2021-04-19 7:20 ` rguenth at gcc dot gnu.org
` (7 subsequent siblings)
10 siblings, 0 replies; 11+ messages in thread
From: msebor at gcc dot gnu.org @ 2021-04-16 21:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89976
Martin Sebor <msebor at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|c++ |tree-optimization
Summary|missing uninitialized |[9/10/11 Regression]
|warning for uninitialized |missing -Wuninitialized for
|struct member (VOPs) |struct member due to sra
| |and TREE_NO_WARNING
Last reconfirmed|2019-11-02 00:00:00 |2021-4-16
CC| |msebor at gcc dot gnu.org
Known to fail| |10.2.0, 11.0, 4.5.3, 4.6.4,
| |4.9.4, 5.5.0, 6.4.0, 7.2.0,
| |8.3.0, 9.1.0
--- Comment #4 from Martin Sebor <msebor at gcc dot gnu.org> ---
In all cases and with -O1 and above, the uninitialized read is clearly visible
in the IL but it's suppressed because the variable (such as x$x in case 1) has
the TREE_NO_WARNING bit set. This appears to be regression introduced in GCC
4.5 in r147980.
gcc -O1 -S -Wall -std=c++14 -fdump-tree-uninit=/dev/stdout pr89976.C
;; Function foo (_Z3foov, funcdef_no=3, decl_uid=2098, cgraph_uid=4,
symbol_order=3)
struct X foo ()
{
int x$x; <<< TREE_NO_WARNING == 1
struct X D.2133;
<bb 2> [local count: 1073741824]:
D.2133.x = x$x_2(D); <<< uninitialized read
D.2133.y = 0;
return D.2133;
}
;; Function main (main, funcdef_no=4, decl_uid=2129, cgraph_uid=5,
symbol_order=4) (executed once)
int main ()
{
int x$x; <<< TREE_NO_WARNING == 1
struct X D.2156;
struct X x;
<bb 2> [local count: 1073741824]:
x ={v} {CLOBBER};
return x$x_5(D); <<< uninitialized read
}
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/89976] [9/10/11 Regression] missing -Wuninitialized for struct member due to sra and TREE_NO_WARNING
[not found] <bug-89976-4@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2021-04-16 21:30 ` [Bug tree-optimization/89976] [9/10/11 Regression] missing -Wuninitialized for struct member due to sra and TREE_NO_WARNING msebor at gcc dot gnu.org
@ 2021-04-19 7:20 ` rguenth at gcc dot gnu.org
2021-06-01 8:13 ` [Bug tree-optimization/89976] [9/10/11/12 " rguenth at gcc dot gnu.org
` (6 subsequent siblings)
10 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-04-19 7:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89976
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P2
Target Milestone|--- |9.4
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/89976] [9/10/11/12 Regression] missing -Wuninitialized for struct member due to sra and TREE_NO_WARNING
[not found] <bug-89976-4@http.gcc.gnu.org/bugzilla/>
` (3 preceding siblings ...)
2021-04-19 7:20 ` rguenth at gcc dot gnu.org
@ 2021-06-01 8:13 ` rguenth at gcc dot gnu.org
2021-06-26 15:17 ` egallager at gcc dot gnu.org
` (5 subsequent siblings)
10 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-06-01 8:13 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89976
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|9.4 |9.5
--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 9.4 is being released, retargeting bugs to GCC 9.5.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/89976] [9/10/11/12 Regression] missing -Wuninitialized for struct member due to sra and TREE_NO_WARNING
[not found] <bug-89976-4@http.gcc.gnu.org/bugzilla/>
` (4 preceding siblings ...)
2021-06-01 8:13 ` [Bug tree-optimization/89976] [9/10/11/12 " rguenth at gcc dot gnu.org
@ 2021-06-26 15:17 ` egallager at gcc dot gnu.org
2021-06-28 20:06 ` msebor at gcc dot gnu.org
` (4 subsequent siblings)
10 siblings, 0 replies; 11+ messages in thread
From: egallager at gcc dot gnu.org @ 2021-06-26 15:17 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89976
--- Comment #6 from Eric Gallager <egallager at gcc dot gnu.org> ---
(In reply to Martin Sebor from comment #4)
> In all cases and with -O1 and above, the uninitialized read is clearly
> visible in the IL but it's suppressed because the variable (such as x$x in
> case 1) has the TREE_NO_WARNING bit set. This appears to be regression
> introduced in GCC 4.5 in r147980.
>
> gcc -O1 -S -Wall -std=c++14 -fdump-tree-uninit=/dev/stdout pr89976.C
>
> ;; Function foo (_Z3foov, funcdef_no=3, decl_uid=2098, cgraph_uid=4,
> symbol_order=3)
>
> struct X foo ()
> {
> int x$x; <<< TREE_NO_WARNING == 1
> struct X D.2133;
>
> <bb 2> [local count: 1073741824]:
> D.2133.x = x$x_2(D); <<< uninitialized read
> D.2133.y = 0;
> return D.2133;
>
> }
>
>
>
> ;; Function main (main, funcdef_no=4, decl_uid=2129, cgraph_uid=5,
> symbol_order=4) (executed once)
>
> int main ()
> {
> int x$x; <<< TREE_NO_WARNING == 1
> struct X D.2156;
> struct X x;
>
> <bb 2> [local count: 1073741824]:
> x ={v} {CLOBBER};
> return x$x_5(D); <<< uninitialized read
>
> }
did your TREE_NO_WARNING overhaul affect this at all?
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/89976] [9/10/11/12 Regression] missing -Wuninitialized for struct member due to sra and TREE_NO_WARNING
[not found] <bug-89976-4@http.gcc.gnu.org/bugzilla/>
` (5 preceding siblings ...)
2021-06-26 15:17 ` egallager at gcc dot gnu.org
@ 2021-06-28 20:06 ` msebor at gcc dot gnu.org
2022-05-27 9:40 ` [Bug tree-optimization/89976] [10/11/12/13 " rguenth at gcc dot gnu.org
` (3 subsequent siblings)
10 siblings, 0 replies; 11+ messages in thread
From: msebor at gcc dot gnu.org @ 2021-06-28 20:06 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89976
--- Comment #7 from Martin Sebor <msebor at gcc dot gnu.org> ---
No, that change (r12-1804 and related) doesn't affect these cases (and wasn't
expected to).
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/89976] [10/11/12/13 Regression] missing -Wuninitialized for struct member due to sra and TREE_NO_WARNING
[not found] <bug-89976-4@http.gcc.gnu.org/bugzilla/>
` (6 preceding siblings ...)
2021-06-28 20:06 ` msebor at gcc dot gnu.org
@ 2022-05-27 9:40 ` rguenth at gcc dot gnu.org
2022-06-28 10:37 ` jakub at gcc dot gnu.org
` (2 subsequent siblings)
10 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-05-27 9:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89976
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|9.5 |10.4
--- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 9 branch is being closed
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/89976] [10/11/12/13 Regression] missing -Wuninitialized for struct member due to sra and TREE_NO_WARNING
[not found] <bug-89976-4@http.gcc.gnu.org/bugzilla/>
` (7 preceding siblings ...)
2022-05-27 9:40 ` [Bug tree-optimization/89976] [10/11/12/13 " rguenth at gcc dot gnu.org
@ 2022-06-28 10:37 ` jakub at gcc dot gnu.org
2023-07-07 10:35 ` [Bug tree-optimization/89976] [11/12/13/14 " rguenth at gcc dot gnu.org
2024-07-19 13:04 ` [Bug tree-optimization/89976] [12/13/14/15 " rguenth at gcc dot gnu.org
10 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-06-28 10:37 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89976
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|10.4 |10.5
--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 10.4 is being released, retargeting bugs to GCC 10.5.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/89976] [11/12/13/14 Regression] missing -Wuninitialized for struct member due to sra and TREE_NO_WARNING
[not found] <bug-89976-4@http.gcc.gnu.org/bugzilla/>
` (8 preceding siblings ...)
2022-06-28 10:37 ` jakub at gcc dot gnu.org
@ 2023-07-07 10:35 ` rguenth at gcc dot gnu.org
2024-07-19 13:04 ` [Bug tree-optimization/89976] [12/13/14/15 " rguenth at gcc dot gnu.org
10 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-07-07 10:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89976
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|10.5 |11.5
--- Comment #10 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 10 branch is being closed.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/89976] [12/13/14/15 Regression] missing -Wuninitialized for struct member due to sra and TREE_NO_WARNING
[not found] <bug-89976-4@http.gcc.gnu.org/bugzilla/>
` (9 preceding siblings ...)
2023-07-07 10:35 ` [Bug tree-optimization/89976] [11/12/13/14 " rguenth at gcc dot gnu.org
@ 2024-07-19 13:04 ` rguenth at gcc dot gnu.org
10 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-07-19 13:04 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89976
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|11.5 |12.5
--- Comment #11 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 11 branch is being closed.
^ permalink raw reply [flat|nested] 11+ messages in thread