summaryrefslogtreecommitdiffstats
path: root/gcc/cgraphunit.c
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2004-07-25 08:10:28 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2004-07-25 08:10:28 +0000
commit540edea7db8adb1cf64f022750998ec3fe4181a2 (patch)
treeb78bcdd05d614d85d427a31d73cab2c711cc5ccd /gcc/cgraphunit.c
parentcc14bb756e1a00e2aed81cec8e89725c3a4fe700 (diff)
downloadppe42-gcc-540edea7db8adb1cf64f022750998ec3fe4181a2.tar.gz
ppe42-gcc-540edea7db8adb1cf64f022750998ec3fe4181a2.zip
* c-decl.c (start_function): Set DECL_ARTIFICIAL and DECL_IGNORED_P
on the RESULT_DECL. * cgraphunit.c (cgraph_build_static_cdtor): Likewise. * integrate.c (copy_decl_for_inlining): Copy DECL_ARTIFICIAL and DECL_IGNORED_P to new decl. ada/ * utils.c (create_subprog_decl): Set DECL_ARTIFICIAL and DECL_IGNORED_P on RESULT_DECL. cp/ * decl.c (start_preparsed_function): Set DECL_ARTIFICIAL and DECL_IGNORED_P on RESULT_DECL. * semantics.c (finalize_nrv): Copy them too. fortran/ * trans-decl.c (gfc_build_function_decl): Set DECL_ARTIFICIAL and DECL_IGNORED_P on RESULT_DECL. (gfc_generate_constructors): Likewise. java/ * decl.c (build_result_decl): Set DECL_ARTIFICIAL and DECL_IGNORED_P. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@85145 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cgraphunit.c')
-rw-r--r--gcc/cgraphunit.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c
index 79d5553aa9c..2d962b8c839 100644
--- a/gcc/cgraphunit.c
+++ b/gcc/cgraphunit.c
@@ -1796,7 +1796,7 @@ cgraph_build_static_cdtor (char which, tree body, int priority)
{
static int counter = 0;
char which_buf[16];
- tree decl, name;
+ tree decl, name, resdecl;
sprintf (which_buf, "%c_%d", which, counter++);
name = get_file_function_name_long (which_buf);
@@ -1805,7 +1805,11 @@ cgraph_build_static_cdtor (char which, tree body, int priority)
build_function_type (void_type_node, void_list_node));
current_function_decl = decl;
- DECL_RESULT (decl) = build_decl (RESULT_DECL, NULL_TREE, void_type_node);
+ resdecl = build_decl (RESULT_DECL, NULL_TREE, void_type_node);
+ DECL_ARTIFICIAL (resdecl) = 1;
+ DECL_IGNORED_P (resdecl) = 1;
+ DECL_RESULT (decl) = resdecl;
+
allocate_struct_function (decl);
TREE_STATIC (decl) = 1;
OpenPOWER on IntegriCloud