aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/decl.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2010-05-20 19:00:32 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2010-05-20 19:00:32 +0200
commit8961e01e953ce0ea2f91572bb3bd1d5ee0d82044 (patch)
treebfdafd6e9ed78b2d345a8b55799d14cc4d6b6f90 /gcc/java/decl.c
parent69b45d71f3e8be9fc0d8aeffa4f9113fc78121d7 (diff)
downloadgcc-8961e01e953ce0ea2f91572bb3bd1d5ee0d82044.zip
gcc-8961e01e953ce0ea2f91572bb3bd1d5ee0d82044.tar.gz
gcc-8961e01e953ce0ea2f91572bb3bd1d5ee0d82044.tar.bz2
re PR debug/43521 (java: "this" pointer not marked with DW_AT_artificial)
PR debug/43521 * decl.c (start_java_method): Set DECL_ARTIFICIAL on the 'this' PARM_DECL. From-SVN: r159635
Diffstat (limited to 'gcc/java/decl.c')
-rw-r--r--gcc/java/decl.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/java/decl.c b/gcc/java/decl.c
index 4cd4d96..e1c7fa4 100644
--- a/gcc/java/decl.c
+++ b/gcc/java/decl.c
@@ -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)))
{