]> gcc.gnu.org Git - gcc.git/commitdiff
[multiple changes]
authorTobias Burnus <burnus@gcc.gnu.org>
Thu, 13 Dec 2007 20:31:45 +0000 (21:31 +0100)
committerTobias Burnus <burnus@gcc.gnu.org>
Thu, 13 Dec 2007 20:31:45 +0000 (21:31 +0100)
2007-12-13  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-13  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.

From-SVN: r130914

gcc/fortran/ChangeLog
gcc/fortran/trans-decl.c
gcc/fortran/trans-expr.c

index 52de3c2b909488e6dec4b69e865d550bf34ae340..e0cdc78d570410537d22433a0eb4372227dbf73f 100644 (file)
@@ -1,3 +1,14 @@
+2007-12-13  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-13  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-12  Tobias Burnus  <burnus@net-b.de>
 
        PR fortran/34254
index 96beed224e668387a24c0e979755488b3bc13668..876219fed660858eea93b7631e39adadd9680241 100644 (file)
@@ -2325,7 +2325,9 @@ gfc_build_builtin_function_decls (void)
 
   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 @@ gfc_build_builtin_function_decls (void)
 
   gfor_fndecl_in_unpack = gfc_build_library_function_decl (
         get_identifier (PREFIX("internal_unpack")),
-        pvoid_type_node, 1, pvoid_type_node);
+        void_type_node, 2, pvoid_type_node, pvoid_type_node);
 
   gfor_fndecl_associated =
     gfc_build_library_function_decl (
index 493f73b7df97f6246671fca7b25735ca2d03f419..91c77007b35132253a14eb7a563d720ede4be297 100644 (file)
@@ -3285,6 +3285,11 @@ gfc_conv_structure (gfc_se * se, gfc_expr * expr, int init)
       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;
+    }
 }
 
 
This page took 0.07101 seconds and 5 git commands to generate.