This is the mail archive of the gcc-patches@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]

[committed] Fix inverted test in get_lineno


This is about as trivial and obvious as it gets. I noticed this while
trying to use -fdump-tree-all-blocks-lineno dumps to debug another
problem. Without this fix, gimple_pretty_print just prints "starting
at line 0" when there is no line number, and prints nothing when there
is a line number. With the fix, the dump files look good.

-cary


        * tree-flow-inline.h (get_lineno): Fix inverted test.


Index: tree-flow-inline.h
===================================================================
--- tree-flow-inline.h	(revision 144979)
+++ tree-flow-inline.h	(working copy)
@@ -282,7 +282,7 @@ get_lineno (const_gimple stmt)
     return -1;

   loc = gimple_location (stmt);
-  if (loc != UNKNOWN_LOCATION)
+  if (loc == UNKNOWN_LOCATION)
     return -1;

   return LOCATION_LINE (loc);


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