This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[committed] Fix inverted test in get_lineno
- From: Cary Coutant <ccoutant at google dot com>
- To: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 17 Apr 2009 16:53:07 -0700
- Subject: [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);