Print column information in RTL dumps

Message ID 2286405.mCSJHDhb4s@polaris
State New
Headers show
Series
  • Print column information in RTL dumps
Related show

Commit Message

Eric Botcazou Oct. 8, 2018, 10:51 p.m.
Now that -gcolum-info is the default, I think that it makes sense to print the 
column info in the RTL dumps to be able to find out where numbers come from.

Tested on x86_64-suse-linux, applied on the mainline.


2018-10-08  Eric Botcazou  <ebotcazou@adacore.com>

	* print-rtl.c (rtx_writer::print_rtx_operand_code_i): Print column
	information.


2018-10-08  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc.target/i386/vararg-loc.c: Accept a column number.

Patch

Index: print-rtl.c
===================================================================
--- print-rtl.c	(revision 264863)
+++ print-rtl.c	(working copy)
@@ -398,7 +398,8 @@  rtx_writer::print_rtx_operand_code_i (co
       if (INSN_HAS_LOCATION (in_insn))
 	{
 	  expanded_location xloc = insn_location (in_insn);
-	  fprintf (m_outfile, " \"%s\":%i", xloc.file, xloc.line);
+	  fprintf (m_outfile, " \"%s\":%i:%i", xloc.file, xloc.line,
+		   xloc.column);
 	}
 #endif
     }
Index: testsuite/gcc.target/i386/vararg-loc.c
===================================================================
--- testsuite/gcc.target/i386/vararg-loc.c	(revision 264863)
+++ testsuite/gcc.target/i386/vararg-loc.c	(working copy)
@@ -23,5 +23,5 @@  f (int a, ...)			/* 8.  */
 }
 
 /* { dg-final { scan-rtl-dump-not "vararg-loc\\.c.:\[6789\] " "final" } } */
-/* { dg-final { scan-rtl-dump "vararg-loc\\.c.:18 " "final" } } */
-/* { dg-final { scan-rtl-dump "vararg-loc\\.c.:20 " "final" } } */
+/* { dg-final { scan-rtl-dump "vararg-loc\\.c.:18:\[0-9\]+ " "final" } } */
+/* { dg-final { scan-rtl-dump "vararg-loc\\.c.:20:\[0-9\]+ " "final" } } */