1 2008-04-30 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3 * intrinsic.c (add_functions): Add SELECTED_CHAR_KIND intrinsic.
4 * intrinsic.h (gfc_check_selected_char_kind,
5 gfc_simplify_selected_char_kind): New prototypes.
6 * gfortran.h (gfc_isym_id): Add GFC_ISYM_SC_KIND.
7 * trans.h (gfor_fndecl_sc_kind): New function decl.
8 * trans-decl.c (gfor_fndecl_sc_kind): Build new decl.
9 * arith.c (gfc_compare_with_Cstring): New function.
10 * arith.h (gfc_compare_with_Cstring): New prototype.
11 * check.c (gfc_check_selected_char_kind): New function.
12 * primary.c (match_string_constant, match_kind_param): Mark
13 symbols used as literal constant kind param as referenced.
14 * trans-intrinsic.c (gfc_conv_intrinsic_sc_kind): New function.
15 (gfc_conv_intrinsic_function): Call gfc_conv_intrinsic_sc_kind.
16 * intrinsic.texi (SELECTED_CHAR_KIND): Document new intrinsic.
17 * simplify.c (gfc_simplify_selected_char_kind): New function.
19 2008-04-28 Paul Thomas <pault@gcc.gnu.org>
22 * module.c (find_symbol): Do not return a result for a symbol
23 that has been renamed in another module.
25 2008-04-26 George Helffrich <george@gcc.gnu.org>
29 * trans-common.c (create_common): Add decl to function
30 chain (if inside one) to preserve identifier scope in debug output.
32 2008-04-25 Jan Hubicka <jh@suse.cz>
34 * trans-decl.c (trans_function_start): Update.
36 2008-04-25 Tobias Burnus <burnus@net-b.de>
37 Daniel Franke <franke.daniel@gmail.com>
40 * gfortranspec.c (lang_specific_driver): Deprecate
41 -M option; fix ICE when "-M" is last argument and
43 * options.c (gfc_handle_module_path_options):
44 Use -J instead of -M in error messages.
45 * invoke.texi: Mark -M as depecated.
47 2008-04-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
48 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
51 * trans-instrinsic.c (gfc_conv_intrinsic_minmaxloc): Correctly adjust
54 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
56 * trans-expr.c (gfc_conv_structure): Don't set TREE_INVARIANT.
57 * trans-array.c (gfc_build_null_descriptor): Don't set TREE_INVARIANT.
58 (gfc_trans_array_constructor_value): Don't set TREE_INVARIANT.
59 (gfc_build_constant_array_constructor): Don't set TREE_INVARIANT.
60 (gfc_conv_array_initializer): Don't set TREE_INVARIANT.
61 * trans-common.c (get_init_field): Don't set TREE_INVARIANT.
62 (create_common): Don't set TREE_INVARIANT.
63 * trans-stmt.c (gfc_trans_character_select): Don't set TREE_INVARIANT.
64 * trans-decl.c (gfc_generate_function_code): Don't set TREE_INVARIANT.
66 2008-04-21 Steve Ellcey <sje@cup.hp.com>
68 * f95-lang.c (gfc_init_decl_processing): use ptr_mode instead of Pmode.
70 2008-04-21 Daniel Franke <franke.daniel@gmail.com>
73 * gfortranspec.c (lookup_option): Properly handle separated arguments
74 in -J option, print missing argument message when necessary.
76 2008-04-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>
79 * scanner.c (skip_fixed_comments): Update continue_line when comment is
80 detected. (gfc_next_char_literal): Likewise.
82 2008-04-19 Paul Thomas <pault@gcc.gnu.org>
87 * trans_array.c (gfc_trans_array_constructor): Temporarily
88 realign loop, if loop->from is not zero, before creating
89 the temporary array and provide an offset.
92 * trans-decl.c (gfc_init_default_dt): Add gfc_ prefix to name
93 and allow for NULL body. Change all references from
94 init_default_dt to gfc_init_default_dt.
95 * trans.h : Add prototype for gfc_init_default_dt.
96 * trans-array.c (gfc_trans_deferred_vars): After nullification
97 call gfc_init_default_dt for derived types with allocatable
100 2008-04-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
103 * trans-common.c (create_common): Revert patch causing regression.
105 2008-04-16 Jerry DeLisle <jvdelisle@gcc.gnu.org>
108 * iresolve.c (gfc_resolve_eoshift): Check for NULL symtree in test for
109 optional argument attribute.
111 2008-04-16 Paul Thomas <pault@gcc.gnu.org>
114 * trans-intrinsic.c (gfc_conv_intrinsic_char): Even though KIND
115 is not used, the argument must be converted.
117 2008-04-16 Jakub Jelinek <jakub@redhat.com>
120 * f95-lang.c (gfc_init_builtin_functions): Make sure
121 BUILT_IN_SINCOS{,F,L} types aren't varargs.
123 2008-04-15 Paul Thomas <pault@gcc.gnu.org>
126 * expr.c (scalarize_intrinsic_call): Reorder identification of
127 array argument so that if one is not found a segfault does not
128 occur. Return FAILURE if all scalar arguments.
130 2008-04-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
131 Tobias Burnus <burnus@net-b.de>
134 * options.c (gfc_init_options): Set the default maximum continuation
135 lines to 255 for both free and fixed form source for warnings.
136 (gfc_handle_option): Set -std=f95 fixed form max continuations to 19 and
137 the -std=f95 free form max continuations to 39 for warnings.
138 * scanner.c (gfc_next_char_literal): Adjust the current_line number only
139 if it is less than the current locus.
141 2008-04-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
143 PR fortran/25829 28655
144 * io.c (io_tag): Add new tags for decimal, encoding, asynchronous,
145 round, sign, and id. (match_open_element): Match new tags.
146 (gfc_resolve_open): Resolve new tags. (gfc_match_open): Enable encoding
147 for DEFAULT only. Update error messages. (match_dt_element): Fix match
148 tag for asynchronous. Update error messages. (gfc_free_inquire): Free
149 new expressions. (match_inquire_element): Match new tags.
150 (gfc_match_inquire): Add constraint for ID and PENDING.
151 (gfc_resolve_inquire): Resolve new tags.
152 * trans-io.c (gfc_trans_inquire): Clean up whitespace and fix setting of
153 mask for ID parameter.
154 * ioparm.def: Fix order of parameters for pending, round, and sign.
155 NOTE: These must line up with the definitions in libgfortran/io/io.h. or
158 2008-04-06 Paul Thomas <pault@gcc.gnu.org>
161 * expr.c (scalarize_intrinsic_call): Identify which argument is
162 an array and use that as the template.
163 (check_init_expr): Remove tests that first argument is an array
164 in the call to scalarize_intrinsic_call.
166 2008-04-06 Tobias Schlüter <tobi@gcc.gnu.org>
169 * io.c (io_tag): Add field 'value'. Split 'spec' field in
171 (match_etag, match_vtag, match_ltag): Split parsing in two steps
172 to give better error messages.
174 2008-04-06 Tobias Burnus <burnus@net-b.de>
176 * io.c (check_io_constraints): Add constrains. ID= requires
177 asynchronous= and asynchronous= must be init expression.
179 2008-04-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
181 * f95-lang.c: Set LANG_HOOKS_NAME to "GNU Fortran".
183 2008-04-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
185 * dump-parse-tree.c: Use fprintf, fputs and fputc instead of
186 gfc_status and gfc_status_char. Remove gfc_ prefix of the gfc_show_*
187 functions and make them static. Add new gfc_dump_parse_tree
189 * gfortran.h (gfc_option_t): Rename verbose into dump_parse_tree.
190 (gfc_status, gfc_status_char): Delete prototypes.
191 * error.c (gfc_status, gfc_status_char): Remove functions.
192 * scanner.c (gfc_new_file): Use printf instead of gfc_status.
193 * options.c (gfc_init_options): Rename verbose into dump_parse_tree.
194 (gfc_handle_module_path_options): Use gfc_fatal_error instead of
196 (gfc_handle_option): Rename verbose into dump_parse_tree.
197 * parse.c (gfc_parse_file): Use gfc_dump_parse_tree.
199 2008-04-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
200 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
202 PR fortran/25829 28655
203 * dump-parse-tree.c (gfc_show_code_node): Show new I/O parameters.
204 * gfortran.h (gfc_statement): Add ST_WAIT enumerator.
205 (gfc_open): Add pointers for decimal, encoding, round, sign,
206 asynchronous. (gfc_inquire): Add pointers for asynchronous, decimal,
207 encoding, pending, round, sign, size, id.
208 (gfc_wait): New typedef struct. (gfc_dt): Add pointers for id, pos,
209 asynchronous, blank, decimal, delim, pad, round, sign.
210 (gfc_exec_op): Add EXEC_WAIT enumerator. (gfc_code): Add pointer for
211 wait. (gfc_free_wait), (gfc_resolve_wait): New function prototypes.
212 * trans-stmt.h (gfc_trans_wait): New function prototype.
213 * trans.c (gfc_trans_code): Add case for EXEC_WAIT.
214 * io.c (io_tag): Add new tags for DECIMAL, ENCODING, ROUND, SIGN,
215 ASYCHRONOUS, ID. (match_open_element): Add matchers for new tags.
216 (gfc_free_open): Free new pointers. (gfc_resolve_open): Resolve new
217 tags. (gfc_resolve_open): Remove comment around check for allowed
218 values and ASYNCHRONOUS, update it. Likewise for DECIMAL, ENCODING,
219 ROUND, and SIGN. (match_dt_element): Add matching for new tags.
220 (gfc_free_wait): New function. (gfc_resolve_wait): New function.
221 (match_wait_element): New function. (gfc_match_wait): New function.
222 * resolve.c (gfc_resolve_blocks): Add case for EXEC_WAIT.
223 (resolve_code): Add case for EXEC_WAIT.
224 * st.c (gfc_free_statement): Add case for EXEC_WAIT.
225 * trans-io.c (ioparam_type): Add IOPARM_ptype_wait. (gfc_st_parameter):
226 Add "wait" entry. (iocall): Add IOCALL_WAIT enumerator.
227 (gfc_build_io_library_fndecls): Add function declaration for st_wait.
228 (gfc_trans_open): Add mask bits for new I/O tags.
229 (gfc_trans_inquire): Add mask bits for new I/O tags.
230 (gfc_trans_wait): New translation function.
231 (build_dt): Add mask bits for new I/O tags.
232 * match.c (gfc_match_if) Add matcher for "wait".
233 * match.h (gfc_match_wait): Prototype for new function.
234 * ioparm.def: Add new I/O parameter definitions.
235 * parse.c (decode_statement): Add match for "wait" statement.
236 (next_statement): Add case for ST_WAIT. (gfc_ascii_statement): Same.
238 2008-04-03 Jakub Jelinek <jakub@redhat.com>
241 * openmp.c (resolve_omp_clauses): Diagnose if a clause symbol
244 2008-04-03 Tom Tromey <tromey@redhat.com>
246 * Make-lang.in (fortran_OBJS): New variable.
248 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
250 * f95-lang.c (insert_block): Kill.
252 2008-04-01 George Helffrich <george@gcc.gnu.org>
254 PR fortran/35154, fortran/23057
255 * trans-common.c (create_common): Add decl to function
256 chain to preserve identifier scope in debug output.
258 2008-04-01 Joseph Myers <joseph@codesourcery.com>
260 * gfortran.texi: Include gpl_v3.texi instead of gpl.texi
261 * Make-lang.in (GFORTRAN_TEXI): Include gpl_v3.texi instead of
264 2008-03-30 Paul Thomas <pault@gcc.gnu.org>
267 * resolve.c (resolve_function, resolve_call): If the procedure
268 is elemental do not look for noncopying intrinsics.
270 2008-03-29 Paul Thomas <pault@gcc.gnu.org>
273 * trans-array.c (gfc_array_init_size): Set 'size' zero if
274 negative in one dimension.
277 * trans-expr.c (gfc_trans_string_copy): Only assign a char
278 directly if the lhs and rhs types are the same.
280 2008-03-28 Daniel Franke <franke.daniel@gmail.com>
281 Paul Richard Thomas <paul.richard.thomas@gmail.com>
284 * primary.c (match_variable): Improved matching of function
286 * resolve.c (resolve_allocate_deallocate): Removed checks if
287 the actual argument for STAT is a variable.
289 2008-03-28 Tobias Burnus <burnus@net-b.de>
291 * symbol.c (gfc_get_default_type): Fix error message; option
292 -fallow_leading_underscore should be -fallow-leading-underscore
294 2008-03-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
297 * iresolve.c (gfc_resolve_cshift): Check for NULL symtree in test for
298 optional argument attribute.
300 2008-03-27 Tom Tromey <tromey@redhat.com>
302 * Make-lang.in: Revert automatic dependency patch.
304 2008-03-25 Tom Tromey <tromey@redhat.com>
306 * Make-lang.in: Remove .o targets.
307 (fortran_OBJS): New variable.
308 (fortran/gfortranspec.o): Move to fortran/. Reduce to variable
310 (GFORTRAN_D_OBJS): Update.
311 (GFORTRAN_TRANS_DEPS): Remove.
313 2008-03-24 Paul Thomas <pault@gcc.gnu.org>
316 * resolve.c (resolve_structure_cons): It is an error to assign
317 NULL to anything other than a pointer or allocatable component.
320 * resolve.c (resolve_symbol): If the symbol is a derived type,
321 resolve the derived type. If the symbol is a derived type
322 function, ensure that the derived type is visible in the same
323 namespace as the function.
325 2008-03-23 Tobias Schlüter <tobi@gcc.gnu.org>
327 * trans.h: Use fold_build in build1_v, build2_v and build3_v
329 * trans-openmp.c (gfc_trans_omp_critical, gfc_trans_omp_single):
330 Don't use build2_v macro.
332 2008-03-19 Daniel Franke <franke.daniel@gmail.com>
335 * interface.c (gfc_procedure_use): Check for keyworded arguments in
336 procedures without explicit interfaces.
338 2008-03-16 Paul Thomas <pault@gcc.gnu.org>
341 * resolve.c (check_assumed_size_reference): Only visit the
342 first reference and look directly at the highest dimension.
344 2008-03-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
347 * trans-array.c (gfc_conv_array_index_offset): Remove unnecessary
350 2008-03-15 Daniel Franke <franke.daniel@gmail.com>
353 * resolve.c (resolve_branch): Less strict and pessimistic warning
356 2008-03-11 Paolo Bonzini <bonzini@gnu.org>
358 * f95-lang.c (LANG_HOOKS_CLEAR_BINDING_STACK): Delete.
359 (gfc_be_parse_file): Call clear_binding_stack from here.
360 (gfc_clear_binding_stack): Rename to clear_binding_stack.
362 2008-03-09 Paul Thomas <pault@gcc.gnu.org>
365 * module.c (mio_symtree_ref): After providing a symbol for a
366 missing equivalence member, resolve and NULL the fixups.
368 2008-03-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
370 * invoke.texi (Error and Warning Options): Document
373 2008-03-08 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
376 * trans-array.c (gfc_conv_ss_startstride): Fix the logic to avoid
377 checking bounds of absent optional arguments.
379 2008-03-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
382 * intrinsic.c (add_functions): Add simplification routines for
383 ERF, DERF, ERFC and DERFC.
384 * decl.c (gfc_match_suffix, gfc_match_subroutine): Change GNU
385 extensions into Fortran 2008 features.
386 * intrinsic.h (gfc_simplify_erf, gfc_simplify_erfc): New
388 * simplify.c (gfc_simplify_erf, gfc_simplify_erfc): New functions.
390 2008-03-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
393 * intrinsic.c (add_functions): Modify intrinsics ACOSH, ASINH,
394 ATANH, ERF, ERFC and GAMMA. Add intrinsics BESSEL_{J,Y}{0,1,N},
395 ERFC_SCALED, LOG_GAMMA and HYPOT.
396 * intrinsic.h (gfc_check_hypot, gfc_simplify_hypot,
397 gfc_resolve_hypot): New prototypes.
398 * mathbuiltins.def: Add HYPOT builtin. Make complex versions of
399 ACOSH, ASINH and ATANH available.
400 * gfortran.h (GFC_ISYM_ERFC_SCALED, GFC_ISYM_HYPOT): New values.
401 * lang.opt: Add -std=f2008 option.
402 * libgfortran.h: Define GFC_STD_F2008.
403 * lang-specs.h: Add .f08 and .F08 file suffixes.
404 * iresolve.c (gfc_resolve_hypot): New function.
405 * parse.c (parse_contained): Allow empty CONTAINS for Fortran 2008.
406 * check.c (gfc_check_hypot): New function.
407 * trans-intrinsic.c (gfc_intrinsic_map): Define ERFC_SCALE builtin.
408 * options.c (set_default_std_flags): Allow Fortran 2008 by default.
409 (form_from_filename): Add .f08 suffix.
410 (gfc_handle_option): Handle -std=f2008 option.
411 * simplify.c (gfc_simplify_hypot): New function.
412 * gfortran.texi: Document Fortran 2008 status and file extensions.
413 * intrinsic.texi: Document new BESSEL_{J,Y}{0,1,N} intrinsics,
414 as well as HYPOT and ERFC_SCALED. Update documentation of ERF,
415 ERFC, GAMMA, LGAMMA, ASINH, ACOSH and ATANH.
416 * invoke.texi: Document the new -std=f2008 option.
418 2008-03-02 Jakub Jelinek <jakub@redhat.com>
420 * gfortranspec.c (lang_specific_driver): Update copyright notice
423 2008-02-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
426 * expr.c (find_array_element): Modify traversing the constructor to
427 avoid trying to access NULL memory pointed to by next for the
428 last element. (find_array_section): Exit while loop if cons->next is
430 * trans-expr.c (gfc_conv_scalar_char_value): Initialize gfc_typespec.
431 (gfc_conv_function_call): Same.
432 * decl.c (gfc_match_implicit): Same.
433 * trans-intrinsic.c (gfc_conv_intrinsic_sr_kind): Same.
435 2008-02-28 Daniel Franke <franke.daniel@gmail.com>
440 * lang.opt: Added -Wreturn-type.
441 * options.c (gfc_handle_option): Recognize -Wreturn-type.
442 * trans-decl.c (gfc_trans_deferred_vars): Emit warnings for funtions
443 where the result value is not set.
444 (gfc_generate_function_code): Likewise.
445 (generate_local_decl): Emit warnings for funtions whose RESULT
448 2008-02-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
451 * trans-expr.c (gfc_conv_variable): Don't build indirect
452 references when explicit interface is mandated.
453 * resolve.c (resolve_formal_arglist): Set attr.always_explicit
454 on the result symbol as well as the procedure symbol.
456 2008-02-27 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
459 * trans.h: Remove prototypes for gfor_fndecl_math_exponent4,
460 gfor_fndecl_math_exponent8, gfor_fndecl_math_exponent10 and
461 gfor_fndecl_math_exponent16.
462 * f95-lang.c (build_builtin_fntypes): Add new function types.
463 (gfc_init_builtin_functions): Add new builtins for nextafter,
464 frexp, ldexp, fabs, scalbn and inf.
465 * iresolve.c (gfc_resolve_rrspacing): Don't add hidden arguments.
466 (gfc_resolve_scale): Don't convert type of second argument.
467 (gfc_resolve_set_exponent): Likewise.
468 (gfc_resolve_size): Don't add hidden arguments.
469 * trans-decl.c: Remove gfor_fndecl_math_exponent4,
470 gfor_fndecl_math_exponent8, gfor_fndecl_math_exponent10 and
471 gfor_fndecl_math_exponent16.
472 * trans-intrinsic.c (gfc_intrinsic_map): Remove intrinsics
473 for scalbn, fraction, nearest, rrspacing, set_exponent and
475 (gfc_conv_intrinsic_exponent): Directly call frexp.
476 (gfc_conv_intrinsic_fraction, gfc_conv_intrinsic_nearest,
477 gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_rrspacing,
478 gfc_conv_intrinsic_scale, gfc_conv_intrinsic_set_exponent): New
480 (gfc_conv_intrinsic_function): Use the new functions above.
482 2008-02-26 Tobias Burnus <burnus@net-b.de>
485 * interface.c (check_operator_interface): Show better line for error
486 messages; fix constrains for user-defined assignment operators.
487 (gfc_extend_assign): Fix constrains for user-defined assignment
490 2008-02-26 Tom Tromey <tromey@redhat.com>
492 * trans-io.c (set_error_locus): Remove old location code.
493 * trans-decl.c (gfc_set_decl_location): Remove old location code.
494 * f95-lang.c (gfc_init): Remove test of USE_MAPPED_LOCATION.
495 * scanner.c (gfc_gobble_whitespace): Remove old location code.
496 (get_file): Likewise.
497 (preprocessor_line): Likewise.
498 (load_file): Likewise.
499 (gfc_new_file): Likewise.
500 * trans.c (gfc_trans_runtime_check): Remove old location code.
501 (gfc_get_backend_locus): Likewise.
502 (gfc_set_backend_locus): Likewise.
503 * data.c (gfc_assign_data_value): Remove old location code.
504 * error.c (show_locus): Remove old location code.
505 * gfortran.h (gfc_linebuf): Remove old location code.
506 (gfc_linebuf_linenum): Remove old-location variant.
508 2008-02-25 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
511 * trans-const.c (gfc_build_string_const): Don't call gettext.
512 (gfc_build_localized_string_const): New function.
513 * trans-const.h (gfc_build_localized_string_const): New prototype.
514 * trans.c (gfc_trans_runtime_check): Use
515 gfc_build_localized_string_const instead of gfc_build_string_const.
516 (gfc_call_malloc): Likewise.
517 (gfc_allocate_with_status): Likewise.
518 (gfc_allocate_array_with_status): Likewise.
519 (gfc_deallocate_with_status): Likewise.
520 (gfc_call_realloc): Likewise.
521 * trans-io.c (gfc_trans_io_runtime_check): Likewise.
523 2008-02-24 Tobias Schlüter <tobi@gcc.gnu.org>
525 * arith.c: Update copyright years.
533 * dependency.c: Likewise.
534 * dependency.h: Likewise.
535 * dump-parse-tree.c: Likewise.
538 * gfc-internals.texi: Likewise.
539 * gfortran.h: Likewise.
540 * gfortran.texi: Likewise.
541 * gfortranspec.c: Likewise.
542 * interface.c: Likewise.
543 * intrinsic.c: Likewise.
544 * intrinsic.h: Likewise.
545 * intrinsic.texi: Likewise.
546 * invoke.texi: Likewise.
548 * iresolve.c: Likewise.
549 * iso-c-binding.def: Likewise.
550 * iso-fortran-env.def: Likewise.
551 * lang-specs.h: Likewise.
552 * lang.opt: Likewise.
553 * libgfortran.h: Likewise.
556 * matchexp.c: Likewise.
558 * module.c: Likewise.
559 * openmp.c: Likewise.
560 * options.c: Likewise.
563 * primary.c: Likewise.
564 * resolve.c: Likewise.
565 * scanner.c: Likewise.
566 * simplify.c: Likewise.
568 * symbol.c: Likewise.
569 * target-memory.c: Likewise.
570 * target-memory.h: Likewise.
571 * trans-array.h: Likewise.
572 * trans-const.h: Likewise.
573 * trans-stmt.h: Likewise.
574 * trans-types.c: Likewise.
575 * trans-types.h: Likewise.
576 * types.def: Likewise.
578 2008-02-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
581 * simplify.c (gfc_simplify_ibclr), (gfc_simplify_ibits),
582 (gfc_simplify_ibset): Remove call to range_check.
583 (simplify_cmplx), (gfc_simplify_dble), (gfc_simplify_float)
584 (gfc_simplify_real): Add call gfc_clear_ts to initialize the
585 temporary gfc_typspec variable.
587 2008-02-24 Tobias Schlüter <tobi@gcc.gnu.org>
589 * trans-array.c (gfc_conv_descriptor_data_get,
590 gfc_conv_descriptor_data_set_internal,
591 gfc_conv_descriptor_data_addr, gfc_conv_descriptor_offset,
592 gfc_conv_descriptor_dtype, gfc_conv_descriptor_dimension,
593 gfc_conv_descriptor_stride, gfc_conv_descriptor_lbound,
594 gfc_conv_descriptor_ubound, gfc_trans_create_temp_array,
595 gfc_conv_array_transpose, gfc_grow_array,
596 gfc_trans_array_constructor_subarray,
597 gfc_trans_array_constructor_value, gfc_trans_scalarized_loop_end,
598 gfc_array_init_size, gfc_array_allocate, gfc_array_deallocate,
599 gfc_conv_array_initializer, gfc_trans_array_bounds,
600 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
601 gfc_get_dataptr_offset, gfc_conv_array_parameter,
602 gfc_trans_dealloc_allocated, get_full_array_size,
603 gfc_duplicate_allocatable, structure_alloc_comps): Use fold_buildN
605 * trans-expr.c (gfc_conv_expr_present, gfc_conv_missing_dummy,
606 gfc_conv_component_ref, gfc_conv_cst_int_power,
607 gfc_conv_function_call, gfc_trans_structur_assign): Likewise.
608 * trans-common.c (create_common): Likewise.
609 * trans-openmp.c (gfc_trans_omp_atomic, gfc_trans_omp_do):
611 * trans-const.c (gfc_conv_constant_to_tree): Likewise.
612 * trans-stmt.c (gfc_trans_goto, gfc_trans_return, gfc_trans_do,
613 gfc_trans_integer_select, gfc_trans_character_select,
614 gfc_trans_forall_loop, compute_overall_iter_number,
615 gfc_trans_forall_1, gfc_evaluate_where_mask, gfc_trans_allocate,
616 gfc_trans_deallocate): Likewise.
617 * trans.c (gfc_build_addr_expr, gfc_trans_runtime_check,
618 gfc_allocate_with_status, gfc_allocate_array_with_status,
619 gfc_deallocate_with_status): Likewise.
620 * f95-lang.c (gfc_truthvalue_conversion): Likewise.
621 * trans-io.c (set_parameter_const, set_parameter_value,
622 set_parameter_ref, set_string, set_internal_unit, io_result,
623 set_error_locus, nml_get_addr_expr, transfer_expr): Likewise.
624 * trans-decl.c (gfc_build_qualified_array, build_entry_thunks,
625 gfc_get_fake_result_decl, gfc_trans_auto_character_variable,
626 gfc_generate_function_code): Likewise.
627 * convert.c (convert): Likewise.
628 * trans-intrinsic.c (gfc_conv_intrinsic_conversion,
629 build_fixbound_expr, build_fix_expr, gfc_conv_intrinsic_aint,
630 gfc_conv_intrinsic_int, gfc_conv_intrinsic_imagpart,
631 gfc_conv_intrinsic_conjg, gfc_conv_intrinsic_abs,
632 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_mod,
633 gfc_conv_intrinsic_dim, gfc_conv_intrinsic_dprod,
634 gfc_conv_intrinsic_ctime, gfc_conv_intrinsic_fdate,
635 gfc_conv_intrinsic_ttynam, gfc_conv_intrinsic_minmax,
636 gfc_conv_intrinsic_minmax_char, gfc_conv_intrinsic_count,
637 gfc_conv_intrinsic_arith, gfc_conv_intrinsic_dot_product,
638 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
639 gfc_conv_intrinsic_btest, gfc_conv_intrinsic_not,
640 gfc_conv_intrinsic_ibits, gfc_conv_intrinsic_ishft,
641 gfc_conv_intrinsic_ichar, gfc_conv_intrinsic_size,
642 gfc_conv_intrinsic_array_transfer, gfc_conv_intrinsic_transfer,
643 gfc_conv_allocated, gfc_conv_associated, gfc_conv_intrinsic_trim,
644 gfc_conv_intrinsic_repeat): Likewise.
646 2008-02-23 Francois-Xavier Coudert <coudert@clipper.ens.fr>
649 * trans-expr.c (gfc_conv_power_op): Use BUILT_IN_CPOW{F,,L}.
650 * f95-lang.c (gfc_init_builtin_functions): Define BUILT_IN_CPOW{F,,L}.
651 * trans.h (gfor_fndecl_math_cpow, gfor_fndecl_math_cpowf,
652 gfor_fndecl_math_cpowl10, gfor_fndecl_math_cpowl16): Remove.
653 * trans-decl.c: Likewise.
655 2008-02-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
658 * expr.c (find_array_element): Modify traversing the constructor to
659 avoid trying to access NULL memory pointed to by next for the
660 last element. (find_array_section): Exit while loop if cons->next is
663 2008-02-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
666 * iresolve.c (resolve_mask_arg): Add gfc_clear_ts to initialize
668 (gfc_resolve_aint): Likewise.
669 (gfc_resolve_anint): Likewise.
670 (gfc_resolve_besn): Likewise.
671 (gfc_resolve_cshift): Likewise.
672 (gfc_resolve_ctime): Likewise.
673 (gfc_resolve_eoshift): Likewise.
674 (gfc_resolve_index_func): Likewise.
675 (gfc_resolve_isatty): Likewise.
676 (gfc_resolve_malloc): Likewise.
677 (gfc_resolve_rrspacing): Likewise.
678 (gfc_resolve_scale): Likewise.
679 (gfc_resolve_set_exponent): Likewise.
680 (gfc_resolve_spacing): Likewise.
681 (gfc_resolve_spacing): Likewise.
682 (gfc_resolve_fgetc): Likewise.
683 (gfc_resolve_fputc): Likewise.
684 (gfc_resolve_ftell): Likewise.
685 (gfc_resolve_ttynam): Likewise.
686 (gfc_resolve_alarm_sub): Likewise.
687 (gfc_resolve_mvbits): Likewise.
688 (gfc_resolve_getarg): Likewise.
689 (gfc_resolve_signal_sub): Likewise.
690 (gfc_resolve_exit): Likewise.
691 (gfc_resolve_flush): Likewise.
692 (gfc_resolve_free): Likewise.
693 (gfc_resolve_ctime_sub): Likewise.
694 (gfc_resolve_fgetc_sub): Likewise.
695 (gfc_resolve_fputc_sub): Likewise.
696 (gfc_resolve_fseek_sub): Likewise.
697 (gfc_resolve_ftell_sub): Likewise.
698 (gfc_resolve_ttynam_sub): Likewise.
700 2008-02-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
702 * gfc-internals.texi: Fix typos and markup nits.
703 * gfortran.texi: Likewise.
704 * intrinsic.texi: Likewise.
706 2008-02-21 Richard Guenther <rguenther@suse.de>
708 * trans-expr.c (gfc_conv_expr_op): Expand INTRINSIC_PARENTHESES
709 as unary PAREN_EXPR for real and complex typed expressions.
710 (gfc_conv_unary_op): Fold the built tree.
712 2008-02-20 Tobias Burnus <burnus@net-b.de>
715 * match.c (gfc_match_name): Improve error message for '$'.
717 2008-02-19 Daniel Franke <franke.daniel@gmail.com>
720 * expr.c (gfc_check_pointer_assign): Add type and kind information
721 to type-mismatch message.
722 (gfc_check_assign): Unify error messages.
724 2008-02-16 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
727 * gfortran.texi: Create new section for unimplemented extensions.
728 Add "STRUCTURE and RECORD" and "ENCODE and DECODE statements".
729 Remove "smaller projects" list. Fix a few typos.
731 2008-02-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
733 * intrinsic.texi: Rename INDEX node to avoid clashing with
734 index.html on case-insensitive systems.
736 2008-02-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
739 * trans-expr.c (gfc_conv_function_call): Force evaluation of
742 2008-02-10 Daniel Franke <franke.daniel@gmail.com>
745 * lang.opt: Allow '-J<dir>' next to '-J <dir>',
746 likewise '-I <dir>' and '-I<dir>'.
748 2008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
751 * Make-lang.in (f951): Add $(GMPLIBS).
753 2008-02-05 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
756 * trans-common.c (build_field): Mark fields as volatile when needed.
758 2008-02-05 Tobias Burnus <burnus@net-b.de>
761 * data.c (gfc_assign_data_value): Only free "size" if
762 it has not already been freed.
764 2008-02-05 Paul Thomas <pault@gcc.gnu.org>
767 * array.c (match_array_element_spec): Remove check for negative
769 (gfc_resolve_array_spec): Add check for negative size.
771 2008-02-05 Paul Thomas <pault@gcc.gnu.org>
774 * data.c (gfc_assign_data_value): Add bounds check for array
777 2008-02-04 Daniel Franke <franke.daniel@gmail.com>
779 * resolve.c (resolve_where): Fix typo.
780 (gfc_resolve_where_code_in_forall): Likewise.
782 2008-02-03 Paul Thomas <pault@gcc.gnu.org>
785 * resolve.c (resolve_allocate_deallocate): New function.
786 (resolve_code): Call it for allocate and deallocate.
787 * match.c (gfc_match_allocate, gfc_match_deallocate) : Remove
788 the checking of the STAT tag and put in above new function.
789 * primary,c (match_variable): Do not fix flavor of host
790 associated symbols yet if the type is not known.
792 2008-01-31 Paul Thomas <pault@gcc.gnu.org>
795 * expr.c (gfc_check_assign): It is an error to assign
796 to a sibling procedure.
798 2008-01-30 Paul Thomas <pault@gcc.gnu.org>
801 * symbol.c (gfc_delete_symtree, gfc_undo_symbols): Rename
802 delete_symtree to gfc_delete_symtree.
803 * gfortran.h : Add prototype for gfc_delete_symtree.
804 * module.c (load_generic_interfaces): Transfer symbol to a
805 unique symtree and delete old symtree, instead of renaming.
806 (read_module): The rsym and the found symbol are the same, so
807 the found symtree can be deleted.
810 * decl.c (match_char_spec): Remove the constraint on deferred
811 matching of functions and free the length expression.
812 delete_symtree to gfc_delete_symtree.
813 (gfc_match_type_spec): Whitespace.
814 (gfc_match_function_decl): Defer characteristic association for
815 all types except BT_UNKNOWN.
816 * parse.c (decode_specification_statement): Only derived type
817 function matching is delayed to the end of specification.
819 2008-01-28 Tobias Burnus <burnus@net-b.de>
822 * simplify.c (gfc_simplify_shape): Simplify rank zero arrays.
824 2008-01-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
827 * array.c (gfc_check_constructor_type): Revert clearing the expression.
829 2008-01-26 Tobias Burnus <burnus@net-b.de>
832 * trans-expr.c (gfc_conv_function_call): Don't call
833 gfc_add_interface_mapping if the expression is NULL.
835 2008-01-26 Jerry DeLisle <jvdelisle@gcc.gnu.org>
838 * trans-array.c (gfc_trans_create_temp_array): Remove call to
839 gcc_assert (integer_zerop (loop->from[n])).
841 2008-01-25 Daniel Franke <franke.daniel@gmail.com>
844 * resolve.c (resolve_where): Added check if user-defined assignment
845 operator is an elemental subroutine.
846 (gfc_resolve_where_code_in_forall): Likewise.
848 2008-01-24 Daniel Franke <franke.daniel@gmail.com>
852 * gfortran.h: Revert changes from 2008-01-17.
854 * symbol.c: Likewise.
855 (gfc_undo_symbols): Undo namespace changes related to common blocks.
857 2008-01-24 Daniel Franke <franke.daniel@gmail.com>
860 * data.c (formalize_structure_cons): Skip formalization on
863 2008-01-24 Daniel Franke <franke.daniel@gmail.com>
865 * gfortran.texi (OpenMP): Extended existing documentation.
866 (contributors): Added major contributors of 2008 that were
868 (proposed extensions): Removed implemented items.
870 2008-01-24 Paul Thomas <pault@gcc.gnu.org>
873 * parse.c (next_statement) : If ST_GET_FCN_CHARACTERISTICS is
874 seen, check for a statement label and, if present, delete it
875 and set the locus to the start of the statement.
877 2008-01-22 Paul Thomas <pault@gcc.gnu.org>
880 * trans-io.c (gfc_trans_transfer): If the array reference in a
881 read has a vector subscript, use gfc_conv_subref_array_arg to
882 copy back the temporary.
884 2008-01-22 Tobias Burnus <burnus@net-b.de>
887 * interface.c (compare_actual_formal): Fix adding type
888 to missing_arg_type for absent optional arguments.
890 2008-01-22 Tobias Burnus <burnus@net-b.de>
893 * parse.c (parse_spec): Change = into ==.
895 2008-01-22 Daniel Franke <franke.daniel@gmail.com>
898 * expr.c (check_elemental): Fix check for valid data types.
900 2008-01-22 Tobias Burnus <burnus@net-b.de>
903 * scanner.c (load_line): Support <tab><digit> continuation lines.
904 * invoke.texi (-Wtabs): Document this.
906 2008-01-22 Paul Thomas <pault@gcc.gnu.org>
909 * module.c (read_module): Set use_rename attribute.
911 2007-01-21 Tobias Burnus <burnus@net-b.de>
914 * interface.c (compare_parameter): Improved error message
915 for arguments of same type and mismatched kinds.
917 2008-01-20 Paul Thomas <pault@gcc.gnu.org>
920 * resolve.c (resolve_entries): Do not do an array bounds check
921 if the result symbols are the same.
924 * module.c (read_module) : Hide the symtree of the previous
925 version of the symbol if this symbol is renamed.
927 2008-01-20 Paul Thomas <pault@gcc.gnu.org>
930 * array.c (gfc_check_constructor_type): Clear the expression ts
931 so that the checking starts from the deepest level of array
933 * primary.c (match_varspec): If an unknown type is changed to
934 default character and the attempt to match a substring fails,
935 change it back to unknown.
938 * trans-array.c (gfc_add_loop_ss_code) : If ss->string_length is
939 NULL for an array constructor, use the cl.length expression to
941 (gfc_conv_array_parameter): Change call to gfc_evaluate_now to
944 2008-01-19 Thomas Koenig <tkoenig@gcc.gnu.org>
948 * iresolve.c (gfc_resolve_all): Remove conversion of mask
949 argument to kind=1 by removing call to resolve_mask_arg().
950 (gfc_resolve_any): Likewise.
952 2008-01-19 Tobias Burnus <burnus@net-b.de>
955 * primary.c (match_variable): Handle FL_UNKNOWN without
957 (match_variable): Improve error message.
959 2008-01-18 Tobias Burnus <burnus@net-b.de>
962 * interface.c (get_expr_storage_size): Return storage size
963 for array element designators.
964 (compare_actual_formal): Reject unequal string sizes for
965 assumed-shape dummy arguments. And fix error message for
966 array-sections with vector subscripts.
968 2008-01-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
971 * simplify.c (is_constant_array_expr): New static function that returns
972 true if the given expression is an array and is constant.
973 (gfc_simplify_reshape): Use new function.
975 2008-01-17 H.J. Lu <hongjiu.lu@intel.com>
978 * symbol.c (free_common_tree): Renamed to ...
979 (gfc_free_common_tree): This. Remove static.
980 (gfc_free_namespace): Updated.
982 * gfortran.h (gfc_free_common_tree): New.
984 * match.c (gfc_match_common): Call gfc_free_common_tree () with
985 gfc_current_ns->common_root and set gfc_current_ns->common_root
986 to NULL on syntax error.
988 2008-01-18 Richard Sandiford <rsandifo@nildram.co.uk>
991 * trans-expr.c (gfc_conv_function_call): Use proper
992 type for returned character pointers.
994 2008-01-17 Paul Thomas <pault@gcc.gnu.org>
999 * decl.c : Remove gfc_function_kind_locus and
1000 gfc_function_type_locus. Add gfc_matching_function.
1001 (match_char_length): If matching a function and the length
1002 does not match, return MATCH_YES and try again later.
1003 (gfc_match_kind_spec): The same.
1004 (match_char_kind): The same.
1005 (gfc_match_type_spec): The same for numeric and derived types.
1006 (match_prefix): Rename as gfc_match_prefix.
1007 (gfc_match_function_decl): Except for function valued character
1008 lengths, defer applying kind, type and charlen info until the
1009 end of specification block.
1010 gfortran.h (gfc_statement): Add ST_GET_FCN_CHARACTERISTICS.
1011 parse.c (decode_specification_statement): New function.
1012 (decode_statement): Call it when a function has kind = -1. Set
1013 and reset gfc_matching function, as function statement is being
1015 (match_deferred_characteristics): Simplify with a single call
1016 to gfc_match_prefix. Do appropriate error handling. In any
1017 case, make sure that kind = -1 is reset or corrected.
1018 (parse_spec): Call above on seeing ST_GET_FCN_CHARACTERISTICS.
1019 Throw an error if kind = -1 after last specification statement.
1020 parse.h : Prototype for gfc_match_prefix.
1022 2008-01-16 Tobias Burnus <burnus@net-b.de>
1025 * interface.c (compare_parameter): Allow AS_DEFERRED array
1026 elements and reject attr.pointer array elemenents.
1027 (get_expr_storage_size): Return storage size of elements of
1028 assumed-shape and pointer arrays.
1030 2008-01-15 Sebastian Pop <sebastian.pop@amd.com>
1032 * f95-lang.c (gfc_init_builtin_functions): Initialize GOMP builtins
1033 for flag_tree_parallelize_loops.
1035 2008-01-15 Thomas Koenig <tkoenig@gcc.gnu.org>
1038 * iresolve.c (gfc_resolve_all): Call resolve_mask_arg.
1039 (gfc_resolve_any): Likewise.
1040 (gfc_resolve_count): Likewise. Don't append kind of
1041 argument to function name.
1043 2008-01-13 Tobias Burnus <burnus@net-b.de>
1046 * resolve.c (resolve_actual_arglist): For expressions,
1047 also check for assume-sized arrays.
1048 * interface.c (compare_parameter): Move F2003 character checks
1049 here, print error messages here, reject elements of
1050 assumed-shape array as argument to dummy arrays.
1051 (compare_actual_formal): Update for the changes above.
1053 2008-01-13 Tobias Burnus <burnus@net-b.de>
1056 * decl.c (contained_procedure): Only check directly preceeding state.
1058 2008-01-13 Tobias Burnus <burnus@net-b.de>
1061 * check.c (gfc_check_shape): Accept array ranges of
1062 assumed-size arrays.
1064 2008-01-12 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1067 * match.c (gfc_match_name): Don't error if leading character is a '(',
1068 just return MATCH_NO.
1070 2008-01-11 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1073 * trans-io.c (create_dummy_iostat): Commit the symbol.
1075 2008-01-11 Paul Thomas <pault@gcc.gnu.org>
1078 * simplify.c (gfc_simplify_transfer): Return NULL if the size
1079 of the element is unavailable and only assign character length
1080 to the result, if 'mold' is constant.
1082 2008-01-10 Paul Thomas <pault@gcc.gnu.org>
1085 * trans-array.c (gfc_trans_array_ctor_element): Use gfc_trans_string_copy
1086 to assign strings and perform bounds checks on the string length.
1087 (get_array_ctor_strlen): Remove bounds checking.
1088 (gfc_trans_array_constructor): Initialize string length checking.
1089 * trans-array.h : Add prototype for gfc_trans_string_copy.
1091 2008-01-08 Richard Guenther <rguenther@suse.de>
1094 PR tree-optimization/34683
1095 * trans-types.c (gfc_get_array_type_bounds): Use an array type
1096 with known size for accesses if that is known.
1098 2008-01-08 Paul Thomas <pault@gcc.gnu.org>
1101 * expr.c (find_array_element): Check that the array bounds are
1102 constant before using them. Use lower, as well as upper bound.
1103 (check_restricted): Allow implied index variable.
1105 2008-01-08 Paul Thomas <pault@gcc.gnu.org>
1108 * trans_array.c (gfc_trans_deferred_array): Do not null the
1109 data pointer on entering scope, nor deallocate it on leaving
1110 scope, if the symbol has the 'save' attribute.
1113 * trans_decl.c (gfc_finish_var_decl): Derived types with
1114 allocatable components and an initializer must be TREE_STATIC.
1116 2008-01-07 Paul Thomas <pault@gcc.gnu.org>
1119 * module.c (write_generic): Rewrite completely.
1120 (write_module): Change call to write_generic.
1122 2008-01-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1125 * scanner.c (load_line): Do not count ' ' as printable when checking for
1128 2008-01-06 Paul Thomas <pault@gcc.gnu.org>
1131 * module.c (load_needed): If the namespace has no proc_name
1132 give it the module symbol.
1134 2008-01-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1137 * trans-expr.c (gfc_conv_missing_dummy): Use a temporary to type convert
1138 the dummy variable expression, test for NULL, and pass the variable
1139 address to the called function.
1141 2007-01-06 Tobias Burnus <burnus@net-b.de>
1144 * match.c (gfc_match_common): Remove blank common in
1146 * resolve.c (resolve_common_vars): New function.
1147 (resolve_common_blocks): Move checks to resolve_common_vars
1148 and invoke that function.
1149 (resolve_types): Call resolve_common_vars for blank commons.
1151 2008-01-06 Tobias Burnus <burnus@net-b.de>
1154 * resolve.c (resolve_equivalence_derived): Reject derived types with
1155 default initialization if equivalenced with COMMON variable.
1157 2008-01-06 Tobias Burnus <burnus@net-b.de>
1160 * io.c (check_io_constraints): Disallow unformatted I/O for
1163 2008-01-06 Tobias Burnus <burnus@net-b.de>
1166 * resolve.c (resolve_formal_arglist): Reject dummy procedure in
1167 ELEMENTAL functions.
1169 2008-01-06 Tobias Burnus <burnus@net-b.de>
1172 * interface.c (compare_actual_formal): Reject parameter
1173 actual to intent(out) dummy.
1175 2008-01-04 Tobias Burnus <burnus@net-b.de>
1178 * primary.c (match_varspec): Gobble whitespace before