1 2008-06-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
5 * io.c (check_format): Add new error message for zero width.
6 Use new error message for FMT_A and with READ, FMT_G. Allow
7 FMT_G with WRITE except when -std=F95 and -std=F2003.
9 2008-06-07 Tobias Burnus <burnus@net-b.de>
12 * intrinsic.c (add_functions): Implement c_sizeof.
13 * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): Do not
14 create unneeded variable in the scalar case.
15 * intrinsic.texi: Add C_SIZEOF documentation.
17 2008-06-06 Tobias Burnus <burnus@net-b.de>
19 * intrinsic.texi (BESSEL_J1): Fix BES(S)EL_J1 typo.
21 2008-06-06 Jakub Jelinek <jakub@redhat.com>
23 * scanner.c (skip_free_comments, skip_fixed_comments): Handle tabs.
24 * parse.c (next_free): Allow tab after !$omp.
25 (decode_omp_directive): Handle !$omp task, !$omp taskwait
27 (case_executable): Add ST_OMP_TASKWAIT.
28 (case_exec_markers): Add ST_OMP_TASK.
29 (gfc_ascii_statement): Handle ST_OMP_TASK, ST_OMP_END_TASK and
31 (parse_omp_structured_block, parse_executable): Handle ST_OMP_TASK.
32 * gfortran.h (gfc_find_sym_in_expr): New prototype.
33 (gfc_statement): Add ST_OMP_TASK, ST_OMP_END_TASK and ST_OMP_TASKWAIT.
34 (gfc_omp_clauses): Add OMP_SCHED_AUTO to sched_kind,
35 OMP_DEFAULT_FIRSTPRIVATE to default_sharing. Add collapse and
37 (gfc_exec_op): Add EXEC_OMP_TASK and EXEC_OMP_TASKWAIT.
38 * f95-lang.c (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
39 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP, LANG_HOOKS_OMP_CLAUSE_DTOR,
40 LANG_HOOKS_OMP_PRIVATE_OUTER_REF): Define.
41 * trans.h (gfc_omp_clause_default_ctor): Add another argument.
42 (gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op,
43 gfc_omp_clause_dtor, gfc_omp_private_outer_ref): New prototypes.
44 * types.def (BT_ULONGLONG, BT_PTR_ULONGLONG,
45 BT_FN_BOOL_ULONGLONGPTR_ULONGLONGPTR,
46 BT_FN_BOOL_BOOL_ULL_ULL_ULL_ULLPTR_ULLPTR,
47 BT_FN_BOOL_BOOL_ULL_ULL_ULL_ULL_ULLPTR_ULLPTR,
48 BT_FN_VOID_PTR_PTR, BT_PTR_FN_VOID_PTR_PTR,
49 BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT): New.
50 (BT_BOOL): Use integer type with BOOL_TYPE_SIZE rather
51 than boolean_type_node.
52 * dump-parse-tree.c (gfc_show_omp_node): Handle EXEC_OMP_TASK,
53 EXEC_OMP_TASKWAIT, OMP_SCHED_AUTO, OMP_DEFAULT_FIRSTPRIVATE,
54 untied and collapse clauses.
55 (gfc_show_code_node): Handle EXEC_OMP_TASK and EXEC_OMP_TASKWAIT.
56 * trans.c (gfc_trans_code): Handle EXEC_OMP_TASK and
58 * st.c (gfc_free_statement): Likewise.
59 * resolve.c (gfc_resolve_blocks, resolve_code): Likewise.
60 (find_sym_in_expr): Rename to...
61 (gfc_find_sym_in_expr): ... this. No longer static.
62 (resolve_allocate_expr, resolve_ordinary_assign): Adjust caller.
63 * match.h (gfc_match_omp_task, gfc_match_omp_taskwait): New
65 * openmp.c (resolve_omp_clauses): Allow allocatable arrays in
66 firstprivate, lastprivate, reduction, copyprivate and copyin
68 (omp_current_do_code): Made static.
69 (omp_current_do_collapse): New variable.
70 (gfc_resolve_omp_do_blocks): Compute omp_current_do_collapse,
71 clear omp_current_do_code and omp_current_do_collapse on return.
72 (gfc_resolve_do_iterator): Handle collapsed do loops.
73 (resolve_omp_do): Likewise, diagnose errorneous collapsed do loops.
74 (OMP_CLAUSE_COLLAPSE, OMP_CLAUSE_UNTIED): Define.
75 (gfc_match_omp_clauses): Handle default (firstprivate),
76 schedule (auto), untied and collapse (n) clauses.
77 (OMP_DO_CLAUSES): Add OMP_CLAUSE_COLLAPSE.
78 (OMP_TASK_CLAUSES): Define.
79 (gfc_match_omp_task, gfc_match_omp_taskwait): New functions.
80 * trans-openmp.c (gfc_omp_private_outer_ref): New function.
81 (gfc_omp_clause_default_ctor): Add outer argument. For allocatable
82 arrays allocate them with the bounds of the outer var if outer
84 (gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op,
85 gfc_omp_clause_dtor): New functions.
86 (gfc_trans_omp_array_reduction): If decl is allocatable array,
87 allocate it with outer var's bounds in OMP_CLAUSE_REDUCTION_INIT
88 and deallocate it in OMP_CLAUSE_REDUCTION_MERGE.
89 (gfc_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
90 for assumed-size arrays.
91 (gfc_trans_omp_do): Add par_clauses argument. If dovar is
92 present in lastprivate clause and do loop isn't simple,
93 set OMP_CLAUSE_LASTPRIVATE_STMT. If dovar is present in
94 parallel's lastprivate clause, change it to shared and add
95 lastprivate clause to OMP_FOR_CLAUSES. Handle collapsed do loops.
96 (gfc_trans_omp_directive): Adjust gfc_trans_omp_do callers.
97 (gfc_trans_omp_parallel_do): Likewise. Move collapse clause to
98 OMP_FOR from OMP_PARALLEL.
99 (gfc_trans_omp_clauses): Handle OMP_SCHED_AUTO,
100 OMP_DEFAULT_FIRSTPRIVATE, untied and collapse clauses.
101 (gfc_trans_omp_task, gfc_trans_omp_taskwait): New functions.
102 (gfc_trans_omp_directive): Handle EXEC_OMP_TASK and
105 2008-06-04 Janus Weil <janus@gcc.gnu.org>
109 * resolve.c (resolve_symbol): Correctly copy the interface for a
110 PROCEDURE declaration.
112 2008-06-02 Janus Weil <janus@gcc.gnu.org>
115 * symbol.c (gfc_add_allocatable,gfc_add_dimension,
116 gfc_add_explicit_interface): Added checks.
117 * decl.c (attr_decl1): Added missing "var_locus".
118 * parse.c (parse_interface): Checking for errors.
120 2008-06-02 Daniel Kraft <d@domob.eu>
122 * gfortran.h: New statement-type ST_FINAL for FINAL declarations.
123 (struct gfc_symbol): New member f2k_derived.
124 (struct gfc_namespace): New member finalizers, for use in the above
125 mentioned f2k_derived namespace.
126 (struct gfc_finalizer): New type defined for finalizers linked list.
127 * match.h (gfc_match_final_decl): New function header.
128 * decl.c (gfc_match_derived_decl): Create f2k_derived namespace on
129 constructed symbol node.
130 (gfc_match_final_decl): New function to match a FINAL declaration line.
131 * parse.c (decode_statement): match-call for keyword FINAL.
132 (parse_derived): Parse CONTAINS section and accept FINAL statements.
133 * resolve.c (gfc_resolve_finalizers): New function to resolve (that is
134 in this case, check) a list of finalizer procedures.
135 (resolve_fl_derived): Call gfc_resolve_finalizers here.
136 * symbol.c (gfc_get_namespace): Initialize new finalizers to NULL.
137 (gfc_free_namespace): Free finalizers list.
138 (gfc_new_symbol): Initialize new f2k_derived to NULL.
139 (gfc_free_symbol): Free f2k_derived namespace.
140 (gfc_free_finalizer): New function to free a single gfc_finalizer node.
141 (gfc_free_finalizer_list): New function to free a linked list of
144 2008-06-02 Daniel Franke <franke.daniel@gmail.com>
148 * cpp.c (gfc_cpp_init): Do not initialize builtins if
149 processing already preprocessed input.
150 (gfc_cpp_preprocess): Finalize output with newline.
152 2008-05-31 Jerry DeLisle <jvdelisle@gcc.gnu.org>
154 * intrinsic.texi: Revert wrong commit.
156 2008-05-31 Steven G. Kargl <kargls@comcast.net>
158 * arith.c (gfc_arith_init_1): Remove now unused r and c variables.
159 Cleanup numerical inquiry function initialization.
160 (gfc_arith_done_1): Replace multiple mpfr_clear() invocations with
161 a single mpfr_clears().
162 (gfc_check_real_range): Re-arrange logic to eliminate multiple
163 unnecessary branching and assignments.
164 (gfc_arith_times): Use mpfr_clears() in preference to multiple
166 (gfc_arith_divide): Ditto.
167 (complex_reciprocal): Eliminate now unused variables a, re, im.
168 Cleanup the mpfr abuse. Use mpfr_clears() in preference to
169 multiple mpfr_clear().
170 (complex_pow): Fix comment whitespace. Use mpfr_clears() in
171 preference to multiple mpfr_clear().
172 * simplify.c (gfc_simplify_and): Remove blank line.
173 (gfc_simplify_atan2): Move error checking earlier to eliminate
174 a now unnecessay gfc_free_expr().
175 (gfc_simplify_bessel_j0): Remove unnecessary gfc_set_model_kind().
176 (gfc_simplify_bessel_j1): Ditto.
177 (gfc_simplify_bessel_jn): Ditto.
178 (gfc_simplify_bessel_y0): Ditto.
179 (gfc_simplify_bessel_y1): Ditto.
180 (gfc_simplify_bessel_yn): Ditto.
181 (only_convert_cmplx_boz): Eliminate unnecessary duplicate code, and
182 combine nested if statement rational expressions.
183 (gfc_simplify_cos): Use mpfr_clears() in preference to multiple
185 (gfc_simplify_exp): Ditto.
186 (gfc_simplify_fraction): Move gfc_set_model_kind() to after the
187 special case of 0. Use mpfr_clears() in preference to multiple
189 (gfc_simplify_gamma): Eliminate unnecessary gfc_set_model_kind().
190 (gfc_simplify_lgamma): Ditto.
191 (gfc_simplify_log10): Ditto.
192 (gfc_simplify_log): Move gfc_set_model_kind () inside switch
193 statement. Use mpfr_clears() in preference to multiple mpfr_clear().
194 (gfc_simplify_mod): Eliminate now unused variables quot, iquot,
195 and term. Simplify the mpfr magic.
196 (gfc_simplify_modulo): Ditto.
197 (gfc_simplify_nearest): Eliminate unnecessary gfc_set_model_kind().
198 (gfc_simplify_scale): Use mpfr_clears() in preference to multiple
200 (gfc_simplify_sin): Ditto
201 (gfc_simplify_sqrt): Ditto
202 (gfc_simplify_set_exponent): Move gfc_set_model_kind() to after the
203 special case of 0. Use mpfr_clears() in preference to multiple
206 2008-05-29 Daniel Franke <franke.daniel@gmail.com>
209 * Make-lang.in (F95_OBJS): Added dependency on FORTRAN_TARGET_OBJS.
211 2008-05-29 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
213 * scanner.c (load_line): Add first_char argument. Don't call ungetc.
214 (gfc_read_orig_filename): Adjust call to load_line. Don't call
216 (load_file): Adjust call to load_line.
218 2008-05-28 Janus Weil <janus@gcc.gnu.org>
222 * interface.c (gfc_procedure_use): Enable argument checking for
223 external procedures with explicit interface.
224 * symbol.c (check_conflict): Fix conflict checking for externals.
225 (copy_formal_args): Fix handling of arrays.
226 * resolve.c (resolve_specific_f0, resolve_specific_s0): Fix handling
228 * parse.c (parse_interface): Non-abstract INTERFACE statement implies
231 2008-05-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
234 * intrinsic.c (gfc_convert_chartype): Don't mark conversion
236 * trans-array.c (gfc_trans_array_ctor_element): Divide element
237 size by the size of one character to obtain length.
238 * iresolve.c (gfc_resolve_cshift): Call the _char4 variant when
240 (gfc_resolve_eoshift): Likewise.
241 * trans-intrinsic.c (gfc_conv_intrinsic_ctime): Minor beautification.
242 (gfc_conv_intrinsic_fdate): Minor beautification.
243 (gfc_conv_intrinsic_ttynam): Minor beautification.
244 (gfc_conv_intrinsic_minmax_char): Allow all character kinds.
245 (size_of_string_in_bytes): New function.
246 (gfc_conv_intrinsic_size): Call size_of_string_in_bytes for
247 character expressions.
248 (gfc_conv_intrinsic_sizeof): Likewise.
249 (gfc_conv_intrinsic_array_transfer): Likewise.
250 (gfc_conv_intrinsic_trim): Allow all character kinds. Minor
252 (gfc_conv_intrinsic_repeat): Fix comment typo.
253 * simplify.c (gfc_convert_char_constant): Take care of conversion
254 of array constructors.
256 2008-05-27 Tobias Burnus <burnus@net-b.de>
259 * trans-array.c (gfc_set_loop_bounds_from_array_spec):
260 Add missing fold_convert.
262 2008-05-26 Daniel Franke <franke.daniel@gmail.com>
264 * fortran/cpp.c (cpp_define_builtins): Remove usage of TARGET_* macros,
267 2008-05-26 Daniel Franke <franke.daniel@gmail.com>
270 * lang.opt (A, C, CC, D, E, H, P, U, cpp, d, fworking-directory,
271 imultilib, iprefix, iquote, isysroot, isystem, nocpp, nostdinc,
272 o, undef, v): New options.
273 * options.c (gfc_init_options): Also initialize preprocessor
275 (gfc_post_options): Also handle post-initialization of preprocessor
277 (gfc_handle_option): Check if option is a preprocessor option.
278 If yes, let gfc_cpp_handle_option() handle the option.
279 * lang-specs.h: Reorganized to handle new options.
280 * scanner.c (gfc_new_file): Read temporary file instead of
281 input source if preprocessing is enabled.
282 * f95-lang.c (gfc_init): Initialize preprocessor.
283 (gfc_finish): Clean up preprocessor.
286 * Make-lang.in: Added new objects and dependencies.
287 * gfortran.texi: Updated section "Preprocessing and
288 conditional compilation".
289 * invoke.texi: Added new section "Preprocessing Options",
290 listed and documented the preprocessing options handled
293 2008-05-25 Tobias Burnus <burnus@net-b.de>
296 * trans-expr.c (gfc_conv_function_call): Remove library
297 call for c_f_pointer with scalar Fortran pointers and for
300 2008-05-21 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
303 * iresolve.c (check_charlen_present): Don't force the rank to 1.
305 2008-05-19 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
308 * trans-expr.c (gfc_conv_string_tmp): Pick the correct type for
309 the temporary variable.
311 2008-05-19 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
313 * simplify.c (gfc_simplify_dble, gfc_simplify_real): Initialize
314 result variable to avoid warnings.
316 2008-05-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
318 * intrinsic.c (char_conversions, ncharconv): New static variables.
319 (find_char_conv): New function.
320 (add_functions): Add simplification functions for ADJUSTL and
321 ADJUSTR. Don't check the kind of their argument. Add checking for
322 LGE, LLE, LGT and LLT.
323 (add_subroutines): Fix argument type for SLEEP. Fix argument name
325 (add_char_conversions): New function.
326 (gfc_intrinsic_init_1): Call add_char_conversions.
327 (gfc_intrinsic_done_1): Free char_conversions.
328 (check_arglist): Use kind == 0 as a signal that we don't want
329 the kind value to be checked.
330 (do_simplify): Also simplify character functions.
331 (gfc_convert_chartype): New function
332 * trans-array.c (gfc_trans_array_ctor_element): Don't force the
333 use of default character type.
334 (gfc_trans_array_constructor_value): Likewise.
335 (get_array_ctor_var_strlen): Use integer kind to build an integer
336 instead of a character kind!
337 (gfc_build_constant_array_constructor): Don't force the use of
338 default character type.
339 (gfc_conv_loop_setup): Likewise.
340 * trans-expr.c (gfc_conv_string_tmp): Don't force the use of
341 default character type. Allocate enough memory for wide strings.
342 (gfc_conv_concat_op): Make sure operand kind are the same.
343 (string_to_single_character): Remove gfc_ prefix. Reindent.
344 Don't force the use of default character type.
345 (gfc_conv_scalar_char_value): Likewise.
346 (gfc_build_compare_string): Call string_to_single_character.
347 (fill_with_spaces): New function
348 (gfc_trans_string_copy): Add kind arguments. Use them to deal
349 with wide character kinds.
350 (gfc_conv_statement_function): Whitespace fix. Call
351 gfc_trans_string_copy with new kind arguments.
352 (gfc_conv_substring_expr): Call gfc_build_wide_string_const
353 instead of using gfc_widechar_to_char.
354 (gfc_conv_string_parameter): Don't force the use of default
356 (gfc_trans_scalar_assign): Pass kind args to gfc_trans_string_copy.
357 * intrinsic.h (gfc_check_lge_lgt_lle_llt, gfc_convert_char_constant,
358 gfc_resolve_adjustl, gfc_resolve_adjustr): New prototypes.
359 * decl.c (gfc_set_constant_character_len): Don't assert the
360 existence of a single character kind.
361 * trans-array.h (gfc_trans_string_copy): New prototype.
362 * gfortran.h (gfc_check_character_range, gfc_convert_chartype):
364 * error.c (print_wide_char_into_buffer): New function lifting
365 code from gfc_print_wide_char. Fix order to output '\x??' instead
367 (gfc_print_wide_char): Call print_wide_char_into_buffer.
368 (show_locus): Call print_wide_char_into_buffer with buffer local
370 * trans-const.c (gfc_build_wide_string_const): New function.
371 (gfc_conv_string_init): Deal with wide characters strings
373 (gfc_conv_constant_to_tree): Call gfc_build_wide_string_const.
374 * trans-stmt.c (gfc_trans_label_assign): Likewise.
375 (gfc_trans_character_select): Deal with wide strings.
376 * expr.c (gfc_check_assign): Allow conversion between character
378 * trans-const.h (gfc_build_wide_string_const): New prototype.
379 * trans-types.c (gfc_get_character_type_len_for_eltype,
380 gfc_get_character_type_len): Create too variants of the old
381 gfc_get_character_type_len, one getting kind argument and the
382 other one directly taking a type tree.
383 * trans.h (gfor_fndecl_select_string_char4,
384 gfor_fndecl_convert_char1_to_char4,
385 gfor_fndecl_convert_char4_to_char1): New prototypes.
386 * trans-types.h (gfc_get_character_type_len_for_eltype): New
388 * resolve.c (resolve_operator): Exit early when kind mismatches
389 are detected, because that makes us issue an error message later.
390 (validate_case_label_expr): Fix wording of error message.
391 * iresolve.c (gfc_resolve_adjustl, gfc_resolve_adjustr): New
393 (gfc_resolve_pack): Call _char4 variants of library function
394 when dealing with wide characters.
395 (gfc_resolve_reshape): Likewise.
396 (gfc_resolve_spread): Likewise.
397 (gfc_resolve_transpose): Likewise.
398 (gfc_resolve_unpack): Likewise.
399 * target-memory.c (size_character): Take character kind bit size
400 correctly into account (not that it changes anything for now, but
402 (gfc_encode_character): Added gfc_ prefix. Encoding each
403 character of a string by calling native_encode_expr for the
404 corresponding unsigned integer.
405 (gfc_target_encode_expr): Add gfc_ prefix to encode_character.
406 * trans-decl.c (gfc_build_intrinsic_function_decls): Build
407 gfor_fndecl_select_string_char4, gfor_fndecl_convert_char1_to_char4
408 and gfor_fndecl_convert_char4_to_char1.
409 * target-memory.h (gfc_encode_character): New prototype.
410 * arith.c (gfc_check_character_range): New function.
411 (eval_intrinsic): Allow non-default character kinds.
412 * check.c (gfc_check_access_func): Only allow default
413 character kind arguments.
414 (gfc_check_chdir): Likewise.
415 (gfc_check_chdir_sub): Likewise.
416 (gfc_check_chmod): Likewise.
417 (gfc_check_chmod_sub): Likewise.
418 (gfc_check_lge_lgt_lle_llt): New function.
419 (gfc_check_link): Likewise.
420 (gfc_check_link_sub): Likewise.
421 (gfc_check_symlnk): Likewise.
422 (gfc_check_symlnk_sub): Likewise.
423 (gfc_check_rename): Likewise.
424 (gfc_check_rename_sub): Likewise.
425 (gfc_check_fgetputc_sub): Likewise.
426 (gfc_check_fgetput_sub): Likewise.
427 (gfc_check_stat): Likewise.
428 (gfc_check_stat_sub): Likewise.
429 (gfc_check_date_and_time): Likewise.
430 (gfc_check_ctime_sub): Likewise.
431 (gfc_check_fdate_sub): Likewise.
432 (gfc_check_gerror): Likewise.
433 (gfc_check_getcwd_sub): Likewise.
434 (gfc_check_getarg): Likewise.
435 (gfc_check_getlog): Likewise.
436 (gfc_check_hostnm): Likewise.
437 (gfc_check_hostnm_sub): Likewise.
438 (gfc_check_ttynam_sub): Likewise.
439 (gfc_check_perror): Likewise.
440 (gfc_check_unlink): Likewise.
441 (gfc_check_unlink_sub): Likewise.
442 (gfc_check_system_sub): Likewise.
443 * primary.c (got_delim): Perform correct character range checking
445 * trans-intrinsic.c (gfc_conv_intrinsic_conversion): Generate
446 calls to library functions convert_char4_to_char1 and
447 convert_char1_to_char4 for character conversions.
448 (gfc_conv_intrinsic_char): Allow all character kings.
449 (gfc_conv_intrinsic_strcmp): Fix whitespace.
450 (gfc_conv_intrinsic_repeat): Take care of all character kinds.
451 * intrinsic.texi: For all GNU intrinsics accepting character
452 arguments, mention that they're restricted to the default kind.
453 * simplify.c (simplify_achar_char): New function.
454 (gfc_simplify_achar, gfc_simplify_char): Call simplify_achar_char.
455 gfc_simplify_ichar): Don't error out for wide characters.
456 (gfc_convert_char_constant): New function.
458 2008-05-18 Steven G. Kargl <kargls@comcast.net>
461 * symbol.c (check_conflict): Issue errors for abuse of PUBLIC, PRIVATE,
463 * resolve.c (gfc_verify_binding_labels): Fix NULL pointer dereference.
465 2008-05-17 Tobias Burnus <burnus@net-b.de>
467 * intrinsic.texi: Correct description of GET_COMMAND_ARGUMENT
468 and GET_ENVIRONMENT_VARIABLE; fix keyword= name for GETENV,
469 GETLOG, GMTIME, HOSTNM, IRAND, ITIME, KILL.
470 Move LOG_GAMMA after LOG10.
472 2008-05-17 Tobias Burnus <burnus@net-b.de>
474 * intrinsic.c (add_functions): Change FLUSH(C) to FLUSH(UNIT).
475 * intrinsic.texi: Change INTEGER(*) to INTEGER; fix keyword= name for
476 ABS, ADJUSTL, AINT, ALLOCATED, ANINT, ASSOCIATED, C_ASSOCIATED,
477 CEILING, DBLE, DFLOAT, DOT_PRODUCT, DREAL, FLOAT, FLOOR, GET_COMMAND.
479 2008-05-16 Paul Thomas <pault@gcc.gnu.org>
483 * trans-stmt.c (gfc_trans_where): Tighten up the dependency
484 check for calling gfc_trans_where_3.
487 * trans-stmt.c (gfc_trans_where_2): Set the mask size to zero
488 if it is calculated to be negative.
491 * trans-stmt.c (gfc_trans_where_3, gfc_trans_where_assign): Set
492 ss->where for scalar right hand sides.
493 * trans-array.c (gfc_add_loop_ss_code): If ss->where is set do
494 not evaluate scalars outside the loop. Clean up whitespace.
495 * trans.h : Add a bitfield 'where' to gfc_ss.
497 2008-05-16 Tobias Burnus <burnus@net-b.de>
499 * libgfortran.h: Increase GFC_MAX_DIMENSIONS to 15.
500 * array.c (gfc_match_array_spec): Error with -std=f2003 if rank > 7.
502 2008-04-16 Daniel Kraft <d@domob.eu>
505 * gfortran.h: Added field "length_from_typespec" to gfc_charlength.
506 * aray.c (gfc_match_array_constructor): Added code to parse typespec.
507 (check_element_type, check_constructor_type, gfc_check_constructor_type):
508 Extended to support explicit typespec on constructor.
509 (gfc_resolve_character_array_constructor): Pad strings correctly for
510 explicit, constant character length.
511 * trans-array.c: New static global variable "typespec_chararray_ctor"
512 (gfc_trans_array_constructor): New code to support explicit but dynamic
515 2008-05-16 Jerry DeLisle <jvdelisle@gcc.gnu.org>
518 * decl.c (match_attr_spec): Check for matching pairs of parenthesis.
519 * expr.c (gfc_specification_expr): Supplement the error message with the
521 * resolve.c (gfc_resolve_index): Likewise.
522 * match.c (gfc_match_parens): Clarify error message with "at or before".
523 (gfc_match_do): Check for matching pairs of parenthesis.
525 2008-05-16 Tobias Burnus <burnus@net-b.de
527 * intrinsic.texi: Write Fortran 77/90/95 instead of F77/90/95;
528 add missing KIND argument to ACHAR and NINT; and state that
529 the KIND argument is a F2003 extension for ACHAR, COUNT, IACHAR,
530 ICHAR, INDEX, LBOUND, LEN, LEN_TRIM, SCAN, SIZE, UBOUND, VERIFY.
532 2008-05-16 Daniel Kraft <d@domob.eu>
534 * primary.c: New private structure "gfc_structure_ctor_component".
535 (gfc_free_structure_ctor_component): New helper function.
536 (gfc_match_structure_constructor): Extended largely to support named
537 arguments and default initialization for structure constructors.
539 2008-05-15 Steven G. Kargl <kargls@comcast.net>
541 * simplify.c (gfc_simplify_dble, gfc_simplify_float,
542 simplify_bound, gfc_simplify_nearest, gfc_simplify_real): Plug
543 possible memory leaks.
544 (gfc_simplify_reshape): Plug possible memory leaks and dereferencing
547 2008-05-15 Steven G. Kargl <kargls@comcast.net>
550 * simplify.c (gfc_simplify_int, gfc_simplify_intconv): Replaced hand
551 rolled integer conversion with gfc_int2int, gfc_real2int, and
553 (gfc_simplify_intconv): Renamed to simplify_intconv.
555 2008-05-15 Steven G. Kargl, <kargl@comcast.net>
556 * gfortran.dg/and_or_xor.f90: New test
558 * fortran/simplify.c (gfc_simplify_and, gfc_simplify_or,
559 gfc_simplify_xor): Don't range check logical results.
561 2008-05-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
563 * trans-expr.c (gfc_conv_concat_op): Take care of nondefault
565 (gfc_build_compare_string): Add kind argument and use it.
566 (gfc_conv_statement_function): Fix indentation.
567 * gfortran.h (gfc_character_info): New structure.
568 (gfc_character_kinds): New array.
569 * trans-types.c (gfc_character_kinds, gfc_character_types,
570 gfc_pcharacter_types): New array.
571 (gfc_init_kinds): Fill character kinds array.
572 (validate_character): Take care of nondefault character kinds.
573 (gfc_build_uint_type): New function.
574 (gfc_init_types): Take care of nondefault character kinds.
575 (gfc_get_char_type, gfc_get_pchar_type): New functions.
576 (gfc_get_character_type_len): Use gfc_get_char_type.
577 * trans.h (gfc_build_compare_string): Adjust prototype.
578 (gfor_fndecl_compare_string_char4, gfor_fndecl_concat_string_char4,
579 gfor_fndecl_string_len_trim_char4, gfor_fndecl_string_index_char4,
580 gfor_fndecl_string_scan_char4, gfor_fndecl_string_verify_char4,
581 gfor_fndecl_string_trim_char4, gfor_fndecl_string_minmax_char4,
582 gfor_fndecl_adjustl_char4, gfor_fndecl_adjustr_char4): New
584 * trans-types.h (gfc_get_char_type, gfc_get_pchar_type): New
586 * trans-decl.c (gfor_fndecl_compare_string_char4,
587 gfor_fndecl_string_len_trim_char4, gfor_fndecl_string_index_char4,
588 gfor_fndecl_string_scan_char4, gfor_fndecl_string_verify_char4,
589 gfor_fndecl_string_trim_char4, gfor_fndecl_string_minmax_char4,
590 gfor_fndecl_adjustl_char4, gfor_fndecl_adjustr_char4,
591 gfor_fndecl_concat_string_char4): New function decls.
592 (gfc_build_intrinsic_function_decls): Define new *_char4 function
594 * trans-intrinsic.c (gfc_conv_intrinsic_minmax_char,
595 gfc_conv_intrinsic_len_trim, gfc_conv_intrinsic_ichar,
596 gfc_conv_intrinsic_strcmp, gfc_conv_intrinsic_trim,
597 gfc_conv_intrinsic_function): Deal with nondefault character kinds.
599 2008-05-15 Sa Liu <saliu@de.ibm.com>
601 * iso-c-binding.def: Add standard parameter to macro NAMED_INTCST.
602 All existing NAMED_INTCST definitions has standard GFC_STD_F2003,
603 c_int128_t, c_int_least128_t and c_int_fast128_t are added as
605 * iso-fortran-evn.def: Add standard parameter GFC_STD_F2003
606 to macro NAMED_INTCST.
607 * symbol.c (std_for_isocbinding_symbol): New helper function to
608 return the standard that supports this isocbinding symbol.
609 (generate_isocbinding_symbol): Do not generate GNU extension symbols
610 if std=f2003. Add new parameter to NAMED_INTCST.
611 * module.c (use_iso_fortran_env_module): Add new parameter to
612 NAMED_INTCST and new field standard to struct intmod_sym.
613 * gfortran.h: Add new parameter to NAMED_INTCST.
614 * trans-types.c (init_c_interop_kinds): Add new parameter to
616 * intrinsic.texi: Documented new types C_INT128_T, C_INT_LEASE128_T
619 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
622 * trans-decl.c (gfc_build_dummy_array_decl): Don't repack
623 arrays that have the TARGET attribute.
625 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
628 * simplify.c (only_convert_cmplx_boz): New function.
629 (gfc_simplify_cmplx, gfc_simplify_complex, gfc_simplify_dcmplx):
630 Call only_convert_cmplx_boz.
632 2008-05-14 Paul Thomas <pault@gcc.gnu.org>
635 * interface.c (compare_actual_formal): Do not check sizes if the
636 actual is BT_PROCEDURE.
638 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
641 * trans-array.c (gfc_conv_ss_startstride): Any negative size is
642 the same as zero size.
643 (gfc_conv_loop_setup): Fix size calculation.
645 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
648 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Correctly
649 handle zero-size sections.
651 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
654 * scanner.c (preprocessor_line): Allocate enough memory for a
657 2008-05-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
660 * target-memory.c (gfc_target_expr_size): Correctly treat
662 (gfc_target_encode_expr): Likewise.
663 (gfc_interpret_complex): Whitespace change.
665 2008-05-11 Thomas Koenig <tkoenig@gcc.gnu.org>
668 * trans.c (gfc_call_malloc): If size equals zero, allocate one
669 byte; don't return a null pointer.
671 2008-05-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
674 * module.c (quote_string): Fix sprintf format.
676 2008-05-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
679 * module.c (quote_string, unquote_string,
680 mio_allocated_wide_string): New functions.
681 (mio_expr): Call mio_allocated_wide_string where needed.
683 2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>
685 * trans-decl.c (gfc_get_extern_function_decl, build_function_decl):
686 Rename DECL_IS_PURE to DECL_PURE_P.
688 2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
690 * arith.c: (gfc_arith_concat, gfc_compare_string,
691 gfc_compare_with_Cstring, hollerith2representation,
692 gfc_hollerith2int, gfc_hollerith2real, gfc_hollerith2complex,
693 gfc_hollerith2character, gfc_hollerith2logical): Use wide
694 characters for character constants.
695 * data.c (create_character_intializer): Likewise.
696 * decl.c (gfc_set_constant_character_len): Likewise.
697 * dump-parse-tree.c (show_char_const): Correctly dump wide
699 error.c (print_wide_char): Rename into gfc_print_wide_char.
700 (show_locus): Adapt to new prototype of gfc_print_wide_char.
701 expr.c (free_expr0): Representation is now disjunct from
702 character string value, so we always free it.
703 (gfc_copy_expr, find_substring_ref, gfc_simplify_expr): Adapt
704 to wide character strings.
705 * gfortran.h (gfc_expr): Make value.character.string a wide string.
706 (gfc_wide_toupper, gfc_wide_strncasecmp, gfc_wide_memset,
707 gfc_widechar_to_char, gfc_char_to_widechar): New prototypes.
708 (gfc_get_wide_string): New macro.
709 (gfc_print_wide_char): New prototype.
710 * io.c (format_string): Make a wide string.
711 (next_char, gfc_match_format, compare_to_allowed_values,
712 gfc_match_open): Deal with wide strings.
713 * module.c (mio_expr): Convert between wide strings and ASCII ones.
714 * primary.c (match_hollerith_constant, match_charkind_name):
716 * resolve.c (build_default_init_expr): Likewise.
717 * scanner.c (gfc_wide_toupper, gfc_wide_memset,
718 gfc_char_to_widechar): New functions.
719 (wide_strchr, gfc_widechar_to_char, gfc_wide_strncasecmp):
720 Changes in prototypes.
721 (gfc_define_undef_line, load_line, preprocessor_line,
722 include_line, load_file, gfc_read_orig_filename): Handle wide
724 * simplify.c (gfc_simplify_achar, gfc_simplify_adjustl,
725 gfc_simplify_adjustr, gfc_simplify_char, gfc_simplify_iachar,
726 gfc_simplify_ichar, simplify_min_max, gfc_simplify_new_line,
727 gfc_simplify_repeat): Handle wide strings.
728 (wide_strspn, wide_strcspn): New helper functions.
729 (gfc_simplify_scan, gfc_simplify_trim, gfc_simplify_verify):
731 * symbol.c (generate_isocbinding_symbol): Likewise.
732 * target-memory.c (size_character, gfc_target_expr_size,
733 encode_character, gfc_target_encode_expr, gfc_interpret_character,
734 gfc_target_interpret_expr): Handle wide strings.
735 * trans-const.c (gfc_conv_string_init): Lower wide strings to
737 (gfc_conv_constant_to_tree): Likewise.
738 * trans-expr.c (gfc_conv_substring_expr): Handle wide strings.
739 * trans-io.c (gfc_new_nml_name_expr): Likewise.
740 * trans-stmt.c (gfc_trans_label_assign): Likewise.
742 2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
744 * simplify.c (gfc_simplify_bessel_j0,gfc_simplify_bessel_j1,
745 gfc_simplify_bessel_jn,gfc_simplify_bessel_y0,
746 gfc_simplify_bessel_y1,gfc_simplify_bessel_yn): Mark arguments
747 with ATTRIBUTE_UNUSED.
749 2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
751 * check.c (gfc_check_sizeof): Switch to ATTRIBUTE_UNUSED.
752 * simplify.c (gfc_simplify_lgamma): Likewise.
754 2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
756 * openmp.c (gfc_match_omp_eos): Use gfc_next_ascii_char and
758 * decl.c (gfc_match_kind_spec, gfc_match_type_spec,
759 gfc_match_implicit_none, match_implicit_range, gfc_match_implicit,
760 match_string_p, match_attr_spec, gfc_match_suffix,
761 match_procedure_decl, gfc_match_entry, gfc_match_subroutine):
763 * gfortran.h (gfc_char_t): New type.
764 (gfc_linebuf): Make line member a gfc_char_t.
765 (locus): Make nextc member a gfc_char_t.
766 (gfc_wide_is_printable, gfc_wide_is_digit, gfc_wide_fits_in_byte,
767 gfc_wide_tolower, gfc_wide_strlen, gfc_next_ascii_char,
768 gfc_peek_ascii_char, gfc_check_digit): New prototypes.
769 * error.c (print_wide_char): New function.
770 (show_locus): Use print_wide_char and gfc_wide_strlen.
771 * io.c (next_char): Use gfc_char_t type.
772 (match_io): Use gfc_peek_ascii_char and gfc_next_ascii_char.
773 * match.c (gfc_match_parens, gfc_match_eos,
774 gfc_match_small_literal_int, gfc_match_name, gfc_match_name_C,
775 gfc_match_intrinsic_op, gfc_match_char, gfc_match_return,
776 gfc_match_common): Likewise.
777 * match.h (gfc_match_special_char): Change prototype.
778 * parse.c (decode_specification_statement, decode_statement,
779 decode_omp_directive, next_free, next_fixed): Use
780 gfc_peek_ascii_char and gfc_next_ascii_char.
781 * primary.c (gfc_check_digit): Change name.
782 (match_digits, match_hollerith_constant, match_boz_constant,
783 match_real_constant, next_string_char, match_charkind_name,
784 match_string_constant, match_logical_constant_string,
785 match_complex_constant, match_actual_arg, match_varspec,
786 gfc_match_rvalue, match_variable): Use gfc_peek_ascii_char and
788 * scanner.c (gfc_wide_fits_in_byte, wide_is_ascii,
789 gfc_wide_is_printable, gfc_wide_tolower, gfc_wide_is_digit,
790 gfc_wide_is_digit, wide_atoi, gfc_wide_strlen, wide_strcpy,
791 wide_strchr, widechar_to_char, wide_strncmp, wide_strncasecmp,
792 gfc_next_ascii_char, gfc_peek_ascii_char):
794 (next_char, gfc_define_undef_line, skip_free_comments,
795 gfc_next_char_literal, gfc_next_char, gfc_peek_char,
796 gfc_error_recovery, load_line, preprocessor_line, include_line,
797 load_file, gfc_read_orig_filename): Use gfc_char_t for source
798 characters and the {gfc_,}wide_* functions to manipulate wide
801 2008-05-06 Tobias Burnus <burnus@net-b.de>
804 * intrinsic.c (add_functions): Call gfc_simplify_bessel_*.
805 * intrinsic.h: Add prototypes for gfc_simplify_bessel_*.
806 * simplify.c (gfc_simplify_bessel_j0,gfc_simplify_bessel_j1,
807 gfc_simplify_bessel_jn,gfc_simplify_bessel_y0,
808 gfc_simplify_bessel_y1,gfc_simplify_bessel_yn): New.
810 2008-05-03 Janus Weil <jaydub66@gmail.com>
812 * misc.c (gfc_clear_ts): Set interface to NULL.
814 2008-05-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
817 * gfortran.h: Add extra_comma pointer to gfc_dt structure. Add iokind to
818 gfc_expr value union. Add io_kind enum to here from io.c.
819 * io.c (gfc_free_dt): Free extra_comma.
820 (gfc_resolve_dt): If an extra comma was encountered and io_unit is type
821 BT_CHARACTER, resolve to format_expr and set default unit. Error if
822 io_kind is M_WRITE. (match_io): Match the extra comma and set new
823 pointer, extra_comma.
825 2008-05-01 Bud Davis <bdavis9659@sbcglobal.net>
828 * simplify.c (gfc_simplify_index): Check for direction argument
831 2008-05-01 Janus Weil <jaydub66@gmail.com>
833 * gfortran.h (struct gfc_symbol): Moving "interface" member to
834 gfc_typespec (plus fixing a small docu error).
835 * interface.c (gfc_procedure_use): Ditto.
836 * decl.c (match_procedure_decl): Ditto.
837 * resolve.c (resolve_specific_f0,
838 resolve_specific_f0, resolve_symbol): Ditto.
840 2008-04-30 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
842 * intrinsic.c (add_functions): Add SELECTED_CHAR_KIND intrinsic.
843 * intrinsic.h (gfc_check_selected_char_kind,
844 gfc_simplify_selected_char_kind): New prototypes.
845 * gfortran.h (gfc_isym_id): Add GFC_ISYM_SC_KIND.
846 * trans.h (gfor_fndecl_sc_kind): New function decl.
847 * trans-decl.c (gfor_fndecl_sc_kind): Build new decl.
848 * arith.c (gfc_compare_with_Cstring): New function.
849 * arith.h (gfc_compare_with_Cstring): New prototype.
850 * check.c (gfc_check_selected_char_kind): New function.
851 * primary.c (match_string_constant, match_kind_param): Mark
852 symbols used as literal constant kind param as referenced.
853 * trans-intrinsic.c (gfc_conv_intrinsic_sc_kind): New function.
854 (gfc_conv_intrinsic_function): Call gfc_conv_intrinsic_sc_kind.
855 * intrinsic.texi (SELECTED_CHAR_KIND): Document new intrinsic.
856 * simplify.c (gfc_simplify_selected_char_kind): New function.
858 2008-04-28 Paul Thomas <pault@gcc.gnu.org>
861 * module.c (find_symbol): Do not return a result for a symbol
862 that has been renamed in another module.
864 2008-04-26 George Helffrich <george@gcc.gnu.org>
868 * trans-common.c (create_common): Add decl to function
869 chain (if inside one) to preserve identifier scope in debug output.
871 2008-04-25 Jan Hubicka <jh@suse.cz>
873 * trans-decl.c (trans_function_start): Update.
875 2008-04-25 Tobias Burnus <burnus@net-b.de>
876 Daniel Franke <franke.daniel@gmail.com>
879 * gfortranspec.c (lang_specific_driver): Deprecate
880 -M option; fix ICE when "-M" is last argument and
882 * options.c (gfc_handle_module_path_options):
883 Use -J instead of -M in error messages.
884 * invoke.texi: Mark -M as depecated.
886 2008-04-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
887 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
890 * trans-instrinsic.c (gfc_conv_intrinsic_minmaxloc): Correctly adjust
893 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
895 * trans-expr.c (gfc_conv_structure): Don't set TREE_INVARIANT.
896 * trans-array.c (gfc_build_null_descriptor): Don't set TREE_INVARIANT.
897 (gfc_trans_array_constructor_value): Don't set TREE_INVARIANT.
898 (gfc_build_constant_array_constructor): Don't set TREE_INVARIANT.
899 (gfc_conv_array_initializer): Don't set TREE_INVARIANT.
900 * trans-common.c (get_init_field): Don't set TREE_INVARIANT.
901 (create_common): Don't set TREE_INVARIANT.
902 * trans-stmt.c (gfc_trans_character_select): Don't set TREE_INVARIANT.
903 * trans-decl.c (gfc_generate_function_code): Don't set TREE_INVARIANT.
905 2008-04-21 Steve Ellcey <sje@cup.hp.com>
907 * f95-lang.c (gfc_init_decl_processing): use ptr_mode instead of Pmode.
909 2008-04-21 Daniel Franke <franke.daniel@gmail.com>
912 * gfortranspec.c (lookup_option): Properly handle separated arguments
913 in -J option, print missing argument message when necessary.
915 2008-04-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>
918 * scanner.c (skip_fixed_comments): Update continue_line when comment is
919 detected. (gfc_next_char_literal): Likewise.
921 2008-04-19 Paul Thomas <pault@gcc.gnu.org>
926 * trans_array.c (gfc_trans_array_constructor): Temporarily
927 realign loop, if loop->from is not zero, before creating
928 the temporary array and provide an offset.
931 * trans-decl.c (gfc_init_default_dt): Add gfc_ prefix to name
932 and allow for NULL body. Change all references from
933 init_default_dt to gfc_init_default_dt.
934 * trans.h : Add prototype for gfc_init_default_dt.
935 * trans-array.c (gfc_trans_deferred_vars): After nullification
936 call gfc_init_default_dt for derived types with allocatable
939 2008-04-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
942 * trans-common.c (create_common): Revert patch causing regression.
944 2008-04-16 Jerry DeLisle <jvdelisle@gcc.gnu.org>
947 * iresolve.c (gfc_resolve_eoshift): Check for NULL symtree in test for
948 optional argument attribute.
950 2008-04-16 Paul Thomas <pault@gcc.gnu.org>
953 * trans-intrinsic.c (gfc_conv_intrinsic_char): Even though KIND
954 is not used, the argument must be converted.
956 2008-04-16 Jakub Jelinek <jakub@redhat.com>
959 * f95-lang.c (gfc_init_builtin_functions): Make sure
960 BUILT_IN_SINCOS{,F,L} types aren't varargs.
962 2008-04-15 Paul Thomas <pault@gcc.gnu.org>
965 * expr.c (scalarize_intrinsic_call): Reorder identification of
966 array argument so that if one is not found a segfault does not
967 occur. Return FAILURE if all scalar arguments.
969 2008-04-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
970 Tobias Burnus <burnus@net-b.de>
973 * options.c (gfc_init_options): Set the default maximum continuation
974 lines to 255 for both free and fixed form source for warnings.
975 (gfc_handle_option): Set -std=f95 fixed form max continuations to 19 and
976 the -std=f95 free form max continuations to 39 for warnings.
977 * scanner.c (gfc_next_char_literal): Adjust the current_line number only
978 if it is less than the current locus.
980 2008-04-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
982 PR fortran/25829 28655
983 * io.c (io_tag): Add new tags for decimal, encoding, asynchronous,
984 round, sign, and id. (match_open_element): Match new tags.
985 (gfc_resolve_open): Resolve new tags. (gfc_match_open): Enable encoding
986 for DEFAULT only. Update error messages. (match_dt_element): Fix match
987 tag for asynchronous. Update error messages. (gfc_free_inquire): Free
988 new expressions. (match_inquire_element): Match new tags.
989 (gfc_match_inquire): Add constraint for ID and PENDING.
990 (gfc_resolve_inquire): Resolve new tags.
991 * trans-io.c (gfc_trans_inquire): Clean up whitespace and fix setting of
992 mask for ID parameter.
993 * ioparm.def: Fix order of parameters for pending, round, and sign.
994 NOTE: These must line up with the definitions in libgfortran/io/io.h. or
997 2008-04-06 Paul Thomas <pault@gcc.gnu.org>
1000 * expr.c (scalarize_intrinsic_call): Identify which argument is
1001 an array and use that as the template.
1002 (check_init_expr): Remove tests that first argument is an array
1003 in the call to scalarize_intrinsic_call.
1005 2008-04-06 Tobias Schlüter <tobi@gcc.gnu.org>
1008 * io.c (io_tag): Add field 'value'. Split 'spec' field in
1010 (match_etag, match_vtag, match_ltag): Split parsing in two steps
1011 to give better error messages.
1013 2008-04-06 Tobias Burnus <burnus@net-b.de>
1015 * io.c (check_io_constraints): Add constrains. ID= requires
1016 asynchronous= and asynchronous= must be init expression.
1018 2008-04-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1020 * f95-lang.c: Set LANG_HOOKS_NAME to "GNU Fortran".
1022 2008-04-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1024 * dump-parse-tree.c: Use fprintf, fputs and fputc instead of
1025 gfc_status and gfc_status_char. Remove gfc_ prefix of the gfc_show_*
1026 functions and make them static. Add new gfc_dump_parse_tree
1028 * gfortran.h (gfc_option_t): Rename verbose into dump_parse_tree.
1029 (gfc_status, gfc_status_char): Delete prototypes.
1030 * error.c (gfc_status, gfc_status_char): Remove functions.
1031 * scanner.c (gfc_new_file): Use printf instead of gfc_status.
1032 * options.c (gfc_init_options): Rename verbose into dump_parse_tree.
1033 (gfc_handle_module_path_options): Use gfc_fatal_error instead of
1034 gfc_status and exit.
1035 (gfc_handle_option): Rename verbose into dump_parse_tree.
1036 * parse.c (gfc_parse_file): Use gfc_dump_parse_tree.
1038 2008-04-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1039 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1041 PR fortran/25829 28655
1042 * dump-parse-tree.c (gfc_show_code_node): Show new I/O parameters.
1043 * gfortran.h (gfc_statement): Add ST_WAIT enumerator.
1044 (gfc_open): Add pointers for decimal, encoding, round, sign,
1045 asynchronous. (gfc_inquire): Add pointers for asynchronous, decimal,
1046 encoding, pending, round, sign, size, id.
1047 (gfc_wait): New typedef struct. (gfc_dt): Add pointers for id, pos,
1048 asynchronous, blank, decimal, delim, pad, round, sign.
1049 (gfc_exec_op): Add EXEC_WAIT enumerator. (gfc_code): Add pointer for
1050 wait. (gfc_free_wait), (gfc_resolve_wait): New function prototypes.
1051 * trans-stmt.h (gfc_trans_wait): New function prototype.
1052 * trans.c (gfc_trans_code): Add case for EXEC_WAIT.
1053 * io.c (io_tag): Add new tags for DECIMAL, ENCODING, ROUND, SIGN,
1054 ASYCHRONOUS, ID. (match_open_element): Add matchers for new tags.
1055 (gfc_free_open): Free new pointers. (gfc_resolve_open): Resolve new
1056 tags. (gfc_resolve_open): Remove comment around check for allowed
1057 values and ASYNCHRONOUS, update it. Likewise for DECIMAL, ENCODING,
1058 ROUND, and SIGN. (match_dt_element): Add matching for new tags.
1059 (gfc_free_wait): New function. (gfc_resolve_wait): New function.
1060 (match_wait_element): New function. (gfc_match_wait): New function.
1061 * resolve.c (gfc_resolve_blocks): Add case for EXEC_WAIT.
1062 (resolve_code): Add case for EXEC_WAIT.
1063 * st.c (gfc_free_statement): Add case for EXEC_WAIT.
1064 * trans-io.c (ioparam_type): Add IOPARM_ptype_wait. (gfc_st_parameter):
1065 Add "wait" entry. (iocall): Add IOCALL_WAIT enumerator.
1066 (gfc_build_io_library_fndecls): Add function declaration for st_wait.
1067 (gfc_trans_open): Add mask bits for new I/O tags.
1068 (gfc_trans_inquire): Add mask bits for new I/O tags.
1069 (gfc_trans_wait): New translation function.
1070 (build_dt): Add mask bits for new I/O tags.
1071 * match.c (gfc_match_if) Add matcher for "wait".
1072 * match.h (gfc_match_wait): Prototype for new function.
1073 * ioparm.def: Add new I/O parameter definitions.
1074 * parse.c (decode_statement): Add match for "wait" statement.
1075 (next_statement): Add case for ST_WAIT. (gfc_ascii_statement): Same.
1077 2008-04-03 Jakub Jelinek <jakub@redhat.com>
1080 * openmp.c (resolve_omp_clauses): Diagnose if a clause symbol
1083 2008-04-03 Tom Tromey <tromey@redhat.com>
1085 * Make-lang.in (fortran_OBJS): New variable.
1087 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
1089 * f95-lang.c (insert_block): Kill.
1091 2008-04-01 George Helffrich <george@gcc.gnu.org>
1093 PR fortran/35154, fortran/23057
1094 * trans-common.c (create_common): Add decl to function
1095 chain to preserve identifier scope in debug output.
1097 2008-04-01 Joseph Myers <joseph@codesourcery.com>
1099 * gfortran.texi: Include gpl_v3.texi instead of gpl.texi
1100 * Make-lang.in (GFORTRAN_TEXI): Include gpl_v3.texi instead of
1103 2008-03-30 Paul Thomas <pault@gcc.gnu.org>
1106 * resolve.c (resolve_function, resolve_call): If the procedure
1107 is elemental do not look for noncopying intrinsics.
1109 2008-03-29 Paul Thomas <pault@gcc.gnu.org>
1112 * trans-array.c (gfc_array_init_size): Set 'size' zero if
1113 negative in one dimension.
1116 * trans-expr.c (gfc_trans_string_copy): Only assign a char
1117 directly if the lhs and rhs types are the same.
1119 2008-03-28 Daniel Franke <franke.daniel@gmail.com>
1120 Paul Richard Thomas <paul.richard.thomas@gmail.com>
1123 * primary.c (match_variable): Improved matching of function
1125 * resolve.c (resolve_allocate_deallocate): Removed checks if
1126 the actual argument for STAT is a variable.
1128 2008-03-28 Tobias Burnus <burnus@net-b.de>
1130 * symbol.c (gfc_get_default_type): Fix error message; option
1131 -fallow_leading_underscore should be -fallow-leading-underscore
1133 2008-03-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1136 * iresolve.c (gfc_resolve_cshift): Check for NULL symtree in test for
1137 optional argument attribute.
1139 2008-03-27 Tom Tromey <tromey@redhat.com>
1141 * Make-lang.in: Revert automatic dependency patch.
1143 2008-03-25 Tom Tromey <tromey@redhat.com>
1145 * Make-lang.in: Remove .o targets.
1146 (fortran_OBJS): New variable.
1147 (fortran/gfortranspec.o): Move to fortran/. Reduce to variable
1149 (GFORTRAN_D_OBJS): Update.
1150 (GFORTRAN_TRANS_DEPS): Remove.
1152 2008-03-24 Paul Thomas <pault@gcc.gnu.org>
1155 * resolve.c (resolve_structure_cons): It is an error to assign
1156 NULL to anything other than a pointer or allocatable component.
1159 * resolve.c (resolve_symbol): If the symbol is a derived type,
1160 resolve the derived type. If the symbol is a derived type
1161 function, ensure that the derived type is visible in the same
1162 namespace as the function.
1164 2008-03-23 Tobias Schlüter <tobi@gcc.gnu.org>
1166 * trans.h: Use fold_build in build1_v, build2_v and build3_v
1168 * trans-openmp.c (gfc_trans_omp_critical, gfc_trans_omp_single):
1169 Don't use build2_v macro.
1171 2008-03-19 Daniel Franke <franke.daniel@gmail.com>
1174 * interface.c (gfc_procedure_use): Check for keyworded arguments in
1175 procedures without explicit interfaces.
1177 2008-03-16 Paul Thomas <pault@gcc.gnu.org>
1180 * resolve.c (check_assumed_size_reference): Only visit the
1181 first reference and look directly at the highest dimension.
1183 2008-03-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1186 * trans-array.c (gfc_conv_array_index_offset): Remove unnecessary
1189 2008-03-15 Daniel Franke <franke.daniel@gmail.com>
1192 * resolve.c (resolve_branch): Less strict and pessimistic warning
1195 2008-03-11 Paolo Bonzini <bonzini@gnu.org>
1197 * f95-lang.c (LANG_HOOKS_CLEAR_BINDING_STACK): Delete.
1198 (gfc_be_parse_file): Call clear_binding_stack from here.
1199 (gfc_clear_binding_stack): Rename to clear_binding_stack.
1201 2008-03-09 Paul Thomas <pault@gcc.gnu.org>
1204 * module.c (mio_symtree_ref): After providing a symbol for a
1205 missing equivalence member, resolve and NULL the fixups.
1207 2008-03-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1209 * invoke.texi (Error and Warning Options): Document
1212 2008-03-08 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1215 * trans-array.c (gfc_conv_ss_startstride): Fix the logic to avoid
1216 checking bounds of absent optional arguments.
1218 2008-03-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1221 * intrinsic.c (add_functions): Add simplification routines for
1222 ERF, DERF, ERFC and DERFC.
1223 * decl.c (gfc_match_suffix, gfc_match_subroutine): Change GNU
1224 extensions into Fortran 2008 features.
1225 * intrinsic.h (gfc_simplify_erf, gfc_simplify_erfc): New
1227 * simplify.c (gfc_simplify_erf, gfc_simplify_erfc): New functions.
1229 2008-03-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1232 * intrinsic.c (add_functions): Modify intrinsics ACOSH, ASINH,
1233 ATANH, ERF, ERFC and GAMMA. Add intrinsics BESSEL_{J,Y}{0,1,N},
1234 ERFC_SCALED, LOG_GAMMA and HYPOT.
1235 * intrinsic.h (gfc_check_hypot, gfc_simplify_hypot,
1236 gfc_resolve_hypot): New prototypes.
1237 * mathbuiltins.def: Add HYPOT builtin. Make complex versions of
1238 ACOSH, ASINH and ATANH available.
1239 * gfortran.h (GFC_ISYM_ERFC_SCALED, GFC_ISYM_HYPOT): New values.
1240 * lang.opt: Add -std=f2008 option.
1241 * libgfortran.h: Define GFC_STD_F2008.
1242 * lang-specs.h: Add .f08 and .F08 file suffixes.
1243 * iresolve.c (gfc_resolve_hypot): New function.
1244 * parse.c (parse_contained): Allow empty CONTAINS for Fortran 2008.
1245 * check.c (gfc_check_hypot): New function.
1246 * trans-intrinsic.c (gfc_intrinsic_map): Define ERFC_SCALE builtin.
1247 * options.c (set_default_std_flags): Allow Fortran 2008 by default.
1248 (form_from_filename): Add .f08 suffix.
1249 (gfc_handle_option): Handle -std=f2008 option.
1250 * simplify.c (gfc_simplify_hypot): New function.
1251 * gfortran.texi: Document Fortran 2008 status and file extensions.
1252 * intrinsic.texi: Document new BESSEL_{J,Y}{0,1,N} intrinsics,
1253 as well as HYPOT and ERFC_SCALED. Update documentation of ERF,
1254 ERFC, GAMMA, LGAMMA, ASINH, ACOSH and ATANH.
1255 * invoke.texi: Document the new -std=f2008 option.
1257 2008-03-02 Jakub Jelinek <jakub@redhat.com>
1259 * gfortranspec.c (lang_specific_driver): Update copyright notice
1262 2008-02-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1265 * expr.c (find_array_element): Modify traversing the constructor to
1266 avoid trying to access NULL memory pointed to by next for the
1267 last element. (find_array_section): Exit while loop if cons->next is
1269 * trans-expr.c (gfc_conv_scalar_char_value): Initialize gfc_typespec.
1270 (gfc_conv_function_call): Same.
1271 * decl.c (gfc_match_implicit): Same.
1272 * trans-intrinsic.c (gfc_conv_intrinsic_sr_kind): Same.
1274 2008-02-28 Daniel Franke <franke.daniel@gmail.com>
1279 * lang.opt: Added -Wreturn-type.
1280 * options.c (gfc_handle_option): Recognize -Wreturn-type.
1281 * trans-decl.c (gfc_trans_deferred_vars): Emit warnings for funtions
1282 where the result value is not set.
1283 (gfc_generate_function_code): Likewise.
1284 (generate_local_decl): Emit warnings for funtions whose RESULT
1285 variable is not set.
1287 2008-02-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1290 * trans-expr.c (gfc_conv_variable): Don't build indirect
1291 references when explicit interface is mandated.
1292 * resolve.c (resolve_formal_arglist): Set attr.always_explicit
1293 on the result symbol as well as the procedure symbol.
1295 2008-02-27 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1298 * trans.h: Remove prototypes for gfor_fndecl_math_exponent4,
1299 gfor_fndecl_math_exponent8, gfor_fndecl_math_exponent10 and
1300 gfor_fndecl_math_exponent16.
1301 * f95-lang.c (build_builtin_fntypes): Add new function types.
1302 (gfc_init_builtin_functions): Add new builtins for nextafter,
1303 frexp, ldexp, fabs, scalbn and inf.
1304 * iresolve.c (gfc_resolve_rrspacing): Don't add hidden arguments.
1305 (gfc_resolve_scale): Don't convert type of second argument.
1306 (gfc_resolve_set_exponent): Likewise.
1307 (gfc_resolve_size): Don't add hidden arguments.
1308 * trans-decl.c: Remove gfor_fndecl_math_exponent4,
1309 gfor_fndecl_math_exponent8, gfor_fndecl_math_exponent10 and
1310 gfor_fndecl_math_exponent16.
1311 * trans-intrinsic.c (gfc_intrinsic_map): Remove intrinsics
1312 for scalbn, fraction, nearest, rrspacing, set_exponent and
1314 (gfc_conv_intrinsic_exponent): Directly call frexp.
1315 (gfc_conv_intrinsic_fraction, gfc_conv_intrinsic_nearest,
1316 gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_rrspacing,
1317 gfc_conv_intrinsic_scale, gfc_conv_intrinsic_set_exponent): New
1319 (gfc_conv_intrinsic_function): Use the new functions above.
1321 2008-02-26 Tobias Burnus <burnus@net-b.de>
1324 * interface.c (check_operator_interface): Show better line for error
1325 messages; fix constrains for user-defined assignment operators.
1326 (gfc_extend_assign): Fix constrains for user-defined assignment
1329 2008-02-26 Tom Tromey <tromey@redhat.com>
1331 * trans-io.c (set_error_locus): Remove old location code.
1332 * trans-decl.c (gfc_set_decl_location): Remove old location code.
1333 * f95-lang.c (gfc_init): Remove test of USE_MAPPED_LOCATION.
1334 * scanner.c (gfc_gobble_whitespace): Remove old location code.
1335 (get_file): Likewise.
1336 (preprocessor_line): Likewise.
1337 (load_file): Likewise.
1338 (gfc_new_file): Likewise.
1339 * trans.c (gfc_trans_runtime_check): Remove old location code.
1340 (gfc_get_backend_locus): Likewise.
1341 (gfc_set_backend_locus): Likewise.
1342 * data.c (gfc_assign_data_value): Remove old location code.
1343 * error.c (show_locus): Remove old location code.
1344 * gfortran.h (gfc_linebuf): Remove old location code.
1345 (gfc_linebuf_linenum): Remove old-location variant.
1347 2008-02-25 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1350 * trans-const.c (gfc_build_string_const): Don't call gettext.
1351 (gfc_build_localized_string_const): New function.
1352 * trans-const.h (gfc_build_localized_string_const): New prototype.
1353 * trans.c (gfc_trans_runtime_check): Use
1354 gfc_build_localized_string_const instead of gfc_build_string_const.
1355 (gfc_call_malloc): Likewise.
1356 (gfc_allocate_with_status): Likewise.
1357 (gfc_allocate_array_with_status): Likewise.
1358 (gfc_deallocate_with_status): Likewise.
1359 (gfc_call_realloc): Likewise.
1360 * trans-io.c (gfc_trans_io_runtime_check): Likewise.
1362 2008-02-24 Tobias Schlüter <tobi@gcc.gnu.org>
1364 * arith.c: Update copyright years.
1365 * arith.h: Likewise.
1366 * array.c: Likewise.
1368 * check.c: Likewise.
1372 * dependency.c: Likewise.
1373 * dependency.h: Likewise.
1374 * dump-parse-tree.c: Likewise.
1375 * error.c: Likewise.
1377 * gfc-internals.texi: Likewise.
1378 * gfortran.h: Likewise.
1379 * gfortran.texi: Likewise.
1380 * gfortranspec.c: Likewise.
1381 * interface.c: Likewise.
1382 * intrinsic.c: Likewise.
1383 * intrinsic.h: Likewise.
1384 * intrinsic.texi: Likewise.
1385 * invoke.texi: Likewise.
1387 * iresolve.c: Likewise.
1388 * iso-c-binding.def: Likewise.
1389 * iso-fortran-env.def: Likewise.
1390 * lang-specs.h: Likewise.
1391 * lang.opt: Likewise.
1392 * libgfortran.h: Likewise.
1393 * match.c: Likewise.
1394 * match.h: Likewise.
1395 * matchexp.c: Likewise.
1397 * module.c: Likewise.
1398 * openmp.c: Likewise.
1399 * options.c: Likewise.
1400 * parse.c: Likewise.
1401 * parse.h: Likewise.
1402 * primary.c: Likewise.
1403 * resolve.c: Likewise.
1404 * scanner.c: Likewise.
1405 * simplify.c: Likewise.
1407 * symbol.c: Likewise.
1408 * target-memory.c: Likewise.
1409 * target-memory.h: Likewise.
1410 * trans-array.h: Likewise.
1411 * trans-const.h: Likewise.
1412 * trans-stmt.h: Likewise.
1413 * trans-types.c: Likewise.
1414 * trans-types.h: Likewise.
1415 * types.def: Likewise.
1417 2008-02-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1420 * simplify.c (gfc_simplify_ibclr), (gfc_simplify_ibits),
1421 (gfc_simplify_ibset): Remove call to range_check.
1422 (simplify_cmplx), (gfc_simplify_dble), (gfc_simplify_float)
1423 (gfc_simplify_real): Add call gfc_clear_ts to initialize the
1424 temporary gfc_typspec variable.
1426 2008-02-24 Tobias Schlüter <tobi@gcc.gnu.org>
1428 * trans-array.c (gfc_conv_descriptor_data_get,
1429 gfc_conv_descriptor_data_set_internal,
1430 gfc_conv_descriptor_data_addr, gfc_conv_descriptor_offset,
1431 gfc_conv_descriptor_dtype, gfc_conv_descriptor_dimension,
1432 gfc_conv_descriptor_stride, gfc_conv_descriptor_lbound,
1433 gfc_conv_descriptor_ubound, gfc_trans_create_temp_array,
1434 gfc_conv_array_transpose, gfc_grow_array,
1435 gfc_trans_array_constructor_subarray,
1436 gfc_trans_array_constructor_value, gfc_trans_scalarized_loop_end,
1437 gfc_array_init_size, gfc_array_allocate, gfc_array_deallocate,
1438 gfc_conv_array_initializer, gfc_trans_array_bounds,
1439 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
1440 gfc_get_dataptr_offset, gfc_conv_array_parameter,
1441 gfc_trans_dealloc_allocated, get_full_array_size,
1442 gfc_duplicate_allocatable, structure_alloc_comps): Use fold_buildN
1444 * trans-expr.c (gfc_conv_expr_present, gfc_conv_missing_dummy,
1445 gfc_conv_component_ref, gfc_conv_cst_int_power,
1446 gfc_conv_function_call, gfc_trans_structur_assign): Likewise.
1447 * trans-common.c (create_common): Likewise.
1448 * trans-openmp.c (gfc_trans_omp_atomic, gfc_trans_omp_do):
1450 * trans-const.c (gfc_conv_constant_to_tree): Likewise.
1451 * trans-stmt.c (gfc_trans_goto, gfc_trans_return, gfc_trans_do,
1452 gfc_trans_integer_select, gfc_trans_character_select,
1453 gfc_trans_forall_loop, compute_overall_iter_number,
1454 gfc_trans_forall_1, gfc_evaluate_where_mask, gfc_trans_allocate,
1455 gfc_trans_deallocate): Likewise.
1456 * trans.c (gfc_build_addr_expr, gfc_trans_runtime_check,
1457 gfc_allocate_with_status, gfc_allocate_array_with_status,
1458 gfc_deallocate_with_status): Likewise.
1459 * f95-lang.c (gfc_truthvalue_conversion): Likewise.
1460 * trans-io.c (set_parameter_const, set_parameter_value,
1461 set_parameter_ref, set_string, set_internal_unit, io_result,
1462 set_error_locus, nml_get_addr_expr, transfer_expr): Likewise.
1463 * trans-decl.c (gfc_build_qualified_array, build_entry_thunks,
1464 gfc_get_fake_result_decl, gfc_trans_auto_character_variable,
1465 gfc_generate_function_code): Likewise.
1466 * convert.c (convert): Likewise.
1467 * trans-intrinsic.c (gfc_conv_intrinsic_conversion,
1468 build_fixbound_expr, build_fix_expr, gfc_conv_intrinsic_aint,
1469 gfc_conv_intrinsic_int, gfc_conv_intrinsic_imagpart,
1470 gfc_conv_intrinsic_conjg, gfc_conv_intrinsic_abs,
1471 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_mod,
1472 gfc_conv_intrinsic_dim, gfc_conv_intrinsic_dprod,
1473 gfc_conv_intrinsic_ctime, gfc_conv_intrinsic_fdate,
1474 gfc_conv_intrinsic_ttynam, gfc_conv_intrinsic_minmax,
1475 gfc_conv_intrinsic_minmax_char, gfc_conv_intrinsic_count,
1476 gfc_conv_intrinsic_arith, gfc_conv_intrinsic_dot_product,
1477 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
1478 gfc_conv_intrinsic_btest, gfc_conv_intrinsic_not,
1479 gfc_conv_intrinsic_ibits, gfc_conv_intrinsic_ishft,
1480 gfc_conv_intrinsic_ichar, gfc_conv_intrinsic_size,
1481 gfc_conv_intrinsic_array_transfer, gfc_conv_intrinsic_transfer,
1482 gfc_conv_allocated, gfc_conv_associated, gfc_conv_intrinsic_trim,
1483 gfc_conv_intrinsic_repeat): Likewise.
1485 2008-02-23 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1488 * trans-expr.c (gfc_conv_power_op): Use BUILT_IN_CPOW{F,,L}.
1489 * f95-lang.c (gfc_init_builtin_functions): Define BUILT_IN_CPOW{F,,L}.
1490 * trans.h (gfor_fndecl_math_cpow, gfor_fndecl_math_cpowf,
1491 gfor_fndecl_math_cpowl10, gfor_fndecl_math_cpowl16): Remove.
1492 * trans-decl.c: Likewise.
1494 2008-02-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1497 * expr.c (find_array_element): Modify traversing the constructor to
1498 avoid trying to access NULL memory pointed to by next for the
1499 last element. (find_array_section): Exit while loop if cons->next is
1502 2008-02-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1505 * iresolve.c (resolve_mask_arg): Add gfc_clear_ts to initialize
1507 (gfc_resolve_aint): Likewise.
1508 (gfc_resolve_anint): Likewise.
1509 (gfc_resolve_besn): Likewise.
1510 (gfc_resolve_cshift): Likewise.
1511 (gfc_resolve_ctime): Likewise.
1512 (gfc_resolve_eoshift): Likewise.
1513 (gfc_resolve_index_func): Likewise.
1514 (gfc_resolve_isatty): Likewise.
1515 (gfc_resolve_malloc): Likewise.
1516 (gfc_resolve_rrspacing): Likewise.
1517 (gfc_resolve_scale): Likewise.
1518 (gfc_resolve_set_exponent): Likewise.
1519 (gfc_resolve_spacing): Likewise.
1520 (gfc_resolve_spacing): Likewise.
1521 (gfc_resolve_fgetc): Likewise.
1522 (gfc_resolve_fputc): Likewise.
1523 (gfc_resolve_ftell): Likewise.
1524 (gfc_resolve_ttynam): Likewise.
1525 (gfc_resolve_alarm_sub): Likewise.
1526 (gfc_resolve_mvbits): Likewise.
1527 (gfc_resolve_getarg): Likewise.
1528 (gfc_resolve_signal_sub): Likewise.
1529 (gfc_resolve_exit): Likewise.
1530 (gfc_resolve_flush): Likewise.
1531 (gfc_resolve_free): Likewise.
1532 (gfc_resolve_ctime_sub): Likewise.
1533 (gfc_resolve_fgetc_sub): Likewise.
1534 (gfc_resolve_fputc_sub): Likewise.
1535 (gfc_resolve_fseek_sub): Likewise.
1536 (gfc_resolve_ftell_sub): Likewise.
1537 (gfc_resolve_ttynam_sub): Likewise.
1539 2008-02-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1541 * gfc-internals.texi: Fix typos and markup nits.
1542 * gfortran.texi: Likewise.
1543 * intrinsic.texi: Likewise.
1545 2008-02-21 Richard Guenther <rguenther@suse.de>
1547 * trans-expr.c (gfc_conv_expr_op): Expand INTRINSIC_PARENTHESES
1548 as unary PAREN_EXPR for real and complex typed expressions.
1549 (gfc_conv_unary_op): Fold the built tree.
1551 2008-02-20 Tobias Burnus <burnus@net-b.de>
1554 * match.c (gfc_match_name): Improve error message for '$'.
1556 2008-02-19 Daniel Franke <franke.daniel@gmail.com>
1559 * expr.c (gfc_check_pointer_assign): Add type and kind information
1560 to type-mismatch message.
1561 (gfc_check_assign): Unify error messages.
1563 2008-02-16 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1566 * gfortran.texi: Create new section for unimplemented extensions.
1567 Add "STRUCTURE and RECORD" and "ENCODE and DECODE statements".
1568 Remove "smaller projects" list. Fix a few typos.
1570 2008-02-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1572 * intrinsic.texi: Rename INDEX node to avoid clashing with
1573 index.html on case-insensitive systems.
1575 2008-02-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1578 * trans-expr.c (gfc_conv_function_call): Force evaluation of
1581 2008-02-10 Daniel Franke <franke.daniel@gmail.com>
1584 * lang.opt: Allow '-J<dir>' next to '-J <dir>',
1585 likewise '-I <dir>' and '-I<dir>'.
1587 2008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1590 * Make-lang.in (f951): Add $(GMPLIBS).
1592 2008-02-05 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1595 * trans-common.c (build_field): Mark fields as volatile when needed.
1597 2008-02-05 Tobias Burnus <burnus@net-b.de>
1600 * data.c (gfc_assign_data_value): Only free "size" if
1601 it has not already been freed.
1603 2008-02-05 Paul Thomas <pault@gcc.gnu.org>
1606 * array.c (match_array_element_spec): Remove check for negative
1608 (gfc_resolve_array_spec): Add check for negative size.
1610 2008-02-05 Paul Thomas <pault@gcc.gnu.org>
1613 * data.c (gfc_assign_data_value): Add bounds check for array
1616 2008-02-04 Daniel Franke <franke.daniel@gmail.com>
1618 * resolve.c (resolve_where): Fix typo.
1619 (gfc_resolve_where_code_in_forall): Likewise.
1621 2008-02-03 Paul Thomas <pault@gcc.gnu.org>
1624 * resolve.c (resolve_allocate_deallocate): New function.
1625 (resolve_code): Call it for allocate and deallocate.
1626 * match.c (gfc_match_allocate, gfc_match_deallocate) : Remove
1627 the checking of the STAT tag and put in above new function.
1628 * primary,c (match_variable): Do not fix flavor of host
1629 associated symbols yet if the type is not known.
1631 2008-01-31 Paul Thomas <pault@gcc.gnu.org>
1634 * expr.c (gfc_check_assign): It is an error to assign
1635 to a sibling procedure.
1637 2008-01-30 Paul Thomas <pault@gcc.gnu.org>
1640 * symbol.c (gfc_delete_symtree, gfc_undo_symbols): Rename
1641 delete_symtree to gfc_delete_symtree.
1642 * gfortran.h : Add prototype for gfc_delete_symtree.
1643 * module.c (load_generic_interfaces): Transfer symbol to a
1644 unique symtree and delete old symtree, instead of renaming.
1645 (read_module): The rsym and the found symbol are the same, so
1646 the found symtree can be deleted.
1649 * decl.c (match_char_spec): Remove the constraint on deferred
1650 matching of functions and free the length expression.
1651 delete_symtree to gfc_delete_symtree.
1652 (gfc_match_type_spec): Whitespace.
1653 (gfc_match_function_decl): Defer characteristic association for
1654 all types except BT_UNKNOWN.
1655 * parse.c (decode_specification_statement): Only derived type
1656 function matching is delayed to the end of specification.
1658 2008-01-28 Tobias Burnus <burnus@net-b.de>
1661 * simplify.c (gfc_simplify_shape): Simplify rank zero arrays.
1663 2008-01-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1666 * array.c (gfc_check_constructor_type): Revert clearing the expression.
1668 2008-01-26 Tobias Burnus <burnus@net-b.de>
1671 * trans-expr.c (gfc_conv_function_call): Don't call
1672 gfc_add_interface_mapping if the expression is NULL.
1674 2008-01-26 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1677 * trans-array.c (gfc_trans_create_temp_array): Remove call to
1678 gcc_assert (integer_zerop (loop->from[n])).
1680 2008-01-25 Daniel Franke <franke.daniel@gmail.com>
1683 * resolve.c (resolve_where): Added check if user-defined assignment
1684 operator is an elemental subroutine.
1685 (gfc_resolve_where_code_in_forall): Likewise.
1687 2008-01-24 Daniel Franke <franke.daniel@gmail.com>
1691 * gfortran.h: Revert changes from 2008-01-17.
1692 * match.c: Likewise.
1693 * symbol.c: Likewise.
1694 (gfc_undo_symbols): Undo namespace changes related to common blocks.
1696 2008-01-24 Daniel Franke <franke.daniel@gmail.com>
1699 * data.c (formalize_structure_cons): Skip formalization on
1702 2008-01-24 Daniel Franke <franke.daniel@gmail.com>
1704 * gfortran.texi (OpenMP): Extended existing documentation.
1705 (contributors): Added major contributors of 2008 that were
1707 (proposed extensions): Removed implemented items.
1709 2008-01-24 Paul Thomas <pault@gcc.gnu.org>
1712 * parse.c (next_statement) : If ST_GET_FCN_CHARACTERISTICS is
1713 seen, check for a statement label and, if present, delete it
1714 and set the locus to the start of the statement.
1716 2008-01-22 Paul Thomas <pault@gcc.gnu.org>
1719 * trans-io.c (gfc_trans_transfer): If the array reference in a
1720 read has a vector subscript, use gfc_conv_subref_array_arg to
1721 copy back the temporary.
1723 2008-01-22 Tobias Burnus <burnus@net-b.de>
1726 * interface.c (compare_actual_formal): Fix adding type
1727 to missing_arg_type for absent optional arguments.
1729 2008-01-22 Tobias Burnus <burnus@net-b.de>
1732 * parse.c (parse_spec): Change = into ==.
1734 2008-01-22 Daniel Franke <franke.daniel@gmail.com>
1737 * expr.c (check_elemental): Fix check for valid data types.
1739 2008-01-22 Tobias Burnus <burnus@net-b.de>
1742 * scanner.c (load_line): Support <tab><digit> continuation lines.
1743 * invoke.texi (-Wtabs): Document this.
1745 2008-01-22 Paul Thomas <pault@gcc.gnu.org>
1748 * module.c (read_module): Set use_rename attribute.
1750 2007-01-21 Tobias Burnus <burnus@net-b.de>
1753 * interface.c (compare_parameter): Improved error message
1754 for arguments of same type and mismatched kinds.
1756 2008-01-20 Paul Thomas <pault@gcc.gnu.org>
1759 * resolve.c (resolve_entries): Do not do an array bounds check
1760 if the result symbols are the same.
1763 * module.c (read_module) : Hide the symtree of the previous
1764 version of the symbol if this symbol is renamed.
1766 2008-01-20 Paul Thomas <pault@gcc.gnu.org>
1769 * array.c (gfc_check_constructor_type): Clear the expression ts
1770 so that the checking starts from the deepest level of array
1772 * primary.c (match_varspec): If an unknown type is changed to
1773 default character and the attempt to match a substring fails,
1774 change it back to unknown.
1777 * trans-array.c (gfc_add_loop_ss_code) : If ss->string_length is
1778 NULL for an array constructor, use the cl.length expression to
1780 (gfc_conv_array_parameter): Change call to gfc_evaluate_now to
1783 2008-01-19 Thomas Koenig <tkoenig@gcc.gnu.org>
1787 * iresolve.c (gfc_resolve_all): Remove conversion of mask
1788 argument to kind=1 by removing call to resolve_mask_arg().
1789 (gfc_resolve_any): Likewise.
1791 2008-01-19 Tobias Burnus <burnus@net-b.de>
1794 * primary.c (match_variable): Handle FL_UNKNOWN without
1795 uneducated guessing.
1796 (match_variable): Improve error message.
1798 2008-01-18 Tobias Burnus <burnus@net-b.de>
1801 * interface.c (get_expr_storage_size): Return storage size
1802 for array element designators.
1803 (compare_actual_formal): Reject unequal string sizes for
1804 assumed-shape dummy arguments. And fix error message for
1805 array-sections with vector subscripts.
1807 2008-01-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1810 * simplify.c (is_constant_array_expr): New static function that returns
1811 true if the given expression is an array and is constant.
1812 (gfc_simplify_reshape): Use new function.
1814 2008-01-17 H.J. Lu <hongjiu.lu@intel.com>
1817 * symbol.c (free_common_tree): Renamed to ...
1818 (gfc_free_common_tree): This. Remove static.
1819 (gfc_free_namespace): Updated.
1821 * gfortran.h (gfc_free_common_tree): New.
1823 * match.c (gfc_match_common): Call gfc_free_common_tree () with
1824 gfc_current_ns->common_root and set gfc_current_ns->common_root
1825 to NULL on syntax error.
1827 2008-01-18 Richard Sandiford <rsandifo@nildram.co.uk>
1830 * trans-expr.c (gfc_conv_function_call): Use proper
1831 type for returned character pointers.
1833 2008-01-17 Paul Thomas <pault@gcc.gnu.org>
1838 * decl.c : Remove gfc_function_kind_locus and
1839 gfc_function_type_locus. Add gfc_matching_function.
1840 (match_char_length): If matching a function and the length
1841 does not match, return MATCH_YES and try again later.
1842 (gfc_match_kind_spec): The same.
1843 (match_char_kind): The same.
1844 (gfc_match_type_spec): The same for numeric and derived types.
1845 (match_prefix): Rename as gfc_match_prefix.
1846 (gfc_match_function_decl): Except for function valued character
1847 lengths, defer applying kind, type and charlen info until the
1848 end of specification block.
1849 gfortran.h (gfc_statement): Add ST_GET_FCN_CHARACTERISTICS.
1850 parse.c (decode_specification_statement): New function.
1851 (decode_statement): Call it when a function has kind = -1. Set
1852 and reset gfc_matching function, as function statement is being
1854 (match_deferred_characteristics): Simplify with a single call
1855 to gfc_match_prefix. Do appropriate error handling. In any
1856 case, make sure that kind = -1 is reset or corrected.
1857 (parse_spec): Call above on seeing ST_GET_FCN_CHARACTERISTICS.
1858 Throw an error if kind = -1 after last specification statement.
1859 parse.h : Prototype for gfc_match_prefix.
1861 2008-01-16 Tobias Burnus <burnus@net-b.de>
1864 * interface.c (compare_parameter): Allow AS_DEFERRED array
1865 elements and reject attr.pointer array elemenents.
1866 (get_expr_storage_size): Return storage size of elements of
1867 assumed-shape and pointer arrays.
1869 2008-01-15 Sebastian Pop <sebastian.pop@amd.com>
1871 * f95-lang.c (gfc_init_builtin_functions): Initialize GOMP builtins
1872 for flag_tree_parallelize_loops.
1874 2008-01-15 Thomas Koenig <tkoenig@gcc.gnu.org>
1877 * iresolve.c (gfc_resolve_all): Call resolve_mask_arg.
1878 (gfc_resolve_any): Likewise.
1879 (gfc_resolve_count): Likewise. Don't append kind of
1880 argument to function name.
1882 2008-01-13 Tobias Burnus <burnus@net-b.de>
1885 * resolve.c (resolve_actual_arglist): For expressions,
1886 also check for assume-sized arrays.
1887 * interface.c (compare_parameter): Move F2003 character checks
1888 here, print error messages here, reject elements of
1889 assumed-shape array as argument to dummy arrays.
1890 (compare_actual_formal): Update for the changes above.
1892 2008-01-13 Tobias Burnus <burnus@net-b.de>
1895 * decl.c (contained_procedure): Only check directly preceeding state.
1897 2008-01-13 Tobias Burnus <burnus@net-b.de>
1900 * check.c (gfc_check_shape): Accept array ranges of
1901 assumed-size arrays.
1903 2008-01-12 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1906 * match.c (gfc_match_name): Don't error if leading character is a '(',
1907 just return MATCH_NO.
1909 2008-01-11 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1912 * trans-io.c (create_dummy_iostat): Commit the symbol.
1914 2008-01-11 Paul Thomas <pault@gcc.gnu.org>
1917 * simplify.c (gfc_simplify_transfer): Return NULL if the size
1918 of the element is unavailable and only assign character length
1919 to the result, if 'mold' is constant.
1921 2008-01-10 Paul Thomas <pault@gcc.gnu.org>
1924 * trans-array.c (gfc_trans_array_ctor_element): Use gfc_trans_string_copy
1925 to assign strings and perform bounds checks on the string length.
1926 (get_array_ctor_strlen): Remove bounds checking.
1927 (gfc_trans_array_constructor): Initialize string length checking.
1928 * trans-array.h : Add prototype for gfc_trans_string_copy.
1930 2008-01-08 Richard Guenther <rguenther@suse.de>
1933 PR tree-optimization/34683
1934 * trans-types.c (gfc_get_array_type_bounds): Use an array type
1935 with known size for accesses if that is known.
1937 2008-01-08 Paul Thomas <pault@gcc.gnu.org>
1940 * expr.c (find_array_element): Check that the array bounds are
1941 constant before using them. Use lower, as well as upper bound.
1942 (check_restricted): Allow implied index variable.
1944 2008-01-08 Paul Thomas <pault@gcc.gnu.org>
1947 * trans_array.c (gfc_trans_deferred_array): Do not null the
1948 data pointer on entering scope, nor deallocate it on leaving
1949 scope, if the symbol has the 'save' attribute.
1952 * trans_decl.c (gfc_finish_var_decl): Derived types with
1953 allocatable components and an initializer must be TREE_STATIC.
1955 2008-01-07 Paul Thomas <pault@gcc.gnu.org>
1958 * module.c (write_generic): Rewrite completely.
1959 (write_module): Change call to write_generic.
1961 2008-01-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1964 * scanner.c (load_line): Do not count ' ' as printable when checking for
1967 2008-01-06 Paul Thomas <pault@gcc.gnu.org>
1970 * module.c (load_needed): If the namespace has no proc_name
1971 give it the module symbol.
1973 2008-01-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1976 * trans-expr.c (gfc_conv_missing_dummy): Use a temporary to type convert
1977 the dummy variable expression, test for NULL, and pass the variable
1978 address to the called function.
1980 2007-01-06 Tobias Burnus <burnus@net-b.de>
1983 * match.c (gfc_match_common): Remove blank common in
1985 * resolve.c (resolve_common_vars): New function.
1986 (resolve_common_blocks): Move checks to resolve_common_vars
1987 and invoke that function.
1988 (resolve_types): Call resolve_common_vars for blank commons.
1990 2008-01-06 Tobias Burnus <burnus@net-b.de>
1993 * resolve.c (resolve_equivalence_derived): Reject derived types with
1994 default initialization if equivalenced with COMMON variable.
1996 2008-01-06 Tobias Burnus <burnus@net-b.de>
1999 * io.c (check_io_constraints): Disallow unformatted I/O for
2002 2008-01-06 Tobias Burnus <burnus@net-b.de>
2005 * resolve.c (resolve_formal_arglist): Reject dummy procedure in
2006 ELEMENTAL functions.
2008 2008-01-06 Tobias Burnus <burnus@net-b.de>
2011 * interface.c (compare_actual_formal): Reject parameter
2012 actual to intent(out) dummy.
2014 2008-01-04 Tobias Burnus <burnus@net-b.de>
2017 * primary.c (match_varspec): Gobble whitespace before