OSDN Git Service

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