This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] PR79854 - diagnostics: gfc_conv_constant_to_tree should be gfc_internal_error


Is the following patch OK for the trunk?

TIA

Dominique

2018-06-10  Dominique d'Humieres  <dominiq@gcc.gnu.org>

        PR fortran/79854
        * trans-const.c: Remove include "diagnostic-core.h"
        (gfc_conv_constant_to_tree): Replace fatal_error with gcc_unreachable.

--- ../_clean/gcc/fortran/trans-const.c	2018-02-23 15:17:14.000000000 +0100
+++ gcc/fortran/trans-const.c	2018-06-07 15:49:38.000000000 +0200
@@ -26,7 +26,6 @@ along with GCC; see the file COPYING3.  
 #include "tree.h"
 #include "gfortran.h"
 #include "trans.h"
-#include "diagnostic-core.h"	/* For fatal_error.  */
 #include "fold-const.h"
 #include "stor-layout.h"
 #include "realmpfr.h"
@@ -368,9 +367,7 @@ gfc_conv_constant_to_tree (gfc_expr * ex
 				     expr->representation.string);
 
     default:
-      fatal_error (input_location,
-		   "gfc_conv_constant_to_tree(): invalid type: %s",
-		   gfc_typename (&expr->ts));
+      gcc_unreachable ();
     }
 }
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]