aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorIlya Tocar <ilya.tocar@intel.com>2014-11-19 11:48:48 +0000
committerIlya Tocar <tocarip@gcc.gnu.org>2014-11-19 14:48:48 +0300
commit877088b7659964d58bf9474519d8b637623e75a0 (patch)
tree09e0f66f4096b4ad121cd17382c88bca1391a13b /gcc
parent59392f46489fe395993a1c85da29167fbe670d36 (diff)
downloadgcc-877088b7659964d58bf9474519d8b637623e75a0.zip
gcc-877088b7659964d58bf9474519d8b637623e75a0.tar.gz
gcc-877088b7659964d58bf9474519d8b637623e75a0.tar.bz2
collect2.c (main): Don't call fatal_error before diagnostic_initialize.
gcc/ 2014-11-19 Ilya Tocar <ilya.tocar@intel.com> * collect2.c (main): Don't call fatal_error before diagnostic_initialize. * lto-wrapper.c (main): Likewise. From-SVN: r217765
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/collect2.c6
-rw-r--r--gcc/lto-wrapper.c6
3 files changed, 12 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 9169e35..a4953e9 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2014-11-19 Ilya Tocar <ilya.tocar@intel.com>
+
+ * collect2.c (main): Don't call fatal_error before
+ diagnostic_initialize.
+ * lto-wrapper.c (main): Likewise.
+
2014-11-19 Tom de Vries <tom@codesourcery.com>
PR tree-optimization/62167
diff --git a/gcc/collect2.c b/gcc/collect2.c
index 7c067ff..9c3a1c5 100644
--- a/gcc/collect2.c
+++ b/gcc/collect2.c
@@ -955,9 +955,6 @@ main (int argc, char **argv)
signal (SIGCHLD, SIG_DFL);
#endif
- if (atexit (collect_atexit) != 0)
- fatal_error ("atexit failed");
-
/* Unlock the stdio streams. */
unlock_std_streams ();
@@ -965,6 +962,9 @@ main (int argc, char **argv)
diagnostic_initialize (global_dc, 0);
+ if (atexit (collect_atexit) != 0)
+ fatal_error ("atexit failed");
+
/* Do not invoke xcalloc before this point, since locale needs to be
set first, in case a diagnostic is issued. */
diff --git a/gcc/lto-wrapper.c b/gcc/lto-wrapper.c
index 951a2dd..6b41782 100644
--- a/gcc/lto-wrapper.c
+++ b/gcc/lto-wrapper.c
@@ -1314,13 +1314,13 @@ main (int argc, char *argv[])
xmalloc_set_program_name (progname);
- if (atexit (lto_wrapper_cleanup) != 0)
- fatal_error ("atexit failed");
-
gcc_init_libintl ();
diagnostic_initialize (global_dc, 0);
+ if (atexit (lto_wrapper_cleanup) != 0)
+ fatal_error ("atexit failed");
+
if (signal (SIGINT, SIG_IGN) != SIG_IGN)
signal (SIGINT, fatal_signal);
#ifdef SIGHUP