1 2008-06-13 Tobias Burnus <burnus@net-b.de>
4 * decl.c (do_parm): Handle init expression for len=*.
6 2008-06-12 Tobias Burnus <burnus@net-b.de>
9 * trans-intrinsic.c (gfc_conv_intrinsic_index_scan_verify):
10 Fix passing of the BACK= argument.
12 2008-06-10 Jerry DeLisle <jvdelisle@gcc.gnu.org>
14 * cpp.c: Add copyright notice.
15 * cpp.h: Add copyright notice.
17 2008-06-08 Janus Weil <janus@gcc.gnu.org>
20 * decl.c (match_procedure_decl): Correctly recognize if the interface
21 is an intrinsic procedure.
23 2008-06-08 Tobias Burnus <burnus@net-b.de>
26 * resolve.c (resolve_symbol): Copy more attributes for
27 PROCEDUREs with interfaces.
29 2008-06-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
33 * io.c (check_format): Add new error message for zero width.
34 Use new error message for FMT_A and with READ, FMT_G. Allow
35 FMT_G with WRITE except when -std=F95 and -std=F2003.
37 2008-06-07 Tobias Burnus <burnus@net-b.de>
40 * intrinsic.c (add_functions): Implement c_sizeof.
41 * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): Do not
42 create unneeded variable in the scalar case.
43 * intrinsic.texi: Add C_SIZEOF documentation.
45 2008-06-06 Tobias Burnus <burnus@net-b.de>
47 * intrinsic.texi (BESSEL_J1): Fix BES(S)EL_J1 typo.
49 2008-06-06 Jakub Jelinek <jakub@redhat.com>
51 * scanner.c (skip_free_comments, skip_fixed_comments): Handle tabs.
52 * parse.c (next_free): Allow tab after !$omp.
53 (decode_omp_directive): Handle !$omp task, !$omp taskwait
55 (case_executable): Add ST_OMP_TASKWAIT.
56 (case_exec_markers): Add ST_OMP_TASK.
57 (gfc_ascii_statement): Handle ST_OMP_TASK, ST_OMP_END_TASK and
59 (parse_omp_structured_block, parse_executable): Handle ST_OMP_TASK.
60 * gfortran.h (gfc_find_sym_in_expr): New prototype.
61 (gfc_statement): Add ST_OMP_TASK, ST_OMP_END_TASK and ST_OMP_TASKWAIT.
62 (gfc_omp_clauses): Add OMP_SCHED_AUTO to sched_kind,
63 OMP_DEFAULT_FIRSTPRIVATE to default_sharing. Add collapse and
65 (gfc_exec_op): Add EXEC_OMP_TASK and EXEC_OMP_TASKWAIT.
66 * f95-lang.c (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
67 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP, LANG_HOOKS_OMP_CLAUSE_DTOR,
68 LANG_HOOKS_OMP_PRIVATE_OUTER_REF): Define.
69 * trans.h (gfc_omp_clause_default_ctor): Add another argument.
70 (gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op,
71 gfc_omp_clause_dtor, gfc_omp_private_outer_ref): New prototypes.
72 * types.def (BT_ULONGLONG, BT_PTR_ULONGLONG,
73 BT_FN_BOOL_ULONGLONGPTR_ULONGLONGPTR,
74 BT_FN_BOOL_BOOL_ULL_ULL_ULL_ULLPTR_ULLPTR,
75 BT_FN_BOOL_BOOL_ULL_ULL_ULL_ULL_ULLPTR_ULLPTR,
76 BT_FN_VOID_PTR_PTR, BT_PTR_FN_VOID_PTR_PTR,
77 BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT): New.
78 (BT_BOOL): Use integer type with BOOL_TYPE_SIZE rather
79 than boolean_type_node.
80 * dump-parse-tree.c (gfc_show_omp_node): Handle EXEC_OMP_TASK,
81 EXEC_OMP_TASKWAIT, OMP_SCHED_AUTO, OMP_DEFAULT_FIRSTPRIVATE,
82 untied and collapse clauses.
83 (gfc_show_code_node): Handle EXEC_OMP_TASK and EXEC_OMP_TASKWAIT.
84 * trans.c (gfc_trans_code): Handle EXEC_OMP_TASK and
86 * st.c (gfc_free_statement): Likewise.
87 * resolve.c (gfc_resolve_blocks, resolve_code): Likewise.
88 (find_sym_in_expr): Rename to...
89 (gfc_find_sym_in_expr): ... this. No longer static.
90 (resolve_allocate_expr, resolve_ordinary_assign): Adjust caller.
91 * match.h (gfc_match_omp_task, gfc_match_omp_taskwait): New
93 * openmp.c (resolve_omp_clauses): Allow allocatable arrays in
94 firstprivate, lastprivate, reduction, copyprivate and copyin
96 (omp_current_do_code): Made static.
97 (omp_current_do_collapse): New variable.
98 (gfc_resolve_omp_do_blocks): Compute omp_current_do_collapse,
99 clear omp_current_do_code and omp_current_do_collapse on return.
100 (gfc_resolve_do_iterator): Handle collapsed do loops.
101 (resolve_omp_do): Likewise, diagnose errorneous collapsed do loops.
102 (OMP_CLAUSE_COLLAPSE, OMP_CLAUSE_UNTIED): Define.
103 (gfc_match_omp_clauses): Handle default (firstprivate),
104 schedule (auto), untied and collapse (n) clauses.
105 (OMP_DO_CLAUSES): Add OMP_CLAUSE_COLLAPSE.
106 (OMP_TASK_CLAUSES): Define.
107 (gfc_match_omp_task, gfc_match_omp_taskwait): New functions.
108 * trans-openmp.c (gfc_omp_private_outer_ref): New function.
109 (gfc_omp_clause_default_ctor): Add outer argument. For allocatable
110 arrays allocate them with the bounds of the outer var if outer
112 (gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op,
113 gfc_omp_clause_dtor): New functions.
114 (gfc_trans_omp_array_reduction): If decl is allocatable array,
115 allocate it with outer var's bounds in OMP_CLAUSE_REDUCTION_INIT
116 and deallocate it in OMP_CLAUSE_REDUCTION_MERGE.
117 (gfc_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
118 for assumed-size arrays.
119 (gfc_trans_omp_do): Add par_clauses argument. If dovar is
120 present in lastprivate clause and do loop isn't simple,
121 set OMP_CLAUSE_LASTPRIVATE_STMT. If dovar is present in
122 parallel's lastprivate clause, change it to shared and add
123 lastprivate clause to OMP_FOR_CLAUSES. Handle collapsed do loops.
124 (gfc_trans_omp_directive): Adjust gfc_trans_omp_do callers.
125 (gfc_trans_omp_parallel_do): Likewise. Move collapse clause to
126 OMP_FOR from OMP_PARALLEL.
127 (gfc_trans_omp_clauses): Handle OMP_SCHED_AUTO,
128 OMP_DEFAULT_FIRSTPRIVATE, untied and collapse clauses.
129 (gfc_trans_omp_task, gfc_trans_omp_taskwait): New functions.
130 (gfc_trans_omp_directive): Handle EXEC_OMP_TASK and
133 2008-06-04 Janus Weil <janus@gcc.gnu.org>
137 * resolve.c (resolve_symbol): Correctly copy the interface for a
138 PROCEDURE declaration.
140 2008-06-02 Janus Weil <janus@gcc.gnu.org>
143 * symbol.c (gfc_add_allocatable,gfc_add_dimension,
144 gfc_add_explicit_interface): Added checks.
145 * decl.c (attr_decl1): Added missing "var_locus".
146 * parse.c (parse_interface): Checking for errors.
148 2008-06-02 Daniel Kraft <d@domob.eu>
150 * gfortran.h: New statement-type ST_FINAL for FINAL declarations.
151 (struct gfc_symbol): New member f2k_derived.
152 (struct gfc_namespace): New member finalizers, for use in the above
153 mentioned f2k_derived namespace.
154 (struct gfc_finalizer): New type defined for finalizers linked list.
155 * match.h (gfc_match_final_decl): New function header.
156 * decl.c (gfc_match_derived_decl): Create f2k_derived namespace on
157 constructed symbol node.
158 (gfc_match_final_decl): New function to match a FINAL declaration line.
159 * parse.c (decode_statement): match-call for keyword FINAL.
160 (parse_derived): Parse CONTAINS section and accept FINAL statements.
161 * resolve.c (gfc_resolve_finalizers): New function to resolve (that is
162 in this case, check) a list of finalizer procedures.
163 (resolve_fl_derived): Call gfc_resolve_finalizers here.
164 * symbol.c (gfc_get_namespace): Initialize new finalizers to NULL.
165 (gfc_free_namespace): Free finalizers list.
166 (gfc_new_symbol): Initialize new f2k_derived to NULL.
167 (gfc_free_symbol): Free f2k_derived namespace.
168 (gfc_free_finalizer): New function to free a single gfc_finalizer node.
169 (gfc_free_finalizer_list): New function to free a linked list of
172 2008-06-02 Daniel Franke <franke.daniel@gmail.com>
176 * cpp.c (gfc_cpp_init): Do not initialize builtins if
177 processing already preprocessed input.
178 (gfc_cpp_preprocess): Finalize output with newline.
180 2008-05-31 Jerry DeLisle <jvdelisle@gcc.gnu.org>
182 * intrinsic.texi: Revert wrong commit.
184 2008-05-31 Steven G. Kargl <kargls@comcast.net>
186 * arith.c (gfc_arith_init_1): Remove now unused r and c variables.
187 Cleanup numerical inquiry function initialization.
188 (gfc_arith_done_1): Replace multiple mpfr_clear() invocations with
189 a single mpfr_clears().
190 (gfc_check_real_range): Re-arrange logic to eliminate multiple
191 unnecessary branching and assignments.
192 (gfc_arith_times): Use mpfr_clears() in preference to multiple
194 (gfc_arith_divide): Ditto.
195 (complex_reciprocal): Eliminate now unused variables a, re, im.
196 Cleanup the mpfr abuse. Use mpfr_clears() in preference to
197 multiple mpfr_clear().
198 (complex_pow): Fix comment whitespace. Use mpfr_clears() in
199 preference to multiple mpfr_clear().
200 * simplify.c (gfc_simplify_and): Remove blank line.
201 (gfc_simplify_atan2): Move error checking earlier to eliminate
202 a now unnecessay gfc_free_expr().
203 (gfc_simplify_bessel_j0): Remove unnecessary gfc_set_model_kind().
204 (gfc_simplify_bessel_j1): Ditto.
205 (gfc_simplify_bessel_jn): Ditto.
206 (gfc_simplify_bessel_y0): Ditto.
207 (gfc_simplify_bessel_y1): Ditto.
208 (gfc_simplify_bessel_yn): Ditto.
209 (only_convert_cmplx_boz): Eliminate unnecessary duplicate code, and
210 combine nested if statement rational expressions.
211 (gfc_simplify_cos): Use mpfr_clears() in preference to multiple
213 (gfc_simplify_exp): Ditto.
214 (gfc_simplify_fraction): Move gfc_set_model_kind() to after the
215 special case of 0. Use mpfr_clears() in preference to multiple
217 (gfc_simplify_gamma): Eliminate unnecessary gfc_set_model_kind().
218 (gfc_simplify_lgamma): Ditto.
219 (gfc_simplify_log10): Ditto.
220 (gfc_simplify_log): Move gfc_set_model_kind () inside switch
221 statement. Use mpfr_clears() in preference to multiple mpfr_clear().
222 (gfc_simplify_mod): Eliminate now unused variables quot, iquot,
223 and term. Simplify the mpfr magic.
224 (gfc_simplify_modulo): Ditto.
225 (gfc_simplify_nearest): Eliminate unnecessary gfc_set_model_kind().
226 (gfc_simplify_scale): Use mpfr_clears() in preference to multiple
228 (gfc_simplify_sin): Ditto
229 (gfc_simplify_sqrt): Ditto
230 (gfc_simplify_set_exponent): Move gfc_set_model_kind() to after the
231 special case of 0. Use mpfr_clears() in preference to multiple
234 2008-05-29 Daniel Franke <franke.daniel@gmail.com>
237 * Make-lang.in (F95_OBJS): Added dependency on FORTRAN_TARGET_OBJS.
239 2008-05-29 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
241 * scanner.c (load_line): Add first_char argument. Don't call ungetc.
242 (gfc_read_orig_filename): Adjust call to load_line. Don't call
244 (load_file): Adjust call to load_line.
246 2008-05-28 Janus Weil <janus@gcc.gnu.org>
250 * interface.c (gfc_procedure_use): Enable argument checking for
251 external procedures with explicit interface.
252 * symbol.c (check_conflict): Fix conflict checking for externals.
253 (copy_formal_args): Fix handling of arrays.
254 * resolve.c (resolve_specific_f0, resolve_specific_s0): Fix handling
256 * parse.c (parse_interface): Non-abstract INTERFACE statement implies
259 2008-05-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
262 * intrinsic.c (gfc_convert_chartype): Don't mark conversion
264 * trans-array.c (gfc_trans_array_ctor_element): Divide element
265 size by the size of one character to obtain length.
266 * iresolve.c (gfc_resolve_cshift): Call the _char4 variant when
268 (gfc_resolve_eoshift): Likewise.
269 * trans-intrinsic.c (gfc_conv_intrinsic_ctime): Minor beautification.
270 (gfc_conv_intrinsic_fdate): Minor beautification.
271 (gfc_conv_intrinsic_ttynam): Minor beautification.
272 (gfc_conv_intrinsic_minmax_char): Allow all character kinds.
273 (size_of_string_in_bytes): New function.
274 (gfc_conv_intrinsic_size): Call size_of_string_in_bytes for
275 character expressions.
276 (gfc_conv_intrinsic_sizeof): Likewise.
277 (gfc_conv_intrinsic_array_transfer): Likewise.
278 (gfc_conv_intrinsic_trim): Allow all character kinds. Minor
280 (gfc_conv_intrinsic_repeat): Fix comment typo.
281 * simplify.c (gfc_convert_char_constant): Take care of conversion
282 of array constructors.
284 2008-05-27 Tobias Burnus <burnus@net-b.de>
287 * trans-array.c (gfc_set_loop_bounds_from_array_spec):
288 Add missing fold_convert.
290 2008-05-26 Daniel Franke <franke.daniel@gmail.com>
292 * fortran/cpp.c (cpp_define_builtins): Remove usage of TARGET_* macros,
295 2008-05-26 Daniel Franke <franke.daniel@gmail.com>
298 * lang.opt (A, C, CC, D, E, H, P, U, cpp, d, fworking-directory,
299 imultilib, iprefix, iquote, isysroot, isystem, nocpp, nostdinc,
300 o, undef, v): New options.
301 * options.c (gfc_init_options): Also initialize preprocessor
303 (gfc_post_options): Also handle post-initialization of preprocessor
305 (gfc_handle_option): Check if option is a preprocessor option.
306 If yes, let gfc_cpp_handle_option() handle the option.
307 * lang-specs.h: Reorganized to handle new options.
308 * scanner.c (gfc_new_file): Read temporary file instead of
309 input source if preprocessing is enabled.
310 * f95-lang.c (gfc_init): Initialize preprocessor.
311 (gfc_finish): Clean up preprocessor.
314 * Make-lang.in: Added new objects and dependencies.
315 * gfortran.texi: Updated section "Preprocessing and
316 conditional compilation".
317 * invoke.texi: Added new section "Preprocessing Options",
318 listed and documented the preprocessing options handled
321 2008-05-25 Tobias Burnus <burnus@net-b.de>
324 * trans-expr.c (gfc_conv_function_call): Remove library
325 call for c_f_pointer with scalar Fortran pointers and for
328 2008-05-21 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
331 * iresolve.c (check_charlen_present): Don't force the rank to 1.
333 2008-05-19 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
336 * trans-expr.c (gfc_conv_string_tmp): Pick the correct type for
337 the temporary variable.
339 2008-05-19 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
341 * simplify.c (gfc_simplify_dble, gfc_simplify_real): Initialize
342 result variable to avoid warnings.
344 2008-05-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
346 * intrinsic.c (char_conversions, ncharconv): New static variables.
347 (find_char_conv): New function.
348 (add_functions): Add simplification functions for ADJUSTL and
349 ADJUSTR. Don't check the kind of their argument. Add checking for
350 LGE, LLE, LGT and LLT.
351 (add_subroutines): Fix argument type for SLEEP. Fix argument name
353 (add_char_conversions): New function.
354 (gfc_intrinsic_init_1): Call add_char_conversions.
355 (gfc_intrinsic_done_1): Free char_conversions.
356 (check_arglist): Use kind == 0 as a signal that we don't want
357 the kind value to be checked.
358 (do_simplify): Also simplify character functions.
359 (gfc_convert_chartype): New function
360 * trans-array.c (gfc_trans_array_ctor_element): Don't force the
361 use of default character type.
362 (gfc_trans_array_constructor_value): Likewise.
363 (get_array_ctor_var_strlen): Use integer kind to build an integer
364 instead of a character kind!
365 (gfc_build_constant_array_constructor): Don't force the use of
366 default character type.
367 (gfc_conv_loop_setup): Likewise.
368 * trans-expr.c (gfc_conv_string_tmp): Don't force the use of
369 default character type. Allocate enough memory for wide strings.
370 (gfc_conv_concat_op): Make sure operand kind are the same.
371 (string_to_single_character): Remove gfc_ prefix. Reindent.
372 Don't force the use of default character type.
373 (gfc_conv_scalar_char_value): Likewise.
374 (gfc_build_compare_string): Call string_to_single_character.
375 (fill_with_spaces): New function
376 (gfc_trans_string_copy): Add kind arguments. Use them to deal
377 with wide character kinds.
378 (gfc_conv_statement_function): Whitespace fix. Call
379 gfc_trans_string_copy with new kind arguments.
380 (gfc_conv_substring_expr): Call gfc_build_wide_string_const
381 instead of using gfc_widechar_to_char.
382 (gfc_conv_string_parameter): Don't force the use of default
384 (gfc_trans_scalar_assign): Pass kind args to gfc_trans_string_copy.
385 * intrinsic.h (gfc_check_lge_lgt_lle_llt, gfc_convert_char_constant,
386 gfc_resolve_adjustl, gfc_resolve_adjustr): New prototypes.
387 * decl.c (gfc_set_constant_character_len): Don't assert the
388 existence of a single character kind.
389 * trans-array.h (gfc_trans_string_copy): New prototype.
390 * gfortran.h (gfc_check_character_range, gfc_convert_chartype):
392 * error.c (print_wide_char_into_buffer): New function lifting
393 code from gfc_print_wide_char. Fix order to output '\x??' instead
395 (gfc_print_wide_char): Call print_wide_char_into_buffer.
396 (show_locus): Call print_wide_char_into_buffer with buffer local
398 * trans-const.c (gfc_build_wide_string_const): New function.
399 (gfc_conv_string_init): Deal with wide characters strings
401 (gfc_conv_constant_to_tree): Call gfc_build_wide_string_const.
402 * trans-stmt.c (gfc_trans_label_assign): Likewise.
403 (gfc_trans_character_select): Deal with wide strings.
404 * expr.c (gfc_check_assign): Allow conversion between character
406 * trans-const.h (gfc_build_wide_string_const): New prototype.
407 * trans-types.c (gfc_get_character_type_len_for_eltype,
408 gfc_get_character_type_len): Create too variants of the old
409 gfc_get_character_type_len, one getting kind argument and the
410 other one directly taking a type tree.
411 * trans.h (gfor_fndecl_select_string_char4,
412 gfor_fndecl_convert_char1_to_char4,
413 gfor_fndecl_convert_char4_to_char1): New prototypes.
414 * trans-types.h (gfc_get_character_type_len_for_eltype): New
416 * resolve.c (resolve_operator): Exit early when kind mismatches
417 are detected, because that makes us issue an error message later.
418 (validate_case_label_expr): Fix wording of error message.
419 * iresolve.c (gfc_resolve_adjustl, gfc_resolve_adjustr): New
421 (gfc_resolve_pack): Call _char4 variants of library function
422 when dealing with wide characters.
423 (gfc_resolve_reshape): Likewise.
424 (gfc_resolve_spread): Likewise.
425 (gfc_resolve_transpose): Likewise.
426 (gfc_resolve_unpack): Likewise.
427 * target-memory.c (size_character): Take character kind bit size
428 correctly into account (not that it changes anything for now, but
430 (gfc_encode_character): Added gfc_ prefix. Encoding each
431 character of a string by calling native_encode_expr for the
432 corresponding unsigned integer.
433 (gfc_target_encode_expr): Add gfc_ prefix to encode_character.
434 * trans-decl.c (gfc_build_intrinsic_function_decls): Build
435 gfor_fndecl_select_string_char4, gfor_fndecl_convert_char1_to_char4
436 and gfor_fndecl_convert_char4_to_char1.
437 * target-memory.h (gfc_encode_character): New prototype.
438 * arith.c (gfc_check_character_range): New function.
439 (eval_intrinsic): Allow non-default character kinds.
440 * check.c (gfc_check_access_func): Only allow default
441 character kind arguments.
442 (gfc_check_chdir): Likewise.
443 (gfc_check_chdir_sub): Likewise.
444 (gfc_check_chmod): Likewise.
445 (gfc_check_chmod_sub): Likewise.
446 (gfc_check_lge_lgt_lle_llt): New function.
447 (gfc_check_link): Likewise.
448 (gfc_check_link_sub): Likewise.
449 (gfc_check_symlnk): Likewise.
450 (gfc_check_symlnk_sub): Likewise.
451 (gfc_check_rename): Likewise.
452 (gfc_check_rename_sub): Likewise.
453 (gfc_check_fgetputc_sub): Likewise.
454 (gfc_check_fgetput_sub): Likewise.
455 (gfc_check_stat): Likewise.
456 (gfc_check_stat_sub): Likewise.
457 (gfc_check_date_and_time): Likewise.
458 (gfc_check_ctime_sub): Likewise.
459 (gfc_check_fdate_sub): Likewise.
460 (gfc_check_gerror): Likewise.
461 (gfc_check_getcwd_sub): Likewise.
462 (gfc_check_getarg): Likewise.
463 (gfc_check_getlog): Likewise.
464 (gfc_check_hostnm): Likewise.
465 (gfc_check_hostnm_sub): Likewise.
466 (gfc_check_ttynam_sub): Likewise.
467 (gfc_check_perror): Likewise.
468 (gfc_check_unlink): Likewise.
469 (gfc_check_unlink_sub): Likewise.
470 (gfc_check_system_sub): Likewise.
471 * primary.c (got_delim): Perform correct character range checking
473 * trans-intrinsic.c (gfc_conv_intrinsic_conversion): Generate
474 calls to library functions convert_char4_to_char1 and
475 convert_char1_to_char4 for character conversions.
476 (gfc_conv_intrinsic_char): Allow all character kings.
477 (gfc_conv_intrinsic_strcmp): Fix whitespace.
478 (gfc_conv_intrinsic_repeat): Take care of all character kinds.
479 * intrinsic.texi: For all GNU intrinsics accepting character
480 arguments, mention that they're restricted to the default kind.
481 * simplify.c (simplify_achar_char): New function.
482 (gfc_simplify_achar, gfc_simplify_char): Call simplify_achar_char.
483 gfc_simplify_ichar): Don't error out for wide characters.
484 (gfc_convert_char_constant): New function.
486 2008-05-18 Steven G. Kargl <kargls@comcast.net>
489 * symbol.c (check_conflict): Issue errors for abuse of PUBLIC, PRIVATE,
491 * resolve.c (gfc_verify_binding_labels): Fix NULL pointer dereference.
493 2008-05-17 Tobias Burnus <burnus@net-b.de>
495 * intrinsic.texi: Correct description of GET_COMMAND_ARGUMENT
496 and GET_ENVIRONMENT_VARIABLE; fix keyword= name for GETENV,
497 GETLOG, GMTIME, HOSTNM, IRAND, ITIME, KILL.
498 Move LOG_GAMMA after LOG10.
500 2008-05-17 Tobias Burnus <burnus@net-b.de>
502 * intrinsic.c (add_functions): Change FLUSH(C) to FLUSH(UNIT).
503 * intrinsic.texi: Change INTEGER(*) to INTEGER; fix keyword= name for
504 ABS, ADJUSTL, AINT, ALLOCATED, ANINT, ASSOCIATED, C_ASSOCIATED,
505 CEILING, DBLE, DFLOAT, DOT_PRODUCT, DREAL, FLOAT, FLOOR, GET_COMMAND.
507 2008-05-16 Paul Thomas <pault@gcc.gnu.org>
511 * trans-stmt.c (gfc_trans_where): Tighten up the dependency
512 check for calling gfc_trans_where_3.
515 * trans-stmt.c (gfc_trans_where_2): Set the mask size to zero
516 if it is calculated to be negative.
519 * trans-stmt.c (gfc_trans_where_3, gfc_trans_where_assign): Set
520 ss->where for scalar right hand sides.
521 * trans-array.c (gfc_add_loop_ss_code): If ss->where is set do
522 not evaluate scalars outside the loop. Clean up whitespace.
523 * trans.h : Add a bitfield 'where' to gfc_ss.
525 2008-05-16 Tobias Burnus <burnus@net-b.de>
527 * libgfortran.h: Increase GFC_MAX_DIMENSIONS to 15.
528 * array.c (gfc_match_array_spec): Error with -std=f2003 if rank > 7.
530 2008-04-16 Daniel Kraft <d@domob.eu>
533 * gfortran.h: Added field "length_from_typespec" to gfc_charlength.
534 * aray.c (gfc_match_array_constructor): Added code to parse typespec.
535 (check_element_type, check_constructor_type, gfc_check_constructor_type):
536 Extended to support explicit typespec on constructor.
537 (gfc_resolve_character_array_constructor): Pad strings correctly for
538 explicit, constant character length.
539 * trans-array.c: New static global variable "typespec_chararray_ctor"
540 (gfc_trans_array_constructor): New code to support explicit but dynamic
543 2008-05-16 Jerry DeLisle <jvdelisle@gcc.gnu.org>
546 * decl.c (match_attr_spec): Check for matching pairs of parenthesis.
547 * expr.c (gfc_specification_expr): Supplement the error message with the
549 * resolve.c (gfc_resolve_index): Likewise.
550 * match.c (gfc_match_parens): Clarify error message with "at or before".
551 (gfc_match_do): Check for matching pairs of parenthesis.
553 2008-05-16 Tobias Burnus <burnus@net-b.de
555 * intrinsic.texi: Write Fortran 77/90/95 instead of F77/90/95;
556 add missing KIND argument to ACHAR and NINT; and state that
557 the KIND argument is a F2003 extension for ACHAR, COUNT, IACHAR,
558 ICHAR, INDEX, LBOUND, LEN, LEN_TRIM, SCAN, SIZE, UBOUND, VERIFY.
560 2008-05-16 Daniel Kraft <d@domob.eu>
562 * primary.c: New private structure "gfc_structure_ctor_component".
563 (gfc_free_structure_ctor_component): New helper function.
564 (gfc_match_structure_constructor): Extended largely to support named
565 arguments and default initialization for structure constructors.
567 2008-05-15 Steven G. Kargl <kargls@comcast.net>
569 * simplify.c (gfc_simplify_dble, gfc_simplify_float,
570 simplify_bound, gfc_simplify_nearest, gfc_simplify_real): Plug
571 possible memory leaks.
572 (gfc_simplify_reshape): Plug possible memory leaks and dereferencing
575 2008-05-15 Steven G. Kargl <kargls@comcast.net>
578 * simplify.c (gfc_simplify_int, gfc_simplify_intconv): Replaced hand
579 rolled integer conversion with gfc_int2int, gfc_real2int, and
581 (gfc_simplify_intconv): Renamed to simplify_intconv.
583 2008-05-15 Steven G. Kargl, <kargl@comcast.net>
584 * gfortran.dg/and_or_xor.f90: New test
586 * fortran/simplify.c (gfc_simplify_and, gfc_simplify_or,
587 gfc_simplify_xor): Don't range check logical results.
589 2008-05-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
591 * trans-expr.c (gfc_conv_concat_op): Take care of nondefault
593 (gfc_build_compare_string): Add kind argument and use it.
594 (gfc_conv_statement_function): Fix indentation.
595 * gfortran.h (gfc_character_info): New structure.
596 (gfc_character_kinds): New array.
597 * trans-types.c (gfc_character_kinds, gfc_character_types,
598 gfc_pcharacter_types): New array.
599 (gfc_init_kinds): Fill character kinds array.
600 (validate_character): Take care of nondefault character kinds.
601 (gfc_build_uint_type): New function.
602 (gfc_init_types): Take care of nondefault character kinds.
603 (gfc_get_char_type, gfc_get_pchar_type): New functions.
604 (gfc_get_character_type_len): Use gfc_get_char_type.
605 * trans.h (gfc_build_compare_string): Adjust prototype.
606 (gfor_fndecl_compare_string_char4, gfor_fndecl_concat_string_char4,
607 gfor_fndecl_string_len_trim_char4, gfor_fndecl_string_index_char4,
608 gfor_fndecl_string_scan_char4, gfor_fndecl_string_verify_char4,
609 gfor_fndecl_string_trim_char4, gfor_fndecl_string_minmax_char4,
610 gfor_fndecl_adjustl_char4, gfor_fndecl_adjustr_char4): New
612 * trans-types.h (gfc_get_char_type, gfc_get_pchar_type): New
614 * trans-decl.c (gfor_fndecl_compare_string_char4,
615 gfor_fndecl_string_len_trim_char4, gfor_fndecl_string_index_char4,
616 gfor_fndecl_string_scan_char4, gfor_fndecl_string_verify_char4,
617 gfor_fndecl_string_trim_char4, gfor_fndecl_string_minmax_char4,
618 gfor_fndecl_adjustl_char4, gfor_fndecl_adjustr_char4,
619 gfor_fndecl_concat_string_char4): New function decls.
620 (gfc_build_intrinsic_function_decls): Define new *_char4 function
622 * trans-intrinsic.c (gfc_conv_intrinsic_minmax_char,
623 gfc_conv_intrinsic_len_trim, gfc_conv_intrinsic_ichar,
624 gfc_conv_intrinsic_strcmp, gfc_conv_intrinsic_trim,
625 gfc_conv_intrinsic_function): Deal with nondefault character kinds.
627 2008-05-15 Sa Liu <saliu@de.ibm.com>
629 * iso-c-binding.def: Add standard parameter to macro NAMED_INTCST.
630 All existing NAMED_INTCST definitions has standard GFC_STD_F2003,
631 c_int128_t, c_int_least128_t and c_int_fast128_t are added as
633 * iso-fortran-evn.def: Add standard parameter GFC_STD_F2003
634 to macro NAMED_INTCST.
635 * symbol.c (std_for_isocbinding_symbol): New helper function to
636 return the standard that supports this isocbinding symbol.
637 (generate_isocbinding_symbol): Do not generate GNU extension symbols
638 if std=f2003. Add new parameter to NAMED_INTCST.
639 * module.c (use_iso_fortran_env_module): Add new parameter to
640 NAMED_INTCST and new field standard to struct intmod_sym.
641 * gfortran.h: Add new parameter to NAMED_INTCST.
642 * trans-types.c (init_c_interop_kinds): Add new parameter to
644 * intrinsic.texi: Documented new types C_INT128_T, C_INT_LEASE128_T
647 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
650 * trans-decl.c (gfc_build_dummy_array_decl): Don't repack
651 arrays that have the TARGET attribute.
653 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
656 * simplify.c (only_convert_cmplx_boz): New function.
657 (gfc_simplify_cmplx, gfc_simplify_complex, gfc_simplify_dcmplx):
658 Call only_convert_cmplx_boz.
660 2008-05-14 Paul Thomas <pault@gcc.gnu.org>
663 * interface.c (compare_actual_formal): Do not check sizes if the
664 actual is BT_PROCEDURE.
666 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
669 * trans-array.c (gfc_conv_ss_startstride): Any negative size is
670 the same as zero size.
671 (gfc_conv_loop_setup): Fix size calculation.
673 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
676 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Correctly
677 handle zero-size sections.
679 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
682 * scanner.c (preprocessor_line): Allocate enough memory for a
685 2008-05-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
688 * target-memory.c (gfc_target_expr_size): Correctly treat
690 (gfc_target_encode_expr): Likewise.
691 (gfc_interpret_complex): Whitespace change.
693 2008-05-11 Thomas Koenig <tkoenig@gcc.gnu.org>
696 * trans.c (gfc_call_malloc): If size equals zero, allocate one
697 byte; don't return a null pointer.
699 2008-05-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
702 * module.c (quote_string): Fix sprintf format.
704 2008-05-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
707 * module.c (quote_string, unquote_string,
708 mio_allocated_wide_string): New functions.
709 (mio_expr): Call mio_allocated_wide_string where needed.
711 2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>
713 * trans-decl.c (gfc_get_extern_function_decl, build_function_decl):
714 Rename DECL_IS_PURE to DECL_PURE_P.
716 2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
718 * arith.c: (gfc_arith_concat, gfc_compare_string,
719 gfc_compare_with_Cstring, hollerith2representation,
720 gfc_hollerith2int, gfc_hollerith2real, gfc_hollerith2complex,
721 gfc_hollerith2character, gfc_hollerith2logical): Use wide
722 characters for character constants.
723 * data.c (create_character_intializer): Likewise.
724 * decl.c (gfc_set_constant_character_len): Likewise.
725 * dump-parse-tree.c (show_char_const): Correctly dump wide
727 error.c (print_wide_char): Rename into gfc_print_wide_char.
728 (show_locus): Adapt to new prototype of gfc_print_wide_char.
729 expr.c (free_expr0): Representation is now disjunct from
730 character string value, so we always free it.
731 (gfc_copy_expr, find_substring_ref, gfc_simplify_expr): Adapt
732 to wide character strings.
733 * gfortran.h (gfc_expr): Make value.character.string a wide string.
734 (gfc_wide_toupper, gfc_wide_strncasecmp, gfc_wide_memset,
735 gfc_widechar_to_char, gfc_char_to_widechar): New prototypes.
736 (gfc_get_wide_string): New macro.
737 (gfc_print_wide_char): New prototype.
738 * io.c (format_string): Make a wide string.
739 (next_char, gfc_match_format, compare_to_allowed_values,
740 gfc_match_open): Deal with wide strings.
741 * module.c (mio_expr): Convert between wide strings and ASCII ones.
742 * primary.c (match_hollerith_constant, match_charkind_name):
744 * resolve.c (build_default_init_expr): Likewise.
745 * scanner.c (gfc_wide_toupper, gfc_wide_memset,
746 gfc_char_to_widechar): New functions.
747 (wide_strchr, gfc_widechar_to_char, gfc_wide_strncasecmp):
748 Changes in prototypes.
749 (gfc_define_undef_line, load_line, preprocessor_line,
750 include_line, load_file, gfc_read_orig_filename): Handle wide
752 * simplify.c (gfc_simplify_achar, gfc_simplify_adjustl,
753 gfc_simplify_adjustr, gfc_simplify_char, gfc_simplify_iachar,
754 gfc_simplify_ichar, simplify_min_max, gfc_simplify_new_line,
755 gfc_simplify_repeat): Handle wide strings.
756 (wide_strspn, wide_strcspn): New helper functions.
757 (gfc_simplify_scan, gfc_simplify_trim, gfc_simplify_verify):
759 * symbol.c (generate_isocbinding_symbol): Likewise.
760 * target-memory.c (size_character, gfc_target_expr_size,
761 encode_character, gfc_target_encode_expr, gfc_interpret_character,
762 gfc_target_interpret_expr): Handle wide strings.
763 * trans-const.c (gfc_conv_string_init): Lower wide strings to
765 (gfc_conv_constant_to_tree): Likewise.
766 * trans-expr.c (gfc_conv_substring_expr): Handle wide strings.
767 * trans-io.c (gfc_new_nml_name_expr): Likewise.
768 * trans-stmt.c (gfc_trans_label_assign): Likewise.
770 2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
772 * simplify.c (gfc_simplify_bessel_j0,gfc_simplify_bessel_j1,
773 gfc_simplify_bessel_jn,gfc_simplify_bessel_y0,
774 gfc_simplify_bessel_y1,gfc_simplify_bessel_yn): Mark arguments
775 with ATTRIBUTE_UNUSED.
777 2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
779 * check.c (gfc_check_sizeof): Switch to ATTRIBUTE_UNUSED.
780 * simplify.c (gfc_simplify_lgamma): Likewise.
782 2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
784 * openmp.c (gfc_match_omp_eos): Use gfc_next_ascii_char and
786 * decl.c (gfc_match_kind_spec, gfc_match_type_spec,
787 gfc_match_implicit_none, match_implicit_range, gfc_match_implicit,
788 match_string_p, match_attr_spec, gfc_match_suffix,
789 match_procedure_decl, gfc_match_entry, gfc_match_subroutine):
791 * gfortran.h (gfc_char_t): New type.
792 (gfc_linebuf): Make line member a gfc_char_t.
793 (locus): Make nextc member a gfc_char_t.
794 (gfc_wide_is_printable, gfc_wide_is_digit, gfc_wide_fits_in_byte,
795 gfc_wide_tolower, gfc_wide_strlen, gfc_next_ascii_char,
796 gfc_peek_ascii_char, gfc_check_digit): New prototypes.
797 * error.c (print_wide_char): New function.
798 (show_locus): Use print_wide_char and gfc_wide_strlen.
799 * io.c (next_char): Use gfc_char_t type.
800 (match_io): Use gfc_peek_ascii_char and gfc_next_ascii_char.
801 * match.c (gfc_match_parens, gfc_match_eos,
802 gfc_match_small_literal_int, gfc_match_name, gfc_match_name_C,
803 gfc_match_intrinsic_op, gfc_match_char, gfc_match_return,
804 gfc_match_common): Likewise.
805 * match.h (gfc_match_special_char): Change prototype.
806 * parse.c (decode_specification_statement, decode_statement,
807 decode_omp_directive, next_free, next_fixed): Use
808 gfc_peek_ascii_char and gfc_next_ascii_char.
809 * primary.c (gfc_check_digit): Change name.
810 (match_digits, match_hollerith_constant, match_boz_constant,
811 match_real_constant, next_string_char, match_charkind_name,
812 match_string_constant, match_logical_constant_string,
813 match_complex_constant, match_actual_arg, match_varspec,
814 gfc_match_rvalue, match_variable): Use gfc_peek_ascii_char and
816 * scanner.c (gfc_wide_fits_in_byte, wide_is_ascii,
817 gfc_wide_is_printable, gfc_wide_tolower, gfc_wide_is_digit,
818 gfc_wide_is_digit, wide_atoi, gfc_wide_strlen, wide_strcpy,
819 wide_strchr, widechar_to_char, wide_strncmp, wide_strncasecmp,
820 gfc_next_ascii_char, gfc_peek_ascii_char):
822 (next_char, gfc_define_undef_line, skip_free_comments,
823 gfc_next_char_literal, gfc_next_char, gfc_peek_char,
824 gfc_error_recovery, load_line, preprocessor_line, include_line,
825 load_file, gfc_read_orig_filename): Use gfc_char_t for source
826 characters and the {gfc_,}wide_* functions to manipulate wide
829 2008-05-06 Tobias Burnus <burnus@net-b.de>
832 * intrinsic.c (add_functions): Call gfc_simplify_bessel_*.
833 * intrinsic.h: Add prototypes for gfc_simplify_bessel_*.
834 * simplify.c (gfc_simplify_bessel_j0,gfc_simplify_bessel_j1,
835 gfc_simplify_bessel_jn,gfc_simplify_bessel_y0,
836 gfc_simplify_bessel_y1,gfc_simplify_bessel_yn): New.
838 2008-05-03 Janus Weil <jaydub66@gmail.com>
840 * misc.c (gfc_clear_ts): Set interface to NULL.
842 2008-05-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
845 * gfortran.h: Add extra_comma pointer to gfc_dt structure. Add iokind to
846 gfc_expr value union. Add io_kind enum to here from io.c.
847 * io.c (gfc_free_dt): Free extra_comma.
848 (gfc_resolve_dt): If an extra comma was encountered and io_unit is type
849 BT_CHARACTER, resolve to format_expr and set default unit. Error if
850 io_kind is M_WRITE. (match_io): Match the extra comma and set new
851 pointer, extra_comma.
853 2008-05-01 Bud Davis <bdavis9659@sbcglobal.net>
856 * simplify.c (gfc_simplify_index): Check for direction argument
859 2008-05-01 Janus Weil <jaydub66@gmail.com>
861 * gfortran.h (struct gfc_symbol): Moving "interface" member to
862 gfc_typespec (plus fixing a small docu error).
863 * interface.c (gfc_procedure_use): Ditto.
864 * decl.c (match_procedure_decl): Ditto.
865 * resolve.c (resolve_specific_f0,
866 resolve_specific_f0, resolve_symbol): Ditto.
868 2008-04-30 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
870 * intrinsic.c (add_functions): Add SELECTED_CHAR_KIND intrinsic.
871 * intrinsic.h (gfc_check_selected_char_kind,
872 gfc_simplify_selected_char_kind): New prototypes.
873 * gfortran.h (gfc_isym_id): Add GFC_ISYM_SC_KIND.
874 * trans.h (gfor_fndecl_sc_kind): New function decl.
875 * trans-decl.c (gfor_fndecl_sc_kind): Build new decl.
876 * arith.c (gfc_compare_with_Cstring): New function.
877 * arith.h (gfc_compare_with_Cstring): New prototype.
878 * check.c (gfc_check_selected_char_kind): New function.
879 * primary.c (match_string_constant, match_kind_param): Mark
880 symbols used as literal constant kind param as referenced.
881 * trans-intrinsic.c (gfc_conv_intrinsic_sc_kind): New function.
882 (gfc_conv_intrinsic_function): Call gfc_conv_intrinsic_sc_kind.
883 * intrinsic.texi (SELECTED_CHAR_KIND): Document new intrinsic.
884 * simplify.c (gfc_simplify_selected_char_kind): New function.
886 2008-04-28 Paul Thomas <pault@gcc.gnu.org>
889 * module.c (find_symbol): Do not return a result for a symbol
890 that has been renamed in another module.
892 2008-04-26 George Helffrich <george@gcc.gnu.org>
896 * trans-common.c (create_common): Add decl to function
897 chain (if inside one) to preserve identifier scope in debug output.
899 2008-04-25 Jan Hubicka <jh@suse.cz>
901 * trans-decl.c (trans_function_start): Update.
903 2008-04-25 Tobias Burnus <burnus@net-b.de>
904 Daniel Franke <franke.daniel@gmail.com>
907 * gfortranspec.c (lang_specific_driver): Deprecate
908 -M option; fix ICE when "-M" is last argument and
910 * options.c (gfc_handle_module_path_options):
911 Use -J instead of -M in error messages.
912 * invoke.texi: Mark -M as depecated.
914 2008-04-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
915 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
918 * trans-instrinsic.c (gfc_conv_intrinsic_minmaxloc): Correctly adjust
921 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
923 * trans-expr.c (gfc_conv_structure): Don't set TREE_INVARIANT.
924 * trans-array.c (gfc_build_null_descriptor): Don't set TREE_INVARIANT.
925 (gfc_trans_array_constructor_value): Don't set TREE_INVARIANT.
926 (gfc_build_constant_array_constructor): Don't set TREE_INVARIANT.
927 (gfc_conv_array_initializer): Don't set TREE_INVARIANT.
928 * trans-common.c (get_init_field): Don't set TREE_INVARIANT.
929 (create_common): Don't set TREE_INVARIANT.
930 * trans-stmt.c (gfc_trans_character_select): Don't set TREE_INVARIANT.
931 * trans-decl.c (gfc_generate_function_code): Don't set TREE_INVARIANT.
933 2008-04-21 Steve Ellcey <sje@cup.hp.com>
935 * f95-lang.c (gfc_init_decl_processing): use ptr_mode instead of Pmode.
937 2008-04-21 Daniel Franke <franke.daniel@gmail.com>
940 * gfortranspec.c (lookup_option): Properly handle separated arguments
941 in -J option, print missing argument message when necessary.
943 2008-04-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>
946 * scanner.c (skip_fixed_comments): Update continue_line when comment is
947 detected. (gfc_next_char_literal): Likewise.
949 2008-04-19 Paul Thomas <pault@gcc.gnu.org>
954 * trans_array.c (gfc_trans_array_constructor): Temporarily
955 realign loop, if loop->from is not zero, before creating
956 the temporary array and provide an offset.
959 * trans-decl.c (gfc_init_default_dt): Add gfc_ prefix to name
960 and allow for NULL body. Change all references from
961 init_default_dt to gfc_init_default_dt.
962 * trans.h : Add prototype for gfc_init_default_dt.
963 * trans-array.c (gfc_trans_deferred_vars): After nullification
964 call gfc_init_default_dt for derived types with allocatable
967 2008-04-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
970 * trans-common.c (create_common): Revert patch causing regression.
972 2008-04-16 Jerry DeLisle <jvdelisle@gcc.gnu.org>
975 * iresolve.c (gfc_resolve_eoshift): Check for NULL symtree in test for
976 optional argument attribute.
978 2008-04-16 Paul Thomas <pault@gcc.gnu.org>
981 * trans-intrinsic.c (gfc_conv_intrinsic_char): Even though KIND
982 is not used, the argument must be converted.
984 2008-04-16 Jakub Jelinek <jakub@redhat.com>
987 * f95-lang.c (gfc_init_builtin_functions): Make sure
988 BUILT_IN_SINCOS{,F,L} types aren't varargs.
990 2008-04-15 Paul Thomas <pault@gcc.gnu.org>
993 * expr.c (scalarize_intrinsic_call): Reorder identification of
994 array argument so that if one is not found a segfault does not
995 occur. Return FAILURE if all scalar arguments.
997 2008-04-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
998 Tobias Burnus <burnus@net-b.de>
1001 * options.c (gfc_init_options): Set the default maximum continuation
1002 lines to 255 for both free and fixed form source for warnings.
1003 (gfc_handle_option): Set -std=f95 fixed form max continuations to 19 and
1004 the -std=f95 free form max continuations to 39 for warnings.
1005 * scanner.c (gfc_next_char_literal): Adjust the current_line number only
1006 if it is less than the current locus.
1008 2008-04-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1010 PR fortran/25829 28655
1011 * io.c (io_tag): Add new tags for decimal, encoding, asynchronous,
1012 round, sign, and id. (match_open_element): Match new tags.
1013 (gfc_resolve_open): Resolve new tags. (gfc_match_open): Enable encoding
1014 for DEFAULT only. Update error messages. (match_dt_element): Fix match
1015 tag for asynchronous. Update error messages. (gfc_free_inquire): Free
1016 new expressions. (match_inquire_element): Match new tags.
1017 (gfc_match_inquire): Add constraint for ID and PENDING.
1018 (gfc_resolve_inquire): Resolve new tags.
1019 * trans-io.c (gfc_trans_inquire): Clean up whitespace and fix setting of
1020 mask for ID parameter.
1021 * ioparm.def: Fix order of parameters for pending, round, and sign.
1022 NOTE: These must line up with the definitions in libgfortran/io/io.h. or
1025 2008-04-06 Paul Thomas <pault@gcc.gnu.org>
1028 * expr.c (scalarize_intrinsic_call): Identify which argument is
1029 an array and use that as the template.
1030 (check_init_expr): Remove tests that first argument is an array
1031 in the call to scalarize_intrinsic_call.
1033 2008-04-06 Tobias Schlüter <tobi@gcc.gnu.org>
1036 * io.c (io_tag): Add field 'value'. Split 'spec' field in
1038 (match_etag, match_vtag, match_ltag): Split parsing in two steps
1039 to give better error messages.
1041 2008-04-06 Tobias Burnus <burnus@net-b.de>
1043 * io.c (check_io_constraints): Add constrains. ID= requires
1044 asynchronous= and asynchronous= must be init expression.
1046 2008-04-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1048 * f95-lang.c: Set LANG_HOOKS_NAME to "GNU Fortran".
1050 2008-04-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1052 * dump-parse-tree.c: Use fprintf, fputs and fputc instead of
1053 gfc_status and gfc_status_char. Remove gfc_ prefix of the gfc_show_*
1054 functions and make them static. Add new gfc_dump_parse_tree
1056 * gfortran.h (gfc_option_t): Rename verbose into dump_parse_tree.
1057 (gfc_status, gfc_status_char): Delete prototypes.
1058 * error.c (gfc_status, gfc_status_char): Remove functions.
1059 * scanner.c (gfc_new_file): Use printf instead of gfc_status.
1060 * options.c (gfc_init_options): Rename verbose into dump_parse_tree.
1061 (gfc_handle_module_path_options): Use gfc_fatal_error instead of
1062 gfc_status and exit.
1063 (gfc_handle_option): Rename verbose into dump_parse_tree.
1064 * parse.c (gfc_parse_file): Use gfc_dump_parse_tree.
1066 2008-04-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1067 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1069 PR fortran/25829 28655
1070 * dump-parse-tree.c (gfc_show_code_node): Show new I/O parameters.
1071 * gfortran.h (gfc_statement): Add ST_WAIT enumerator.
1072 (gfc_open): Add pointers for decimal, encoding, round, sign,
1073 asynchronous. (gfc_inquire): Add pointers for asynchronous, decimal,
1074 encoding, pending, round, sign, size, id.
1075 (gfc_wait): New typedef struct. (gfc_dt): Add pointers for id, pos,
1076 asynchronous, blank, decimal, delim, pad, round, sign.
1077 (gfc_exec_op): Add EXEC_WAIT enumerator. (gfc_code): Add pointer for
1078 wait. (gfc_free_wait), (gfc_resolve_wait): New function prototypes.
1079 * trans-stmt.h (gfc_trans_wait): New function prototype.
1080 * trans.c (gfc_trans_code): Add case for EXEC_WAIT.
1081 * io.c (io_tag): Add new tags for DECIMAL, ENCODING, ROUND, SIGN,
1082 ASYCHRONOUS, ID. (match_open_element): Add matchers for new tags.
1083 (gfc_free_open): Free new pointers. (gfc_resolve_open): Resolve new
1084 tags. (gfc_resolve_open): Remove comment around check for allowed
1085 values and ASYNCHRONOUS, update it. Likewise for DECIMAL, ENCODING,
1086 ROUND, and SIGN. (match_dt_element): Add matching for new tags.
1087 (gfc_free_wait): New function. (gfc_resolve_wait): New function.
1088 (match_wait_element): New function. (gfc_match_wait): New function.
1089 * resolve.c (gfc_resolve_blocks): Add case for EXEC_WAIT.
1090 (resolve_code): Add case for EXEC_WAIT.
1091 * st.c (gfc_free_statement): Add case for EXEC_WAIT.
1092 * trans-io.c (ioparam_type): Add IOPARM_ptype_wait. (gfc_st_parameter):
1093 Add "wait" entry. (iocall): Add IOCALL_WAIT enumerator.
1094 (gfc_build_io_library_fndecls): Add function declaration for st_wait.
1095 (gfc_trans_open): Add mask bits for new I/O tags.
1096 (gfc_trans_inquire): Add mask bits for new I/O tags.
1097 (gfc_trans_wait): New translation function.
1098 (build_dt): Add mask bits for new I/O tags.
1099 * match.c (gfc_match_if) Add matcher for "wait".
1100 * match.h (gfc_match_wait): Prototype for new function.
1101 * ioparm.def: Add new I/O parameter definitions.
1102 * parse.c (decode_statement): Add match for "wait" statement.
1103 (next_statement): Add case for ST_WAIT. (gfc_ascii_statement): Same.
1105 2008-04-03 Jakub Jelinek <jakub@redhat.com>
1108 * openmp.c (resolve_omp_clauses): Diagnose if a clause symbol
1111 2008-04-03 Tom Tromey <tromey@redhat.com>
1113 * Make-lang.in (fortran_OBJS): New variable.
1115 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
1117 * f95-lang.c (insert_block): Kill.
1119 2008-04-01 George Helffrich <george@gcc.gnu.org>
1121 PR fortran/35154, fortran/23057
1122 * trans-common.c (create_common): Add decl to function
1123 chain to preserve identifier scope in debug output.
1125 2008-04-01 Joseph Myers <joseph@codesourcery.com>
1127 * gfortran.texi: Include gpl_v3.texi instead of gpl.texi
1128 * Make-lang.in (GFORTRAN_TEXI): Include gpl_v3.texi instead of
1131 2008-03-30 Paul Thomas <pault@gcc.gnu.org>
1134 * resolve.c (resolve_function, resolve_call): If the procedure
1135 is elemental do not look for noncopying intrinsics.
1137 2008-03-29 Paul Thomas <pault@gcc.gnu.org>
1140 * trans-array.c (gfc_array_init_size): Set 'size' zero if
1141 negative in one dimension.
1144 * trans-expr.c (gfc_trans_string_copy): Only assign a char
1145 directly if the lhs and rhs types are the same.
1147 2008-03-28 Daniel Franke <franke.daniel@gmail.com>
1148 Paul Richard Thomas <paul.richard.thomas@gmail.com>
1151 * primary.c (match_variable): Improved matching of function
1153 * resolve.c (resolve_allocate_deallocate): Removed checks if
1154 the actual argument for STAT is a variable.
1156 2008-03-28 Tobias Burnus <burnus@net-b.de>
1158 * symbol.c (gfc_get_default_type): Fix error message; option
1159 -fallow_leading_underscore should be -fallow-leading-underscore
1161 2008-03-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1164 * iresolve.c (gfc_resolve_cshift): Check for NULL symtree in test for
1165 optional argument attribute.
1167 2008-03-27 Tom Tromey <tromey@redhat.com>
1169 * Make-lang.in: Revert automatic dependency patch.
1171 2008-03-25 Tom Tromey <tromey@redhat.com>
1173 * Make-lang.in: Remove .o targets.
1174 (fortran_OBJS): New variable.
1175 (fortran/gfortranspec.o): Move to fortran/. Reduce to variable
1177 (GFORTRAN_D_OBJS): Update.
1178 (GFORTRAN_TRANS_DEPS): Remove.
1180 2008-03-24 Paul Thomas <pault@gcc.gnu.org>
1183 * resolve.c (resolve_structure_cons): It is an error to assign
1184 NULL to anything other than a pointer or allocatable component.
1187 * resolve.c (resolve_symbol): If the symbol is a derived type,
1188 resolve the derived type. If the symbol is a derived type
1189 function, ensure that the derived type is visible in the same
1190 namespace as the function.
1192 2008-03-23 Tobias Schlüter <tobi@gcc.gnu.org>
1194 * trans.h: Use fold_build in build1_v, build2_v and build3_v
1196 * trans-openmp.c (gfc_trans_omp_critical, gfc_trans_omp_single):
1197 Don't use build2_v macro.
1199 2008-03-19 Daniel Franke <franke.daniel@gmail.com>
1202 * interface.c (gfc_procedure_use): Check for keyworded arguments in
1203 procedures without explicit interfaces.
1205 2008-03-16 Paul Thomas <pault@gcc.gnu.org>
1208 * resolve.c (check_assumed_size_reference): Only visit the
1209 first reference and look directly at the highest dimension.
1211 2008-03-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1214 * trans-array.c (gfc_conv_array_index_offset): Remove unnecessary
1217 2008-03-15 Daniel Franke <franke.daniel@gmail.com>
1220 * resolve.c (resolve_branch): Less strict and pessimistic warning
1223 2008-03-11 Paolo Bonzini <bonzini@gnu.org>
1225 * f95-lang.c (LANG_HOOKS_CLEAR_BINDING_STACK): Delete.
1226 (gfc_be_parse_file): Call clear_binding_stack from here.
1227 (gfc_clear_binding_stack): Rename to clear_binding_stack.
1229 2008-03-09 Paul Thomas <pault@gcc.gnu.org>
1232 * module.c (mio_symtree_ref): After providing a symbol for a
1233 missing equivalence member, resolve and NULL the fixups.
1235 2008-03-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1237 * invoke.texi (Error and Warning Options): Document
1240 2008-03-08 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1243 * trans-array.c (gfc_conv_ss_startstride): Fix the logic to avoid
1244 checking bounds of absent optional arguments.
1246 2008-03-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1249 * intrinsic.c (add_functions): Add simplification routines for
1250 ERF, DERF, ERFC and DERFC.
1251 * decl.c (gfc_match_suffix, gfc_match_subroutine): Change GNU
1252 extensions into Fortran 2008 features.
1253 * intrinsic.h (gfc_simplify_erf, gfc_simplify_erfc): New
1255 * simplify.c (gfc_simplify_erf, gfc_simplify_erfc): New functions.
1257 2008-03-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1260 * intrinsic.c (add_functions): Modify intrinsics ACOSH, ASINH,
1261 ATANH, ERF, ERFC and GAMMA. Add intrinsics BESSEL_{J,Y}{0,1,N},
1262 ERFC_SCALED, LOG_GAMMA and HYPOT.
1263 * intrinsic.h (gfc_check_hypot, gfc_simplify_hypot,
1264 gfc_resolve_hypot): New prototypes.
1265 * mathbuiltins.def: Add HYPOT builtin. Make complex versions of
1266 ACOSH, ASINH and ATANH available.
1267 * gfortran.h (GFC_ISYM_ERFC_SCALED, GFC_ISYM_HYPOT): New values.
1268 * lang.opt: Add -std=f2008 option.
1269 * libgfortran.h: Define GFC_STD_F2008.
1270 * lang-specs.h: Add .f08 and .F08 file suffixes.
1271 * iresolve.c (gfc_resolve_hypot): New function.
1272 * parse.c (parse_contained): Allow empty CONTAINS for Fortran 2008.
1273 * check.c (gfc_check_hypot): New function.
1274 * trans-intrinsic.c (gfc_intrinsic_map): Define ERFC_SCALE builtin.
1275 * options.c (set_default_std_flags): Allow Fortran 2008 by default.
1276 (form_from_filename): Add .f08 suffix.
1277 (gfc_handle_option): Handle -std=f2008 option.
1278 * simplify.c (gfc_simplify_hypot): New function.
1279 * gfortran.texi: Document Fortran 2008 status and file extensions.
1280 * intrinsic.texi: Document new BESSEL_{J,Y}{0,1,N} intrinsics,
1281 as well as HYPOT and ERFC_SCALED. Update documentation of ERF,
1282 ERFC, GAMMA, LGAMMA, ASINH, ACOSH and ATANH.
1283 * invoke.texi: Document the new -std=f2008 option.
1285 2008-03-02 Jakub Jelinek <jakub@redhat.com>
1287 * gfortranspec.c (lang_specific_driver): Update copyright notice
1290 2008-02-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1293 * expr.c (find_array_element): Modify traversing the constructor to
1294 avoid trying to access NULL memory pointed to by next for the
1295 last element. (find_array_section): Exit while loop if cons->next is
1297 * trans-expr.c (gfc_conv_scalar_char_value): Initialize gfc_typespec.
1298 (gfc_conv_function_call): Same.
1299 * decl.c (gfc_match_implicit): Same.
1300 * trans-intrinsic.c (gfc_conv_intrinsic_sr_kind): Same.
1302 2008-02-28 Daniel Franke <franke.daniel@gmail.com>
1307 * lang.opt: Added -Wreturn-type.
1308 * options.c (gfc_handle_option): Recognize -Wreturn-type.
1309 * trans-decl.c (gfc_trans_deferred_vars): Emit warnings for funtions
1310 where the result value is not set.
1311 (gfc_generate_function_code): Likewise.
1312 (generate_local_decl): Emit warnings for funtions whose RESULT
1313 variable is not set.
1315 2008-02-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1318 * trans-expr.c (gfc_conv_variable): Don't build indirect
1319 references when explicit interface is mandated.
1320 * resolve.c (resolve_formal_arglist): Set attr.always_explicit
1321 on the result symbol as well as the procedure symbol.
1323 2008-02-27 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1326 * trans.h: Remove prototypes for gfor_fndecl_math_exponent4,
1327 gfor_fndecl_math_exponent8, gfor_fndecl_math_exponent10 and
1328 gfor_fndecl_math_exponent16.
1329 * f95-lang.c (build_builtin_fntypes): Add new function types.
1330 (gfc_init_builtin_functions): Add new builtins for nextafter,
1331 frexp, ldexp, fabs, scalbn and inf.
1332 * iresolve.c (gfc_resolve_rrspacing): Don't add hidden arguments.
1333 (gfc_resolve_scale): Don't convert type of second argument.
1334 (gfc_resolve_set_exponent): Likewise.
1335 (gfc_resolve_size): Don't add hidden arguments.
1336 * trans-decl.c: Remove gfor_fndecl_math_exponent4,
1337 gfor_fndecl_math_exponent8, gfor_fndecl_math_exponent10 and
1338 gfor_fndecl_math_exponent16.
1339 * trans-intrinsic.c (gfc_intrinsic_map): Remove intrinsics
1340 for scalbn, fraction, nearest, rrspacing, set_exponent and
1342 (gfc_conv_intrinsic_exponent): Directly call frexp.
1343 (gfc_conv_intrinsic_fraction, gfc_conv_intrinsic_nearest,
1344 gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_rrspacing,
1345 gfc_conv_intrinsic_scale, gfc_conv_intrinsic_set_exponent): New
1347 (gfc_conv_intrinsic_function): Use the new functions above.
1349 2008-02-26 Tobias Burnus <burnus@net-b.de>
1352 * interface.c (check_operator_interface): Show better line for error
1353 messages; fix constrains for user-defined assignment operators.
1354 (gfc_extend_assign): Fix constrains for user-defined assignment
1357 2008-02-26 Tom Tromey <tromey@redhat.com>
1359 * trans-io.c (set_error_locus): Remove old location code.
1360 * trans-decl.c (gfc_set_decl_location): Remove old location code.
1361 * f95-lang.c (gfc_init): Remove test of USE_MAPPED_LOCATION.
1362 * scanner.c (gfc_gobble_whitespace): Remove old location code.
1363 (get_file): Likewise.
1364 (preprocessor_line): Likewise.
1365 (load_file): Likewise.
1366 (gfc_new_file): Likewise.
1367 * trans.c (gfc_trans_runtime_check): Remove old location code.
1368 (gfc_get_backend_locus): Likewise.
1369 (gfc_set_backend_locus): Likewise.
1370 * data.c (gfc_assign_data_value): Remove old location code.
1371 * error.c (show_locus): Remove old location code.
1372 * gfortran.h (gfc_linebuf): Remove old location code.
1373 (gfc_linebuf_linenum): Remove old-location variant.
1375 2008-02-25 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1378 * trans-const.c (gfc_build_string_const): Don't call gettext.
1379 (gfc_build_localized_string_const): New function.
1380 * trans-const.h (gfc_build_localized_string_const): New prototype.
1381 * trans.c (gfc_trans_runtime_check): Use
1382 gfc_build_localized_string_const instead of gfc_build_string_const.
1383 (gfc_call_malloc): Likewise.
1384 (gfc_allocate_with_status): Likewise.
1385 (gfc_allocate_array_with_status): Likewise.
1386 (gfc_deallocate_with_status): Likewise.
1387 (gfc_call_realloc): Likewise.
1388 * trans-io.c (gfc_trans_io_runtime_check): Likewise.
1390 2008-02-24 Tobias Schlüter <tobi@gcc.gnu.org>
1392 * arith.c: Update copyright years.
1393 * arith.h: Likewise.
1394 * array.c: Likewise.
1396 * check.c: Likewise.
1400 * dependency.c: Likewise.
1401 * dependency.h: Likewise.
1402 * dump-parse-tree.c: Likewise.
1403 * error.c: Likewise.
1405 * gfc-internals.texi: Likewise.
1406 * gfortran.h: Likewise.
1407 * gfortran.texi: Likewise.
1408 * gfortranspec.c: Likewise.
1409 * interface.c: Likewise.
1410 * intrinsic.c: Likewise.
1411 * intrinsic.h: Likewise.
1412 * intrinsic.texi: Likewise.
1413 * invoke.texi: Likewise.
1415 * iresolve.c: Likewise.
1416 * iso-c-binding.def: Likewise.
1417 * iso-fortran-env.def: Likewise.
1418 * lang-specs.h: Likewise.
1419 * lang.opt: Likewise.
1420 * libgfortran.h: Likewise.
1421 * match.c: Likewise.
1422 * match.h: Likewise.
1423 * matchexp.c: Likewise.
1425 * module.c: Likewise.
1426 * openmp.c: Likewise.
1427 * options.c: Likewise.
1428 * parse.c: Likewise.
1429 * parse.h: Likewise.
1430 * primary.c: Likewise.
1431 * resolve.c: Likewise.
1432 * scanner.c: Likewise.
1433 * simplify.c: Likewise.
1435 * symbol.c: Likewise.
1436 * target-memory.c: Likewise.
1437 * target-memory.h: Likewise.
1438 * trans-array.h: Likewise.
1439 * trans-const.h: Likewise.
1440 * trans-stmt.h: Likewise.
1441 * trans-types.c: Likewise.
1442 * trans-types.h: Likewise.
1443 * types.def: Likewise.
1445 2008-02-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1448 * simplify.c (gfc_simplify_ibclr), (gfc_simplify_ibits),
1449 (gfc_simplify_ibset): Remove call to range_check.
1450 (simplify_cmplx), (gfc_simplify_dble), (gfc_simplify_float)
1451 (gfc_simplify_real): Add call gfc_clear_ts to initialize the
1452 temporary gfc_typspec variable.
1454 2008-02-24 Tobias Schlüter <tobi@gcc.gnu.org>
1456 * trans-array.c (gfc_conv_descriptor_data_get,
1457 gfc_conv_descriptor_data_set_internal,
1458 gfc_conv_descriptor_data_addr, gfc_conv_descriptor_offset,
1459 gfc_conv_descriptor_dtype, gfc_conv_descriptor_dimension,
1460 gfc_conv_descriptor_stride, gfc_conv_descriptor_lbound,
1461 gfc_conv_descriptor_ubound, gfc_trans_create_temp_array,
1462 gfc_conv_array_transpose, gfc_grow_array,
1463 gfc_trans_array_constructor_subarray,
1464 gfc_trans_array_constructor_value, gfc_trans_scalarized_loop_end,
1465 gfc_array_init_size, gfc_array_allocate, gfc_array_deallocate,
1466 gfc_conv_array_initializer, gfc_trans_array_bounds,
1467 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
1468 gfc_get_dataptr_offset, gfc_conv_array_parameter,
1469 gfc_trans_dealloc_allocated, get_full_array_size,
1470 gfc_duplicate_allocatable, structure_alloc_comps): Use fold_buildN
1472 * trans-expr.c (gfc_conv_expr_present, gfc_conv_missing_dummy,
1473 gfc_conv_component_ref, gfc_conv_cst_int_power,
1474 gfc_conv_function_call, gfc_trans_structur_assign): Likewise.
1475 * trans-common.c (create_common): Likewise.
1476 * trans-openmp.c (gfc_trans_omp_atomic, gfc_trans_omp_do):
1478 * trans-const.c (gfc_conv_constant_to_tree): Likewise.
1479 * trans-stmt.c (gfc_trans_goto, gfc_trans_return, gfc_trans_do,
1480 gfc_trans_integer_select, gfc_trans_character_select,
1481 gfc_trans_forall_loop, compute_overall_iter_number,
1482 gfc_trans_forall_1, gfc_evaluate_where_mask, gfc_trans_allocate,
1483 gfc_trans_deallocate): Likewise.
1484 * trans.c (gfc_build_addr_expr, gfc_trans_runtime_check,
1485 gfc_allocate_with_status, gfc_allocate_array_with_status,
1486 gfc_deallocate_with_status): Likewise.
1487 * f95-lang.c (gfc_truthvalue_conversion): Likewise.
1488 * trans-io.c (set_parameter_const, set_parameter_value,
1489 set_parameter_ref, set_string, set_internal_unit, io_result,
1490 set_error_locus, nml_get_addr_expr, transfer_expr): Likewise.
1491 * trans-decl.c (gfc_build_qualified_array, build_entry_thunks,
1492 gfc_get_fake_result_decl, gfc_trans_auto_character_variable,
1493 gfc_generate_function_code): Likewise.
1494 * convert.c (convert): Likewise.
1495 * trans-intrinsic.c (gfc_conv_intrinsic_conversion,
1496 build_fixbound_expr, build_fix_expr, gfc_conv_intrinsic_aint,
1497 gfc_conv_intrinsic_int, gfc_conv_intrinsic_imagpart,
1498 gfc_conv_intrinsic_conjg, gfc_conv_intrinsic_abs,
1499 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_mod,
1500 gfc_conv_intrinsic_dim, gfc_conv_intrinsic_dprod,
1501 gfc_conv_intrinsic_ctime, gfc_conv_intrinsic_fdate,
1502 gfc_conv_intrinsic_ttynam, gfc_conv_intrinsic_minmax,
1503 gfc_conv_intrinsic_minmax_char, gfc_conv_intrinsic_count,
1504 gfc_conv_intrinsic_arith, gfc_conv_intrinsic_dot_product,
1505 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
1506 gfc_conv_intrinsic_btest, gfc_conv_intrinsic_not,
1507 gfc_conv_intrinsic_ibits, gfc_conv_intrinsic_ishft,
1508 gfc_conv_intrinsic_ichar, gfc_conv_intrinsic_size,
1509 gfc_conv_intrinsic_array_transfer, gfc_conv_intrinsic_transfer,
1510 gfc_conv_allocated, gfc_conv_associated, gfc_conv_intrinsic_trim,
1511 gfc_conv_intrinsic_repeat): Likewise.
1513 2008-02-23 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1516 * trans-expr.c (gfc_conv_power_op): Use BUILT_IN_CPOW{F,,L}.
1517 * f95-lang.c (gfc_init_builtin_functions): Define BUILT_IN_CPOW{F,,L}.
1518 * trans.h (gfor_fndecl_math_cpow, gfor_fndecl_math_cpowf,
1519 gfor_fndecl_math_cpowl10, gfor_fndecl_math_cpowl16): Remove.
1520 * trans-decl.c: Likewise.
1522 2008-02-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1525 * expr.c (find_array_element): Modify traversing the constructor to
1526 avoid trying to access NULL memory pointed to by next for the
1527 last element. (find_array_section): Exit while loop if cons->next is
1530 2008-02-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1533 * iresolve.c (resolve_mask_arg): Add gfc_clear_ts to initialize
1535 (gfc_resolve_aint): Likewise.
1536 (gfc_resolve_anint): Likewise.
1537 (gfc_resolve_besn): Likewise.
1538 (gfc_resolve_cshift): Likewise.
1539 (gfc_resolve_ctime): Likewise.
1540 (gfc_resolve_eoshift): Likewise.
1541 (gfc_resolve_index_func): Likewise.
1542 (gfc_resolve_isatty): Likewise.
1543 (gfc_resolve_malloc): Likewise.
1544 (gfc_resolve_rrspacing): Likewise.
1545 (gfc_resolve_scale): Likewise.
1546 (gfc_resolve_set_exponent): Likewise.
1547 (gfc_resolve_spacing): Likewise.
1548 (gfc_resolve_spacing): Likewise.
1549 (gfc_resolve_fgetc): Likewise.
1550 (gfc_resolve_fputc): Likewise.
1551 (gfc_resolve_ftell): Likewise.
1552 (gfc_resolve_ttynam): Likewise.
1553 (gfc_resolve_alarm_sub): Likewise.
1554 (gfc_resolve_mvbits): Likewise.
1555 (gfc_resolve_getarg): Likewise.
1556 (gfc_resolve_signal_sub): Likewise.
1557 (gfc_resolve_exit): Likewise.
1558 (gfc_resolve_flush): Likewise.
1559 (gfc_resolve_free): Likewise.
1560 (gfc_resolve_ctime_sub): Likewise.
1561 (gfc_resolve_fgetc_sub): Likewise.
1562 (gfc_resolve_fputc_sub): Likewise.
1563 (gfc_resolve_fseek_sub): Likewise.
1564 (gfc_resolve_ftell_sub): Likewise.
1565 (gfc_resolve_ttynam_sub): Likewise.
1567 2008-02-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1569 * gfc-internals.texi: Fix typos and markup nits.
1570 * gfortran.texi: Likewise.
1571 * intrinsic.texi: Likewise.
1573 2008-02-21 Richard Guenther <rguenther@suse.de>
1575 * trans-expr.c (gfc_conv_expr_op): Expand INTRINSIC_PARENTHESES
1576 as unary PAREN_EXPR for real and complex typed expressions.
1577 (gfc_conv_unary_op): Fold the built tree.
1579 2008-02-20 Tobias Burnus <burnus@net-b.de>
1582 * match.c (gfc_match_name): Improve error message for '$'.
1584 2008-02-19 Daniel Franke <franke.daniel@gmail.com>
1587 * expr.c (gfc_check_pointer_assign): Add type and kind information
1588 to type-mismatch message.
1589 (gfc_check_assign): Unify error messages.
1591 2008-02-16 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1594 * gfortran.texi: Create new section for unimplemented extensions.
1595 Add "STRUCTURE and RECORD" and "ENCODE and DECODE statements".
1596 Remove "smaller projects" list. Fix a few typos.
1598 2008-02-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1600 * intrinsic.texi: Rename INDEX node to avoid clashing with
1601 index.html on case-insensitive systems.
1603 2008-02-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1606 * trans-expr.c (gfc_conv_function_call): Force evaluation of
1609 2008-02-10 Daniel Franke <franke.daniel@gmail.com>
1612 * lang.opt: Allow '-J<dir>' next to '-J <dir>',
1613 likewise '-I <dir>' and '-I<dir>'.
1615 2008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1618 * Make-lang.in (f951): Add $(GMPLIBS).
1620 2008-02-05 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1623 * trans-common.c (build_field): Mark fields as volatile when needed.
1625 2008-02-05 Tobias Burnus <burnus@net-b.de>
1628 * data.c (gfc_assign_data_value): Only free "size" if
1629 it has not already been freed.
1631 2008-02-05 Paul Thomas <pault@gcc.gnu.org>
1634 * array.c (match_array_element_spec): Remove check for negative
1636 (gfc_resolve_array_spec): Add check for negative size.
1638 2008-02-05 Paul Thomas <pault@gcc.gnu.org>
1641 * data.c (gfc_assign_data_value): Add bounds check for array
1644 2008-02-04 Daniel Franke <franke.daniel@gmail.com>
1646 * resolve.c (resolve_where): Fix typo.
1647 (gfc_resolve_where_code_in_forall): Likewise.
1649 2008-02-03 Paul Thomas <pault@gcc.gnu.org>
1652 * resolve.c (resolve_allocate_deallocate): New function.
1653 (resolve_code): Call it for allocate and deallocate.
1654 * match.c (gfc_match_allocate, gfc_match_deallocate) : Remove
1655 the checking of the STAT tag and put in above new function.
1656 * primary,c (match_variable): Do not fix flavor of host
1657 associated symbols yet if the type is not known.
1659 2008-01-31 Paul Thomas <pault@gcc.gnu.org>
1662 * expr.c (gfc_check_assign): It is an error to assign
1663 to a sibling procedure.
1665 2008-01-30 Paul Thomas <pault@gcc.gnu.org>
1668 * symbol.c (gfc_delete_symtree, gfc_undo_symbols): Rename
1669 delete_symtree to gfc_delete_symtree.
1670 * gfortran.h : Add prototype for gfc_delete_symtree.
1671 * module.c (load_generic_interfaces): Transfer symbol to a
1672 unique symtree and delete old symtree, instead of renaming.
1673 (read_module): The rsym and the found symbol are the same, so
1674 the found symtree can be deleted.
1677 * decl.c (match_char_spec): Remove the constraint on deferred
1678 matching of functions and free the length expression.
1679 delete_symtree to gfc_delete_symtree.
1680 (gfc_match_type_spec): Whitespace.
1681 (gfc_match_function_decl): Defer characteristic association for
1682 all types except BT_UNKNOWN.
1683 * parse.c (decode_specification_statement): Only derived type
1684 function matching is delayed to the end of specification.
1686 2008-01-28 Tobias Burnus <burnus@net-b.de>
1689 * simplify.c (gfc_simplify_shape): Simplify rank zero arrays.
1691 2008-01-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1694 * array.c (gfc_check_constructor_type): Revert clearing the expression.
1696 2008-01-26 Tobias Burnus <burnus@net-b.de>
1699 * trans-expr.c (gfc_conv_function_call): Don't call
1700 gfc_add_interface_mapping if the expression is NULL.
1702 2008-01-26 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1705 * trans-array.c (gfc_trans_create_temp_array): Remove call to
1706 gcc_assert (integer_zerop (loop->from[n])).
1708 2008-01-25 Daniel Franke <franke.daniel@gmail.com>
1711 * resolve.c (resolve_where): Added check if user-defined assignment
1712 operator is an elemental subroutine.
1713 (gfc_resolve_where_code_in_forall): Likewise.
1715 2008-01-24 Daniel Franke <franke.daniel@gmail.com>
1719 * gfortran.h: Revert changes from 2008-01-17.
1720 * match.c: Likewise.
1721 * symbol.c: Likewise.
1722 (gfc_undo_symbols): Undo namespace changes related to common blocks.
1724 2008-01-24 Daniel Franke <franke.daniel@gmail.com>
1727 * data.c (formalize_structure_cons): Skip formalization on
1730 2008-01-24 Daniel Franke <franke.daniel@gmail.com>
1732 * gfortran.texi (OpenMP): Extended existing documentation.
1733 (contributors): Added major contributors of 2008 that were
1735 (proposed extensions): Removed implemented items.
1737 2008-01-24 Paul Thomas <pault@gcc.gnu.org>
1740 * parse.c (next_statement) : If ST_GET_FCN_CHARACTERISTICS is
1741 seen, check for a statement label and, if present, delete it
1742 and set the locus to the start of the statement.
1744 2008-01-22 Paul Thomas <pault@gcc.gnu.org>
1747 * trans-io.c (gfc_trans_transfer): If the array reference in a
1748 read has a vector subscript, use gfc_conv_subref_array_arg to
1749 copy back the temporary.
1751 2008-01-22 Tobias Burnus <burnus@net-b.de>
1754 * interface.c (compare_actual_formal): Fix adding type
1755 to missing_arg_type for absent optional arguments.
1757 2008-01-22 Tobias Burnus <burnus@net-b.de>
1760 * parse.c (parse_spec): Change = into ==.
1762 2008-01-22 Daniel Franke <franke.daniel@gmail.com>
1765 * expr.c (check_elemental): Fix check for valid data types.
1767 2008-01-22 Tobias Burnus <burnus@net-b.de>
1770 * scanner.c (load_line): Support <tab><digit> continuation lines.
1771 * invoke.texi (-Wtabs): Document this.
1773 2008-01-22 Paul Thomas <pault@gcc.gnu.org>
1776 * module.c (read_module): Set use_rename attribute.
1778 2007-01-21 Tobias Burnus <burnus@net-b.de>
1781 * interface.c (compare_parameter): Improved error message
1782 for arguments of same type and mismatched kinds.
1784 2008-01-20 Paul Thomas <pault@gcc.gnu.org>
1787 * resolve.c (resolve_entries): Do not do an array bounds check
1788 if the result symbols are the same.
1791 * module.c (read_module) : Hide the symtree of the previous
1792 version of the symbol if this symbol is renamed.
1794 2008-01-20 Paul Thomas <pault@gcc.gnu.org>
1797 * array.c (gfc_check_constructor_type): Clear the expression ts
1798 so that the checking starts from the deepest level of array
1800 * primary.c (match_varspec): If an unknown type is changed to
1801 default character and the attempt to match a substring fails,
1802 change it back to unknown.
1805 * trans-array.c (gfc_add_loop_ss_code) : If ss->string_length is
1806 NULL for an array constructor, use the cl.length expression to
1808 (gfc_conv_array_parameter): Change call to gfc_evaluate_now to
1811 2008-01-19 Thomas Koenig <tkoenig@gcc.gnu.org>
1815 * iresolve.c (gfc_resolve_all): Remove conversion of mask
1816 argument to kind=1 by removing call to resolve_mask_arg().
1817 (gfc_resolve_any): Likewise.
1819 2008-01-19 Tobias Burnus <burnus@net-b.de>
1822 * primary.c (match_variable): Handle FL_UNKNOWN without
1823 uneducated guessing.
1824 (match_variable): Improve error message.
1826 2008-01-18 Tobias Burnus <burnus@net-b.de>
1829 * interface.c (get_expr_storage_size): Return storage size
1830 for array element designators.
1831 (compare_actual_formal): Reject unequal string sizes for
1832 assumed-shape dummy arguments. And fix error message for
1833 array-sections with vector subscripts.
1835 2008-01-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1838 * simplify.c (is_constant_array_expr): New static function that returns
1839 true if the given expression is an array and is constant.
1840 (gfc_simplify_reshape): Use new function.
1842 2008-01-17 H.J. Lu <hongjiu.lu@intel.com>
1845 * symbol.c (free_common_tree): Renamed to ...
1846 (gfc_free_common_tree): This. Remove static.
1847 (gfc_free_namespace): Updated.
1849 * gfortran.h (gfc_free_common_tree): New.
1851 * match.c (gfc_match_common): Call gfc_free_common_tree () with
1852 gfc_current_ns->common_root and set gfc_current_ns->common_root
1853 to NULL on syntax error.
1855 2008-01-18 Richard Sandiford <rsandifo@nildram.co.uk>
1858 * trans-expr.c (gfc_conv_function_call): Use proper
1859 type for returned character pointers.
1861 2008-01-17 Paul Thomas <pault@gcc.gnu.org>
1866 * decl.c : Remove gfc_function_kind_locus and
1867 gfc_function_type_locus. Add gfc_matching_function.
1868 (match_char_length): If matching a function and the length
1869 does not match, return MATCH_YES and try again later.
1870 (gfc_match_kind_spec): The same.
1871 (match_char_kind): The same.
1872 (gfc_match_type_spec): The same for numeric and derived types.
1873 (match_prefix): Rename as gfc_match_prefix.
1874 (gfc_match_function_decl): Except for function valued character
1875 lengths, defer applying kind, type and charlen info until the
1876 end of specification block.
1877 gfortran.h (gfc_statement): Add ST_GET_FCN_CHARACTERISTICS.
1878 parse.c (decode_specification_statement): New function.
1879 (decode_statement): Call it when a function has kind = -1. Set
1880 and reset gfc_matching function, as function statement is being
1882 (match_deferred_characteristics): Simplify with a single call
1883 to gfc_match_prefix. Do appropriate error handling. In any
1884 case, make sure that kind = -1 is reset or corrected.
1885 (parse_spec): Call above on seeing ST_GET_FCN_CHARACTERISTICS.
1886 Throw an error if kind = -1 after last specification statement.
1887 parse.h : Prototype for gfc_match_prefix.
1889 2008-01-16 Tobias Burnus <burnus@net-b.de>
1892 * interface.c (compare_parameter): Allow AS_DEFERRED array
1893 elements and reject attr.pointer array elemenents.
1894 (get_expr_storage_size): Return storage size of elements of
1895 assumed-shape and pointer arrays.
1897 2008-01-15 Sebastian Pop <sebastian.pop@amd.com>
1899 * f95-lang.c (gfc_init_builtin_functions): Initialize GOMP builtins
1900 for flag_tree_parallelize_loops.
1902 2008-01-15 Thomas Koenig <tkoenig@gcc.gnu.org>
1905 * iresolve.c (gfc_resolve_all): Call resolve_mask_arg.
1906 (gfc_resolve_any): Likewise.
1907 (gfc_resolve_count): Likewise. Don't append kind of
1908 argument to function name.
1910 2008-01-13 Tobias Burnus <burnus@net-b.de>
1913 * resolve.c (resolve_actual_arglist): For expressions,
1914 also check for assume-sized arrays.
1915 * interface.c (compare_parameter): Move F2003 character checks
1916 here, print error messages here, reject elements of
1917 assumed-shape array as argument to dummy arrays.
1918 (compare_actual_formal): Update for the changes above.
1920 2008-01-13 Tobias Burnus <burnus@net-b.de>
1923 * decl.c (contained_procedure): Only check directly preceeding state.
1925 2008-01-13 Tobias Burnus <burnus@net-b.de>
1928 * check.c (gfc_check_shape): Accept array ranges of
1929 assumed-size arrays.
1931 2008-01-12 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1934 * match.c (gfc_match_name): Don't error if leading character is a '(',
1935 just return MATCH_NO.
1937 2008-01-11 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1940 * trans-io.c (create_dummy_iostat): Commit the symbol.
1942 2008-01-11 Paul Thomas <pault@gcc.gnu.org>
1945 * simplify.c (gfc_simplify_transfer): Return NULL if the size
1946 of the element is unavailable and only assign character length
1947 to the result, if 'mold' is constant.
1949 2008-01-10 Paul Thomas <pault@gcc.gnu.org>
1952 * trans-array.c (gfc_trans_array_ctor_element): Use gfc_trans_string_copy
1953 to assign strings and perform bounds checks on the string length.
1954 (get_array_ctor_strlen): Remove bounds checking.
1955 (gfc_trans_array_constructor): Initialize string length checking.
1956 * trans-array.h : Add prototype for gfc_trans_string_copy.
1958 2008-01-08 Richard Guenther <rguenther@suse.de>
1961 PR tree-optimization/34683
1962 * trans-types.c (gfc_get_array_type_bounds): Use an array type
1963 with known size for accesses if that is known.
1965 2008-01-08 Paul Thomas <pault@gcc.gnu.org>
1968 * expr.c (find_array_element): Check that the array bounds are
1969 constant before using them. Use lower, as well as upper bound.
1970 (check_restricted): Allow implied index variable.
1972 2008-01-08 Paul Thomas <pault@gcc.gnu.org>
1975 * trans_array.c (gfc_trans_deferred_array): Do not null the
1976 data pointer on entering scope, nor deallocate it on leaving
1977 scope, if the symbol has the 'save' attribute.
1980 * trans_decl.c (gfc_finish_var_decl): Derived types with
1981 allocatable components and an initializer must be TREE_STATIC.
1983 2008-01-07 Paul Thomas <pault@gcc.gnu.org>
1986 * module.c (write_generic): Rewrite completely.
1987 (write_module): Change call to write_generic.
1989 2008-01-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1992 * scanner.c (load_line): Do not count ' ' as printable when checking for
1995 2008-01-06 Paul Thomas <pault@gcc.gnu.org>
1998 * module.c (load_needed): If the namespace has no proc_name
1999 give it the module symbol.
2001 2008-01-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2004 * trans-expr.c (gfc_conv_missing_dummy): Use a temporary to type convert
2005 the dummy variable expression, test for NULL, and pass the variable
2006 address to the called function.
2008 2007-01-06 Tobias Burnus <burnus@net-b.de>
2011 * match.c (gfc_match_common): Remove blank common in
2013 * resolve.c (resolve_common_vars): New function.
2014 (resolve_common_blocks): Move checks to resolve_common_vars
2015 and invoke that function.
2016 (resolve_types): Call resolve_common_vars for blank commons.
2018 2008-01-06 Tobias Burnus <burnus@net-b.de>
2021 * resolve.c (resolve_equivalence_derived): Reject derived types with
2022 default initialization if equivalenced with COMMON variable.
2024 2008-01-06 Tobias Burnus <burnus@net-b.de>
2027 * io.c (check_io_constraints): Disallow unformatted I/O for
2030 2008-01-06 Tobias Burnus <burnus@net-b.de>
2033 * resolve.c (resolve_formal_arglist): Reject dummy procedure in
2034 ELEMENTAL functions.
2036 2008-01-06 Tobias Burnus <burnus@net-b.de>
2039 * interface.c (compare_actual_formal): Reject parameter
2040 actual to intent(out) dummy.
2042 2008-01-04 Tobias Burnus <burnus@net-b.de>
2045 * primary.c (match_varspec): Gobble whitespace before