nvptx mkoffload: Initialize GCC diagnostic machinery before using it.
authorThomas Schwinge <thomas@codesourcery.com>
Wed, 11 Feb 2015 14:15:47 +0000 (15:15 +0100)
committerThomas Schwinge <tschwinge@gcc.gnu.org>
Wed, 11 Feb 2015 14:15:47 +0000 (15:15 +0100)
gcc/
* config/nvptx/mkoffload.c: Include "diagnostic.h" instead of
"diagnostic-core.h".
(main): Initialize progname, and call diagnostic_initialize.

From-SVN: r220621

gcc/ChangeLog
gcc/config/nvptx/mkoffload.c

index bc4a050c1053feca41ba4e050398ed730eaf59ad..482b12876daceba24001bbcfb5ea4a57d386aa37 100644 (file)
@@ -1,5 +1,9 @@
 2015-02-11  Thomas Schwinge  <thomas@codesourcery.com>
 
+       * config/nvptx/mkoffload.c: Include "diagnostic.h" instead of
+       "diagnostic-core.h".
+       (main): Initialize progname, and call diagnostic_initialize.
+
        * config/nvptx/mkoffload.c (process): Refer to __OFFLOAD_TABLE__
        instead of __OPENMP_TARGET__.
 
index 2287316c33d2c27b628db4bb2454f76a6e49cabe..739aee8af85a7a46a5343969e01ba88b4b6310b1 100644 (file)
@@ -33,7 +33,7 @@
 #include "intl.h"
 #include <libgen.h>
 #include "obstack.h"
-#include "diagnostic-core.h"
+#include "diagnostic.h"
 #include "collect-utils.h"
 #include "gomp-constants.h"
 
@@ -828,6 +828,9 @@ main (int argc, char **argv)
   FILE *out = stdout;
   const char *outname = 0;
 
+  progname = "mkoffload";
+  diagnostic_initialize (global_dc, 0);
+
   char *collect_gcc = getenv ("COLLECT_GCC");
   if (collect_gcc == NULL)
     fatal_error (input_location, "COLLECT_GCC must be set.");