]> gcc.gnu.org Git - gcc.git/blob - gcc/fortran/ChangeLog
re PR fortran/36382 (Support $ as first character in symbol names and in IMPLICT)
[gcc.git] / gcc / fortran / ChangeLog
1 2009-05-07 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2
3 PR fortran/36382
4 * invoke.texi: Document that -fdollar-ok does not allow $ to be
5 used in IMPLICIT statement.
6
7 2009-05-06 Janus Weil <janus@gcc.gnu.org>
8 Paul Thomas <pault@gcc.gnu.org>
9
10 PR fortran/39630
11 * decl.c (match_procedure_interface): New function to match the
12 interface for a PROCEDURE statement.
13 (match_procedure_decl): Call match_procedure_interface.
14 (match_ppc_decl): New function to match the declaration of a
15 procedure pointer component.
16 (gfc_match_procedure): Call match_ppc_decl.
17 (match_binding_attributes): Add new argument 'ppc' and handle the
18 POINTER attribute for procedure pointer components.
19 (match_procedure_in_type,gfc_match_generic): Added new argument to
20 match_binding_attributes.
21 * dump-parse-tree.c (show_expr,show_components,show_code_node): Handle
22 procedure pointer components.
23 * expr.c (free_expr0,gfc_copy_expr,gfc_simplify_expr): Handle EXPR_PPC.
24 (gfc_check_pointer_assign): Handle procedure pointer components, but no
25 full checking yet.
26 (is_proc_ptr_comp): New function to determine if an expression is a
27 procedure pointer component.
28 * gfortran.h (expr_t): Add EXPR_PPC.
29 (symbol_attribute): Add new member 'proc_pointer_comp'.
30 (gfc_component): Add new member 'formal'.
31 (gfc_exec_op): Add EXEC_CALL_PPC.
32 (gfc_get_default_type): Changed first argument.
33 (is_proc_ptr_comp): Add prototype.
34 (gfc_match_varspec): Add new argument.
35 * interface.c (compare_actual_formal): Handle procedure pointer
36 components.
37 * match.c (gfc_match_pointer_assignment,match_typebound_call): Handle
38 procedure pointer components.
39 * module.c (mio_expr): Handle EXPR_PPC.
40 * parse.c (parse_derived): Handle procedure pointer components.
41 * primary.c (gfc_match_varspec): Add new argument 'ppc_arg' and handle
42 procedure pointer components.
43 (gfc_variable_attr): Handle procedure pointer components.
44 (gfc_match_rvalue): Added new argument to gfc_match_varspec and changed
45 first argument of gfc_get_default_type.
46 (match_variable): Added new argument to gfc_match_varspec.
47 * resolve.c (resolve_entries,set_type,resolve_fl_parameter): Changed
48 first argument of gfc_get_default_type.
49 (resolve_structure_cons,resolve_actual_arglist): Handle procedure
50 pointer components.
51 (resolve_ppc_call): New function to resolve a call to a procedure
52 pointer component (subroutine).
53 (resolve_expr_ppc): New function to resolve a call to a procedure
54 pointer component (function).
55 (gfc_resolve_expr): Handle EXPR_PPC.
56 (resolve_code): Handle EXEC_CALL_PPC.
57 (resolve_fl_derived): Copy the interface for a procedure pointer
58 component.
59 (resolve_symbol): Fix overlong line.
60 * st.c (gfc_free_statement): Handle EXEC_CALL_PPC.
61 * symbol.c (gfc_get_default_type): Changed first argument.
62 (gfc_set_default_type): Changed first argument of gfc_get_default_type.
63 (gfc_add_component): Initialize ts.type to BT_UNKNOWN.
64 * trans.h (gfc_conv_function_call): Renamed.
65 * trans.c (gfc_trans_code): Handle EXEC_CALL_PPC.
66 * trans-expr.c (gfc_conv_component_ref): Ditto.
67 (gfc_conv_function_val): Rename to 'conv_function_val', add new
68 argument 'expr' and handle procedure pointer components.
69 (gfc_conv_operator_assign): Renamed gfc_conv_function_val.
70 (gfc_apply_interface_mapping_to_expr): Handle EXPR_PPC.
71 (gfc_conv_function_call): Rename to 'gfc_conv_procedure_call', add new
72 argument 'expr' and handle procedure pointer components.
73 (gfc_get_proc_ptr_comp): New function to get the backend decl for a
74 procedure pointer component.
75 (gfc_conv_function_expr): Renamed gfc_conv_function_call.
76 (gfc_conv_structure): Handle procedure pointer components.
77 * trans-intrinsic.c (gfc_conv_intrinsic_funcall,
78 conv_generic_with_optional_char_arg): Renamed gfc_conv_function_call.
79 * trans-stmt.h (gfc_get_proc_ptr_comp): Add prototype.
80 * trans-stmt.c (gfc_trans_call): Renamed gfc_conv_function_call.
81 * trans-types.h (gfc_get_ppc_type): Add prototype.
82 * trans-types.c (gfc_get_ppc_type): New function to build a tree node
83 for a procedure pointer component.
84 (gfc_get_derived_type): Handle procedure pointer components.
85
86 2009-05-06 Tobias Burnus <burnus@net-b.de>
87
88 PR fortran/40041
89 * resolve.c (resolve_symbol): Print no warning for implicitly
90 typed intrinsic functions.
91
92 2009-05-05 Janus Weil <janus@gcc.gnu.org>
93
94 PR fortran/39998
95 * expr.c (gfc_check_pointer_assign): Check for statement functions and
96 internal procedures in procedure pointer assignments.
97
98 2009-04-28 Janus Weil <janus@gcc.gnu.org>
99
100 PR fortran/39946
101 * resolve.c (resolve_symbol): Correctly copy the interface of a
102 PROCEDURE statement if the interface involves a RESULT variable.
103
104 2009-04-28 Janus Weil <janus@gcc.gnu.org>
105
106 PR fortran/39930
107 PR fortran/39931
108 * expr.c (gfc_check_pointer_assign): Correctly detect if the left hand
109 side is a pointer.
110 * parse.c (gfc_fixup_sibling_symbols): Don't check for ambiguity.
111
112 2009-04-28 Paul Thomas <pault@gcc.gnu.org>
113
114 PR fortran/39879
115 * trans_expr.c (gfc_conv_procedure_call): Deep copy a derived
116 type parentheses argument if it is a variable with allocatable
117 components.
118
119 2009-04-27 Ian Lance Taylor <iant@google.com>
120
121 * trans-intrinsic.c (DEFINE_MATH_BUILTIN): Add casts to enum
122 type.
123 * trans-io.c (st_parameter_field): Add casts to enum type.
124
125 2009-04-26 Steven G. Kargl <kargl@gcc.gnu.org>
126
127 PR fortran/39893
128 fortran/data.c (gfc_assign_data_value): If the lvalue is an
129 assumed character length entity in a data statement, then
130 return FAILURE to prevent segmentation fault.
131
132 2009-04-26 Jakub Jelinek <jakub@redhat.com>
133
134 * trans-decl.c: Include pointer-set.h.
135 (nonlocal_dummy_decl_pset, tree nonlocal_dummy_decls): New variables.
136 (gfc_nonlocal_dummy_array_decl): New function.
137 (gfc_get_symbol_decl): Call it for non-local dummy args with saved
138 descriptor.
139 (gfc_get_symbol_decl): Set DECL_BY_REFERENCE when needed.
140 (gfc_generate_function_code): Initialize nonlocal_dummy_decl{s,_pset},
141 chain it to outermost block's vars, destroy it afterwards.
142 * Make-lang.in (trans-decl.o): Depend on pointer-set.h.
143
144 2009-04-25 Janus Weil <janus@gcc.gnu.org>
145
146 PR fortran/39688
147 * decl.c (gfc_match_import): Use 'sym->name' instead of 'name'.
148 They differ if the symbol has been use-renamed.
149
150 2009-04-24 Ian Lance Taylor <iant@google.com>
151
152 * gfortran.h (enum gfc_symbol_type): New named enum type, broken
153 out of struct gfc_symbol.
154 (struct gfc_symbol): Use enum gfc_symbol_type.
155 (enum gfc_array_ref_dimen_type): New named enum type, broken out
156 of struct gfc_array_ref).
157 (struct gfc_array_ref): Use enum gfc_array_ref_dimen_type.
158 (mod_pointee_as): Update declaration.
159 * decl.c (add_global_entry): Change type to enum gfc_symbol_type.
160 (gfc_mod_pointee_as): Change return type to "match".
161 * module.c (mio_array_ref): Add cast to enum type.
162 (mio_symbol): Likewise.
163 * resolve.c (resolve_global_procedure): Change type to enum
164 gfc_symbol_type.
165 * trans-io.c (gfc_build_st_parameter): Change type to unsigned
166 int.
167
168 2009-04-24 Daniel Kraft <d@domob.eu>
169
170 * gfortran.h (gfc_get_typebound_proc): Removed as macro, now a function.
171 (struct gfc_symtree): Moved `typebound' member inside union.
172 (struct gfc_namespace): Add `tb_sym_root' as new symtree to sort out
173 type-bound procedures there.
174 (gfc_get_tbp_symtree): New procedure.
175 * symbol.c (tentative_tbp_list): New global.
176 (gfc_get_namespace): NULL new `tb_sym_root' member.
177 (gfc_new_symtree): Removed initialization of `typebound' member.
178 (gfc_undo_symbols): Process list of tentative tbp's.
179 (gfc_commit_symbols): Ditto.
180 (free_tb_tree): New method.
181 (gfc_free_namespace): Call it.
182 (gfc_get_typebound_proc): New method.
183 (gfc_get_tbp_symtree): New method.
184 (gfc_find_typebound_proc): Adapt to structural changes of gfc_symtree
185 and gfc_namespace with regards to tbp's.
186 * dump-parse-tree.c (show_typebound): Ditto.
187 * primary.c (gfc_match_varspec): Ditto. Don't reference tbp-symbol
188 as it isn't a symbol any longer.
189 * module.c (mio_typebound_symtree): Adapt to changes.
190 (mio_typebound_proc): Ditto, create symtrees using `gfc_get_tbp_symtree'
191 rather than `gfc_get_sym_tree'.
192 (mio_f2k_derived): Ditto.
193 * decl.c (match_procedure_in_type): Ditto.
194 (gfc_match_generic): Ditto. Don't reference tbp-symbol.
195 * resolve.c (check_typebound_override): Adapt to changes.
196 (resolve_typebound_generic): Ditto.
197 (resolve_typebound_procedures): Ditto.
198 (ensure_not_abstract_walker): Ditto.
199 (ensure_not_abstract): Ditto.
200 (resolve_typebound_procedure): Ditto, ignore erraneous symbols (for
201 instance, through removed tentative ones).
202 * gfc-internals.texi (Type-bound procedures): Document changes.
203
204 2009-04-24 Janus Weil <janus@gcc.gnu.org>
205
206 PR fortran/39861
207 PR fortran/39864
208 * symbol.c (gfc_copy_formal_args_intr): Set attr.flavor and attr.dummy
209 for the formal arguments.
210
211 2009-04-21 Taras Glek <tglek@mozilla.com>
212
213 * f95-lang.c: Update GTY annotations to new syntax.
214 * trans-intrinsic.c: Likewise.
215 * trans-io.c: Likewise.
216 * trans.h: Likewise.
217
218 2009-04-22 Janus Weil <janus@gcc.gnu.org>
219
220 PR fortran/39735
221 * decl.c (add_hidden_procptr_result): Bugfix for procptr results.
222 (match_procedure_decl): Set if_source.
223 * expr.c (gfc_check_pointer_assign): Bugfix: Return after error.
224 And: Check interface also for IFSRC_UNKNOWN (return type may be known).
225 * gfortran.h (typedef enum ifsrc): Remove IFSRC_USAGE,
226 add documentation. Rename copy_formal_args and copy_formal_args_intr.
227 * interface.c (gfc_compare_interfaces): Check for return types,
228 handle IFSRC_UNKNOWN.
229 (compare_intr_interfaces,compare_actual_formal_intr): Obsolete, removed.
230 (gfc_procedure_use): Modified handling of intrinsics.
231 * intrinsic.c (add_functions): Bugfix for "dim".
232 * resolve.c (resolve_intrinsic): New function to resolve intrinsics,
233 which copies the interface from isym to sym.
234 (resolve_procedure_expression,resolve_function): Use new function
235 'resolve_intrinsic'.
236 (resolve_symbol): Add function attribute for externals with return type
237 and use new function 'resolve_intrinsic'.
238 * symbol.c (ifsrc_types): Remove string for IFSRC_USAGE.
239 (copy_formal_args): Renamed to gfc_copy_formal_args.
240 (copy_formal_args_intr): Renamed to gfc_copy_formal_args_intr.
241 * trans-const.c (gfc_conv_const_charlen): Handle cl==NULL.
242
243 2009-04-21 Joseph Myers <joseph@codesourcery.com>
244
245 * ChangeLog, ChangeLog-2002, ChangeLog-2003, ChangeLog-2004,
246 ChangeLog-2005, ChangeLog-2006, ChangeLog-2007, ChangeLog-2008,
247 ChangeLog.ptr, config-lang.in, ioparm.def, mathbuiltins.def: Add
248 copyright and license notices.
249 * ChangeLog, ChangeLog-2005, ChangeLog-2006, ChangeLog-2007,
250 ChangeLog-2008: Correct dates.
251
252 2009-04-20 Tobias Burnus <burnus@net-b.de>
253
254 PR fortran/39811
255 * scanner.c (load_line): Fix bogus "&" compile-time diagnostic.
256
257 2009-04-20 Paul Thomas <pault@gcc.gnu.org>
258
259 PR fortran/39800
260 * resolve.c (is_sym_host_assoc): New function.
261 (resolve_fl_derived): Call it when checking PRIVATE components
262 of PUBLIC derived types. Change gfc_error to a gfc_notify_std
263 with std=f2003.
264 (resolve_fl_namelist): Call it twice to check for host
265 association.
266
267 2009-04-20 Ian Lance Taylor <iant@google.com>
268
269 * module.c (import_iso_c_binding_module): Add casts to enum type.
270 * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Change op to enum
271 tree_code.
272 (gfc_conv_intrinsic_anyall): Likewise.
273 (gfc_conv_intrinsic_arith): Likewise.
274 (gfc_conv_intrinsic_minmaxloc): Likewise.
275 (gfc_conv_intrinsic_minmaxval): Likewise.
276 (gfc_conv_intrinsic_bitop): Likewise.
277 (gfc_conv_intrinsic_singlebitop): Likewise.
278 (gfc_conv_intrinsic_strcmp): Likewise.
279
280 2009-04-20 Vasilis Liaskovitis <vliaskov@gmail.com>
281 Jakub Jelinek <jakub@redhat.com>
282
283 PR fortran/35423
284 * trans.h (OMPWS_WORKSHARE_FLAG, OMPWS_CURR_SINGLEUNIT,
285 OMPWS_SCALARIZER_WS, OMPWS_NOWAIT): Define.
286 (ompws_flags): New extern decl.
287 * trans-array.c (gfc_trans_scalarized_loop_end): Build OMP_FOR
288 for the outer dimension if ompws_flags allow it.
289 * trans.c (gfc_generate_code): Clear ompws_flags.
290 * trans-expr.c (gfc_trans_assignment_1): Allow worksharing
291 array assignments inside of !$omp workshare.
292 * trans-stmt.c (gfc_trans_where_3): Similarly for where statements
293 and constructs.
294 * trans-openmp.c (ompws_flags): New variable.
295 (gfc_trans_omp_workshare): Rewritten.
296
297 2009-04-11 Daniel Kraft <d@domob.eu>
298
299 PR fortran/37746
300 * gfortran.h (struct gfc_charlen): New field `passed_length' to store
301 the actual passed string length for dummy arguments.
302 * trans-decl.c (gfc_create_string_length): Formatting fixes and added
303 assertion, moved a local variable into the innermost block it is needed.
304 (create_function_arglist): Removed TODO about the check being
305 implemented and initialize cl->passed_length here.
306 (add_argument_checking): New method.
307 (gfc_generate_function_code): Call the argument checking method.
308
309 2009-04-11 Janus Weil <janus@gcc.gnu.org>
310
311 PR fortran/39692
312 * symbol.c (check_conflict): Reject procedure pointers for -std=f95.
313
314 2009-04-11 Daniel Franke <franke.daniel@gmail.com>
315
316 * resolve.c (resolve_global_procedure): Enable whole-file checking for
317 procedures that are declared later in the file.
318
319 2009-04-10 Paolo Bonzini <bonzini@gnu.org>
320
321 PR middle-end/39701
322 * trans.c (gfc_allocate_with_status): Fix type mismatches
323 on "pstat == 0".
324
325 2009-04-10 Daniel Franke <franke.daniel@gmail.com>
326
327 PR fortran/38709
328 * expr.c (find_array_section): Leave early on zero-sized arrays.
329
330 2009-04-09 Janus Weil <janus@gcc.gnu.org>
331
332 PR fortran/36704
333 * decl.c (add_hidden_procptr_result): New function for handling
334 procedure pointer return values by adding a hidden result variable.
335 (variable_decl,match_procedure_decl,gfc_match_function_decl,
336 gfc_match_subroutine,gfc_match_end,attr_decl1): Handle procedure pointer
337 return values.
338 * parse.c (parse_interface): Add EXTERNAL attribute only after
339 FUNCTION/SUBROUTINE declaration is complete.
340 * primary.c (replace_hidden_procptr_result): New function for replacing
341 function symbol by hidden result variable.
342 (gfc_match_rvalue,match_variable): Replace symbol by hidden result
343 variable.
344 * resolve.c (resolve_contained_fntype,resolve_function,resolve_variable,
345 resolve_symbol): Allow for procedure pointer function results.
346 (resolve_fl_procedure): Conflict detection moved here from
347 'check_conflict'.
348 * symbol.c (gfc_check_function_type): Allow for procedure pointer
349 function results.
350 (check_conflict): Move some conflict detection to resolution stage.
351 * trans-types.c (gfc_sym_type,gfc_get_function_type): Handle hidden
352 result variables.
353
354 2009-04-08 Jakub Jelinek <jakub@redhat.com>
355
356 * trans-types.c (gfc_init_types): Ensure gfc_integer_types doesn't
357 contain TYPE_STRING_FLAG types.
358
359 2009-04-08 Janne Blomqvist <jb@gcc.gnu.org>
360
361 PR fortran/39670
362 * invoke.texi (fdollar-ok): Fix typo.
363
364 2009-04-08 Daniel Franke <franke.daniel@gmail.com>
365
366 PR fortran/39670
367 * invoke.texi (fdollar-ok): Clarify limitations.
368
369 2009-04-08 Paul Thomas <pault@gcc.gnu.org>
370
371 PR fortran/38863
372 * trans-array.c (gfc_trans_deferred_array): Return if this
373 is a result variable.
374
375 2009-04-07 Janus Weil <janus@gcc.gnu.org>
376
377 PR fortran/38152
378 * trans-decl.c (gfc_get_symbol_decl): Correctly set decl location for
379 procedure pointer decls.
380
381 2009-04-07 Janus Weil <janus@gcc.gnu.org>
382
383 PR fortran/38290
384 * expr.c (gfc_check_pointer_assign): Enable interface check for
385 procedure pointers.
386 * gfortran.h: Add copy_formal_args_intr.
387 * interface.c (gfc_compare_interfaces): Call gfc_compare_intr_interfaces
388 if second argument is an intrinsic.
389 (compare_intr_interfaces): Correctly set attr.function, attr.subroutine
390 and ts.
391 (compare_parameter): Call gfc_compare_interfaces also for intrinsics.
392 * resolve.c (resolve_specific_f0,resolve_specific_s0): Don't resolve
393 intrinsic interfaces here. Must happen earlier.
394 (resolve_symbol): Resolution of intrinsic interfaces moved here from
395 resolve_specific_..., and formal args are now copied from intrinsic
396 interfaces.
397 * symbol.c (copy_formal_args_intr): New function to copy the formal
398 arguments from an intinsic procedure.
399
400 2009-04-06 Paul Thomas <pault@gcc.gnu.org>
401
402 PR fortran/38863
403 * dependency.c (ref_same_as_full_array): New function.
404 (gfc_dep_resolver): Call it.
405
406 2009-04-06 Janus Weil <janus@gcc.gnu.org>
407
408 PR fortran/39414
409 * decl.c (match_procedure_decl): Fix double declaration problems with
410 PROCEDURE statements.
411 * symbol.c (gfc_add_type): Ditto.
412
413 2009-04-06 Paul Thomas <pault@gcc.gnu.org>
414
415 PR fortran/36091
416 * trans-array.c (gfc_conv_array_ref): If the symbol has the
417 temporary attribute use the array_spec for the bounds.
418 * gfortran.h : Add the temporary field to the structure
419 'symbol_attribute'.
420 * trans-stmt.c (forall_make_variable_temp): Set the symbol's
421 temporary attribute.
422
423 2009-04-05 Daniel Franke <franke.daniel@gmail.com>
424
425 PR fortran/29458
426 * trans-array.c (gfc_trans_array_constructor_value): Shadow
427 implied do-loop variable to avoid spurious middle-end warnings.
428
429 2009-04-04 Tobias Burnus <burnus@net-b.de>
430
431 PR fortran/39577
432 * trans-decl.c (gfc_generate_function_code): Move recursive
433 check to the right position.
434
435 2009-04-04 Paul Thomas <pault@gcc.gnu.org>
436
437 PR fortran/37614
438 * trans-common.c (translate_common): Do not offset the whole
439 coomon block.
440
441 2009-04-03 Tobias Burnus <burnus@net-b.de>
442
443 PR fortran/39594
444 * resolve.c (resolve_common_vars): Add FL_VARIABLE to symbol
445 if it is not a procedure pointer.
446 * primary.c (match_actual_arg): Ditto.
447
448 2009-03-31 Joseph Myers <joseph@codesourcery.com>
449
450 PR preprocessor/15638
451 * cpp.c (cb_cpp_error): Handle CPP_DL_FATAL.
452
453 2009-03-30 Steven G. Kargl <kargls@comcast.net>
454
455 PR fortran/38389
456 * trans-stmt.c(gfc_trans_allocate): Add translation of ERRMSG.
457 (gfc_trans_deallocate): Add translation of ERRMSG. Remove stale
458 comments. Minor whitespace cleanup.
459 * resolve.c(is_scalar_expr_ptr): Whitespace cleanup.
460 (resolve_deallocate_expr (gfc_expr *e): Update error message.
461 (resolve_allocate_expr): Remove dead code. Update error message.
462 Move error checking to ...
463 (resolve_allocate_deallocate): ... here. Add additional error
464 checking for STAT, ERRMSG, and allocate-objects.
465 * match.c(gfc_match_allocate,gfc_match_deallocate): Parse ERRMSG.
466 Check for redundant uses of STAT and ERRMSG. Reword error message
467 and add checking for pointer, allocatable, and proc_pointer attributes.
468
469 2009-03-30 Paul Thomas <pault@gcc.gnu.org>
470
471 PR fortran/22571
472 PR fortran/26227
473 PR fortran/24886
474 * symbol.c : Add gfc_global_ns_list.
475 * decl.c (add_global_entry): Set the namespace ('ns') field.
476 * gfortran.h : Add the resolved field to gfc_namespace. Add the
477 namespace ('ns') field to gfc_gsymbol. Add flag_whole_file to
478 gfc_option_t. Add the prototype for gfc_free_dt_list.
479 * lang.opt : Add the whole-file option.
480 * invoke.texi : Document the whole-file option.
481 * resolve.c (resolve_global_procedure): If the fwhole-file
482 option is set, reorder gsymbols to ensure that translation is
483 in the right order. Resolve the gsymbol's namespace if that
484 has not occurred and then check interfaces.
485 (resolve_function): Move call to resolve_global_procedure.
486 (resolve_call): The same.
487 (resolve_codes): Store the current labels_obstack.
488 (gfc_resolve) : Return if the namespace is already resolved.
489 trans-decl.c (gfc_get_extern_function_decl): If the whole_file
490 option is selected, use the backend_decl of a gsymbol, if it is
491 available.
492 parse.c (add_global_procedure, add_global_program): If the flag
493 whole-file is set, add the namespace to the gsymbol.
494 (gfc_parse_file): On -fwhole-file, put procedure namespaces on
495 the global namespace list. Rearrange to do resolution of all
496 the procedures in a file, followed by their translation.
497 * options.c (gfc_init_options): Add -fwhole-file.
498 (gfc_handle_option): The same.
499
500 2009-03-30 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
501
502 * f95-lang.c (gfc_init_builtin_functions): Define BUILT_IN_HUGE_VAL
503 family of intrinsics instead of BUILT_IN_INF family.
504 * trans-intrinsics.c (gfc_conv_intrinsic_nearest): Use
505 BUILT_IN_HUGE_VAL instead of BUILT_IN_INF.
506
507 2009-03-30 Jakub Jelinek <jakub@redhat.com>
508
509 * trans-types.c (gfc_sym_type, gfc_return_by_reference): For
510 sym->attr.result check sym->ns->proc_name->attr.is_bind_c.
511
512 2009-03-30 Joseph Myers <joseph@codesourcery.com>
513
514 PR rtl-optimization/323
515 * options.c (gfc_post_options): Set
516 flag_excess_precision_cmdline. Give an error for
517 -fexcess-precision=standard for processors where the option is
518 significant.
519
520 2009-03-29 Joseph Myers <joseph@codesourcery.com>
521
522 PR preprocessor/34695
523 * cpp.c (cb_cpp_error): New.
524 (gfc_cpp_post_options): Don't set cpp_option->inhibit_warnings.
525 Don't check cpp_errors (cpp_in).
526 (gfc_cpp_init_0): Set cb->error.
527
528 2009-03-29 Steven G. Kargl <kargl@gcc.gnu.org>
529
530 PR fortran/38823
531 * gfortran.h: Add ARITH_PROHIBIT to arith enum.
532 expr.c (gfc_match_init_expr): Add global variable init_flag to
533 flag matching an initialization expression.
534 (check_intrinsic_op): Move no longer reachable error message to ...
535 * arith.c (arith_power): ... here. Remove gfc_ prefix in
536 gfc_arith_power. Use init_flag. Allow constant folding of x**y
537 when y is REAL or COMPLEX.
538 (eval_intrinsic): Remove restriction that y in x**y must be INTEGER
539 for constant folding.
540 * gfc_power: Update gfc_arith_power to arith_power
541
542 2009-03-29 Daniel Kraft <d@domob.eu>
543
544 PR fortran/37423
545 * gfortran.h (struct gfc_typebound_proc): Added new flag `deferred' and
546 added a comment explaining DEFERRED binding handling.
547 * decl.c (match_binding_attributes): Really match DEFERRED attribute.
548 (match_procedure_in_type): Really match PROCEDURE(interface) syntax
549 and do some validity checks for DEFERRED and this construct.
550 * module.c (binding_overriding): New string constant for DEFERRED.
551 (mio_typebound_proc): Module-IO DEFERRED flag.
552 * resolve.c (check_typebound_override): Ensure that a non-DEFERRED
553 binding is not overridden by a DEFERRED one.
554 (resolve_typebound_procedure): Allow abstract interfaces as targets
555 for DEFERRED bindings.
556 (ensure_not_abstract_walker), (ensure_not_abstract): New methods.
557 (resolve_fl_derived): Use new `ensure_not_abstract' method for
558 non-ABSTRACT types extending ABSTRACT ones to ensure each DEFERRED
559 binding is overridden.
560 (check_typebound_baseobject): New method.
561 (resolve_compcall), (resolve_typebound_call): Check base-object of
562 the type-bound procedure call.
563 * gfc-internals.texi (Type-bound procedures): Document a little bit
564 about internal handling of DEFERRED bindings.
565
566 2009-03-29 Tobias Schlüter <tobi@gcc.gnu.org>
567
568 PR fortran/38507
569 * gfortran.h (gfc_st_label): Fix comment.
570 (gfc_exec_op): Add statement code EXEC_END_BLOCK for end of block.
571 * parse.c (accept_statement): Use EXEC_END_BLOCK for END IF and
572 END SELECT with labels.
573 (check_do_closure): Fix formatting.
574 (parse_do_block): Fix typo in error message.
575 * resolve.c (code_stack): Remove tail member. Update comment to
576 new use of reachable_labels.
577 (reachable_labels): Rename to ...
578 (find_reachable_labels): ... this. Overhaul. Update preceding
579 comment.
580 (resolve_branch): Fix comment preceding function. Rewrite.
581 (resolve_code): Update call to find_reachable_labels. Add code to
582 deal with EXEC_END_BLOCK.
583 * st.c (gfc_free_statement): Add code to deal with EXEC_END_BLOCK.
584 Add 2009 to copyright years.
585 * trans.c (gfc_trans_code): Likewise on both counts.
586
587 2009-03-31 Paul Thomas <pault@gcc.gnu.org>
588
589 PR fortran/38917
590 * expr.c (gfc_check_assign): Allow pointer components when
591 checking for NULL.
592
593 PR fortran/38918
594 * resolve.c (check_data_variable): Treat pointer arrays with
595 scalars.
596
597 2009-03-31 Paul Thomas <pault@gcc.gnu.org>
598
599 PR fortran/38915
600 * trans-expr.c (gfc_trans_assignment_1): Ensure temporaries
601 have a string_length.
602
603 2009-03-28 Tobias Burnus <burnus@net-b.de>
604
605 PR fortran/34656
606 * trans-stmt.c (gfc_trans_simple_do, gfc_trans_do):
607 Add GFC_RTCHECK_DO support.
608 * option.c (gfc_handle_runtime_check_option): Enable GFC_RTCHECK_DO.
609 * invoke.texi (-fcheck): Document "do" option.
610
611 2009-03-28 Paul Thomas <pault@gcc.gnu.org>
612
613 PR fortran/38538
614 * trans-array.c (get_elemental_fcn_charlen): Remove.
615 (get_array_charlen): New function to replace previous.
616
617 2009-03-28 Paul Thomas <pault@gcc.gnu.org>
618
619 PR fortran/38765
620 * parse.c (parse_derived): Do not break on finding pointer,
621 allocatable or private components.
622
623 2009-03-28 Tobias Burnus <burnus@net-b.de>
624
625 PR fortran/32626
626 * option.c (gfc_handle_runtime_check_option): Enable recursion check.
627 * trans-decl.c (gfc_generate_function_code): Add recursion check.
628 * invoke.texi (-fcheck): Add recursive option.
629
630 2009-03-28 Tobias Burnus <burnus@net-b.de>
631
632 PR fortran/38432
633 * resolve.c (gfc_resolve_iterator): Add zero-loop warning.
634
635 2009-03-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
636 Paul Thomas <pault@gcc.gnu.org>
637 Tobias Burnus <burnus@net-b.de>
638
639 * gfortran.h (gfc_option_t): Add rtcheck.
640 * lang.opt: New option -fcheck.
641 * libgfortran.h: Add GFC_RTCHECK_* constants.
642 * invoke.texi: Document -fcheck.
643 * options.c (gfc_handle_runtime_check_option): New function.
644 (gfc_init_options,gfc_post_options,gfc_handle_option):
645 Add -fcheck option.
646
647 2009-03-27 Richard Guenther <rguenther@suse.de>
648
649 * trans-array.c (gfc_conv_descriptor_data_addr): Use
650 gfc_build_addr_expr instead of build_fold_addr_expr.
651 (gfc_trans_allocate_array_storage, gfc_trans_array_constructor_value,
652 gfc_trans_constant_array_constructor, gfc_conv_array_data,
653 gfc_conv_expr_descriptor, gfc_conv_array_parameter): Likewise.
654 * trans-expr.c (gfc_conv_missing_dummy, gfc_conv_variable,
655 gfc_conv_function_val, gfc_conv_operator_assign,
656 gfc_conv_subref_array_arg, gfc_conv_function_call,
657 gfc_conv_expr_reference, gfc_trans_scalar_assign): Likewise.
658 * trans-intrinsic.c (gfc_conv_intrinsic_exponent,
659 gfc_conv_intrinsic_ctime, gfc_conv_intrinsic_fdate,
660 gfc_conv_intrinsic_ttynam, gfc_conv_intrinsic_minmax_char,
661 gfc_conv_intrinsic_fraction, gfc_conv_intrinsic_spacing,
662 gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_set_exponent,
663 gfc_conv_intrinsic_array_transfer, gfc_conv_intrinsic_transfer,
664 gfc_conv_intrinsic_si_kind, gfc_conv_intrinsic_trim): Likewise.
665 * trans-io.c (gfc_trans_io_runtime_check, set_parameter_ref,
666 gfc_convert_array_to_string, gfc_trans_open, gfc_trans_close,
667 build_filepos, gfc_trans_inquire, gfc_trans_wait,
668 nml_get_addr_expr, transfer_namelist_element, build_dt,
669 gfc_trans_dt_end, transfer_array_component, transfer_expr,
670 transfer_array_desc, gfc_trans_transfer): Likewise.
671 * trans-stmt.c (gfc_trans_allocate, gfc_trans_deallocate): Likewise.
672 * trans.c (gfc_build_addr_expr): Mark the base of the address
673 TREE_ADDRESSABLE.
674
675 2009-03-27 Tobias Burnus <burnus@net-b.de>
676
677 * gfortran.h (enum init_local_real.): Add GFC_INIT_REAL_SNAN.
678 (gfc_expr): Add is_snan.
679 * trans-const.c (gfc_conv_mpfr_to_tree): Support SNaN.
680 (gfc_conv_constant_to_tree): Update call to gfc_conv_mpfr_to_tree.
681 * trans-const.h (gfc_conv_mpfr_to_tree): Update prototype.
682 * resolve.c (build_default_init_expr): Update call.
683 * target-memory.c (encode_float): Ditto.
684 * trans-intrinsic.c (gfc_conv_intrinsic_aint,gfc_conv_intrinsic_mod,
685
686 2009-03-18 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
687
688 * lang.opt: Unify help texts for -I, -Wconversion, -d, -fopenmp,
689 and -fpreprocessed.
690
691 2009-03-06 Alexandre Oliva <aoliva@redhat.com>
692
693 * simplify.c (gfc_simplify_transfer): Zero-initialize the
694 buffer.
695
696 2009-02-27 Tobias Burnus <burnus@net-b.de>
697
698 PR fortran/39309
699 * module.c (read_md5_from_module_file): Add missing quote.
700
701 2009-02-27 Tobias Burnus <burnus@net-b.de>
702
703 PR fortran/39309
704 * module.c (read_md5_from_module_file): Include mod version
705 in had-changed test.
706
707 2009-02-26 Paul Thomas <pault@gcc.gnu.org>
708
709 PR fortran/39295
710 * interface.c (compare_type_rank_if): Return 1 if the symbols
711 are the same and deal with external procedures where one is
712 identified to be a function or subroutine by usage but the
713 other is not.
714
715 2009-02-26 Paul Thomas <pault@gcc.gnu.org>
716
717 PR fortran/39292
718 * trans-array.c (gfc_conv_array_initializer): Convert all
719 expressions rather than ICEing.
720
721 2009-02-21 Thomas Koenig <tkoenig@gcc.gnu.org>
722
723 PR fortran/38914
724 * array.c (ref_dimen_size): Rename to gfc_ref_dimen_size,
725 make global. Change function name in error messages.
726 (ref_size): Change ref_dimen_size to gfc_ref_dimen_size.
727 (gfc_array_ref_shape): Likewise.
728 * gfortran.h: Add prototype for gfc_ref_dimen_size.
729 * simplify.c (simplify_bound_dim): Add ref argument.
730 If the reference isn't a full array, return one for
731 the lower bound and the extent for the upper bound.
732 (simplify_bound): For array sections, take as from the
733 argument. Add reference to all to simplify_bound_dim.
734
735 2009-02-19 Daniel Franke <franke.daniel@gmail.com>
736
737 * scanner.c (load_line): At end of line, skip '\r' without setting
738 the truncation flag.
739
740 2009-02-18 Daniel Kraft <d@domob.eu>
741
742 * gfortran.texi: New chapter about compiler characteristics.
743 (Compiler Characteristics): Document KIND type parameters here.
744
745 2009-02-18 Tobias Burnus <burnus@net-b.de>
746
747 * intrinsic.texi (MALLOC): Make example more portable.
748
749 2009-02-13 Mikael Morin <mikael.morin@tele2.fr>
750
751 PR fortran/38259
752 * module.c (gfc_dump_module,gfc_use_module): Add module
753 version number.
754
755 2009-02-13 Paul Thomas <pault@gcc.gnu.org>
756
757 PR fortran/36703
758 PR fortran/36528
759 * trans-expr.c (gfc_conv_function_val): Stabilize Cray-pointer
760 function references to ensure that a valid expression is used.
761 (gfc_conv_function_call): Pass Cray pointers to procedures.
762
763 2009-02-03 Jakub Jelinek <jakub@redhat.com>
764
765 * gfortranspec.c (lang_specific_driver): Update copyright notice
766 dates.
767
768 2009-01-28 Paul Thomas <pault@gcc.gnu.org>
769
770 PR fortran/38852
771 PR fortran/39006
772 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Use the array
773 descriptor ubound for UBOUND, when the array lbound == 1.
774
775 2009-01-27 Daniel Kraft <d@domob.eu>
776
777 PR fortran/38883
778 * trans-stmt.c (gfc_conv_elemental_dependencies): Create temporary
779 for the real type needed to make it work for subcomponent-references.
780
781 2009-01-21 Daniel Kraft <d@domob.eu>
782
783 * trans-stmt.c (gfc_conv_elemental_dependencies): Cleaned up comment.
784
785 2009-01-20 Paul Thomas <pault@gcc.gnu.org>
786
787 PR fortran/38907
788 * resolve.c (check_host_association): Remove the matching to
789 correct an incorrect host association and use manipulation of
790 the expression instead.
791
792 2009-01-20 Tobias Burnus <burnus@net-b.de>
793
794 * invoke.texi (RANGE): RANGE also takes INTEGER arguments.
795
796 2009-01-19 Mikael Morin <mikael.morin@tele2.fr>
797
798 PR fortran/38859
799 * simplify.c (simplify_bound): Don't use array specification
800 if variable or component has subsequent references.
801
802 2009-01-17 Paul Thomas <pault@gcc.gnu.org>
803
804 PR fortran/38657
805 * module.c (write_common_0): Add argument 'this_module' and
806 check that non-use associated common blocks are written first.
807 (write_common): Call write_common_0 twice, once with true and
808 then with false.
809
810 2009-01-17 Paul Thomas <pault@gcc.gnu.org>
811
812 PR fortran/34955
813 * trans-intrinsic.c (gfc_conv_intrinsic_array_transfer): Has
814 been absorbed into gfc_conv_intrinsic_transfer. All
815 references to it in trans-intrinsic.c have been changed
816 accordingly. PR fixed by using a temporary for scalar
817 character transfer, when the source is shorter than the
818 destination.
819
820 2009-01-17 Paul Thomas <pault@gcc.gnu.org>
821
822 PR fortran/38657
823 * module.c (write_common_0): Revert patch of 2009-01-05.
824
825 2009-01-16 Janus Weil <janus@gcc.gnu.org>
826
827 PR fortran/38152
828 * expr.c (gfc_check_pointer_assign): Allow use-associated procedure
829 pointers as lvalue.
830 * trans-decl.c (get_proc_pointer_decl,gfc_create_module_variable):
831 Enable procedure pointers as module variables.
832
833 2009-01-14 Steven G. Kargl <kargl@gcc.gnu.org>
834
835 * ChangeLog-2007: Clean out svn merge droppings.
836
837 2009-01-10 Paul Thomas <pault@gcc.gnu.org>
838
839 PR fortran/38763
840 * target-memory.c (encode_derived): Encode NULL.
841
842 2009-01-10 Paul Thomas <pault@gcc.gnu.org>
843
844 PR fortran/38765
845 * resolve.c (check_host_association): Use the symtree name to
846 search for a potential contained procedure, since this is the
847 name by which it would be referenced.
848
849 2009-01-06 Thomas Koenig <tkoenig@gcc.gnu.org>
850
851 PR fortran/38220
852 * interface.c (gfc_procedure_use): Don't warn about functions
853 from ISO_C_BINDING.
854 * symbol.c (generate_isocbinding_symbol): Mark c_loc and
855 c_funloc as pure.
856
857 2009-01-05 Paul Thomas <pault@gcc.gnu.org>
858
859 PR fortran/38657
860 * module.c (write_common_0): Use the name of the symtree rather
861 than the common block, to determine if the common has been
862 written.
863
864 2009-01-05 Daniel Franke <franke.daniel@gmail.com>
865
866 PR fortran/37159
867 * check.c (gfc_check_random_seed): Added size check for GET
868 dummy argument, reworded error messages to follow common pattern.
869
870 2009-01-05 Thomas Koenig <tkoenig@gcc.gnu.org>
871
872 PR fortran/38672
873 * trans-types.c (gfc_get_derived_type): Check for the
874 presence of derived->ns->proc_name before
875 accessing derived->ns->proc_name->attr.flavor .
876 * resolve.c (resolve_symbol): Likewise.
877
878 2009-01-05 Paul Thomas <pault@gcc.gnu.org>
879
880 PR fortran/38665
881 * gfortran.h : Add bit to gfc_expr 'user_operator'
882 * interface.c (gfc_extend_expr): Set the above if the operator
883 is substituted by a function.
884 * resolve.c (check_host_association): Return if above is set.
885
886 2009-01-04 Mikael Morin <mikael.morin@tele2.fr>
887
888 PR fortran/35681
889 * ChangeLog-2008: Fix function name.
890
891 PR fortran/38487
892 * dependency.c (gfc_check_argument_var_dependency):
893 Move the check for pointerness inside the if block
894 so that it doesn't affect the return value.
895
896 PR fortran/38669
897 * trans-stmt.c (gfc_trans_call):
898 Add the dependency code after the loop bounds calculation one.
899
900 2009-01-04 Daniel Franke <franke.daniel@gmail.com>
901
902 * intrinsic.c (do_simplify): Removed already implemented TODO.
903
904 2009-01-04 Daniel Franke <franke.daniel@gmail.com>
905
906 PR fortran/38718
907 * simplify.c (gfc_simplify_merge): New.
908 * intrinsic.h (gfc_simplify_merge): New prototype.
909 * intrinsic.c (add_functions): Added simplification for MERGE.
910
911 2009-01-04 Mikael Morin <mikael.morin@tele2.fr>
912
913 PR fortran/38536
914 * gfortran.h (gfc_is_data_pointer): Added prototype
915 * resolve.c (gfc_iso_c_func_interface):
916 Use gfc_is_data_pointer to test for pointer attribute.
917 * dependency.c (gfc_is_data_pointer):
918 Support pointer-returning functions.
919
920 2009-01-03 Daniel Franke <franke.daniel@gmail.com>
921
922 * symbol.c (save_symbol): Don't SAVE function results.
923
924 2009-01-03 Paul Thomas <pault@gcc.gnu.org>
925
926 PR fortran/38594
927 * resolve.c (resolve_call): When searching for proper host
928 association, use symtree rather than symbol. For everything
929 except generic subroutines, substitute the symtree in the call
930 rather than the symbol.
931
932 \f
933 Copyright (C) 2009 Free Software Foundation, Inc.
934
935 Copying and distribution of this file, with or without modification,
936 are permitted in any medium without royalty provided the copyright
937 notice and this notice are preserved.
This page took 0.084289 seconds and 6 git commands to generate.