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]

[tree-ssa mudflap] source coordinate fixes


Hi -

The patch below fixes a bug reported by a new mudflap user.
I'll commit a test case for it soon.

- FChE


+2003-07-16  Frank Ch. Eigler  <fche@redhat.com>
+
+	* tree-mudflap.c (mx_xfn_indirect_ref): Correct source locations
+	for tracked expressions by ignoring incidental decl source locii.

Index: tree-mudflap.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-mudflap.c,v
retrieving revision 1.1.2.49
diff -u -r1.1.2.49 tree-mudflap.c
--- tree-mudflap.c	15 Jul 2003 05:53:16 -0000	1.1.2.49
+++ tree-mudflap.c	16 Jul 2003 21:43:37 -0000
@@ -798,7 +798,8 @@
     last_lineno = (STMT_LINENO (*t) > 0 ? STMT_LINENO (*t) : last_lineno);
   if (TREE_CODE (*t) == FILE_STMT)
     last_filename = FILE_STMT_FILENAME (*t);
-  if (TREE_LOCUS (*t))
+  /* Try also the LOCUS, but ignore a simply referenced decl.  */
+  if (! DECL_P (*t) && TREE_LOCUS (*t)) 
     {
       last_filename = TREE_FILENAME (*t);
       last_lineno = (TREE_LINENO (*t) > 0 ? TREE_LINENO (*t) : last_lineno);


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