From: jakub Date: Thu, 20 May 2010 17:00:32 +0000 (+0000) Subject: PR debug/43521 X-Git-Url: http://git.sourceforge.jp/view?p=pf3gnuchains%2Fgcc-fork.git;a=commitdiff_plain;h=00075d55ff85ed08b77a41f58c3b3b2346b6c64d;hp=20f8d64b13a3e10f2dd713a085cd9d4a1ecbfaec PR debug/43521 * decl.c (start_java_method): Set DECL_ARTIFICIAL on the 'this' PARM_DECL. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159635 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index 9a68dcdae89..48c66fc35ba 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,9 @@ +2010-05-20 Jakub Jelinek + + PR debug/43521 + * decl.c (start_java_method): Set DECL_ARTIFICIAL on the 'this' + PARM_DECL. + 2010-05-19 Anatoly Sokolov * jcf-parse.c (get_constant): Use double_int_to_tree instead of diff --git a/gcc/java/decl.c b/gcc/java/decl.c index 4cd4d9668dc..e1c7fa4f7c9 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))) {