OSDN Git Service

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