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]

Re: [PATCH] Improve debugging info (PR debug/53948 P1 regression)


On 02/08/2013 10:55 AM, Jakub Jelinek wrote:
On Fri, Feb 08, 2013 at 09:54:19AM -0700, Jeff Law wrote:
	PR debug/53948
	* emit-rtl.c (reg_is_parm_p): New function.
	* regs.h (reg_is_parm_p): New prototype.
	* ira-conflicts.c (ira_build_conflicts): Allow parameters in
	callee-clobbered registers.

This looks good to me.


* gcc.dg/debug/dwarf2/pr53948.c: New test.

But the testcase is problematic.


--- /dev/null
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/pr53948.c
@@ -0,0 +1,10 @@
+/* Test that we emit a .line directive for the line
+   with local variable initializations.  */
+/* { dg-options "-O0 -g" } */
+/* { dg-final { scan-assembler ".loc 1 8 0" } } */

It will fail on any target which doesn't support .loc directives. I'd say better would be to scan the -fdump-rtl-final for pr53948.c:8 regex.
How about this:


/* Test that we have line information for the line with local variable initializations. */ /* { dg-options "-O0 -g -fdump-rtl-final" } */ /* { dg-final { scan-rtl-dump "pr53948.c:7" "final" } } */

int f (register int a, register int b) {
  register int x = b, y = a;
  return x + y; }

Jeff


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