This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/43347] Warning about symbols generated by SRA being used uninitialized



------- Comment #3 from rguenth at gcc dot gnu dot org  2010-03-12 14:12 -------
I suppose %qD expansion in diagnostics should check DECL_DEBUG_EXPR_IS_FROM
and instead should show DECL_DEBUG_EXPR.

Sth like

Index: trunk/gcc/tree-ssa.c
===================================================================
--- trunk.orig/gcc/tree-ssa.c   2010-03-12 15:12:15.000000000 +0100
+++ trunk/gcc/tree-ssa.c        2010-03-12 15:10:52.000000000 +0100
@@ -1643,6 +1643,10 @@ warn_uninit (tree t, const char *gmsgid,
   if (!ssa_undefined_value_p (t))
     return;

+  if (TREE_CODE (var) == VAR_DECL
+      && DECL_DEBUG_EXPR_IS_FROM (var))
+    var = DECL_DEBUG_EXPR (var);
+
   /* TREE_NO_WARNING either means we already warned, or the front end
      wishes to suppress the warning.  */
   if (TREE_NO_WARNING (var))


might fix it local in uninitialized warnings


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43347


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]