OSDN Git Service

bcb3a6022f29f531b98798f62b3d9dde4d60ddbb
[pf3gnuchains/gcc-fork.git] / gcc / fortran / ChangeLog
1 2009-03-30  Jakub Jelinek  <jakub@redhat.com>
2
3         * trans-types.c (gfc_sym_type, gfc_return_by_reference): For
4         sym->attr.result check sym->ns->proc_name->attr.is_bind_c.
5
6 2009-03-30  Joseph Myers  <joseph@codesourcery.com>
7
8         PR rtl-optimization/323
9         * options.c (gfc_post_options): Set
10         flag_excess_precision_cmdline.  Give an error for
11         -fexcess-precision=standard for processors where the option is
12         significant.
13
14 2009-03-29  Joseph Myers  <joseph@codesourcery.com>
15
16         PR preprocessor/34695
17         * cpp.c (cb_cpp_error): New.
18         (gfc_cpp_post_options): Don't set cpp_option->inhibit_warnings.
19         Don't check cpp_errors (cpp_in).
20         (gfc_cpp_init_0): Set cb->error.
21
22 2009-03-29  Steven G. Kargl  <kargl@gcc.gnu.org>
23
24         PR fortran/38823
25         * gfortran.h: Add ARITH_PROHIBIT to arith enum.
26         expr.c (gfc_match_init_expr): Add global variable init_flag to
27         flag matching an initialization expression.
28         (check_intrinsic_op): Move no longer reachable error message to ...
29         * arith.c (arith_power): ... here.  Remove gfc_ prefix in
30         gfc_arith_power.  Use init_flag.  Allow constant folding of x**y
31         when y is REAL or COMPLEX.
32         (eval_intrinsic): Remove restriction that y in x**y must be INTEGER
33         for constant folding.
34         * gfc_power: Update gfc_arith_power to arith_power
35
36 2009-03-29  Daniel Kraft  <d@domob.eu>
37
38         PR fortran/37423
39         * gfortran.h (struct gfc_typebound_proc): Added new flag `deferred' and
40         added a comment explaining DEFERRED binding handling.
41         * decl.c (match_binding_attributes): Really match DEFERRED attribute.
42         (match_procedure_in_type): Really match PROCEDURE(interface) syntax
43         and do some validity checks for DEFERRED and this construct.
44         * module.c (binding_overriding): New string constant for DEFERRED.
45         (mio_typebound_proc): Module-IO DEFERRED flag.
46         * resolve.c (check_typebound_override): Ensure that a non-DEFERRED
47         binding is not overridden by a DEFERRED one.
48         (resolve_typebound_procedure): Allow abstract interfaces as targets
49         for DEFERRED bindings.
50         (ensure_not_abstract_walker), (ensure_not_abstract): New methods.
51         (resolve_fl_derived): Use new `ensure_not_abstract' method for
52         non-ABSTRACT types extending ABSTRACT ones to ensure each DEFERRED
53         binding is overridden.
54         (check_typebound_baseobject): New method.
55         (resolve_compcall), (resolve_typebound_call): Check base-object of
56         the type-bound procedure call.
57         * gfc-internals.texi (Type-bound procedures): Document a little bit
58         about internal handling of DEFERRED bindings.
59
60 2008-03-29  Tobias Schlüter  <tobi@gcc.gnu.org>
61
62         PR fortran/38507
63         * gfortran.h (gfc_st_label): Fix comment.
64         (gfc_exec_op): Add statement code EXEC_END_BLOCK for end of block.
65         * parse.c (accept_statement): Use EXEC_END_BLOCK for END IF and
66         END SELECT with labels.
67         (check_do_closure): Fix formatting.
68         (parse_do_block): Fix typo in error message.
69         * resolve.c (code_stack): Remove tail member.  Update comment to
70         new use of reachable_labels.
71         (reachable_labels): Rename to ...
72         (find_reachable_labels): ... this.  Overhaul.  Update preceding
73         comment.
74         (resolve_branch): Fix comment preceding function.  Rewrite.
75         (resolve_code): Update call to find_reachable_labels.  Add code to
76         deal with EXEC_END_BLOCK.
77         * st.c (gfc_free_statement): Add code to deal with EXEC_END_BLOCK.
78         Add 2009 to copyright years.
79         * trans.c (gfc_trans_code): Likewise on both counts.
80
81 2009-03-28  Tobias Burnus  <burnus@net-b.de>
82
83         PR fortran/34656
84         * trans-stmt.c (gfc_trans_simple_do, gfc_trans_do):
85         Add GFC_RTCHECK_DO support.
86         * option.c (gfc_handle_runtime_check_option): Enable GFC_RTCHECK_DO.
87         * invoke.texi (-fcheck): Document "do" option.
88
89 2009-03-28  Paul Thomas  <pault@gcc.gnu.org>
90
91         PR fortran/38538
92         * trans-array.c (get_elemental_fcn_charlen): Remove.
93         (get_array_charlen): New function to replace previous.
94
95 2009-03-28  Paul Thomas  <pault@gcc.gnu.org>
96
97         PR fortran/38765
98         * parse.c (parse_derived): Do not break on finding pointer,
99         allocatable or private components.
100
101 2009-03-28  Tobias Burnus  <burnus@net-b.de>
102
103         PR fortran/32626
104         * option.c (gfc_handle_runtime_check_option): Enable recursion check.
105         * trans-decl.c (gfc_generate_function_code): Add recursion check.
106         * invoke.texi (-fcheck): Add recursive option.
107
108 2009-03-28  Tobias Burnus  <burnus@net-b.de>
109
110         PR fortran/38432
111         * resolve.c (gfc_resolve_iterator): Add zero-loop warning.
112
113 2009-03-28  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
114             Paul Thomas  <pault@gcc.gnu.org>
115             Tobias Burnus  <burnus@net-b.de>
116
117         * gfortran.h (gfc_option_t): Add rtcheck.
118         * lang.opt: New option -fcheck.
119         * libgfortran.h: Add GFC_RTCHECK_* constants.
120         * invoke.texi: Document -fcheck.
121         * options.c (gfc_handle_runtime_check_option): New function.
122         (gfc_init_options,gfc_post_options,gfc_handle_option):
123         Add -fcheck option.
124
125 2009-03-27  Richard Guenther  <rguenther@suse.de>
126
127         * trans-array.c (gfc_conv_descriptor_data_addr): Use
128         gfc_build_addr_expr instead of build_fold_addr_expr.
129         (gfc_trans_allocate_array_storage, gfc_trans_array_constructor_value,
130         gfc_trans_constant_array_constructor, gfc_conv_array_data,
131         gfc_conv_expr_descriptor, gfc_conv_array_parameter): Likewise.
132         * trans-expr.c (gfc_conv_missing_dummy, gfc_conv_variable,
133         gfc_conv_function_val, gfc_conv_operator_assign,
134         gfc_conv_subref_array_arg, gfc_conv_function_call,
135         gfc_conv_expr_reference, gfc_trans_scalar_assign): Likewise.
136         * trans-intrinsic.c (gfc_conv_intrinsic_exponent,
137         gfc_conv_intrinsic_ctime, gfc_conv_intrinsic_fdate,
138         gfc_conv_intrinsic_ttynam, gfc_conv_intrinsic_minmax_char,
139         gfc_conv_intrinsic_fraction, gfc_conv_intrinsic_spacing,
140         gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_set_exponent,
141         gfc_conv_intrinsic_array_transfer, gfc_conv_intrinsic_transfer,
142         gfc_conv_intrinsic_si_kind, gfc_conv_intrinsic_trim): Likewise.
143         * trans-io.c (gfc_trans_io_runtime_check, set_parameter_ref,
144         gfc_convert_array_to_string, gfc_trans_open, gfc_trans_close,
145         build_filepos, gfc_trans_inquire, gfc_trans_wait,
146         nml_get_addr_expr, transfer_namelist_element, build_dt,
147         gfc_trans_dt_end, transfer_array_component, transfer_expr,
148         transfer_array_desc, gfc_trans_transfer): Likewise.
149         * trans-stmt.c (gfc_trans_allocate, gfc_trans_deallocate): Likewise.
150         * trans.c (gfc_build_addr_expr): Mark the base of the address
151         TREE_ADDRESSABLE.
152
153 2009-03-27  Tobias Burnus  <burnus@net-b.de>
154
155         * gfortran.h (enum init_local_real.): Add GFC_INIT_REAL_SNAN.
156         (gfc_expr): Add is_snan.
157         * trans-const.c (gfc_conv_mpfr_to_tree): Support SNaN.
158         (gfc_conv_constant_to_tree): Update call to gfc_conv_mpfr_to_tree.
159         * trans-const.h (gfc_conv_mpfr_to_tree): Update prototype.
160         * resolve.c (build_default_init_expr): Update call.
161         * target-memory.c (encode_float): Ditto.
162         * trans-intrinsic.c (gfc_conv_intrinsic_aint,gfc_conv_intrinsic_mod,
163
164 2009-03-18  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
165
166         * lang.opt: Unify help texts for -I, -Wconversion, -d, -fopenmp,
167         and -fpreprocessed.
168
169 2009-03-06  Alexandre Oliva <aoliva@redhat.com>
170
171         * simplify.c (gfc_simplify_transfer): Zero-initialize the
172         buffer.
173
174 2009-02-27  Tobias Burnus  <burnus@net-b.de>
175
176         PR fortran/39309
177         * module.c (read_md5_from_module_file): Add missing quote.
178
179 2009-02-27  Tobias Burnus  <burnus@net-b.de>
180
181         PR fortran/39309
182         * module.c (read_md5_from_module_file): Include mod version
183         in had-changed test.
184
185 2009-02-26  Paul Thomas  <pault@gcc.gnu.org>
186
187         PR fortran/39295
188         * interface.c (compare_type_rank_if): Return 1 if the symbols
189         are the same and deal with external procedures where one is
190         identified to be a function or subroutine by usage but the
191         other is not.
192
193 2009-02-26  Paul Thomas  <pault@gcc.gnu.org>
194
195         PR fortran/39292
196         * trans-array.c (gfc_conv_array_initializer): Convert all
197         expressions rather than ICEing.
198
199 2009-02-21  Thomas Koenig  <tkoenig@gcc.gnu.org>
200
201         PR fortran/38914
202         * array.c (ref_dimen_size):  Rename to gfc_ref_dimen_size,
203         make global.  Change function name in error messages.
204         (ref_size):  Change ref_dimen_size to gfc_ref_dimen_size.
205         (gfc_array_ref_shape):  Likewise.
206         * gfortran.h:  Add prototype for gfc_ref_dimen_size.
207         * simplify.c (simplify_bound_dim):  Add ref argument.
208         If the reference isn't a full array, return one for
209         the lower bound and the extent for the upper bound.
210         (simplify_bound):  For array sections, take as from the
211         argument.  Add reference to all to simplify_bound_dim.
212
213 2009-02-19  Daniel Franke  <franke.daniel@gmail.com>
214
215         * scanner.c (load_line): At end of line, skip '\r' without setting
216         the truncation flag.
217
218 2009-02-18  Daniel Kraft  <d@domob.eu>
219
220         * gfortran.texi: New chapter about compiler characteristics.
221         (Compiler Characteristics): Document KIND type parameters here.
222
223 2009-02-18  Tobias Burnus  <burnus@net-b.de>
224
225         * intrinsic.texi (MALLOC): Make example more portable.
226
227 2009-02-13  Mikael Morin  <mikael.morin@tele2.fr>
228
229         PR fortran/38259
230         * module.c (gfc_dump_module,gfc_use_module): Add module
231         version number.
232
233 2009-02-13  Paul Thomas  <pault@gcc.gnu.org>
234
235         PR fortran/36703
236         PR fortran/36528
237         * trans-expr.c (gfc_conv_function_val): Stabilize Cray-pointer
238         function references to ensure that a valid expression is used.
239         (gfc_conv_function_call): Pass Cray pointers to procedures.
240
241 2009-02-03  Jakub Jelinek  <jakub@redhat.com>
242
243         * gfortranspec.c (lang_specific_driver): Update copyright notice
244         dates.
245
246 2009-01-28  Paul Thomas  <pault@gcc.gnu.org>
247
248         PR fortran/38852
249         PR fortran/39006
250         * trans-intrinsic.c (gfc_conv_intrinsic_bound): Use the array
251         descriptor ubound for UBOUND, when the array lbound == 1.
252
253 2009-01-27  Daniel Kraft  <d@domob.eu>
254
255         PR fortran/38883
256         * trans-stmt.c (gfc_conv_elemental_dependencies):  Create temporary
257         for the real type needed to make it work for subcomponent-references.
258
259 2009-01-21  Daniel Kraft  <d@domob.eu>
260
261         * trans-stmt.c (gfc_conv_elemental_dependencies):  Cleaned up comment.
262
263 2009-01-20  Paul Thomas  <pault@gcc.gnu.org>
264
265         PR fortran/38907
266         * resolve.c (check_host_association): Remove the matching to
267         correct an incorrect host association and use manipulation of
268         the expression instead.
269
270 2009-01-20  Tobias Burnus  <burnus@net-b.de>
271
272         * invoke.texi (RANGE): RANGE also takes INTEGER arguments.
273
274 2009-01-19  Mikael Morin  <mikael.morin@tele2.fr>
275
276         PR fortran/38859
277         * simplify.c (simplify_bound): Don't use array specification
278         if variable or component has subsequent references.
279
280 2009-01-17  Paul Thomas  <pault@gcc.gnu.org>
281
282         PR fortran/38657
283         * module.c (write_common_0): Add argument 'this_module' and
284         check that non-use associated common blocks are written first.
285         (write_common): Call write_common_0 twice, once with true and
286         then with false.
287
288 2009-01-17  Paul Thomas  <pault@gcc.gnu.org>
289
290         PR fortran/34955
291         * trans-intrinsic.c (gfc_conv_intrinsic_array_transfer): Has
292         been absorbed into gfc_conv_intrinsic_transfer. All
293         references to it in trans-intrinsic.c have been changed
294         accordingly.  PR fixed by using a temporary for scalar
295         character transfer, when the source is shorter than the
296         destination.
297
298 2009-01-17  Paul Thomas  <pault@gcc.gnu.org>
299
300         PR fortran/38657
301         * module.c (write_common_0): Revert patch of 2009-01-05.
302
303 2009-01-16  Janus Weil  <janus@gcc.gnu.org>
304
305         PR fortran/38152
306         * expr.c (gfc_check_pointer_assign): Allow use-associated procedure
307         pointers as lvalue.
308         * trans-decl.c (get_proc_pointer_decl,gfc_create_module_variable):
309         Enable procedure pointers as module variables.
310
311 2009-01-14  Steven G. Kargl  <kargl@gcc.gnu.org>
312
313         * ChangeLog-2007: Clean out svn merge droppings.
314
315 2009-01-10  Paul Thomas  <pault@gcc.gnu.org>
316
317         PR fortran/38763
318         * target-memory.c (encode_derived): Encode NULL.
319
320 2009-01-10  Paul Thomas  <pault@gcc.gnu.org>
321
322         PR fortran/38765
323         * resolve.c (check_host_association): Use the symtree name to
324         search for a potential contained procedure, since this is the
325         name by which it would be referenced.
326
327 2009-01-06  Thomas Koenig  <tkoenig@gcc.gnu.org>
328
329         PR fortran/38220
330         * interface.c (gfc_procedure_use):  Don't warn about functions
331         from ISO_C_BINDING.
332         * symbol.c (generate_isocbinding_symbol):  Mark c_loc and
333         c_funloc as pure.
334
335 2009-01-05  Paul Thomas  <pault@gcc.gnu.org>
336
337         PR fortran/38657
338         * module.c (write_common_0): Use the name of the symtree rather
339         than the common block, to determine if the common has been
340         written.
341
342 2009-01-05  Daniel Franke  <franke.daniel@gmail.com>
343
344         PR fortran/37159
345         * check.c (gfc_check_random_seed): Added size check for GET
346         dummy argument, reworded error messages to follow common pattern.
347
348 2009-01-05  Thomas Koenig  <tkoenig@gcc.gnu.org>
349
350         PR fortran/38672
351         * trans-types.c (gfc_get_derived_type):  Check for the
352         presence of derived->ns->proc_name before
353         accessing derived->ns->proc_name->attr.flavor .
354         * resolve.c (resolve_symbol):  Likewise.
355
356 2009-01-05  Paul Thomas  <pault@gcc.gnu.org>
357
358         PR fortran/38665
359         * gfortran.h : Add bit to gfc_expr 'user_operator'
360         * interface.c (gfc_extend_expr): Set the above if the operator
361         is substituted by a function. 
362         * resolve.c (check_host_association): Return if above is set.
363
364 2009-01-04  Mikael Morin  <mikael.morin@tele2.fr>
365
366         PR fortran/35681
367         * ChangeLog-2008: Fix function name.
368
369         PR fortran/38487
370         * dependency.c (gfc_check_argument_var_dependency):
371         Move the check for pointerness inside the if block
372         so that it doesn't affect the return value.
373
374         PR fortran/38669
375         * trans-stmt.c (gfc_trans_call):
376         Add the dependency code after the loop bounds calculation one.
377
378 2009-01-04  Daniel Franke  <franke.daniel@gmail.com>
379
380         * intrinsic.c (do_simplify): Removed already implemented TODO.
381
382 2009-01-04  Daniel Franke  <franke.daniel@gmail.com>
383
384         PR fortran/38718
385         * simplify.c (gfc_simplify_merge): New.
386         * intrinsic.h (gfc_simplify_merge): New prototype.
387         * intrinsic.c (add_functions): Added simplification for MERGE.
388
389 2009-01-04  Mikael Morin  <mikael.morin@tele2.fr>
390
391         PR fortran/38536
392         * gfortran.h (gfc_is_data_pointer): Added prototype
393         * resolve.c (gfc_iso_c_func_interface):
394         Use gfc_is_data_pointer to test for pointer attribute.
395         * dependency.c (gfc_is_data_pointer):
396         Support pointer-returning functions.
397
398 2009-01-03  Daniel Franke  <franke.daniel@gmail.com>
399
400         * symbol.c (save_symbol): Don't SAVE function results.
401
402 2009-01-03  Paul Thomas  <pault@gcc.gnu.org>
403
404         PR fortran/38594
405         * resolve.c (resolve_call): When searching for proper host
406         association, use symtree rather than symbol.  For everything
407         except generic subroutines, substitute the symtree in the call
408         rather than the symbol.