This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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] Clean up some include files


Hi,

This removes a bunch of #includes of middle-end files, or explains why
I could not remove them.

Bootstrapped&tested on x86_64-unknown-linux-gnu.  OK?

Ciao!
Steven


	* trans-expr.c: Do not include convert.h, ggc.h, real.h, and gimple.h.
	(gfc_conv_string_tmp): Do not assert type comparibilty.
	*  trans-array.c: Do not include gimple.h, ggc.h, and real.h.
	(gfc_conv_expr_descriptor): Remove assert.
	* trans-common.c: Clarify why rtl.h and tm.h are included.
	* trans-openmp.c: Do not include ggc.h and real.h.
	Explain why gimple.h is included.
	* trans-const.c: Do not include ggc.h.
	* trans-stmt.c: Do not include gimple.h, ggc.h, and real.h.
	* trans.c: Do not include ggc.h and real.h.
	Explain why gimple.h is included.
	* trans-types.c: Do not include tm.h.  Explain why langhooks.h
	and dwarf2out.h are included.
	* trans-io.c: Do not include gimple.h and real.h.
	* trans-decl.c: Explain why gimple.h, tm.h, and rtl.h are included.
	* trans-intrinsic.c: Do not include gimple.h.  Explain why tm.h
	is included.

Index: trans-expr.c
===================================================================
--- trans-expr.c	(revision 159624)
+++ trans-expr.c	(working copy)
@@ -26,11 +26,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "system.h"
 #include "coretypes.h"
 #include "tree.h"
-#include "convert.h"
-#include "ggc.h"
 #include "toplev.h"
-#include "real.h"
-#include "gimple.h"
 #include "langhooks.h"
 #include "flags.h"
 #include "gfortran.h"
