1 2008-06-07 Tobias Burnus <burnus@net-b.de>
3 * intrinsic.c (add_functions): Implement c_sizeof.
4 * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): Do not
5 create unneeded variable in the scalar case.
6 * intrinsic.texi: Add C_SIZEOF documentation.
8 2008-06-06 Tobias Burnus <burnus@net-b.de>
10 * intrinsic.texi (BESSEL_J1): Fix BES(S)EL_J1 typo.
12 2008-06-06 Jakub Jelinek <jakub@redhat.com>
14 * scanner.c (skip_free_comments, skip_fixed_comments): Handle tabs.
15 * parse.c (next_free): Allow tab after !$omp.
16 (decode_omp_directive): Handle !$omp task, !$omp taskwait
18 (case_executable): Add ST_OMP_TASKWAIT.
19 (case_exec_markers): Add ST_OMP_TASK.
20 (gfc_ascii_statement): Handle ST_OMP_TASK, ST_OMP_END_TASK and
22 (parse_omp_structured_block, parse_executable): Handle ST_OMP_TASK.
23 * gfortran.h (gfc_find_sym_in_expr): New prototype.
24 (gfc_statement): Add ST_OMP_TASK, ST_OMP_END_TASK and ST_OMP_TASKWAIT.
25 (gfc_omp_clauses): Add OMP_SCHED_AUTO to sched_kind,
26 OMP_DEFAULT_FIRSTPRIVATE to default_sharing. Add collapse and
28 (gfc_exec_op): Add EXEC_OMP_TASK and EXEC_OMP_TASKWAIT.
29 * f95-lang.c (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
30 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP, LANG_HOOKS_OMP_CLAUSE_DTOR,
31 LANG_HOOKS_OMP_PRIVATE_OUTER_REF): Define.
32 * trans.h (gfc_omp_clause_default_ctor): Add another argument.
33 (gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op,
34 gfc_omp_clause_dtor, gfc_omp_private_outer_ref): New prototypes.
35 * types.def (BT_ULONGLONG, BT_PTR_ULONGLONG,
36 BT_FN_BOOL_ULONGLONGPTR_ULONGLONGPTR,
37 BT_FN_BOOL_BOOL_ULL_ULL_ULL_ULLPTR_ULLPTR,
38 BT_FN_BOOL_BOOL_ULL_ULL_ULL_ULL_ULLPTR_ULLPTR,
39 BT_FN_VOID_PTR_PTR, BT_PTR_FN_VOID_PTR_PTR,
40 BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT): New.
41 (BT_BOOL): Use integer type with BOOL_TYPE_SIZE rather
42 than boolean_type_node.
43 * dump-parse-tree.c (gfc_show_omp_node): Handle EXEC_OMP_TASK,
44 EXEC_OMP_TASKWAIT, OMP_SCHED_AUTO, OMP_DEFAULT_FIRSTPRIVATE,
45 untied and collapse clauses.
46 (gfc_show_code_node): Handle EXEC_OMP_TASK and EXEC_OMP_TASKWAIT.
47 * trans.c (gfc_trans_code): Handle EXEC_OMP_TASK and
49 * st.c (gfc_free_statement): Likewise.
50 * resolve.c (gfc_resolve_blocks, resolve_code): Likewise.
51 (find_sym_in_expr): Rename to...
52 (gfc_find_sym_in_expr): ... this. No longer static.
53 (resolve_allocate_expr, resolve_ordinary_assign): Adjust caller.
54 * match.h (gfc_match_omp_task, gfc_match_omp_taskwait): New
56 * openmp.c (resolve_omp_clauses): Allow allocatable arrays in
57 firstprivate, lastprivate, reduction, copyprivate and copyin
59 (omp_current_do_code): Made static.
60 (omp_current_do_collapse): New variable.
61 (gfc_resolve_omp_do_blocks): Compute omp_current_do_collapse,
62 clear omp_current_do_code and omp_current_do_collapse on return.
63 (gfc_resolve_do_iterator): Handle collapsed do loops.
64 (resolve_omp_do): Likewise, diagnose errorneous collapsed do loops.
65 (OMP_CLAUSE_COLLAPSE, OMP_CLAUSE_UNTIED): Define.
66 (gfc_match_omp_clauses): Handle default (firstprivate),
67 schedule (auto), untied and collapse (n) clauses.
68 (OMP_DO_CLAUSES): Add OMP_CLAUSE_COLLAPSE.
69 (OMP_TASK_CLAUSES): Define.
70 (gfc_match_omp_task, gfc_match_omp_taskwait): New functions.
71 * trans-openmp.c (gfc_omp_private_outer_ref): New function.
72 (gfc_omp_clause_default_ctor): Add outer argument. For allocatable
73 arrays allocate them with the bounds of the outer var if outer
75 (gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op,
76 gfc_omp_clause_dtor): New functions.
77 (gfc_trans_omp_array_reduction): If decl is allocatable array,
78 allocate it with outer var's bounds in OMP_CLAUSE_REDUCTION_INIT
79 and deallocate it in OMP_CLAUSE_REDUCTION_MERGE.
80 (gfc_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
81 for assumed-size arrays.
82 (gfc_trans_omp_do): Add par_clauses argument. If dovar is
83 present in lastprivate clause and do loop isn't simple,
84 set OMP_CLAUSE_LASTPRIVATE_STMT. If dovar is present in
85 parallel's lastprivate clause, change it to shared and add
86 lastprivate clause to OMP_FOR_CLAUSES. Handle collapsed do loops.
87 (gfc_trans_omp_directive): Adjust gfc_trans_omp_do callers.
88 (gfc_trans_omp_parallel_do): Likewise. Move collapse clause to
89 OMP_FOR from OMP_PARALLEL.
90 (gfc_trans_omp_clauses): Handle OMP_SCHED_AUTO,
91 OMP_DEFAULT_FIRSTPRIVATE, untied and collapse clauses.
92 (gfc_trans_omp_task, gfc_trans_omp_taskwait): New functions.
93 (gfc_trans_omp_directive): Handle EXEC_OMP_TASK and
96 2008-06-04 Janus Weil <janus@gcc.gnu.org>
100 * resolve.c (resolve_symbol): Correctly copy the interface for a
101 PROCEDURE declaration.
103 2008-06-02 Janus Weil <janus@gcc.gnu.org>
106 * symbol.c (gfc_add_allocatable,gfc_add_dimension,
107 gfc_add_explicit_interface): Added checks.
108 * decl.c (attr_decl1): Added missing "var_locus".
109 * parse.c (parse_interface): Checking for errors.
111 2008-06-02 Daniel Kraft <d@domob.eu>
113 * gfortran.h: New statement-type ST_FINAL for FINAL declarations.
114 (struct gfc_symbol): New member f2k_derived.
115 (struct gfc_namespace): New member finalizers, for use in the above
116 mentioned f2k_derived namespace.
117 (struct gfc_finalizer): New type defined for finalizers linked list.
118 * match.h (gfc_match_final_decl): New function header.
119 * decl.c (gfc_match_derived_decl): Create f2k_derived namespace on
120 constructed symbol node.
121 (gfc_match_final_decl): New function to match a FINAL declaration line.
122 * parse.c (decode_statement): match-call for keyword FINAL.
123 (parse_derived): Parse CONTAINS section and accept FINAL statements.
124 * resolve.c (gfc_resolve_finalizers): New function to resolve (that is
125 in this case, check) a list of finalizer procedures.
126 (resolve_fl_derived): Call gfc_resolve_finalizers here.
127 * symbol.c (gfc_get_namespace): Initialize new finalizers to NULL.
128 (gfc_free_namespace): Free finalizers list.
129 (gfc_new_symbol): Initialize new f2k_derived to NULL.
130 (gfc_free_symbol): Free f2k_derived namespace.
131 (gfc_free_finalizer): New function to free a single gfc_finalizer node.
132 (gfc_free_finalizer_list): New function to free a linked list of
135 2008-06-02 Daniel Franke <franke.daniel@gmail.com>
139 * cpp.c (gfc_cpp_init): Do not initialize builtins if
140 processing already preprocessed input.
141 (gfc_cpp_preprocess): Finalize output with newline.
143 2008-05-31 Jerry DeLisle <jvdelisle@gcc.gnu.org>
145 * intrinsic.texi: Revert wrong commit.
147 2008-05-31 Steven G. Kargl <kargls@comcast.net>
149 * arith.c (gfc_arith_init_1): Remove now unused r and c variables.
150 Cleanup numerical inquiry function initialization.
151 (gfc_arith_done_1): Replace multiple mpfr_clear() invocations with
152 a single mpfr_clears().
153 (gfc_check_real_range): Re-arrange logic to eliminate multiple
154 unnecessary branching and assignments.
155 (gfc_arith_times): Use mpfr_clears() in preference to multiple
157 (gfc_arith_divide): Ditto.
158 (complex_reciprocal): Eliminate now unused variables a, re, im.
159 Cleanup the mpfr abuse. Use mpfr_clears() in preference to
160 multiple mpfr_clear().
161 (complex_pow): Fix comment whitespace. Use mpfr_clears() in
162 preference to multiple mpfr_clear().
163 * simplify.c (gfc_simplify_and): Remove blank line.
164 (gfc_simplify_atan2): Move error checking earlier to eliminate
165 a now unnecessay gfc_free_expr().
166 (gfc_simplify_bessel_j0): Remove unnecessary gfc_set_model_kind().
167 (gfc_simplify_bessel_j1): Ditto.
168 (gfc_simplify_bessel_jn): Ditto.
169 (gfc_simplify_bessel_y0): Ditto.
170 (gfc_simplify_bessel_y1): Ditto.
171 (gfc_simplify_bessel_yn): Ditto.
172 (only_convert_cmplx_boz): Eliminate unnecessary duplicate code, and
173 combine nested if statement rational expressions.
174 (gfc_simplify_cos): Use mpfr_clears() in preference to multiple
176 (gfc_simplify_exp): Ditto.
177 (gfc_simplify_fraction): Move gfc_set_model_kind() to after the
178 special case of 0. Use mpfr_clears() in preference to multiple
180 (gfc_simplify_gamma): Eliminate unnecessary gfc_set_model_kind().
181 (gfc_simplify_lgamma): Ditto.
182 (gfc_simplify_log10): Ditto.
183 (gfc_simplify_log): Move gfc_set_model_kind () inside switch
184 statement. Use mpfr_clears() in preference to multiple mpfr_clear().
185 (gfc_simplify_mod): Eliminate now unused variables quot, iquot,
186 and term. Simplify the mpfr magic.
187 (gfc_simplify_modulo): Ditto.
188 (gfc_simplify_nearest): Eliminate unnecessary gfc_set_model_kind().
189 (gfc_simplify_scale): Use mpfr_clears() in preference to multiple
191 (gfc_simplify_sin): Ditto
192 (gfc_simplify_sqrt): Ditto
193 (gfc_simplify_set_exponent): Move gfc_set_model_kind() to after the
194 special case of 0. Use mpfr_clears() in preference to multiple
197 2008-05-29 Daniel Franke <franke.daniel@gmail.com>
200 * Make-lang.in (F95_OBJS): Added dependency on FORTRAN_TARGET_OBJS.
202 2008-05-29 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
204 * scanner.c (load_line): Add first_char argument. Don't call ungetc.
205 (gfc_read_orig_filename): Adjust call to load_line. Don't call
207 (load_file): Adjust call to load_line.
209 2008-05-28 Janus Weil <janus@gcc.gnu.org>
213 * interface.c (gfc_procedure_use): Enable argument checking for
214 external procedures with explicit interface.
215 * symbol.c (check_conflict): Fix conflict checking for externals.
216 (copy_formal_args): Fix handling of arrays.
217 * resolve.c (resolve_specific_f0, resolve_specific_s0): Fix handling
219 * parse.c (parse_interface): Non-abstract INTERFACE statement implies
222 2008-05-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
225 * intrinsic.c (gfc_convert_chartype): Don't mark conversion
227 * trans-array.c (gfc_trans_array_ctor_element): Divide element
228 size by the size of one character to obtain length.
229 * iresolve.c (gfc_resolve_cshift): Call the _char4 variant when
231 (gfc_resolve_eoshift): Likewise.
232 * trans-intrinsic.c (gfc_conv_intrinsic_ctime): Minor beautification.
233 (gfc_conv_intrinsic_fdate): Minor beautification.
234 (gfc_conv_intrinsic_ttynam): Minor beautification.
235 (gfc_conv_intrinsic_minmax_char): Allow all character kinds.
236 (size_of_string_in_bytes): New function.
237 (gfc_conv_intrinsic_size): Call size_of_string_in_bytes for
238 character expressions.
239 (gfc_conv_intrinsic_sizeof): Likewise.
240 (gfc_conv_intrinsic_array_transfer): Likewise.
241 (gfc_conv_intrinsic_trim): Allow all character kinds. Minor
243 (gfc_conv_intrinsic_repeat): Fix comment typo.
244 * simplify.c (gfc_convert_char_constant): Take care of conversion
245 of array constructors.
247 2008-05-27 Tobias Burnus <burnus@net-b.de>
250 * trans-array.c (gfc_set_loop_bounds_from_array_spec):
251 Add missing fold_convert.
253 2008-05-26 Daniel Franke <franke.daniel@gmail.com>
255 * fortran/cpp.c (cpp_define_builtins): Remove usage of TARGET_* macros,
258 2008-05-26 Daniel Franke <franke.daniel@gmail.com>
261 * lang.opt (A, C, CC, D, E, H, P, U, cpp, d, fworking-directory,
262 imultilib, iprefix, iquote, isysroot, isystem, nocpp, nostdinc,
263 o, undef, v): New options.
264 * options.c (gfc_init_options): Also initialize preprocessor
266 (gfc_post_options): Also handle post-initialization of preprocessor
268 (gfc_handle_option): Check if option is a preprocessor option.
269 If yes, let gfc_cpp_handle_option() handle the option.
270 * lang-specs.h: Reorganized to handle new options.
271 * scanner.c (gfc_new_file): Read temporary file instead of
272 input source if preprocessing is enabled.
273 * f95-lang.c (gfc_init): Initialize preprocessor.
274 (gfc_finish): Clean up preprocessor.
277 * Make-lang.in: Added new objects and dependencies.
278 * gfortran.texi: Updated section "Preprocessing and
279 conditional compilation".
280 * invoke.texi: Added new section "Preprocessing Options",
281 listed and documented the preprocessing options handled
284 2008-05-25 Tobias Burnus <burnus@net-b.de>
287 * trans-expr.c (gfc_conv_function_call): Remove library
288 call for c_f_pointer with scalar Fortran pointers and for
291 2008-05-21 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
294 * iresolve.c (check_charlen_present): Don't force the rank to 1.
296 2008-05-19 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
299 * trans-expr.c (gfc_conv_string_tmp): Pick the correct type for
300 the temporary variable.
302 2008-05-19 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
304 * simplify.c (gfc_simplify_dble, gfc_simplify_real): Initialize
305 result variable to avoid warnings.
307 2008-05-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
309 * intrinsic.c (char_conversions, ncharconv): New static variables.
310 (find_char_conv): New function.
311 (add_functions): Add simplification functions for ADJUSTL and
312 ADJUSTR. Don't check the kind of their argument. Add checking for
313 LGE, LLE, LGT and LLT.
314 (add_subroutines): Fix argument type for SLEEP. Fix argument name
316 (add_char_conversions): New function.
317 (gfc_intrinsic_init_1): Call add_char_conversions.
318 (gfc_intrinsic_done_1): Free char_conversions.
319 (check_arglist): Use kind == 0 as a signal that we don't want
320 the kind value to be checked.
321 (do_simplify): Also simplify character functions.
322 (gfc_convert_chartype): New function
323 * trans-array.c (gfc_trans_array_ctor_element): Don't force the
324 use of default character type.
325 (gfc_trans_array_constructor_value): Likewise.
326 (get_array_ctor_var_strlen): Use integer kind to build an integer
327 instead of a character kind!
328 (gfc_build_constant_array_constructor): Don't force the use of
329 default character type.
330 (gfc_conv_loop_setup): Likewise.
331 * trans-expr.c (gfc_conv_string_tmp): Don't force the use of
332 default character type. Allocate enough memory for wide strings.
333 (gfc_conv_concat_op): Make sure operand kind are the same.
334 (string_to_single_character): Remove gfc_ prefix. Reindent.
335 Don't force the use of default character type.
336 (gfc_conv_scalar_char_value): Likewise.
337 (gfc_build_compare_string): Call string_to_single_character.
338 (fill_with_spaces): New function
339 (gfc_trans_string_copy): Add kind arguments. Use them to deal
340 with wide character kinds.
341 (gfc_conv_statement_function): Whitespace fix. Call
342 gfc_trans_string_copy with new kind arguments.
343 (gfc_conv_substring_expr): Call gfc_build_wide_string_const
344 instead of using gfc_widechar_to_char.
345 (gfc_conv_string_parameter): Don't force the use of default
347 (gfc_trans_scalar_assign): Pass kind args to gfc_trans_string_copy.
348 * intrinsic.h (gfc_check_lge_lgt_lle_llt, gfc_convert_char_constant,
349 gfc_resolve_adjustl, gfc_resolve_adjustr): New prototypes.
350 * decl.c (gfc_set_constant_character_len): Don't assert the
351 existence of a single character kind.
352 * trans-array.h (gfc_trans_string_copy): New prototype.
353 * gfortran.h (gfc_check_character_range, gfc_convert_chartype):
355 * error.c (print_wide_char_into_buffer): New function lifting
356 code from gfc_print_wide_char. Fix order to output '\x??' instead
358 (gfc_print_wide_char): Call print_wide_char_into_buffer.
359 (show_locus): Call print_wide_char_into_buffer with buffer local
361 * trans-const.c (gfc_build_wide_string_const): New function.
362 (gfc_conv_string_init): Deal with wide characters strings
364 (gfc_conv_constant_to_tree): Call gfc_build_wide_string_const.
365 * trans-stmt.c (gfc_trans_label_assign): Likewise.
366 (gfc_trans_character_select): Deal with wide strings.
367 * expr.c (gfc_check_assign): Allow conversion between character
369 * trans-const.h (gfc_build_wide_string_const): New prototype.
370 * trans-types.c (gfc_get_character_type_len_for_eltype,
371 gfc_get_character_type_len): Create too variants of the old
372 gfc_get_character_type_len, one getting kind argument and the
373 other one directly taking a type tree.
374 * trans.h (gfor_fndecl_select_string_char4,
375 gfor_fndecl_convert_char1_to_char4,
376 gfor_fndecl_convert_char4_to_char1): New prototypes.
377 * trans-types.h (gfc_get_character_type_len_for_eltype): New
379 * resolve.c (resolve_operator): Exit early when kind mismatches
380 are detected, because that makes us issue an error message later.
381 (validate_case_label_expr): Fix wording of error message.
382 * iresolve.c (gfc_resolve_adjustl, gfc_resolve_adjustr): New
384 (gfc_resolve_pack): Call _char4 variants of library function
385 when dealing with wide characters.
386 (gfc_resolve_reshape): Likewise.
387 (gfc_resolve_spread): Likewise.
388 (gfc_resolve_transpose): Likewise.
389 (gfc_resolve_unpack): Likewise.
390 * target-memory.c (size_character): Take character kind bit size
391 correctly into account (not that it changes anything for now, but
393 (gfc_encode_character): Added gfc_ prefix. Encoding each
394 character of a string by calling native_encode_expr for the
395 corresponding unsigned integer.
396 (gfc_target_encode_expr): Add gfc_ prefix to encode_character.
397 * trans-decl.c (gfc_build_intrinsic_function_decls): Build
398 gfor_fndecl_select_string_char4, gfor_fndecl_convert_char1_to_char4
399 and gfor_fndecl_convert_char4_to_char1.
400 * target-memory.h (gfc_encode_character): New prototype.
401 * arith.c (gfc_check_character_range): New function.
402 (eval_intrinsic): Allow non-default character kinds.
403 * check.c (gfc_check_access_func): Only allow default
404 character kind arguments.
405 (gfc_check_chdir): Likewise.
406 (gfc_check_chdir_sub): Likewise.
407 (gfc_check_chmod): Likewise.
408 (gfc_check_chmod_sub): Likewise.
409 (gfc_check_lge_lgt_lle_llt): New function.
410 (gfc_check_link): Likewise.
411 (gfc_check_link_sub): Likewise.
412 (gfc_check_symlnk): Likewise.
413 (gfc_check_symlnk_sub): Likewise.
414 (gfc_check_rename): Likewise.
415 (gfc_check_rename_sub): Likewise.
416 (gfc_check_fgetputc_sub): Likewise.
417 (gfc_check_fgetput_sub): Likewise.
418 (gfc_check_stat): Likewise.
419 (gfc_check_stat_sub): Likewise.
420 (gfc_check_date_and_time): Likewise.
421 (gfc_check_ctime_sub): Likewise.
422 (gfc_check_fdate_sub): Likewise.
423 (gfc_check_gerror): Likewise.
424 (gfc_check_getcwd_sub): Likewise.
425 (gfc_check_getarg): Likewise.
426 (gfc_check_getlog): Likewise.
427 (gfc_check_hostnm): Likewise.
428 (gfc_check_hostnm_sub): Likewise.
429 (gfc_check_ttynam_sub): Likewise.
430 (gfc_check_perror): Likewise.
431 (gfc_check_unlink): Likewise.
432 (gfc_check_unlink_sub): Likewise.
433 (gfc_check_system_sub): Likewise.
434 * primary.c (got_delim): Perform correct character range checking
436 * trans-intrinsic.c (gfc_conv_intrinsic_conversion): Generate
437 calls to library functions convert_char4_to_char1 and
438 convert_char1_to_char4 for character conversions.
439 (gfc_conv_intrinsic_char): Allow all character kings.
440 (gfc_conv_intrinsic_strcmp): Fix whitespace.
441 (gfc_conv_intrinsic_repeat): Take care of all character kinds.
442 * intrinsic.texi: For all GNU intrinsics accepting character
443 arguments, mention that they're restricted to the default kind.
444 * simplify.c (simplify_achar_char): New function.
445 (gfc_simplify_achar, gfc_simplify_char): Call simplify_achar_char.
446 gfc_simplify_ichar): Don't error out for wide characters.
447 (gfc_convert_char_constant): New function.
449 2008-05-18 Steven G. Kargl <kargls@comcast.net>
452 * symbol.c (check_conflict): Issue errors for abuse of PUBLIC, PRIVATE,
454 * resolve.c (gfc_verify_binding_labels): Fix NULL pointer dereference.
456 2008-05-17 Tobias Burnus <burnus@net-b.de>
458 * intrinsic.texi: Correct description of GET_COMMAND_ARGUMENT
459 and GET_ENVIRONMENT_VARIABLE; fix keyword= name for GETENV,
460 GETLOG, GMTIME, HOSTNM, IRAND, ITIME, KILL.
461 Move LOG_GAMMA after LOG10.
463 2008-05-17 Tobias Burnus <burnus@net-b.de>
465 * intrinsic.c (add_functions): Change FLUSH(C) to FLUSH(UNIT).
466 * intrinsic.texi: Change INTEGER(*) to INTEGER; fix keyword= name for
467 ABS, ADJUSTL, AINT, ALLOCATED, ANINT, ASSOCIATED, C_ASSOCIATED,
468 CEILING, DBLE, DFLOAT, DOT_PRODUCT, DREAL, FLOAT, FLOOR, GET_COMMAND.
470 2008-05-16 Paul Thomas <pault@gcc.gnu.org>
474 * trans-stmt.c (gfc_trans_where): Tighten up the dependency
475 check for calling gfc_trans_where_3.
478 * trans-stmt.c (gfc_trans_where_2): Set the mask size to zero
479 if it is calculated to be negative.
482 * trans-stmt.c (gfc_trans_where_3, gfc_trans_where_assign): Set
483 ss->where for scalar right hand sides.
484 * trans-array.c (gfc_add_loop_ss_code): If ss->where is set do
485 not evaluate scalars outside the loop. Clean up whitespace.
486 * trans.h : Add a bitfield 'where' to gfc_ss.
488 2008-05-16 Tobias Burnus <burnus@net-b.de>
490 * libgfortran.h: Increase GFC_MAX_DIMENSIONS to 15.
491 * array.c (gfc_match_array_spec): Error with -std=f2003 if rank > 7.
493 2008-04-16 Daniel Kraft <d@domob.eu>
496 * gfortran.h: Added field "length_from_typespec" to gfc_charlength.
497 * aray.c (gfc_match_array_constructor): Added code to parse typespec.
498 (check_element_type, check_constructor_type, gfc_check_constructor_type):
499 Extended to support explicit typespec on constructor.
500 (gfc_resolve_character_array_constructor): Pad strings correctly for
501 explicit, constant character length.
502 * trans-array.c: New static global variable "typespec_chararray_ctor"
503 (gfc_trans_array_constructor): New code to support explicit but dynamic
506 2008-05-16 Jerry DeLisle <jvdelisle@gcc.gnu.org>
509 * decl.c (match_attr_spec): Check for matching pairs of parenthesis.
510 * expr.c (gfc_specification_expr): Supplement the error message with the
512 * resolve.c (gfc_resolve_index): Likewise.
513 * match.c (gfc_match_parens): Clarify error message with "at or before".
514 (gfc_match_do): Check for matching pairs of parenthesis.
516 2008-05-16 Tobias Burnus <burnus@net-b.de
518 * intrinsic.texi: Write Fortran 77/90/95 instead of F77/90/95;
519 add missing KIND argument to ACHAR and NINT; and state that
520 the KIND argument is a F2003 extension for ACHAR, COUNT, IACHAR,
521 ICHAR, INDEX, LBOUND, LEN, LEN_TRIM, SCAN, SIZE, UBOUND, VERIFY.
523 2008-05-16 Daniel Kraft <d@domob.eu>
525 * primary.c: New private structure "gfc_structure_ctor_component".
526 (gfc_free_structure_ctor_component): New helper function.
527 (gfc_match_structure_constructor): Extended largely to support named
528 arguments and default initialization for structure constructors.
530 2008-05-15 Steven G. Kargl <kargls@comcast.net>
532 * simplify.c (gfc_simplify_dble, gfc_simplify_float,
533 simplify_bound, gfc_simplify_nearest, gfc_simplify_real): Plug
534 possible memory leaks.
535 (gfc_simplify_reshape): Plug possible memory leaks and dereferencing
538 2008-05-15 Steven G. Kargl <kargls@comcast.net>
541 * simplify.c (gfc_simplify_int, gfc_simplify_intconv): Replaced hand
542 rolled integer conversion with gfc_int2int, gfc_real2int, and
544 (gfc_simplify_intconv): Renamed to simplify_intconv.
546 2008-05-15 Steven G. Kargl, <kargl@comcast.net>
547 * gfortran.dg/and_or_xor.f90: New test
549 * fortran/simplify.c (gfc_simplify_and, gfc_simplify_or,
550 gfc_simplify_xor): Don't range check logical results.
552 2008-05-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
554 * trans-expr.c (gfc_conv_concat_op): Take care of nondefault
556 (gfc_build_compare_string): Add kind argument and use it.
557 (gfc_conv_statement_function): Fix indentation.
558 * gfortran.h (gfc_character_info): New structure.
559 (gfc_character_kinds): New array.
560 * trans-types.c (gfc_character_kinds, gfc_character_types,
561 gfc_pcharacter_types): New array.
562 (gfc_init_kinds): Fill character kinds array.
563 (validate_character): Take care of nondefault character kinds.
564 (gfc_build_uint_type): New function.
565 (gfc_init_types): Take care of nondefault character kinds.
566 (gfc_get_char_type, gfc_get_pchar_type): New functions.
567 (gfc_get_character_type_len): Use gfc_get_char_type.
568 * trans.h (gfc_build_compare_string): Adjust prototype.
569 (gfor_fndecl_compare_string_char4, gfor_fndecl_concat_string_char4,
570 gfor_fndecl_string_len_trim_char4, gfor_fndecl_string_index_char4,
571 gfor_fndecl_string_scan_char4, gfor_fndecl_string_verify_char4,
572 gfor_fndecl_string_trim_char4, gfor_fndecl_string_minmax_char4,
573 gfor_fndecl_adjustl_char4, gfor_fndecl_adjustr_char4): New
575 * trans-types.h (gfc_get_char_type, gfc_get_pchar_type): New
577 * trans-decl.c (gfor_fndecl_compare_string_char4,
578 gfor_fndecl_string_len_trim_char4, gfor_fndecl_string_index_char4,
579 gfor_fndecl_string_scan_char4, gfor_fndecl_string_verify_char4,
580 gfor_fndecl_string_trim_char4, gfor_fndecl_string_minmax_char4,
581 gfor_fndecl_adjustl_char4, gfor_fndecl_adjustr_char4,
582 gfor_fndecl_concat_string_char4): New function decls.
583 (gfc_build_intrinsic_function_decls): Define new *_char4 function
585 * trans-intrinsic.c (gfc_conv_intrinsic_minmax_char,
586 gfc_conv_intrinsic_len_trim, gfc_conv_intrinsic_ichar,
587 gfc_conv_intrinsic_strcmp, gfc_conv_intrinsic_trim,
588 gfc_conv_intrinsic_function): Deal with nondefault character kinds.
590 2008-05-15 Sa Liu <saliu@de.ibm.com>
592 * iso-c-binding.def: Add standard parameter to macro NAMED_INTCST.
593 All existing NAMED_INTCST definitions has standard GFC_STD_F2003,
594 c_int128_t, c_int_least128_t and c_int_fast128_t are added as
596 * iso-fortran-evn.def: Add standard parameter GFC_STD_F2003
597 to macro NAMED_INTCST.
598 * symbol.c (std_for_isocbinding_symbol): New helper function to
599 return the standard that supports this isocbinding symbol.
600 (generate_isocbinding_symbol): Do not generate GNU extension symbols
601 if std=f2003. Add new parameter to NAMED_INTCST.
602 * module.c (use_iso_fortran_env_module): Add new parameter to
603 NAMED_INTCST and new field standard to struct intmod_sym.
604 * gfortran.h: Add new parameter to NAMED_INTCST.
605 * trans-types.c (init_c_interop_kinds): Add new parameter to
607 * intrinsic.texi: Documented new types C_INT128_T, C_INT_LEASE128_T
610 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
613 * trans-decl.c (gfc_build_dummy_array_decl): Don't repack
614 arrays that have the TARGET attribute.
616 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
619 * simplify.c (only_convert_cmplx_boz): New function.
620 (gfc_simplify_cmplx, gfc_simplify_complex, gfc_simplify_dcmplx):
621 Call only_convert_cmplx_boz.
623 2008-05-14 Paul Thomas <pault@gcc.gnu.org>
626 * interface.c (compare_actual_formal): Do not check sizes if the
627 actual is BT_PROCEDURE.
629 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
632 * trans-array.c (gfc_conv_ss_startstride): Any negative size is
633 the same as zero size.
634 (gfc_conv_loop_setup): Fix size calculation.
636 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
639 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Correctly
640 handle zero-size sections.
642 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
645 * scanner.c (preprocessor_line): Allocate enough memory for a
648 2008-05-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
651 * target-memory.c (gfc_target_expr_size): Correctly treat
653 (gfc_target_encode_expr): Likewise.
654 (gfc_interpret_complex): Whitespace change.
656 2008-05-11 Thomas Koenig <tkoenig@gcc.gnu.org>
659 * trans.c (gfc_call_malloc): If size equals zero, allocate one
660 byte; don't return a null pointer.
662 2008-05-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
665 * module.c (quote_string): Fix sprintf format.
667 2008-05-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
670 * module.c (quote_string, unquote_string,
671 mio_allocated_wide_string): New functions.
672 (mio_expr): Call mio_allocated_wide_string where needed.
674 2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>
676 * trans-decl.c (gfc_get_extern_function_decl, build_function_decl):
677 Rename DECL_IS_PURE to DECL_PURE_P.
679 2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
681 * arith.c: (gfc_arith_concat, gfc_compare_string,
682 gfc_compare_with_Cstring, hollerith2representation,
683 gfc_hollerith2int, gfc_hollerith2real, gfc_hollerith2complex,
684 gfc_hollerith2character, gfc_hollerith2logical): Use wide
685 characters for character constants.
686 * data.c (create_character_intializer): Likewise.
687 * decl.c (gfc_set_constant_character_len): Likewise.
688 * dump-parse-tree.c (show_char_const): Correctly dump wide
690 error.c (print_wide_char): Rename into gfc_print_wide_char.
691 (show_locus): Adapt to new prototype of gfc_print_wide_char.
692 expr.c (free_expr0): Representation is now disjunct from
693 character string value, so we always free it.
694 (gfc_copy_expr, find_substring_ref, gfc_simplify_expr): Adapt
695 to wide character strings.
696 * gfortran.h (gfc_expr): Make value.character.string a wide string.
697 (gfc_wide_toupper, gfc_wide_strncasecmp, gfc_wide_memset,
698 gfc_widechar_to_char, gfc_char_to_widechar): New prototypes.
699 (gfc_get_wide_string): New macro.
700 (gfc_print_wide_char): New prototype.
701 * io.c (format_string): Make a wide string.
702 (next_char, gfc_match_format, compare_to_allowed_values,
703 gfc_match_open): Deal with wide strings.
704 * module.c (mio_expr): Convert between wide strings and ASCII ones.
705 * primary.c (match_hollerith_constant, match_charkind_name):
707 * resolve.c (build_default_init_expr): Likewise.
708 * scanner.c (gfc_wide_toupper, gfc_wide_memset,
709 gfc_char_to_widechar): New functions.
710 (wide_strchr, gfc_widechar_to_char, gfc_wide_strncasecmp):
711 Changes in prototypes.
712 (gfc_define_undef_line, load_line, preprocessor_line,
713 include_line, load_file, gfc_read_orig_filename): Handle wide
715 * simplify.c (gfc_simplify_achar, gfc_simplify_adjustl,
716 gfc_simplify_adjustr, gfc_simplify_char, gfc_simplify_iachar,
717 gfc_simplify_ichar, simplify_min_max, gfc_simplify_new_line,
718 gfc_simplify_repeat): Handle wide strings.
719 (wide_strspn, wide_strcspn): New helper functions.
720 (gfc_simplify_scan, gfc_simplify_trim, gfc_simplify_verify):
722 * symbol.c (generate_isocbinding_symbol): Likewise.
723 * target-memory.c (size_character, gfc_target_expr_size,
724 encode_character, gfc_target_encode_expr, gfc_interpret_character,
725 gfc_target_interpret_expr): Handle wide strings.
726 * trans-const.c (gfc_conv_string_init): Lower wide strings to
728 (gfc_conv_constant_to_tree): Likewise.
729 * trans-expr.c (gfc_conv_substring_expr): Handle wide strings.
730 * trans-io.c (gfc_new_nml_name_expr): Likewise.
731 * trans-stmt.c (gfc_trans_label_assign): Likewise.
733 2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
735 * simplify.c (gfc_simplify_bessel_j0,gfc_simplify_bessel_j1,
736 gfc_simplify_bessel_jn,gfc_simplify_bessel_y0,
737 gfc_simplify_bessel_y1,gfc_simplify_bessel_yn): Mark arguments
738 with ATTRIBUTE_UNUSED.
740 2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
742 * check.c (gfc_check_sizeof): Switch to ATTRIBUTE_UNUSED.
743 * simplify.c (gfc_simplify_lgamma): Likewise.
745 2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
747 * openmp.c (gfc_match_omp_eos): Use gfc_next_ascii_char and
749 * decl.c (gfc_match_kind_spec, gfc_match_type_spec,
750 gfc_match_implicit_none, match_implicit_range, gfc_match_implicit,
751 match_string_p, match_attr_spec, gfc_match_suffix,
752 match_procedure_decl, gfc_match_entry, gfc_match_subroutine):
754 * gfortran.h (gfc_char_t): New type.
755 (gfc_linebuf): Make line member a gfc_char_t.
756 (locus): Make nextc member a gfc_char_t.
757 (gfc_wide_is_printable, gfc_wide_is_digit, gfc_wide_fits_in_byte,
758 gfc_wide_tolower, gfc_wide_strlen, gfc_next_ascii_char,
759 gfc_peek_ascii_char, gfc_check_digit): New prototypes.
760 * error.c (print_wide_char): New function.
761 (show_locus): Use print_wide_char and gfc_wide_strlen.
762 * io.c (next_char): Use gfc_char_t type.
763 (match_io): Use gfc_peek_ascii_char and gfc_next_ascii_char.
764 * match.c (gfc_match_parens, gfc_match_eos,
765 gfc_match_small_literal_int, gfc_match_name, gfc_match_name_C,
766 gfc_match_intrinsic_op, gfc_match_char, gfc_match_return,
767 gfc_match_common): Likewise.
768 * match.h (gfc_match_special_char): Change prototype.
769 * parse.c (decode_specification_statement, decode_statement,
770 decode_omp_directive, next_free, next_fixed): Use
771 gfc_peek_ascii_char and gfc_next_ascii_char.
772 * primary.c (gfc_check_digit): Change name.
773 (match_digits, match_hollerith_constant, match_boz_constant,
774 match_real_constant, next_string_char, match_charkind_name,
775 match_string_constant, match_logical_constant_string,
776 match_complex_constant, match_actual_arg, match_varspec,
777 gfc_match_rvalue, match_variable): Use gfc_peek_ascii_char and
779 * scanner.c (gfc_wide_fits_in_byte, wide_is_ascii,
780 gfc_wide_is_printable, gfc_wide_tolower, gfc_wide_is_digit,
781 gfc_wide_is_digit, wide_atoi, gfc_wide_strlen, wide_strcpy,
782 wide_strchr, widechar_to_char, wide_strncmp, wide_strncasecmp,
783 gfc_next_ascii_char, gfc_peek_ascii_char):
785 (next_char, gfc_define_undef_line, skip_free_comments,
786 gfc_next_char_literal, gfc_next_char, gfc_peek_char,
787 gfc_error_recovery, load_line, preprocessor_line, include_line,
788 load_file, gfc_read_orig_filename): Use gfc_char_t for source
789 characters and the {gfc_,}wide_* functions to manipulate wide
792 2008-05-06 Tobias Burnus <burnus@net-b.de>
795 * intrinsic.c (add_functions): Call gfc_simplify_bessel_*.
796 * intrinsic.h: Add prototypes for gfc_simplify_bessel_*.
797 * simplify.c (gfc_simplify_bessel_j0,gfc_simplify_bessel_j1,
798 gfc_simplify_bessel_jn,gfc_simplify_bessel_y0,
799 gfc_simplify_bessel_y1,gfc_simplify_bessel_yn): New.
801 2008-05-03 Janus Weil <jaydub66@gmail.com>
803 * misc.c (gfc_clear_ts): Set interface to NULL.
805 2008-05-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
808 * gfortran.h: Add extra_comma pointer to gfc_dt structure. Add iokind to
809 gfc_expr value union. Add io_kind enum to here from io.c.
810 * io.c (gfc_free_dt): Free extra_comma.
811 (gfc_resolve_dt): If an extra comma was encountered and io_unit is type
812 BT_CHARACTER, resolve to format_expr and set default unit. Error if
813 io_kind is M_WRITE. (match_io): Match the extra comma and set new
814 pointer, extra_comma.
816 2008-05-01 Bud Davis <bdavis9659@sbcglobal.net>
819 * simplify.c (gfc_simplify_index): Check for direction argument
822 2008-05-01 Janus Weil <jaydub66@gmail.com>
824 * gfortran.h (struct gfc_symbol): Moving "interface" member to
825 gfc_typespec (plus fixing a small docu error).
826 * interface.c (gfc_procedure_use): Ditto.
827 * decl.c (match_procedure_decl): Ditto.
828 * resolve.c (resolve_specific_f0,
829 resolve_specific_f0, resolve_symbol): Ditto.
831 2008-04-30 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
833 * intrinsic.c (add_functions): Add SELECTED_CHAR_KIND intrinsic.
834 * intrinsic.h (gfc_check_selected_char_kind,
835 gfc_simplify_selected_char_kind): New prototypes.
836 * gfortran.h (gfc_isym_id): Add GFC_ISYM_SC_KIND.
837 * trans.h (gfor_fndecl_sc_kind): New function decl.
838 * trans-decl.c (gfor_fndecl_sc_kind): Build new decl.
839 * arith.c (gfc_compare_with_Cstring): New function.
840 * arith.h (gfc_compare_with_Cstring): New prototype.
841 * check.c (gfc_check_selected_char_kind): New function.
842 * primary.c (match_string_constant, match_kind_param): Mark
843 symbols used as literal constant kind param as referenced.
844 * trans-intrinsic.c (gfc_conv_intrinsic_sc_kind): New function.
845 (gfc_conv_intrinsic_function): Call gfc_conv_intrinsic_sc_kind.
846 * intrinsic.texi (SELECTED_CHAR_KIND): Document new intrinsic.
847 * simplify.c (gfc_simplify_selected_char_kind): New function.
849 2008-04-28 Paul Thomas <pault@gcc.gnu.org>
852 * module.c (find_symbol): Do not return a result for a symbol
853 that has been renamed in another module.
855 2008-04-26 George Helffrich <george@gcc.gnu.org>
859 * trans-common.c (create_common): Add decl to function
860 chain (if inside one) to preserve identifier scope in debug output.
862 2008-04-25 Jan Hubicka <jh@suse.cz>
864 * trans-decl.c (trans_function_start): Update.
866 2008-04-25 Tobias Burnus <burnus@net-b.de>
867 Daniel Franke <franke.daniel@gmail.com>
870 * gfortranspec.c (lang_specific_driver): Deprecate
871 -M option; fix ICE when "-M" is last argument and
873 * options.c (gfc_handle_module_path_options):
874 Use -J instead of -M in error messages.
875 * invoke.texi: Mark -M as depecated.
877 2008-04-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
878 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
881 * trans-instrinsic.c (gfc_conv_intrinsic_minmaxloc): Correctly adjust
884 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
886 * trans-expr.c (gfc_conv_structure): Don't set TREE_INVARIANT.
887 * trans-array.c (gfc_build_null_descriptor): Don't set TREE_INVARIANT.
888 (gfc_trans_array_constructor_value): Don't set TREE_INVARIANT.
889 (gfc_build_constant_array_constructor): Don't set TREE_INVARIANT.
890 (gfc_conv_array_initializer): Don't set TREE_INVARIANT.
891 * trans-common.c (get_init_field): Don't set TREE_INVARIANT.
892 (create_common): Don't set TREE_INVARIANT.
893 * trans-stmt.c (gfc_trans_character_select): Don't set TREE_INVARIANT.
894 * trans-decl.c (gfc_generate_function_code): Don't set TREE_INVARIANT.
896 2008-04-21 Steve Ellcey <sje@cup.hp.com>
898 * f95-lang.c (gfc_init_decl_processing): use ptr_mode instead of Pmode.
900 2008-04-21 Daniel Franke <franke.daniel@gmail.com>
903 * gfortranspec.c (lookup_option): Properly handle separated arguments
904 in -J option, print missing argument message when necessary.
906 2008-04-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>
909 * scanner.c (skip_fixed_comments): Update continue_line when comment is
910 detected. (gfc_next_char_literal): Likewise.
912 2008-04-19 Paul Thomas <pault@gcc.gnu.org>
917 * trans_array.c (gfc_trans_array_constructor): Temporarily
918 realign loop, if loop->from is not zero, before creating
919 the temporary array and provide an offset.
922 * trans-decl.c (gfc_init_default_dt): Add gfc_ prefix to name
923 and allow for NULL body. Change all references from
924 init_default_dt to gfc_init_default_dt.
925 * trans.h : Add prototype for gfc_init_default_dt.
926 * trans-array.c (gfc_trans_deferred_vars): After nullification
927 call gfc_init_default_dt for derived types with allocatable
930 2008-04-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
933 * trans-common.c (create_common): Revert patch causing regression.
935 2008-04-16 Jerry DeLisle <jvdelisle@gcc.gnu.org>
938 * iresolve.c (gfc_resolve_eoshift): Check for NULL symtree in test for
939 optional argument attribute.
941 2008-04-16 Paul Thomas <pault@gcc.gnu.org>
944 * trans-intrinsic.c (gfc_conv_intrinsic_char): Even though KIND
945 is not used, the argument must be converted.
947 2008-04-16 Jakub Jelinek <jakub@redhat.com>
950 * f95-lang.c (gfc_init_builtin_functions): Make sure
951 BUILT_IN_SINCOS{,F,L} types aren't varargs.
953 2008-04-15 Paul Thomas <pault@gcc.gnu.org>
956 * expr.c (scalarize_intrinsic_call): Reorder identification of
957 array argument so that if one is not found a segfault does not
958 occur. Return FAILURE if all scalar arguments.
960 2008-04-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
961 Tobias Burnus <burnus@net-b.de>
964 * options.c (gfc_init_options): Set the default maximum continuation
965 lines to 255 for both free and fixed form source for warnings.
966 (gfc_handle_option): Set -std=f95 fixed form max continuations to 19 and
967 the -std=f95 free form max continuations to 39 for warnings.
968 * scanner.c (gfc_next_char_literal): Adjust the current_line number only
969 if it is less than the current locus.
971 2008-04-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
973 PR fortran/25829 28655
974 * io.c (io_tag): Add new tags for decimal, encoding, asynchronous,
975 round, sign, and id. (match_open_element): Match new tags.
976 (gfc_resolve_open): Resolve new tags. (gfc_match_open): Enable encoding
977 for DEFAULT only. Update error messages. (match_dt_element): Fix match
978 tag for asynchronous. Update error messages. (gfc_free_inquire): Free
979 new expressions. (match_inquire_element): Match new tags.
980 (gfc_match_inquire): Add constraint for ID and PENDING.
981 (gfc_resolve_inquire): Resolve new tags.
982 * trans-io.c (gfc_trans_inquire): Clean up whitespace and fix setting of
983 mask for ID parameter.
984 * ioparm.def: Fix order of parameters for pending, round, and sign.
985 NOTE: These must line up with the definitions in libgfortran/io/io.h. or
988 2008-04-06 Paul Thomas <pault@gcc.gnu.org>
991 * expr.c (scalarize_intrinsic_call): Identify which argument is
992 an array and use that as the template.
993 (check_init_expr): Remove tests that first argument is an array
994 in the call to scalarize_intrinsic_call.
996 2008-04-06 Tobias Schlüter <tobi@gcc.gnu.org>
999 * io.c (io_tag): Add field 'value'. Split 'spec' field in
1001 (match_etag, match_vtag, match_ltag): Split parsing in two steps
1002 to give better error messages.
1004 2008-04-06 Tobias Burnus <burnus@net-b.de>
1006 * io.c (check_io_constraints): Add constrains. ID= requires
1007 asynchronous= and asynchronous= must be init expression.
1009 2008-04-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1011 * f95-lang.c: Set LANG_HOOKS_NAME to "GNU Fortran".
1013 2008-04-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1015 * dump-parse-tree.c: Use fprintf, fputs and fputc instead of
1016 gfc_status and gfc_status_char. Remove gfc_ prefix of the gfc_show_*
1017 functions and make them static. Add new gfc_dump_parse_tree
1019 * gfortran.h (gfc_option_t): Rename verbose into dump_parse_tree.
1020 (gfc_status, gfc_status_char): Delete prototypes.
1021 * error.c (gfc_status, gfc_status_char): Remove functions.
1022 * scanner.c (gfc_new_file): Use printf instead of gfc_status.
1023 * options.c (gfc_init_options): Rename verbose into dump_parse_tree.
1024 (gfc_handle_module_path_options): Use gfc_fatal_error instead of
1025 gfc_status and exit.
1026 (gfc_handle_option): Rename verbose into dump_parse_tree.
1027 * parse.c (gfc_parse_file): Use gfc_dump_parse_tree.
1029 2008-04-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1030 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1032 PR fortran/25829 28655
1033 * dump-parse-tree.c (gfc_show_code_node): Show new I/O parameters.
1034 * gfortran.h (gfc_statement): Add ST_WAIT enumerator.
1035 (gfc_open): Add pointers for decimal, encoding, round, sign,
1036 asynchronous. (gfc_inquire): Add pointers for asynchronous, decimal,
1037 encoding, pending, round, sign, size, id.
1038 (gfc_wait): New typedef struct. (gfc_dt): Add pointers for id, pos,
1039 asynchronous, blank, decimal, delim, pad, round, sign.
1040 (gfc_exec_op): Add EXEC_WAIT enumerator. (gfc_code): Add pointer for
1041 wait. (gfc_free_wait), (gfc_resolve_wait): New function prototypes.
1042 * trans-stmt.h (gfc_trans_wait): New function prototype.
1043 * trans.c (gfc_trans_code): Add case for EXEC_WAIT.
1044 * io.c (io_tag): Add new tags for DECIMAL, ENCODING, ROUND, SIGN,
1045 ASYCHRONOUS, ID. (match_open_element): Add matchers for new tags.
1046 (gfc_free_open): Free new pointers. (gfc_resolve_open): Resolve new
1047 tags. (gfc_resolve_open): Remove comment around check for allowed
1048 values and ASYNCHRONOUS, update it. Likewise for DECIMAL, ENCODING,
1049 ROUND, and SIGN. (match_dt_element): Add matching for new tags.
1050 (gfc_free_wait): New function. (gfc_resolve_wait): New function.
1051 (match_wait_element): New function. (gfc_match_wait): New function.
1052 * resolve.c (gfc_resolve_blocks): Add case for EXEC_WAIT.
1053 (resolve_code): Add case for EXEC_WAIT.
1054 * st.c (gfc_free_statement): Add case for EXEC_WAIT.
1055 * trans-io.c (ioparam_type): Add IOPARM_ptype_wait. (gfc_st_parameter):
1056 Add "wait" entry. (iocall): Add IOCALL_WAIT enumerator.
1057 (gfc_build_io_library_fndecls): Add function declaration for st_wait.
1058 (gfc_trans_open): Add mask bits for new I/O tags.
1059 (gfc_trans_inquire): Add mask bits for new I/O tags.
1060 (gfc_trans_wait): New translation function.
1061 (build_dt): Add mask bits for new I/O tags.
1062 * match.c (gfc_match_if) Add matcher for "wait".
1063 * match.h (gfc_match_wait): Prototype for new function.
1064 * ioparm.def: Add new I/O parameter definitions.
1065 * parse.c (decode_statement): Add match for "wait" statement.
1066 (next_statement): Add case for ST_WAIT. (gfc_ascii_statement): Same.
1068 2008-04-03 Jakub Jelinek <jakub@redhat.com>
1071 * openmp.c (resolve_omp_clauses): Diagnose if a clause symbol
1074 2008-04-03 Tom Tromey <tromey@redhat.com>
1076 * Make-lang.in (fortran_OBJS): New variable.
1078 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
1080 * f95-lang.c (insert_block): Kill.
1082 2008-04-01 George Helffrich <george@gcc.gnu.org>
1084 PR fortran/35154, fortran/23057
1085 * trans-common.c (create_common): Add decl to function
1086 chain to preserve identifier scope in debug output.
1088 2008-04-01 Joseph Myers <joseph@codesourcery.com>
1090 * gfortran.texi: Include gpl_v3.texi instead of gpl.texi
1091 * Make-lang.in (GFORTRAN_TEXI): Include gpl_v3.texi instead of
1094 2008-03-30 Paul Thomas <pault@gcc.gnu.org>
1097 * resolve.c (resolve_function, resolve_call): If the procedure
1098 is elemental do not look for noncopying intrinsics.
1100 2008-03-29 Paul Thomas <pault@gcc.gnu.org>
1103 * trans-array.c (gfc_array_init_size): Set 'size' zero if
1104 negative in one dimension.
1107 * trans-expr.c (gfc_trans_string_copy): Only assign a char
1108 directly if the lhs and rhs types are the same.
1110 2008-03-28 Daniel Franke <franke.daniel@gmail.com>
1111 Paul Richard Thomas <paul.richard.thomas@gmail.com>
1114 * primary.c (match_variable): Improved matching of function
1116 * resolve.c (resolve_allocate_deallocate): Removed checks if
1117 the actual argument for STAT is a variable.
1119 2008-03-28 Tobias Burnus <burnus@net-b.de>
1121 * symbol.c (gfc_get_default_type): Fix error message; option
1122 -fallow_leading_underscore should be -fallow-leading-underscore
1124 2008-03-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1127 * iresolve.c (gfc_resolve_cshift): Check for NULL symtree in test for
1128 optional argument attribute.
1130 2008-03-27 Tom Tromey <tromey@redhat.com>
1132 * Make-lang.in: Revert automatic dependency patch.
1134 2008-03-25 Tom Tromey <tromey@redhat.com>
1136 * Make-lang.in: Remove .o targets.
1137 (fortran_OBJS): New variable.
1138 (fortran/gfortranspec.o): Move to fortran/. Reduce to variable
1140 (GFORTRAN_D_OBJS): Update.
1141 (GFORTRAN_TRANS_DEPS): Remove.
1143 2008-03-24 Paul Thomas <pault@gcc.gnu.org>
1146 * resolve.c (resolve_structure_cons): It is an error to assign
1147 NULL to anything other than a pointer or allocatable component.
1150 * resolve.c (resolve_symbol): If the symbol is a derived type,
1151 resolve the derived type. If the symbol is a derived type
1152 function, ensure that the derived type is visible in the same
1153 namespace as the function.
1155 2008-03-23 Tobias Schlüter <tobi@gcc.gnu.org>
1157 * trans.h: Use fold_build in build1_v, build2_v and build3_v
1159 * trans-openmp.c (gfc_trans_omp_critical, gfc_trans_omp_single):
1160 Don't use build2_v macro.
1162 2008-03-19 Daniel Franke <franke.daniel@gmail.com>
1165 * interface.c (gfc_procedure_use): Check for keyworded arguments in
1166 procedures without explicit interfaces.
1168 2008-03-16 Paul Thomas <pault@gcc.gnu.org>
1171 * resolve.c (check_assumed_size_reference): Only visit the
1172 first reference and look directly at the highest dimension.
1174 2008-03-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1177 * trans-array.c (gfc_conv_array_index_offset): Remove unnecessary
1180 2008-03-15 Daniel Franke <franke.daniel@gmail.com>
1183 * resolve.c (resolve_branch): Less strict and pessimistic warning
1186 2008-03-11 Paolo Bonzini <bonzini@gnu.org>
1188 * f95-lang.c (LANG_HOOKS_CLEAR_BINDING_STACK): Delete.
1189 (gfc_be_parse_file): Call clear_binding_stack from here.
1190 (gfc_clear_binding_stack): Rename to clear_binding_stack.
1192 2008-03-09 Paul Thomas <pault@gcc.gnu.org>
1195 * module.c (mio_symtree_ref): After providing a symbol for a
1196 missing equivalence member, resolve and NULL the fixups.
1198 2008-03-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1200 * invoke.texi (Error and Warning Options): Document
1203 2008-03-08 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1206 * trans-array.c (gfc_conv_ss_startstride): Fix the logic to avoid
1207 checking bounds of absent optional arguments.
1209 2008-03-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1212 * intrinsic.c (add_functions): Add simplification routines for
1213 ERF, DERF, ERFC and DERFC.
1214 * decl.c (gfc_match_suffix, gfc_match_subroutine): Change GNU
1215 extensions into Fortran 2008 features.
1216 * intrinsic.h (gfc_simplify_erf, gfc_simplify_erfc): New
1218 * simplify.c (gfc_simplify_erf, gfc_simplify_erfc): New functions.
1220 2008-03-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1223 * intrinsic.c (add_functions): Modify intrinsics ACOSH, ASINH,
1224 ATANH, ERF, ERFC and GAMMA. Add intrinsics BESSEL_{J,Y}{0,1,N},
1225 ERFC_SCALED, LOG_GAMMA and HYPOT.
1226 * intrinsic.h (gfc_check_hypot, gfc_simplify_hypot,
1227 gfc_resolve_hypot): New prototypes.
1228 * mathbuiltins.def: Add HYPOT builtin. Make complex versions of
1229 ACOSH, ASINH and ATANH available.
1230 * gfortran.h (GFC_ISYM_ERFC_SCALED, GFC_ISYM_HYPOT): New values.
1231 * lang.opt: Add -std=f2008 option.
1232 * libgfortran.h: Define GFC_STD_F2008.
1233 * lang-specs.h: Add .f08 and .F08 file suffixes.
1234 * iresolve.c (gfc_resolve_hypot): New function.
1235 * parse.c (parse_contained): Allow empty CONTAINS for Fortran 2008.
1236 * check.c (gfc_check_hypot): New function.
1237 * trans-intrinsic.c (gfc_intrinsic_map): Define ERFC_SCALE builtin.
1238 * options.c (set_default_std_flags): Allow Fortran 2008 by default.
1239 (form_from_filename): Add .f08 suffix.
1240 (gfc_handle_option): Handle -std=f2008 option.
1241 * simplify.c (gfc_simplify_hypot): New function.
1242 * gfortran.texi: Document Fortran 2008 status and file extensions.
1243 * intrinsic.texi: Document new BESSEL_{J,Y}{0,1,N} intrinsics,
1244 as well as HYPOT and ERFC_SCALED. Update documentation of ERF,
1245 ERFC, GAMMA, LGAMMA, ASINH, ACOSH and ATANH.
1246 * invoke.texi: Document the new -std=f2008 option.
1248 2008-03-02 Jakub Jelinek <jakub@redhat.com>
1250 * gfortranspec.c (lang_specific_driver): Update copyright notice
1253 2008-02-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1256 * expr.c (find_array_element): Modify traversing the constructor to
1257 avoid trying to access NULL memory pointed to by next for the
1258 last element. (find_array_section): Exit while loop if cons->next is
1260 * trans-expr.c (gfc_conv_scalar_char_value): Initialize gfc_typespec.
1261 (gfc_conv_function_call): Same.
1262 * decl.c (gfc_match_implicit): Same.
1263 * trans-intrinsic.c (gfc_conv_intrinsic_sr_kind): Same.
1265 2008-02-28 Daniel Franke <franke.daniel@gmail.com>
1270 * lang.opt: Added -Wreturn-type.
1271 * options.c (gfc_handle_option): Recognize -Wreturn-type.
1272 * trans-decl.c (gfc_trans_deferred_vars): Emit warnings for funtions
1273 where the result value is not set.
1274 (gfc_generate_function_code): Likewise.
1275 (generate_local_decl): Emit warnings for funtions whose RESULT
1276 variable is not set.
1278 2008-02-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1281 * trans-expr.c (gfc_conv_variable): Don't build indirect
1282 references when explicit interface is mandated.
1283 * resolve.c (resolve_formal_arglist): Set attr.always_explicit
1284 on the result symbol as well as the procedure symbol.
1286 2008-02-27 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1289 * trans.h: Remove prototypes for gfor_fndecl_math_exponent4,
1290 gfor_fndecl_math_exponent8, gfor_fndecl_math_exponent10 and
1291 gfor_fndecl_math_exponent16.
1292 * f95-lang.c (build_builtin_fntypes): Add new function types.
1293 (gfc_init_builtin_functions): Add new builtins for nextafter,
1294 frexp, ldexp, fabs, scalbn and inf.
1295 * iresolve.c (gfc_resolve_rrspacing): Don't add hidden arguments.
1296 (gfc_resolve_scale): Don't convert type of second argument.
1297 (gfc_resolve_set_exponent): Likewise.
1298 (gfc_resolve_size): Don't add hidden arguments.
1299 * trans-decl.c: Remove gfor_fndecl_math_exponent4,
1300 gfor_fndecl_math_exponent8, gfor_fndecl_math_exponent10 and
1301 gfor_fndecl_math_exponent16.
1302 * trans-intrinsic.c (gfc_intrinsic_map): Remove intrinsics
1303 for scalbn, fraction, nearest, rrspacing, set_exponent and
1305 (gfc_conv_intrinsic_exponent): Directly call frexp.
1306 (gfc_conv_intrinsic_fraction, gfc_conv_intrinsic_nearest,
1307 gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_rrspacing,
1308 gfc_conv_intrinsic_scale, gfc_conv_intrinsic_set_exponent): New
1310 (gfc_conv_intrinsic_function): Use the new functions above.
1312 2008-02-26 Tobias Burnus <burnus@net-b.de>
1315 * interface.c (check_operator_interface): Show better line for error
1316 messages; fix constrains for user-defined assignment operators.
1317 (gfc_extend_assign): Fix constrains for user-defined assignment
1320 2008-02-26 Tom Tromey <tromey@redhat.com>
1322 * trans-io.c (set_error_locus): Remove old location code.
1323 * trans-decl.c (gfc_set_decl_location): Remove old location code.
1324 * f95-lang.c (gfc_init): Remove test of USE_MAPPED_LOCATION.
1325 * scanner.c (gfc_gobble_whitespace): Remove old location code.
1326 (get_file): Likewise.
1327 (preprocessor_line): Likewise.
1328 (load_file): Likewise.
1329 (gfc_new_file): Likewise.
1330 * trans.c (gfc_trans_runtime_check): Remove old location code.
1331 (gfc_get_backend_locus): Likewise.
1332 (gfc_set_backend_locus): Likewise.
1333 * data.c (gfc_assign_data_value): Remove old location code.
1334 * error.c (show_locus): Remove old location code.
1335 * gfortran.h (gfc_linebuf): Remove old location code.
1336 (gfc_linebuf_linenum): Remove old-location variant.
1338 2008-02-25 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1341 * trans-const.c (gfc_build_string_const): Don't call gettext.
1342 (gfc_build_localized_string_const): New function.
1343 * trans-const.h (gfc_build_localized_string_const): New prototype.
1344 * trans.c (gfc_trans_runtime_check): Use
1345 gfc_build_localized_string_const instead of gfc_build_string_const.
1346 (gfc_call_malloc): Likewise.
1347 (gfc_allocate_with_status): Likewise.
1348 (gfc_allocate_array_with_status): Likewise.
1349 (gfc_deallocate_with_status): Likewise.
1350 (gfc_call_realloc): Likewise.
1351 * trans-io.c (gfc_trans_io_runtime_check): Likewise.
1353 2008-02-24 Tobias Schlüter <tobi@gcc.gnu.org>
1355 * arith.c: Update copyright years.
1356 * arith.h: Likewise.
1357 * array.c: Likewise.
1359 * check.c: Likewise.
1363 * dependency.c: Likewise.
1364 * dependency.h: Likewise.
1365 * dump-parse-tree.c: Likewise.
1366 * error.c: Likewise.
1368 * gfc-internals.texi: Likewise.
1369 * gfortran.h: Likewise.
1370 * gfortran.texi: Likewise.
1371 * gfortranspec.c: Likewise.
1372 * interface.c: Likewise.
1373 * intrinsic.c: Likewise.
1374 * intrinsic.h: Likewise.
1375 * intrinsic.texi: Likewise.
1376 * invoke.texi: Likewise.
1378 * iresolve.c: Likewise.
1379 * iso-c-binding.def: Likewise.
1380 * iso-fortran-env.def: Likewise.
1381 * lang-specs.h: Likewise.
1382 * lang.opt: Likewise.
1383 * libgfortran.h: Likewise.
1384 * match.c: Likewise.
1385 * match.h: Likewise.
1386 * matchexp.c: Likewise.
1388 * module.c: Likewise.
1389 * openmp.c: Likewise.
1390 * options.c: Likewise.
1391 * parse.c: Likewise.
1392 * parse.h: Likewise.
1393 * primary.c: Likewise.
1394 * resolve.c: Likewise.
1395 * scanner.c: Likewise.
1396 * simplify.c: Likewise.
1398 * symbol.c: Likewise.
1399 * target-memory.c: Likewise.
1400 * target-memory.h: Likewise.
1401 * trans-array.h: Likewise.
1402 * trans-const.h: Likewise.
1403 * trans-stmt.h: Likewise.
1404 * trans-types.c: Likewise.
1405 * trans-types.h: Likewise.
1406 * types.def: Likewise.
1408 2008-02-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1411 * simplify.c (gfc_simplify_ibclr), (gfc_simplify_ibits),
1412 (gfc_simplify_ibset): Remove call to range_check.
1413 (simplify_cmplx), (gfc_simplify_dble), (gfc_simplify_float)
1414 (gfc_simplify_real): Add call gfc_clear_ts to initialize the
1415 temporary gfc_typspec variable.
1417 2008-02-24 Tobias Schlüter <tobi@gcc.gnu.org>
1419 * trans-array.c (gfc_conv_descriptor_data_get,
1420 gfc_conv_descriptor_data_set_internal,
1421 gfc_conv_descriptor_data_addr, gfc_conv_descriptor_offset,
1422 gfc_conv_descriptor_dtype, gfc_conv_descriptor_dimension,
1423 gfc_conv_descriptor_stride, gfc_conv_descriptor_lbound,
1424 gfc_conv_descriptor_ubound, gfc_trans_create_temp_array,
1425 gfc_conv_array_transpose, gfc_grow_array,
1426 gfc_trans_array_constructor_subarray,
1427 gfc_trans_array_constructor_value, gfc_trans_scalarized_loop_end,
1428 gfc_array_init_size, gfc_array_allocate, gfc_array_deallocate,
1429 gfc_conv_array_initializer, gfc_trans_array_bounds,
1430 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
1431 gfc_get_dataptr_offset, gfc_conv_array_parameter,
1432 gfc_trans_dealloc_allocated, get_full_array_size,
1433 gfc_duplicate_allocatable, structure_alloc_comps): Use fold_buildN
1435 * trans-expr.c (gfc_conv_expr_present, gfc_conv_missing_dummy,
1436 gfc_conv_component_ref, gfc_conv_cst_int_power,
1437 gfc_conv_function_call, gfc_trans_structur_assign): Likewise.
1438 * trans-common.c (create_common): Likewise.
1439 * trans-openmp.c (gfc_trans_omp_atomic, gfc_trans_omp_do):
1441 * trans-const.c (gfc_conv_constant_to_tree): Likewise.
1442 * trans-stmt.c (gfc_trans_goto, gfc_trans_return, gfc_trans_do,
1443 gfc_trans_integer_select, gfc_trans_character_select,
1444 gfc_trans_forall_loop, compute_overall_iter_number,
1445 gfc_trans_forall_1, gfc_evaluate_where_mask, gfc_trans_allocate,
1446 gfc_trans_deallocate): Likewise.
1447 * trans.c (gfc_build_addr_expr, gfc_trans_runtime_check,
1448 gfc_allocate_with_status, gfc_allocate_array_with_status,
1449 gfc_deallocate_with_status): Likewise.
1450 * f95-lang.c (gfc_truthvalue_conversion): Likewise.
1451 * trans-io.c (set_parameter_const, set_parameter_value,
1452 set_parameter_ref, set_string, set_internal_unit, io_result,
1453 set_error_locus, nml_get_addr_expr, transfer_expr): Likewise.
1454 * trans-decl.c (gfc_build_qualified_array, build_entry_thunks,
1455 gfc_get_fake_result_decl, gfc_trans_auto_character_variable,
1456 gfc_generate_function_code): Likewise.
1457 * convert.c (convert): Likewise.
1458 * trans-intrinsic.c (gfc_conv_intrinsic_conversion,
1459 build_fixbound_expr, build_fix_expr, gfc_conv_intrinsic_aint,
1460 gfc_conv_intrinsic_int, gfc_conv_intrinsic_imagpart,
1461 gfc_conv_intrinsic_conjg, gfc_conv_intrinsic_abs,
1462 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_mod,
1463 gfc_conv_intrinsic_dim, gfc_conv_intrinsic_dprod,
1464 gfc_conv_intrinsic_ctime, gfc_conv_intrinsic_fdate,
1465 gfc_conv_intrinsic_ttynam, gfc_conv_intrinsic_minmax,
1466 gfc_conv_intrinsic_minmax_char, gfc_conv_intrinsic_count,
1467 gfc_conv_intrinsic_arith, gfc_conv_intrinsic_dot_product,
1468 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
1469 gfc_conv_intrinsic_btest, gfc_conv_intrinsic_not,
1470 gfc_conv_intrinsic_ibits, gfc_conv_intrinsic_ishft,
1471 gfc_conv_intrinsic_ichar, gfc_conv_intrinsic_size,
1472 gfc_conv_intrinsic_array_transfer, gfc_conv_intrinsic_transfer,
1473 gfc_conv_allocated, gfc_conv_associated, gfc_conv_intrinsic_trim,
1474 gfc_conv_intrinsic_repeat): Likewise.
1476 2008-02-23 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1479 * trans-expr.c (gfc_conv_power_op): Use BUILT_IN_CPOW{F,,L}.
1480 * f95-lang.c (gfc_init_builtin_functions): Define BUILT_IN_CPOW{F,,L}.
1481 * trans.h (gfor_fndecl_math_cpow, gfor_fndecl_math_cpowf,
1482 gfor_fndecl_math_cpowl10, gfor_fndecl_math_cpowl16): Remove.
1483 * trans-decl.c: Likewise.
1485 2008-02-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1488 * expr.c (find_array_element): Modify traversing the constructor to
1489 avoid trying to access NULL memory pointed to by next for the
1490 last element. (find_array_section): Exit while loop if cons->next is
1493 2008-02-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1496 * iresolve.c (resolve_mask_arg): Add gfc_clear_ts to initialize
1498 (gfc_resolve_aint): Likewise.
1499 (gfc_resolve_anint): Likewise.
1500 (gfc_resolve_besn): Likewise.
1501 (gfc_resolve_cshift): Likewise.
1502 (gfc_resolve_ctime): Likewise.
1503 (gfc_resolve_eoshift): Likewise.
1504 (gfc_resolve_index_func): Likewise.
1505 (gfc_resolve_isatty): Likewise.
1506 (gfc_resolve_malloc): Likewise.
1507 (gfc_resolve_rrspacing): Likewise.
1508 (gfc_resolve_scale): Likewise.
1509 (gfc_resolve_set_exponent): Likewise.
1510 (gfc_resolve_spacing): Likewise.
1511 (gfc_resolve_spacing): Likewise.
1512 (gfc_resolve_fgetc): Likewise.
1513 (gfc_resolve_fputc): Likewise.
1514 (gfc_resolve_ftell): Likewise.
1515 (gfc_resolve_ttynam): Likewise.
1516 (gfc_resolve_alarm_sub): Likewise.
1517 (gfc_resolve_mvbits): Likewise.
1518 (gfc_resolve_getarg): Likewise.
1519 (gfc_resolve_signal_sub): Likewise.
1520 (gfc_resolve_exit): Likewise.
1521 (gfc_resolve_flush): Likewise.
1522 (gfc_resolve_free): Likewise.
1523 (gfc_resolve_ctime_sub): Likewise.
1524 (gfc_resolve_fgetc_sub): Likewise.
1525 (gfc_resolve_fputc_sub): Likewise.
1526 (gfc_resolve_fseek_sub): Likewise.
1527 (gfc_resolve_ftell_sub): Likewise.
1528 (gfc_resolve_ttynam_sub): Likewise.
1530 2008-02-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1532 * gfc-internals.texi: Fix typos and markup nits.
1533 * gfortran.texi: Likewise.
1534 * intrinsic.texi: Likewise.
1536 2008-02-21 Richard Guenther <rguenther@suse.de>
1538 * trans-expr.c (gfc_conv_expr_op): Expand INTRINSIC_PARENTHESES
1539 as unary PAREN_EXPR for real and complex typed expressions.
1540 (gfc_conv_unary_op): Fold the built tree.
1542 2008-02-20 Tobias Burnus <burnus@net-b.de>
1545 * match.c (gfc_match_name): Improve error message for '$'.
1547 2008-02-19 Daniel Franke <franke.daniel@gmail.com>
1550 * expr.c (gfc_check_pointer_assign): Add type and kind information
1551 to type-mismatch message.
1552 (gfc_check_assign): Unify error messages.
1554 2008-02-16 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1557 * gfortran.texi: Create new section for unimplemented extensions.
1558 Add "STRUCTURE and RECORD" and "ENCODE and DECODE statements".
1559 Remove "smaller projects" list. Fix a few typos.
1561 2008-02-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1563 * intrinsic.texi: Rename INDEX node to avoid clashing with
1564 index.html on case-insensitive systems.
1566 2008-02-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1569 * trans-expr.c (gfc_conv_function_call): Force evaluation of
1572 2008-02-10 Daniel Franke <franke.daniel@gmail.com>
1575 * lang.opt: Allow '-J<dir>' next to '-J <dir>',
1576 likewise '-I <dir>' and '-I<dir>'.
1578 2008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1581 * Make-lang.in (f951): Add $(GMPLIBS).
1583 2008-02-05 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1586 * trans-common.c (build_field): Mark fields as volatile when needed.
1588 2008-02-05 Tobias Burnus <burnus@net-b.de>
1591 * data.c (gfc_assign_data_value): Only free "size" if
1592 it has not already been freed.
1594 2008-02-05 Paul Thomas <pault@gcc.gnu.org>
1597 * array.c (match_array_element_spec): Remove check for negative
1599 (gfc_resolve_array_spec): Add check for negative size.
1601 2008-02-05 Paul Thomas <pault@gcc.gnu.org>
1604 * data.c (gfc_assign_data_value): Add bounds check for array
1607 2008-02-04 Daniel Franke <franke.daniel@gmail.com>
1609 * resolve.c (resolve_where): Fix typo.
1610 (gfc_resolve_where_code_in_forall): Likewise.
1612 2008-02-03 Paul Thomas <pault@gcc.gnu.org>
1615 * resolve.c (resolve_allocate_deallocate): New function.
1616 (resolve_code): Call it for allocate and deallocate.
1617 * match.c (gfc_match_allocate, gfc_match_deallocate) : Remove
1618 the checking of the STAT tag and put in above new function.
1619 * primary,c (match_variable): Do not fix flavor of host
1620 associated symbols yet if the type is not known.
1622 2008-01-31 Paul Thomas <pault@gcc.gnu.org>
1625 * expr.c (gfc_check_assign): It is an error to assign
1626 to a sibling procedure.
1628 2008-01-30 Paul Thomas <pault@gcc.gnu.org>
1631 * symbol.c (gfc_delete_symtree, gfc_undo_symbols): Rename
1632 delete_symtree to gfc_delete_symtree.
1633 * gfortran.h : Add prototype for gfc_delete_symtree.
1634 * module.c (load_generic_interfaces): Transfer symbol to a
1635 unique symtree and delete old symtree, instead of renaming.
1636 (read_module): The rsym and the found symbol are the same, so
1637 the found symtree can be deleted.
1640 * decl.c (match_char_spec): Remove the constraint on deferred
1641 matching of functions and free the length expression.
1642 delete_symtree to gfc_delete_symtree.
1643 (gfc_match_type_spec): Whitespace.
1644 (gfc_match_function_decl): Defer characteristic association for
1645 all types except BT_UNKNOWN.
1646 * parse.c (decode_specification_statement): Only derived type
1647 function matching is delayed to the end of specification.
1649 2008-01-28 Tobias Burnus <burnus@net-b.de>
1652 * simplify.c (gfc_simplify_shape): Simplify rank zero arrays.
1654 2008-01-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1657 * array.c (gfc_check_constructor_type): Revert clearing the expression.
1659 2008-01-26 Tobias Burnus <burnus@net-b.de>
1662 * trans-expr.c (gfc_conv_function_call): Don't call
1663 gfc_add_interface_mapping if the expression is NULL.
1665 2008-01-26 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1668 * trans-array.c (gfc_trans_create_temp_array): Remove call to
1669 gcc_assert (integer_zerop (loop->from[n])).
1671 2008-01-25 Daniel Franke <franke.daniel@gmail.com>
1674 * resolve.c (resolve_where): Added check if user-defined assignment
1675 operator is an elemental subroutine.
1676 (gfc_resolve_where_code_in_forall): Likewise.
1678 2008-01-24 Daniel Franke <franke.daniel@gmail.com>
1682 * gfortran.h: Revert changes from 2008-01-17.
1683 * match.c: Likewise.
1684 * symbol.c: Likewise.
1685 (gfc_undo_symbols): Undo namespace changes related to common blocks.
1687 2008-01-24 Daniel Franke <franke.daniel@gmail.com>
1690 * data.c (formalize_structure_cons): Skip formalization on
1693 2008-01-24 Daniel Franke <franke.daniel@gmail.com>
1695 * gfortran.texi (OpenMP): Extended existing documentation.
1696 (contributors): Added major contributors of 2008 that were
1698 (proposed extensions): Removed implemented items.
1700 2008-01-24 Paul Thomas <pault@gcc.gnu.org>
1703 * parse.c (next_statement) : If ST_GET_FCN_CHARACTERISTICS is
1704 seen, check for a statement label and, if present, delete it
1705 and set the locus to the start of the statement.
1707 2008-01-22 Paul Thomas <pault@gcc.gnu.org>
1710 * trans-io.c (gfc_trans_transfer): If the array reference in a
1711 read has a vector subscript, use gfc_conv_subref_array_arg to
1712 copy back the temporary.
1714 2008-01-22 Tobias Burnus <burnus@net-b.de>
1717 * interface.c (compare_actual_formal): Fix adding type
1718 to missing_arg_type for absent optional arguments.
1720 2008-01-22 Tobias Burnus <burnus@net-b.de>
1723 * parse.c (parse_spec): Change = into ==.
1725 2008-01-22 Daniel Franke <franke.daniel@gmail.com>
1728 * expr.c (check_elemental): Fix check for valid data types.
1730 2008-01-22 Tobias Burnus <burnus@net-b.de>
1733 * scanner.c (load_line): Support <tab><digit> continuation lines.
1734 * invoke.texi (-Wtabs): Document this.
1736 2008-01-22 Paul Thomas <pault@gcc.gnu.org>
1739 * module.c (read_module): Set use_rename attribute.
1741 2007-01-21 Tobias Burnus <burnus@net-b.de>
1744 * interface.c (compare_parameter): Improved error message
1745 for arguments of same type and mismatched kinds.
1747 2008-01-20 Paul Thomas <pault@gcc.gnu.org>
1750 * resolve.c (resolve_entries): Do not do an array bounds check
1751 if the result symbols are the same.
1754 * module.c (read_module) : Hide the symtree of the previous
1755 version of the symbol if this symbol is renamed.
1757 2008-01-20 Paul Thomas <pault@gcc.gnu.org>
1760 * array.c (gfc_check_constructor_type): Clear the expression ts
1761 so that the checking starts from the deepest level of array
1763 * primary.c (match_varspec): If an unknown type is changed to
1764 default character and the attempt to match a substring fails,
1765 change it back to unknown.
1768 * trans-array.c (gfc_add_loop_ss_code) : If ss->string_length is
1769 NULL for an array constructor, use the cl.length expression to
1771 (gfc_conv_array_parameter): Change call to gfc_evaluate_now to
1774 2008-01-19 Thomas Koenig <tkoenig@gcc.gnu.org>
1778 * iresolve.c (gfc_resolve_all): Remove conversion of mask
1779 argument to kind=1 by removing call to resolve_mask_arg().
1780 (gfc_resolve_any): Likewise.
1782 2008-01-19 Tobias Burnus <burnus@net-b.de>
1785 * primary.c (match_variable): Handle FL_UNKNOWN without
1786 uneducated guessing.
1787 (match_variable): Improve error message.
1789 2008-01-18 Tobias Burnus <burnus@net-b.de>
1792 * interface.c (get_expr_storage_size): Return storage size
1793 for array element designators.
1794 (compare_actual_formal): Reject unequal string sizes for
1795 assumed-shape dummy arguments. And fix error message for
1796 array-sections with vector subscripts.
1798 2008-01-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1801 * simplify.c (is_constant_array_expr): New static function that returns
1802 true if the given expression is an array and is constant.
1803 (gfc_simplify_reshape): Use new function.
1805 2008-01-17 H.J. Lu <hongjiu.lu@intel.com>
1808 * symbol.c (free_common_tree): Renamed to ...
1809 (gfc_free_common_tree): This. Remove static.
1810 (gfc_free_namespace): Updated.
1812 * gfortran.h (gfc_free_common_tree): New.
1814 * match.c (gfc_match_common): Call gfc_free_common_tree () with
1815 gfc_current_ns->common_root and set gfc_current_ns->common_root
1816 to NULL on syntax error.
1818 2008-01-18 Richard Sandiford <rsandifo@nildram.co.uk>
1821 * trans-expr.c (gfc_conv_function_call): Use proper
1822 type for returned character pointers.
1824 2008-01-17 Paul Thomas <pault@gcc.gnu.org>
1829 * decl.c : Remove gfc_function_kind_locus and
1830 gfc_function_type_locus. Add gfc_matching_function.
1831 (match_char_length): If matching a function and the length
1832 does not match, return MATCH_YES and try again later.
1833 (gfc_match_kind_spec): The same.
1834 (match_char_kind): The same.
1835 (gfc_match_type_spec): The same for numeric and derived types.
1836 (match_prefix): Rename as gfc_match_prefix.
1837 (gfc_match_function_decl): Except for function valued character
1838 lengths, defer applying kind, type and charlen info until the
1839 end of specification block.
1840 gfortran.h (gfc_statement): Add ST_GET_FCN_CHARACTERISTICS.
1841 parse.c (decode_specification_statement): New function.
1842 (decode_statement): Call it when a function has kind = -1. Set
1843 and reset gfc_matching function, as function statement is being
1845 (match_deferred_characteristics): Simplify with a single call
1846 to gfc_match_prefix. Do appropriate error handling. In any
1847 case, make sure that kind = -1 is reset or corrected.
1848 (parse_spec): Call above on seeing ST_GET_FCN_CHARACTERISTICS.
1849 Throw an error if kind = -1 after last specification statement.
1850 parse.h : Prototype for gfc_match_prefix.
1852 2008-01-16 Tobias Burnus <burnus@net-b.de>
1855 * interface.c (compare_parameter): Allow AS_DEFERRED array
1856 elements and reject attr.pointer array elemenents.
1857 (get_expr_storage_size): Return storage size of elements of
1858 assumed-shape and pointer arrays.
1860 2008-01-15 Sebastian Pop <sebastian.pop@amd.com>
1862 * f95-lang.c (gfc_init_builtin_functions): Initialize GOMP builtins
1863 for flag_tree_parallelize_loops.
1865 2008-01-15 Thomas Koenig <tkoenig@gcc.gnu.org>
1868 * iresolve.c (gfc_resolve_all): Call resolve_mask_arg.
1869 (gfc_resolve_any): Likewise.
1870 (gfc_resolve_count): Likewise. Don't append kind of
1871 argument to function name.
1873 2008-01-13 Tobias Burnus <burnus@net-b.de>
1876 * resolve.c (resolve_actual_arglist): For expressions,
1877 also check for assume-sized arrays.
1878 * interface.c (compare_parameter): Move F2003 character checks
1879 here, print error messages here, reject elements of
1880 assumed-shape array as argument to dummy arrays.
1881 (compare_actual_formal): Update for the changes above.
1883 2008-01-13 Tobias Burnus <burnus@net-b.de>
1886 * decl.c (contained_procedure): Only check directly preceeding state.
1888 2008-01-13 Tobias Burnus <burnus@net-b.de>
1891 * check.c (gfc_check_shape): Accept array ranges of
1892 assumed-size arrays.
1894 2008-01-12 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1897 * match.c (gfc_match_name): Don't error if leading character is a '(',
1898 just return MATCH_NO.
1900 2008-01-11 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1903 * trans-io.c (create_dummy_iostat): Commit the symbol.
1905 2008-01-11 Paul Thomas <pault@gcc.gnu.org>
1908 * simplify.c (gfc_simplify_transfer): Return NULL if the size
1909 of the element is unavailable and only assign character length
1910 to the result, if 'mold' is constant.
1912 2008-01-10 Paul Thomas <pault@gcc.gnu.org>
1915 * trans-array.c (gfc_trans_array_ctor_element): Use gfc_trans_string_copy
1916 to assign strings and perform bounds checks on the string length.
1917 (get_array_ctor_strlen): Remove bounds checking.
1918 (gfc_trans_array_constructor): Initialize string length checking.
1919 * trans-array.h : Add prototype for gfc_trans_string_copy.
1921 2008-01-08 Richard Guenther <rguenther@suse.de>
1924 PR tree-optimization/34683
1925 * trans-types.c (gfc_get_array_type_bounds): Use an array type
1926 with known size for accesses if that is known.
1928 2008-01-08 Paul Thomas <pault@gcc.gnu.org>
1931 * expr.c (find_array_element): Check that the array bounds are
1932 constant before using them. Use lower, as well as upper bound.
1933 (check_restricted): Allow implied index variable.
1935 2008-01-08 Paul Thomas <pault@gcc.gnu.org>
1938 * trans_array.c (gfc_trans_deferred_array): Do not null the
1939 data pointer on entering scope, nor deallocate it on leaving
1940 scope, if the symbol has the 'save' attribute.
1943 * trans_decl.c (gfc_finish_var_decl): Derived types with
1944 allocatable components and an initializer must be TREE_STATIC.
1946 2008-01-07 Paul Thomas <pault@gcc.gnu.org>
1949 * module.c (write_generic): Rewrite completely.
1950 (write_module): Change call to write_generic.
1952 2008-01-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1955 * scanner.c (load_line): Do not count ' ' as printable when checking for
1958 2008-01-06 Paul Thomas <pault@gcc.gnu.org>
1961 * module.c (load_needed): If the namespace has no proc_name
1962 give it the module symbol.
1964 2008-01-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1967 * trans-expr.c (gfc_conv_missing_dummy): Use a temporary to type convert
1968 the dummy variable expression, test for NULL, and pass the variable
1969 address to the called function.
1971 2007-01-06 Tobias Burnus <burnus@net-b.de>
1974 * match.c (gfc_match_common): Remove blank common in
1976 * resolve.c (resolve_common_vars): New function.
1977 (resolve_common_blocks): Move checks to resolve_common_vars
1978 and invoke that function.
1979 (resolve_types): Call resolve_common_vars for blank commons.
1981 2008-01-06 Tobias Burnus <burnus@net-b.de>
1984 * resolve.c (resolve_equivalence_derived): Reject derived types with
1985 default initialization if equivalenced with COMMON variable.
1987 2008-01-06 Tobias Burnus <burnus@net-b.de>
1990 * io.c (check_io_constraints): Disallow unformatted I/O for
1993 2008-01-06 Tobias Burnus <burnus@net-b.de>
1996 * resolve.c (resolve_formal_arglist): Reject dummy procedure in
1997 ELEMENTAL functions.
1999 2008-01-06 Tobias Burnus <burnus@net-b.de>
2002 * interface.c (compare_actual_formal): Reject parameter
2003 actual to intent(out) dummy.
2005 2008-01-04 Tobias Burnus <burnus@net-b.de>
2008 * primary.c (match_varspec): Gobble whitespace before