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: [RFA] Fix PR debug/42767


On 01/17/2010 05:53 PM, Richard Guenther wrote:
On Sun, Jan 17, 2010 at 4:45 AM, Jie Zhang<jie.zhang@analog.com> wrote:
This patch fixes PR debug/42767. I found this bug when building BFD for
bfin-uclinux host. Bootstrapped and regression tested on native x86_64. Also
the test case has been verified for bfin-uclinux target. Is it OK?

Ok if you move the testcase to gcc.dg/debug/ and drop the { target bfin-*-* } restriction.

Thanks! This is what I committed. I also updated the Copyright year of dwarf2out.c.


Jie
	PR debug/42767
	* dwarf2out.c (mem_loc_descriptor): Handle SS_TRUNCATE
	and US_TRUNCATE.

	testsuite/
	PR debug/42767
	* gcc.dg/debug/pr42767.c: New.

Index: testsuite/gcc.dg/debug/pr42767.c
===================================================================
--- testsuite/gcc.dg/debug/pr42767.c	(revision 0)
+++ testsuite/gcc.dg/debug/pr42767.c	(revision 0)
@@ -0,0 +1,18 @@
+/* PR debug/42767 */
+/* { dg-do compile } */
+/* { dg-options "-O1 -g" } */
+
+struct lineno_cache_entry
+{
+  unsigned long size;
+};
+_bfd_link_section_stabs (struct lineno_cache_entry * stabsec)
+{
+  unsigned long count;
+  unsigned char *sym;
+  unsigned char *symend;
+  unsigned long skip;
+  count = stabsec->size / 12;
+  for (; sym < symend; sym += 1);
+  stabsec->size = (count - skip) * 12;
+}
Index: dwarf2out.c
===================================================================
--- dwarf2out.c	(revision 155931)
+++ dwarf2out.c	(working copy)
@@ -13438,6 +13438,8 @@ mem_loc_descriptor (rtx rtl, enum machin
       /* In theory, we could implement the above.  */
       /* DWARF cannot represent the unsigned compare operations
 	 natively.  */
+    case SS_TRUNCATE:
+    case US_TRUNCATE:
     case SS_MULT:
     case US_MULT:
     case SS_DIV:

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