aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/ada/ChangeLog5
-rw-r--r--gcc/ada/utils.c2
-rw-r--r--gcc/c-decl.c9
-rw-r--r--gcc/cgraphunit.c8
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/decl.c12
-rw-r--r--gcc/cp/semantics.c2
-rw-r--r--gcc/fortran/ChangeLog6
-rw-r--r--gcc/fortran/trans-decl.c4
-rw-r--r--gcc/integrate.c5
-rw-r--r--gcc/java/ChangeLog4
-rw-r--r--gcc/java/decl.c2
13 files changed, 64 insertions, 9 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 2af48d1..a6719d3 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@
+2004-07-25 Richard Henderson <rth@redhat.com>
+
+ * 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.
+
2004-07-24 Zack Weinberg <zack@codesourcery.com>
* config/ia64/ia64.c (general_xfmode_operand)
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 28445a8..651ff90 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,8 @@
+2004-07-25 Richard Henderson <rth@redhat.com>
+
+ * utils.c (create_subprog_decl): Set DECL_ARTIFICIAL and
+ DECL_IGNORED_P on RESULT_DECL.
+
2004-07-20 Olivier Hainque <hainque@act-europe.fr>
* a-elchha.adb (Last_Chance_Handler): Remove the bogus buffer dynamic
diff --git a/gcc/ada/utils.c b/gcc/ada/utils.c
index 3d525a0..e307def 100644
--- a/gcc/ada/utils.c
+++ b/gcc/ada/utils.c
@@ -1687,6 +1687,8 @@ create_subprog_decl (tree subprog_name, tree asm_name,
TREE_SIDE_EFFECTS (subprog_decl) = TYPE_VOLATILE (subprog_type);
DECL_ARGUMENTS (subprog_decl) = param_decl_list;
DECL_RESULT (subprog_decl) = build_decl (RESULT_DECL, 0, return_type);
+ DECL_ARTIFICIAL (DECL_RESULT (subprog_decl)) = 1;
+ DECL_IGNORED_P (DECL_RESULT (subprog_decl)) = 1;
if (inline_flag)
DECL_DECLARED_INLINE_P (subprog_decl) = 1;
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index 41e7df0..62a464e 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -5661,7 +5661,7 @@ int
start_function (tree declspecs, tree declarator, tree attributes)
{
tree decl1, old_decl;
- tree restype;
+ tree restype, resdecl;
current_function_returns_value = 0; /* Assume, until we see it does. */
current_function_returns_null = 0;
@@ -5857,8 +5857,11 @@ start_function (tree declspecs, tree declarator, tree attributes)
else
restype = integer_type_node;
}
- DECL_RESULT (current_function_decl)
- = build_decl (RESULT_DECL, NULL_TREE, restype);
+
+ resdecl = build_decl (RESULT_DECL, NULL_TREE, restype);
+ DECL_ARTIFICIAL (resdecl) = 1;
+ DECL_IGNORED_P (resdecl) = 1;
+ DECL_RESULT (current_function_decl) = resdecl;
start_fname_decls ();
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c
index 79d5553..2d962b8 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;
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 0d65bae..6512f4e 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,9 @@
+2004-07-25 Richard Henderson <rth@redhat.com>
+
+ * decl.c (start_preparsed_function): Set DECL_ARTIFICIAL and
+ DECL_IGNORED_P on RESULT_DECL.
+ * semantics.c (finalize_nrv): Copy them too.
+
2004-07-23 Nathan Sidwell <nathan@codesourcery.com>
* search.c (lookup_conversion_operator): Avoid two loops.
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index e39ceb1..64217cf 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -9689,10 +9689,14 @@ start_preparsed_function (tree decl1, tree attrs, int flags)
restype = type_promotes_to (restype);
if (DECL_RESULT (decl1) == NULL_TREE)
{
- DECL_RESULT (decl1)
- = build_decl (RESULT_DECL, 0, TYPE_MAIN_VARIANT (restype));
- c_apply_type_quals_to_decl (cp_type_quals (restype),
- DECL_RESULT (decl1));
+ tree resdecl;
+
+ resdecl = build_decl (RESULT_DECL, 0, TYPE_MAIN_VARIANT (restype));
+ DECL_ARTIFICIAL (resdecl) = 1;
+ DECL_IGNORED_P (resdecl) = 1;
+ DECL_RESULT (decl1) = resdecl;
+
+ c_apply_type_quals_to_decl (cp_type_quals (restype), resdecl);
}
/* Initialize RTL machinery. We cannot do this until
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index 3d8c643..f6f7175 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -3050,6 +3050,8 @@ finalize_nrv (tree *tp, tree var, tree result)
/* Copy debugging information from VAR to RESULT. */
DECL_NAME (result) = DECL_NAME (var);
+ DECL_ARTIFICIAL (result) = DECL_ARTIFICIAL (var);
+ DECL_IGNORED_P (result) = DECL_IGNORED_P (var);
DECL_SOURCE_LOCATION (result) = DECL_SOURCE_LOCATION (var);
DECL_ABSTRACT_ORIGIN (result) = DECL_ABSTRACT_ORIGIN (var);
/* Don't forget that we take its address. */
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 01cedd8..1e0d825 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,9 @@
+2004-07-25 Richard Henderson <rth@redhat.com>
+
+ * trans-decl.c (gfc_build_function_decl): Set DECL_ARTIFICIAL
+ and DECL_IGNORED_P on RESULT_DECL.
+ (gfc_generate_constructors): Likewise.
+
2004-07-18 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
PR fortran/16465
diff --git a/gcc/fortran/trans-decl.c b/gcc/fortran/trans-decl.c
index 655c48b..7883bde 100644
--- a/gcc/fortran/trans-decl.c
+++ b/gcc/fortran/trans-decl.c
@@ -1030,6 +1030,8 @@ gfc_build_function_decl (gfc_symbol * sym)
}
result_decl = build_decl (RESULT_DECL, result_decl, type);
+ DECL_ARTIFICIAL (result_decl) = 1;
+ DECL_IGNORED_P (result_decl) = 1;
DECL_CONTEXT (result_decl) = fndecl;
DECL_RESULT (fndecl) = result_decl;
@@ -2124,6 +2126,8 @@ gfc_generate_constructors (void)
TREE_PUBLIC (fndecl) = 1;
decl = build_decl (RESULT_DECL, NULL_TREE, void_type_node);
+ DECL_ARTIFICIAL (decl) = 1;
+ DECL_IGNORED_P (decl) = 1;
DECL_CONTEXT (decl) = fndecl;
DECL_RESULT (fndecl) = decl;
diff --git a/gcc/integrate.c b/gcc/integrate.c
index 2fa5164..d9e66f3 100644
--- a/gcc/integrate.c
+++ b/gcc/integrate.c
@@ -141,6 +141,11 @@ copy_decl_for_inlining (tree decl, tree from_fn, tree to_fn)
}
}
+ /* Don't generate debug information for the copy if we wouldn't have
+ generated it for the copy either. */
+ DECL_ARTIFICIAL (copy) = DECL_ARTIFICIAL (decl);
+ DECL_IGNORED_P (copy) = DECL_IGNORED_P (decl);
+
/* Set the DECL_ABSTRACT_ORIGIN so the debugging routines know what
declaration inspired this copy. */
DECL_ABSTRACT_ORIGIN (copy) = DECL_ORIGIN (decl);
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index dc1ae7e..b8e6eec 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -1,3 +1,7 @@
+2004-07-25 Richard Henderson <rth@redhat.com>
+
+ * decl.c (build_result_decl): Set DECL_ARTIFICIAL and DECL_IGNORED_P.
+
2004-07-23 Mike Stump <mrs@apple.com>
* boehm.c (set_bit): Improve type safety wrt unsignedness.
diff --git a/gcc/java/decl.c b/gcc/java/decl.c
index 33708bd..c61d426 100644
--- a/gcc/java/decl.c
+++ b/gcc/java/decl.c
@@ -1804,6 +1804,8 @@ build_result_decl (tree fndecl)
&& TYPE_PRECISION (restype) < TYPE_PRECISION (integer_type_node))
restype = integer_type_node;
result = build_decl (RESULT_DECL, NULL_TREE, restype);
+ DECL_ARTIFICIAL (result) = 1;
+ DECL_IGNORED_P (result) = 1;
DECL_CONTEXT (result) = fndecl;
DECL_RESULT (fndecl) = result;
}