aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2011-12-11 09:43:46 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2011-12-11 09:43:46 +0000
commit52e04e563587ababa0af581de4950b67efebf70f (patch)
treef59a5067095437fde97bc479df640af61dd45781 /gcc
parente7bb3661e1be7e342d8018b65be95d1b78e1b1ce (diff)
downloadgcc-52e04e563587ababa0af581de4950b67efebf70f.zip
gcc-52e04e563587ababa0af581de4950b67efebf70f.tar.gz
gcc-52e04e563587ababa0af581de4950b67efebf70f.tar.bz2
* gcc-interface/trans.c (gigi): Initialize the linemap earlier.
From-SVN: r182199
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ada/ChangeLog4
-rw-r--r--gcc/ada/gcc-interface/trans.c14
2 files changed, 11 insertions, 7 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 94875ab..495dbf4 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,7 @@
+2011-12-11 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc-interface/trans.c (gigi): Initialize the linemap earlier.
+
2011-12-06 Dave Korn <dave.korn.cygwin@gmail.com>
* gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS [windows targets]):
diff --git a/gcc/ada/gcc-interface/trans.c b/gcc/ada/gcc-interface/trans.c
index 42b4e91..da1a8f1 100644
--- a/gcc/ada/gcc-interface/trans.c
+++ b/gcc/ada/gcc-interface/trans.c
@@ -297,13 +297,6 @@ gigi (Node_Id gnat_root, int max_gnat_node, int number_name ATTRIBUTE_UNUSED,
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_file; i++)
{
/* Use the identifier table to make a permanent copy of the filename as
@@ -328,6 +321,13 @@ gigi (Node_Id gnat_root, int max_gnat_node, int number_name ATTRIBUTE_UNUSED,
linemap_add (line_table, LC_LEAVE, 0, NULL, 0);
}
+ 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));
+
/* Initialize ourselves. */
init_code_table ();
init_gnat_to_gnu ();