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