re PR fortran/51652 (Allocate with type-spec and source-expr: check whether length...
[gcc.git] / gcc / fortran / ChangeLog
1 2012-01-10 Tobias Burnus <burnus@net-b.de>
2
3 PR fortran/51652
4 * resolve.c (resolve_allocate_expr): For non-deferred char lengths,
5 check whether type-spec matches declaration.
6
7 2012-01-10 Tobias Burnus <burnus@net-b.de>
8
9 * resolve.c (resolve_ordinary_assign): Improve error wording.
10
11 2012-01-09 Paul Thomas <pault@gcc.gnu.org>
12
13 PR fortran/51791
14 * interface.c (matching_typebound_op): Drill down through
15 possible parentheses to obtain base expression. Do not test for
16 'class_ok' but, instead for the class structure components.
17 * resolve.c (resolve_ordinary_assign): Extend error message for
18 polymorphic assignment to advise checking for specific
19 subroutine.
20
21 PR fortran/51792
22 * resolve.c (resolve_typebound_function): Restore 'static' to
23 declaration.
24
25 2012-01-09 Mikael Morin <mikael@gcc.gnu.org>
26
27 PR fortran/51758
28 * trans-array.c (gfc_walk_elemental_function_args):
29 Skip over NULL() actual arguments.
30
31 2012-01-09 Tobias Burnus <burnus@net-b.de>
32
33 * gfortran.texi: Bump copyright year.
34 (Fortran 2003 Status): Update polymorphism item, add
35 item for generic interface with DT name.
36
37 2012-01-09 Tobias Burnus <burnus@net-b.de>
38
39 PR fortran/51578
40 * gfortran.h (gfc_use_list):
41 * match.h (gfc_use_module): Rename to ...
42 (gfc_use_modules): ... this.
43 * module.c (use_locus, specified_nonint, specified_int): Remove
44 global variable.
45 (module_name): Change type to const char*, used with gfc_get_string.
46 (module_list): New global variable.
47 (free_rename): Free argument not global var.
48 (gfc_match_use): Save match to module_list.
49 (load_generic_interfaces, read_module): Don't free symtree.
50 (write_dt_extensions, gfc_dump_module): Fix module-name I/O due to the
51 type change of module_name.
52 (write_symbol0, write_generic): Optimize due to the type change.
53 (import_iso_c_binding_module, use_iso_fortran_env_module): Use
54 locus of rename->where.
55 (gfc_use_module): Take module_list as argument.
56 (gfc_use_modules): New function.
57 (gfc_module_init_2, gfc_module_done_2): Init module_list, rename_list.
58 * parse.c (last_was_use_stmt): New global variable.
59 (use_modules): New function.
60 (decode_specification_statement, decode_statement): Move USE match up
61 and call use_modules.
62 (next_free, next_fixed): Call use_modules.
63 (accept_statement): Don't call gfc_module_use.
64
65 2012-01-06 Tobias Burnus <burnus@net-b.de>
66
67 * trans-openmp.c (gfc_omp_clause_dtor, gfc_trans_omp_array_reduction):
68 Update call to gfc_trans_dealloc_allocated.
69 * trans.c (gfc_allocate_using_malloc): Fix spacing.
70 (gfc_allocate_allocatable): For gfc_allocate_using_lib, jump to
71 label_finish when an error occurs.
72 (gfc_deallocate_with_status): Call caf_deregister for -fcoarray=lib.
73 * trans.h (gfc_allocate_allocatable, gfc_deallocate_with_status):
74 Update prototype.
75 (gfor_fndecl_caf_deregister): New tree symbol.
76 * trans-expr.c (gfc_conv_procedure_call): Update
77 gfc_deallocate_with_status and gfc_trans_dealloc_allocated calls.
78 * trans-array.c (gfc_array_allocate, gfc_trans_dealloc_allocated,
79 structure_alloc_comps, gfc_trans_deferred_array): Ditto.
80 (gfc_array_deallocate): Handle coarrays with -fcoarray=lib.
81 * trans-array.h (gfc_array_deallocate, gfc_array_allocate,
82 gfc_trans_dealloc_allocated): Update prototypes.
83 * trans-stmt.c (gfc_trans_sync): Fix indentation.
84 (gfc_trans_allocate): Fix errmsg padding and label handling.
85 (gfc_trans_deallocate): Ditto and handle -fcoarray=lib.
86 * expr.c (gfc_is_coarray): Fix algorithm for BT_CLASS.
87 * libgfortran.h (GFC_STAT_STOPPED_IMAGE): Use large value
88 to avoid other stats accidentally matching this one.
89 * trans-decl.c (gfor_fndecl_caf_deregister): New global var.
90 (gfc_build_builtin_function_decls): Fix prototype decl of caf_register
91 and add decl for caf_deregister.
92 (gfc_trans_deferred_vars): Handle CAF vars with -fcoarrays=lib.
93 * trans-intrinsic.c (conv_intrinsic_move_alloc): Update call to
94 gfc_deallocate_with_status.
95
96 2012-01-05 Paul Thomas <pault@gcc.gnu.org>
97
98 PR fortran/PR48946
99 * resolve.c (resolve_typebound_static): If the typebound
100 procedure is 'deferred' try to find the correct specific
101 procedure in the derived type operator space itself.
102
103 2012-01-04 Mikael Morin <mikael@gcc.gnu.org>
104
105 PR fortran/50981
106 * trans-array.h (gfc_walk_elemental_function_args): New argument.
107 * trans-intrinsic.c (gfc_walk_intrinsic_function): Update call.
108 * trans-stmt.c (gfc_trans_call): Ditto.
109 * trans-array.c (gfc_walk_function_expr): Ditto.
110 (gfc_walk_elemental_function_args): Get the dummy argument list
111 if possible. Check that the dummy and the actual argument are both
112 optional, and set can_be_null_ref accordingly.
113
114 2012-01-04 Mikael Morin <mikael@gcc.gnu.org>
115
116 PR fortran/50981
117 * trans.h (struct gfc_ss_info): New field data::scalar::can_be_null_ref
118 * trans-array.c: If the reference can be NULL, save the reference
119 instead of the value.
120 * trans-expr.c (gfc_conv_expr): If we have saved a reference,
121 dereference it.
122
123 2012-01-04 Mikael Morin <mikael@gcc.gnu.org>
124
125 * trans-expr.c (gfc_conv_expr): Move address taking...
126 (gfc_conv_expr_reference): ... here.
127
128 2012-01-04 Thomas Koenig <tkoenig@gcc.gnu.org>
129
130 PR fortran/49693
131 * trans-common.c (create_common): Update copyright years. Mark
132 variables as used to avoid warnings about unused variables in
133 common blocks.
134
135 2012-01-03 Hans-Peter Nilsson <hp@axis.com>
136
137 * gfortran.h (struct gfc_expr): Add missing "struct"
138 qualifier for member base_expr.
139
140 2012-01-02 Paul Thomas <pault@gcc.gnu.org>
141
142 PR fortran/51529
143 * trans-array.c (gfc_array_allocate): Null allocated memory of
144 newly allocted class arrays.
145
146 PR fortran/46262
147 PR fortran/46328
148 PR fortran/51052
149 * interface.c(build_compcall_for_operator): Add a type to the
150 expression.
151 * trans-expr.c (conv_base_obj_fcn_val): New function.
152 (gfc_conv_procedure_call): Use base_expr to detect non-variable
153 base objects and, ensuring that there is a temporary variable,
154 build up the typebound call using conv_base_obj_fcn_val.
155 (gfc_trans_class_assign): Pick out class procedure pointer
156 assignments and do the assignment with no further prcessing.
157 (gfc_trans_class_array_init_assign, gfc_trans_class_init_assign
158 gfc_trans_class_assign): Move to top of file.
159 * gfortran.h : Add 'base_expr' field to gfc_expr.
160 * resolve.c (get_declared_from_expr): Add 'types' argument to
161 switch checking of derived types on or off.
162 (resolve_typebound_generic_call): Set the new argument.
163 (resolve_typebound_function, resolve_typebound_subroutine):
164 Set 'types' argument for get_declared_from_expr appropriately.
165 Identify base expression, if not a variable, in the argument
166 list of class valued calls. Assign it to the 'base_expr' field
167 of the final expression. Strip away all references after the
168 last class reference.
169
170 2012-01-02 Tobias Burnus <burnus@net-b.de>
171
172 PR fortran/51682
173 * trans-intrinsic.c (trans_this_image, trans_image_index,
174 trans_num_images, conv_intrinsic_cobound): Fold_convert the
175 caf_num_images/caf_this_images variables to the correct int kind.
176
177 2012-01-01 Jakub Jelinek <jakub@redhat.com>
178
179 * gfortranspec.c (lang_specific_driver): Update copyright notice
180 dates.
181 \f
182 Copyright (C) 2012 Free Software Foundation, Inc.
183
184 Copying and distribution of this file, with or without modification,
185 are permitted in any medium without royalty provided the copyright
186 notice and this notice are preserved.