1 2008-06-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
4 * trans-io.c (gfc_build_io_library_fndecls): Build declaration for
5 transfer_character_wide which includes passing in the character kind to
6 support wide character IO. (transfer_expr): If the kind == 4, create the
7 argument and build the call.
8 * gfortran.texi: Fix typo.
10 2008-06-13 Tobias Burnus <burnus@net-b.de>
13 * decl.c (do_parm): Handle init expression for len=*.
15 2008-06-12 Tobias Burnus <burnus@net-b.de>
18 * trans-intrinsic.c (gfc_conv_intrinsic_index_scan_verify):
19 Fix passing of the BACK= argument.
21 2008-06-10 Jerry DeLisle <jvdelisle@gcc.gnu.org>
23 * cpp.c: Add copyright notice.
24 * cpp.h: Add copyright notice.
26 2008-06-08 Janus Weil <janus@gcc.gnu.org>
29 * decl.c (match_procedure_decl): Correctly recognize if the interface
30 is an intrinsic procedure.
32 2008-06-08 Tobias Burnus <burnus@net-b.de>
35 * resolve.c (resolve_symbol): Copy more attributes for
36 PROCEDUREs with interfaces.
38 2008-06-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
42 * io.c (check_format): Add new error message for zero width.
43 Use new error message for FMT_A and with READ, FMT_G. Allow
44 FMT_G with WRITE except when -std=F95 and -std=F2003.
46 2008-06-07 Tobias Burnus <burnus@net-b.de>
49 * intrinsic.c (add_functions): Implement c_sizeof.
50 * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): Do not
51 create unneeded variable in the scalar case.
52 * intrinsic.texi: Add C_SIZEOF documentation.
54 2008-06-06 Tobias Burnus <burnus@net-b.de>
56 * intrinsic.texi (BESSEL_J1): Fix BES(S)EL_J1 typo.
58 2008-06-06 Jakub Jelinek <jakub@redhat.com>
60 * scanner.c (skip_free_comments, skip_fixed_comments): Handle tabs.
61 * parse.c (next_free): Allow tab after !$omp.
62 (decode_omp_directive): Handle !$omp task, !$omp taskwait
64 (case_executable): Add ST_OMP_TASKWAIT.
65 (case_exec_markers): Add ST_OMP_TASK.
66 (gfc_ascii_statement): Handle ST_OMP_TASK, ST_OMP_END_TASK and
68 (parse_omp_structured_block, parse_executable): Handle ST_OMP_TASK.
69 * gfortran.h (gfc_find_sym_in_expr): New prototype.
70 (gfc_statement): Add ST_OMP_TASK, ST_OMP_END_TASK and ST_OMP_TASKWAIT.
71 (gfc_omp_clauses): Add OMP_SCHED_AUTO to sched_kind,
72 OMP_DEFAULT_FIRSTPRIVATE to default_sharing. Add collapse and
74 (gfc_exec_op): Add EXEC_OMP_TASK and EXEC_OMP_TASKWAIT.
75 * f95-lang.c (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
76 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP, LANG_HOOKS_OMP_CLAUSE_DTOR,
77 LANG_HOOKS_OMP_PRIVATE_OUTER_REF): Define.
78 * trans.h (gfc_omp_clause_default_ctor): Add another argument.
79 (gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op,
80 gfc_omp_clause_dtor, gfc_omp_private_outer_ref): New prototypes.
81 * types.def (BT_ULONGLONG, BT_PTR_ULONGLONG,
82 BT_FN_BOOL_ULONGLONGPTR_ULONGLONGPTR,
83 BT_FN_BOOL_BOOL_ULL_ULL_ULL_ULLPTR_ULLPTR,
84 BT_FN_BOOL_BOOL_ULL_ULL_ULL_ULL_ULLPTR_ULLPTR,
85 BT_FN_VOID_PTR_PTR, BT_PTR_FN_VOID_PTR_PTR,
86 BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT): New.
87 (BT_BOOL): Use integer type with BOOL_TYPE_SIZE rather
88 than boolean_type_node.
89 * dump-parse-tree.c (gfc_show_omp_node): Handle EXEC_OMP_TASK,
90 EXEC_OMP_TASKWAIT, OMP_SCHED_AUTO, OMP_DEFAULT_FIRSTPRIVATE,
91 untied and collapse clauses.
92 (gfc_show_code_node): Handle EXEC_OMP_TASK and EXEC_OMP_TASKWAIT.
93 * trans.c (gfc_trans_code): Handle EXEC_OMP_TASK and
95 * st.c (gfc_free_statement): Likewise.
96 * resolve.c (gfc_resolve_blocks, resolve_code): Likewise.
97 (find_sym_in_expr): Rename to...
98 (gfc_find_sym_in_expr): ... this. No longer static.
99 (resolve_allocate_expr, resolve_ordinary_assign): Adjust caller.
100 * match.h (gfc_match_omp_task, gfc_match_omp_taskwait): New
102 * openmp.c (resolve_omp_clauses): Allow allocatable arrays in
103 firstprivate, lastprivate, reduction, copyprivate and copyin
105 (omp_current_do_code): Made static.
106 (omp_current_do_collapse): New variable.
107 (gfc_resolve_omp_do_blocks): Compute omp_current_do_collapse,
108 clear omp_current_do_code and omp_current_do_collapse on return.
109 (gfc_resolve_do_iterator): Handle collapsed do loops.
110 (resolve_omp_do): Likewise, diagnose errorneous collapsed do loops.
111 (OMP_CLAUSE_COLLAPSE, OMP_CLAUSE_UNTIED): Define.
112 (gfc_match_omp_clauses): Handle default (firstprivate),
113 schedule (auto), untied and collapse (n) clauses.
114 (OMP_DO_CLAUSES): Add OMP_CLAUSE_COLLAPSE.
115 (OMP_TASK_CLAUSES): Define.
116 (gfc_match_omp_task, gfc_match_omp_taskwait): New functions.
117 * trans-openmp.c (gfc_omp_private_outer_ref): New function.
118 (gfc_omp_clause_default_ctor): Add outer argument. For allocatable
119 arrays allocate them with the bounds of the outer var if outer
121 (gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op,
122 gfc_omp_clause_dtor): New functions.
123 (gfc_trans_omp_array_reduction): If decl is allocatable array,
124 allocate it with outer var's bounds in OMP_CLAUSE_REDUCTION_INIT
125 and deallocate it in OMP_CLAUSE_REDUCTION_MERGE.
126 (gfc_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
127 for assumed-size arrays.
128 (gfc_trans_omp_do): Add par_clauses argument. If dovar is
129 present in lastprivate clause and do loop isn't simple,
130 set OMP_CLAUSE_LASTPRIVATE_STMT. If dovar is present in
131 parallel's lastprivate clause, change it to shared and add
132 lastprivate clause to OMP_FOR_CLAUSES. Handle collapsed do loops.
133 (gfc_trans_omp_directive): Adjust gfc_trans_omp_do callers.
134 (gfc_trans_omp_parallel_do): Likewise. Move collapse clause to
135 OMP_FOR from OMP_PARALLEL.
136 (gfc_trans_omp_clauses): Handle OMP_SCHED_AUTO,
137 OMP_DEFAULT_FIRSTPRIVATE, untied and collapse clauses.
138 (gfc_trans_omp_task, gfc_trans_omp_taskwait): New functions.
139 (gfc_trans_omp_directive): Handle EXEC_OMP_TASK and
142 2008-06-04 Janus Weil <janus@gcc.gnu.org>
146 * resolve.c (resolve_symbol): Correctly copy the interface for a
147 PROCEDURE declaration.
149 2008-06-02 Janus Weil <janus@gcc.gnu.org>
152 * symbol.c (gfc_add_allocatable,gfc_add_dimension,
153 gfc_add_explicit_interface): Added checks.
154 * decl.c (attr_decl1): Added missing "var_locus".
155 * parse.c (parse_interface): Checking for errors.
157 2008-06-02 Daniel Kraft <d@domob.eu>
159 * gfortran.h: New statement-type ST_FINAL for FINAL declarations.
160 (struct gfc_symbol): New member f2k_derived.
161 (struct gfc_namespace): New member finalizers, for use in the above
162 mentioned f2k_derived namespace.
163 (struct gfc_finalizer): New type defined for finalizers linked list.
164 * match.h (gfc_match_final_decl): New function header.
165 * decl.c (gfc_match_derived_decl): Create f2k_derived namespace on
166 constructed symbol node.
167 (gfc_match_final_decl): New function to match a FINAL declaration line.
168 * parse.c (decode_statement): match-call for keyword FINAL.
169 (parse_derived): Parse CONTAINS section and accept FINAL statements.
170 * resolve.c (gfc_resolve_finalizers): New function to resolve (that is
171 in this case, check) a list of finalizer procedures.
172 (resolve_fl_derived): Call gfc_resolve_finalizers here.
173 * symbol.c (gfc_get_namespace): Initialize new finalizers to NULL.
174 (gfc_free_namespace): Free finalizers list.
175 (gfc_new_symbol): Initialize new f2k_derived to NULL.
176 (gfc_free_symbol): Free f2k_derived namespace.
177 (gfc_free_finalizer): New function to free a single gfc_finalizer node.
178 (gfc_free_finalizer_list): New function to free a linked list of
181 2008-06-02 Daniel Franke <franke.daniel@gmail.com>
185 * cpp.c (gfc_cpp_init): Do not initialize builtins if
186 processing already preprocessed input.
187 (gfc_cpp_preprocess): Finalize output with newline.
189 2008-05-31 Jerry DeLisle <jvdelisle@gcc.gnu.org>
191 * intrinsic.texi: Revert wrong commit.
193 2008-05-31 Steven G. Kargl <kargls@comcast.net>
195 * arith.c (gfc_arith_init_1): Remove now unused r and c variables.
196 Cleanup numerical inquiry function initialization.
197 (gfc_arith_done_1): Replace multiple mpfr_clear() invocations with
198 a single mpfr_clears().
199 (gfc_check_real_range): Re-arrange logic to eliminate multiple
200 unnecessary branching and assignments.
201 (gfc_arith_times): Use mpfr_clears() in preference to multiple
203 (gfc_arith_divide): Ditto.
204 (complex_reciprocal): Eliminate now unused variables a, re, im.
205 Cleanup the mpfr abuse. Use mpfr_clears() in preference to
206 multiple mpfr_clear().
207 (complex_pow): Fix comment whitespace. Use mpfr_clears() in
208 preference to multiple mpfr_clear().
209 * simplify.c (gfc_simplify_and): Remove blank line.
210 (gfc_simplify_atan2): Move error checking earlier to eliminate
211 a now unnecessay gfc_free_expr().
212 (gfc_simplify_bessel_j0): Remove unnecessary gfc_set_model_kind().
213 (gfc_simplify_bessel_j1): Ditto.
214 (gfc_simplify_bessel_jn): Ditto.
215 (gfc_simplify_bessel_y0): Ditto.
216 (gfc_simplify_bessel_y1): Ditto.
217 (gfc_simplify_bessel_yn): Ditto.
218 (only_convert_cmplx_boz): Eliminate unnecessary duplicate code, and
219 combine nested if statement rational expressions.
220 (gfc_simplify_cos): Use mpfr_clears() in preference to multiple
222 (gfc_simplify_exp): Ditto.
223 (gfc_simplify_fraction): Move gfc_set_model_kind() to after the
224 special case of 0. Use mpfr_clears() in preference to multiple
226 (gfc_simplify_gamma): Eliminate unnecessary gfc_set_model_kind().
227 (gfc_simplify_lgamma): Ditto.
228 (gfc_simplify_log10): Ditto.
229 (gfc_simplify_log): Move gfc_set_model_kind () inside switch
230 statement. Use mpfr_clears() in preference to multiple mpfr_clear().
231 (gfc_simplify_mod): Eliminate now unused variables quot, iquot,
232 and term. Simplify the mpfr magic.
233 (gfc_simplify_modulo): Ditto.
234 (gfc_simplify_nearest): Eliminate unnecessary gfc_set_model_kind().
235 (gfc_simplify_scale): Use mpfr_clears() in preference to multiple
237 (gfc_simplify_sin): Ditto
238 (gfc_simplify_sqrt): Ditto
239 (gfc_simplify_set_exponent): Move gfc_set_model_kind() to after the
240 special case of 0. Use mpfr_clears() in preference to multiple
243 2008-05-29 Daniel Franke <franke.daniel@gmail.com>
246 * Make-lang.in (F95_OBJS): Added dependency on FORTRAN_TARGET_OBJS.
248 2008-05-29 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
250 * scanner.c (load_line): Add first_char argument. Don't call ungetc.
251 (gfc_read_orig_filename): Adjust call to load_line. Don't call
253 (load_file): Adjust call to load_line.
255 2008-05-28 Janus Weil <janus@gcc.gnu.org>
259 * interface.c (gfc_procedure_use): Enable argument checking for
260 external procedures with explicit interface.
261 * symbol.c (check_conflict): Fix conflict checking for externals.
262 (copy_formal_args): Fix handling of arrays.
263 * resolve.c (resolve_specific_f0, resolve_specific_s0): Fix handling
265 * parse.c (parse_interface): Non-abstract INTERFACE statement implies
268 2008-05-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
271 * intrinsic.c (gfc_convert_chartype): Don't mark conversion
273 * trans-array.c (gfc_trans_array_ctor_element): Divide element
274 size by the size of one character to obtain length.
275 * iresolve.c (gfc_resolve_cshift): Call the _char4 variant when
277 (gfc_resolve_eoshift): Likewise.
278 * trans-intrinsic.c (gfc_conv_intrinsic_ctime): Minor beautification.
279 (gfc_conv_intrinsic_fdate): Minor beautification.
280 (gfc_conv_intrinsic_ttynam): Minor beautification.
281 (gfc_conv_intrinsic_minmax_char): Allow all character kinds.
282 (size_of_string_in_bytes): New function.
283 (gfc_conv_intrinsic_size): Call size_of_string_in_bytes for
284 character expressions.
285 (gfc_conv_intrinsic_sizeof): Likewise.
286 (gfc_conv_intrinsic_array_transfer): Likewise.
287 (gfc_conv_intrinsic_trim): Allow all character kinds. Minor
289 (gfc_conv_intrinsic_repeat): Fix comment typo.
290 * simplify.c (gfc_convert_char_constant): Take care of conversion
291 of array constructors.
293 2008-05-27 Tobias Burnus <burnus@net-b.de>
296 * trans-array.c (gfc_set_loop_bounds_from_array_spec):
297 Add missing fold_convert.
299 2008-05-26 Daniel Franke <franke.daniel@gmail.com>
301 * fortran/cpp.c (cpp_define_builtins): Remove usage of TARGET_* macros,
304 2008-05-26 Daniel Franke <franke.daniel@gmail.com>
307 * lang.opt (A, C, CC, D, E, H, P, U, cpp, d, fworking-directory,
308 imultilib, iprefix, iquote, isysroot, isystem, nocpp, nostdinc,
309 o, undef, v): New options.
310 * options.c (gfc_init_options): Also initialize preprocessor
312 (gfc_post_options): Also handle post-initialization of preprocessor
314 (gfc_handle_option): Check if option is a preprocessor option.
315 If yes, let gfc_cpp_handle_option() handle the option.
316 * lang-specs.h: Reorganized to handle new options.
317 * scanner.c (gfc_new_file): Read temporary file instead of
318 input source if preprocessing is enabled.
319 * f95-lang.c (gfc_init): Initialize preprocessor.
320 (gfc_finish): Clean up preprocessor.
323 * Make-lang.in: Added new objects and dependencies.
324 * gfortran.texi: Updated section "Preprocessing and
325 conditional compilation".
326 * invoke.texi: Added new section "Preprocessing Options",
327 listed and documented the preprocessing options handled
330 2008-05-25 Tobias Burnus <burnus@net-b.de>
333 * trans-expr.c (gfc_conv_function_call): Remove library
334 call for c_f_pointer with scalar Fortran pointers and for
337 2008-05-21 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
340 * iresolve.c (check_charlen_present): Don't force the rank to 1.
342 2008-05-19 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
345 * trans-expr.c (gfc_conv_string_tmp): Pick the correct type for
346 the temporary variable.
348 2008-05-19 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
350 * simplify.c (gfc_simplify_dble, gfc_simplify_real): Initialize
351 result variable to avoid warnings.
353 2008-05-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
355 * intrinsic.c (char_conversions, ncharconv): New static variables.
356 (find_char_conv): New function.
357 (add_functions): Add simplification functions for ADJUSTL and
358 ADJUSTR. Don't check the kind of their argument. Add checking for
359 LGE, LLE, LGT and LLT.
360 (add_subroutines): Fix argument type for SLEEP. Fix argument name
362 (add_char_conversions): New function.
363 (gfc_intrinsic_init_1): Call add_char_conversions.
364 (gfc_intrinsic_done_1): Free char_conversions.
365 (check_arglist): Use kind == 0 as a signal that we don't want
366 the kind value to be checked.
367 (do_simplify): Also simplify character functions.
368 (gfc_convert_chartype): New function
369 * trans-array.c (gfc_trans_array_ctor_element): Don't force the
370 use of default character type.
371 (gfc_trans_array_constructor_value): Likewise.
372 (get_array_ctor_var_strlen): Use integer kind to build an integer
373 instead of a character kind!
374 (gfc_build_constant_array_constructor): Don't force the use of
375 default character type.
376 (gfc_conv_loop_setup): Likewise.
377 * trans-expr.c (gfc_conv_string_tmp): Don't force the use of
378 default character type. Allocate enough memory for wide strings.
379 (gfc_conv_concat_op): Make sure operand kind are the same.
380 (string_to_single_character): Remove gfc_ prefix. Reindent.
381 Don't force the use of default character type.
382 (gfc_conv_scalar_char_value): Likewise.
383 (gfc_build_compare_string): Call string_to_single_character.
384 (fill_with_spaces): New function
385 (gfc_trans_string_copy): Add kind arguments. Use them to deal
386 with wide character kinds.
387 (gfc_conv_statement_function): Whitespace fix. Call
388 gfc_trans_string_copy with new kind arguments.
389 (gfc_conv_substring_expr): Call gfc_build_wide_string_const
390 instead of using gfc_widechar_to_char.
391 (gfc_conv_string_parameter): Don't force the use of default
393 (gfc_trans_scalar_assign): Pass kind args to gfc_trans_string_copy.
394 * intrinsic.h (gfc_check_lge_lgt_lle_llt, gfc_convert_char_constant,
395 gfc_resolve_adjustl, gfc_resolve_adjustr): New prototypes.
396 * decl.c (gfc_set_constant_character_len): Don't assert the
397 existence of a single character kind.
398 * trans-array.h (gfc_trans_string_copy): New prototype.
399 * gfortran.h (gfc_check_character_range, gfc_convert_chartype):
401 * error.c (print_wide_char_into_buffer): New function lifting
402 code from gfc_print_wide_char. Fix order to output '\x??' instead
404 (gfc_print_wide_char): Call print_wide_char_into_buffer.
405 (show_locus): Call print_wide_char_into_buffer with buffer local
407 * trans-const.c (gfc_build_wide_string_const): New function.
408 (gfc_conv_string_init): Deal with wide characters strings
410 (gfc_conv_constant_to_tree): Call gfc_build_wide_string_const.
411 * trans-stmt.c (gfc_trans_label_assign): Likewise.
412 (gfc_trans_character_select): Deal with wide strings.
413 * expr.c (gfc_check_assign): Allow conversion between character
415 * trans-const.h (gfc_build_wide_string_const): New prototype.
416 * trans-types.c (gfc_get_character_type_len_for_eltype,
417 gfc_get_character_type_len): Create too variants of the old
418 gfc_get_character_type_len, one getting kind argument and the
419 other one directly taking a type tree.
420 * trans.h (gfor_fndecl_select_string_char4,
421 gfor_fndecl_convert_char1_to_char4,
422 gfor_fndecl_convert_char4_to_char1): New prototypes.
423 * trans-types.h (gfc_get_character_type_len_for_eltype): New
425 * resolve.c (resolve_operator): Exit early when kind mismatches
426 are detected, because that makes us issue an error message later.
427 (validate_case_label_expr): Fix wording of error message.
428 * iresolve.c (gfc_resolve_adjustl, gfc_resolve_adjustr): New
430 (gfc_resolve_pack): Call _char4 variants of library function
431 when dealing with wide characters.
432 (gfc_resolve_reshape): Likewise.
433 (gfc_resolve_spread): Likewise.
434 (gfc_resolve_transpose): Likewise.
435 (gfc_resolve_unpack): Likewise.
436 * target-memory.c (size_character): Take character kind bit size
437 correctly into account (not that it changes anything for now, but
439 (gfc_encode_character): Added gfc_ prefix. Encoding each
440 character of a string by calling native_encode_expr for the
441 corresponding unsigned integer.
442 (gfc_target_encode_expr): Add gfc_ prefix to encode_character.
443 * trans-decl.c (gfc_build_intrinsic_function_decls): Build
444 gfor_fndecl_select_string_char4, gfor_fndecl_convert_char1_to_char4
445 and gfor_fndecl_convert_char4_to_char1.
446 * target-memory.h (gfc_encode_character): New prototype.
447 * arith.c (gfc_check_character_range): New function.
448 (eval_intrinsic): Allow non-default character kinds.
449 * check.c (gfc_check_access_func): Only allow default
450 character kind arguments.
451 (gfc_check_chdir): Likewise.
452 (gfc_check_chdir_sub): Likewise.
453 (gfc_check_chmod): Likewise.
454 (gfc_check_chmod_sub): Likewise.
455 (gfc_check_lge_lgt_lle_llt): New function.
456 (gfc_check_link): Likewise.
457 (gfc_check_link_sub): Likewise.
458 (gfc_check_symlnk): Likewise.
459 (gfc_check_symlnk_sub): Likewise.
460 (gfc_check_rename): Likewise.
461 (gfc_check_rename_sub): Likewise.
462 (gfc_check_fgetputc_sub): Likewise.
463 (gfc_check_fgetput_sub): Likewise.
464 (gfc_check_stat): Likewise.
465 (gfc_check_stat_sub): Likewise.
466 (gfc_check_date_and_time): Likewise.
467 (gfc_check_ctime_sub): Likewise.
468 (gfc_check_fdate_sub): Likewise.
469 (gfc_check_gerror): Likewise.
470 (gfc_check_getcwd_sub): Likewise.
471 (gfc_check_getarg): Likewise.
472 (gfc_check_getlog): Likewise.
473 (gfc_check_hostnm): Likewise.
474 (gfc_check_hostnm_sub): Likewise.
475 (gfc_check_ttynam_sub): Likewise.
476 (gfc_check_perror): Likewise.
477 (gfc_check_unlink): Likewise.
478 (gfc_check_unlink_sub): Likewise.
479 (gfc_check_system_sub): Likewise.
480 * primary.c (got_delim): Perform correct character range checking
482 * trans-intrinsic.c (gfc_conv_intrinsic_conversion): Generate
483 calls to library functions convert_char4_to_char1 and
484 convert_char1_to_char4 for character conversions.
485 (gfc_conv_intrinsic_char): Allow all character kings.
486 (gfc_conv_intrinsic_strcmp): Fix whitespace.
487 (gfc_conv_intrinsic_repeat): Take care of all character kinds.
488 * intrinsic.texi: For all GNU intrinsics accepting character
489 arguments, mention that they're restricted to the default kind.
490 * simplify.c (simplify_achar_char): New function.
491 (gfc_simplify_achar, gfc_simplify_char): Call simplify_achar_char.
492 gfc_simplify_ichar): Don't error out for wide characters.
493 (gfc_convert_char_constant): New function.
495 2008-05-18 Steven G. Kargl <kargls@comcast.net>
498 * symbol.c (check_conflict): Issue errors for abuse of PUBLIC, PRIVATE,
500 * resolve.c (gfc_verify_binding_labels): Fix NULL pointer dereference.
502 2008-05-17 Tobias Burnus <burnus@net-b.de>
504 * intrinsic.texi: Correct description of GET_COMMAND_ARGUMENT
505 and GET_ENVIRONMENT_VARIABLE; fix keyword= name for GETENV,
506 GETLOG, GMTIME, HOSTNM, IRAND, ITIME, KILL.
507 Move LOG_GAMMA after LOG10.
509 2008-05-17 Tobias Burnus <burnus@net-b.de>
511 * intrinsic.c (add_functions): Change FLUSH(C) to FLUSH(UNIT).
512 * intrinsic.texi: Change INTEGER(*) to INTEGER; fix keyword= name for
513 ABS, ADJUSTL, AINT, ALLOCATED, ANINT, ASSOCIATED, C_ASSOCIATED,
514 CEILING, DBLE, DFLOAT, DOT_PRODUCT, DREAL, FLOAT, FLOOR, GET_COMMAND.
516 2008-05-16 Paul Thomas <pault@gcc.gnu.org>
520 * trans-stmt.c (gfc_trans_where): Tighten up the dependency
521 check for calling gfc_trans_where_3.
524 * trans-stmt.c (gfc_trans_where_2): Set the mask size to zero
525 if it is calculated to be negative.
528 * trans-stmt.c (gfc_trans_where_3, gfc_trans_where_assign): Set
529 ss->where for scalar right hand sides.
530 * trans-array.c (gfc_add_loop_ss_code): If ss->where is set do
531 not evaluate scalars outside the loop. Clean up whitespace.
532 * trans.h : Add a bitfield 'where' to gfc_ss.
534 2008-05-16 Tobias Burnus <burnus@net-b.de>
536 * libgfortran.h: Increase GFC_MAX_DIMENSIONS to 15.
537 * array.c (gfc_match_array_spec): Error with -std=f2003 if rank > 7.
539 2008-04-16 Daniel Kraft <d@domob.eu>
542 * gfortran.h: Added field "length_from_typespec" to gfc_charlength.
543 * aray.c (gfc_match_array_constructor): Added code to parse typespec.
544 (check_element_type, check_constructor_type, gfc_check_constructor_type):
545 Extended to support explicit typespec on constructor.
546 (gfc_resolve_character_array_constructor): Pad strings correctly for
547 explicit, constant character length.
548 * trans-array.c: New static global variable "typespec_chararray_ctor"
549 (gfc_trans_array_constructor): New code to support explicit but dynamic
552 2008-05-16 Jerry DeLisle <jvdelisle@gcc.gnu.org>
555 * decl.c (match_attr_spec): Check for matching pairs of parenthesis.
556 * expr.c (gfc_specification_expr): Supplement the error message with the
558 * resolve.c (gfc_resolve_index): Likewise.
559 * match.c (gfc_match_parens): Clarify error message with "at or before".
560 (gfc_match_do): Check for matching pairs of parenthesis.
562 2008-05-16 Tobias Burnus <burnus@net-b.de
564 * intrinsic.texi: Write Fortran 77/90/95 instead of F77/90/95;
565 add missing KIND argument to ACHAR and NINT; and state that
566 the KIND argument is a F2003 extension for ACHAR, COUNT, IACHAR,
567 ICHAR, INDEX, LBOUND, LEN, LEN_TRIM, SCAN, SIZE, UBOUND, VERIFY.
569 2008-05-16 Daniel Kraft <d@domob.eu>
571 * primary.c: New private structure "gfc_structure_ctor_component".
572 (gfc_free_structure_ctor_component): New helper function.
573 (gfc_match_structure_constructor): Extended largely to support named
574 arguments and default initialization for structure constructors.
576 2008-05-15 Steven G. Kargl <kargls@comcast.net>
578 * simplify.c (gfc_simplify_dble, gfc_simplify_float,
579 simplify_bound, gfc_simplify_nearest, gfc_simplify_real): Plug
580 possible memory leaks.
581 (gfc_simplify_reshape): Plug possible memory leaks and dereferencing
584 2008-05-15 Steven G. Kargl <kargls@comcast.net>
587 * simplify.c (gfc_simplify_int, gfc_simplify_intconv): Replaced hand
588 rolled integer conversion with gfc_int2int, gfc_real2int, and
590 (gfc_simplify_intconv): Renamed to simplify_intconv.
592 2008-05-15 Steven G. Kargl, <kargl@comcast.net>
593 * gfortran.dg/and_or_xor.f90: New test
595 * fortran/simplify.c (gfc_simplify_and, gfc_simplify_or,
596 gfc_simplify_xor): Don't range check logical results.
598 2008-05-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
600 * trans-expr.c (gfc_conv_concat_op): Take care of nondefault
602 (gfc_build_compare_string): Add kind argument and use it.
603 (gfc_conv_statement_function): Fix indentation.
604 * gfortran.h (gfc_character_info): New structure.
605 (gfc_character_kinds): New array.
606 * trans-types.c (gfc_character_kinds, gfc_character_types,
607 gfc_pcharacter_types): New array.
608 (gfc_init_kinds): Fill character kinds array.
609 (validate_character): Take care of nondefault character kinds.
610 (gfc_build_uint_type): New function.
611 (gfc_init_types): Take care of nondefault character kinds.
612 (gfc_get_char_type, gfc_get_pchar_type): New functions.
613 (gfc_get_character_type_len): Use gfc_get_char_type.
614 * trans.h (gfc_build_compare_string): Adjust prototype.
615 (gfor_fndecl_compare_string_char4, gfor_fndecl_concat_string_char4,
616 gfor_fndecl_string_len_trim_char4, gfor_fndecl_string_index_char4,
617 gfor_fndecl_string_scan_char4, gfor_fndecl_string_verify_char4,
618 gfor_fndecl_string_trim_char4, gfor_fndecl_string_minmax_char4,
619 gfor_fndecl_adjustl_char4, gfor_fndecl_adjustr_char4): New
621 * trans-types.h (gfc_get_char_type, gfc_get_pchar_type): New
623 * trans-decl.c (gfor_fndecl_compare_string_char4,
624 gfor_fndecl_string_len_trim_char4, gfor_fndecl_string_index_char4,
625 gfor_fndecl_string_scan_char4, gfor_fndecl_string_verify_char4,
626 gfor_fndecl_string_trim_char4, gfor_fndecl_string_minmax_char4,
627 gfor_fndecl_adjustl_char4, gfor_fndecl_adjustr_char4,
628 gfor_fndecl_concat_string_char4): New function decls.
629 (gfc_build_intrinsic_function_decls): Define new *_char4 function
631 * trans-intrinsic.c (gfc_conv_intrinsic_minmax_char,
632 gfc_conv_intrinsic_len_trim, gfc_conv_intrinsic_ichar,
633 gfc_conv_intrinsic_strcmp, gfc_conv_intrinsic_trim,
634 gfc_conv_intrinsic_function): Deal with nondefault character kinds.
636 2008-05-15 Sa Liu <saliu@de.ibm.com>
638 * iso-c-binding.def: Add standard parameter to macro NAMED_INTCST.
639 All existing NAMED_INTCST definitions has standard GFC_STD_F2003,
640 c_int128_t, c_int_least128_t and c_int_fast128_t are added as
642 * iso-fortran-evn.def: Add standard parameter GFC_STD_F2003
643 to macro NAMED_INTCST.
644 * symbol.c (std_for_isocbinding_symbol): New helper function to
645 return the standard that supports this isocbinding symbol.
646 (generate_isocbinding_symbol): Do not generate GNU extension symbols
647 if std=f2003. Add new parameter to NAMED_INTCST.
648 * module.c (use_iso_fortran_env_module): Add new parameter to
649 NAMED_INTCST and new field standard to struct intmod_sym.
650 * gfortran.h: Add new parameter to NAMED_INTCST.
651 * trans-types.c (init_c_interop_kinds): Add new parameter to
653 * intrinsic.texi: Documented new types C_INT128_T, C_INT_LEASE128_T
656 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
659 * trans-decl.c (gfc_build_dummy_array_decl): Don't repack
660 arrays that have the TARGET attribute.
662 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
665 * simplify.c (only_convert_cmplx_boz): New function.
666 (gfc_simplify_cmplx, gfc_simplify_complex, gfc_simplify_dcmplx):
667 Call only_convert_cmplx_boz.
669 2008-05-14 Paul Thomas <pault@gcc.gnu.org>
672 * interface.c (compare_actual_formal): Do not check sizes if the
673 actual is BT_PROCEDURE.
675 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
678 * trans-array.c (gfc_conv_ss_startstride): Any negative size is
679 the same as zero size.
680 (gfc_conv_loop_setup): Fix size calculation.
682 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
685 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Correctly
686 handle zero-size sections.
688 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
691 * scanner.c (preprocessor_line): Allocate enough memory for a
694 2008-05-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
697 * target-memory.c (gfc_target_expr_size): Correctly treat
699 (gfc_target_encode_expr): Likewise.
700 (gfc_interpret_complex): Whitespace change.
702 2008-05-11 Thomas Koenig <tkoenig@gcc.gnu.org>
705 * trans.c (gfc_call_malloc): If size equals zero, allocate one
706 byte; don't return a null pointer.
708 2008-05-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
711 * module.c (quote_string): Fix sprintf format.
713 2008-05-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
716 * module.c (quote_string, unquote_string,
717 mio_allocated_wide_string): New functions.
718 (mio_expr): Call mio_allocated_wide_string where needed.
720 2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>
722 * trans-decl.c (gfc_get_extern_function_decl, build_function_decl):
723 Rename DECL_IS_PURE to DECL_PURE_P.
725 2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
727 * arith.c: (gfc_arith_concat, gfc_compare_string,
728 gfc_compare_with_Cstring, hollerith2representation,
729 gfc_hollerith2int, gfc_hollerith2real, gfc_hollerith2complex,
730 gfc_hollerith2character, gfc_hollerith2logical): Use wide
731 characters for character constants.
732 * data.c (create_character_intializer): Likewise.
733 * decl.c (gfc_set_constant_character_len): Likewise.
734 * dump-parse-tree.c (show_char_const): Correctly dump wide
736 error.c (print_wide_char): Rename into gfc_print_wide_char.
737 (show_locus): Adapt to new prototype of gfc_print_wide_char.
738 expr.c (free_expr0): Representation is now disjunct from
739 character string value, so we always free it.
740 (gfc_copy_expr, find_substring_ref, gfc_simplify_expr): Adapt
741 to wide character strings.
742 * gfortran.h (gfc_expr): Make value.character.string a wide string.
743 (gfc_wide_toupper, gfc_wide_strncasecmp, gfc_wide_memset,
744 gfc_widechar_to_char, gfc_char_to_widechar): New prototypes.
745 (gfc_get_wide_string): New macro.
746 (gfc_print_wide_char): New prototype.
747 * io.c (format_string): Make a wide string.
748 (next_char, gfc_match_format, compare_to_allowed_values,
749 gfc_match_open): Deal with wide strings.
750 * module.c (mio_expr): Convert between wide strings and ASCII ones.
751 * primary.c (match_hollerith_constant, match_charkind_name):
753 * resolve.c (build_default_init_expr): Likewise.
754 * scanner.c (gfc_wide_toupper, gfc_wide_memset,
755 gfc_char_to_widechar): New functions.
756 (wide_strchr, gfc_widechar_to_char, gfc_wide_strncasecmp):
757 Changes in prototypes.
758 (gfc_define_undef_line, load_line, preprocessor_line,
759 include_line, load_file, gfc_read_orig_filename): Handle wide
761 * simplify.c (gfc_simplify_achar, gfc_simplify_adjustl,
762 gfc_simplify_adjustr, gfc_simplify_char, gfc_simplify_iachar,
763 gfc_simplify_ichar, simplify_min_max, gfc_simplify_new_line,
764 gfc_simplify_repeat): Handle wide strings.
765 (wide_strspn, wide_strcspn): New helper functions.
766 (gfc_simplify_scan, gfc_simplify_trim, gfc_simplify_verify):
768 * symbol.c (generate_isocbinding_symbol): Likewise.
769 * target-memory.c (size_character, gfc_target_expr_size,
770 encode_character, gfc_target_encode_expr, gfc_interpret_character,
771 gfc_target_interpret_expr): Handle wide strings.
772 * trans-const.c (gfc_conv_string_init): Lower wide strings to
774 (gfc_conv_constant_to_tree): Likewise.
775 * trans-expr.c (gfc_conv_substring_expr): Handle wide strings.
776 * trans-io.c (gfc_new_nml_name_expr): Likewise.
777 * trans-stmt.c (gfc_trans_label_assign): Likewise.
779 2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
781 * simplify.c (gfc_simplify_bessel_j0,gfc_simplify_bessel_j1,
782 gfc_simplify_bessel_jn,gfc_simplify_bessel_y0,
783 gfc_simplify_bessel_y1,gfc_simplify_bessel_yn): Mark arguments
784 with ATTRIBUTE_UNUSED.
786 2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
788 * check.c (gfc_check_sizeof): Switch to ATTRIBUTE_UNUSED.
789 * simplify.c (gfc_simplify_lgamma): Likewise.
791 2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
793 * openmp.c (gfc_match_omp_eos): Use gfc_next_ascii_char and
795 * decl.c (gfc_match_kind_spec, gfc_match_type_spec,
796 gfc_match_implicit_none, match_implicit_range, gfc_match_implicit,
797 match_string_p, match_attr_spec, gfc_match_suffix,
798 match_procedure_decl, gfc_match_entry, gfc_match_subroutine):
800 * gfortran.h (gfc_char_t): New type.
801 (gfc_linebuf): Make line member a gfc_char_t.
802 (locus): Make nextc member a gfc_char_t.
803 (gfc_wide_is_printable, gfc_wide_is_digit, gfc_wide_fits_in_byte,
804 gfc_wide_tolower, gfc_wide_strlen, gfc_next_ascii_char,
805 gfc_peek_ascii_char, gfc_check_digit): New prototypes.
806 * error.c (print_wide_char): New function.
807 (show_locus): Use print_wide_char and gfc_wide_strlen.
808 * io.c (next_char): Use gfc_char_t type.
809 (match_io): Use gfc_peek_ascii_char and gfc_next_ascii_char.
810 * match.c (gfc_match_parens, gfc_match_eos,
811 gfc_match_small_literal_int, gfc_match_name, gfc_match_name_C,
812 gfc_match_intrinsic_op, gfc_match_char, gfc_match_return,
813 gfc_match_common): Likewise.
814 * match.h (gfc_match_special_char): Change prototype.
815 * parse.c (decode_specification_statement, decode_statement,
816 decode_omp_directive, next_free, next_fixed): Use
817 gfc_peek_ascii_char and gfc_next_ascii_char.
818 * primary.c (gfc_check_digit): Change name.
819 (match_digits, match_hollerith_constant, match_boz_constant,
820 match_real_constant, next_string_char, match_charkind_name,
821 match_string_constant, match_logical_constant_string,
822 match_complex_constant, match_actual_arg, match_varspec,
823 gfc_match_rvalue, match_variable): Use gfc_peek_ascii_char and
825 * scanner.c (gfc_wide_fits_in_byte, wide_is_ascii,
826 gfc_wide_is_printable, gfc_wide_tolower, gfc_wide_is_digit,
827 gfc_wide_is_digit, wide_atoi, gfc_wide_strlen, wide_strcpy,
828 wide_strchr, widechar_to_char, wide_strncmp, wide_strncasecmp,
829 gfc_next_ascii_char, gfc_peek_ascii_char):
831 (next_char, gfc_define_undef_line, skip_free_comments,
832 gfc_next_char_literal, gfc_next_char, gfc_peek_char,
833 gfc_error_recovery, load_line, preprocessor_line, include_line,
834 load_file, gfc_read_orig_filename): Use gfc_char_t for source
835 characters and the {gfc_,}wide_* functions to manipulate wide
838 2008-05-06 Tobias Burnus <burnus@net-b.de>
841 * intrinsic.c (add_functions): Call gfc_simplify_bessel_*.
842 * intrinsic.h: Add prototypes for gfc_simplify_bessel_*.
843 * simplify.c (gfc_simplify_bessel_j0,gfc_simplify_bessel_j1,
844 gfc_simplify_bessel_jn,gfc_simplify_bessel_y0,
845 gfc_simplify_bessel_y1,gfc_simplify_bessel_yn): New.
847 2008-05-03 Janus Weil <jaydub66@gmail.com>
849 * misc.c (gfc_clear_ts): Set interface to NULL.
851 2008-05-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
854 * gfortran.h: Add extra_comma pointer to gfc_dt structure. Add iokind to
855 gfc_expr value union. Add io_kind enum to here from io.c.
856 * io.c (gfc_free_dt): Free extra_comma.
857 (gfc_resolve_dt): If an extra comma was encountered and io_unit is type
858 BT_CHARACTER, resolve to format_expr and set default unit. Error if
859 io_kind is M_WRITE. (match_io): Match the extra comma and set new
860 pointer, extra_comma.
862 2008-05-01 Bud Davis <bdavis9659@sbcglobal.net>
865 * simplify.c (gfc_simplify_index): Check for direction argument
868 2008-05-01 Janus Weil <jaydub66@gmail.com>
870 * gfortran.h (struct gfc_symbol): Moving "interface" member to
871 gfc_typespec (plus fixing a small docu error).
872 * interface.c (gfc_procedure_use): Ditto.
873 * decl.c (match_procedure_decl): Ditto.
874 * resolve.c (resolve_specific_f0,
875 resolve_specific_f0, resolve_symbol): Ditto.
877 2008-04-30 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
879 * intrinsic.c (add_functions): Add SELECTED_CHAR_KIND intrinsic.
880 * intrinsic.h (gfc_check_selected_char_kind,
881 gfc_simplify_selected_char_kind): New prototypes.
882 * gfortran.h (gfc_isym_id): Add GFC_ISYM_SC_KIND.
883 * trans.h (gfor_fndecl_sc_kind): New function decl.
884 * trans-decl.c (gfor_fndecl_sc_kind): Build new decl.
885 * arith.c (gfc_compare_with_Cstring): New function.
886 * arith.h (gfc_compare_with_Cstring): New prototype.
887 * check.c (gfc_check_selected_char_kind): New function.
888 * primary.c (match_string_constant, match_kind_param): Mark
889 symbols used as literal constant kind param as referenced.
890 * trans-intrinsic.c (gfc_conv_intrinsic_sc_kind): New function.
891 (gfc_conv_intrinsic_function): Call gfc_conv_intrinsic_sc_kind.
892 * intrinsic.texi (SELECTED_CHAR_KIND): Document new intrinsic.
893 * simplify.c (gfc_simplify_selected_char_kind): New function.
895 2008-04-28 Paul Thomas <pault@gcc.gnu.org>
898 * module.c (find_symbol): Do not return a result for a symbol
899 that has been renamed in another module.
901 2008-04-26 George Helffrich <george@gcc.gnu.org>
905 * trans-common.c (create_common): Add decl to function
906 chain (if inside one) to preserve identifier scope in debug output.
908 2008-04-25 Jan Hubicka <jh@suse.cz>
910 * trans-decl.c (trans_function_start): Update.
912 2008-04-25 Tobias Burnus <burnus@net-b.de>
913 Daniel Franke <franke.daniel@gmail.com>
916 * gfortranspec.c (lang_specific_driver): Deprecate
917 -M option; fix ICE when "-M" is last argument and
919 * options.c (gfc_handle_module_path_options):
920 Use -J instead of -M in error messages.
921 * invoke.texi: Mark -M as depecated.
923 2008-04-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
924 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
927 * trans-instrinsic.c (gfc_conv_intrinsic_minmaxloc): Correctly adjust
930 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
932 * trans-expr.c (gfc_conv_structure): Don't set TREE_INVARIANT.
933 * trans-array.c (gfc_build_null_descriptor): Don't set TREE_INVARIANT.
934 (gfc_trans_array_constructor_value): Don't set TREE_INVARIANT.
935 (gfc_build_constant_array_constructor): Don't set TREE_INVARIANT.
936 (gfc_conv_array_initializer): Don't set TREE_INVARIANT.
937 * trans-common.c (get_init_field): Don't set TREE_INVARIANT.
938 (create_common): Don't set TREE_INVARIANT.
939 * trans-stmt.c (gfc_trans_character_select): Don't set TREE_INVARIANT.
940 * trans-decl.c (gfc_generate_function_code): Don't set TREE_INVARIANT.
942 2008-04-21 Steve Ellcey <sje@cup.hp.com>
944 * f95-lang.c (gfc_init_decl_processing): use ptr_mode instead of Pmode.
946 2008-04-21 Daniel Franke <franke.daniel@gmail.com>
949 * gfortranspec.c (lookup_option): Properly handle separated arguments
950 in -J option, print missing argument message when necessary.
952 2008-04-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>
955 * scanner.c (skip_fixed_comments): Update continue_line when comment is
956 detected. (gfc_next_char_literal): Likewise.
958 2008-04-19 Paul Thomas <pault@gcc.gnu.org>
963 * trans_array.c (gfc_trans_array_constructor): Temporarily
964 realign loop, if loop->from is not zero, before creating
965 the temporary array and provide an offset.
968 * trans-decl.c (gfc_init_default_dt): Add gfc_ prefix to name
969 and allow for NULL body. Change all references from
970 init_default_dt to gfc_init_default_dt.
971 * trans.h : Add prototype for gfc_init_default_dt.
972 * trans-array.c (gfc_trans_deferred_vars): After nullification
973 call gfc_init_default_dt for derived types with allocatable
976 2008-04-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
979 * trans-common.c (create_common): Revert patch causing regression.
981 2008-04-16 Jerry DeLisle <jvdelisle@gcc.gnu.org>
984 * iresolve.c (gfc_resolve_eoshift): Check for NULL symtree in test for
985 optional argument attribute.
987 2008-04-16 Paul Thomas <pault@gcc.gnu.org>
990 * trans-intrinsic.c (gfc_conv_intrinsic_char): Even though KIND
991 is not used, the argument must be converted.
993 2008-04-16 Jakub Jelinek <jakub@redhat.com>
996 * f95-lang.c (gfc_init_builtin_functions): Make sure
997 BUILT_IN_SINCOS{,F,L} types aren't varargs.
999 2008-04-15 Paul Thomas <pault@gcc.gnu.org>
1002 * expr.c (scalarize_intrinsic_call): Reorder identification of
1003 array argument so that if one is not found a segfault does not
1004 occur. Return FAILURE if all scalar arguments.
1006 2008-04-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1007 Tobias Burnus <burnus@net-b.de>
1010 * options.c (gfc_init_options): Set the default maximum continuation
1011 lines to 255 for both free and fixed form source for warnings.
1012 (gfc_handle_option): Set -std=f95 fixed form max continuations to 19 and
1013 the -std=f95 free form max continuations to 39 for warnings.
1014 * scanner.c (gfc_next_char_literal): Adjust the current_line number only
1015 if it is less than the current locus.
1017 2008-04-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1019 PR fortran/25829 28655
1020 * io.c (io_tag): Add new tags for decimal, encoding, asynchronous,
1021 round, sign, and id. (match_open_element): Match new tags.
1022 (gfc_resolve_open): Resolve new tags. (gfc_match_open): Enable encoding
1023 for DEFAULT only. Update error messages. (match_dt_element): Fix match
1024 tag for asynchronous. Update error messages. (gfc_free_inquire): Free
1025 new expressions. (match_inquire_element): Match new tags.
1026 (gfc_match_inquire): Add constraint for ID and PENDING.
1027 (gfc_resolve_inquire): Resolve new tags.
1028 * trans-io.c (gfc_trans_inquire): Clean up whitespace and fix setting of
1029 mask for ID parameter.
1030 * ioparm.def: Fix order of parameters for pending, round, and sign.
1031 NOTE: These must line up with the definitions in libgfortran/io/io.h. or
1034 2008-04-06 Paul Thomas <pault@gcc.gnu.org>
1037 * expr.c (scalarize_intrinsic_call): Identify which argument is
1038 an array and use that as the template.
1039 (check_init_expr): Remove tests that first argument is an array
1040 in the call to scalarize_intrinsic_call.
1042 2008-04-06 Tobias Schlüter <tobi@gcc.gnu.org>
1045 * io.c (io_tag): Add field 'value'. Split 'spec' field in
1047 (match_etag, match_vtag, match_ltag): Split parsing in two steps
1048 to give better error messages.
1050 2008-04-06 Tobias Burnus <burnus@net-b.de>
1052 * io.c (check_io_constraints): Add constrains. ID= requires
1053 asynchronous= and asynchronous= must be init expression.
1055 2008-04-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1057 * f95-lang.c: Set LANG_HOOKS_NAME to "GNU Fortran".
1059 2008-04-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1061 * dump-parse-tree.c: Use fprintf, fputs and fputc instead of
1062 gfc_status and gfc_status_char. Remove gfc_ prefix of the gfc_show_*
1063 functions and make them static. Add new gfc_dump_parse_tree
1065 * gfortran.h (gfc_option_t): Rename verbose into dump_parse_tree.
1066 (gfc_status, gfc_status_char): Delete prototypes.
1067 * error.c (gfc_status, gfc_status_char): Remove functions.
1068 * scanner.c (gfc_new_file): Use printf instead of gfc_status.
1069 * options.c (gfc_init_options): Rename verbose into dump_parse_tree.
1070 (gfc_handle_module_path_options): Use gfc_fatal_error instead of
1071 gfc_status and exit.
1072 (gfc_handle_option): Rename verbose into dump_parse_tree.
1073 * parse.c (gfc_parse_file): Use gfc_dump_parse_tree.
1075 2008-04-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1076 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1078 PR fortran/25829 28655
1079 * dump-parse-tree.c (gfc_show_code_node): Show new I/O parameters.
1080 * gfortran.h (gfc_statement): Add ST_WAIT enumerator.
1081 (gfc_open): Add pointers for decimal, encoding, round, sign,
1082 asynchronous. (gfc_inquire): Add pointers for asynchronous, decimal,
1083 encoding, pending, round, sign, size, id.
1084 (gfc_wait): New typedef struct. (gfc_dt): Add pointers for id, pos,
1085 asynchronous, blank, decimal, delim, pad, round, sign.
1086 (gfc_exec_op): Add EXEC_WAIT enumerator. (gfc_code): Add pointer for
1087 wait. (gfc_free_wait), (gfc_resolve_wait): New function prototypes.
1088 * trans-stmt.h (gfc_trans_wait): New function prototype.
1089 * trans.c (gfc_trans_code): Add case for EXEC_WAIT.
1090 * io.c (io_tag): Add new tags for DECIMAL, ENCODING, ROUND, SIGN,
1091 ASYCHRONOUS, ID. (match_open_element): Add matchers for new tags.
1092 (gfc_free_open): Free new pointers. (gfc_resolve_open): Resolve new
1093 tags. (gfc_resolve_open): Remove comment around check for allowed
1094 values and ASYNCHRONOUS, update it. Likewise for DECIMAL, ENCODING,
1095 ROUND, and SIGN. (match_dt_element): Add matching for new tags.
1096 (gfc_free_wait): New function. (gfc_resolve_wait): New function.
1097 (match_wait_element): New function. (gfc_match_wait): New function.
1098 * resolve.c (gfc_resolve_blocks): Add case for EXEC_WAIT.
1099 (resolve_code): Add case for EXEC_WAIT.
1100 * st.c (gfc_free_statement): Add case for EXEC_WAIT.
1101 * trans-io.c (ioparam_type): Add IOPARM_ptype_wait. (gfc_st_parameter):
1102 Add "wait" entry. (iocall): Add IOCALL_WAIT enumerator.
1103 (gfc_build_io_library_fndecls): Add function declaration for st_wait.
1104 (gfc_trans_open): Add mask bits for new I/O tags.
1105 (gfc_trans_inquire): Add mask bits for new I/O tags.
1106 (gfc_trans_wait): New translation function.
1107 (build_dt): Add mask bits for new I/O tags.
1108 * match.c (gfc_match_if) Add matcher for "wait".
1109 * match.h (gfc_match_wait): Prototype for new function.
1110 * ioparm.def: Add new I/O parameter definitions.
1111 * parse.c (decode_statement): Add match for "wait" statement.
1112 (next_statement): Add case for ST_WAIT. (gfc_ascii_statement): Same.
1114 2008-04-03 Jakub Jelinek <jakub@redhat.com>
1117 * openmp.c (resolve_omp_clauses): Diagnose if a clause symbol
1120 2008-04-03 Tom Tromey <tromey@redhat.com>
1122 * Make-lang.in (fortran_OBJS): New variable.
1124 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
1126 * f95-lang.c (insert_block): Kill.
1128 2008-04-01 George Helffrich <george@gcc.gnu.org>
1130 PR fortran/35154, fortran/23057
1131 * trans-common.c (create_common): Add decl to function
1132 chain to preserve identifier scope in debug output.
1134 2008-04-01 Joseph Myers <joseph@codesourcery.com>
1136 * gfortran.texi: Include gpl_v3.texi instead of gpl.texi
1137 * Make-lang.in (GFORTRAN_TEXI): Include gpl_v3.texi instead of
1140 2008-03-30 Paul Thomas <pault@gcc.gnu.org>
1143 * resolve.c (resolve_function, resolve_call): If the procedure
1144 is elemental do not look for noncopying intrinsics.
1146 2008-03-29 Paul Thomas <pault@gcc.gnu.org>
1149 * trans-array.c (gfc_array_init_size): Set 'size' zero if
1150 negative in one dimension.
1153 * trans-expr.c (gfc_trans_string_copy): Only assign a char
1154 directly if the lhs and rhs types are the same.
1156 2008-03-28 Daniel Franke <franke.daniel@gmail.com>
1157 Paul Richard Thomas <paul.richard.thomas@gmail.com>
1160 * primary.c (match_variable): Improved matching of function
1162 * resolve.c (resolve_allocate_deallocate): Removed checks if
1163 the actual argument for STAT is a variable.
1165 2008-03-28 Tobias Burnus <burnus@net-b.de>
1167 * symbol.c (gfc_get_default_type): Fix error message; option
1168 -fallow_leading_underscore should be -fallow-leading-underscore
1170 2008-03-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1173 * iresolve.c (gfc_resolve_cshift): Check for NULL symtree in test for
1174 optional argument attribute.
1176 2008-03-27 Tom Tromey <tromey@redhat.com>
1178 * Make-lang.in: Revert automatic dependency patch.
1180 2008-03-25 Tom Tromey <tromey@redhat.com>
1182 * Make-lang.in: Remove .o targets.
1183 (fortran_OBJS): New variable.
1184 (fortran/gfortranspec.o): Move to fortran/. Reduce to variable
1186 (GFORTRAN_D_OBJS): Update.
1187 (GFORTRAN_TRANS_DEPS): Remove.
1189 2008-03-24 Paul Thomas <pault@gcc.gnu.org>
1192 * resolve.c (resolve_structure_cons): It is an error to assign
1193 NULL to anything other than a pointer or allocatable component.
1196 * resolve.c (resolve_symbol): If the symbol is a derived type,
1197 resolve the derived type. If the symbol is a derived type
1198 function, ensure that the derived type is visible in the same
1199 namespace as the function.
1201 2008-03-23 Tobias Schlüter <tobi@gcc.gnu.org>
1203 * trans.h: Use fold_build in build1_v, build2_v and build3_v
1205 * trans-openmp.c (gfc_trans_omp_critical, gfc_trans_omp_single):
1206 Don't use build2_v macro.
1208 2008-03-19 Daniel Franke <franke.daniel@gmail.com>
1211 * interface.c (gfc_procedure_use): Check for keyworded arguments in
1212 procedures without explicit interfaces.
1214 2008-03-16 Paul Thomas <pault@gcc.gnu.org>
1217 * resolve.c (check_assumed_size_reference): Only visit the
1218 first reference and look directly at the highest dimension.
1220 2008-03-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1223 * trans-array.c (gfc_conv_array_index_offset): Remove unnecessary
1226 2008-03-15 Daniel Franke <franke.daniel@gmail.com>
1229 * resolve.c (resolve_branch): Less strict and pessimistic warning
1232 2008-03-11 Paolo Bonzini <bonzini@gnu.org>
1234 * f95-lang.c (LANG_HOOKS_CLEAR_BINDING_STACK): Delete.
1235 (gfc_be_parse_file): Call clear_binding_stack from here.
1236 (gfc_clear_binding_stack): Rename to clear_binding_stack.
1238 2008-03-09 Paul Thomas <pault@gcc.gnu.org>
1241 * module.c (mio_symtree_ref): After providing a symbol for a
1242 missing equivalence member, resolve and NULL the fixups.
1244 2008-03-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1246 * invoke.texi (Error and Warning Options): Document
1249 2008-03-08 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1252 * trans-array.c (gfc_conv_ss_startstride): Fix the logic to avoid
1253 checking bounds of absent optional arguments.
1255 2008-03-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1258 * intrinsic.c (add_functions): Add simplification routines for
1259 ERF, DERF, ERFC and DERFC.
1260 * decl.c (gfc_match_suffix, gfc_match_subroutine): Change GNU
1261 extensions into Fortran 2008 features.
1262 * intrinsic.h (gfc_simplify_erf, gfc_simplify_erfc): New
1264 * simplify.c (gfc_simplify_erf, gfc_simplify_erfc): New functions.
1266 2008-03-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1269 * intrinsic.c (add_functions): Modify intrinsics ACOSH, ASINH,
1270 ATANH, ERF, ERFC and GAMMA. Add intrinsics BESSEL_{J,Y}{0,1,N},
1271 ERFC_SCALED, LOG_GAMMA and HYPOT.
1272 * intrinsic.h (gfc_check_hypot, gfc_simplify_hypot,
1273 gfc_resolve_hypot): New prototypes.
1274 * mathbuiltins.def: Add HYPOT builtin. Make complex versions of
1275 ACOSH, ASINH and ATANH available.
1276 * gfortran.h (GFC_ISYM_ERFC_SCALED, GFC_ISYM_HYPOT): New values.
1277 * lang.opt: Add -std=f2008 option.
1278 * libgfortran.h: Define GFC_STD_F2008.
1279 * lang-specs.h: Add .f08 and .F08 file suffixes.
1280 * iresolve.c (gfc_resolve_hypot): New function.
1281 * parse.c (parse_contained): Allow empty CONTAINS for Fortran 2008.
1282 * check.c (gfc_check_hypot): New function.
1283 * trans-intrinsic.c (gfc_intrinsic_map): Define ERFC_SCALE builtin.
1284 * options.c (set_default_std_flags): Allow Fortran 2008 by default.
1285 (form_from_filename): Add .f08 suffix.
1286 (gfc_handle_option): Handle -std=f2008 option.
1287 * simplify.c (gfc_simplify_hypot): New function.
1288 * gfortran.texi: Document Fortran 2008 status and file extensions.
1289 * intrinsic.texi: Document new BESSEL_{J,Y}{0,1,N} intrinsics,
1290 as well as HYPOT and ERFC_SCALED. Update documentation of ERF,
1291 ERFC, GAMMA, LGAMMA, ASINH, ACOSH and ATANH.
1292 * invoke.texi: Document the new -std=f2008 option.
1294 2008-03-02 Jakub Jelinek <jakub@redhat.com>
1296 * gfortranspec.c (lang_specific_driver): Update copyright notice
1299 2008-02-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1302 * expr.c (find_array_element): Modify traversing the constructor to
1303 avoid trying to access NULL memory pointed to by next for the
1304 last element. (find_array_section): Exit while loop if cons->next is
1306 * trans-expr.c (gfc_conv_scalar_char_value): Initialize gfc_typespec.
1307 (gfc_conv_function_call): Same.
1308 * decl.c (gfc_match_implicit): Same.
1309 * trans-intrinsic.c (gfc_conv_intrinsic_sr_kind): Same.
1311 2008-02-28 Daniel Franke <franke.daniel@gmail.com>
1316 * lang.opt: Added -Wreturn-type.
1317 * options.c (gfc_handle_option): Recognize -Wreturn-type.
1318 * trans-decl.c (gfc_trans_deferred_vars): Emit warnings for funtions
1319 where the result value is not set.
1320 (gfc_generate_function_code): Likewise.
1321 (generate_local_decl): Emit warnings for funtions whose RESULT
1322 variable is not set.
1324 2008-02-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1327 * trans-expr.c (gfc_conv_variable): Don't build indirect
1328 references when explicit interface is mandated.
1329 * resolve.c (resolve_formal_arglist): Set attr.always_explicit
1330 on the result symbol as well as the procedure symbol.
1332 2008-02-27 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1335 * trans.h: Remove prototypes for gfor_fndecl_math_exponent4,
1336 gfor_fndecl_math_exponent8, gfor_fndecl_math_exponent10 and
1337 gfor_fndecl_math_exponent16.
1338 * f95-lang.c (build_builtin_fntypes): Add new function types.
1339 (gfc_init_builtin_functions): Add new builtins for nextafter,
1340 frexp, ldexp, fabs, scalbn and inf.
1341 * iresolve.c (gfc_resolve_rrspacing): Don't add hidden arguments.
1342 (gfc_resolve_scale): Don't convert type of second argument.
1343 (gfc_resolve_set_exponent): Likewise.
1344 (gfc_resolve_size): Don't add hidden arguments.
1345 * trans-decl.c: Remove gfor_fndecl_math_exponent4,
1346 gfor_fndecl_math_exponent8, gfor_fndecl_math_exponent10 and
1347 gfor_fndecl_math_exponent16.
1348 * trans-intrinsic.c (gfc_intrinsic_map): Remove intrinsics
1349 for scalbn, fraction, nearest, rrspacing, set_exponent and
1351 (gfc_conv_intrinsic_exponent): Directly call frexp.
1352 (gfc_conv_intrinsic_fraction, gfc_conv_intrinsic_nearest,
1353 gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_rrspacing,
1354 gfc_conv_intrinsic_scale, gfc_conv_intrinsic_set_exponent): New
1356 (gfc_conv_intrinsic_function): Use the new functions above.
1358 2008-02-26 Tobias Burnus <burnus@net-b.de>
1361 * interface.c (check_operator_interface): Show better line for error
1362 messages; fix constrains for user-defined assignment operators.
1363 (gfc_extend_assign): Fix constrains for user-defined assignment
1366 2008-02-26 Tom Tromey <tromey@redhat.com>
1368 * trans-io.c (set_error_locus): Remove old location code.
1369 * trans-decl.c (gfc_set_decl_location): Remove old location code.
1370 * f95-lang.c (gfc_init): Remove test of USE_MAPPED_LOCATION.
1371 * scanner.c (gfc_gobble_whitespace): Remove old location code.
1372 (get_file): Likewise.
1373 (preprocessor_line): Likewise.
1374 (load_file): Likewise.
1375 (gfc_new_file): Likewise.
1376 * trans.c (gfc_trans_runtime_check): Remove old location code.
1377 (gfc_get_backend_locus): Likewise.
1378 (gfc_set_backend_locus): Likewise.
1379 * data.c (gfc_assign_data_value): Remove old location code.
1380 * error.c (show_locus): Remove old location code.
1381 * gfortran.h (gfc_linebuf): Remove old location code.
1382 (gfc_linebuf_linenum): Remove old-location variant.
1384 2008-02-25 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1387 * trans-const.c (gfc_build_string_const): Don't call gettext.
1388 (gfc_build_localized_string_const): New function.
1389 * trans-const.h (gfc_build_localized_string_const): New prototype.
1390 * trans.c (gfc_trans_runtime_check): Use
1391 gfc_build_localized_string_const instead of gfc_build_string_const.
1392 (gfc_call_malloc): Likewise.
1393 (gfc_allocate_with_status): Likewise.
1394 (gfc_allocate_array_with_status): Likewise.
1395 (gfc_deallocate_with_status): Likewise.
1396 (gfc_call_realloc): Likewise.
1397 * trans-io.c (gfc_trans_io_runtime_check): Likewise.
1399 2008-02-24 Tobias Schlüter <tobi@gcc.gnu.org>
1401 * arith.c: Update copyright years.
1402 * arith.h: Likewise.
1403 * array.c: Likewise.
1405 * check.c: Likewise.
1409 * dependency.c: Likewise.
1410 * dependency.h: Likewise.
1411 * dump-parse-tree.c: Likewise.
1412 * error.c: Likewise.
1414 * gfc-internals.texi: Likewise.
1415 * gfortran.h: Likewise.
1416 * gfortran.texi: Likewise.
1417 * gfortranspec.c: Likewise.
1418 * interface.c: Likewise.
1419 * intrinsic.c: Likewise.
1420 * intrinsic.h: Likewise.
1421 * intrinsic.texi: Likewise.
1422 * invoke.texi: Likewise.
1424 * iresolve.c: Likewise.
1425 * iso-c-binding.def: Likewise.
1426 * iso-fortran-env.def: Likewise.
1427 * lang-specs.h: Likewise.
1428 * lang.opt: Likewise.
1429 * libgfortran.h: Likewise.
1430 * match.c: Likewise.
1431 * match.h: Likewise.
1432 * matchexp.c: Likewise.
1434 * module.c: Likewise.
1435 * openmp.c: Likewise.
1436 * options.c: Likewise.
1437 * parse.c: Likewise.
1438 * parse.h: Likewise.
1439 * primary.c: Likewise.
1440 * resolve.c: Likewise.
1441 * scanner.c: Likewise.
1442 * simplify.c: Likewise.
1444 * symbol.c: Likewise.
1445 * target-memory.c: Likewise.
1446 * target-memory.h: Likewise.
1447 * trans-array.h: Likewise.
1448 * trans-const.h: Likewise.
1449 * trans-stmt.h: Likewise.
1450 * trans-types.c: Likewise.
1451 * trans-types.h: Likewise.
1452 * types.def: Likewise.
1454 2008-02-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1457 * simplify.c (gfc_simplify_ibclr), (gfc_simplify_ibits),
1458 (gfc_simplify_ibset): Remove call to range_check.
1459 (simplify_cmplx), (gfc_simplify_dble), (gfc_simplify_float)
1460 (gfc_simplify_real): Add call gfc_clear_ts to initialize the
1461 temporary gfc_typspec variable.
1463 2008-02-24 Tobias Schlüter <tobi@gcc.gnu.org>
1465 * trans-array.c (gfc_conv_descriptor_data_get,
1466 gfc_conv_descriptor_data_set_internal,
1467 gfc_conv_descriptor_data_addr, gfc_conv_descriptor_offset,
1468 gfc_conv_descriptor_dtype, gfc_conv_descriptor_dimension,
1469 gfc_conv_descriptor_stride, gfc_conv_descriptor_lbound,
1470 gfc_conv_descriptor_ubound, gfc_trans_create_temp_array,
1471 gfc_conv_array_transpose, gfc_grow_array,
1472 gfc_trans_array_constructor_subarray,
1473 gfc_trans_array_constructor_value, gfc_trans_scalarized_loop_end,
1474 gfc_array_init_size, gfc_array_allocate, gfc_array_deallocate,
1475 gfc_conv_array_initializer, gfc_trans_array_bounds,
1476 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
1477 gfc_get_dataptr_offset, gfc_conv_array_parameter,
1478 gfc_trans_dealloc_allocated, get_full_array_size,
1479 gfc_duplicate_allocatable, structure_alloc_comps): Use fold_buildN
1481 * trans-expr.c (gfc_conv_expr_present, gfc_conv_missing_dummy,
1482 gfc_conv_component_ref, gfc_conv_cst_int_power,
1483 gfc_conv_function_call, gfc_trans_structur_assign): Likewise.
1484 * trans-common.c (create_common): Likewise.
1485 * trans-openmp.c (gfc_trans_omp_atomic, gfc_trans_omp_do):
1487 * trans-const.c (gfc_conv_constant_to_tree): Likewise.
1488 * trans-stmt.c (gfc_trans_goto, gfc_trans_return, gfc_trans_do,
1489 gfc_trans_integer_select, gfc_trans_character_select,
1490 gfc_trans_forall_loop, compute_overall_iter_number,
1491 gfc_trans_forall_1, gfc_evaluate_where_mask, gfc_trans_allocate,
1492 gfc_trans_deallocate): Likewise.
1493 * trans.c (gfc_build_addr_expr, gfc_trans_runtime_check,
1494 gfc_allocate_with_status, gfc_allocate_array_with_status,
1495 gfc_deallocate_with_status): Likewise.
1496 * f95-lang.c (gfc_truthvalue_conversion): Likewise.
1497 * trans-io.c (set_parameter_const, set_parameter_value,
1498 set_parameter_ref, set_string, set_internal_unit, io_result,
1499 set_error_locus, nml_get_addr_expr, transfer_expr): Likewise.
1500 * trans-decl.c (gfc_build_qualified_array, build_entry_thunks,
1501 gfc_get_fake_result_decl, gfc_trans_auto_character_variable,
1502 gfc_generate_function_code): Likewise.
1503 * convert.c (convert): Likewise.
1504 * trans-intrinsic.c (gfc_conv_intrinsic_conversion,
1505 build_fixbound_expr, build_fix_expr, gfc_conv_intrinsic_aint,
1506 gfc_conv_intrinsic_int, gfc_conv_intrinsic_imagpart,
1507 gfc_conv_intrinsic_conjg, gfc_conv_intrinsic_abs,
1508 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_mod,
1509 gfc_conv_intrinsic_dim, gfc_conv_intrinsic_dprod,
1510 gfc_conv_intrinsic_ctime, gfc_conv_intrinsic_fdate,
1511 gfc_conv_intrinsic_ttynam, gfc_conv_intrinsic_minmax,
1512 gfc_conv_intrinsic_minmax_char, gfc_conv_intrinsic_count,
1513 gfc_conv_intrinsic_arith, gfc_conv_intrinsic_dot_product,
1514 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
1515 gfc_conv_intrinsic_btest, gfc_conv_intrinsic_not,
1516 gfc_conv_intrinsic_ibits, gfc_conv_intrinsic_ishft,
1517 gfc_conv_intrinsic_ichar, gfc_conv_intrinsic_size,
1518 gfc_conv_intrinsic_array_transfer, gfc_conv_intrinsic_transfer,
1519 gfc_conv_allocated, gfc_conv_associated, gfc_conv_intrinsic_trim,
1520 gfc_conv_intrinsic_repeat): Likewise.
1522 2008-02-23 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1525 * trans-expr.c (gfc_conv_power_op): Use BUILT_IN_CPOW{F,,L}.
1526 * f95-lang.c (gfc_init_builtin_functions): Define BUILT_IN_CPOW{F,,L}.
1527 * trans.h (gfor_fndecl_math_cpow, gfor_fndecl_math_cpowf,
1528 gfor_fndecl_math_cpowl10, gfor_fndecl_math_cpowl16): Remove.
1529 * trans-decl.c: Likewise.
1531 2008-02-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1534 * expr.c (find_array_element): Modify traversing the constructor to
1535 avoid trying to access NULL memory pointed to by next for the
1536 last element. (find_array_section): Exit while loop if cons->next is
1539 2008-02-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1542 * iresolve.c (resolve_mask_arg): Add gfc_clear_ts to initialize
1544 (gfc_resolve_aint): Likewise.
1545 (gfc_resolve_anint): Likewise.
1546 (gfc_resolve_besn): Likewise.
1547 (gfc_resolve_cshift): Likewise.
1548 (gfc_resolve_ctime): Likewise.
1549 (gfc_resolve_eoshift): Likewise.
1550 (gfc_resolve_index_func): Likewise.
1551 (gfc_resolve_isatty): Likewise.
1552 (gfc_resolve_malloc): Likewise.
1553 (gfc_resolve_rrspacing): Likewise.
1554 (gfc_resolve_scale): Likewise.
1555 (gfc_resolve_set_exponent): Likewise.
1556 (gfc_resolve_spacing): Likewise.
1557 (gfc_resolve_spacing): Likewise.
1558 (gfc_resolve_fgetc): Likewise.
1559 (gfc_resolve_fputc): Likewise.
1560 (gfc_resolve_ftell): Likewise.
1561 (gfc_resolve_ttynam): Likewise.
1562 (gfc_resolve_alarm_sub): Likewise.
1563 (gfc_resolve_mvbits): Likewise.
1564 (gfc_resolve_getarg): Likewise.
1565 (gfc_resolve_signal_sub): Likewise.
1566 (gfc_resolve_exit): Likewise.
1567 (gfc_resolve_flush): Likewise.
1568 (gfc_resolve_free): Likewise.
1569 (gfc_resolve_ctime_sub): Likewise.
1570 (gfc_resolve_fgetc_sub): Likewise.
1571 (gfc_resolve_fputc_sub): Likewise.
1572 (gfc_resolve_fseek_sub): Likewise.
1573 (gfc_resolve_ftell_sub): Likewise.
1574 (gfc_resolve_ttynam_sub): Likewise.
1576 2008-02-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1578 * gfc-internals.texi: Fix typos and markup nits.
1579 * gfortran.texi: Likewise.
1580 * intrinsic.texi: Likewise.
1582 2008-02-21 Richard Guenther <rguenther@suse.de>
1584 * trans-expr.c (gfc_conv_expr_op): Expand INTRINSIC_PARENTHESES
1585 as unary PAREN_EXPR for real and complex typed expressions.
1586 (gfc_conv_unary_op): Fold the built tree.
1588 2008-02-20 Tobias Burnus <burnus@net-b.de>
1591 * match.c (gfc_match_name): Improve error message for '$'.
1593 2008-02-19 Daniel Franke <franke.daniel@gmail.com>
1596 * expr.c (gfc_check_pointer_assign): Add type and kind information
1597 to type-mismatch message.
1598 (gfc_check_assign): Unify error messages.
1600 2008-02-16 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1603 * gfortran.texi: Create new section for unimplemented extensions.
1604 Add "STRUCTURE and RECORD" and "ENCODE and DECODE statements".
1605 Remove "smaller projects" list. Fix a few typos.
1607 2008-02-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1609 * intrinsic.texi: Rename INDEX node to avoid clashing with
1610 index.html on case-insensitive systems.
1612 2008-02-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1615 * trans-expr.c (gfc_conv_function_call): Force evaluation of
1618 2008-02-10 Daniel Franke <franke.daniel@gmail.com>
1621 * lang.opt: Allow '-J<dir>' next to '-J <dir>',
1622 likewise '-I <dir>' and '-I<dir>'.
1624 2008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1627 * Make-lang.in (f951): Add $(GMPLIBS).
1629 2008-02-05 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1632 * trans-common.c (build_field): Mark fields as volatile when needed.
1634 2008-02-05 Tobias Burnus <burnus@net-b.de>
1637 * data.c (gfc_assign_data_value): Only free "size" if
1638 it has not already been freed.
1640 2008-02-05 Paul Thomas <pault@gcc.gnu.org>
1643 * array.c (match_array_element_spec): Remove check for negative
1645 (gfc_resolve_array_spec): Add check for negative size.
1647 2008-02-05 Paul Thomas <pault@gcc.gnu.org>
1650 * data.c (gfc_assign_data_value): Add bounds check for array
1653 2008-02-04 Daniel Franke <franke.daniel@gmail.com>
1655 * resolve.c (resolve_where): Fix typo.
1656 (gfc_resolve_where_code_in_forall): Likewise.
1658 2008-02-03 Paul Thomas <pault@gcc.gnu.org>
1661 * resolve.c (resolve_allocate_deallocate): New function.
1662 (resolve_code): Call it for allocate and deallocate.
1663 * match.c (gfc_match_allocate, gfc_match_deallocate) : Remove
1664 the checking of the STAT tag and put in above new function.
1665 * primary,c (match_variable): Do not fix flavor of host
1666 associated symbols yet if the type is not known.
1668 2008-01-31 Paul Thomas <pault@gcc.gnu.org>
1671 * expr.c (gfc_check_assign): It is an error to assign
1672 to a sibling procedure.
1674 2008-01-30 Paul Thomas <pault@gcc.gnu.org>
1677 * symbol.c (gfc_delete_symtree, gfc_undo_symbols): Rename
1678 delete_symtree to gfc_delete_symtree.
1679 * gfortran.h : Add prototype for gfc_delete_symtree.
1680 * module.c (load_generic_interfaces): Transfer symbol to a
1681 unique symtree and delete old symtree, instead of renaming.
1682 (read_module): The rsym and the found symbol are the same, so
1683 the found symtree can be deleted.
1686 * decl.c (match_char_spec): Remove the constraint on deferred
1687 matching of functions and free the length expression.
1688 delete_symtree to gfc_delete_symtree.
1689 (gfc_match_type_spec): Whitespace.
1690 (gfc_match_function_decl): Defer characteristic association for
1691 all types except BT_UNKNOWN.
1692 * parse.c (decode_specification_statement): Only derived type
1693 function matching is delayed to the end of specification.
1695 2008-01-28 Tobias Burnus <burnus@net-b.de>
1698 * simplify.c (gfc_simplify_shape): Simplify rank zero arrays.
1700 2008-01-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1703 * array.c (gfc_check_constructor_type): Revert clearing the expression.
1705 2008-01-26 Tobias Burnus <burnus@net-b.de>
1708 * trans-expr.c (gfc_conv_function_call): Don't call
1709 gfc_add_interface_mapping if the expression is NULL.
1711 2008-01-26 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1714 * trans-array.c (gfc_trans_create_temp_array): Remove call to
1715 gcc_assert (integer_zerop (loop->from[n])).
1717 2008-01-25 Daniel Franke <franke.daniel@gmail.com>
1720 * resolve.c (resolve_where): Added check if user-defined assignment
1721 operator is an elemental subroutine.
1722 (gfc_resolve_where_code_in_forall): Likewise.
1724 2008-01-24 Daniel Franke <franke.daniel@gmail.com>
1728 * gfortran.h: Revert changes from 2008-01-17.
1729 * match.c: Likewise.
1730 * symbol.c: Likewise.
1731 (gfc_undo_symbols): Undo namespace changes related to common blocks.
1733 2008-01-24 Daniel Franke <franke.daniel@gmail.com>
1736 * data.c (formalize_structure_cons): Skip formalization on
1739 2008-01-24 Daniel Franke <franke.daniel@gmail.com>
1741 * gfortran.texi (OpenMP): Extended existing documentation.
1742 (contributors): Added major contributors of 2008 that were
1744 (proposed extensions): Removed implemented items.
1746 2008-01-24 Paul Thomas <pault@gcc.gnu.org>
1749 * parse.c (next_statement) : If ST_GET_FCN_CHARACTERISTICS is
1750 seen, check for a statement label and, if present, delete it
1751 and set the locus to the start of the statement.
1753 2008-01-22 Paul Thomas <pault@gcc.gnu.org>
1756 * trans-io.c (gfc_trans_transfer): If the array reference in a
1757 read has a vector subscript, use gfc_conv_subref_array_arg to
1758 copy back the temporary.
1760 2008-01-22 Tobias Burnus <burnus@net-b.de>
1763 * interface.c (compare_actual_formal): Fix adding type
1764 to missing_arg_type for absent optional arguments.
1766 2008-01-22 Tobias Burnus <burnus@net-b.de>
1769 * parse.c (parse_spec): Change = into ==.
1771 2008-01-22 Daniel Franke <franke.daniel@gmail.com>
1774 * expr.c (check_elemental): Fix check for valid data types.
1776 2008-01-22 Tobias Burnus <burnus@net-b.de>
1779 * scanner.c (load_line): Support <tab><digit> continuation lines.
1780 * invoke.texi (-Wtabs): Document this.
1782 2008-01-22 Paul Thomas <pault@gcc.gnu.org>
1785 * module.c (read_module): Set use_rename attribute.
1787 2007-01-21 Tobias Burnus <burnus@net-b.de>
1790 * interface.c (compare_parameter): Improved error message
1791 for arguments of same type and mismatched kinds.
1793 2008-01-20 Paul Thomas <pault@gcc.gnu.org>
1796 * resolve.c (resolve_entries): Do not do an array bounds check
1797 if the result symbols are the same.
1800 * module.c (read_module) : Hide the symtree of the previous
1801 version of the symbol if this symbol is renamed.
1803 2008-01-20 Paul Thomas <pault@gcc.gnu.org>
1806 * array.c (gfc_check_constructor_type): Clear the expression ts
1807 so that the checking starts from the deepest level of array
1809 * primary.c (match_varspec): If an unknown type is changed to
1810 default character and the attempt to match a substring fails,
1811 change it back to unknown.
1814 * trans-array.c (gfc_add_loop_ss_code) : If ss->string_length is
1815 NULL for an array constructor, use the cl.length expression to
1817 (gfc_conv_array_parameter): Change call to gfc_evaluate_now to
1820 2008-01-19 Thomas Koenig <tkoenig@gcc.gnu.org>
1824 * iresolve.c (gfc_resolve_all): Remove conversion of mask
1825 argument to kind=1 by removing call to resolve_mask_arg().
1826 (gfc_resolve_any): Likewise.
1828 2008-01-19 Tobias Burnus <burnus@net-b.de>
1831 * primary.c (match_variable): Handle FL_UNKNOWN without
1832 uneducated guessing.
1833 (match_variable): Improve error message.
1835 2008-01-18 Tobias Burnus <burnus@net-b.de>
1838 * interface.c (get_expr_storage_size): Return storage size
1839 for array element designators.
1840 (compare_actual_formal): Reject unequal string sizes for
1841 assumed-shape dummy arguments. And fix error message for
1842 array-sections with vector subscripts.
1844 2008-01-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1847 * simplify.c (is_constant_array_expr): New static function that returns
1848 true if the given expression is an array and is constant.
1849 (gfc_simplify_reshape): Use new function.
1851 2008-01-17 H.J. Lu <hongjiu.lu@intel.com>
1854 * symbol.c (free_common_tree): Renamed to ...
1855 (gfc_free_common_tree): This. Remove static.
1856 (gfc_free_namespace): Updated.
1858 * gfortran.h (gfc_free_common_tree): New.
1860 * match.c (gfc_match_common): Call gfc_free_common_tree () with
1861 gfc_current_ns->common_root and set gfc_current_ns->common_root
1862 to NULL on syntax error.
1864 2008-01-18 Richard Sandiford <rsandifo@nildram.co.uk>
1867 * trans-expr.c (gfc_conv_function_call): Use proper
1868 type for returned character pointers.
1870 2008-01-17 Paul Thomas <pault@gcc.gnu.org>
1875 * decl.c : Remove gfc_function_kind_locus and
1876 gfc_function_type_locus. Add gfc_matching_function.
1877 (match_char_length): If matching a function and the length
1878 does not match, return MATCH_YES and try again later.
1879 (gfc_match_kind_spec): The same.
1880 (match_char_kind): The same.
1881 (gfc_match_type_spec): The same for numeric and derived types.
1882 (match_prefix): Rename as gfc_match_prefix.
1883 (gfc_match_function_decl): Except for function valued character
1884 lengths, defer applying kind, type and charlen info until the
1885 end of specification block.
1886 gfortran.h (gfc_statement): Add ST_GET_FCN_CHARACTERISTICS.
1887 parse.c (decode_specification_statement): New function.
1888 (decode_statement): Call it when a function has kind = -1. Set
1889 and reset gfc_matching function, as function statement is being
1891 (match_deferred_characteristics): Simplify with a single call
1892 to gfc_match_prefix. Do appropriate error handling. In any
1893 case, make sure that kind = -1 is reset or corrected.
1894 (parse_spec): Call above on seeing ST_GET_FCN_CHARACTERISTICS.
1895 Throw an error if kind = -1 after last specification statement.
1896 parse.h : Prototype for gfc_match_prefix.
1898 2008-01-16 Tobias Burnus <burnus@net-b.de>
1901 * interface.c (compare_parameter): Allow AS_DEFERRED array
1902 elements and reject attr.pointer array elemenents.
1903 (get_expr_storage_size): Return storage size of elements of
1904 assumed-shape and pointer arrays.
1906 2008-01-15 Sebastian Pop <sebastian.pop@amd.com>
1908 * f95-lang.c (gfc_init_builtin_functions): Initialize GOMP builtins
1909 for flag_tree_parallelize_loops.
1911 2008-01-15 Thomas Koenig <tkoenig@gcc.gnu.org>
1914 * iresolve.c (gfc_resolve_all): Call resolve_mask_arg.
1915 (gfc_resolve_any): Likewise.
1916 (gfc_resolve_count): Likewise. Don't append kind of
1917 argument to function name.
1919 2008-01-13 Tobias Burnus <burnus@net-b.de>
1922 * resolve.c (resolve_actual_arglist): For expressions,
1923 also check for assume-sized arrays.
1924 * interface.c (compare_parameter): Move F2003 character checks
1925 here, print error messages here, reject elements of
1926 assumed-shape array as argument to dummy arrays.
1927 (compare_actual_formal): Update for the changes above.
1929 2008-01-13 Tobias Burnus <burnus@net-b.de>
1932 * decl.c (contained_procedure): Only check directly preceeding state.
1934 2008-01-13 Tobias Burnus <burnus@net-b.de>
1937 * check.c (gfc_check_shape): Accept array ranges of
1938 assumed-size arrays.
1940 2008-01-12 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1943 * match.c (gfc_match_name): Don't error if leading character is a '(',
1944 just return MATCH_NO.
1946 2008-01-11 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1949 * trans-io.c (create_dummy_iostat): Commit the symbol.
1951 2008-01-11 Paul Thomas <pault@gcc.gnu.org>
1954 * simplify.c (gfc_simplify_transfer): Return NULL if the size
1955 of the element is unavailable and only assign character length
1956 to the result, if 'mold' is constant.
1958 2008-01-10 Paul Thomas <pault@gcc.gnu.org>
1961 * trans-array.c (gfc_trans_array_ctor_element): Use gfc_trans_string_copy
1962 to assign strings and perform bounds checks on the string length.
1963 (get_array_ctor_strlen): Remove bounds checking.
1964 (gfc_trans_array_constructor): Initialize string length checking.
1965 * trans-array.h : Add prototype for gfc_trans_string_copy.
1967 2008-01-08 Richard Guenther <rguenther@suse.de>
1970 PR tree-optimization/34683
1971 * trans-types.c (gfc_get_array_type_bounds): Use an array type
1972 with known size for accesses if that is known.
1974 2008-01-08 Paul Thomas <pault@gcc.gnu.org>
1977 * expr.c (find_array_element): Check that the array bounds are
1978 constant before using them. Use lower, as well as upper bound.
1979 (check_restricted): Allow implied index variable.
1981 2008-01-08 Paul Thomas <pault@gcc.gnu.org>
1984 * trans_array.c (gfc_trans_deferred_array): Do not null the
1985 data pointer on entering scope, nor deallocate it on leaving
1986 scope, if the symbol has the 'save' attribute.
1989 * trans_decl.c (gfc_finish_var_decl): Derived types with
1990 allocatable components and an initializer must be TREE_STATIC.
1992 2008-01-07 Paul Thomas <pault@gcc.gnu.org>
1995 * module.c (write_generic): Rewrite completely.
1996 (write_module): Change call to write_generic.
1998 2008-01-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2001 * scanner.c (load_line): Do not count ' ' as printable when checking for
2004 2008-01-06 Paul Thomas <pault@gcc.gnu.org>
2007 * module.c (load_needed): If the namespace has no proc_name
2008 give it the module symbol.
2010 2008-01-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2013 * trans-expr.c (gfc_conv_missing_dummy): Use a temporary to type convert
2014 the dummy variable expression, test for NULL, and pass the variable
2015 address to the called function.
2017 2007-01-06 Tobias Burnus <burnus@net-b.de>
2020 * match.c (gfc_match_common): Remove blank common in
2022 * resolve.c (resolve_common_vars): New function.
2023 (resolve_common_blocks): Move checks to resolve_common_vars
2024 and invoke that function.
2025 (resolve_types): Call resolve_common_vars for blank commons.
2027 2008-01-06 Tobias Burnus <burnus@net-b.de>
2030 * resolve.c (resolve_equivalence_derived): Reject derived types with
2031 default initialization if equivalenced with COMMON variable.
2033 2008-01-06 Tobias Burnus <burnus@net-b.de>
2036 * io.c (check_io_constraints): Disallow unformatted I/O for
2039 2008-01-06 Tobias Burnus <burnus@net-b.de>
2042 * resolve.c (resolve_formal_arglist): Reject dummy procedure in
2043 ELEMENTAL functions.
2045 2008-01-06 Tobias Burnus <burnus@net-b.de>
2048 * interface.c (compare_actual_formal): Reject parameter
2049 actual to intent(out) dummy.
2051 2008-01-04 Tobias Burnus <burnus@net-b.de>
2054 * primary.c (match_varspec): Gobble whitespace before