aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2009-10-21 10:11:33 +0000
committerEric Botcazou <ebotcazou@adacore.com>2009-10-21 10:11:33 +0000
commit5217b6929f00ee86f1bfbf07736a3f484cd310b6 (patch)
treeb11b06dd03324cadcbf6236df9d5262732b5ca8c
parent7b5ddc595bf633dbc02e982d6dcc604c0fade2b0 (diff)
* gcc-interfaces/utils.c (create_subprog_decl): Do not redefine
main_identifier_node. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@153052 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ada/ChangeLog5
-rw-r--r--gcc/ada/gcc-interface/utils.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 83ed69e98b1..6fef8cc453a 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,8 @@
+2009-10-21 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc-interfaces/utils.c (create_subprog_decl): Do not redefine
+ main_identifier_node.
+
2009-10-17 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/utils.c (convert): When converting to a padded type
diff --git a/gcc/ada/gcc-interface/utils.c b/gcc/ada/gcc-interface/utils.c
index a8225b0b30a..b1e2e588347 100644
--- a/gcc/ada/gcc-interface/utils.c
+++ b/gcc/ada/gcc-interface/utils.c
@@ -1866,9 +1866,9 @@ create_subprog_decl (tree subprog_name, tree asm_name,
to be declared as the "main" function literally by default. Ada
program entry points are typically declared with a different name
within the binder generated file, exported as 'main' to satisfy the
- system expectations. Redirect main_identifier_node in this case. */
+ system expectations. Force main_identifier_node in this case. */
if (asm_name == main_identifier_node)
- main_identifier_node = DECL_NAME (subprog_decl);
+ DECL_NAME (subprog_decl) = main_identifier_node;
}
process_attributes (subprog_decl, attr_list);