1 2008-07-27 Tobias Burnus <burnus@net-b.de>
6 * trans.c (gfc_trans_runtime_check): Allow run-time warning besides
8 * trans.h (gfc_trans_runtime_check): Update declaration.
9 * trans-array.c (gfc_trans_array_ctor_element,gfc_trans_array_bound_check,
10 gfc_conv_array_ref,gfc_conv_ss_startstride,gfc_trans_dummy_array_bias):
11 Updated gfc_trans_runtime_check calls.
12 (gfc_conv_array_parameter): Implement flag_check_array_temporaries,
13 fix packing/unpacking for nonpresent optional actuals to optional
15 * trans-array.h (gfc_conv_array_parameter): Update declaration.
16 * trans-expr.c (gfc_conv_substring,gfc_trans_arrayfunc_assign,
17 gfc_conv_function_call): Updated gfc_trans_runtime_check calls.
18 (gfc_conv_function_call): Update gfc_conv_array_parameter calls.
19 * trans-expr.c (gfc_trans_goto): Updated gfc_trans_runtime_check
21 * trans-io.c (set_string,gfc_conv_intrinsic_repeat): Ditto.
22 (gfc_conv_intrinsic_transfer,gfc_conv_intrinsic_loc): Same for
23 gfc_conv_array_parameter.
24 * trans-intrinsics.c (gfc_conv_intrinsic_bound): Ditto.
25 * trans-decl.c (gfc_build_builtin_function_decls): Add
26 gfor_fndecl_runtime_warning_at.
27 * lang.opt: New option fcheck-array-temporaries.
28 * gfortran.h (gfc_options): New flag_check_array_temporaries.
29 * options.c (gfc_init_options, gfc_handle_option): Handle flag.
30 * invoke.texi: New option fcheck-array-temporaries.
32 2008-07-24 Jan Hubicka <jh@suse.cz>
34 * fortran/options.c (gfc_post_options): Remove flag_unline_trees code.
36 2008-07-24 Daniel Kraft <d@domob.eu>
39 * lang.opt (Wnonstd-intrinsics): Removed option.
40 (Wintrinsics-std), (Wintrinsic-shadow): New options.
41 * invoke.texi (Option Summary): Removed -Wnonstd-intrinsics
42 from the list and added -Wintrinsics-std and -Wintrinsic-shadow.
43 (Error and Warning Options): Documented the new options and removed
44 the documentation for -Wnonstd-intrinsics.
45 * gfortran.h (gfc_option_t): New members warn_intrinsic_shadow and
46 warn_intrinsics_std, removed warn_nonstd_intrinsics.
47 (gfc_is_intrinsic): Renamed from gfc_intrinsic_name.
48 (gfc_warn_intrinsic_shadow), (gfc_check_intrinsic_standard): New.
49 * decl.c (match_procedure_decl): Replaced gfc_intrinsic_name by
50 the new name gfc_is_intrinsic.
51 (warn_intrinsic_shadow): New helper method.
52 (gfc_match_function_decl), (gfc_match_subroutine): Call the new method
53 warn_intrinsic_shadow to check the just-parsed procedure.
54 * expr.c (check_init_expr): Call new gfc_is_intrinsic to check whether
55 the function called is really an intrinsic in the selected standard.
56 * intrinsic.c (gfc_is_intrinsic): Renamed from gfc_intrinsic_name and
57 extended to take into account the selected standard settings when trying
58 to find out whether a symbol is an intrinsic or not.
59 (gfc_check_intrinsic_standard): Made public and extended.
60 (gfc_intrinsic_func_interface), (gfc_intrinsic_sub_interface): Removed
61 the calls to check_intrinsic_standard, this check now happens inside
63 (gfc_warn_intrinsic_shadow): New method defined.
64 * options.c (gfc_init_options): Initialize new warning flags to false
65 and removed intialization of Wnonstd-intrinsics flag.
66 (gfc_post_options): Removed logic for Wnonstd-intrinsics flag.
67 (set_Wall): Set new warning flags and removed Wnonstd-intrinsics flag.
68 (gfc_handle_option): Handle the new flags and removed handling of the
69 old Wnonstd-intrinsics flag.
70 * primary.c (gfc_match_rvalue): Replaced call to gfc_intrinsic_name by
71 the new name gfc_is_intrinsic.
72 * resolve.c (resolve_actual_arglist): Ditto.
73 (resolve_generic_f), (resolve_unknown_f): Ditto.
74 (is_external_proc): Ditto.
75 (resolve_generic_s), (resolve_unknown_s): Ditto.
76 (resolve_symbol): Ditto and ensure for symbols declared INTRINSIC that
77 they are really available in the selected standard setting.
79 2008-07-24 Daniel Kraft <d@domob.eu>
81 * match.c (gfc_match): Add assertion to catch wrong calls trying to
82 match upper-case characters.
84 2008-07-24 Thomas Koenig <tkoenig@gcc.gnu.org>
87 * gfortran.h: Add "warn_array_temp" to gfc_option_t.
88 * lang.opt: Add -Warray-temporaries.
89 * invoke.texi: Document -Warray-temporaries
90 * trans-array.h (gfc_trans_create_temp_array): Add argument of
92 (gfc_conv_loop_setup): Likewise.
93 * trans-array.c (gfc_trans_create_temp_array): If
94 -Warray-temporaries is given and locus is present, warn about
95 creation of array temporaries.
96 (gfc_trans_array_constructor_subarray): Add locus to call
97 of gfc_conv_loop_setup.
98 (gfc_trans_array_constructor): Add where argument. Pass where
99 argument to call of gfc_trans_create_temp_array.
100 (gfc_add_loop_ss_code): Add where argument. Pass where argument
101 to recursive call of gfc_add_loop_ss_code and to call of
102 gfc_trans_array_constructor.
103 (gfc_conv_loop_setup): Add where argument. Pass where argument
104 to calls to gfc_add_loop_ss_code and to gfc_trans_create_temp_array.
105 (gfc_conv_expr_descriptor): Pass location to call of
107 (gfc_conv_array_parameter): If -Warray-temporaries is given,
108 warn about creation of temporary arrays.
109 * trans-expr.c (gfc_conv_subref_array_arg): Add where argument
110 to call to gfc_conv_loop_setup.
111 (gfc_conv_function_call): Add where argument to call to
112 gfc_trans_creat_temp_array.
113 (gfc_trans_subarray_assign): Likewise.
114 (gfc_trans_assignment_1): Add where argument to call to
116 * trans-stmt.c (gfc_conv_elemental_dependencies): Add where
117 argument to call to gfc_trans_create_temp_array.
118 (gfc_trans_call): Add where argument to call to gfc_conv_loop_setup.
119 (generate_loop_for_temp_to_lhs): Likewise.
120 (generate_loop_for_rhs_to_temp): Likewise.
121 (compute_inner_temp_size): Likewise.
122 (gfc_trans-pointer_assign_need_temp): Likewise.
123 (gfc_evaluate_where_mask): Likewise.
124 (gfc_trans_where_assign): Likewise.
125 (gfc_trans_where_3): Likewise.
126 * trans-io.c (transfer_srray_component): Add where argument
127 to function. Add where argument to call to gfc_conv_loop_setup.
128 (transfer_expr): Add where argument to call to
129 transfer_array_component.
130 (gfc_trans_transfer): Add where expression to call to
132 * trans-intrinsic.c (gfc_conv_intrinsic_anyall): Add
133 where argument to call to gfc_conv_loop_setup.
134 (gfc_conv_intrinsic_count): Likewise.
135 (gfc_conv_intrinsic_arith): Likewise.
136 (gfc_conv_intrinsic_dot_product): Likewise.
137 (gfc_conv_intrinsic_minmaxloc): Likewise.
138 (gfc_conv_intrinsic_minmaxval): Likewise.
139 (gfc_conv_intrinsic_array_transfer): Warn about
140 creation of temporary array.
141 Add where argument to call to gfc_trans_create_temp_array.
142 * options.c (gfc_init_options): Initialize gfc_option.warn_array_temp.
143 (gfc_handle_option): Set gfc_option.warn_array_temp.
145 2008-07-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
148 * f95-lang.c (gfc_mark_addressable): All calls to pedwarn changed.
150 2008-07-22 Daniel Kraft <d@domob.eu>
153 * io.c (error_element), (format_locus): New static globals.
154 (unexpected_element): Spelled out this message fully.
155 (next_char): Keep track of locus when not MODE_STRING.
156 (next_char_not_space): Remember last parsed element in error_element.
157 (format_lex): Fix two indentation errors.
158 (check_format): Use format_locus and possibly error_element for a
159 slightly better error message on invalid format.
160 (check_format_string): Set format_locus to start of the string
161 expression used as format.
163 2008-07-21 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
165 * expr.c (gfc_check_pointer_assign): Fix typo in string.
166 * io.c (check_format): Fix typo in string. Fix comment typos.
167 * parse.c (gfc_global_used): Likewise.
168 * resolve.c (resolve_allocate_expr): Likewise.
169 * symbol.c (gfc_set_default_type): Likewise.
170 * arith.c: Fix typos in comments.
174 * dependency.c: Likewise.
175 * f95-lang.c: Likewise.
176 * gfortran.h: Likewise.
177 * matchexp.c: Likewise.
178 * module.c: Likewise.
179 * primary.c: Likewise.
180 * scanner.c: Likewise.
181 * trans-array.c: Likewise.
182 * trans-common.c: Likewise.
183 * trans-decl.c: Likewise.
184 * trans-expr.c: Likewise.
185 * trans-intrinsic.c: Likewise.
186 * trans-types.c: Likewise.
190 2008-07-19 Tobias Burnus <burnus@net-b.de>
193 * matchexp.c (gfc_get_parentheses): Remove obsolete workaround,
194 which caused the generation of wrong code.
196 2008-07-19 Tobias Burnus <burnus@net-b.de>
199 * scanner.c (load_file): Add argument to destinguish between
200 true filename and displayed filename.
201 (include_line,gfc_new_file): Adapt accordingly.
203 2008-07-19 Tobias Burnus <burnus@net-b.de>
205 * check.c (gfc_check_cshift,gfc_check_eoshift,gfc_check_unpack): Add rank
206 checks for cshift's shift and eoshift's shift and boundary args.
207 (gfc_check_unpack): Add rank and shape tests for unpack.
209 2008-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
211 * gfortran.h (new): Remove macro.
212 * array.c (gfc_append_constructor, match_array_list,
213 gfc_match_array_constructor): Likewise.
214 * bbt.c (insert, gfc_insert_bbt): Likewise.
215 * decl.c (var_element, top_var_list, top_val_list, gfc_match_data,
216 get_proc_name): Likewise.
217 * expr.c (gfc_copy_actual_arglist): Likewise.
218 * interface.c (compare_actual_formal, check_new_interface,
219 gfc_add_interface): Likewise.
220 * intrinsic.c gfc_convert_type_warn, gfc_convert_chartype):
222 * io.c (match_io_iterator, match_io_list): Likewise.
223 * match.c (match_forall_header): Likewise.
224 * matchexp.c (build_node): Likewise.
225 * module.c (gfc_match_use): Likewise.
226 * scanner.c (load_file): Likewise.
227 * st.c (gfc_append_code): Likewise.
228 * symbol.c (save_symbol_data, gfc_get_sym_tree, gfc_undo_symbols,
229 gfc_commit_symbols): Likewise.
230 * trans-common.c (build_field): Likewise.
231 * trans-decl.c (gfc_finish_var_decl): Likewise.
232 * trans-expr.c (gfc_free_interface_mapping,
233 gfc_get_interface_mapping_charlen, gfc_add_interface_mapping,
234 gfc_finish_interface_mapping,
235 gfc_apply_interface_mapping_to_expr): Likewise.
236 * trans.h (gfc_interface_sym_mapping): Likewise.
238 2008-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
240 * gfortran.h (operator): Remove macro.
241 (gfc_namespace, gfc_expr): Avoid C++ keywords.
242 * arith.c (eval_intrinsic, eval_intrinsic_f2, eval_intrinsic_f3):
244 * decl.c (access_attr_decl): Likewise.
245 * dependency.c (gfc_dep_compare_expr): Likewise.
246 * dump-parse-tree.c (show_expr, show_uop, show_namespace):
248 * expr.c (gfc_copy_expr, gfc_type_convert_binary,
249 simplify_intrinsic_op, check_intrinsic_op): Likewise.
250 * interface.c (fold_unary, gfc_match_generic_spec,
251 gfc_match_interface, gfc_match_end_interface,
252 check_operator_interface, check_uop_interfaces,
253 gfc_check_interfaces, gfc_extend_expr, gfc_extend_assign,
254 gfc_add_interface, gfc_current_interface_head,
255 gfc_set_current_interface_head): Likewise.
256 * iresolve.c (gfc_resolve_dot_product, gfc_resolve_matmul):
258 * matchexp.c (gfc_get_parentheses, build_node): Likewise.
259 * module.c (gfc_use_rename, gfc_match_use, find_use_name_n,
260 number_use_names, mio_expr, load_operator_interfaces, read_module,
261 write_operator, write_module): Likewise.
262 * openmp.c (resolve_omp_atomic): Likewise.
263 * resolve.c (resolve_operator, gfc_resolve_character_operator,
264 gfc_resolve_uops): Likewise.
265 * symbol.c (free_uop_tree, gfc_free_namespace): Likewise.
266 * trans-expr.c (gfc_conv_expr_op): Likewise.
267 * trans-openmp.c (gfc_trans_omp_atomic): Likewise.
269 2008-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
271 * gfortran.h (protected): Remove macro.
272 * dump-parse-tree.c (show_attr): Avoid C++ keywords.
273 * expr.c (gfc_check_pointer_assign): Likewise.
274 * interface.c (compare_parameter_protected): Likewise.
275 * intrinsic.c (enum class, add_sym, add_sym_0, add_sym_1,
276 add_sym_1s, add_sym_1m, add_sym_2, add_sym_2s, add_sym_3,
277 add_sym_3ml, add_sym_3red, add_sym_3s, add_sym_4, add_sym_4s,
278 add_sym_5s): Likewise.
279 * match.c (gfc_match_assignment, gfc_match_pointer_assignment):
281 * module.c (mio_symbol_attribute): Likewise.
282 * primary.c (match_variable): Likewise.
283 * resolve.c (resolve_equivalence): Likewise.
284 * symbol.c (check_conflict, gfc_add_protected, gfc_copy_attr):
286 * trans-types.c (gfc_get_array_type_bounds): Likewise.
288 2008-07-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
290 * arith.c (eval_type_intrinsic0): Avoid C++ keywords.
291 * gfortran.h (try, protected, operator, new): Likewise.
293 2008-07-17 Tobias Burnus <burnus@net-b.de>
297 * array.c (gfc_match_array_spec): Fix array-rank check.
298 * resolve.c (resolve_fl_derived): Fix constentness check
299 for the array dimensions.
301 2008-07-14 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
303 * Make-lang.in (gfortranspec.o): Fix dependencies.
305 2008-07-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
308 * io.c: Add error check for g0 edit descriptor followed by '.'.
310 2008-07-12 Daniel Kraft <d@domob.eu>
312 * resolve.c (resolve_fl_derived): Allow pointer components to empty
313 derived types fixing a missing part of PR fortran/33221.
315 2008-07-10 Daniel Kraft <d@domob.eu>
317 * gfc-internals.texi (section gfc_expr): Created documentation about
318 the gfc_expr internal data structure.
320 2008-07-07 Thomas Koenig <tkoenig@gcc.gnu.org>
323 * iresolve.c (gfc_resolve_product): Set shape of return
325 (gfc_resolve_sum): Likewise.
327 2008-07-07 Jakub Jelinek <jakub@redhat.com>
330 * f95-lang.c (poplevel): Don't ever add subblocks to
331 global_binding_level.
333 2008-07-02 Janus Weil <janus@gcc.gnu.org>
334 Tobias Burnus <burnus@net-b.de>
335 Paul Thomas <pault@gcc.gnu.org>
338 * gfortran.h (struct gfc_symbol): New member "proc_pointer".
339 * check.c (gfc_check_associated,gfc_check_null): Implement
341 * decl.c (match_procedure_decl): Ditto.
342 * expr.c (gfc_check_pointer_assign,gfc_check_assign_symbol): Ditto.
343 * interface.c (compare_actual_formal): Ditto.
345 * match.c (gfc_match_pointer_assignment): Ditto.
346 * parse.c (parse_interface): Ditto.
347 * primary.c (gfc_match_rvalue,match_variable): Ditto.
348 * resolve.c (resolve_fl_procedure): Ditto.
349 * symbol.c (check_conflict,gfc_add_external,gfc_add_pointer,
350 gfc_copy_attr,gen_fptr_param,build_formal_args): Ditto.
351 * trans-decl.c (get_proc_pointer_decl,gfc_get_extern_function_decl,
352 create_function_arglist): Ditto.
353 * trans-expr.c (gfc_conv_variable,gfc_conv_function_val,
354 gfc_conv_function_call,gfc_trans_pointer_assignment): Ditto.
356 2008-07-02 Thomas Koenig <tkoenig@gcc.gnu.org>
360 * iresolve.c (resolve_mask_arg): Don't convert mask to
361 kind=1 logical if it is of that type already.
363 2008-06-29 Thomas Koenig <tkoenig@gcc.gnu.org>
366 * iresolve.c (gfc_resolve_matmul): Copy shapes
369 2008-06-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
371 * invoke.texi: Add documentation for runtime behavior of
374 2008-06-28 Daniel Kraft <d@domob.eu>
376 * gfc-internals.texi (section gfc_code): Extended documentation about
377 gfc_code in the internal datastructures chapter including details about
378 how IF, DO and SELECT blocks look like and an example for how the
379 block-chaining works.
381 2008-06-25 Paul Thomas <pault@gcc.gnu.org>
384 * interface.c (check_intents): Correct error where the actual
385 arg was checked for a pointer argument, rather than the formal.
387 2008-06-24 Paul Thomas <pault@gcc.gnu.org>
390 * expr.c (gfc_check_assign): Change message and locus for
391 error when conform == 0.
393 2008-06-23 Jakub Jelinek <jakub@redhat.com>
396 * cpp.c (cpp_define_builtins): Change _OPENMP value to 200805.
398 2008-06-20 Laurynas Biveinis <laurynas.biveinis@gmail.com>
399 Tobias Burnus <burnus@net-b.de>
403 * scanner.c (preprocessor_line): do not call gfc_free for
404 current_file->filename if it differs from filename.
406 2008-06-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
408 * arith.c (hollerith2representation): Fix for -Wc++-compat.
409 * array.c (gfc_get_constructor): Likewise.
410 * decl.c (gfc_get_data_variable, gfc_get_data_value, gfc_get_data,
411 create_enum_history, gfc_match_final_decl): Likewise.
412 * error.c (error_char): Likewise.
413 * expr.c (gfc_get_expr, gfc_copy_expr): Likewise.
414 * gfortran.h (gfc_get_charlen, gfc_get_array_spec,
415 gfc_get_component, gfc_get_formal_arglist, gfc_get_actual_arglist,
416 gfc_get_namelist, gfc_get_omp_clauses, gfc_get_interface,
417 gfc_get_common_head, gfc_get_dt_list, gfc_get_array_ref,
418 gfc_get_ref, gfc_get_equiv, gfc_get_case, gfc_get_iterator,
419 gfc_get_alloc, gfc_get_wide_string): Likewise.
420 * interface.c (count_types_test): Likewise.
421 * intrinsic.c (add_char_conversions, gfc_intrinsic_init_1):
423 * io.c (gfc_match_open, gfc_match_close, match_filepos, match_io,
424 gfc_match_inquire, gfc_match_wait): Likewise.
425 * match.c (gfc_match, match_forall_iterator): Likewise.
426 * module.c (gfc_get_pointer_info, gfc_get_use_rename, add_fixup,
427 add_true_name, parse_string, write_atom, quote_string,
428 mio_symtree_ref, mio_gmp_real, write_common_0): Likewise.
429 * options.c (gfc_post_options): Likewise.
430 * primary.c (match_integer_constant, match_hollerith_constant,
431 match_boz_constant, match_real_constant,
432 gfc_get_structure_ctor_component, gfc_match_structure_constructor): Likewise.
433 * scanner.c (gfc_widechar_to_char, add_path_to_list,
434 add_file_change, load_line, get_file, preprocessor_line,
435 load_file, unescape_filename, gfc_read_orig_filename): Likewise.
436 * simplify.c (gfc_simplify_ibits, gfc_simplify_ishft,
437 gfc_simplify_ishftc): Likewise.
438 * symbol.c (gfc_get_st_label, gfc_get_namespace, gfc_new_symtree,
439 gfc_get_uop, gfc_new_symbol, save_symbol_data, gfc_get_gsymbol):
441 * target-memory.c (gfc_target_interpret_expr): Likewise.
442 * trans-const.c (gfc_build_wide_string_const): Likewise.
443 * trans-expr.c (gfc_add_interface_mapping): Likewise.
444 * trans-intrinsic.c (gfc_conv_intrinsic_conversion,
445 gfc_conv_intrinsic_int, gfc_conv_intrinsic_lib_function,
446 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_ctime,
447 gfc_conv_intrinsic_fdate, gfc_conv_intrinsic_ttynam,
448 gfc_conv_intrinsic_minmax, gfc_conv_intrinsic_minmax_char,
449 gfc_conv_intrinsic_ishftc, gfc_conv_intrinsic_index_scan_verify,
450 gfc_conv_intrinsic_merge, gfc_conv_intrinsic_trim): Likewise.
451 * trans.c (gfc_get_backend_locus): Likewise.
452 * trans.h (gfc_get_ss): Likewise.
454 2008-06-18 Daniel Kraft <d@domob.eu>
456 PR fortran/36517, fortran/36492
457 * array.c (gfc_resolve_character_array_constructor): Call
458 gfc_set_constant_character_len with changed length-chec argument.
459 * decl.c (gfc_set_constant_character_len): Changed array argument to
460 be a generic length-checking argument that can be used for correct
461 checking with typespec and in special cases where the should-be length
462 is different from the target length.
463 (build_struct): Call gfc_set_constant_character_len with changed length
464 checking argument and introduced additional checks for exceptional
465 conditions on invalid code.
466 (add_init_expr_to_sym), (do_parm): Call gfc_set_constant_character_len
467 with changed argument.
468 * match.h (gfc_set_constant_character_len): Changed third argument to
469 int for the should-be length rather than bool.
471 2008-06-17 Daniel Kraft <d@domob.eu>
474 * array.c (gfc_resolve_character_array_constructor): Check that all
475 elements with constant character length have the same one rather than
476 fixing it if no typespec is given, emit an error if they don't. Changed
477 return type to "try" and return FAILURE for the case above.
478 (gfc_resolve_array_constructor): Removed unneeded call to
479 gfc_resolve_character_array_constructor in this function.
480 * gfortran.h (gfc_resolve_character_array_constructor): Returns try.
481 * trans-array.c (get_array_ctor_strlen): Return length of first element
482 rather than last element.
483 * resolve.c (gfc_resolve_expr): Handle FAILURE return from
484 gfc_resolve_character_array_constructor.
486 2008-06-17 Paul Thomas <pault@gcc.gnu.org>
489 * resolve.c (add_dt_to_dt_list): New function.
490 (resolve_fl_derived): Call new function for pointer components
491 and when derived type resolved.
493 2008-06-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
496 * trans-decl.c (gfc_generate_function_code): Add range_check to options
499 2008-06-15 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
501 * gfc-internals.texi: Expand TABs, drop indentation outside examples.
502 * gfortran.texi: Likewise.
503 * intrinsic.texi: Likewise.
504 * invoke.texi: Likewise.
506 2008-06-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
509 * trans-io.c (gfc_build_io_library_fndecls): Build declaration for
510 transfer_character_wide which includes passing in the character kind to
511 support wide character IO. (transfer_expr): If the kind == 4, create the
512 argument and build the call.
513 * gfortran.texi: Fix typo.
515 2008-06-13 Tobias Burnus <burnus@net-b.de>
518 * decl.c (do_parm): Handle init expression for len=*.
520 2008-06-12 Tobias Burnus <burnus@net-b.de>
523 * trans-intrinsic.c (gfc_conv_intrinsic_index_scan_verify):
524 Fix passing of the BACK= argument.
526 2008-06-10 Jerry DeLisle <jvdelisle@gcc.gnu.org>
528 * cpp.c: Add copyright notice.
529 * cpp.h: Add copyright notice.
531 2008-06-08 Janus Weil <janus@gcc.gnu.org>
534 * decl.c (match_procedure_decl): Correctly recognize if the interface
535 is an intrinsic procedure.
537 2008-06-08 Tobias Burnus <burnus@net-b.de>
540 * resolve.c (resolve_symbol): Copy more attributes for
541 PROCEDUREs with interfaces.
543 2008-06-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
547 * io.c (check_format): Add new error message for zero width.
548 Use new error message for FMT_A and with READ, FMT_G. Allow
549 FMT_G with WRITE except when -std=F95 and -std=F2003.
551 2008-06-07 Tobias Burnus <burnus@net-b.de>
554 * intrinsic.c (add_functions): Implement c_sizeof.
555 * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): Do not
556 create unneeded variable in the scalar case.
557 * intrinsic.texi: Add C_SIZEOF documentation.
559 2008-06-06 Tobias Burnus <burnus@net-b.de>
561 * intrinsic.texi (BESSEL_J1): Fix BES(S)EL_J1 typo.
563 2008-06-06 Jakub Jelinek <jakub@redhat.com>
565 * scanner.c (skip_free_comments, skip_fixed_comments): Handle tabs.
566 * parse.c (next_free): Allow tab after !$omp.
567 (decode_omp_directive): Handle !$omp task, !$omp taskwait
569 (case_executable): Add ST_OMP_TASKWAIT.
570 (case_exec_markers): Add ST_OMP_TASK.
571 (gfc_ascii_statement): Handle ST_OMP_TASK, ST_OMP_END_TASK and
573 (parse_omp_structured_block, parse_executable): Handle ST_OMP_TASK.
574 * gfortran.h (gfc_find_sym_in_expr): New prototype.
575 (gfc_statement): Add ST_OMP_TASK, ST_OMP_END_TASK and ST_OMP_TASKWAIT.
576 (gfc_omp_clauses): Add OMP_SCHED_AUTO to sched_kind,
577 OMP_DEFAULT_FIRSTPRIVATE to default_sharing. Add collapse and
579 (gfc_exec_op): Add EXEC_OMP_TASK and EXEC_OMP_TASKWAIT.
580 * f95-lang.c (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
581 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP, LANG_HOOKS_OMP_CLAUSE_DTOR,
582 LANG_HOOKS_OMP_PRIVATE_OUTER_REF): Define.
583 * trans.h (gfc_omp_clause_default_ctor): Add another argument.
584 (gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op,
585 gfc_omp_clause_dtor, gfc_omp_private_outer_ref): New prototypes.
586 * types.def (BT_ULONGLONG, BT_PTR_ULONGLONG,
587 BT_FN_BOOL_ULONGLONGPTR_ULONGLONGPTR,
588 BT_FN_BOOL_BOOL_ULL_ULL_ULL_ULLPTR_ULLPTR,
589 BT_FN_BOOL_BOOL_ULL_ULL_ULL_ULL_ULLPTR_ULLPTR,
590 BT_FN_VOID_PTR_PTR, BT_PTR_FN_VOID_PTR_PTR,
591 BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT): New.
592 (BT_BOOL): Use integer type with BOOL_TYPE_SIZE rather
593 than boolean_type_node.
594 * dump-parse-tree.c (gfc_show_omp_node): Handle EXEC_OMP_TASK,
595 EXEC_OMP_TASKWAIT, OMP_SCHED_AUTO, OMP_DEFAULT_FIRSTPRIVATE,
596 untied and collapse clauses.
597 (gfc_show_code_node): Handle EXEC_OMP_TASK and EXEC_OMP_TASKWAIT.
598 * trans.c (gfc_trans_code): Handle EXEC_OMP_TASK and
600 * st.c (gfc_free_statement): Likewise.
601 * resolve.c (gfc_resolve_blocks, resolve_code): Likewise.
602 (find_sym_in_expr): Rename to...
603 (gfc_find_sym_in_expr): ... this. No longer static.
604 (resolve_allocate_expr, resolve_ordinary_assign): Adjust caller.
605 * match.h (gfc_match_omp_task, gfc_match_omp_taskwait): New
607 * openmp.c (resolve_omp_clauses): Allow allocatable arrays in
608 firstprivate, lastprivate, reduction, copyprivate and copyin
610 (omp_current_do_code): Made static.
611 (omp_current_do_collapse): New variable.
612 (gfc_resolve_omp_do_blocks): Compute omp_current_do_collapse,
613 clear omp_current_do_code and omp_current_do_collapse on return.
614 (gfc_resolve_do_iterator): Handle collapsed do loops.
615 (resolve_omp_do): Likewise, diagnose errorneous collapsed do loops.
616 (OMP_CLAUSE_COLLAPSE, OMP_CLAUSE_UNTIED): Define.
617 (gfc_match_omp_clauses): Handle default (firstprivate),
618 schedule (auto), untied and collapse (n) clauses.
619 (OMP_DO_CLAUSES): Add OMP_CLAUSE_COLLAPSE.
620 (OMP_TASK_CLAUSES): Define.
621 (gfc_match_omp_task, gfc_match_omp_taskwait): New functions.
622 * trans-openmp.c (gfc_omp_private_outer_ref): New function.
623 (gfc_omp_clause_default_ctor): Add outer argument. For allocatable
624 arrays allocate them with the bounds of the outer var if outer
626 (gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op,
627 gfc_omp_clause_dtor): New functions.
628 (gfc_trans_omp_array_reduction): If decl is allocatable array,
629 allocate it with outer var's bounds in OMP_CLAUSE_REDUCTION_INIT
630 and deallocate it in OMP_CLAUSE_REDUCTION_MERGE.
631 (gfc_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
632 for assumed-size arrays.
633 (gfc_trans_omp_do): Add par_clauses argument. If dovar is
634 present in lastprivate clause and do loop isn't simple,
635 set OMP_CLAUSE_LASTPRIVATE_STMT. If dovar is present in
636 parallel's lastprivate clause, change it to shared and add
637 lastprivate clause to OMP_FOR_CLAUSES. Handle collapsed do loops.
638 (gfc_trans_omp_directive): Adjust gfc_trans_omp_do callers.
639 (gfc_trans_omp_parallel_do): Likewise. Move collapse clause to
640 OMP_FOR from OMP_PARALLEL.
641 (gfc_trans_omp_clauses): Handle OMP_SCHED_AUTO,
642 OMP_DEFAULT_FIRSTPRIVATE, untied and collapse clauses.
643 (gfc_trans_omp_task, gfc_trans_omp_taskwait): New functions.
644 (gfc_trans_omp_directive): Handle EXEC_OMP_TASK and
647 2008-06-04 Janus Weil <janus@gcc.gnu.org>
651 * resolve.c (resolve_symbol): Correctly copy the interface for a
652 PROCEDURE declaration.
654 2008-06-02 Janus Weil <janus@gcc.gnu.org>
657 * symbol.c (gfc_add_allocatable,gfc_add_dimension,
658 gfc_add_explicit_interface): Added checks.
659 * decl.c (attr_decl1): Added missing "var_locus".
660 * parse.c (parse_interface): Checking for errors.
662 2008-06-02 Daniel Kraft <d@domob.eu>
664 * gfortran.h: New statement-type ST_FINAL for FINAL declarations.
665 (struct gfc_symbol): New member f2k_derived.
666 (struct gfc_namespace): New member finalizers, for use in the above
667 mentioned f2k_derived namespace.
668 (struct gfc_finalizer): New type defined for finalizers linked list.
669 * match.h (gfc_match_final_decl): New function header.
670 * decl.c (gfc_match_derived_decl): Create f2k_derived namespace on
671 constructed symbol node.
672 (gfc_match_final_decl): New function to match a FINAL declaration line.
673 * parse.c (decode_statement): match-call for keyword FINAL.
674 (parse_derived): Parse CONTAINS section and accept FINAL statements.
675 * resolve.c (gfc_resolve_finalizers): New function to resolve (that is
676 in this case, check) a list of finalizer procedures.
677 (resolve_fl_derived): Call gfc_resolve_finalizers here.
678 * symbol.c (gfc_get_namespace): Initialize new finalizers to NULL.
679 (gfc_free_namespace): Free finalizers list.
680 (gfc_new_symbol): Initialize new f2k_derived to NULL.
681 (gfc_free_symbol): Free f2k_derived namespace.
682 (gfc_free_finalizer): New function to free a single gfc_finalizer node.
683 (gfc_free_finalizer_list): New function to free a linked list of
686 2008-06-02 Daniel Franke <franke.daniel@gmail.com>
690 * cpp.c (gfc_cpp_init): Do not initialize builtins if
691 processing already preprocessed input.
692 (gfc_cpp_preprocess): Finalize output with newline.
694 2008-05-31 Jerry DeLisle <jvdelisle@gcc.gnu.org>
696 * intrinsic.texi: Revert wrong commit.
698 2008-05-31 Steven G. Kargl <kargls@comcast.net>
700 * arith.c (gfc_arith_init_1): Remove now unused r and c variables.
701 Cleanup numerical inquiry function initialization.
702 (gfc_arith_done_1): Replace multiple mpfr_clear() invocations with
703 a single mpfr_clears().
704 (gfc_check_real_range): Re-arrange logic to eliminate multiple
705 unnecessary branching and assignments.
706 (gfc_arith_times): Use mpfr_clears() in preference to multiple
708 (gfc_arith_divide): Ditto.
709 (complex_reciprocal): Eliminate now unused variables a, re, im.
710 Cleanup the mpfr abuse. Use mpfr_clears() in preference to
711 multiple mpfr_clear().
712 (complex_pow): Fix comment whitespace. Use mpfr_clears() in
713 preference to multiple mpfr_clear().
714 * simplify.c (gfc_simplify_and): Remove blank line.
715 (gfc_simplify_atan2): Move error checking earlier to eliminate
716 a now unnecessay gfc_free_expr().
717 (gfc_simplify_bessel_j0): Remove unnecessary gfc_set_model_kind().
718 (gfc_simplify_bessel_j1): Ditto.
719 (gfc_simplify_bessel_jn): Ditto.
720 (gfc_simplify_bessel_y0): Ditto.
721 (gfc_simplify_bessel_y1): Ditto.
722 (gfc_simplify_bessel_yn): Ditto.
723 (only_convert_cmplx_boz): Eliminate unnecessary duplicate code, and
724 combine nested if statement rational expressions.
725 (gfc_simplify_cos): Use mpfr_clears() in preference to multiple
727 (gfc_simplify_exp): Ditto.
728 (gfc_simplify_fraction): Move gfc_set_model_kind() to after the
729 special case of 0. Use mpfr_clears() in preference to multiple
731 (gfc_simplify_gamma): Eliminate unnecessary gfc_set_model_kind().
732 (gfc_simplify_lgamma): Ditto.
733 (gfc_simplify_log10): Ditto.
734 (gfc_simplify_log): Move gfc_set_model_kind () inside switch
735 statement. Use mpfr_clears() in preference to multiple mpfr_clear().
736 (gfc_simplify_mod): Eliminate now unused variables quot, iquot,
737 and term. Simplify the mpfr magic.
738 (gfc_simplify_modulo): Ditto.
739 (gfc_simplify_nearest): Eliminate unnecessary gfc_set_model_kind().
740 (gfc_simplify_scale): Use mpfr_clears() in preference to multiple
742 (gfc_simplify_sin): Ditto
743 (gfc_simplify_sqrt): Ditto
744 (gfc_simplify_set_exponent): Move gfc_set_model_kind() to after the
745 special case of 0. Use mpfr_clears() in preference to multiple
748 2008-05-29 Daniel Franke <franke.daniel@gmail.com>
751 * Make-lang.in (F95_OBJS): Added dependency on FORTRAN_TARGET_OBJS.
753 2008-05-29 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
755 * scanner.c (load_line): Add first_char argument. Don't call ungetc.
756 (gfc_read_orig_filename): Adjust call to load_line. Don't call
758 (load_file): Adjust call to load_line.
760 2008-05-28 Janus Weil <janus@gcc.gnu.org>
764 * interface.c (gfc_procedure_use): Enable argument checking for
765 external procedures with explicit interface.
766 * symbol.c (check_conflict): Fix conflict checking for externals.
767 (copy_formal_args): Fix handling of arrays.
768 * resolve.c (resolve_specific_f0, resolve_specific_s0): Fix handling
770 * parse.c (parse_interface): Non-abstract INTERFACE statement implies
773 2008-05-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
776 * intrinsic.c (gfc_convert_chartype): Don't mark conversion
778 * trans-array.c (gfc_trans_array_ctor_element): Divide element
779 size by the size of one character to obtain length.
780 * iresolve.c (gfc_resolve_cshift): Call the _char4 variant when
782 (gfc_resolve_eoshift): Likewise.
783 * trans-intrinsic.c (gfc_conv_intrinsic_ctime): Minor beautification.
784 (gfc_conv_intrinsic_fdate): Minor beautification.
785 (gfc_conv_intrinsic_ttynam): Minor beautification.
786 (gfc_conv_intrinsic_minmax_char): Allow all character kinds.
787 (size_of_string_in_bytes): New function.
788 (gfc_conv_intrinsic_size): Call size_of_string_in_bytes for
789 character expressions.
790 (gfc_conv_intrinsic_sizeof): Likewise.
791 (gfc_conv_intrinsic_array_transfer): Likewise.
792 (gfc_conv_intrinsic_trim): Allow all character kinds. Minor
794 (gfc_conv_intrinsic_repeat): Fix comment typo.
795 * simplify.c (gfc_convert_char_constant): Take care of conversion
796 of array constructors.
798 2008-05-27 Tobias Burnus <burnus@net-b.de>
801 * trans-array.c (gfc_set_loop_bounds_from_array_spec):
802 Add missing fold_convert.
804 2008-05-26 Daniel Franke <franke.daniel@gmail.com>
806 * fortran/cpp.c (cpp_define_builtins): Remove usage of TARGET_* macros,
809 2008-05-26 Daniel Franke <franke.daniel@gmail.com>
812 * lang.opt (A, C, CC, D, E, H, P, U, cpp, d, fworking-directory,
813 imultilib, iprefix, iquote, isysroot, isystem, nocpp, nostdinc,
814 o, undef, v): New options.
815 * options.c (gfc_init_options): Also initialize preprocessor
817 (gfc_post_options): Also handle post-initialization of preprocessor
819 (gfc_handle_option): Check if option is a preprocessor option.
820 If yes, let gfc_cpp_handle_option() handle the option.
821 * lang-specs.h: Reorganized to handle new options.
822 * scanner.c (gfc_new_file): Read temporary file instead of
823 input source if preprocessing is enabled.
824 * f95-lang.c (gfc_init): Initialize preprocessor.
825 (gfc_finish): Clean up preprocessor.
828 * Make-lang.in: Added new objects and dependencies.
829 * gfortran.texi: Updated section "Preprocessing and
830 conditional compilation".
831 * invoke.texi: Added new section "Preprocessing Options",
832 listed and documented the preprocessing options handled
835 2008-05-25 Tobias Burnus <burnus@net-b.de>
838 * trans-expr.c (gfc_conv_function_call): Remove library
839 call for c_f_pointer with scalar Fortran pointers and for
842 2008-05-21 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
845 * iresolve.c (check_charlen_present): Don't force the rank to 1.
847 2008-05-19 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
850 * trans-expr.c (gfc_conv_string_tmp): Pick the correct type for
851 the temporary variable.
853 2008-05-19 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
855 * simplify.c (gfc_simplify_dble, gfc_simplify_real): Initialize
856 result variable to avoid warnings.
858 2008-05-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
860 * intrinsic.c (char_conversions, ncharconv): New static variables.
861 (find_char_conv): New function.
862 (add_functions): Add simplification functions for ADJUSTL and
863 ADJUSTR. Don't check the kind of their argument. Add checking for
864 LGE, LLE, LGT and LLT.
865 (add_subroutines): Fix argument type for SLEEP. Fix argument name
867 (add_char_conversions): New function.
868 (gfc_intrinsic_init_1): Call add_char_conversions.
869 (gfc_intrinsic_done_1): Free char_conversions.
870 (check_arglist): Use kind == 0 as a signal that we don't want
871 the kind value to be checked.
872 (do_simplify): Also simplify character functions.
873 (gfc_convert_chartype): New function
874 * trans-array.c (gfc_trans_array_ctor_element): Don't force the
875 use of default character type.
876 (gfc_trans_array_constructor_value): Likewise.
877 (get_array_ctor_var_strlen): Use integer kind to build an integer
878 instead of a character kind!
879 (gfc_build_constant_array_constructor): Don't force the use of
880 default character type.
881 (gfc_conv_loop_setup): Likewise.
882 * trans-expr.c (gfc_conv_string_tmp): Don't force the use of
883 default character type. Allocate enough memory for wide strings.
884 (gfc_conv_concat_op): Make sure operand kind are the same.
885 (string_to_single_character): Remove gfc_ prefix. Reindent.
886 Don't force the use of default character type.
887 (gfc_conv_scalar_char_value): Likewise.
888 (gfc_build_compare_string): Call string_to_single_character.
889 (fill_with_spaces): New function
890 (gfc_trans_string_copy): Add kind arguments. Use them to deal
891 with wide character kinds.
892 (gfc_conv_statement_function): Whitespace fix. Call
893 gfc_trans_string_copy with new kind arguments.
894 (gfc_conv_substring_expr): Call gfc_build_wide_string_const
895 instead of using gfc_widechar_to_char.
896 (gfc_conv_string_parameter): Don't force the use of default
898 (gfc_trans_scalar_assign): Pass kind args to gfc_trans_string_copy.
899 * intrinsic.h (gfc_check_lge_lgt_lle_llt, gfc_convert_char_constant,
900 gfc_resolve_adjustl, gfc_resolve_adjustr): New prototypes.
901 * decl.c (gfc_set_constant_character_len): Don't assert the
902 existence of a single character kind.
903 * trans-array.h (gfc_trans_string_copy): New prototype.
904 * gfortran.h (gfc_check_character_range, gfc_convert_chartype):
906 * error.c (print_wide_char_into_buffer): New function lifting
907 code from gfc_print_wide_char. Fix order to output '\x??' instead
909 (gfc_print_wide_char): Call print_wide_char_into_buffer.
910 (show_locus): Call print_wide_char_into_buffer with buffer local
912 * trans-const.c (gfc_build_wide_string_const): New function.
913 (gfc_conv_string_init): Deal with wide characters strings
915 (gfc_conv_constant_to_tree): Call gfc_build_wide_string_const.
916 * trans-stmt.c (gfc_trans_label_assign): Likewise.
917 (gfc_trans_character_select): Deal with wide strings.
918 * expr.c (gfc_check_assign): Allow conversion between character
920 * trans-const.h (gfc_build_wide_string_const): New prototype.
921 * trans-types.c (gfc_get_character_type_len_for_eltype,
922 gfc_get_character_type_len): Create too variants of the old
923 gfc_get_character_type_len, one getting kind argument and the
924 other one directly taking a type tree.
925 * trans.h (gfor_fndecl_select_string_char4,
926 gfor_fndecl_convert_char1_to_char4,
927 gfor_fndecl_convert_char4_to_char1): New prototypes.
928 * trans-types.h (gfc_get_character_type_len_for_eltype): New
930 * resolve.c (resolve_operator): Exit early when kind mismatches
931 are detected, because that makes us issue an error message later.
932 (validate_case_label_expr): Fix wording of error message.
933 * iresolve.c (gfc_resolve_adjustl, gfc_resolve_adjustr): New
935 (gfc_resolve_pack): Call _char4 variants of library function
936 when dealing with wide characters.
937 (gfc_resolve_reshape): Likewise.
938 (gfc_resolve_spread): Likewise.
939 (gfc_resolve_transpose): Likewise.
940 (gfc_resolve_unpack): Likewise.
941 * target-memory.c (size_character): Take character kind bit size
942 correctly into account (not that it changes anything for now, but
944 (gfc_encode_character): Added gfc_ prefix. Encoding each
945 character of a string by calling native_encode_expr for the
946 corresponding unsigned integer.
947 (gfc_target_encode_expr): Add gfc_ prefix to encode_character.
948 * trans-decl.c (gfc_build_intrinsic_function_decls): Build
949 gfor_fndecl_select_string_char4, gfor_fndecl_convert_char1_to_char4
950 and gfor_fndecl_convert_char4_to_char1.
951 * target-memory.h (gfc_encode_character): New prototype.
952 * arith.c (gfc_check_character_range): New function.
953 (eval_intrinsic): Allow non-default character kinds.
954 * check.c (gfc_check_access_func): Only allow default
955 character kind arguments.
956 (gfc_check_chdir): Likewise.
957 (gfc_check_chdir_sub): Likewise.
958 (gfc_check_chmod): Likewise.
959 (gfc_check_chmod_sub): Likewise.
960 (gfc_check_lge_lgt_lle_llt): New function.
961 (gfc_check_link): Likewise.
962 (gfc_check_link_sub): Likewise.
963 (gfc_check_symlnk): Likewise.
964 (gfc_check_symlnk_sub): Likewise.
965 (gfc_check_rename): Likewise.
966 (gfc_check_rename_sub): Likewise.
967 (gfc_check_fgetputc_sub): Likewise.
968 (gfc_check_fgetput_sub): Likewise.
969 (gfc_check_stat): Likewise.
970 (gfc_check_stat_sub): Likewise.
971 (gfc_check_date_and_time): Likewise.
972 (gfc_check_ctime_sub): Likewise.
973 (gfc_check_fdate_sub): Likewise.
974 (gfc_check_gerror): Likewise.
975 (gfc_check_getcwd_sub): Likewise.
976 (gfc_check_getarg): Likewise.
977 (gfc_check_getlog): Likewise.
978 (gfc_check_hostnm): Likewise.
979 (gfc_check_hostnm_sub): Likewise.
980 (gfc_check_ttynam_sub): Likewise.
981 (gfc_check_perror): Likewise.
982 (gfc_check_unlink): Likewise.
983 (gfc_check_unlink_sub): Likewise.
984 (gfc_check_system_sub): Likewise.
985 * primary.c (got_delim): Perform correct character range checking
987 * trans-intrinsic.c (gfc_conv_intrinsic_conversion): Generate
988 calls to library functions convert_char4_to_char1 and
989 convert_char1_to_char4 for character conversions.
990 (gfc_conv_intrinsic_char): Allow all character kings.
991 (gfc_conv_intrinsic_strcmp): Fix whitespace.
992 (gfc_conv_intrinsic_repeat): Take care of all character kinds.
993 * intrinsic.texi: For all GNU intrinsics accepting character
994 arguments, mention that they're restricted to the default kind.
995 * simplify.c (simplify_achar_char): New function.
996 (gfc_simplify_achar, gfc_simplify_char): Call simplify_achar_char.
997 gfc_simplify_ichar): Don't error out for wide characters.
998 (gfc_convert_char_constant): New function.
1000 2008-05-18 Steven G. Kargl <kargls@comcast.net>
1003 * symbol.c (check_conflict): Issue errors for abuse of PUBLIC, PRIVATE,
1005 * resolve.c (gfc_verify_binding_labels): Fix NULL pointer dereference.
1007 2008-05-17 Tobias Burnus <burnus@net-b.de>
1009 * intrinsic.texi: Correct description of GET_COMMAND_ARGUMENT
1010 and GET_ENVIRONMENT_VARIABLE; fix keyword= name for GETENV,
1011 GETLOG, GMTIME, HOSTNM, IRAND, ITIME, KILL.
1012 Move LOG_GAMMA after LOG10.
1014 2008-05-17 Tobias Burnus <burnus@net-b.de>
1016 * intrinsic.c (add_functions): Change FLUSH(C) to FLUSH(UNIT).
1017 * intrinsic.texi: Change INTEGER(*) to INTEGER; fix keyword= name for
1018 ABS, ADJUSTL, AINT, ALLOCATED, ANINT, ASSOCIATED, C_ASSOCIATED,
1019 CEILING, DBLE, DFLOAT, DOT_PRODUCT, DREAL, FLOAT, FLOOR, GET_COMMAND.
1021 2008-05-16 Paul Thomas <pault@gcc.gnu.org>
1025 * trans-stmt.c (gfc_trans_where): Tighten up the dependency
1026 check for calling gfc_trans_where_3.
1029 * trans-stmt.c (gfc_trans_where_2): Set the mask size to zero
1030 if it is calculated to be negative.
1033 * trans-stmt.c (gfc_trans_where_3, gfc_trans_where_assign): Set
1034 ss->where for scalar right hand sides.
1035 * trans-array.c (gfc_add_loop_ss_code): If ss->where is set do
1036 not evaluate scalars outside the loop. Clean up whitespace.
1037 * trans.h : Add a bitfield 'where' to gfc_ss.
1039 2008-05-16 Tobias Burnus <burnus@net-b.de>
1041 * libgfortran.h: Increase GFC_MAX_DIMENSIONS to 15.
1042 * array.c (gfc_match_array_spec): Error with -std=f2003 if rank > 7.
1044 2008-04-16 Daniel Kraft <d@domob.eu>
1047 * gfortran.h: Added field "length_from_typespec" to gfc_charlength.
1048 * aray.c (gfc_match_array_constructor): Added code to parse typespec.
1049 (check_element_type, check_constructor_type, gfc_check_constructor_type):
1050 Extended to support explicit typespec on constructor.
1051 (gfc_resolve_character_array_constructor): Pad strings correctly for
1052 explicit, constant character length.
1053 * trans-array.c: New static global variable "typespec_chararray_ctor"
1054 (gfc_trans_array_constructor): New code to support explicit but dynamic
1057 2008-05-16 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1060 * decl.c (match_attr_spec): Check for matching pairs of parenthesis.
1061 * expr.c (gfc_specification_expr): Supplement the error message with the
1062 type that was found.
1063 * resolve.c (gfc_resolve_index): Likewise.
1064 * match.c (gfc_match_parens): Clarify error message with "at or before".
1065 (gfc_match_do): Check for matching pairs of parenthesis.
1067 2008-05-16 Tobias Burnus <burnus@net-b.de
1069 * intrinsic.texi: Write Fortran 77/90/95 instead of F77/90/95;
1070 add missing KIND argument to ACHAR and NINT; and state that
1071 the KIND argument is a F2003 extension for ACHAR, COUNT, IACHAR,
1072 ICHAR, INDEX, LBOUND, LEN, LEN_TRIM, SCAN, SIZE, UBOUND, VERIFY.
1074 2008-05-16 Daniel Kraft <d@domob.eu>
1076 * primary.c: New private structure "gfc_structure_ctor_component".
1077 (gfc_free_structure_ctor_component): New helper function.
1078 (gfc_match_structure_constructor): Extended largely to support named
1079 arguments and default initialization for structure constructors.
1081 2008-05-15 Steven G. Kargl <kargls@comcast.net>
1083 * simplify.c (gfc_simplify_dble, gfc_simplify_float,
1084 simplify_bound, gfc_simplify_nearest, gfc_simplify_real): Plug
1085 possible memory leaks.
1086 (gfc_simplify_reshape): Plug possible memory leaks and dereferencing
1089 2008-05-15 Steven G. Kargl <kargls@comcast.net>
1092 * simplify.c (gfc_simplify_int, gfc_simplify_intconv): Replaced hand
1093 rolled integer conversion with gfc_int2int, gfc_real2int, and
1095 (gfc_simplify_intconv): Renamed to simplify_intconv.
1097 2008-05-15 Steven G. Kargl, <kargl@comcast.net>
1098 * gfortran.dg/and_or_xor.f90: New test
1100 * fortran/simplify.c (gfc_simplify_and, gfc_simplify_or,
1101 gfc_simplify_xor): Don't range check logical results.
1103 2008-05-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1105 * trans-expr.c (gfc_conv_concat_op): Take care of nondefault
1107 (gfc_build_compare_string): Add kind argument and use it.
1108 (gfc_conv_statement_function): Fix indentation.
1109 * gfortran.h (gfc_character_info): New structure.
1110 (gfc_character_kinds): New array.
1111 * trans-types.c (gfc_character_kinds, gfc_character_types,
1112 gfc_pcharacter_types): New array.
1113 (gfc_init_kinds): Fill character kinds array.
1114 (validate_character): Take care of nondefault character kinds.
1115 (gfc_build_uint_type): New function.
1116 (gfc_init_types): Take care of nondefault character kinds.
1117 (gfc_get_char_type, gfc_get_pchar_type): New functions.
1118 (gfc_get_character_type_len): Use gfc_get_char_type.
1119 * trans.h (gfc_build_compare_string): Adjust prototype.
1120 (gfor_fndecl_compare_string_char4, gfor_fndecl_concat_string_char4,
1121 gfor_fndecl_string_len_trim_char4, gfor_fndecl_string_index_char4,
1122 gfor_fndecl_string_scan_char4, gfor_fndecl_string_verify_char4,
1123 gfor_fndecl_string_trim_char4, gfor_fndecl_string_minmax_char4,
1124 gfor_fndecl_adjustl_char4, gfor_fndecl_adjustr_char4): New
1126 * trans-types.h (gfc_get_char_type, gfc_get_pchar_type): New
1128 * trans-decl.c (gfor_fndecl_compare_string_char4,
1129 gfor_fndecl_string_len_trim_char4, gfor_fndecl_string_index_char4,
1130 gfor_fndecl_string_scan_char4, gfor_fndecl_string_verify_char4,
1131 gfor_fndecl_string_trim_char4, gfor_fndecl_string_minmax_char4,
1132 gfor_fndecl_adjustl_char4, gfor_fndecl_adjustr_char4,
1133 gfor_fndecl_concat_string_char4): New function decls.
1134 (gfc_build_intrinsic_function_decls): Define new *_char4 function
1136 * trans-intrinsic.c (gfc_conv_intrinsic_minmax_char,
1137 gfc_conv_intrinsic_len_trim, gfc_conv_intrinsic_ichar,
1138 gfc_conv_intrinsic_strcmp, gfc_conv_intrinsic_trim,
1139 gfc_conv_intrinsic_function): Deal with nondefault character kinds.
1141 2008-05-15 Sa Liu <saliu@de.ibm.com>
1143 * iso-c-binding.def: Add standard parameter to macro NAMED_INTCST.
1144 All existing NAMED_INTCST definitions has standard GFC_STD_F2003,
1145 c_int128_t, c_int_least128_t and c_int_fast128_t are added as
1147 * iso-fortran-evn.def: Add standard parameter GFC_STD_F2003
1148 to macro NAMED_INTCST.
1149 * symbol.c (std_for_isocbinding_symbol): New helper function to
1150 return the standard that supports this isocbinding symbol.
1151 (generate_isocbinding_symbol): Do not generate GNU extension symbols
1152 if std=f2003. Add new parameter to NAMED_INTCST.
1153 * module.c (use_iso_fortran_env_module): Add new parameter to
1154 NAMED_INTCST and new field standard to struct intmod_sym.
1155 * gfortran.h: Add new parameter to NAMED_INTCST.
1156 * trans-types.c (init_c_interop_kinds): Add new parameter to
1158 * intrinsic.texi: Documented new types C_INT128_T, C_INT_LEASE128_T
1159 and C_INT_FAST128_T.
1161 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1164 * trans-decl.c (gfc_build_dummy_array_decl): Don't repack
1165 arrays that have the TARGET attribute.
1167 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1170 * simplify.c (only_convert_cmplx_boz): New function.
1171 (gfc_simplify_cmplx, gfc_simplify_complex, gfc_simplify_dcmplx):
1172 Call only_convert_cmplx_boz.
1174 2008-05-14 Paul Thomas <pault@gcc.gnu.org>
1177 * interface.c (compare_actual_formal): Do not check sizes if the
1178 actual is BT_PROCEDURE.
1180 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1183 * trans-array.c (gfc_conv_ss_startstride): Any negative size is
1184 the same as zero size.
1185 (gfc_conv_loop_setup): Fix size calculation.
1187 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1190 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Correctly
1191 handle zero-size sections.
1193 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1196 * scanner.c (preprocessor_line): Allocate enough memory for a
1199 2008-05-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1202 * target-memory.c (gfc_target_expr_size): Correctly treat
1204 (gfc_target_encode_expr): Likewise.
1205 (gfc_interpret_complex): Whitespace change.
1207 2008-05-11 Thomas Koenig <tkoenig@gcc.gnu.org>
1210 * trans.c (gfc_call_malloc): If size equals zero, allocate one
1211 byte; don't return a null pointer.
1213 2008-05-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1216 * module.c (quote_string): Fix sprintf format.
1218 2008-05-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1221 * module.c (quote_string, unquote_string,
1222 mio_allocated_wide_string): New functions.
1223 (mio_expr): Call mio_allocated_wide_string where needed.
1225 2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>
1227 * trans-decl.c (gfc_get_extern_function_decl, build_function_decl):
1228 Rename DECL_IS_PURE to DECL_PURE_P.
1230 2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1232 * arith.c: (gfc_arith_concat, gfc_compare_string,
1233 gfc_compare_with_Cstring, hollerith2representation,
1234 gfc_hollerith2int, gfc_hollerith2real, gfc_hollerith2complex,
1235 gfc_hollerith2character, gfc_hollerith2logical): Use wide
1236 characters for character constants.
1237 * data.c (create_character_intializer): Likewise.
1238 * decl.c (gfc_set_constant_character_len): Likewise.
1239 * dump-parse-tree.c (show_char_const): Correctly dump wide
1241 error.c (print_wide_char): Rename into gfc_print_wide_char.
1242 (show_locus): Adapt to new prototype of gfc_print_wide_char.
1243 expr.c (free_expr0): Representation is now disjunct from
1244 character string value, so we always free it.
1245 (gfc_copy_expr, find_substring_ref, gfc_simplify_expr): Adapt
1246 to wide character strings.
1247 * gfortran.h (gfc_expr): Make value.character.string a wide string.
1248 (gfc_wide_toupper, gfc_wide_strncasecmp, gfc_wide_memset,
1249 gfc_widechar_to_char, gfc_char_to_widechar): New prototypes.
1250 (gfc_get_wide_string): New macro.
1251 (gfc_print_wide_char): New prototype.
1252 * io.c (format_string): Make a wide string.
1253 (next_char, gfc_match_format, compare_to_allowed_values,
1254 gfc_match_open): Deal with wide strings.
1255 * module.c (mio_expr): Convert between wide strings and ASCII ones.
1256 * primary.c (match_hollerith_constant, match_charkind_name):
1257 Handle wide strings.
1258 * resolve.c (build_default_init_expr): Likewise.
1259 * scanner.c (gfc_wide_toupper, gfc_wide_memset,
1260 gfc_char_to_widechar): New functions.
1261 (wide_strchr, gfc_widechar_to_char, gfc_wide_strncasecmp):
1262 Changes in prototypes.
1263 (gfc_define_undef_line, load_line, preprocessor_line,
1264 include_line, load_file, gfc_read_orig_filename): Handle wide
1266 * simplify.c (gfc_simplify_achar, gfc_simplify_adjustl,
1267 gfc_simplify_adjustr, gfc_simplify_char, gfc_simplify_iachar,
1268 gfc_simplify_ichar, simplify_min_max, gfc_simplify_new_line,
1269 gfc_simplify_repeat): Handle wide strings.
1270 (wide_strspn, wide_strcspn): New helper functions.
1271 (gfc_simplify_scan, gfc_simplify_trim, gfc_simplify_verify):
1272 Handle wide strings.
1273 * symbol.c (generate_isocbinding_symbol): Likewise.
1274 * target-memory.c (size_character, gfc_target_expr_size,
1275 encode_character, gfc_target_encode_expr, gfc_interpret_character,
1276 gfc_target_interpret_expr): Handle wide strings.
1277 * trans-const.c (gfc_conv_string_init): Lower wide strings to
1279 (gfc_conv_constant_to_tree): Likewise.
1280 * trans-expr.c (gfc_conv_substring_expr): Handle wide strings.
1281 * trans-io.c (gfc_new_nml_name_expr): Likewise.
1282 * trans-stmt.c (gfc_trans_label_assign): Likewise.
1284 2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1286 * simplify.c (gfc_simplify_bessel_j0,gfc_simplify_bessel_j1,
1287 gfc_simplify_bessel_jn,gfc_simplify_bessel_y0,
1288 gfc_simplify_bessel_y1,gfc_simplify_bessel_yn): Mark arguments
1289 with ATTRIBUTE_UNUSED.
1291 2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1293 * check.c (gfc_check_sizeof): Switch to ATTRIBUTE_UNUSED.
1294 * simplify.c (gfc_simplify_lgamma): Likewise.
1296 2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1298 * openmp.c (gfc_match_omp_eos): Use gfc_next_ascii_char and
1299 gfc_peek_ascii_char.
1300 * decl.c (gfc_match_kind_spec, gfc_match_type_spec,
1301 gfc_match_implicit_none, match_implicit_range, gfc_match_implicit,
1302 match_string_p, match_attr_spec, gfc_match_suffix,
1303 match_procedure_decl, gfc_match_entry, gfc_match_subroutine):
1305 * gfortran.h (gfc_char_t): New type.
1306 (gfc_linebuf): Make line member a gfc_char_t.
1307 (locus): Make nextc member a gfc_char_t.
1308 (gfc_wide_is_printable, gfc_wide_is_digit, gfc_wide_fits_in_byte,
1309 gfc_wide_tolower, gfc_wide_strlen, gfc_next_ascii_char,
1310 gfc_peek_ascii_char, gfc_check_digit): New prototypes.
1311 * error.c (print_wide_char): New function.
1312 (show_locus): Use print_wide_char and gfc_wide_strlen.
1313 * io.c (next_char): Use gfc_char_t type.
1314 (match_io): Use gfc_peek_ascii_char and gfc_next_ascii_char.
1315 * match.c (gfc_match_parens, gfc_match_eos,
1316 gfc_match_small_literal_int, gfc_match_name, gfc_match_name_C,
1317 gfc_match_intrinsic_op, gfc_match_char, gfc_match_return,
1318 gfc_match_common): Likewise.
1319 * match.h (gfc_match_special_char): Change prototype.
1320 * parse.c (decode_specification_statement, decode_statement,
1321 decode_omp_directive, next_free, next_fixed): Use
1322 gfc_peek_ascii_char and gfc_next_ascii_char.
1323 * primary.c (gfc_check_digit): Change name.
1324 (match_digits, match_hollerith_constant, match_boz_constant,
1325 match_real_constant, next_string_char, match_charkind_name,
1326 match_string_constant, match_logical_constant_string,
1327 match_complex_constant, match_actual_arg, match_varspec,
1328 gfc_match_rvalue, match_variable): Use gfc_peek_ascii_char and
1329 gfc_next_ascii_char.
1330 * scanner.c (gfc_wide_fits_in_byte, wide_is_ascii,
1331 gfc_wide_is_printable, gfc_wide_tolower, gfc_wide_is_digit,
1332 gfc_wide_is_digit, wide_atoi, gfc_wide_strlen, wide_strcpy,
1333 wide_strchr, widechar_to_char, wide_strncmp, wide_strncasecmp,
1334 gfc_next_ascii_char, gfc_peek_ascii_char):
1336 (next_char, gfc_define_undef_line, skip_free_comments,
1337 gfc_next_char_literal, gfc_next_char, gfc_peek_char,
1338 gfc_error_recovery, load_line, preprocessor_line, include_line,
1339 load_file, gfc_read_orig_filename): Use gfc_char_t for source
1340 characters and the {gfc_,}wide_* functions to manipulate wide
1343 2008-05-06 Tobias Burnus <burnus@net-b.de>
1346 * intrinsic.c (add_functions): Call gfc_simplify_bessel_*.
1347 * intrinsic.h: Add prototypes for gfc_simplify_bessel_*.
1348 * simplify.c (gfc_simplify_bessel_j0,gfc_simplify_bessel_j1,
1349 gfc_simplify_bessel_jn,gfc_simplify_bessel_y0,
1350 gfc_simplify_bessel_y1,gfc_simplify_bessel_yn): New.
1352 2008-05-03 Janus Weil <jaydub66@gmail.com>
1354 * misc.c (gfc_clear_ts): Set interface to NULL.
1356 2008-05-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1359 * gfortran.h: Add extra_comma pointer to gfc_dt structure. Add iokind to
1360 gfc_expr value union. Add io_kind enum to here from io.c.
1361 * io.c (gfc_free_dt): Free extra_comma.
1362 (gfc_resolve_dt): If an extra comma was encountered and io_unit is type
1363 BT_CHARACTER, resolve to format_expr and set default unit. Error if
1364 io_kind is M_WRITE. (match_io): Match the extra comma and set new
1365 pointer, extra_comma.
1367 2008-05-01 Bud Davis <bdavis9659@sbcglobal.net>
1370 * simplify.c (gfc_simplify_index): Check for direction argument
1373 2008-05-01 Janus Weil <jaydub66@gmail.com>
1375 * gfortran.h (struct gfc_symbol): Moving "interface" member to
1376 gfc_typespec (plus fixing a small docu error).
1377 * interface.c (gfc_procedure_use): Ditto.
1378 * decl.c (match_procedure_decl): Ditto.
1379 * resolve.c (resolve_specific_f0,
1380 resolve_specific_f0, resolve_symbol): Ditto.
1382 2008-04-30 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1384 * intrinsic.c (add_functions): Add SELECTED_CHAR_KIND intrinsic.
1385 * intrinsic.h (gfc_check_selected_char_kind,
1386 gfc_simplify_selected_char_kind): New prototypes.
1387 * gfortran.h (gfc_isym_id): Add GFC_ISYM_SC_KIND.
1388 * trans.h (gfor_fndecl_sc_kind): New function decl.
1389 * trans-decl.c (gfor_fndecl_sc_kind): Build new decl.
1390 * arith.c (gfc_compare_with_Cstring): New function.
1391 * arith.h (gfc_compare_with_Cstring): New prototype.
1392 * check.c (gfc_check_selected_char_kind): New function.
1393 * primary.c (match_string_constant, match_kind_param): Mark
1394 symbols used as literal constant kind param as referenced.
1395 * trans-intrinsic.c (gfc_conv_intrinsic_sc_kind): New function.
1396 (gfc_conv_intrinsic_function): Call gfc_conv_intrinsic_sc_kind.
1397 * intrinsic.texi (SELECTED_CHAR_KIND): Document new intrinsic.
1398 * simplify.c (gfc_simplify_selected_char_kind): New function.
1400 2008-04-28 Paul Thomas <pault@gcc.gnu.org>
1403 * module.c (find_symbol): Do not return a result for a symbol
1404 that has been renamed in another module.
1406 2008-04-26 George Helffrich <george@gcc.gnu.org>
1410 * trans-common.c (create_common): Add decl to function
1411 chain (if inside one) to preserve identifier scope in debug output.
1413 2008-04-25 Jan Hubicka <jh@suse.cz>
1415 * trans-decl.c (trans_function_start): Update.
1417 2008-04-25 Tobias Burnus <burnus@net-b.de>
1418 Daniel Franke <franke.daniel@gmail.com>
1421 * gfortranspec.c (lang_specific_driver): Deprecate
1422 -M option; fix ICE when "-M" is last argument and
1423 make "-M<dir>" work.
1424 * options.c (gfc_handle_module_path_options):
1425 Use -J instead of -M in error messages.
1426 * invoke.texi: Mark -M as depecated.
1428 2008-04-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1429 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1432 * trans-instrinsic.c (gfc_conv_intrinsic_minmaxloc): Correctly adjust
1433 loop counter offset.
1435 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
1437 * trans-expr.c (gfc_conv_structure): Don't set TREE_INVARIANT.
1438 * trans-array.c (gfc_build_null_descriptor): Don't set TREE_INVARIANT.
1439 (gfc_trans_array_constructor_value): Don't set TREE_INVARIANT.
1440 (gfc_build_constant_array_constructor): Don't set TREE_INVARIANT.
1441 (gfc_conv_array_initializer): Don't set TREE_INVARIANT.
1442 * trans-common.c (get_init_field): Don't set TREE_INVARIANT.
1443 (create_common): Don't set TREE_INVARIANT.
1444 * trans-stmt.c (gfc_trans_character_select): Don't set TREE_INVARIANT.
1445 * trans-decl.c (gfc_generate_function_code): Don't set TREE_INVARIANT.
1447 2008-04-21 Steve Ellcey <sje@cup.hp.com>
1449 * f95-lang.c (gfc_init_decl_processing): use ptr_mode instead of Pmode.
1451 2008-04-21 Daniel Franke <franke.daniel@gmail.com>
1454 * gfortranspec.c (lookup_option): Properly handle separated arguments
1455 in -J option, print missing argument message when necessary.
1457 2008-04-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1460 * scanner.c (skip_fixed_comments): Update continue_line when comment is
1461 detected. (gfc_next_char_literal): Likewise.
1463 2008-04-19 Paul Thomas <pault@gcc.gnu.org>
1468 * trans_array.c (gfc_trans_array_constructor): Temporarily
1469 realign loop, if loop->from is not zero, before creating
1470 the temporary array and provide an offset.
1473 * trans-decl.c (gfc_init_default_dt): Add gfc_ prefix to name
1474 and allow for NULL body. Change all references from
1475 init_default_dt to gfc_init_default_dt.
1476 * trans.h : Add prototype for gfc_init_default_dt.
1477 * trans-array.c (gfc_trans_deferred_vars): After nullification
1478 call gfc_init_default_dt for derived types with allocatable
1481 2008-04-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1484 * trans-common.c (create_common): Revert patch causing regression.
1486 2008-04-16 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1489 * iresolve.c (gfc_resolve_eoshift): Check for NULL symtree in test for
1490 optional argument attribute.
1492 2008-04-16 Paul Thomas <pault@gcc.gnu.org>
1495 * trans-intrinsic.c (gfc_conv_intrinsic_char): Even though KIND
1496 is not used, the argument must be converted.
1498 2008-04-16 Jakub Jelinek <jakub@redhat.com>
1501 * f95-lang.c (gfc_init_builtin_functions): Make sure
1502 BUILT_IN_SINCOS{,F,L} types aren't varargs.
1504 2008-04-15 Paul Thomas <pault@gcc.gnu.org>
1507 * expr.c (scalarize_intrinsic_call): Reorder identification of
1508 array argument so that if one is not found a segfault does not
1509 occur. Return FAILURE if all scalar arguments.
1511 2008-04-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1512 Tobias Burnus <burnus@net-b.de>
1515 * options.c (gfc_init_options): Set the default maximum continuation
1516 lines to 255 for both free and fixed form source for warnings.
1517 (gfc_handle_option): Set -std=f95 fixed form max continuations to 19 and
1518 the -std=f95 free form max continuations to 39 for warnings.
1519 * scanner.c (gfc_next_char_literal): Adjust the current_line number only
1520 if it is less than the current locus.
1522 2008-04-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1524 PR fortran/25829 28655
1525 * io.c (io_tag): Add new tags for decimal, encoding, asynchronous,
1526 round, sign, and id. (match_open_element): Match new tags.
1527 (gfc_resolve_open): Resolve new tags. (gfc_match_open): Enable encoding
1528 for DEFAULT only. Update error messages. (match_dt_element): Fix match
1529 tag for asynchronous. Update error messages. (gfc_free_inquire): Free
1530 new expressions. (match_inquire_element): Match new tags.
1531 (gfc_match_inquire): Add constraint for ID and PENDING.
1532 (gfc_resolve_inquire): Resolve new tags.
1533 * trans-io.c (gfc_trans_inquire): Clean up whitespace and fix setting of
1534 mask for ID parameter.
1535 * ioparm.def: Fix order of parameters for pending, round, and sign.
1536 NOTE: These must line up with the definitions in libgfortran/io/io.h. or
1539 2008-04-06 Paul Thomas <pault@gcc.gnu.org>
1542 * expr.c (scalarize_intrinsic_call): Identify which argument is
1543 an array and use that as the template.
1544 (check_init_expr): Remove tests that first argument is an array
1545 in the call to scalarize_intrinsic_call.
1547 2008-04-06 Tobias Schlüter <tobi@gcc.gnu.org>
1550 * io.c (io_tag): Add field 'value'. Split 'spec' field in
1552 (match_etag, match_vtag, match_ltag): Split parsing in two steps
1553 to give better error messages.
1555 2008-04-06 Tobias Burnus <burnus@net-b.de>
1557 * io.c (check_io_constraints): Add constrains. ID= requires
1558 asynchronous= and asynchronous= must be init expression.
1560 2008-04-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1562 * f95-lang.c: Set LANG_HOOKS_NAME to "GNU Fortran".
1564 2008-04-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1566 * dump-parse-tree.c: Use fprintf, fputs and fputc instead of
1567 gfc_status and gfc_status_char. Remove gfc_ prefix of the gfc_show_*
1568 functions and make them static. Add new gfc_dump_parse_tree
1570 * gfortran.h (gfc_option_t): Rename verbose into dump_parse_tree.
1571 (gfc_status, gfc_status_char): Delete prototypes.
1572 * error.c (gfc_status, gfc_status_char): Remove functions.
1573 * scanner.c (gfc_new_file): Use printf instead of gfc_status.
1574 * options.c (gfc_init_options): Rename verbose into dump_parse_tree.
1575 (gfc_handle_module_path_options): Use gfc_fatal_error instead of
1576 gfc_status and exit.
1577 (gfc_handle_option): Rename verbose into dump_parse_tree.
1578 * parse.c (gfc_parse_file): Use gfc_dump_parse_tree.
1580 2008-04-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1581 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1583 PR fortran/25829 28655
1584 * dump-parse-tree.c (gfc_show_code_node): Show new I/O parameters.
1585 * gfortran.h (gfc_statement): Add ST_WAIT enumerator.
1586 (gfc_open): Add pointers for decimal, encoding, round, sign,
1587 asynchronous. (gfc_inquire): Add pointers for asynchronous, decimal,
1588 encoding, pending, round, sign, size, id.
1589 (gfc_wait): New typedef struct. (gfc_dt): Add pointers for id, pos,
1590 asynchronous, blank, decimal, delim, pad, round, sign.
1591 (gfc_exec_op): Add EXEC_WAIT enumerator. (gfc_code): Add pointer for
1592 wait. (gfc_free_wait), (gfc_resolve_wait): New function prototypes.
1593 * trans-stmt.h (gfc_trans_wait): New function prototype.
1594 * trans.c (gfc_trans_code): Add case for EXEC_WAIT.
1595 * io.c (io_tag): Add new tags for DECIMAL, ENCODING, ROUND, SIGN,
1596 ASYCHRONOUS, ID. (match_open_element): Add matchers for new tags.
1597 (gfc_free_open): Free new pointers. (gfc_resolve_open): Resolve new
1598 tags. (gfc_resolve_open): Remove comment around check for allowed
1599 values and ASYNCHRONOUS, update it. Likewise for DECIMAL, ENCODING,
1600 ROUND, and SIGN. (match_dt_element): Add matching for new tags.
1601 (gfc_free_wait): New function. (gfc_resolve_wait): New function.
1602 (match_wait_element): New function. (gfc_match_wait): New function.
1603 * resolve.c (gfc_resolve_blocks): Add case for EXEC_WAIT.
1604 (resolve_code): Add case for EXEC_WAIT.
1605 * st.c (gfc_free_statement): Add case for EXEC_WAIT.
1606 * trans-io.c (ioparam_type): Add IOPARM_ptype_wait. (gfc_st_parameter):
1607 Add "wait" entry. (iocall): Add IOCALL_WAIT enumerator.
1608 (gfc_build_io_library_fndecls): Add function declaration for st_wait.
1609 (gfc_trans_open): Add mask bits for new I/O tags.
1610 (gfc_trans_inquire): Add mask bits for new I/O tags.
1611 (gfc_trans_wait): New translation function.
1612 (build_dt): Add mask bits for new I/O tags.
1613 * match.c (gfc_match_if) Add matcher for "wait".
1614 * match.h (gfc_match_wait): Prototype for new function.
1615 * ioparm.def: Add new I/O parameter definitions.
1616 * parse.c (decode_statement): Add match for "wait" statement.
1617 (next_statement): Add case for ST_WAIT. (gfc_ascii_statement): Same.
1619 2008-04-03 Jakub Jelinek <jakub@redhat.com>
1622 * openmp.c (resolve_omp_clauses): Diagnose if a clause symbol
1625 2008-04-03 Tom Tromey <tromey@redhat.com>
1627 * Make-lang.in (fortran_OBJS): New variable.
1629 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
1631 * f95-lang.c (insert_block): Kill.
1633 2008-04-01 George Helffrich <george@gcc.gnu.org>
1635 PR fortran/35154, fortran/23057
1636 * trans-common.c (create_common): Add decl to function
1637 chain to preserve identifier scope in debug output.
1639 2008-04-01 Joseph Myers <joseph@codesourcery.com>
1641 * gfortran.texi: Include gpl_v3.texi instead of gpl.texi
1642 * Make-lang.in (GFORTRAN_TEXI): Include gpl_v3.texi instead of
1645 2008-03-30 Paul Thomas <pault@gcc.gnu.org>
1648 * resolve.c (resolve_function, resolve_call): If the procedure
1649 is elemental do not look for noncopying intrinsics.
1651 2008-03-29 Paul Thomas <pault@gcc.gnu.org>
1654 * trans-array.c (gfc_array_init_size): Set 'size' zero if
1655 negative in one dimension.
1658 * trans-expr.c (gfc_trans_string_copy): Only assign a char
1659 directly if the lhs and rhs types are the same.
1661 2008-03-28 Daniel Franke <franke.daniel@gmail.com>
1662 Paul Richard Thomas <paul.richard.thomas@gmail.com>
1665 * primary.c (match_variable): Improved matching of function
1667 * resolve.c (resolve_allocate_deallocate): Removed checks if
1668 the actual argument for STAT is a variable.
1670 2008-03-28 Tobias Burnus <burnus@net-b.de>
1672 * symbol.c (gfc_get_default_type): Fix error message; option
1673 -fallow_leading_underscore should be -fallow-leading-underscore
1675 2008-03-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1678 * iresolve.c (gfc_resolve_cshift): Check for NULL symtree in test for
1679 optional argument attribute.
1681 2008-03-27 Tom Tromey <tromey@redhat.com>
1683 * Make-lang.in: Revert automatic dependency patch.
1685 2008-03-25 Tom Tromey <tromey@redhat.com>
1687 * Make-lang.in: Remove .o targets.
1688 (fortran_OBJS): New variable.
1689 (fortran/gfortranspec.o): Move to fortran/. Reduce to variable
1691 (GFORTRAN_D_OBJS): Update.
1692 (GFORTRAN_TRANS_DEPS): Remove.
1694 2008-03-24 Paul Thomas <pault@gcc.gnu.org>
1697 * resolve.c (resolve_structure_cons): It is an error to assign
1698 NULL to anything other than a pointer or allocatable component.
1701 * resolve.c (resolve_symbol): If the symbol is a derived type,
1702 resolve the derived type. If the symbol is a derived type
1703 function, ensure that the derived type is visible in the same
1704 namespace as the function.
1706 2008-03-23 Tobias Schlüter <tobi@gcc.gnu.org>
1708 * trans.h: Use fold_build in build1_v, build2_v and build3_v
1710 * trans-openmp.c (gfc_trans_omp_critical, gfc_trans_omp_single):
1711 Don't use build2_v macro.
1713 2008-03-19 Daniel Franke <franke.daniel@gmail.com>
1716 * interface.c (gfc_procedure_use): Check for keyworded arguments in
1717 procedures without explicit interfaces.
1719 2008-03-16 Paul Thomas <pault@gcc.gnu.org>
1722 * resolve.c (check_assumed_size_reference): Only visit the
1723 first reference and look directly at the highest dimension.
1725 2008-03-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1728 * trans-array.c (gfc_conv_array_index_offset): Remove unnecessary
1731 2008-03-15 Daniel Franke <franke.daniel@gmail.com>
1734 * resolve.c (resolve_branch): Less strict and pessimistic warning
1737 2008-03-11 Paolo Bonzini <bonzini@gnu.org>
1739 * f95-lang.c (LANG_HOOKS_CLEAR_BINDING_STACK): Delete.
1740 (gfc_be_parse_file): Call clear_binding_stack from here.
1741 (gfc_clear_binding_stack): Rename to clear_binding_stack.
1743 2008-03-09 Paul Thomas <pault@gcc.gnu.org>
1746 * module.c (mio_symtree_ref): After providing a symbol for a
1747 missing equivalence member, resolve and NULL the fixups.
1749 2008-03-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1751 * invoke.texi (Error and Warning Options): Document
1754 2008-03-08 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1757 * trans-array.c (gfc_conv_ss_startstride): Fix the logic to avoid
1758 checking bounds of absent optional arguments.
1760 2008-03-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1763 * intrinsic.c (add_functions): Add simplification routines for
1764 ERF, DERF, ERFC and DERFC.
1765 * decl.c (gfc_match_suffix, gfc_match_subroutine): Change GNU
1766 extensions into Fortran 2008 features.
1767 * intrinsic.h (gfc_simplify_erf, gfc_simplify_erfc): New
1769 * simplify.c (gfc_simplify_erf, gfc_simplify_erfc): New functions.
1771 2008-03-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1774 * intrinsic.c (add_functions): Modify intrinsics ACOSH, ASINH,
1775 ATANH, ERF, ERFC and GAMMA. Add intrinsics BESSEL_{J,Y}{0,1,N},
1776 ERFC_SCALED, LOG_GAMMA and HYPOT.
1777 * intrinsic.h (gfc_check_hypot, gfc_simplify_hypot,
1778 gfc_resolve_hypot): New prototypes.
1779 * mathbuiltins.def: Add HYPOT builtin. Make complex versions of
1780 ACOSH, ASINH and ATANH available.
1781 * gfortran.h (GFC_ISYM_ERFC_SCALED, GFC_ISYM_HYPOT): New values.
1782 * lang.opt: Add -std=f2008 option.
1783 * libgfortran.h: Define GFC_STD_F2008.
1784 * lang-specs.h: Add .f08 and .F08 file suffixes.
1785 * iresolve.c (gfc_resolve_hypot): New function.
1786 * parse.c (parse_contained): Allow empty CONTAINS for Fortran 2008.
1787 * check.c (gfc_check_hypot): New function.
1788 * trans-intrinsic.c (gfc_intrinsic_map): Define ERFC_SCALE builtin.
1789 * options.c (set_default_std_flags): Allow Fortran 2008 by default.
1790 (form_from_filename): Add .f08 suffix.
1791 (gfc_handle_option): Handle -std=f2008 option.
1792 * simplify.c (gfc_simplify_hypot): New function.
1793 * gfortran.texi: Document Fortran 2008 status and file extensions.
1794 * intrinsic.texi: Document new BESSEL_{J,Y}{0,1,N} intrinsics,
1795 as well as HYPOT and ERFC_SCALED. Update documentation of ERF,
1796 ERFC, GAMMA, LGAMMA, ASINH, ACOSH and ATANH.
1797 * invoke.texi: Document the new -std=f2008 option.
1799 2008-03-02 Jakub Jelinek <jakub@redhat.com>
1801 * gfortranspec.c (lang_specific_driver): Update copyright notice
1804 2008-02-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1807 * expr.c (find_array_element): Modify traversing the constructor to
1808 avoid trying to access NULL memory pointed to by next for the
1809 last element. (find_array_section): Exit while loop if cons->next is
1811 * trans-expr.c (gfc_conv_scalar_char_value): Initialize gfc_typespec.
1812 (gfc_conv_function_call): Same.
1813 * decl.c (gfc_match_implicit): Same.
1814 * trans-intrinsic.c (gfc_conv_intrinsic_sr_kind): Same.
1816 2008-02-28 Daniel Franke <franke.daniel@gmail.com>
1821 * lang.opt: Added -Wreturn-type.
1822 * options.c (gfc_handle_option): Recognize -Wreturn-type.
1823 * trans-decl.c (gfc_trans_deferred_vars): Emit warnings for funtions
1824 where the result value is not set.
1825 (gfc_generate_function_code): Likewise.
1826 (generate_local_decl): Emit warnings for funtions whose RESULT
1827 variable is not set.
1829 2008-02-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1832 * trans-expr.c (gfc_conv_variable): Don't build indirect
1833 references when explicit interface is mandated.
1834 * resolve.c (resolve_formal_arglist): Set attr.always_explicit
1835 on the result symbol as well as the procedure symbol.
1837 2008-02-27 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1840 * trans.h: Remove prototypes for gfor_fndecl_math_exponent4,
1841 gfor_fndecl_math_exponent8, gfor_fndecl_math_exponent10 and
1842 gfor_fndecl_math_exponent16.
1843 * f95-lang.c (build_builtin_fntypes): Add new function types.
1844 (gfc_init_builtin_functions): Add new builtins for nextafter,
1845 frexp, ldexp, fabs, scalbn and inf.
1846 * iresolve.c (gfc_resolve_rrspacing): Don't add hidden arguments.
1847 (gfc_resolve_scale): Don't convert type of second argument.
1848 (gfc_resolve_set_exponent): Likewise.
1849 (gfc_resolve_size): Don't add hidden arguments.
1850 * trans-decl.c: Remove gfor_fndecl_math_exponent4,
1851 gfor_fndecl_math_exponent8, gfor_fndecl_math_exponent10 and
1852 gfor_fndecl_math_exponent16.
1853 * trans-intrinsic.c (gfc_intrinsic_map): Remove intrinsics
1854 for scalbn, fraction, nearest, rrspacing, set_exponent and
1856 (gfc_conv_intrinsic_exponent): Directly call frexp.
1857 (gfc_conv_intrinsic_fraction, gfc_conv_intrinsic_nearest,
1858 gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_rrspacing,
1859 gfc_conv_intrinsic_scale, gfc_conv_intrinsic_set_exponent): New
1861 (gfc_conv_intrinsic_function): Use the new functions above.
1863 2008-02-26 Tobias Burnus <burnus@net-b.de>
1866 * interface.c (check_operator_interface): Show better line for error
1867 messages; fix constrains for user-defined assignment operators.
1868 (gfc_extend_assign): Fix constrains for user-defined assignment
1871 2008-02-26 Tom Tromey <tromey@redhat.com>
1873 * trans-io.c (set_error_locus): Remove old location code.
1874 * trans-decl.c (gfc_set_decl_location): Remove old location code.
1875 * f95-lang.c (gfc_init): Remove test of USE_MAPPED_LOCATION.
1876 * scanner.c (gfc_gobble_whitespace): Remove old location code.
1877 (get_file): Likewise.
1878 (preprocessor_line): Likewise.
1879 (load_file): Likewise.
1880 (gfc_new_file): Likewise.
1881 * trans.c (gfc_trans_runtime_check): Remove old location code.
1882 (gfc_get_backend_locus): Likewise.
1883 (gfc_set_backend_locus): Likewise.
1884 * data.c (gfc_assign_data_value): Remove old location code.
1885 * error.c (show_locus): Remove old location code.
1886 * gfortran.h (gfc_linebuf): Remove old location code.
1887 (gfc_linebuf_linenum): Remove old-location variant.
1889 2008-02-25 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1892 * trans-const.c (gfc_build_string_const): Don't call gettext.
1893 (gfc_build_localized_string_const): New function.
1894 * trans-const.h (gfc_build_localized_string_const): New prototype.
1895 * trans.c (gfc_trans_runtime_check): Use
1896 gfc_build_localized_string_const instead of gfc_build_string_const.
1897 (gfc_call_malloc): Likewise.
1898 (gfc_allocate_with_status): Likewise.
1899 (gfc_allocate_array_with_status): Likewise.
1900 (gfc_deallocate_with_status): Likewise.
1901 (gfc_call_realloc): Likewise.
1902 * trans-io.c (gfc_trans_io_runtime_check): Likewise.
1904 2008-02-24 Tobias Schlüter <tobi@gcc.gnu.org>
1906 * arith.c: Update copyright years.
1907 * arith.h: Likewise.
1908 * array.c: Likewise.
1910 * check.c: Likewise.
1914 * dependency.c: Likewise.
1915 * dependency.h: Likewise.
1916 * dump-parse-tree.c: Likewise.
1917 * error.c: Likewise.
1919 * gfc-internals.texi: Likewise.
1920 * gfortran.h: Likewise.
1921 * gfortran.texi: Likewise.
1922 * gfortranspec.c: Likewise.
1923 * interface.c: Likewise.
1924 * intrinsic.c: Likewise.
1925 * intrinsic.h: Likewise.
1926 * intrinsic.texi: Likewise.
1927 * invoke.texi: Likewise.
1929 * iresolve.c: Likewise.
1930 * iso-c-binding.def: Likewise.
1931 * iso-fortran-env.def: Likewise.
1932 * lang-specs.h: Likewise.
1933 * lang.opt: Likewise.
1934 * libgfortran.h: Likewise.
1935 * match.c: Likewise.
1936 * match.h: Likewise.
1937 * matchexp.c: Likewise.
1939 * module.c: Likewise.
1940 * openmp.c: Likewise.
1941 * options.c: Likewise.
1942 * parse.c: Likewise.
1943 * parse.h: Likewise.
1944 * primary.c: Likewise.
1945 * resolve.c: Likewise.
1946 * scanner.c: Likewise.
1947 * simplify.c: Likewise.
1949 * symbol.c: Likewise.
1950 * target-memory.c: Likewise.
1951 * target-memory.h: Likewise.
1952 * trans-array.h: Likewise.
1953 * trans-const.h: Likewise.
1954 * trans-stmt.h: Likewise.
1955 * trans-types.c: Likewise.
1956 * trans-types.h: Likewise.
1957 * types.def: Likewise.
1959 2008-02-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1962 * simplify.c (gfc_simplify_ibclr), (gfc_simplify_ibits),
1963 (gfc_simplify_ibset): Remove call to range_check.
1964 (simplify_cmplx), (gfc_simplify_dble), (gfc_simplify_float)
1965 (gfc_simplify_real): Add call gfc_clear_ts to initialize the
1966 temporary gfc_typspec variable.
1968 2008-02-24 Tobias Schlüter <tobi@gcc.gnu.org>
1970 * trans-array.c (gfc_conv_descriptor_data_get,
1971 gfc_conv_descriptor_data_set_internal,
1972 gfc_conv_descriptor_data_addr, gfc_conv_descriptor_offset,
1973 gfc_conv_descriptor_dtype, gfc_conv_descriptor_dimension,
1974 gfc_conv_descriptor_stride, gfc_conv_descriptor_lbound,
1975 gfc_conv_descriptor_ubound, gfc_trans_create_temp_array,
1976 gfc_conv_array_transpose, gfc_grow_array,
1977 gfc_trans_array_constructor_subarray,
1978 gfc_trans_array_constructor_value, gfc_trans_scalarized_loop_end,
1979 gfc_array_init_size, gfc_array_allocate, gfc_array_deallocate,
1980 gfc_conv_array_initializer, gfc_trans_array_bounds,
1981 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
1982 gfc_get_dataptr_offset, gfc_conv_array_parameter,
1983 gfc_trans_dealloc_allocated, get_full_array_size,
1984 gfc_duplicate_allocatable, structure_alloc_comps): Use fold_buildN
1986 * trans-expr.c (gfc_conv_expr_present, gfc_conv_missing_dummy,
1987 gfc_conv_component_ref, gfc_conv_cst_int_power,
1988 gfc_conv_function_call, gfc_trans_structur_assign): Likewise.
1989 * trans-common.c (create_common): Likewise.
1990 * trans-openmp.c (gfc_trans_omp_atomic, gfc_trans_omp_do):
1992 * trans-const.c (gfc_conv_constant_to_tree): Likewise.
1993 * trans-stmt.c (gfc_trans_goto, gfc_trans_return, gfc_trans_do,
1994 gfc_trans_integer_select, gfc_trans_character_select,
1995 gfc_trans_forall_loop, compute_overall_iter_number,
1996 gfc_trans_forall_1, gfc_evaluate_where_mask, gfc_trans_allocate,
1997 gfc_trans_deallocate): Likewise.
1998 * trans.c (gfc_build_addr_expr, gfc_trans_runtime_check,
1999 gfc_allocate_with_status, gfc_allocate_array_with_status,
2000 gfc_deallocate_with_status): Likewise.
2001 * f95-lang.c (gfc_truthvalue_conversion): Likewise.
2002 * trans-io.c (set_parameter_const, set_parameter_value,
2003 set_parameter_ref, set_string, set_internal_unit, io_result,
2004 set_error_locus, nml_get_addr_expr, transfer_expr): Likewise.
2005 * trans-decl.c (gfc_build_qualified_array, build_entry_thunks,
2006 gfc_get_fake_result_decl, gfc_trans_auto_character_variable,
2007 gfc_generate_function_code): Likewise.
2008 * convert.c (convert): Likewise.
2009 * trans-intrinsic.c (gfc_conv_intrinsic_conversion,
2010 build_fixbound_expr, build_fix_expr, gfc_conv_intrinsic_aint,
2011 gfc_conv_intrinsic_int, gfc_conv_intrinsic_imagpart,
2012 gfc_conv_intrinsic_conjg, gfc_conv_intrinsic_abs,
2013 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_mod,
2014 gfc_conv_intrinsic_dim, gfc_conv_intrinsic_dprod,
2015 gfc_conv_intrinsic_ctime, gfc_conv_intrinsic_fdate,
2016 gfc_conv_intrinsic_ttynam, gfc_conv_intrinsic_minmax,
2017 gfc_conv_intrinsic_minmax_char, gfc_conv_intrinsic_count,
2018 gfc_conv_intrinsic_arith, gfc_conv_intrinsic_dot_product,
2019 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
2020 gfc_conv_intrinsic_btest, gfc_conv_intrinsic_not,
2021 gfc_conv_intrinsic_ibits, gfc_conv_intrinsic_ishft,
2022 gfc_conv_intrinsic_ichar, gfc_conv_intrinsic_size,
2023 gfc_conv_intrinsic_array_transfer, gfc_conv_intrinsic_transfer,
2024 gfc_conv_allocated, gfc_conv_associated, gfc_conv_intrinsic_trim,
2025 gfc_conv_intrinsic_repeat): Likewise.
2027 2008-02-23 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2030 * trans-expr.c (gfc_conv_power_op): Use BUILT_IN_CPOW{F,,L}.
2031 * f95-lang.c (gfc_init_builtin_functions): Define BUILT_IN_CPOW{F,,L}.
2032 * trans.h (gfor_fndecl_math_cpow, gfor_fndecl_math_cpowf,
2033 gfor_fndecl_math_cpowl10, gfor_fndecl_math_cpowl16): Remove.
2034 * trans-decl.c: Likewise.
2036 2008-02-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2039 * expr.c (find_array_element): Modify traversing the constructor to
2040 avoid trying to access NULL memory pointed to by next for the
2041 last element. (find_array_section): Exit while loop if cons->next is
2044 2008-02-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2047 * iresolve.c (resolve_mask_arg): Add gfc_clear_ts to initialize
2049 (gfc_resolve_aint): Likewise.
2050 (gfc_resolve_anint): Likewise.
2051 (gfc_resolve_besn): Likewise.
2052 (gfc_resolve_cshift): Likewise.
2053 (gfc_resolve_ctime): Likewise.
2054 (gfc_resolve_eoshift): Likewise.
2055 (gfc_resolve_index_func): Likewise.
2056 (gfc_resolve_isatty): Likewise.
2057 (gfc_resolve_malloc): Likewise.
2058 (gfc_resolve_rrspacing): Likewise.
2059 (gfc_resolve_scale): Likewise.
2060 (gfc_resolve_set_exponent): Likewise.
2061 (gfc_resolve_spacing): Likewise.
2062 (gfc_resolve_spacing): Likewise.
2063 (gfc_resolve_fgetc): Likewise.
2064 (gfc_resolve_fputc): Likewise.
2065 (gfc_resolve_ftell): Likewise.
2066 (gfc_resolve_ttynam): Likewise.
2067 (gfc_resolve_alarm_sub): Likewise.
2068 (gfc_resolve_mvbits): Likewise.
2069 (gfc_resolve_getarg): Likewise.
2070 (gfc_resolve_signal_sub): Likewise.
2071 (gfc_resolve_exit): Likewise.
2072 (gfc_resolve_flush): Likewise.
2073 (gfc_resolve_free): Likewise.
2074 (gfc_resolve_ctime_sub): Likewise.
2075 (gfc_resolve_fgetc_sub): Likewise.
2076 (gfc_resolve_fputc_sub): Likewise.
2077 (gfc_resolve_fseek_sub): Likewise.
2078 (gfc_resolve_ftell_sub): Likewise.
2079 (gfc_resolve_ttynam_sub): Likewise.
2081 2008-02-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2083 * gfc-internals.texi: Fix typos and markup nits.
2084 * gfortran.texi: Likewise.
2085 * intrinsic.texi: Likewise.
2087 2008-02-21 Richard Guenther <rguenther@suse.de>
2089 * trans-expr.c (gfc_conv_expr_op): Expand INTRINSIC_PARENTHESES
2090 as unary PAREN_EXPR for real and complex typed expressions.
2091 (gfc_conv_unary_op): Fold the built tree.
2093 2008-02-20 Tobias Burnus <burnus@net-b.de>
2096 * match.c (gfc_match_name): Improve error message for '$'.
2098 2008-02-19 Daniel Franke <franke.daniel@gmail.com>
2101 * expr.c (gfc_check_pointer_assign): Add type and kind information
2102 to type-mismatch message.
2103 (gfc_check_assign): Unify error messages.
2105 2008-02-16 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2108 * gfortran.texi: Create new section for unimplemented extensions.
2109 Add "STRUCTURE and RECORD" and "ENCODE and DECODE statements".
2110 Remove "smaller projects" list. Fix a few typos.
2112 2008-02-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2114 * intrinsic.texi: Rename INDEX node to avoid clashing with
2115 index.html on case-insensitive systems.
2117 2008-02-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2120 * trans-expr.c (gfc_conv_function_call): Force evaluation of
2123 2008-02-10 Daniel Franke <franke.daniel@gmail.com>
2126 * lang.opt: Allow '-J<dir>' next to '-J <dir>',
2127 likewise '-I <dir>' and '-I<dir>'.
2129 2008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2132 * Make-lang.in (f951): Add $(GMPLIBS).
2134 2008-02-05 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2137 * trans-common.c (build_field): Mark fields as volatile when needed.
2139 2008-02-05 Tobias Burnus <burnus@net-b.de>
2142 * data.c (gfc_assign_data_value): Only free "size" if
2143 it has not already been freed.
2145 2008-02-05 Paul Thomas <pault@gcc.gnu.org>
2148 * array.c (match_array_element_spec): Remove check for negative
2150 (gfc_resolve_array_spec): Add check for negative size.
2152 2008-02-05 Paul Thomas <pault@gcc.gnu.org>
2155 * data.c (gfc_assign_data_value): Add bounds check for array
2158 2008-02-04 Daniel Franke <franke.daniel@gmail.com>
2160 * resolve.c (resolve_where): Fix typo.
2161 (gfc_resolve_where_code_in_forall): Likewise.
2163 2008-02-03 Paul Thomas <pault@gcc.gnu.org>
2166 * resolve.c (resolve_allocate_deallocate): New function.
2167 (resolve_code): Call it for allocate and deallocate.
2168 * match.c (gfc_match_allocate, gfc_match_deallocate) : Remove
2169 the checking of the STAT tag and put in above new function.
2170 * primary,c (match_variable): Do not fix flavor of host
2171 associated symbols yet if the type is not known.
2173 2008-01-31 Paul Thomas <pault@gcc.gnu.org>
2176 * expr.c (gfc_check_assign): It is an error to assign
2177 to a sibling procedure.
2179 2008-01-30 Paul Thomas <pault@gcc.gnu.org>
2182 * symbol.c (gfc_delete_symtree, gfc_undo_symbols): Rename
2183 delete_symtree to gfc_delete_symtree.
2184 * gfortran.h : Add prototype for gfc_delete_symtree.
2185 * module.c (load_generic_interfaces): Transfer symbol to a
2186 unique symtree and delete old symtree, instead of renaming.
2187 (read_module): The rsym and the found symbol are the same, so
2188 the found symtree can be deleted.
2191 * decl.c (match_char_spec): Remove the constraint on deferred
2192 matching of functions and free the length expression.
2193 delete_symtree to gfc_delete_symtree.
2194 (gfc_match_type_spec): Whitespace.
2195 (gfc_match_function_decl): Defer characteristic association for
2196 all types except BT_UNKNOWN.
2197 * parse.c (decode_specification_statement): Only derived type
2198 function matching is delayed to the end of specification.
2200 2008-01-28 Tobias Burnus <burnus@net-b.de>
2203 * simplify.c (gfc_simplify_shape): Simplify rank zero arrays.
2205 2008-01-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2208 * array.c (gfc_check_constructor_type): Revert clearing the expression.
2210 2008-01-26 Tobias Burnus <burnus@net-b.de>
2213 * trans-expr.c (gfc_conv_function_call): Don't call
2214 gfc_add_interface_mapping if the expression is NULL.
2216 2008-01-26 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2219 * trans-array.c (gfc_trans_create_temp_array): Remove call to
2220 gcc_assert (integer_zerop (loop->from[n])).
2222 2008-01-25 Daniel Franke <franke.daniel@gmail.com>
2225 * resolve.c (resolve_where): Added check if user-defined assignment
2226 operator is an elemental subroutine.
2227 (gfc_resolve_where_code_in_forall): Likewise.
2229 2008-01-24 Daniel Franke <franke.daniel@gmail.com>
2233 * gfortran.h: Revert changes from 2008-01-17.
2234 * match.c: Likewise.
2235 * symbol.c: Likewise.
2236 (gfc_undo_symbols): Undo namespace changes related to common blocks.
2238 2008-01-24 Daniel Franke <franke.daniel@gmail.com>
2241 * data.c (formalize_structure_cons): Skip formalization on
2244 2008-01-24 Daniel Franke <franke.daniel@gmail.com>
2246 * gfortran.texi (OpenMP): Extended existing documentation.
2247 (contributors): Added major contributors of 2008 that were
2249 (proposed extensions): Removed implemented items.
2251 2008-01-24 Paul Thomas <pault@gcc.gnu.org>
2254 * parse.c (next_statement) : If ST_GET_FCN_CHARACTERISTICS is
2255 seen, check for a statement label and, if present, delete it
2256 and set the locus to the start of the statement.
2258 2008-01-22 Paul Thomas <pault@gcc.gnu.org>
2261 * trans-io.c (gfc_trans_transfer): If the array reference in a
2262 read has a vector subscript, use gfc_conv_subref_array_arg to
2263 copy back the temporary.
2265 2008-01-22 Tobias Burnus <burnus@net-b.de>
2268 * interface.c (compare_actual_formal): Fix adding type
2269 to missing_arg_type for absent optional arguments.
2271 2008-01-22 Tobias Burnus <burnus@net-b.de>
2274 * parse.c (parse_spec): Change = into ==.
2276 2008-01-22 Daniel Franke <franke.daniel@gmail.com>
2279 * expr.c (check_elemental): Fix check for valid data types.
2281 2008-01-22 Tobias Burnus <burnus@net-b.de>
2284 * scanner.c (load_line): Support <tab><digit> continuation lines.
2285 * invoke.texi (-Wtabs): Document this.
2287 2008-01-22 Paul Thomas <pault@gcc.gnu.org>
2290 * module.c (read_module): Set use_rename attribute.
2292 2007-01-21 Tobias Burnus <burnus@net-b.de>
2295 * interface.c (compare_parameter): Improved error message
2296 for arguments of same type and mismatched kinds.
2298 2008-01-20 Paul Thomas <pault@gcc.gnu.org>
2301 * resolve.c (resolve_entries): Do not do an array bounds check
2302 if the result symbols are the same.
2305 * module.c (read_module) : Hide the symtree of the previous
2306 version of the symbol if this symbol is renamed.
2308 2008-01-20 Paul Thomas <pault@gcc.gnu.org>
2311 * array.c (gfc_check_constructor_type): Clear the expression ts
2312 so that the checking starts from the deepest level of array
2314 * primary.c (match_varspec): If an unknown type is changed to
2315 default character and the attempt to match a substring fails,
2316 change it back to unknown.
2319 * trans-array.c (gfc_add_loop_ss_code) : If ss->string_length is
2320 NULL for an array constructor, use the cl.length expression to
2322 (gfc_conv_array_parameter): Change call to gfc_evaluate_now to
2325 2008-01-19 Thomas Koenig <tkoenig@gcc.gnu.org>
2329 * iresolve.c (gfc_resolve_all): Remove conversion of mask
2330 argument to kind=1 by removing call to resolve_mask_arg().
2331 (gfc_resolve_any): Likewise.
2333 2008-01-19 Tobias Burnus <burnus@net-b.de>
2336 * primary.c (match_variable): Handle FL_UNKNOWN without
2337 uneducated guessing.
2338 (match_variable): Improve error message.
2340 2008-01-18 Tobias Burnus <burnus@net-b.de>
2343 * interface.c (get_expr_storage_size): Return storage size
2344 for array element designators.
2345 (compare_actual_formal): Reject unequal string sizes for
2346 assumed-shape dummy arguments. And fix error message for
2347 array-sections with vector subscripts.
2349 2008-01-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2352 * simplify.c (is_constant_array_expr): New static function that returns
2353 true if the given expression is an array and is constant.
2354 (gfc_simplify_reshape): Use new function.
2356 2008-01-17 H.J. Lu <hongjiu.lu@intel.com>
2359 * symbol.c (free_common_tree): Renamed to ...
2360 (gfc_free_common_tree): This. Remove static.
2361 (gfc_free_namespace): Updated.
2363 * gfortran.h (gfc_free_common_tree): New.
2365 * match.c (gfc_match_common): Call gfc_free_common_tree () with
2366 gfc_current_ns->common_root and set gfc_current_ns->common_root
2367 to NULL on syntax error.
2369 2008-01-18 Richard Sandiford <rsandifo@nildram.co.uk>
2372 * trans-expr.c (gfc_conv_function_call): Use proper
2373 type for returned character pointers.
2375 2008-01-17 Paul Thomas <pault@gcc.gnu.org>
2380 * decl.c : Remove gfc_function_kind_locus and
2381 gfc_function_type_locus. Add gfc_matching_function.
2382 (match_char_length): If matching a function and the length
2383 does not match, return MATCH_YES and try again later.
2384 (gfc_match_kind_spec): The same.
2385 (match_char_kind): The same.
2386 (gfc_match_type_spec): The same for numeric and derived types.
2387 (match_prefix): Rename as gfc_match_prefix.
2388 (gfc_match_function_decl): Except for function valued character
2389 lengths, defer applying kind, type and charlen info until the
2390 end of specification block.
2391 gfortran.h (gfc_statement): Add ST_GET_FCN_CHARACTERISTICS.
2392 parse.c (decode_specification_statement): New function.
2393 (decode_statement): Call it when a function has kind = -1. Set
2394 and reset gfc_matching function, as function statement is being
2396 (match_deferred_characteristics): Simplify with a single call
2397 to gfc_match_prefix. Do appropriate error handling. In any
2398 case, make sure that kind = -1 is reset or corrected.
2399 (parse_spec): Call above on seeing ST_GET_FCN_CHARACTERISTICS.
2400 Throw an error if kind = -1 after last specification statement.
2401 parse.h : Prototype for gfc_match_prefix.
2403 2008-01-16 Tobias Burnus <burnus@net-b.de>
2406 * interface.c (compare_parameter): Allow AS_DEFERRED array
2407 elements and reject attr.pointer array elemenents.
2408 (get_expr_storage_size): Return storage size of elements of
2409 assumed-shape and pointer arrays.
2411 2008-01-15 Sebastian Pop <sebastian.pop@amd.com>
2413 * f95-lang.c (gfc_init_builtin_functions): Initialize GOMP builtins
2414 for flag_tree_parallelize_loops.
2416 2008-01-15 Thomas Koenig <tkoenig@gcc.gnu.org>
2419 * iresolve.c (gfc_resolve_all): Call resolve_mask_arg.
2420 (gfc_resolve_any): Likewise.
2421 (gfc_resolve_count): Likewise. Don't append kind of
2422 argument to function name.
2424 2008-01-13 Tobias Burnus <burnus@net-b.de>
2427 * resolve.c (resolve_actual_arglist): For expressions,
2428 also check for assume-sized arrays.
2429 * interface.c (compare_parameter): Move F2003 character checks
2430 here, print error messages here, reject elements of
2431 assumed-shape array as argument to dummy arrays.
2432 (compare_actual_formal): Update for the changes above.
2434 2008-01-13 Tobias Burnus <burnus@net-b.de>
2437 * decl.c (contained_procedure): Only check directly preceeding state.
2439 2008-01-13 Tobias Burnus <burnus@net-b.de>
2442 * check.c (gfc_check_shape): Accept array ranges of
2443 assumed-size arrays.
2445 2008-01-12 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2448 * match.c (gfc_match_name): Don't error if leading character is a '(',
2449 just return MATCH_NO.
2451 2008-01-11 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2454 * trans-io.c (create_dummy_iostat): Commit the symbol.
2456 2008-01-11 Paul Thomas <pault@gcc.gnu.org>
2459 * simplify.c (gfc_simplify_transfer): Return NULL if the size
2460 of the element is unavailable and only assign character length
2461 to the result, if 'mold' is constant.
2463 2008-01-10 Paul Thomas <pault@gcc.gnu.org>
2466 * trans-array.c (gfc_trans_array_ctor_element): Use gfc_trans_string_copy
2467 to assign strings and perform bounds checks on the string length.
2468 (get_array_ctor_strlen): Remove bounds checking.
2469 (gfc_trans_array_constructor): Initialize string length checking.
2470 * trans-array.h : Add prototype for gfc_trans_string_copy.
2472 2008-01-08 Richard Guenther <rguenther@suse.de>
2475 PR tree-optimization/34683
2476 * trans-types.c (gfc_get_array_type_bounds): Use an array type
2477 with known size for accesses if that is known.
2479 2008-01-08 Paul Thomas <pault@gcc.gnu.org>
2482 * expr.c (find_array_element): Check that the array bounds are
2483 constant before using them. Use lower, as well as upper bound.
2484 (check_restricted): Allow implied index variable.
2486 2008-01-08 Paul Thomas <pault@gcc.gnu.org>
2489 * trans_array.c (gfc_trans_deferred_array): Do not null the
2490 data pointer on entering scope, nor deallocate it on leaving
2491 scope, if the symbol has the 'save' attribute.
2494 * trans_decl.c (gfc_finish_var_decl): Derived types with
2495 allocatable components and an initializer must be TREE_STATIC.
2497 2008-01-07 Paul Thomas <pault@gcc.gnu.org>
2500 * module.c (write_generic): Rewrite completely.
2501 (write_module): Change call to write_generic.
2503 2008-01-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2506 * scanner.c (load_line): Do not count ' ' as printable when checking for
2509 2008-01-06 Paul Thomas <pault@gcc.gnu.org>
2512 * module.c (load_needed): If the namespace has no proc_name
2513 give it the module symbol.
2515 2008-01-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2518 * trans-expr.c (gfc_conv_missing_dummy): Use a temporary to type convert
2519 the dummy variable expression, test for NULL, and pass the variable
2520 address to the called function.
2522 2007-01-06 Tobias Burnus <burnus@net-b.de>
2525 * match.c (gfc_match_common): Remove blank common in
2527 * resolve.c (resolve_common_vars): New function.
2528 (resolve_common_blocks): Move checks to resolve_common_vars
2529 and invoke that function.
2530 (resolve_types): Call resolve_common_vars for blank commons.
2532 2008-01-06 Tobias Burnus <burnus@net-b.de>
2535 * resolve.c (resolve_equivalence_derived): Reject derived types with
2536 default initialization if equivalenced with COMMON variable.
2538 2008-01-06 Tobias Burnus <burnus@net-b.de>
2541 * io.c (check_io_constraints): Disallow unformatted I/O for
2544 2008-01-06 Tobias Burnus <burnus@net-b.de>
2547 * resolve.c (resolve_formal_arglist): Reject dummy procedure in
2548 ELEMENTAL functions.
2550 2008-01-06 Tobias Burnus <burnus@net-b.de>
2553 * interface.c (compare_actual_formal): Reject parameter
2554 actual to intent(out) dummy.
2556 2008-01-04 Tobias Burnus <burnus@net-b.de>
2559 * primary.c (match_varspec): Gobble whitespace before