Summary: | patch to improve Wuninitialized | ||
---|---|---|---|
Product: | gcc | Reporter: | davidxl <xinliangli> |
Component: | middle-end | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | enhancement | CC: | gcc-bugs, manu |
Priority: | P3 | Keywords: | diagnostic, missed-optimization, patch |
Version: | 4.4.3 | ||
Target Milestone: | 4.6.0 | ||
Host: | Target: | ||
Build: | Known to work: | ||
Known to fail: | Last reconfirmed: | 2009-11-06 10:01:05 | |
Bug Depends on: | |||
Bug Blocks: | 24639, 41998 | ||
Attachments: | proposed patch |
Description
davidxl
2009-11-05 18:17:01 UTC
Created attachment 18975 [details]
proposed patch
Bootstrapped and regression tested on x86-64 linux with gcc 4.5
Patches should go to gcc-patches, you need to add the testcase and you should use auto_var_in_fn_p instead of !is_global_var. (In reply to comment #2) > Patches should go to gcc-patches, you need to add the testcase and you > should use auto_var_in_fn_p instead of !is_global_var. > auto_var_in_fn_p uses DECL_CONTEXT --- is it guaranteed to always point to the enclosing functions even for inner block scoped locals (it seems so now). David Yes, the predicate is implemented correctly. Fixed by revision 158567: http://gcc.gnu.org/ml/gcc-cvs/2010-04/msg00673.html |