OSDN Git Service

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