re PR debug/43521 (java: "this" pointer not marked with DW_AT_artificial)
authorJakub Jelinek <jakub@redhat.com>
Thu, 20 May 2010 17:00:32 +0000 (19:00 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 20 May 2010 17:00:32 +0000 (19:00 +0200)
PR debug/43521
* decl.c (start_java_method): Set DECL_ARTIFICIAL on the 'this'
PARM_DECL.

From-SVN: r159635

gcc/java/ChangeLog
gcc/java/decl.c

index 9a68dcdae893c917b9bb45ec300d5cc4be4feed1..48c66fc35ba8384223b9816799f86c49f1c6d2f8 100644 (file)
@@ -1,3 +1,9 @@
+2010-05-20  Jakub Jelinek  <jakub@redhat.com>
+
+       PR debug/43521
+       * decl.c (start_java_method): Set DECL_ARTIFICIAL on the 'this'
+       PARM_DECL.
+
 2010-05-19  Anatoly Sokolov  <aesok@post.ru>
 
        * jcf-parse.c (get_constant): Use double_int_to_tree instead of
index 4cd4d9668dc77e484361c8fc4fdf47afa77b5d98..e1c7fa4f7c94fd6536f8e4751172fb3f4fd2d9e1 100644 (file)
@@ -1,7 +1,7 @@
 /* Process declarations and variables for the GNU compiler for the
    Java(TM) language.
    Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2007,
-   2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+   2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -1857,6 +1857,10 @@ start_java_method (tree fndecl)
       /* Add parm_decl to the decl_map. */
       push_jvm_slot (i, parm_decl);
 
+      /* The this parameter of methods is artificial.  */
+      if (TREE_CODE (TREE_TYPE (fndecl)) == METHOD_TYPE && i == 0)
+       DECL_ARTIFICIAL (parm_decl) = 1;
+
       type_map[i] = TREE_TYPE (parm_decl);
       if (TYPE_IS_WIDE (TREE_TYPE (parm_decl)))
        {