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, Fortran] Small cleanups in trees emission in gfortran


Hello, Everyone.

Two patches attached are cleanups for trees construction inside
gfortran. They are pretty obvious.

Regtested on x86-32/linux with no new regressions.

PS: Both Duncan and I have FSF copyright assignment for gcc.
-- 
With best regards, Anton Korobeynikov.

Faculty of Mathematics & Mechanics, Saint Petersburg State University.

Index: trans-expr.c
===================================================================
--- trans-expr.c	(revision 130750)
+++ trans-expr.c	(working copy)
@@ -3285,6 +3285,11 @@
       CONSTRUCTOR_APPEND_ELT (v, cm->backend_decl, val);
     }
   se->expr = build_constructor (type, v);
+  if (init) 
+    {
+      TREE_CONSTANT(se->expr) = 1;
+      TREE_INVARIANT(se->expr) = 1;
+    }
 }
 
 
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 130750)
+++ ChangeLog	(working copy)
@@ -1,3 +1,14 @@
+2007-12-11  Anton Korobeynikov  <asl@math.spbu.ru>
+
+	* trans-decl.c (gfc_build_builtin_function_decls): Correct decl
+	construction for select_string() and internal_unpack()
+
+2007-12-11  Duncan Sands  <baldrick@free.fr>
+	    Anton Korobeynikov  <asl@math.spbu.ru>
+
+	* trans-expr.c (gfc_conv_structure): Make sure record constructors
+	for static variables are marked constant.
+
 2007-12-09  Jakub Jelinek  <jakub@redhat.com>
 
 	PR fortran/22244
Index: trans-decl.c
===================================================================
--- trans-decl.c	(revision 130750)
+++ trans-decl.c	(working copy)
@@ -2325,7 +2325,9 @@
 
   gfor_fndecl_select_string =
     gfc_build_library_function_decl (get_identifier (PREFIX("select_string")),
-                                     integer_type_node, 0);
+				     integer_type_node, 4, pvoid_type_node,
+				     integer_type_node, pchar_type_node,
+				     integer_type_node);
 
   gfor_fndecl_runtime_error =
     gfc_build_library_function_decl (get_identifier (PREFIX("runtime_error")),
@@ -2379,7 +2381,7 @@
 
   gfor_fndecl_in_unpack = gfc_build_library_function_decl (
         get_identifier (PREFIX("internal_unpack")),
-        pvoid_type_node, 1, pvoid_type_node);
+        pvoid_type_node, 2, pvoid_type_node, pvoid_type_node);
 
   gfor_fndecl_associated =
     gfc_build_library_function_decl (

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