1 2008-07-19 Tobias Burnus <burnus@net-b.de>
4 * scanner.c (load_file): Add argument to destinguish between
5 true filename and displayed filename.
6 (include_line,gfc_new_file): Adapt accordingly.
8 2008-07-19 Tobias Burnus <burnus@net-b.de>
10 * check.c (gfc_check_cshift,gfc_check_eoshift,gfc_check_unpack): Add rank
11 checks for cshift's shift and eoshift's shift and boundary args.
12 (gfc_check_unpack): Add rank and shape tests for unpack.
14 2008-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16 * gfortran.h (new): Remove macro.
17 * array.c (gfc_append_constructor, match_array_list,
18 gfc_match_array_constructor): Likewise.
19 * bbt.c (insert, gfc_insert_bbt): Likewise.
20 * decl.c (var_element, top_var_list, top_val_list, gfc_match_data,
21 get_proc_name): Likewise.
22 * expr.c (gfc_copy_actual_arglist): Likewise.
23 * interface.c (compare_actual_formal, check_new_interface,
24 gfc_add_interface): Likewise.
25 * intrinsic.c gfc_convert_type_warn, gfc_convert_chartype):
27 * io.c (match_io_iterator, match_io_list): Likewise.
28 * match.c (match_forall_header): Likewise.
29 * matchexp.c (build_node): Likewise.
30 * module.c (gfc_match_use): Likewise.
31 * scanner.c (load_file): Likewise.
32 * st.c (gfc_append_code): Likewise.
33 * symbol.c (save_symbol_data, gfc_get_sym_tree, gfc_undo_symbols,
34 gfc_commit_symbols): Likewise.
35 * trans-common.c (build_field): Likewise.
36 * trans-decl.c (gfc_finish_var_decl): Likewise.
37 * trans-expr.c (gfc_free_interface_mapping,
38 gfc_get_interface_mapping_charlen, gfc_add_interface_mapping,
39 gfc_finish_interface_mapping,
40 gfc_apply_interface_mapping_to_expr): Likewise.
41 * trans.h (gfc_interface_sym_mapping): Likewise.
43 2008-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
45 * gfortran.h (operator): Remove macro.
46 (gfc_namespace, gfc_expr): Avoid C++ keywords.
47 * arith.c (eval_intrinsic, eval_intrinsic_f2, eval_intrinsic_f3):
49 * decl.c (access_attr_decl): Likewise.
50 * dependency.c (gfc_dep_compare_expr): Likewise.
51 * dump-parse-tree.c (show_expr, show_uop, show_namespace):
53 * expr.c (gfc_copy_expr, gfc_type_convert_binary,
54 simplify_intrinsic_op, check_intrinsic_op): Likewise.
55 * interface.c (fold_unary, gfc_match_generic_spec,
56 gfc_match_interface, gfc_match_end_interface,
57 check_operator_interface, check_uop_interfaces,
58 gfc_check_interfaces, gfc_extend_expr, gfc_extend_assign,
59 gfc_add_interface, gfc_current_interface_head,
60 gfc_set_current_interface_head): Likewise.
61 * iresolve.c (gfc_resolve_dot_product, gfc_resolve_matmul):
63 * matchexp.c (gfc_get_parentheses, build_node): Likewise.
64 * module.c (gfc_use_rename, gfc_match_use, find_use_name_n,
65 number_use_names, mio_expr, load_operator_interfaces, read_module,
66 write_operator, write_module): Likewise.
67 * openmp.c (resolve_omp_atomic): Likewise.
68 * resolve.c (resolve_operator, gfc_resolve_character_operator,
69 gfc_resolve_uops): Likewise.
70 * symbol.c (free_uop_tree, gfc_free_namespace): Likewise.
71 * trans-expr.c (gfc_conv_expr_op): Likewise.
72 * trans-openmp.c (gfc_trans_omp_atomic): Likewise.
74 2008-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
76 * gfortran.h (protected): Remove macro.
77 * dump-parse-tree.c (show_attr): Avoid C++ keywords.
78 * expr.c (gfc_check_pointer_assign): Likewise.
79 * interface.c (compare_parameter_protected): Likewise.
80 * intrinsic.c (enum class, add_sym, add_sym_0, add_sym_1,
81 add_sym_1s, add_sym_1m, add_sym_2, add_sym_2s, add_sym_3,
82 add_sym_3ml, add_sym_3red, add_sym_3s, add_sym_4, add_sym_4s,
83 add_sym_5s): Likewise.
84 * match.c (gfc_match_assignment, gfc_match_pointer_assignment):
86 * module.c (mio_symbol_attribute): Likewise.
87 * primary.c (match_variable): Likewise.
88 * resolve.c (resolve_equivalence): Likewise.
89 * symbol.c (check_conflict, gfc_add_protected, gfc_copy_attr):
91 * trans-types.c (gfc_get_array_type_bounds): Likewise.
93 2008-07-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
95 * arith.c (eval_type_intrinsic0): Avoid C++ keywords.
96 * gfortran.h (try, protected, operator, new): Likewise.
98 2008-07-17 Tobias Burnus <burnus@net-b.de>
102 * array.c (gfc_match_array_spec): Fix array-rank check.
103 * resolve.c (resolve_fl_derived): Fix constentness check
104 for the array dimensions.
106 2008-07-14 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
108 * Make-lang.in (gfortranspec.o): Fix dependencies.
110 2008-07-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
113 * io.c: Add error check for g0 edit descriptor followed by '.'.
115 2008-07-12 Daniel Kraft <d@domob.eu>
117 * resolve.c (resolve_fl_derived): Allow pointer components to empty
118 derived types fixing a missing part of PR fortran/33221.
120 2008-07-10 Daniel Kraft <d@domob.eu>
122 * gfc-internals.texi (section gfc_expr): Created documentation about
123 the gfc_expr internal data structure.
125 2008-07-07 Thomas Koenig <tkoenig@gcc.gnu.org>
128 * iresolve.c (gfc_resolve_product): Set shape of return
130 (gfc_resolve_sum): Likewise.
132 2008-07-07 Jakub Jelinek <jakub@redhat.com>
135 * f95-lang.c (poplevel): Don't ever add subblocks to
136 global_binding_level.
138 2008-07-02 Janus Weil <janus@gcc.gnu.org>
139 Tobias Burnus <burnus@net-b.de>
140 Paul Thomas <pault@gcc.gnu.org>
143 * gfortran.h (struct gfc_symbol): New member "proc_pointer".
144 * check.c (gfc_check_associated,gfc_check_null): Implement
146 * decl.c (match_procedure_decl): Ditto.
147 * expr.c (gfc_check_pointer_assign,gfc_check_assign_symbol): Ditto.
148 * interface.c (compare_actual_formal): Ditto.
150 * match.c (gfc_match_pointer_assignment): Ditto.
151 * parse.c (parse_interface): Ditto.
152 * primary.c (gfc_match_rvalue,match_variable): Ditto.
153 * resolve.c (resolve_fl_procedure): Ditto.
154 * symbol.c (check_conflict,gfc_add_external,gfc_add_pointer,
155 gfc_copy_attr,gen_fptr_param,build_formal_args): Ditto.
156 * trans-decl.c (get_proc_pointer_decl,gfc_get_extern_function_decl,
157 create_function_arglist): Ditto.
158 * trans-expr.c (gfc_conv_variable,gfc_conv_function_val,
159 gfc_conv_function_call,gfc_trans_pointer_assignment): Ditto.
161 2008-07-02 Thomas Koenig <tkoenig@gcc.gnu.org>
165 * iresolve.c (resolve_mask_arg): Don't convert mask to
166 kind=1 logical if it is of that type already.
168 2008-06-29 Thomas Koenig <tkoenig@gcc.gnu.org>
171 * iresolve.c (gfc_resolve_matmul): Copy shapes
174 2008-06-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
176 * invoke.texi: Add documentation for runtime behavior of
179 2008-06-28 Daniel Kraft <d@domob.eu>
181 * gfc-internals.texi (section gfc_code): Extended documentation about
182 gfc_code in the internal datastructures chapter including details about
183 how IF, DO and SELECT blocks look like and an example for how the
184 block-chaining works.
186 2008-06-25 Paul Thomas <pault@gcc.gnu.org>
189 * interface.c (check_intents): Correct error where the actual
190 arg was checked for a pointer argument, rather than the formal.
192 2008-06-24 Paul Thomas <pault@gcc.gnu.org>
195 * expr.c (gfc_check_assign): Change message and locus for
196 error when conform == 0.
198 2008-06-23 Jakub Jelinek <jakub@redhat.com>
201 * cpp.c (cpp_define_builtins): Change _OPENMP value to 200805.
203 2008-06-20 Laurynas Biveinis <laurynas.biveinis@gmail.com>
204 Tobias Burnus <burnus@net-b.de>
208 * scanner.c (preprocessor_line): do not call gfc_free for
209 current_file->filename if it differs from filename.
211 2008-06-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
213 * arith.c (hollerith2representation): Fix for -Wc++-compat.
214 * array.c (gfc_get_constructor): Likewise.
215 * decl.c (gfc_get_data_variable, gfc_get_data_value, gfc_get_data,
216 create_enum_history, gfc_match_final_decl): Likewise.
217 * error.c (error_char): Likewise.
218 * expr.c (gfc_get_expr, gfc_copy_expr): Likewise.
219 * gfortran.h (gfc_get_charlen, gfc_get_array_spec,
220 gfc_get_component, gfc_get_formal_arglist, gfc_get_actual_arglist,
221 gfc_get_namelist, gfc_get_omp_clauses, gfc_get_interface,
222 gfc_get_common_head, gfc_get_dt_list, gfc_get_array_ref,
223 gfc_get_ref, gfc_get_equiv, gfc_get_case, gfc_get_iterator,
224 gfc_get_alloc, gfc_get_wide_string): Likewise.
225 * interface.c (count_types_test): Likewise.
226 * intrinsic.c (add_char_conversions, gfc_intrinsic_init_1):
228 * io.c (gfc_match_open, gfc_match_close, match_filepos, match_io,
229 gfc_match_inquire, gfc_match_wait): Likewise.
230 * match.c (gfc_match, match_forall_iterator): Likewise.
231 * module.c (gfc_get_pointer_info, gfc_get_use_rename, add_fixup,
232 add_true_name, parse_string, write_atom, quote_string,
233 mio_symtree_ref, mio_gmp_real, write_common_0): Likewise.
234 * options.c (gfc_post_options): Likewise.
235 * primary.c (match_integer_constant, match_hollerith_constant,
236 match_boz_constant, match_real_constant,
237 gfc_get_structure_ctor_component, gfc_match_structure_constructor): Likewise.
238 * scanner.c (gfc_widechar_to_char, add_path_to_list,
239 add_file_change, load_line, get_file, preprocessor_line,
240 load_file, unescape_filename, gfc_read_orig_filename): Likewise.
241 * simplify.c (gfc_simplify_ibits, gfc_simplify_ishft,
242 gfc_simplify_ishftc): Likewise.
243 * symbol.c (gfc_get_st_label, gfc_get_namespace, gfc_new_symtree,
244 gfc_get_uop, gfc_new_symbol, save_symbol_data, gfc_get_gsymbol):
246 * target-memory.c (gfc_target_interpret_expr): Likewise.
247 * trans-const.c (gfc_build_wide_string_const): Likewise.
248 * trans-expr.c (gfc_add_interface_mapping): Likewise.
249 * trans-intrinsic.c (gfc_conv_intrinsic_conversion,
250 gfc_conv_intrinsic_int, gfc_conv_intrinsic_lib_function,
251 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_ctime,
252 gfc_conv_intrinsic_fdate, gfc_conv_intrinsic_ttynam,
253 gfc_conv_intrinsic_minmax, gfc_conv_intrinsic_minmax_char,
254 gfc_conv_intrinsic_ishftc, gfc_conv_intrinsic_index_scan_verify,
255 gfc_conv_intrinsic_merge, gfc_conv_intrinsic_trim): Likewise.
256 * trans.c (gfc_get_backend_locus): Likewise.
257 * trans.h (gfc_get_ss): Likewise.
259 2008-06-18 Daniel Kraft <d@domob.eu>
261 PR fortran/36517, fortran/36492
262 * array.c (gfc_resolve_character_array_constructor): Call
263 gfc_set_constant_character_len with changed length-chec argument.
264 * decl.c (gfc_set_constant_character_len): Changed array argument to
265 be a generic length-checking argument that can be used for correct
266 checking with typespec and in special cases where the should-be length
267 is different from the target length.
268 (build_struct): Call gfc_set_constant_character_len with changed length
269 checking argument and introduced additional checks for exceptional
270 conditions on invalid code.
271 (add_init_expr_to_sym), (do_parm): Call gfc_set_constant_character_len
272 with changed argument.
273 * match.h (gfc_set_constant_character_len): Changed third argument to
274 int for the should-be length rather than bool.
276 2008-06-17 Daniel Kraft <d@domob.eu>
279 * array.c (gfc_resolve_character_array_constructor): Check that all
280 elements with constant character length have the same one rather than
281 fixing it if no typespec is given, emit an error if they don't. Changed
282 return type to "try" and return FAILURE for the case above.
283 (gfc_resolve_array_constructor): Removed unneeded call to
284 gfc_resolve_character_array_constructor in this function.
285 * gfortran.h (gfc_resolve_character_array_constructor): Returns try.
286 * trans-array.c (get_array_ctor_strlen): Return length of first element
287 rather than last element.
288 * resolve.c (gfc_resolve_expr): Handle FAILURE return from
289 gfc_resolve_character_array_constructor.
291 2008-06-17 Paul Thomas <pault@gcc.gnu.org>
294 * resolve.c (add_dt_to_dt_list): New function.
295 (resolve_fl_derived): Call new function for pointer components
296 and when derived type resolved.
298 2008-06-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
301 * trans-decl.c (gfc_generate_function_code): Add range_check to options
304 2008-06-15 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
306 * gfc-internals.texi: Expand TABs, drop indentation outside examples.
307 * gfortran.texi: Likewise.
308 * intrinsic.texi: Likewise.
309 * invoke.texi: Likewise.
311 2008-06-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
314 * trans-io.c (gfc_build_io_library_fndecls): Build declaration for
315 transfer_character_wide which includes passing in the character kind to
316 support wide character IO. (transfer_expr): If the kind == 4, create the
317 argument and build the call.
318 * gfortran.texi: Fix typo.
320 2008-06-13 Tobias Burnus <burnus@net-b.de>
323 * decl.c (do_parm): Handle init expression for len=*.
325 2008-06-12 Tobias Burnus <burnus@net-b.de>
328 * trans-intrinsic.c (gfc_conv_intrinsic_index_scan_verify):
329 Fix passing of the BACK= argument.
331 2008-06-10 Jerry DeLisle <jvdelisle@gcc.gnu.org>
333 * cpp.c: Add copyright notice.
334 * cpp.h: Add copyright notice.
336 2008-06-08 Janus Weil <janus@gcc.gnu.org>
339 * decl.c (match_procedure_decl): Correctly recognize if the interface
340 is an intrinsic procedure.
342 2008-06-08 Tobias Burnus <burnus@net-b.de>
345 * resolve.c (resolve_symbol): Copy more attributes for
346 PROCEDUREs with interfaces.
348 2008-06-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
352 * io.c (check_format): Add new error message for zero width.
353 Use new error message for FMT_A and with READ, FMT_G. Allow
354 FMT_G with WRITE except when -std=F95 and -std=F2003.
356 2008-06-07 Tobias Burnus <burnus@net-b.de>
359 * intrinsic.c (add_functions): Implement c_sizeof.
360 * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): Do not
361 create unneeded variable in the scalar case.
362 * intrinsic.texi: Add C_SIZEOF documentation.
364 2008-06-06 Tobias Burnus <burnus@net-b.de>
366 * intrinsic.texi (BESSEL_J1): Fix BES(S)EL_J1 typo.
368 2008-06-06 Jakub Jelinek <jakub@redhat.com>
370 * scanner.c (skip_free_comments, skip_fixed_comments): Handle tabs.
371 * parse.c (next_free): Allow tab after !$omp.
372 (decode_omp_directive): Handle !$omp task, !$omp taskwait
374 (case_executable): Add ST_OMP_TASKWAIT.
375 (case_exec_markers): Add ST_OMP_TASK.
376 (gfc_ascii_statement): Handle ST_OMP_TASK, ST_OMP_END_TASK and
378 (parse_omp_structured_block, parse_executable): Handle ST_OMP_TASK.
379 * gfortran.h (gfc_find_sym_in_expr): New prototype.
380 (gfc_statement): Add ST_OMP_TASK, ST_OMP_END_TASK and ST_OMP_TASKWAIT.
381 (gfc_omp_clauses): Add OMP_SCHED_AUTO to sched_kind,
382 OMP_DEFAULT_FIRSTPRIVATE to default_sharing. Add collapse and
384 (gfc_exec_op): Add EXEC_OMP_TASK and EXEC_OMP_TASKWAIT.
385 * f95-lang.c (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
386 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP, LANG_HOOKS_OMP_CLAUSE_DTOR,
387 LANG_HOOKS_OMP_PRIVATE_OUTER_REF): Define.
388 * trans.h (gfc_omp_clause_default_ctor): Add another argument.
389 (gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op,
390 gfc_omp_clause_dtor, gfc_omp_private_outer_ref): New prototypes.
391 * types.def (BT_ULONGLONG, BT_PTR_ULONGLONG,
392 BT_FN_BOOL_ULONGLONGPTR_ULONGLONGPTR,
393 BT_FN_BOOL_BOOL_ULL_ULL_ULL_ULLPTR_ULLPTR,
394 BT_FN_BOOL_BOOL_ULL_ULL_ULL_ULL_ULLPTR_ULLPTR,
395 BT_FN_VOID_PTR_PTR, BT_PTR_FN_VOID_PTR_PTR,
396 BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT): New.
397 (BT_BOOL): Use integer type with BOOL_TYPE_SIZE rather
398 than boolean_type_node.
399 * dump-parse-tree.c (gfc_show_omp_node): Handle EXEC_OMP_TASK,
400 EXEC_OMP_TASKWAIT, OMP_SCHED_AUTO, OMP_DEFAULT_FIRSTPRIVATE,
401 untied and collapse clauses.
402 (gfc_show_code_node): Handle EXEC_OMP_TASK and EXEC_OMP_TASKWAIT.
403 * trans.c (gfc_trans_code): Handle EXEC_OMP_TASK and
405 * st.c (gfc_free_statement): Likewise.
406 * resolve.c (gfc_resolve_blocks, resolve_code): Likewise.
407 (find_sym_in_expr): Rename to...
408 (gfc_find_sym_in_expr): ... this. No longer static.
409 (resolve_allocate_expr, resolve_ordinary_assign): Adjust caller.
410 * match.h (gfc_match_omp_task, gfc_match_omp_taskwait): New
412 * openmp.c (resolve_omp_clauses): Allow allocatable arrays in
413 firstprivate, lastprivate, reduction, copyprivate and copyin
415 (omp_current_do_code): Made static.
416 (omp_current_do_collapse): New variable.
417 (gfc_resolve_omp_do_blocks): Compute omp_current_do_collapse,
418 clear omp_current_do_code and omp_current_do_collapse on return.
419 (gfc_resolve_do_iterator): Handle collapsed do loops.
420 (resolve_omp_do): Likewise, diagnose errorneous collapsed do loops.
421 (OMP_CLAUSE_COLLAPSE, OMP_CLAUSE_UNTIED): Define.
422 (gfc_match_omp_clauses): Handle default (firstprivate),
423 schedule (auto), untied and collapse (n) clauses.
424 (OMP_DO_CLAUSES): Add OMP_CLAUSE_COLLAPSE.
425 (OMP_TASK_CLAUSES): Define.
426 (gfc_match_omp_task, gfc_match_omp_taskwait): New functions.
427 * trans-openmp.c (gfc_omp_private_outer_ref): New function.
428 (gfc_omp_clause_default_ctor): Add outer argument. For allocatable
429 arrays allocate them with the bounds of the outer var if outer
431 (gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op,
432 gfc_omp_clause_dtor): New functions.
433 (gfc_trans_omp_array_reduction): If decl is allocatable array,
434 allocate it with outer var's bounds in OMP_CLAUSE_REDUCTION_INIT
435 and deallocate it in OMP_CLAUSE_REDUCTION_MERGE.
436 (gfc_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
437 for assumed-size arrays.
438 (gfc_trans_omp_do): Add par_clauses argument. If dovar is
439 present in lastprivate clause and do loop isn't simple,
440 set OMP_CLAUSE_LASTPRIVATE_STMT. If dovar is present in
441 parallel's lastprivate clause, change it to shared and add
442 lastprivate clause to OMP_FOR_CLAUSES. Handle collapsed do loops.
443 (gfc_trans_omp_directive): Adjust gfc_trans_omp_do callers.
444 (gfc_trans_omp_parallel_do): Likewise. Move collapse clause to
445 OMP_FOR from OMP_PARALLEL.
446 (gfc_trans_omp_clauses): Handle OMP_SCHED_AUTO,
447 OMP_DEFAULT_FIRSTPRIVATE, untied and collapse clauses.
448 (gfc_trans_omp_task, gfc_trans_omp_taskwait): New functions.
449 (gfc_trans_omp_directive): Handle EXEC_OMP_TASK and
452 2008-06-04 Janus Weil <janus@gcc.gnu.org>
456 * resolve.c (resolve_symbol): Correctly copy the interface for a
457 PROCEDURE declaration.
459 2008-06-02 Janus Weil <janus@gcc.gnu.org>
462 * symbol.c (gfc_add_allocatable,gfc_add_dimension,
463 gfc_add_explicit_interface): Added checks.
464 * decl.c (attr_decl1): Added missing "var_locus".
465 * parse.c (parse_interface): Checking for errors.
467 2008-06-02 Daniel Kraft <d@domob.eu>
469 * gfortran.h: New statement-type ST_FINAL for FINAL declarations.
470 (struct gfc_symbol): New member f2k_derived.
471 (struct gfc_namespace): New member finalizers, for use in the above
472 mentioned f2k_derived namespace.
473 (struct gfc_finalizer): New type defined for finalizers linked list.
474 * match.h (gfc_match_final_decl): New function header.
475 * decl.c (gfc_match_derived_decl): Create f2k_derived namespace on
476 constructed symbol node.
477 (gfc_match_final_decl): New function to match a FINAL declaration line.
478 * parse.c (decode_statement): match-call for keyword FINAL.
479 (parse_derived): Parse CONTAINS section and accept FINAL statements.
480 * resolve.c (gfc_resolve_finalizers): New function to resolve (that is
481 in this case, check) a list of finalizer procedures.
482 (resolve_fl_derived): Call gfc_resolve_finalizers here.
483 * symbol.c (gfc_get_namespace): Initialize new finalizers to NULL.
484 (gfc_free_namespace): Free finalizers list.
485 (gfc_new_symbol): Initialize new f2k_derived to NULL.
486 (gfc_free_symbol): Free f2k_derived namespace.
487 (gfc_free_finalizer): New function to free a single gfc_finalizer node.
488 (gfc_free_finalizer_list): New function to free a linked list of
491 2008-06-02 Daniel Franke <franke.daniel@gmail.com>
495 * cpp.c (gfc_cpp_init): Do not initialize builtins if
496 processing already preprocessed input.
497 (gfc_cpp_preprocess): Finalize output with newline.
499 2008-05-31 Jerry DeLisle <jvdelisle@gcc.gnu.org>
501 * intrinsic.texi: Revert wrong commit.
503 2008-05-31 Steven G. Kargl <kargls@comcast.net>
505 * arith.c (gfc_arith_init_1): Remove now unused r and c variables.
506 Cleanup numerical inquiry function initialization.
507 (gfc_arith_done_1): Replace multiple mpfr_clear() invocations with
508 a single mpfr_clears().
509 (gfc_check_real_range): Re-arrange logic to eliminate multiple
510 unnecessary branching and assignments.
511 (gfc_arith_times): Use mpfr_clears() in preference to multiple
513 (gfc_arith_divide): Ditto.
514 (complex_reciprocal): Eliminate now unused variables a, re, im.
515 Cleanup the mpfr abuse. Use mpfr_clears() in preference to
516 multiple mpfr_clear().
517 (complex_pow): Fix comment whitespace. Use mpfr_clears() in
518 preference to multiple mpfr_clear().
519 * simplify.c (gfc_simplify_and): Remove blank line.
520 (gfc_simplify_atan2): Move error checking earlier to eliminate
521 a now unnecessay gfc_free_expr().
522 (gfc_simplify_bessel_j0): Remove unnecessary gfc_set_model_kind().
523 (gfc_simplify_bessel_j1): Ditto.
524 (gfc_simplify_bessel_jn): Ditto.
525 (gfc_simplify_bessel_y0): Ditto.
526 (gfc_simplify_bessel_y1): Ditto.
527 (gfc_simplify_bessel_yn): Ditto.
528 (only_convert_cmplx_boz): Eliminate unnecessary duplicate code, and
529 combine nested if statement rational expressions.
530 (gfc_simplify_cos): Use mpfr_clears() in preference to multiple
532 (gfc_simplify_exp): Ditto.
533 (gfc_simplify_fraction): Move gfc_set_model_kind() to after the
534 special case of 0. Use mpfr_clears() in preference to multiple
536 (gfc_simplify_gamma): Eliminate unnecessary gfc_set_model_kind().
537 (gfc_simplify_lgamma): Ditto.
538 (gfc_simplify_log10): Ditto.
539 (gfc_simplify_log): Move gfc_set_model_kind () inside switch
540 statement. Use mpfr_clears() in preference to multiple mpfr_clear().
541 (gfc_simplify_mod): Eliminate now unused variables quot, iquot,
542 and term. Simplify the mpfr magic.
543 (gfc_simplify_modulo): Ditto.
544 (gfc_simplify_nearest): Eliminate unnecessary gfc_set_model_kind().
545 (gfc_simplify_scale): Use mpfr_clears() in preference to multiple
547 (gfc_simplify_sin): Ditto
548 (gfc_simplify_sqrt): Ditto
549 (gfc_simplify_set_exponent): Move gfc_set_model_kind() to after the
550 special case of 0. Use mpfr_clears() in preference to multiple
553 2008-05-29 Daniel Franke <franke.daniel@gmail.com>
556 * Make-lang.in (F95_OBJS): Added dependency on FORTRAN_TARGET_OBJS.
558 2008-05-29 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
560 * scanner.c (load_line): Add first_char argument. Don't call ungetc.
561 (gfc_read_orig_filename): Adjust call to load_line. Don't call
563 (load_file): Adjust call to load_line.
565 2008-05-28 Janus Weil <janus@gcc.gnu.org>
569 * interface.c (gfc_procedure_use): Enable argument checking for
570 external procedures with explicit interface.
571 * symbol.c (check_conflict): Fix conflict checking for externals.
572 (copy_formal_args): Fix handling of arrays.
573 * resolve.c (resolve_specific_f0, resolve_specific_s0): Fix handling
575 * parse.c (parse_interface): Non-abstract INTERFACE statement implies
578 2008-05-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
581 * intrinsic.c (gfc_convert_chartype): Don't mark conversion
583 * trans-array.c (gfc_trans_array_ctor_element): Divide element
584 size by the size of one character to obtain length.
585 * iresolve.c (gfc_resolve_cshift): Call the _char4 variant when
587 (gfc_resolve_eoshift): Likewise.
588 * trans-intrinsic.c (gfc_conv_intrinsic_ctime): Minor beautification.
589 (gfc_conv_intrinsic_fdate): Minor beautification.
590 (gfc_conv_intrinsic_ttynam): Minor beautification.
591 (gfc_conv_intrinsic_minmax_char): Allow all character kinds.
592 (size_of_string_in_bytes): New function.
593 (gfc_conv_intrinsic_size): Call size_of_string_in_bytes for
594 character expressions.
595 (gfc_conv_intrinsic_sizeof): Likewise.
596 (gfc_conv_intrinsic_array_transfer): Likewise.
597 (gfc_conv_intrinsic_trim): Allow all character kinds. Minor
599 (gfc_conv_intrinsic_repeat): Fix comment typo.
600 * simplify.c (gfc_convert_char_constant): Take care of conversion
601 of array constructors.
603 2008-05-27 Tobias Burnus <burnus@net-b.de>
606 * trans-array.c (gfc_set_loop_bounds_from_array_spec):
607 Add missing fold_convert.
609 2008-05-26 Daniel Franke <franke.daniel@gmail.com>
611 * fortran/cpp.c (cpp_define_builtins): Remove usage of TARGET_* macros,
614 2008-05-26 Daniel Franke <franke.daniel@gmail.com>
617 * lang.opt (A, C, CC, D, E, H, P, U, cpp, d, fworking-directory,
618 imultilib, iprefix, iquote, isysroot, isystem, nocpp, nostdinc,
619 o, undef, v): New options.
620 * options.c (gfc_init_options): Also initialize preprocessor
622 (gfc_post_options): Also handle post-initialization of preprocessor
624 (gfc_handle_option): Check if option is a preprocessor option.
625 If yes, let gfc_cpp_handle_option() handle the option.
626 * lang-specs.h: Reorganized to handle new options.
627 * scanner.c (gfc_new_file): Read temporary file instead of
628 input source if preprocessing is enabled.
629 * f95-lang.c (gfc_init): Initialize preprocessor.
630 (gfc_finish): Clean up preprocessor.
633 * Make-lang.in: Added new objects and dependencies.
634 * gfortran.texi: Updated section "Preprocessing and
635 conditional compilation".
636 * invoke.texi: Added new section "Preprocessing Options",
637 listed and documented the preprocessing options handled
640 2008-05-25 Tobias Burnus <burnus@net-b.de>
643 * trans-expr.c (gfc_conv_function_call): Remove library
644 call for c_f_pointer with scalar Fortran pointers and for
647 2008-05-21 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
650 * iresolve.c (check_charlen_present): Don't force the rank to 1.
652 2008-05-19 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
655 * trans-expr.c (gfc_conv_string_tmp): Pick the correct type for
656 the temporary variable.
658 2008-05-19 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
660 * simplify.c (gfc_simplify_dble, gfc_simplify_real): Initialize
661 result variable to avoid warnings.
663 2008-05-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
665 * intrinsic.c (char_conversions, ncharconv): New static variables.
666 (find_char_conv): New function.
667 (add_functions): Add simplification functions for ADJUSTL and
668 ADJUSTR. Don't check the kind of their argument. Add checking for
669 LGE, LLE, LGT and LLT.
670 (add_subroutines): Fix argument type for SLEEP. Fix argument name
672 (add_char_conversions): New function.
673 (gfc_intrinsic_init_1): Call add_char_conversions.
674 (gfc_intrinsic_done_1): Free char_conversions.
675 (check_arglist): Use kind == 0 as a signal that we don't want
676 the kind value to be checked.
677 (do_simplify): Also simplify character functions.
678 (gfc_convert_chartype): New function
679 * trans-array.c (gfc_trans_array_ctor_element): Don't force the
680 use of default character type.
681 (gfc_trans_array_constructor_value): Likewise.
682 (get_array_ctor_var_strlen): Use integer kind to build an integer
683 instead of a character kind!
684 (gfc_build_constant_array_constructor): Don't force the use of
685 default character type.
686 (gfc_conv_loop_setup): Likewise.
687 * trans-expr.c (gfc_conv_string_tmp): Don't force the use of
688 default character type. Allocate enough memory for wide strings.
689 (gfc_conv_concat_op): Make sure operand kind are the same.
690 (string_to_single_character): Remove gfc_ prefix. Reindent.
691 Don't force the use of default character type.
692 (gfc_conv_scalar_char_value): Likewise.
693 (gfc_build_compare_string): Call string_to_single_character.
694 (fill_with_spaces): New function
695 (gfc_trans_string_copy): Add kind arguments. Use them to deal
696 with wide character kinds.
697 (gfc_conv_statement_function): Whitespace fix. Call
698 gfc_trans_string_copy with new kind arguments.
699 (gfc_conv_substring_expr): Call gfc_build_wide_string_const
700 instead of using gfc_widechar_to_char.
701 (gfc_conv_string_parameter): Don't force the use of default
703 (gfc_trans_scalar_assign): Pass kind args to gfc_trans_string_copy.
704 * intrinsic.h (gfc_check_lge_lgt_lle_llt, gfc_convert_char_constant,
705 gfc_resolve_adjustl, gfc_resolve_adjustr): New prototypes.
706 * decl.c (gfc_set_constant_character_len): Don't assert the
707 existence of a single character kind.
708 * trans-array.h (gfc_trans_string_copy): New prototype.
709 * gfortran.h (gfc_check_character_range, gfc_convert_chartype):
711 * error.c (print_wide_char_into_buffer): New function lifting
712 code from gfc_print_wide_char. Fix order to output '\x??' instead
714 (gfc_print_wide_char): Call print_wide_char_into_buffer.
715 (show_locus): Call print_wide_char_into_buffer with buffer local
717 * trans-const.c (gfc_build_wide_string_const): New function.
718 (gfc_conv_string_init): Deal with wide characters strings
720 (gfc_conv_constant_to_tree): Call gfc_build_wide_string_const.
721 * trans-stmt.c (gfc_trans_label_assign): Likewise.
722 (gfc_trans_character_select): Deal with wide strings.
723 * expr.c (gfc_check_assign): Allow conversion between character
725 * trans-const.h (gfc_build_wide_string_const): New prototype.
726 * trans-types.c (gfc_get_character_type_len_for_eltype,
727 gfc_get_character_type_len): Create too variants of the old
728 gfc_get_character_type_len, one getting kind argument and the
729 other one directly taking a type tree.
730 * trans.h (gfor_fndecl_select_string_char4,
731 gfor_fndecl_convert_char1_to_char4,
732 gfor_fndecl_convert_char4_to_char1): New prototypes.
733 * trans-types.h (gfc_get_character_type_len_for_eltype): New
735 * resolve.c (resolve_operator): Exit early when kind mismatches
736 are detected, because that makes us issue an error message later.
737 (validate_case_label_expr): Fix wording of error message.
738 * iresolve.c (gfc_resolve_adjustl, gfc_resolve_adjustr): New
740 (gfc_resolve_pack): Call _char4 variants of library function
741 when dealing with wide characters.
742 (gfc_resolve_reshape): Likewise.
743 (gfc_resolve_spread): Likewise.
744 (gfc_resolve_transpose): Likewise.
745 (gfc_resolve_unpack): Likewise.
746 * target-memory.c (size_character): Take character kind bit size
747 correctly into account (not that it changes anything for now, but
749 (gfc_encode_character): Added gfc_ prefix. Encoding each
750 character of a string by calling native_encode_expr for the
751 corresponding unsigned integer.
752 (gfc_target_encode_expr): Add gfc_ prefix to encode_character.
753 * trans-decl.c (gfc_build_intrinsic_function_decls): Build
754 gfor_fndecl_select_string_char4, gfor_fndecl_convert_char1_to_char4
755 and gfor_fndecl_convert_char4_to_char1.
756 * target-memory.h (gfc_encode_character): New prototype.
757 * arith.c (gfc_check_character_range): New function.
758 (eval_intrinsic): Allow non-default character kinds.
759 * check.c (gfc_check_access_func): Only allow default
760 character kind arguments.
761 (gfc_check_chdir): Likewise.
762 (gfc_check_chdir_sub): Likewise.
763 (gfc_check_chmod): Likewise.
764 (gfc_check_chmod_sub): Likewise.
765 (gfc_check_lge_lgt_lle_llt): New function.
766 (gfc_check_link): Likewise.
767 (gfc_check_link_sub): Likewise.
768 (gfc_check_symlnk): Likewise.
769 (gfc_check_symlnk_sub): Likewise.
770 (gfc_check_rename): Likewise.
771 (gfc_check_rename_sub): Likewise.
772 (gfc_check_fgetputc_sub): Likewise.
773 (gfc_check_fgetput_sub): Likewise.
774 (gfc_check_stat): Likewise.
775 (gfc_check_stat_sub): Likewise.
776 (gfc_check_date_and_time): Likewise.
777 (gfc_check_ctime_sub): Likewise.
778 (gfc_check_fdate_sub): Likewise.
779 (gfc_check_gerror): Likewise.
780 (gfc_check_getcwd_sub): Likewise.
781 (gfc_check_getarg): Likewise.
782 (gfc_check_getlog): Likewise.
783 (gfc_check_hostnm): Likewise.
784 (gfc_check_hostnm_sub): Likewise.
785 (gfc_check_ttynam_sub): Likewise.
786 (gfc_check_perror): Likewise.
787 (gfc_check_unlink): Likewise.
788 (gfc_check_unlink_sub): Likewise.
789 (gfc_check_system_sub): Likewise.
790 * primary.c (got_delim): Perform correct character range checking
792 * trans-intrinsic.c (gfc_conv_intrinsic_conversion): Generate
793 calls to library functions convert_char4_to_char1 and
794 convert_char1_to_char4 for character conversions.
795 (gfc_conv_intrinsic_char): Allow all character kings.
796 (gfc_conv_intrinsic_strcmp): Fix whitespace.
797 (gfc_conv_intrinsic_repeat): Take care of all character kinds.
798 * intrinsic.texi: For all GNU intrinsics accepting character
799 arguments, mention that they're restricted to the default kind.
800 * simplify.c (simplify_achar_char): New function.
801 (gfc_simplify_achar, gfc_simplify_char): Call simplify_achar_char.
802 gfc_simplify_ichar): Don't error out for wide characters.
803 (gfc_convert_char_constant): New function.
805 2008-05-18 Steven G. Kargl <kargls@comcast.net>
808 * symbol.c (check_conflict): Issue errors for abuse of PUBLIC, PRIVATE,
810 * resolve.c (gfc_verify_binding_labels): Fix NULL pointer dereference.
812 2008-05-17 Tobias Burnus <burnus@net-b.de>
814 * intrinsic.texi: Correct description of GET_COMMAND_ARGUMENT
815 and GET_ENVIRONMENT_VARIABLE; fix keyword= name for GETENV,
816 GETLOG, GMTIME, HOSTNM, IRAND, ITIME, KILL.
817 Move LOG_GAMMA after LOG10.
819 2008-05-17 Tobias Burnus <burnus@net-b.de>
821 * intrinsic.c (add_functions): Change FLUSH(C) to FLUSH(UNIT).
822 * intrinsic.texi: Change INTEGER(*) to INTEGER; fix keyword= name for
823 ABS, ADJUSTL, AINT, ALLOCATED, ANINT, ASSOCIATED, C_ASSOCIATED,
824 CEILING, DBLE, DFLOAT, DOT_PRODUCT, DREAL, FLOAT, FLOOR, GET_COMMAND.
826 2008-05-16 Paul Thomas <pault@gcc.gnu.org>
830 * trans-stmt.c (gfc_trans_where): Tighten up the dependency
831 check for calling gfc_trans_where_3.
834 * trans-stmt.c (gfc_trans_where_2): Set the mask size to zero
835 if it is calculated to be negative.
838 * trans-stmt.c (gfc_trans_where_3, gfc_trans_where_assign): Set
839 ss->where for scalar right hand sides.
840 * trans-array.c (gfc_add_loop_ss_code): If ss->where is set do
841 not evaluate scalars outside the loop. Clean up whitespace.
842 * trans.h : Add a bitfield 'where' to gfc_ss.
844 2008-05-16 Tobias Burnus <burnus@net-b.de>
846 * libgfortran.h: Increase GFC_MAX_DIMENSIONS to 15.
847 * array.c (gfc_match_array_spec): Error with -std=f2003 if rank > 7.
849 2008-04-16 Daniel Kraft <d@domob.eu>
852 * gfortran.h: Added field "length_from_typespec" to gfc_charlength.
853 * aray.c (gfc_match_array_constructor): Added code to parse typespec.
854 (check_element_type, check_constructor_type, gfc_check_constructor_type):
855 Extended to support explicit typespec on constructor.
856 (gfc_resolve_character_array_constructor): Pad strings correctly for
857 explicit, constant character length.
858 * trans-array.c: New static global variable "typespec_chararray_ctor"
859 (gfc_trans_array_constructor): New code to support explicit but dynamic
862 2008-05-16 Jerry DeLisle <jvdelisle@gcc.gnu.org>
865 * decl.c (match_attr_spec): Check for matching pairs of parenthesis.
866 * expr.c (gfc_specification_expr): Supplement the error message with the
868 * resolve.c (gfc_resolve_index): Likewise.
869 * match.c (gfc_match_parens): Clarify error message with "at or before".
870 (gfc_match_do): Check for matching pairs of parenthesis.
872 2008-05-16 Tobias Burnus <burnus@net-b.de
874 * intrinsic.texi: Write Fortran 77/90/95 instead of F77/90/95;
875 add missing KIND argument to ACHAR and NINT; and state that
876 the KIND argument is a F2003 extension for ACHAR, COUNT, IACHAR,
877 ICHAR, INDEX, LBOUND, LEN, LEN_TRIM, SCAN, SIZE, UBOUND, VERIFY.
879 2008-05-16 Daniel Kraft <d@domob.eu>
881 * primary.c: New private structure "gfc_structure_ctor_component".
882 (gfc_free_structure_ctor_component): New helper function.
883 (gfc_match_structure_constructor): Extended largely to support named
884 arguments and default initialization for structure constructors.
886 2008-05-15 Steven G. Kargl <kargls@comcast.net>
888 * simplify.c (gfc_simplify_dble, gfc_simplify_float,
889 simplify_bound, gfc_simplify_nearest, gfc_simplify_real): Plug
890 possible memory leaks.
891 (gfc_simplify_reshape): Plug possible memory leaks and dereferencing
894 2008-05-15 Steven G. Kargl <kargls@comcast.net>
897 * simplify.c (gfc_simplify_int, gfc_simplify_intconv): Replaced hand
898 rolled integer conversion with gfc_int2int, gfc_real2int, and
900 (gfc_simplify_intconv): Renamed to simplify_intconv.
902 2008-05-15 Steven G. Kargl, <kargl@comcast.net>
903 * gfortran.dg/and_or_xor.f90: New test
905 * fortran/simplify.c (gfc_simplify_and, gfc_simplify_or,
906 gfc_simplify_xor): Don't range check logical results.
908 2008-05-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
910 * trans-expr.c (gfc_conv_concat_op): Take care of nondefault
912 (gfc_build_compare_string): Add kind argument and use it.
913 (gfc_conv_statement_function): Fix indentation.
914 * gfortran.h (gfc_character_info): New structure.
915 (gfc_character_kinds): New array.
916 * trans-types.c (gfc_character_kinds, gfc_character_types,
917 gfc_pcharacter_types): New array.
918 (gfc_init_kinds): Fill character kinds array.
919 (validate_character): Take care of nondefault character kinds.
920 (gfc_build_uint_type): New function.
921 (gfc_init_types): Take care of nondefault character kinds.
922 (gfc_get_char_type, gfc_get_pchar_type): New functions.
923 (gfc_get_character_type_len): Use gfc_get_char_type.
924 * trans.h (gfc_build_compare_string): Adjust prototype.
925 (gfor_fndecl_compare_string_char4, gfor_fndecl_concat_string_char4,
926 gfor_fndecl_string_len_trim_char4, gfor_fndecl_string_index_char4,
927 gfor_fndecl_string_scan_char4, gfor_fndecl_string_verify_char4,
928 gfor_fndecl_string_trim_char4, gfor_fndecl_string_minmax_char4,
929 gfor_fndecl_adjustl_char4, gfor_fndecl_adjustr_char4): New
931 * trans-types.h (gfc_get_char_type, gfc_get_pchar_type): New
933 * trans-decl.c (gfor_fndecl_compare_string_char4,
934 gfor_fndecl_string_len_trim_char4, gfor_fndecl_string_index_char4,
935 gfor_fndecl_string_scan_char4, gfor_fndecl_string_verify_char4,
936 gfor_fndecl_string_trim_char4, gfor_fndecl_string_minmax_char4,
937 gfor_fndecl_adjustl_char4, gfor_fndecl_adjustr_char4,
938 gfor_fndecl_concat_string_char4): New function decls.
939 (gfc_build_intrinsic_function_decls): Define new *_char4 function
941 * trans-intrinsic.c (gfc_conv_intrinsic_minmax_char,
942 gfc_conv_intrinsic_len_trim, gfc_conv_intrinsic_ichar,
943 gfc_conv_intrinsic_strcmp, gfc_conv_intrinsic_trim,
944 gfc_conv_intrinsic_function): Deal with nondefault character kinds.
946 2008-05-15 Sa Liu <saliu@de.ibm.com>
948 * iso-c-binding.def: Add standard parameter to macro NAMED_INTCST.
949 All existing NAMED_INTCST definitions has standard GFC_STD_F2003,
950 c_int128_t, c_int_least128_t and c_int_fast128_t are added as
952 * iso-fortran-evn.def: Add standard parameter GFC_STD_F2003
953 to macro NAMED_INTCST.
954 * symbol.c (std_for_isocbinding_symbol): New helper function to
955 return the standard that supports this isocbinding symbol.
956 (generate_isocbinding_symbol): Do not generate GNU extension symbols
957 if std=f2003. Add new parameter to NAMED_INTCST.
958 * module.c (use_iso_fortran_env_module): Add new parameter to
959 NAMED_INTCST and new field standard to struct intmod_sym.
960 * gfortran.h: Add new parameter to NAMED_INTCST.
961 * trans-types.c (init_c_interop_kinds): Add new parameter to
963 * intrinsic.texi: Documented new types C_INT128_T, C_INT_LEASE128_T
966 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
969 * trans-decl.c (gfc_build_dummy_array_decl): Don't repack
970 arrays that have the TARGET attribute.
972 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
975 * simplify.c (only_convert_cmplx_boz): New function.
976 (gfc_simplify_cmplx, gfc_simplify_complex, gfc_simplify_dcmplx):
977 Call only_convert_cmplx_boz.
979 2008-05-14 Paul Thomas <pault@gcc.gnu.org>
982 * interface.c (compare_actual_formal): Do not check sizes if the
983 actual is BT_PROCEDURE.
985 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
988 * trans-array.c (gfc_conv_ss_startstride): Any negative size is
989 the same as zero size.
990 (gfc_conv_loop_setup): Fix size calculation.
992 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
995 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Correctly
996 handle zero-size sections.
998 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1001 * scanner.c (preprocessor_line): Allocate enough memory for a
1004 2008-05-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1007 * target-memory.c (gfc_target_expr_size): Correctly treat
1009 (gfc_target_encode_expr): Likewise.
1010 (gfc_interpret_complex): Whitespace change.
1012 2008-05-11 Thomas Koenig <tkoenig@gcc.gnu.org>
1015 * trans.c (gfc_call_malloc): If size equals zero, allocate one
1016 byte; don't return a null pointer.
1018 2008-05-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1021 * module.c (quote_string): Fix sprintf format.
1023 2008-05-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1026 * module.c (quote_string, unquote_string,
1027 mio_allocated_wide_string): New functions.
1028 (mio_expr): Call mio_allocated_wide_string where needed.
1030 2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>
1032 * trans-decl.c (gfc_get_extern_function_decl, build_function_decl):
1033 Rename DECL_IS_PURE to DECL_PURE_P.
1035 2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1037 * arith.c: (gfc_arith_concat, gfc_compare_string,
1038 gfc_compare_with_Cstring, hollerith2representation,
1039 gfc_hollerith2int, gfc_hollerith2real, gfc_hollerith2complex,
1040 gfc_hollerith2character, gfc_hollerith2logical): Use wide
1041 characters for character constants.
1042 * data.c (create_character_intializer): Likewise.
1043 * decl.c (gfc_set_constant_character_len): Likewise.
1044 * dump-parse-tree.c (show_char_const): Correctly dump wide
1046 error.c (print_wide_char): Rename into gfc_print_wide_char.
1047 (show_locus): Adapt to new prototype of gfc_print_wide_char.
1048 expr.c (free_expr0): Representation is now disjunct from
1049 character string value, so we always free it.
1050 (gfc_copy_expr, find_substring_ref, gfc_simplify_expr): Adapt
1051 to wide character strings.
1052 * gfortran.h (gfc_expr): Make value.character.string a wide string.
1053 (gfc_wide_toupper, gfc_wide_strncasecmp, gfc_wide_memset,
1054 gfc_widechar_to_char, gfc_char_to_widechar): New prototypes.
1055 (gfc_get_wide_string): New macro.
1056 (gfc_print_wide_char): New prototype.
1057 * io.c (format_string): Make a wide string.
1058 (next_char, gfc_match_format, compare_to_allowed_values,
1059 gfc_match_open): Deal with wide strings.
1060 * module.c (mio_expr): Convert between wide strings and ASCII ones.
1061 * primary.c (match_hollerith_constant, match_charkind_name):
1062 Handle wide strings.
1063 * resolve.c (build_default_init_expr): Likewise.
1064 * scanner.c (gfc_wide_toupper, gfc_wide_memset,
1065 gfc_char_to_widechar): New functions.
1066 (wide_strchr, gfc_widechar_to_char, gfc_wide_strncasecmp):
1067 Changes in prototypes.
1068 (gfc_define_undef_line, load_line, preprocessor_line,
1069 include_line, load_file, gfc_read_orig_filename): Handle wide
1071 * simplify.c (gfc_simplify_achar, gfc_simplify_adjustl,
1072 gfc_simplify_adjustr, gfc_simplify_char, gfc_simplify_iachar,
1073 gfc_simplify_ichar, simplify_min_max, gfc_simplify_new_line,
1074 gfc_simplify_repeat): Handle wide strings.
1075 (wide_strspn, wide_strcspn): New helper functions.
1076 (gfc_simplify_scan, gfc_simplify_trim, gfc_simplify_verify):
1077 Handle wide strings.
1078 * symbol.c (generate_isocbinding_symbol): Likewise.
1079 * target-memory.c (size_character, gfc_target_expr_size,
1080 encode_character, gfc_target_encode_expr, gfc_interpret_character,
1081 gfc_target_interpret_expr): Handle wide strings.
1082 * trans-const.c (gfc_conv_string_init): Lower wide strings to
1084 (gfc_conv_constant_to_tree): Likewise.
1085 * trans-expr.c (gfc_conv_substring_expr): Handle wide strings.
1086 * trans-io.c (gfc_new_nml_name_expr): Likewise.
1087 * trans-stmt.c (gfc_trans_label_assign): Likewise.
1089 2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1091 * simplify.c (gfc_simplify_bessel_j0,gfc_simplify_bessel_j1,
1092 gfc_simplify_bessel_jn,gfc_simplify_bessel_y0,
1093 gfc_simplify_bessel_y1,gfc_simplify_bessel_yn): Mark arguments
1094 with ATTRIBUTE_UNUSED.
1096 2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1098 * check.c (gfc_check_sizeof): Switch to ATTRIBUTE_UNUSED.
1099 * simplify.c (gfc_simplify_lgamma): Likewise.
1101 2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1103 * openmp.c (gfc_match_omp_eos): Use gfc_next_ascii_char and
1104 gfc_peek_ascii_char.
1105 * decl.c (gfc_match_kind_spec, gfc_match_type_spec,
1106 gfc_match_implicit_none, match_implicit_range, gfc_match_implicit,
1107 match_string_p, match_attr_spec, gfc_match_suffix,
1108 match_procedure_decl, gfc_match_entry, gfc_match_subroutine):
1110 * gfortran.h (gfc_char_t): New type.
1111 (gfc_linebuf): Make line member a gfc_char_t.
1112 (locus): Make nextc member a gfc_char_t.
1113 (gfc_wide_is_printable, gfc_wide_is_digit, gfc_wide_fits_in_byte,
1114 gfc_wide_tolower, gfc_wide_strlen, gfc_next_ascii_char,
1115 gfc_peek_ascii_char, gfc_check_digit): New prototypes.
1116 * error.c (print_wide_char): New function.
1117 (show_locus): Use print_wide_char and gfc_wide_strlen.
1118 * io.c (next_char): Use gfc_char_t type.
1119 (match_io): Use gfc_peek_ascii_char and gfc_next_ascii_char.
1120 * match.c (gfc_match_parens, gfc_match_eos,
1121 gfc_match_small_literal_int, gfc_match_name, gfc_match_name_C,
1122 gfc_match_intrinsic_op, gfc_match_char, gfc_match_return,
1123 gfc_match_common): Likewise.
1124 * match.h (gfc_match_special_char): Change prototype.
1125 * parse.c (decode_specification_statement, decode_statement,
1126 decode_omp_directive, next_free, next_fixed): Use
1127 gfc_peek_ascii_char and gfc_next_ascii_char.
1128 * primary.c (gfc_check_digit): Change name.
1129 (match_digits, match_hollerith_constant, match_boz_constant,
1130 match_real_constant, next_string_char, match_charkind_name,
1131 match_string_constant, match_logical_constant_string,
1132 match_complex_constant, match_actual_arg, match_varspec,
1133 gfc_match_rvalue, match_variable): Use gfc_peek_ascii_char and
1134 gfc_next_ascii_char.
1135 * scanner.c (gfc_wide_fits_in_byte, wide_is_ascii,
1136 gfc_wide_is_printable, gfc_wide_tolower, gfc_wide_is_digit,
1137 gfc_wide_is_digit, wide_atoi, gfc_wide_strlen, wide_strcpy,
1138 wide_strchr, widechar_to_char, wide_strncmp, wide_strncasecmp,
1139 gfc_next_ascii_char, gfc_peek_ascii_char):
1141 (next_char, gfc_define_undef_line, skip_free_comments,
1142 gfc_next_char_literal, gfc_next_char, gfc_peek_char,
1143 gfc_error_recovery, load_line, preprocessor_line, include_line,
1144 load_file, gfc_read_orig_filename): Use gfc_char_t for source
1145 characters and the {gfc_,}wide_* functions to manipulate wide
1148 2008-05-06 Tobias Burnus <burnus@net-b.de>
1151 * intrinsic.c (add_functions): Call gfc_simplify_bessel_*.
1152 * intrinsic.h: Add prototypes for gfc_simplify_bessel_*.
1153 * simplify.c (gfc_simplify_bessel_j0,gfc_simplify_bessel_j1,
1154 gfc_simplify_bessel_jn,gfc_simplify_bessel_y0,
1155 gfc_simplify_bessel_y1,gfc_simplify_bessel_yn): New.
1157 2008-05-03 Janus Weil <jaydub66@gmail.com>
1159 * misc.c (gfc_clear_ts): Set interface to NULL.
1161 2008-05-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1164 * gfortran.h: Add extra_comma pointer to gfc_dt structure. Add iokind to
1165 gfc_expr value union. Add io_kind enum to here from io.c.
1166 * io.c (gfc_free_dt): Free extra_comma.
1167 (gfc_resolve_dt): If an extra comma was encountered and io_unit is type
1168 BT_CHARACTER, resolve to format_expr and set default unit. Error if
1169 io_kind is M_WRITE. (match_io): Match the extra comma and set new
1170 pointer, extra_comma.
1172 2008-05-01 Bud Davis <bdavis9659@sbcglobal.net>
1175 * simplify.c (gfc_simplify_index): Check for direction argument
1178 2008-05-01 Janus Weil <jaydub66@gmail.com>
1180 * gfortran.h (struct gfc_symbol): Moving "interface" member to
1181 gfc_typespec (plus fixing a small docu error).
1182 * interface.c (gfc_procedure_use): Ditto.
1183 * decl.c (match_procedure_decl): Ditto.
1184 * resolve.c (resolve_specific_f0,
1185 resolve_specific_f0, resolve_symbol): Ditto.
1187 2008-04-30 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1189 * intrinsic.c (add_functions): Add SELECTED_CHAR_KIND intrinsic.
1190 * intrinsic.h (gfc_check_selected_char_kind,
1191 gfc_simplify_selected_char_kind): New prototypes.
1192 * gfortran.h (gfc_isym_id): Add GFC_ISYM_SC_KIND.
1193 * trans.h (gfor_fndecl_sc_kind): New function decl.
1194 * trans-decl.c (gfor_fndecl_sc_kind): Build new decl.
1195 * arith.c (gfc_compare_with_Cstring): New function.
1196 * arith.h (gfc_compare_with_Cstring): New prototype.
1197 * check.c (gfc_check_selected_char_kind): New function.
1198 * primary.c (match_string_constant, match_kind_param): Mark
1199 symbols used as literal constant kind param as referenced.
1200 * trans-intrinsic.c (gfc_conv_intrinsic_sc_kind): New function.
1201 (gfc_conv_intrinsic_function): Call gfc_conv_intrinsic_sc_kind.
1202 * intrinsic.texi (SELECTED_CHAR_KIND): Document new intrinsic.
1203 * simplify.c (gfc_simplify_selected_char_kind): New function.
1205 2008-04-28 Paul Thomas <pault@gcc.gnu.org>
1208 * module.c (find_symbol): Do not return a result for a symbol
1209 that has been renamed in another module.
1211 2008-04-26 George Helffrich <george@gcc.gnu.org>
1215 * trans-common.c (create_common): Add decl to function
1216 chain (if inside one) to preserve identifier scope in debug output.
1218 2008-04-25 Jan Hubicka <jh@suse.cz>
1220 * trans-decl.c (trans_function_start): Update.
1222 2008-04-25 Tobias Burnus <burnus@net-b.de>
1223 Daniel Franke <franke.daniel@gmail.com>
1226 * gfortranspec.c (lang_specific_driver): Deprecate
1227 -M option; fix ICE when "-M" is last argument and
1228 make "-M<dir>" work.
1229 * options.c (gfc_handle_module_path_options):
1230 Use -J instead of -M in error messages.
1231 * invoke.texi: Mark -M as depecated.
1233 2008-04-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1234 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1237 * trans-instrinsic.c (gfc_conv_intrinsic_minmaxloc): Correctly adjust
1238 loop counter offset.
1240 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
1242 * trans-expr.c (gfc_conv_structure): Don't set TREE_INVARIANT.
1243 * trans-array.c (gfc_build_null_descriptor): Don't set TREE_INVARIANT.
1244 (gfc_trans_array_constructor_value): Don't set TREE_INVARIANT.
1245 (gfc_build_constant_array_constructor): Don't set TREE_INVARIANT.
1246 (gfc_conv_array_initializer): Don't set TREE_INVARIANT.
1247 * trans-common.c (get_init_field): Don't set TREE_INVARIANT.
1248 (create_common): Don't set TREE_INVARIANT.
1249 * trans-stmt.c (gfc_trans_character_select): Don't set TREE_INVARIANT.
1250 * trans-decl.c (gfc_generate_function_code): Don't set TREE_INVARIANT.
1252 2008-04-21 Steve Ellcey <sje@cup.hp.com>
1254 * f95-lang.c (gfc_init_decl_processing): use ptr_mode instead of Pmode.
1256 2008-04-21 Daniel Franke <franke.daniel@gmail.com>
1259 * gfortranspec.c (lookup_option): Properly handle separated arguments
1260 in -J option, print missing argument message when necessary.
1262 2008-04-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1265 * scanner.c (skip_fixed_comments): Update continue_line when comment is
1266 detected. (gfc_next_char_literal): Likewise.
1268 2008-04-19 Paul Thomas <pault@gcc.gnu.org>
1273 * trans_array.c (gfc_trans_array_constructor): Temporarily
1274 realign loop, if loop->from is not zero, before creating
1275 the temporary array and provide an offset.
1278 * trans-decl.c (gfc_init_default_dt): Add gfc_ prefix to name
1279 and allow for NULL body. Change all references from
1280 init_default_dt to gfc_init_default_dt.
1281 * trans.h : Add prototype for gfc_init_default_dt.
1282 * trans-array.c (gfc_trans_deferred_vars): After nullification
1283 call gfc_init_default_dt for derived types with allocatable
1286 2008-04-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1289 * trans-common.c (create_common): Revert patch causing regression.
1291 2008-04-16 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1294 * iresolve.c (gfc_resolve_eoshift): Check for NULL symtree in test for
1295 optional argument attribute.
1297 2008-04-16 Paul Thomas <pault@gcc.gnu.org>
1300 * trans-intrinsic.c (gfc_conv_intrinsic_char): Even though KIND
1301 is not used, the argument must be converted.
1303 2008-04-16 Jakub Jelinek <jakub@redhat.com>
1306 * f95-lang.c (gfc_init_builtin_functions): Make sure
1307 BUILT_IN_SINCOS{,F,L} types aren't varargs.
1309 2008-04-15 Paul Thomas <pault@gcc.gnu.org>
1312 * expr.c (scalarize_intrinsic_call): Reorder identification of
1313 array argument so that if one is not found a segfault does not
1314 occur. Return FAILURE if all scalar arguments.
1316 2008-04-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1317 Tobias Burnus <burnus@net-b.de>
1320 * options.c (gfc_init_options): Set the default maximum continuation
1321 lines to 255 for both free and fixed form source for warnings.
1322 (gfc_handle_option): Set -std=f95 fixed form max continuations to 19 and
1323 the -std=f95 free form max continuations to 39 for warnings.
1324 * scanner.c (gfc_next_char_literal): Adjust the current_line number only
1325 if it is less than the current locus.
1327 2008-04-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1329 PR fortran/25829 28655
1330 * io.c (io_tag): Add new tags for decimal, encoding, asynchronous,
1331 round, sign, and id. (match_open_element): Match new tags.
1332 (gfc_resolve_open): Resolve new tags. (gfc_match_open): Enable encoding
1333 for DEFAULT only. Update error messages. (match_dt_element): Fix match
1334 tag for asynchronous. Update error messages. (gfc_free_inquire): Free
1335 new expressions. (match_inquire_element): Match new tags.
1336 (gfc_match_inquire): Add constraint for ID and PENDING.
1337 (gfc_resolve_inquire): Resolve new tags.
1338 * trans-io.c (gfc_trans_inquire): Clean up whitespace and fix setting of
1339 mask for ID parameter.
1340 * ioparm.def: Fix order of parameters for pending, round, and sign.
1341 NOTE: These must line up with the definitions in libgfortran/io/io.h. or
1344 2008-04-06 Paul Thomas <pault@gcc.gnu.org>
1347 * expr.c (scalarize_intrinsic_call): Identify which argument is
1348 an array and use that as the template.
1349 (check_init_expr): Remove tests that first argument is an array
1350 in the call to scalarize_intrinsic_call.
1352 2008-04-06 Tobias Schlüter <tobi@gcc.gnu.org>
1355 * io.c (io_tag): Add field 'value'. Split 'spec' field in
1357 (match_etag, match_vtag, match_ltag): Split parsing in two steps
1358 to give better error messages.
1360 2008-04-06 Tobias Burnus <burnus@net-b.de>
1362 * io.c (check_io_constraints): Add constrains. ID= requires
1363 asynchronous= and asynchronous= must be init expression.
1365 2008-04-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1367 * f95-lang.c: Set LANG_HOOKS_NAME to "GNU Fortran".
1369 2008-04-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1371 * dump-parse-tree.c: Use fprintf, fputs and fputc instead of
1372 gfc_status and gfc_status_char. Remove gfc_ prefix of the gfc_show_*
1373 functions and make them static. Add new gfc_dump_parse_tree
1375 * gfortran.h (gfc_option_t): Rename verbose into dump_parse_tree.
1376 (gfc_status, gfc_status_char): Delete prototypes.
1377 * error.c (gfc_status, gfc_status_char): Remove functions.
1378 * scanner.c (gfc_new_file): Use printf instead of gfc_status.
1379 * options.c (gfc_init_options): Rename verbose into dump_parse_tree.
1380 (gfc_handle_module_path_options): Use gfc_fatal_error instead of
1381 gfc_status and exit.
1382 (gfc_handle_option): Rename verbose into dump_parse_tree.
1383 * parse.c (gfc_parse_file): Use gfc_dump_parse_tree.
1385 2008-04-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1386 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1388 PR fortran/25829 28655
1389 * dump-parse-tree.c (gfc_show_code_node): Show new I/O parameters.
1390 * gfortran.h (gfc_statement): Add ST_WAIT enumerator.
1391 (gfc_open): Add pointers for decimal, encoding, round, sign,
1392 asynchronous. (gfc_inquire): Add pointers for asynchronous, decimal,
1393 encoding, pending, round, sign, size, id.
1394 (gfc_wait): New typedef struct. (gfc_dt): Add pointers for id, pos,
1395 asynchronous, blank, decimal, delim, pad, round, sign.
1396 (gfc_exec_op): Add EXEC_WAIT enumerator. (gfc_code): Add pointer for
1397 wait. (gfc_free_wait), (gfc_resolve_wait): New function prototypes.
1398 * trans-stmt.h (gfc_trans_wait): New function prototype.
1399 * trans.c (gfc_trans_code): Add case for EXEC_WAIT.
1400 * io.c (io_tag): Add new tags for DECIMAL, ENCODING, ROUND, SIGN,
1401 ASYCHRONOUS, ID. (match_open_element): Add matchers for new tags.
1402 (gfc_free_open): Free new pointers. (gfc_resolve_open): Resolve new
1403 tags. (gfc_resolve_open): Remove comment around check for allowed
1404 values and ASYNCHRONOUS, update it. Likewise for DECIMAL, ENCODING,
1405 ROUND, and SIGN. (match_dt_element): Add matching for new tags.
1406 (gfc_free_wait): New function. (gfc_resolve_wait): New function.
1407 (match_wait_element): New function. (gfc_match_wait): New function.
1408 * resolve.c (gfc_resolve_blocks): Add case for EXEC_WAIT.
1409 (resolve_code): Add case for EXEC_WAIT.
1410 * st.c (gfc_free_statement): Add case for EXEC_WAIT.
1411 * trans-io.c (ioparam_type): Add IOPARM_ptype_wait. (gfc_st_parameter):
1412 Add "wait" entry. (iocall): Add IOCALL_WAIT enumerator.
1413 (gfc_build_io_library_fndecls): Add function declaration for st_wait.
1414 (gfc_trans_open): Add mask bits for new I/O tags.
1415 (gfc_trans_inquire): Add mask bits for new I/O tags.
1416 (gfc_trans_wait): New translation function.
1417 (build_dt): Add mask bits for new I/O tags.
1418 * match.c (gfc_match_if) Add matcher for "wait".
1419 * match.h (gfc_match_wait): Prototype for new function.
1420 * ioparm.def: Add new I/O parameter definitions.
1421 * parse.c (decode_statement): Add match for "wait" statement.
1422 (next_statement): Add case for ST_WAIT. (gfc_ascii_statement): Same.
1424 2008-04-03 Jakub Jelinek <jakub@redhat.com>
1427 * openmp.c (resolve_omp_clauses): Diagnose if a clause symbol
1430 2008-04-03 Tom Tromey <tromey@redhat.com>
1432 * Make-lang.in (fortran_OBJS): New variable.
1434 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
1436 * f95-lang.c (insert_block): Kill.
1438 2008-04-01 George Helffrich <george@gcc.gnu.org>
1440 PR fortran/35154, fortran/23057
1441 * trans-common.c (create_common): Add decl to function
1442 chain to preserve identifier scope in debug output.
1444 2008-04-01 Joseph Myers <joseph@codesourcery.com>
1446 * gfortran.texi: Include gpl_v3.texi instead of gpl.texi
1447 * Make-lang.in (GFORTRAN_TEXI): Include gpl_v3.texi instead of
1450 2008-03-30 Paul Thomas <pault@gcc.gnu.org>
1453 * resolve.c (resolve_function, resolve_call): If the procedure
1454 is elemental do not look for noncopying intrinsics.
1456 2008-03-29 Paul Thomas <pault@gcc.gnu.org>
1459 * trans-array.c (gfc_array_init_size): Set 'size' zero if
1460 negative in one dimension.
1463 * trans-expr.c (gfc_trans_string_copy): Only assign a char
1464 directly if the lhs and rhs types are the same.
1466 2008-03-28 Daniel Franke <franke.daniel@gmail.com>
1467 Paul Richard Thomas <paul.richard.thomas@gmail.com>
1470 * primary.c (match_variable): Improved matching of function
1472 * resolve.c (resolve_allocate_deallocate): Removed checks if
1473 the actual argument for STAT is a variable.
1475 2008-03-28 Tobias Burnus <burnus@net-b.de>
1477 * symbol.c (gfc_get_default_type): Fix error message; option
1478 -fallow_leading_underscore should be -fallow-leading-underscore
1480 2008-03-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1483 * iresolve.c (gfc_resolve_cshift): Check for NULL symtree in test for
1484 optional argument attribute.
1486 2008-03-27 Tom Tromey <tromey@redhat.com>
1488 * Make-lang.in: Revert automatic dependency patch.
1490 2008-03-25 Tom Tromey <tromey@redhat.com>
1492 * Make-lang.in: Remove .o targets.
1493 (fortran_OBJS): New variable.
1494 (fortran/gfortranspec.o): Move to fortran/. Reduce to variable
1496 (GFORTRAN_D_OBJS): Update.
1497 (GFORTRAN_TRANS_DEPS): Remove.
1499 2008-03-24 Paul Thomas <pault@gcc.gnu.org>
1502 * resolve.c (resolve_structure_cons): It is an error to assign
1503 NULL to anything other than a pointer or allocatable component.
1506 * resolve.c (resolve_symbol): If the symbol is a derived type,
1507 resolve the derived type. If the symbol is a derived type
1508 function, ensure that the derived type is visible in the same
1509 namespace as the function.
1511 2008-03-23 Tobias Schlüter <tobi@gcc.gnu.org>
1513 * trans.h: Use fold_build in build1_v, build2_v and build3_v
1515 * trans-openmp.c (gfc_trans_omp_critical, gfc_trans_omp_single):
1516 Don't use build2_v macro.
1518 2008-03-19 Daniel Franke <franke.daniel@gmail.com>
1521 * interface.c (gfc_procedure_use): Check for keyworded arguments in
1522 procedures without explicit interfaces.
1524 2008-03-16 Paul Thomas <pault@gcc.gnu.org>
1527 * resolve.c (check_assumed_size_reference): Only visit the
1528 first reference and look directly at the highest dimension.
1530 2008-03-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1533 * trans-array.c (gfc_conv_array_index_offset): Remove unnecessary
1536 2008-03-15 Daniel Franke <franke.daniel@gmail.com>
1539 * resolve.c (resolve_branch): Less strict and pessimistic warning
1542 2008-03-11 Paolo Bonzini <bonzini@gnu.org>
1544 * f95-lang.c (LANG_HOOKS_CLEAR_BINDING_STACK): Delete.
1545 (gfc_be_parse_file): Call clear_binding_stack from here.
1546 (gfc_clear_binding_stack): Rename to clear_binding_stack.
1548 2008-03-09 Paul Thomas <pault@gcc.gnu.org>
1551 * module.c (mio_symtree_ref): After providing a symbol for a
1552 missing equivalence member, resolve and NULL the fixups.
1554 2008-03-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1556 * invoke.texi (Error and Warning Options): Document
1559 2008-03-08 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1562 * trans-array.c (gfc_conv_ss_startstride): Fix the logic to avoid
1563 checking bounds of absent optional arguments.
1565 2008-03-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1568 * intrinsic.c (add_functions): Add simplification routines for
1569 ERF, DERF, ERFC and DERFC.
1570 * decl.c (gfc_match_suffix, gfc_match_subroutine): Change GNU
1571 extensions into Fortran 2008 features.
1572 * intrinsic.h (gfc_simplify_erf, gfc_simplify_erfc): New
1574 * simplify.c (gfc_simplify_erf, gfc_simplify_erfc): New functions.
1576 2008-03-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1579 * intrinsic.c (add_functions): Modify intrinsics ACOSH, ASINH,
1580 ATANH, ERF, ERFC and GAMMA. Add intrinsics BESSEL_{J,Y}{0,1,N},
1581 ERFC_SCALED, LOG_GAMMA and HYPOT.
1582 * intrinsic.h (gfc_check_hypot, gfc_simplify_hypot,
1583 gfc_resolve_hypot): New prototypes.
1584 * mathbuiltins.def: Add HYPOT builtin. Make complex versions of
1585 ACOSH, ASINH and ATANH available.
1586 * gfortran.h (GFC_ISYM_ERFC_SCALED, GFC_ISYM_HYPOT): New values.
1587 * lang.opt: Add -std=f2008 option.
1588 * libgfortran.h: Define GFC_STD_F2008.
1589 * lang-specs.h: Add .f08 and .F08 file suffixes.
1590 * iresolve.c (gfc_resolve_hypot): New function.
1591 * parse.c (parse_contained): Allow empty CONTAINS for Fortran 2008.
1592 * check.c (gfc_check_hypot): New function.
1593 * trans-intrinsic.c (gfc_intrinsic_map): Define ERFC_SCALE builtin.
1594 * options.c (set_default_std_flags): Allow Fortran 2008 by default.
1595 (form_from_filename): Add .f08 suffix.
1596 (gfc_handle_option): Handle -std=f2008 option.
1597 * simplify.c (gfc_simplify_hypot): New function.
1598 * gfortran.texi: Document Fortran 2008 status and file extensions.
1599 * intrinsic.texi: Document new BESSEL_{J,Y}{0,1,N} intrinsics,
1600 as well as HYPOT and ERFC_SCALED. Update documentation of ERF,
1601 ERFC, GAMMA, LGAMMA, ASINH, ACOSH and ATANH.
1602 * invoke.texi: Document the new -std=f2008 option.
1604 2008-03-02 Jakub Jelinek <jakub@redhat.com>
1606 * gfortranspec.c (lang_specific_driver): Update copyright notice
1609 2008-02-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1612 * expr.c (find_array_element): Modify traversing the constructor to
1613 avoid trying to access NULL memory pointed to by next for the
1614 last element. (find_array_section): Exit while loop if cons->next is
1616 * trans-expr.c (gfc_conv_scalar_char_value): Initialize gfc_typespec.
1617 (gfc_conv_function_call): Same.
1618 * decl.c (gfc_match_implicit): Same.
1619 * trans-intrinsic.c (gfc_conv_intrinsic_sr_kind): Same.
1621 2008-02-28 Daniel Franke <franke.daniel@gmail.com>
1626 * lang.opt: Added -Wreturn-type.
1627 * options.c (gfc_handle_option): Recognize -Wreturn-type.
1628 * trans-decl.c (gfc_trans_deferred_vars): Emit warnings for funtions
1629 where the result value is not set.
1630 (gfc_generate_function_code): Likewise.
1631 (generate_local_decl): Emit warnings for funtions whose RESULT
1632 variable is not set.
1634 2008-02-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1637 * trans-expr.c (gfc_conv_variable): Don't build indirect
1638 references when explicit interface is mandated.
1639 * resolve.c (resolve_formal_arglist): Set attr.always_explicit
1640 on the result symbol as well as the procedure symbol.
1642 2008-02-27 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1645 * trans.h: Remove prototypes for gfor_fndecl_math_exponent4,
1646 gfor_fndecl_math_exponent8, gfor_fndecl_math_exponent10 and
1647 gfor_fndecl_math_exponent16.
1648 * f95-lang.c (build_builtin_fntypes): Add new function types.
1649 (gfc_init_builtin_functions): Add new builtins for nextafter,
1650 frexp, ldexp, fabs, scalbn and inf.
1651 * iresolve.c (gfc_resolve_rrspacing): Don't add hidden arguments.
1652 (gfc_resolve_scale): Don't convert type of second argument.
1653 (gfc_resolve_set_exponent): Likewise.
1654 (gfc_resolve_size): Don't add hidden arguments.
1655 * trans-decl.c: Remove gfor_fndecl_math_exponent4,
1656 gfor_fndecl_math_exponent8, gfor_fndecl_math_exponent10 and
1657 gfor_fndecl_math_exponent16.
1658 * trans-intrinsic.c (gfc_intrinsic_map): Remove intrinsics
1659 for scalbn, fraction, nearest, rrspacing, set_exponent and
1661 (gfc_conv_intrinsic_exponent): Directly call frexp.
1662 (gfc_conv_intrinsic_fraction, gfc_conv_intrinsic_nearest,
1663 gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_rrspacing,
1664 gfc_conv_intrinsic_scale, gfc_conv_intrinsic_set_exponent): New
1666 (gfc_conv_intrinsic_function): Use the new functions above.
1668 2008-02-26 Tobias Burnus <burnus@net-b.de>
1671 * interface.c (check_operator_interface): Show better line for error
1672 messages; fix constrains for user-defined assignment operators.
1673 (gfc_extend_assign): Fix constrains for user-defined assignment
1676 2008-02-26 Tom Tromey <tromey@redhat.com>
1678 * trans-io.c (set_error_locus): Remove old location code.
1679 * trans-decl.c (gfc_set_decl_location): Remove old location code.
1680 * f95-lang.c (gfc_init): Remove test of USE_MAPPED_LOCATION.
1681 * scanner.c (gfc_gobble_whitespace): Remove old location code.
1682 (get_file): Likewise.
1683 (preprocessor_line): Likewise.
1684 (load_file): Likewise.
1685 (gfc_new_file): Likewise.
1686 * trans.c (gfc_trans_runtime_check): Remove old location code.
1687 (gfc_get_backend_locus): Likewise.
1688 (gfc_set_backend_locus): Likewise.
1689 * data.c (gfc_assign_data_value): Remove old location code.
1690 * error.c (show_locus): Remove old location code.
1691 * gfortran.h (gfc_linebuf): Remove old location code.
1692 (gfc_linebuf_linenum): Remove old-location variant.
1694 2008-02-25 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1697 * trans-const.c (gfc_build_string_const): Don't call gettext.
1698 (gfc_build_localized_string_const): New function.
1699 * trans-const.h (gfc_build_localized_string_const): New prototype.
1700 * trans.c (gfc_trans_runtime_check): Use
1701 gfc_build_localized_string_const instead of gfc_build_string_const.
1702 (gfc_call_malloc): Likewise.
1703 (gfc_allocate_with_status): Likewise.
1704 (gfc_allocate_array_with_status): Likewise.
1705 (gfc_deallocate_with_status): Likewise.
1706 (gfc_call_realloc): Likewise.
1707 * trans-io.c (gfc_trans_io_runtime_check): Likewise.
1709 2008-02-24 Tobias Schlüter <tobi@gcc.gnu.org>
1711 * arith.c: Update copyright years.
1712 * arith.h: Likewise.
1713 * array.c: Likewise.
1715 * check.c: Likewise.
1719 * dependency.c: Likewise.
1720 * dependency.h: Likewise.
1721 * dump-parse-tree.c: Likewise.
1722 * error.c: Likewise.
1724 * gfc-internals.texi: Likewise.
1725 * gfortran.h: Likewise.
1726 * gfortran.texi: Likewise.
1727 * gfortranspec.c: Likewise.
1728 * interface.c: Likewise.
1729 * intrinsic.c: Likewise.
1730 * intrinsic.h: Likewise.
1731 * intrinsic.texi: Likewise.
1732 * invoke.texi: Likewise.
1734 * iresolve.c: Likewise.
1735 * iso-c-binding.def: Likewise.
1736 * iso-fortran-env.def: Likewise.
1737 * lang-specs.h: Likewise.
1738 * lang.opt: Likewise.
1739 * libgfortran.h: Likewise.
1740 * match.c: Likewise.
1741 * match.h: Likewise.
1742 * matchexp.c: Likewise.
1744 * module.c: Likewise.
1745 * openmp.c: Likewise.
1746 * options.c: Likewise.
1747 * parse.c: Likewise.
1748 * parse.h: Likewise.
1749 * primary.c: Likewise.
1750 * resolve.c: Likewise.
1751 * scanner.c: Likewise.
1752 * simplify.c: Likewise.
1754 * symbol.c: Likewise.
1755 * target-memory.c: Likewise.
1756 * target-memory.h: Likewise.
1757 * trans-array.h: Likewise.
1758 * trans-const.h: Likewise.
1759 * trans-stmt.h: Likewise.
1760 * trans-types.c: Likewise.
1761 * trans-types.h: Likewise.
1762 * types.def: Likewise.
1764 2008-02-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1767 * simplify.c (gfc_simplify_ibclr), (gfc_simplify_ibits),
1768 (gfc_simplify_ibset): Remove call to range_check.
1769 (simplify_cmplx), (gfc_simplify_dble), (gfc_simplify_float)
1770 (gfc_simplify_real): Add call gfc_clear_ts to initialize the
1771 temporary gfc_typspec variable.
1773 2008-02-24 Tobias Schlüter <tobi@gcc.gnu.org>
1775 * trans-array.c (gfc_conv_descriptor_data_get,
1776 gfc_conv_descriptor_data_set_internal,
1777 gfc_conv_descriptor_data_addr, gfc_conv_descriptor_offset,
1778 gfc_conv_descriptor_dtype, gfc_conv_descriptor_dimension,
1779 gfc_conv_descriptor_stride, gfc_conv_descriptor_lbound,
1780 gfc_conv_descriptor_ubound, gfc_trans_create_temp_array,
1781 gfc_conv_array_transpose, gfc_grow_array,
1782 gfc_trans_array_constructor_subarray,
1783 gfc_trans_array_constructor_value, gfc_trans_scalarized_loop_end,
1784 gfc_array_init_size, gfc_array_allocate, gfc_array_deallocate,
1785 gfc_conv_array_initializer, gfc_trans_array_bounds,
1786 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
1787 gfc_get_dataptr_offset, gfc_conv_array_parameter,
1788 gfc_trans_dealloc_allocated, get_full_array_size,
1789 gfc_duplicate_allocatable, structure_alloc_comps): Use fold_buildN
1791 * trans-expr.c (gfc_conv_expr_present, gfc_conv_missing_dummy,
1792 gfc_conv_component_ref, gfc_conv_cst_int_power,
1793 gfc_conv_function_call, gfc_trans_structur_assign): Likewise.
1794 * trans-common.c (create_common): Likewise.
1795 * trans-openmp.c (gfc_trans_omp_atomic, gfc_trans_omp_do):
1797 * trans-const.c (gfc_conv_constant_to_tree): Likewise.
1798 * trans-stmt.c (gfc_trans_goto, gfc_trans_return, gfc_trans_do,
1799 gfc_trans_integer_select, gfc_trans_character_select,
1800 gfc_trans_forall_loop, compute_overall_iter_number,
1801 gfc_trans_forall_1, gfc_evaluate_where_mask, gfc_trans_allocate,
1802 gfc_trans_deallocate): Likewise.
1803 * trans.c (gfc_build_addr_expr, gfc_trans_runtime_check,
1804 gfc_allocate_with_status, gfc_allocate_array_with_status,
1805 gfc_deallocate_with_status): Likewise.
1806 * f95-lang.c (gfc_truthvalue_conversion): Likewise.
1807 * trans-io.c (set_parameter_const, set_parameter_value,
1808 set_parameter_ref, set_string, set_internal_unit, io_result,
1809 set_error_locus, nml_get_addr_expr, transfer_expr): Likewise.
1810 * trans-decl.c (gfc_build_qualified_array, build_entry_thunks,
1811 gfc_get_fake_result_decl, gfc_trans_auto_character_variable,
1812 gfc_generate_function_code): Likewise.
1813 * convert.c (convert): Likewise.
1814 * trans-intrinsic.c (gfc_conv_intrinsic_conversion,
1815 build_fixbound_expr, build_fix_expr, gfc_conv_intrinsic_aint,
1816 gfc_conv_intrinsic_int, gfc_conv_intrinsic_imagpart,
1817 gfc_conv_intrinsic_conjg, gfc_conv_intrinsic_abs,
1818 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_mod,
1819 gfc_conv_intrinsic_dim, gfc_conv_intrinsic_dprod,
1820 gfc_conv_intrinsic_ctime, gfc_conv_intrinsic_fdate,
1821 gfc_conv_intrinsic_ttynam, gfc_conv_intrinsic_minmax,
1822 gfc_conv_intrinsic_minmax_char, gfc_conv_intrinsic_count,
1823 gfc_conv_intrinsic_arith, gfc_conv_intrinsic_dot_product,
1824 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
1825 gfc_conv_intrinsic_btest, gfc_conv_intrinsic_not,
1826 gfc_conv_intrinsic_ibits, gfc_conv_intrinsic_ishft,
1827 gfc_conv_intrinsic_ichar, gfc_conv_intrinsic_size,
1828 gfc_conv_intrinsic_array_transfer, gfc_conv_intrinsic_transfer,
1829 gfc_conv_allocated, gfc_conv_associated, gfc_conv_intrinsic_trim,
1830 gfc_conv_intrinsic_repeat): Likewise.
1832 2008-02-23 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1835 * trans-expr.c (gfc_conv_power_op): Use BUILT_IN_CPOW{F,,L}.
1836 * f95-lang.c (gfc_init_builtin_functions): Define BUILT_IN_CPOW{F,,L}.
1837 * trans.h (gfor_fndecl_math_cpow, gfor_fndecl_math_cpowf,
1838 gfor_fndecl_math_cpowl10, gfor_fndecl_math_cpowl16): Remove.
1839 * trans-decl.c: Likewise.
1841 2008-02-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1844 * expr.c (find_array_element): Modify traversing the constructor to
1845 avoid trying to access NULL memory pointed to by next for the
1846 last element. (find_array_section): Exit while loop if cons->next is
1849 2008-02-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1852 * iresolve.c (resolve_mask_arg): Add gfc_clear_ts to initialize
1854 (gfc_resolve_aint): Likewise.
1855 (gfc_resolve_anint): Likewise.
1856 (gfc_resolve_besn): Likewise.
1857 (gfc_resolve_cshift): Likewise.
1858 (gfc_resolve_ctime): Likewise.
1859 (gfc_resolve_eoshift): Likewise.
1860 (gfc_resolve_index_func): Likewise.
1861 (gfc_resolve_isatty): Likewise.
1862 (gfc_resolve_malloc): Likewise.
1863 (gfc_resolve_rrspacing): Likewise.
1864 (gfc_resolve_scale): Likewise.
1865 (gfc_resolve_set_exponent): Likewise.
1866 (gfc_resolve_spacing): Likewise.
1867 (gfc_resolve_spacing): Likewise.
1868 (gfc_resolve_fgetc): Likewise.
1869 (gfc_resolve_fputc): Likewise.
1870 (gfc_resolve_ftell): Likewise.
1871 (gfc_resolve_ttynam): Likewise.
1872 (gfc_resolve_alarm_sub): Likewise.
1873 (gfc_resolve_mvbits): Likewise.
1874 (gfc_resolve_getarg): Likewise.
1875 (gfc_resolve_signal_sub): Likewise.
1876 (gfc_resolve_exit): Likewise.
1877 (gfc_resolve_flush): Likewise.
1878 (gfc_resolve_free): Likewise.
1879 (gfc_resolve_ctime_sub): Likewise.
1880 (gfc_resolve_fgetc_sub): Likewise.
1881 (gfc_resolve_fputc_sub): Likewise.
1882 (gfc_resolve_fseek_sub): Likewise.
1883 (gfc_resolve_ftell_sub): Likewise.
1884 (gfc_resolve_ttynam_sub): Likewise.
1886 2008-02-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1888 * gfc-internals.texi: Fix typos and markup nits.
1889 * gfortran.texi: Likewise.
1890 * intrinsic.texi: Likewise.
1892 2008-02-21 Richard Guenther <rguenther@suse.de>
1894 * trans-expr.c (gfc_conv_expr_op): Expand INTRINSIC_PARENTHESES
1895 as unary PAREN_EXPR for real and complex typed expressions.
1896 (gfc_conv_unary_op): Fold the built tree.
1898 2008-02-20 Tobias Burnus <burnus@net-b.de>
1901 * match.c (gfc_match_name): Improve error message for '$'.
1903 2008-02-19 Daniel Franke <franke.daniel@gmail.com>
1906 * expr.c (gfc_check_pointer_assign): Add type and kind information
1907 to type-mismatch message.
1908 (gfc_check_assign): Unify error messages.
1910 2008-02-16 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1913 * gfortran.texi: Create new section for unimplemented extensions.
1914 Add "STRUCTURE and RECORD" and "ENCODE and DECODE statements".
1915 Remove "smaller projects" list. Fix a few typos.
1917 2008-02-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1919 * intrinsic.texi: Rename INDEX node to avoid clashing with
1920 index.html on case-insensitive systems.
1922 2008-02-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1925 * trans-expr.c (gfc_conv_function_call): Force evaluation of
1928 2008-02-10 Daniel Franke <franke.daniel@gmail.com>
1931 * lang.opt: Allow '-J<dir>' next to '-J <dir>',
1932 likewise '-I <dir>' and '-I<dir>'.
1934 2008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1937 * Make-lang.in (f951): Add $(GMPLIBS).
1939 2008-02-05 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1942 * trans-common.c (build_field): Mark fields as volatile when needed.
1944 2008-02-05 Tobias Burnus <burnus@net-b.de>
1947 * data.c (gfc_assign_data_value): Only free "size" if
1948 it has not already been freed.
1950 2008-02-05 Paul Thomas <pault@gcc.gnu.org>
1953 * array.c (match_array_element_spec): Remove check for negative
1955 (gfc_resolve_array_spec): Add check for negative size.
1957 2008-02-05 Paul Thomas <pault@gcc.gnu.org>
1960 * data.c (gfc_assign_data_value): Add bounds check for array
1963 2008-02-04 Daniel Franke <franke.daniel@gmail.com>
1965 * resolve.c (resolve_where): Fix typo.
1966 (gfc_resolve_where_code_in_forall): Likewise.
1968 2008-02-03 Paul Thomas <pault@gcc.gnu.org>
1971 * resolve.c (resolve_allocate_deallocate): New function.
1972 (resolve_code): Call it for allocate and deallocate.
1973 * match.c (gfc_match_allocate, gfc_match_deallocate) : Remove
1974 the checking of the STAT tag and put in above new function.
1975 * primary,c (match_variable): Do not fix flavor of host
1976 associated symbols yet if the type is not known.
1978 2008-01-31 Paul Thomas <pault@gcc.gnu.org>
1981 * expr.c (gfc_check_assign): It is an error to assign
1982 to a sibling procedure.
1984 2008-01-30 Paul Thomas <pault@gcc.gnu.org>
1987 * symbol.c (gfc_delete_symtree, gfc_undo_symbols): Rename
1988 delete_symtree to gfc_delete_symtree.
1989 * gfortran.h : Add prototype for gfc_delete_symtree.
1990 * module.c (load_generic_interfaces): Transfer symbol to a
1991 unique symtree and delete old symtree, instead of renaming.
1992 (read_module): The rsym and the found symbol are the same, so
1993 the found symtree can be deleted.
1996 * decl.c (match_char_spec): Remove the constraint on deferred
1997 matching of functions and free the length expression.
1998 delete_symtree to gfc_delete_symtree.
1999 (gfc_match_type_spec): Whitespace.
2000 (gfc_match_function_decl): Defer characteristic association for
2001 all types except BT_UNKNOWN.
2002 * parse.c (decode_specification_statement): Only derived type
2003 function matching is delayed to the end of specification.
2005 2008-01-28 Tobias Burnus <burnus@net-b.de>
2008 * simplify.c (gfc_simplify_shape): Simplify rank zero arrays.
2010 2008-01-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2013 * array.c (gfc_check_constructor_type): Revert clearing the expression.
2015 2008-01-26 Tobias Burnus <burnus@net-b.de>
2018 * trans-expr.c (gfc_conv_function_call): Don't call
2019 gfc_add_interface_mapping if the expression is NULL.
2021 2008-01-26 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2024 * trans-array.c (gfc_trans_create_temp_array): Remove call to
2025 gcc_assert (integer_zerop (loop->from[n])).
2027 2008-01-25 Daniel Franke <franke.daniel@gmail.com>
2030 * resolve.c (resolve_where): Added check if user-defined assignment
2031 operator is an elemental subroutine.
2032 (gfc_resolve_where_code_in_forall): Likewise.
2034 2008-01-24 Daniel Franke <franke.daniel@gmail.com>
2038 * gfortran.h: Revert changes from 2008-01-17.
2039 * match.c: Likewise.
2040 * symbol.c: Likewise.
2041 (gfc_undo_symbols): Undo namespace changes related to common blocks.
2043 2008-01-24 Daniel Franke <franke.daniel@gmail.com>
2046 * data.c (formalize_structure_cons): Skip formalization on
2049 2008-01-24 Daniel Franke <franke.daniel@gmail.com>
2051 * gfortran.texi (OpenMP): Extended existing documentation.
2052 (contributors): Added major contributors of 2008 that were
2054 (proposed extensions): Removed implemented items.
2056 2008-01-24 Paul Thomas <pault@gcc.gnu.org>
2059 * parse.c (next_statement) : If ST_GET_FCN_CHARACTERISTICS is
2060 seen, check for a statement label and, if present, delete it
2061 and set the locus to the start of the statement.
2063 2008-01-22 Paul Thomas <pault@gcc.gnu.org>
2066 * trans-io.c (gfc_trans_transfer): If the array reference in a
2067 read has a vector subscript, use gfc_conv_subref_array_arg to
2068 copy back the temporary.
2070 2008-01-22 Tobias Burnus <burnus@net-b.de>
2073 * interface.c (compare_actual_formal): Fix adding type
2074 to missing_arg_type for absent optional arguments.
2076 2008-01-22 Tobias Burnus <burnus@net-b.de>
2079 * parse.c (parse_spec): Change = into ==.
2081 2008-01-22 Daniel Franke <franke.daniel@gmail.com>
2084 * expr.c (check_elemental): Fix check for valid data types.
2086 2008-01-22 Tobias Burnus <burnus@net-b.de>
2089 * scanner.c (load_line): Support <tab><digit> continuation lines.
2090 * invoke.texi (-Wtabs): Document this.
2092 2008-01-22 Paul Thomas <pault@gcc.gnu.org>
2095 * module.c (read_module): Set use_rename attribute.
2097 2007-01-21 Tobias Burnus <burnus@net-b.de>
2100 * interface.c (compare_parameter): Improved error message
2101 for arguments of same type and mismatched kinds.
2103 2008-01-20 Paul Thomas <pault@gcc.gnu.org>
2106 * resolve.c (resolve_entries): Do not do an array bounds check
2107 if the result symbols are the same.
2110 * module.c (read_module) : Hide the symtree of the previous
2111 version of the symbol if this symbol is renamed.
2113 2008-01-20 Paul Thomas <pault@gcc.gnu.org>
2116 * array.c (gfc_check_constructor_type): Clear the expression ts
2117 so that the checking starts from the deepest level of array
2119 * primary.c (match_varspec): If an unknown type is changed to
2120 default character and the attempt to match a substring fails,
2121 change it back to unknown.
2124 * trans-array.c (gfc_add_loop_ss_code) : If ss->string_length is
2125 NULL for an array constructor, use the cl.length expression to
2127 (gfc_conv_array_parameter): Change call to gfc_evaluate_now to
2130 2008-01-19 Thomas Koenig <tkoenig@gcc.gnu.org>
2134 * iresolve.c (gfc_resolve_all): Remove conversion of mask
2135 argument to kind=1 by removing call to resolve_mask_arg().
2136 (gfc_resolve_any): Likewise.
2138 2008-01-19 Tobias Burnus <burnus@net-b.de>
2141 * primary.c (match_variable): Handle FL_UNKNOWN without
2142 uneducated guessing.
2143 (match_variable): Improve error message.
2145 2008-01-18 Tobias Burnus <burnus@net-b.de>
2148 * interface.c (get_expr_storage_size): Return storage size
2149 for array element designators.
2150 (compare_actual_formal): Reject unequal string sizes for
2151 assumed-shape dummy arguments. And fix error message for
2152 array-sections with vector subscripts.
2154 2008-01-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2157 * simplify.c (is_constant_array_expr): New static function that returns
2158 true if the given expression is an array and is constant.
2159 (gfc_simplify_reshape): Use new function.
2161 2008-01-17 H.J. Lu <hongjiu.lu@intel.com>
2164 * symbol.c (free_common_tree): Renamed to ...
2165 (gfc_free_common_tree): This. Remove static.
2166 (gfc_free_namespace): Updated.
2168 * gfortran.h (gfc_free_common_tree): New.
2170 * match.c (gfc_match_common): Call gfc_free_common_tree () with
2171 gfc_current_ns->common_root and set gfc_current_ns->common_root
2172 to NULL on syntax error.
2174 2008-01-18 Richard Sandiford <rsandifo@nildram.co.uk>
2177 * trans-expr.c (gfc_conv_function_call): Use proper
2178 type for returned character pointers.
2180 2008-01-17 Paul Thomas <pault@gcc.gnu.org>
2185 * decl.c : Remove gfc_function_kind_locus and
2186 gfc_function_type_locus. Add gfc_matching_function.
2187 (match_char_length): If matching a function and the length
2188 does not match, return MATCH_YES and try again later.
2189 (gfc_match_kind_spec): The same.
2190 (match_char_kind): The same.
2191 (gfc_match_type_spec): The same for numeric and derived types.
2192 (match_prefix): Rename as gfc_match_prefix.
2193 (gfc_match_function_decl): Except for function valued character
2194 lengths, defer applying kind, type and charlen info until the
2195 end of specification block.
2196 gfortran.h (gfc_statement): Add ST_GET_FCN_CHARACTERISTICS.
2197 parse.c (decode_specification_statement): New function.
2198 (decode_statement): Call it when a function has kind = -1. Set
2199 and reset gfc_matching function, as function statement is being
2201 (match_deferred_characteristics): Simplify with a single call
2202 to gfc_match_prefix. Do appropriate error handling. In any
2203 case, make sure that kind = -1 is reset or corrected.
2204 (parse_spec): Call above on seeing ST_GET_FCN_CHARACTERISTICS.
2205 Throw an error if kind = -1 after last specification statement.
2206 parse.h : Prototype for gfc_match_prefix.
2208 2008-01-16 Tobias Burnus <burnus@net-b.de>
2211 * interface.c (compare_parameter): Allow AS_DEFERRED array
2212 elements and reject attr.pointer array elemenents.
2213 (get_expr_storage_size): Return storage size of elements of
2214 assumed-shape and pointer arrays.
2216 2008-01-15 Sebastian Pop <sebastian.pop@amd.com>
2218 * f95-lang.c (gfc_init_builtin_functions): Initialize GOMP builtins
2219 for flag_tree_parallelize_loops.
2221 2008-01-15 Thomas Koenig <tkoenig@gcc.gnu.org>
2224 * iresolve.c (gfc_resolve_all): Call resolve_mask_arg.
2225 (gfc_resolve_any): Likewise.
2226 (gfc_resolve_count): Likewise. Don't append kind of
2227 argument to function name.
2229 2008-01-13 Tobias Burnus <burnus@net-b.de>
2232 * resolve.c (resolve_actual_arglist): For expressions,
2233 also check for assume-sized arrays.
2234 * interface.c (compare_parameter): Move F2003 character checks
2235 here, print error messages here, reject elements of
2236 assumed-shape array as argument to dummy arrays.
2237 (compare_actual_formal): Update for the changes above.
2239 2008-01-13 Tobias Burnus <burnus@net-b.de>
2242 * decl.c (contained_procedure): Only check directly preceeding state.
2244 2008-01-13 Tobias Burnus <burnus@net-b.de>
2247 * check.c (gfc_check_shape): Accept array ranges of
2248 assumed-size arrays.
2250 2008-01-12 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2253 * match.c (gfc_match_name): Don't error if leading character is a '(',
2254 just return MATCH_NO.
2256 2008-01-11 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2259 * trans-io.c (create_dummy_iostat): Commit the symbol.
2261 2008-01-11 Paul Thomas <pault@gcc.gnu.org>
2264 * simplify.c (gfc_simplify_transfer): Return NULL if the size
2265 of the element is unavailable and only assign character length
2266 to the result, if 'mold' is constant.
2268 2008-01-10 Paul Thomas <pault@gcc.gnu.org>
2271 * trans-array.c (gfc_trans_array_ctor_element): Use gfc_trans_string_copy
2272 to assign strings and perform bounds checks on the string length.
2273 (get_array_ctor_strlen): Remove bounds checking.
2274 (gfc_trans_array_constructor): Initialize string length checking.
2275 * trans-array.h : Add prototype for gfc_trans_string_copy.
2277 2008-01-08 Richard Guenther <rguenther@suse.de>
2280 PR tree-optimization/34683
2281 * trans-types.c (gfc_get_array_type_bounds): Use an array type
2282 with known size for accesses if that is known.
2284 2008-01-08 Paul Thomas <pault@gcc.gnu.org>
2287 * expr.c (find_array_element): Check that the array bounds are
2288 constant before using them. Use lower, as well as upper bound.
2289 (check_restricted): Allow implied index variable.
2291 2008-01-08 Paul Thomas <pault@gcc.gnu.org>
2294 * trans_array.c (gfc_trans_deferred_array): Do not null the
2295 data pointer on entering scope, nor deallocate it on leaving
2296 scope, if the symbol has the 'save' attribute.
2299 * trans_decl.c (gfc_finish_var_decl): Derived types with
2300 allocatable components and an initializer must be TREE_STATIC.
2302 2008-01-07 Paul Thomas <pault@gcc.gnu.org>
2305 * module.c (write_generic): Rewrite completely.
2306 (write_module): Change call to write_generic.
2308 2008-01-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2311 * scanner.c (load_line): Do not count ' ' as printable when checking for
2314 2008-01-06 Paul Thomas <pault@gcc.gnu.org>
2317 * module.c (load_needed): If the namespace has no proc_name
2318 give it the module symbol.
2320 2008-01-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2323 * trans-expr.c (gfc_conv_missing_dummy): Use a temporary to type convert
2324 the dummy variable expression, test for NULL, and pass the variable
2325 address to the called function.
2327 2007-01-06 Tobias Burnus <burnus@net-b.de>
2330 * match.c (gfc_match_common): Remove blank common in
2332 * resolve.c (resolve_common_vars): New function.
2333 (resolve_common_blocks): Move checks to resolve_common_vars
2334 and invoke that function.
2335 (resolve_types): Call resolve_common_vars for blank commons.
2337 2008-01-06 Tobias Burnus <burnus@net-b.de>
2340 * resolve.c (resolve_equivalence_derived): Reject derived types with
2341 default initialization if equivalenced with COMMON variable.
2343 2008-01-06 Tobias Burnus <burnus@net-b.de>
2346 * io.c (check_io_constraints): Disallow unformatted I/O for
2349 2008-01-06 Tobias Burnus <burnus@net-b.de>
2352 * resolve.c (resolve_formal_arglist): Reject dummy procedure in
2353 ELEMENTAL functions.
2355 2008-01-06 Tobias Burnus <burnus@net-b.de>
2358 * interface.c (compare_actual_formal): Reject parameter
2359 actual to intent(out) dummy.
2361 2008-01-04 Tobias Burnus <burnus@net-b.de>
2364 * primary.c (match_varspec): Gobble whitespace before