diff options
author | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2008-09-15 20:26:02 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2008-09-15 20:26:02 +0000 |
commit | 6a7a3f311b79f95e4a8bb19ffae268d4b5e6f565 (patch) | |
tree | aae1c709e604aed48889542448c0b594333d3105 /gcc | |
parent | 084b6c9955238fa5596f813574801a51a1b24380 (diff) | |
download | gcc-6a7a3f311b79f95e4a8bb19ffae268d4b5e6f565.zip gcc-6a7a3f311b79f95e4a8bb19ffae268d4b5e6f565.tar.gz gcc-6a7a3f311b79f95e4a8bb19ffae268d4b5e6f565.tar.bz2 |
trans.c (gigi): Declare the name of the compilation unit as the first global name.
* gcc-interface/trans.c (gigi): Declare the name of the compilation
unit as the first global name.
From-SVN: r140373
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/ada/gcc-interface/trans.c | 9 |
2 files changed, 14 insertions, 2 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index e96313a3..508684e 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,6 +1,11 @@ +2008-09-15 Eric Botcazou <ebotcazou@adacore.com> + + * gcc-interface/trans.c (gigi): Declare the name of the compilation + unit as the first global name. + 2008-09-14 Jan Hubicka <jh@suse.cz> - * gcc-interface/Make-lang.in (gnac1): Add CFLAGS. + * gcc-interface/Make-lang.in (gnat1): Add CFLAGS. 2008-09-14 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> diff --git a/gcc/ada/gcc-interface/trans.c b/gcc/ada/gcc-interface/trans.c index f8265cc..938408b 100644 --- a/gcc/ada/gcc-interface/trans.c +++ b/gcc/ada/gcc-interface/trans.c @@ -387,10 +387,17 @@ gigi (Node_Id gnat_root, int max_gnat_node, int number_name, gnat_init_gcc_eh (); gcc_assert (Nkind (gnat_root) == N_Compilation_Unit); + + /* Declare the name of the compilation unit as the first global + name in order to make the middle-end fully deterministic. */ + t = create_concat_name (Defining_Entity (Unit (gnat_root)), NULL); + first_global_object_name = ggc_strdup (IDENTIFIER_POINTER (t)); + + /* Now translate the compilation unit proper. */ start_stmt_group (); Compilation_Unit_to_gnu (gnat_root); - /* Now see if we have any elaboration procedures to deal with. */ + /* Finally see if we have any elaboration procedures to deal with. */ for (info = elab_info_list; info; info = info->next) { tree gnu_body = DECL_SAVED_TREE (info->elab_proc); |