OSDN Git Service

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