OSDN Git Service

2012-01-27 Tobias Burnus <burnus@net-b.de>
[pf3gnuchains/gcc-fork.git] / gcc / fortran / ChangeLog
1 2012-01-27  Tobias Burnus  <burnus@net-b.de>
2
3         PR fortran/52016
4         * resolve.c (resolve_formal_arglist): Fix elemental
5         constraint checks for polymorphic dummies.
6
7 2012-01-27  Paul Thomas  <pault@gcc.gnu.org>
8             Tobias Burnus <burnus@gcc.gnu.org>
9
10         PR fortran/48705
11         PR fortran/51870
12         PR fortran/51943
13         PR fortran/51946
14         * trans-array.c (gfc_array_init_size): Add two extra arguments
15         to convey the dynamic element size of a calls object and to
16         return the number of elements that have been allocated.
17         (gfc_array_allocate): Add the same arguments and use them to
18         call gfc_array_init_size.  Before the allocation dereference
19         the data pointer, if necessary. Set the allocated array to zero
20         if the class element size or expr3 are non-null.
21         * trans-expr.c (gfc_conv_class_to_class): Give this function
22         global scope.
23         (get_class_array_ref): New function.
24         (gfc_copy_class_to_class): New function.
25         * trans-array.h : Update prototype for gfc_array_allocate.
26         * trans-stmt.c (gfc_trans_allocate): For non-variable class
27         STATUS expressions extract the class object and the dynamic
28         element size. Use the latter to call gfc_array_allocate and
29         the former for setting the vptr and, via
30         gfc_copy_class_to_clasfc_cs, to copy to the allocated data.
31         * trans.h : Prototypes for gfc_get_class_array_ref,
32         gfc_copy_class_to_class and gfc_conv_class_to_class.
33
34 2012-01-25  Tobias Burnus  <burnus@net-b.de>
35
36         * resolve.c (symbol_as): Check also for attr.class_ok.
37
38 2012-01-25  Tobias Burnus  <burnus@net-b.de>
39
40         PR fortran/51995
41         * class.c (gfc_build_class_symbol): Fix invalid freeing
42         issue with fclass->f2k_derived.
43
44 2012-01-25  Tobias Burnus  <burnus@net-b.de>
45
46         PR fortran/51995
47         * class.c (gfc_build_class_symbol): Ensure that
48         fclass->f2k_derived is set.
49
50 2012-01-25  Tobias Burnus  <burnus@net-b.de>
51
52         PR fortran/51966
53         * resolve.c (resolve_structure_cons): Only create an
54         array constructors for nonscalars.
55
56 2012-01-23  Tobias Burnus  <burnus@net-b.de>
57
58         PR fortran/51948
59         * check.c (variable_check): Fix checking for
60          variables and deeply nested BLOCKs.
61
62 2012-01-21  Tobias Burnus  <burnus@net-b.de>
63             Steven G. Kargl  <kargl@gcc.gnu.org>
64
65         PR fortran/50556
66         * symbol.c (check_conflict): namelist-group-name cannot have the SAVE
67         attribure.
68
69 2012-01-21  Tobias Burnus  <burnus@net-b.de>
70
71         PR fortran/51913
72         * interface.c (compare_parameter): Fix CLASS comparison.
73
74 2012-01-20  Tobias Burnus  <burnus@net-b.de>
75             Janus Weil  <janus@gcc.gnu.org>
76
77         PR fortran/51056
78         * module.c (load_needed, read_module): Don't mark __vtab etc.
79         as use_only.
80
81 2012-01-19  Tobias Burnus  <burnus@net-b.de>
82
83         PR fortran/51904
84         * expr.c (gfc_build_intrinsic_call): Also set the symtree.
85
86 2012-01-18  Paul Thomas  <pault@gcc.gnu.org>
87
88         PR fortran/51634
89         * trans-expr.c (gfc_conv_procedure_call): Deallocate allocatable
90         components of temporary class arguments.
91
92 2012-01-17  Tobias Burnus  <burnus@net-b.de>
93             Janne Blomqvist  <jb@gcc.gnu.org>
94
95         PR fortran/51869
96         * trans-expr.c (alloc_scalar_allocatable_for_assignment): Nullify
97         LHS after allocation, if it has allocatable components.
98         * f95-lang.c (gfc_init_builtin_functions): Add BUILT_IN_CALLOC.
99
100 2012-01-16  Mikael Morin  <mikael@gcc.gnu.org>
101             Tobias Burnus  <burnus@net-b.de>
102
103         PR fortran/50981
104         * trans-array.c (gfc_walk_elemental_function_args): Fix
105         passing of deallocated allocatables/pointers as absent argument. 
106
107 2012-01-16  Tobias Burnus  <burnus@net-b.de>
108
109         PR fortran/51809
110         * class.c (gfc_find_derived_vtab): Mark __vtab and
111         __def_init as FL_VARIABLE not as FL_PARAMETER.
112         * expr.c (gfc_simplify_expr): Remove special
113         handling of __vtab.
114         * resolve.c (resolve_values): Ditto.
115         * trans-decl.c (gfc_get_symbol_decl): Mark __vtab
116         and __def_init as TREE_READONLY.
117
118 2012-01-16  Zydrunas Gimbutas  <gimbutas@cims.nyu.edu>
119         Andreas Kloeckner  <kloeckner@cims.nyu.edu>
120         Steven G. Kargl  <kargl@gcc.gnu.org>
121
122         PR fortran/48426
123         * gfortran.h (gfc_option_t): Add members flag_*_kind to store kind.
124         * lang.opt: Add options -freal-4-real-8, -freal-4-real-10,
125         -freal-4-real-16, -freal-8-real-4, -freal-8-real-10, -freal-8-real-16
126         and -finteger-4-integer-8. User-desired type conversion information.
127         * decl.c (gfc_match_old_kind_spec,kind_expr): Type conversions
128         in declaration parsing.
129         * trans-types.c (gfc_init_kinds): User-specified type conversion
130         checked for current backend.
131         * primary.c (match_integer_constant,match_real_constant): Implement
132         type conversion in constant parsing.
133         * options.c (gfc_init_options,gfc_handle_option): Translate input
134         options to flags in internal options data structure.
135         * invoke.texi: Document new options.  Re-order options in Options
136         summary section.
137
138 2012-01-16  Paul Thomas  <pault@gcc.gnu.org>
139
140         * trans-array.c (gfc_trans_create_temp_array): In the case of a
141         class array temporary, detect a null 'eltype' on entry and use 
142         'initial' to provde the class reference and so, through the
143         vtable, the element size for the dynamic type.
144         * trans-stmt.c (gfc_conv_elemental_dependencies): For class
145         expressions, set 'eltype' to null and pass the values via the
146         'initial' expression.
147
148 2012-01-14  Tobias Burnus  <burnus@net-b.de>
149
150         PR fortran/51800
151         * resolve.c (build_default_init_expr): Also initialize
152         nonconstant-length strings with -finit-character=<n>.
153
154 2011-01-14  Tobias Burnus  <burnus@net-b.de>
155
156         PR fortran/51816
157         * module.c (read_module): Don't make nonexisting
158         intrinsic operators as found.
159         (rename_list_remove_duplicate): New function.
160         (gfc_use_modules): Use it.
161
162 2012-01-13  Paul Thomas  <pault@gcc.gnu.org>
163
164         PR fortran/48351
165         * trans-array.c (structure_alloc_comps): Suppress interative
166         call to self, when current component is deallocated using
167         gfc_trans_dealloc_allocated.
168         * class.c (gfc_build_class_symbol): Copy the 'alloc_comp'
169         attribute from the declared type to the class structure.
170
171 2012-01-13  Tobias Burnus  <burnus@net-b.de>
172
173         PR fortran/51842
174         * fortran/trans-types.c (gfc_init_kinds): Use PTRDIFF_TYPE
175         instead of a signed int of size POINTER_SIZE for
176         gfc_index_integer_kind.
177
178 2012-01-12  Tobias Burnus  <burnus@net-b.de>
179
180         PR fortran/36755
181         * intrinsic.texi (CHMOD): Extend a bit and remove statement
182         that /bin/chmod is called.
183
184 2012-01-10  Gerald Pfeifer  <gerald@pfeifer.com>
185
186         * gfortran.texi (Fortran 2003 Status): Fix grammar.
187
188 2012-01-10  Tobias Burnus  <burnus@net-b.de>
189
190         PR fortran/51652
191         * resolve.c (resolve_allocate_expr): For non-deferred char lengths,
192         check whether type-spec matches declaration.
193
194 2012-01-10  Tobias Burnus  <burnus@net-b.de>
195
196         * resolve.c (resolve_ordinary_assign): Improve error wording.
197
198 2012-01-09  Paul Thomas  <pault@gcc.gnu.org>
199
200         PR fortran/51791
201         * interface.c (matching_typebound_op): Drill down through
202         possible parentheses to obtain base expression. Do not test for
203         'class_ok' but, instead for the class structure components.
204         * resolve.c (resolve_ordinary_assign): Extend error message for
205         polymorphic assignment to advise checking for specific
206         subroutine.
207
208         PR fortran/51792
209         * resolve.c (resolve_typebound_function): Restore 'static' to
210         declaration.
211
212 2012-01-09  Mikael Morin  <mikael@gcc.gnu.org>
213
214         PR fortran/51758
215         * trans-array.c (gfc_walk_elemental_function_args):
216         Skip over NULL() actual arguments.
217
218 2012-01-09  Tobias Burnus  <burnus@net-b.de>
219
220         * gfortran.texi: Bump copyright year.
221         (Fortran 2003 Status): Update polymorphism item, add
222         item for generic interface with DT name.
223
224 2012-01-09  Tobias Burnus  <burnus@net-b.de>
225
226         PR fortran/51578
227         * gfortran.h (gfc_use_list):
228         * match.h (gfc_use_module): Rename to ...
229         (gfc_use_modules): ... this.
230         * module.c (use_locus, specified_nonint, specified_int): Remove
231         global variable.
232         (module_name): Change type to const char*, used with gfc_get_string.
233         (module_list): New global variable.
234         (free_rename): Free argument not global var.
235         (gfc_match_use): Save match to module_list.
236         (load_generic_interfaces, read_module): Don't free symtree.
237         (write_dt_extensions, gfc_dump_module): Fix module-name I/O due to the
238         type change of module_name.
239         (write_symbol0, write_generic): Optimize due to the type change.
240         (import_iso_c_binding_module, use_iso_fortran_env_module): Use
241         locus of rename->where.
242         (gfc_use_module): Take module_list as argument.
243         (gfc_use_modules): New function.
244         (gfc_module_init_2, gfc_module_done_2): Init module_list, rename_list.
245         * parse.c (last_was_use_stmt): New global variable.
246         (use_modules): New function.
247         (decode_specification_statement, decode_statement): Move USE match up
248         and call use_modules.
249         (next_free, next_fixed): Call use_modules.
250         (accept_statement): Don't call gfc_module_use.
251
252 2012-01-06  Tobias Burnus <burnus@net-b.de>
253
254         * trans-openmp.c (gfc_omp_clause_dtor, gfc_trans_omp_array_reduction):
255         Update call to gfc_trans_dealloc_allocated.
256         * trans.c (gfc_allocate_using_malloc): Fix spacing.
257         (gfc_allocate_allocatable): For gfc_allocate_using_lib, jump to
258         label_finish when an error occurs.
259         (gfc_deallocate_with_status): Call caf_deregister for -fcoarray=lib.
260         * trans.h (gfc_allocate_allocatable, gfc_deallocate_with_status):
261         Update prototype.
262         (gfor_fndecl_caf_deregister): New tree symbol.
263         * trans-expr.c (gfc_conv_procedure_call): Update
264         gfc_deallocate_with_status and gfc_trans_dealloc_allocated calls.
265         * trans-array.c (gfc_array_allocate, gfc_trans_dealloc_allocated,
266         structure_alloc_comps, gfc_trans_deferred_array): Ditto.
267         (gfc_array_deallocate): Handle coarrays with -fcoarray=lib.
268         * trans-array.h (gfc_array_deallocate, gfc_array_allocate,
269         gfc_trans_dealloc_allocated): Update prototypes.
270         * trans-stmt.c (gfc_trans_sync): Fix indentation.
271         (gfc_trans_allocate): Fix errmsg padding and label handling.
272         (gfc_trans_deallocate): Ditto and handle -fcoarray=lib.
273         * expr.c (gfc_is_coarray): Fix algorithm for BT_CLASS.
274         * libgfortran.h (GFC_STAT_STOPPED_IMAGE): Use large value
275         to avoid other stats accidentally matching this one.
276         * trans-decl.c (gfor_fndecl_caf_deregister): New global var.
277         (gfc_build_builtin_function_decls): Fix prototype decl of caf_register
278         and add decl for caf_deregister.
279         (gfc_trans_deferred_vars): Handle CAF vars with -fcoarrays=lib.
280         * trans-intrinsic.c (conv_intrinsic_move_alloc): Update call to
281         gfc_deallocate_with_status.
282
283 2012-01-05  Paul Thomas  <pault@gcc.gnu.org>
284
285         PR fortran/PR48946
286         * resolve.c (resolve_typebound_static): If the typebound
287         procedure is 'deferred' try to find the correct specific
288         procedure in the derived type operator space itself.
289
290 2012-01-04  Mikael Morin  <mikael@gcc.gnu.org>
291
292         PR fortran/50981
293         * trans-array.h (gfc_walk_elemental_function_args): New argument.
294         * trans-intrinsic.c (gfc_walk_intrinsic_function): Update call.
295         * trans-stmt.c (gfc_trans_call): Ditto.
296         * trans-array.c (gfc_walk_function_expr): Ditto.
297         (gfc_walk_elemental_function_args): Get the dummy argument list
298         if possible.  Check that the dummy and the actual argument are both
299         optional, and set can_be_null_ref accordingly.
300
301 2012-01-04  Mikael Morin  <mikael@gcc.gnu.org>
302
303         PR fortran/50981
304         * trans.h (struct gfc_ss_info): New field data::scalar::can_be_null_ref
305         * trans-array.c: If the reference can be NULL, save the reference
306         instead of the value.
307         * trans-expr.c (gfc_conv_expr): If we have saved a reference,
308         dereference it.
309
310 2012-01-04  Mikael Morin  <mikael@gcc.gnu.org>
311
312         * trans-expr.c (gfc_conv_expr): Move address taking...
313         (gfc_conv_expr_reference): ... here.
314
315 2012-01-04  Thomas Koenig  <tkoenig@gcc.gnu.org>
316
317         PR fortran/49693
318         * trans-common.c (create_common): Update copyright years.  Mark
319         variables as used to avoid warnings about unused variables in
320         common blocks.
321
322 2012-01-03  Hans-Peter Nilsson  <hp@axis.com>
323
324         * gfortran.h (struct gfc_expr): Add missing "struct"
325         qualifier for member base_expr.
326
327 2012-01-02  Paul Thomas  <pault@gcc.gnu.org>
328
329         PR fortran/51529
330         * trans-array.c (gfc_array_allocate): Null allocated memory of
331         newly allocted class arrays.
332
333         PR fortran/46262
334         PR fortran/46328
335         PR fortran/51052
336         * interface.c(build_compcall_for_operator): Add a type to the
337         expression.
338         * trans-expr.c (conv_base_obj_fcn_val): New function.
339         (gfc_conv_procedure_call): Use base_expr to detect non-variable
340         base objects and, ensuring that there is a temporary variable,
341         build up the typebound call using conv_base_obj_fcn_val.
342         (gfc_trans_class_assign): Pick out class procedure pointer
343         assignments and do the assignment with no further prcessing.
344         (gfc_trans_class_array_init_assign, gfc_trans_class_init_assign
345         gfc_trans_class_assign): Move to top of file.
346         * gfortran.h : Add 'base_expr' field to gfc_expr.
347         * resolve.c (get_declared_from_expr): Add 'types' argument to
348         switch checking of derived types on or off.
349         (resolve_typebound_generic_call): Set the new argument.
350         (resolve_typebound_function, resolve_typebound_subroutine):
351         Set 'types' argument for get_declared_from_expr appropriately.
352         Identify base expression, if not a variable, in the argument
353         list of class valued calls. Assign it to the 'base_expr' field
354         of the final expression. Strip away all references after the
355         last class reference.
356
357 2012-01-02  Tobias Burnus  <burnus@net-b.de>
358
359         PR fortran/51682
360         * trans-intrinsic.c (trans_this_image, trans_image_index,
361         trans_num_images, conv_intrinsic_cobound): Fold_convert the
362         caf_num_images/caf_this_images variables to the correct int kind.
363
364 2012-01-01  Jakub Jelinek  <jakub@redhat.com>
365
366         * gfortranspec.c (lang_specific_driver): Update copyright notice
367         dates.
368 \f
369 Copyright (C) 2012 Free Software Foundation, Inc.
370
371 Copying and distribution of this file, with or without modification,
372 are permitted in any medium without royalty provided the copyright
373 notice and this notice are preserved.