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 c++/14329] [tree-ssa] badly formatted warnings for SRA replacements used uninitialized



------- Comment #17 from pinskia at gcc dot gnu dot org  2006-11-27 06:41 -------
Here is the patch which passes the C++ testsuite, I have to do a full
bootstrap/testsuite run still but I am happy with it currrently which is why I
am pasting it here:
Index: error.c
===================================================================
--- error.c     (revision 119217)
+++ error.c     (working copy)
@@ -2337,7 +2337,22 @@ cp_printer (pretty_printer *pp, text_inf
     {
     case 'A': result = args_to_string (next_tree, verbose);    break;
     case 'C': result = code_to_string (next_tcode);            break;
-    case 'D': result = decl_to_string (next_tree, verbose);    break;
+    case 'D':
+      {
+       tree temp = next_tree;
+       if (DECL_P (temp)
+           && DECL_DEBUG_EXPR_IS_FROM (temp) && DECL_DEBUG_EXPR (temp))
+         {
+           temp = DECL_DEBUG_EXPR (temp);
+           if (!DECL_P (temp))
+             {
+               result = expr_to_string (temp);
+               break;
+             }
+         }
+       result = decl_to_string (temp, verbose);
+      }
+      break;
     case 'E': result = expr_to_string (next_tree);             break;
     case 'F': result = fndecl_to_string (next_tree, verbose);  break;
     case 'L': result = language_to_string (next_lang);         break;


-- 


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


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