@@ -1115,8 +1111,6 @@ gfc_conv_string_tmp (gfc_se * se, tree type, tree
   tree var;
   tree tmp;

-  gcc_assert (types_compatible_p (TREE_TYPE (len), gfc_charlen_type_node));
-
   if (gfc_can_put_var_on_stack (len))
     {
       /* Create a temporary variable to hold the result.  */
Index: trans-array.c
===================================================================
--- trans-array.c	(revision 159624)
+++ trans-array.c	(working copy)
@@ -80,10 +80,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "system.h"
 #include "coretypes.h"
 #include "tree.h"
-#include "gimple.h"
-#include "ggc.h"
 #include "toplev.h"
-#include "real.h"
 #include "flags.h"
 #include "gfortran.h"
 #include "constructor.h"
@@ -5268,8 +5265,6 @@ gfc_conv_expr_descriptor (gfc_se * se, gfc_expr *
       gfc_trans_scalarizing_loops (&loop, &block);

       desc = loop.temp_ss->data.info.descriptor;
-
-      gcc_assert (is_gimple_lvalue (desc));
     }
   else if (expr->expr_type == EXPR_FUNCTION)
     {
Index: trans-common.c
===================================================================
--- trans-common.c	(revision 159624)
+++ trans-common.c	(working copy)
@@ -99,8 +99,8 @@ along with GCC; see the file COPYING3.  If not see
 #include "target.h"
 #include "tree.h"
 #include "toplev.h"
-#include "tm.h"
-#include "rtl.h"
+#include "tm.h"		/* For rtl.h.  */
+#include "rtl.h"	/* For decl_default_tls_model.  */
 #include "gfortran.h"
 #include "trans.h"
 #include "trans-types.h"
Index: trans-openmp.c
===================================================================
--- trans-openmp.c	(revision 159624)
+++ trans-openmp.c	(working copy)
@@ -24,10 +24,8 @@ along with GCC; see the file COPYING3.  If not see
 #include "system.h"
 #include "coretypes.h"
 #include "tree.h"
-#include "gimple.h"
-#include "ggc.h"
+#include "gimple.h"	/* For create_tmp_var_raw.  */
 #include "toplev.h"
-#include "real.h"
 #include "gfortran.h"
 #include "trans.h"
 #include "trans-stmt.h"
Index: trans-const.c
===================================================================
--- trans-const.c	(revision 159624)
+++ trans-const.c	(working copy)
@@ -25,7 +25,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "system.h"
 #include "coretypes.h"
 #include "tree.h"
-#include "ggc.h"
 #include "toplev.h"
 #include "real.h"
 #include "double-int.h"
Index: trans-stmt.c
===================================================================
--- trans-stmt.c	(revision 159624)
+++ trans-stmt.c	(working copy)
@@ -25,10 +25,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "system.h"
 #include "coretypes.h"
 #include "tree.h"
-#include "gimple.h"
-#include "ggc.h"
 #include "toplev.h"
-#include "real.h"
 #include "gfortran.h"
 #include "flags.h"
 #include "trans.h"
Index: trans.c
===================================================================
--- trans.c	(revision 159624)
+++ trans.c	(working copy)
@@ -23,12 +23,10 @@ along with GCC; see the file COPYING3.  If not see
 #include "system.h"
 #include "coretypes.h"
 #include "tree.h"
-#include "gimple.h"
+#include "gimple.h"	/* For create_tmp_var_raw.  */
 #include "tree-iterator.h"
-#include "ggc.h"
 #include "toplev.h"
 #include "defaults.h"
-#include "real.h"
 #include "flags.h"
 #include "gfortran.h"
 #include "trans.h"
Index: trans-types.c
===================================================================
--- trans-types.c	(revision 159624)
+++ trans-types.c	(working copy)
@@ -27,8 +27,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "system.h"
 #include "coretypes.h"
 #include "tree.h"
-#include "langhooks.h"
-#include "tm.h"
+#include "langhooks.h"	/* For iso-c-bindings.def.  */
 #include "target.h"
 #include "ggc.h"
 #include "toplev.h"
@@ -38,7 +37,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "trans-const.h"
 #include "real.h"
 #include "flags.h"
-#include "dwarf2out.h"
+#include "dwarf2out.h"	/* For struct array_descr_info.  */



 #if (GFC_MAX_DIMENSIONS < 10)
Index: trans-io.c
===================================================================
--- trans-io.c	(revision 159624)
+++ trans-io.c	(working copy)
@@ -24,10 +24,8 @@ along with GCC; see the file COPYING3.  If not see
 #include "system.h"
 #include "coretypes.h"
 #include "tree.h"
-#include "gimple.h"
 #include "ggc.h"
 #include "toplev.h"
-#include "real.h"
 #include "gfortran.h"
 #include "trans.h"
 #include "trans-stmt.h"
Index: trans-decl.c
===================================================================
--- trans-decl.c	(revision 159624)
+++ trans-decl.c	(working copy)
@@ -26,11 +26,11 @@ along with GCC; see the file COPYING3.  If not see
 #include "coretypes.h"
 #include "tree.h"
 #include "tree-dump.h"
-#include "gimple.h"
+#include "gimple.h"	/* For create_tmp_var_raw.  */
 #include "ggc.h"
 #include "toplev.h"
-#include "tm.h"
-#include "rtl.h"
+#include "tm.h"		/* For rtl.h.  */
+#include "rtl.h"	/* For decl_default_tls_model.  */
 #include "target.h"
 #include "function.h"
 #include "flags.h"
Index: trans-intrinsic.c
===================================================================
--- trans-intrinsic.c	(revision 159624)
+++ trans-intrinsic.c	(working copy)
@@ -25,12 +25,11 @@ along with GCC; see the file COPYING3.  If not see
 #include "config.h"
 #include "system.h"
 #include "coretypes.h"
-#include "tm.h"
+#include "tm.h"		/* For UNITS_PER_WORD.  */
 #include "tree.h"
 #include "ggc.h"
 #include "toplev.h"
 #include "real.h"
-#include "gimple.h"
 #include "flags.h"
 #include "gfortran.h"
 #include "arith.h"


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