aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/fortran/ChangeLog11
-rw-r--r--gcc/fortran/trans-decl.c6
-rw-r--r--gcc/fortran/trans-expr.c5
3 files changed, 20 insertions, 2 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 52de3c2..e0cdc78 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -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
diff --git a/gcc/fortran/trans-decl.c b/gcc/fortran/trans-decl.c
index 96beed2..876219f 100644
--- a/gcc/fortran/trans-decl.c
+++ b/gcc/fortran/trans-decl.c
@@ -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 (
diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c
index 493f73b..91c7700 100644
--- a/gcc/fortran/trans-expr.c
+++ b/gcc/fortran/trans-expr.c
@@ -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;
+ }
}