diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2009-04-20 11:01:49 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2009-04-20 11:01:49 +0000 |
commit | ecc3905a2df096b31501be93eb527c826fbe1219 (patch) | |
tree | 8cee2fd99e7bc40a620fd54d6829e4ce3d5c95e6 /gcc | |
parent | 34d01e1d17222f8a4a6f01f9ad1055d0c001ce6a (diff) | |
download | gcc-ecc3905a2df096b31501be93eb527c826fbe1219.zip gcc-ecc3905a2df096b31501be93eb527c826fbe1219.tar.gz gcc-ecc3905a2df096b31501be93eb527c826fbe1219.tar.bz2 |
trans.c (gigi): Declare the name of the compilation unit as the first global name at the very...
* gcc-interface/trans.c (gigi): Declare the name of the compilation
unit as the first global name at the very beginning.
From-SVN: r146398
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/ada/gcc-interface/trans.c | 14 |
2 files changed, 12 insertions, 7 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index fdadb95..7cb1437 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2009-04-20 Eric Botcazou <ebotcazou@adacore.com> + + * gcc-interface/trans.c (gigi): Declare the name of the compilation + unit as the first global name at the very beginning. + 2009-04-20 Thomas Quinot <quinot@adacore.com> * socket.c, g-socthi-vms.adb, g-socthi-vms.ads, g-socthi-vxworks.ads, diff --git a/gcc/ada/gcc-interface/trans.c b/gcc/ada/gcc-interface/trans.c index 0b46b56..d28646d 100644 --- a/gcc/ada/gcc-interface/trans.c +++ b/gcc/ada/gcc-interface/trans.c @@ -267,6 +267,13 @@ gigi (Node_Id gnat_root, int max_gnat_node, int number_name, type_annotate_only = (gigi_operating_mode == 1); + 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)); + for (i = 0; i < number_files; i++) { /* Use the identifier table to make a permanent copy of the filename as @@ -619,13 +626,6 @@ gigi (Node_Id gnat_root, int max_gnat_node, int number_name, if (Exception_Mechanism == Back_End_Exceptions) 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); |