OSDN Git Service

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