1 2010-10-21 Janus Weil <janus@gcc.gnu.org>
4 * match.h (gfc_matching_ptr_assignment): New global variable to indicate
5 we're currently matching a (non-proc-)pointer assignment.
6 * decl.c (match_pointer_init): Set it.
7 * match.c (gfc_match_pointer_assignment): Ditto.
8 * primary.c (matching_actual_arglist): New global variable to indicate
9 we're currently matching an actual argument list.
10 (gfc_match_actual_arglist): Set it.
11 (gfc_match_varspec): Reject procedure pointer component calls with
12 missing argument list.
14 2010-10-21 Janus Weil <janus@gcc.gnu.org>
17 * interface.c (gfc_compare_interfaces): Switch arguments of type
18 comparison (important for polymorphic variables).
20 2010-10-21 Tobias Burnus <burnus@net-b.de>
23 * expr.c (gfc_check_vardef_context): Treat pointer functions
26 2010-10-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>
29 * trans_stmt.c (gfc_trans_stop): Fix whitespace. Build a call to new
30 F08 numeric stop function.
31 * trans.h: Add declaration for gfor_fndecl_stop_numeric_f08.
32 * trans-decl.c (gfc_build_builtin_function_decls): Build declaration
35 2010-10-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
37 * gfortran.h: Remove definition of bt enumerator.
38 * libgfortran.h: Add bt enumerator type alighned with defintion.
39 Remove the dtype enumerator, no longer used.
40 previously given in libgfortran/io.h
41 * trans-types.c: Use new bt enumerator.
42 * trans-io.c: Likewise.
44 2010-10-16 Thomas Koenig <tkoenig@gcc.gnu.org>
46 * trans-io.c (gfc_build_io_library_fndecls):
47 Array descriptor arguments to transfer_array can be
48 dereferenced recursively.
50 2010-10-16 Thomas Koenig <tkoenig@gcc.gnu.org>
55 * trans-io.c (enum iocall): Add IOCALL_X_INTEGER_WRITE,
56 IOCALL_X_LOGICAL_WRITE, IOCALL_X_CHARACTER_WRITE,
57 IOCALL_X_CHARACTER_WIDE_WRIE, IOCALL_X_REAL_WRITE,
58 IOCALL_X_COMPLEX_WRITE and IOCALL_X_ARRAY_WRITE.
59 (gfc_build_io_library_fndecls): Add corresponding function
61 (transfer_expr): If the current transfer is a READ, use
62 the iocall with the original version, otherwise the version
64 (transfer_array_desc): Likewise.
66 2010-10-15 Tobias Burnus <burnus@net-b.de>
69 * trans.h (gfc_add_modify_loc, gfc_evaluate_now_loc): New prototypes.
70 (gfc_trans_runtime_error_vararg): Remove prototype.
71 * trans.c (gfc_add_modify_loc, gfc_evaluate_now_loc): New functions.
72 (gfc_add_modify, gfc_evaluate_now): Use them.
73 (trans_runtime_error_vararg): Renamed from
74 gfc_trans_runtime_error_vararg, made static and use locus.
75 (gfc_trans_runtime_error): Use it.
76 (gfc_trans_runtime_check): Ditto and make use of locus.
77 * trans-stmt.c (gfc_trans_if_1, gfc_trans_simple_do,
78 gfc_trans_do, gfc_trans_do_while): Improve line number
79 associated with generated expressions.
81 2010-10-12 Daniel Kraft <d@domob.eu>
84 * parse.c (parse_associate): Set typespec of associate-name if that of
85 the target is already available.
87 2010-10-10 Janus Weil <janus@gcc.gnu.org>
90 * resolve.c (resolve_typebound_function): Bugfix for type-bound
93 2010-10-09 Thomas Koenig <tkoenig@gcc.gnu.org>
95 * frontend-passes.c: Include opts.h.
96 (optimize_comparison): Renamed from optimize_equality.
97 Change second argument to operation to be compared.
98 Use flag_finite_math_only to avoid comparing REAL and
99 COMPLEX only when NANs are honored. Simplify comparing
100 of string concatenations where left or right operands are
101 equal. Simplify all comparison operations, based on the result
102 of gfc_dep_compare_expr.
103 * dependency.c: Include arith.h.
104 (gfc_are_identical_variables): Volatile variables should not
105 compare equal to themselves.
106 (gfc_dep_compare_expr): Handle string constants and string
109 2010-10-08 Joseph Myers <joseph@codesourcery.com>
111 * f95-lang.c (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
112 * gfortran.h (gfc_init_options_struct): Declare.
113 * options.c (gfc_init_options_struct): New. Split out from
116 2010-10-07 Janus Weil <janus@gcc.gnu.org>
119 * resolve.c (resolve_typebound_function): Use correct declared type
120 for type-bound operators.
122 2010-10-07 Mikael Morin <mikael@gcc.gnu.org>
125 Revert revision 165026:
126 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
128 * decl.c (match_procedure_in_type): Assertify if conditions.
130 2010-10-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
133 * resolve.c (resolve_transfer): Use expression inside parenthesis to
134 find acutal component to be transgferred.
136 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
138 * trans-stmt.c (gfc_trans_allocate): free lhs expr.
140 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
142 * trans-array.c (gfc_free_ss_chain): Made non-static.
143 * trans-array.h (gfc_free_ss_chain): New prototype.
144 * trans-stmt.c (gfc_trans_where_2): Free ss chains.
146 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
148 * trans-intrinsic.c (gfc_conv_intrinsic_funcall): Also free symbol's
151 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
153 * trans-stmt.c (gfc_trans_forall_1): Free forall struct at the end.
155 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
157 * trans-expr.c (get_proc_ptr_comp): Restore initial expression type
158 before calling gfc_free_expr.
160 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
162 * trans-array.c (gfc_conv_tmp_array_ref): Add factorized call to
163 gfc_advance_se_ss_chain.
164 * trans-expr.c (gfc_conv_subref_array_ref, gfc_conv_procedure_call,
165 gfc_conv_array_constructor_expr, gfc_trans_assignment_1): Remove
166 calls to gfc_advance_se_ss_chain after gfc_conv_tmp_array_ref.
167 * trans-intrinsic.c (gfc_conv_intrinsic_function): Ditto.
168 * trans-stmt.c (gfc_trans_where_assign, gfc_trans_where_3): Ditto.
170 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
172 * trans.c (gfc_restore_backend_locus): New function.
173 (gfc_get_backend_locus): Renamed to ...
174 (gfc_save_backend_locus): ... this.
175 * trans.h (gfc_restore_backend_locus, gfc_get_backend_locus,
176 gfc_save_backend_locus): Same.
177 * trans-array.c (gfc_trans_g77_array, gfc_trans_dummy_array_bias,
178 gfc_trans_deferred_array): Rename gfc_get_backend_locus to
179 gfc_save_backend_locus.
180 (gfc_trans_dummy_array_bias): Call gfc_restore_backend_locus at the
182 (gfc_trans_g77_array, gfc_trans_deferred_array): Use
183 gfc_restore_backend_locus instead of gfc_set_backend_locus.
184 (gfc_trans_deferred_array): Call gfc_restore_backend_locus on early
186 * trans-decl.c (gfc_get_extern_function_decl, build_entry_thunks,
187 gfc_trans_deferred_vars):
188 Rename gfc_get_backend_locus to gfc_save_backend_locus.
189 Use gfc_restore_backend_locus insted of gfc_set_backend_locus.
191 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
193 * trans-array.c (gfc_build_constant_array_constructor): Free array
196 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
198 * symbol.c (gfc_copy_formal_args_ppc): Free previous formal arg list
199 before overwriting it.
201 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
203 * array.c (gfc_match_array_spec): Don't re-initialize cleared struct.
204 * symbol.c (gen_shape_param): Ditto.
206 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
208 * symbol.c (free_entry_list): New function.
209 (gfc_free_namespace): Free list of entries.
211 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
213 * symbol.c (free_components): Free list of formal args and formal
216 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
218 * simplify.c (gfc_simplify_size): Clear temporary mpz int before
221 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
223 * resolve.c (add_dt_to_dt_list): Remove unneeded if.
225 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
227 * resolve.c (check_typebound_baseobject): Free local expr before
230 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
232 * primary.c (gfc_match_structure_constructor): Invert the assert logic.
234 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
236 * primary.c (gfc_free_structure_ctor_component): Also free the
237 component structure itself.
239 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
241 * module.c (gfc_use_module): Free atom_string when done with it.
243 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
245 * module.c (read_module): Remove useless string duplication.
247 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
249 * gfortranspec.c (append_arg): Remove commented code.
251 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
253 * decl.c (match_procedure_in_type): Assertify if conditions.
255 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
257 * cpp.c (gfc_cpp_post_options): Don't create a cpp reader if
258 preprocessing is disabled.
260 2010-10-06 Jakub Jelinek <jakub@redhat.com>
263 * f95-lang.c (ATTR_NOTHROW_LEAF_LIST, ATTR_CONST_NOTHROW_LEAF_LIST,
264 ATTR_NOTHROW_LIST, ATTR_CONST_NOTHROW_LIST): Define.
265 (gfc_define_builtin): Change last argument to int bitmask from bool,
266 control addition of TREE_NOTHROW and leaf attribute as well.
267 (DO_DEFINE_MATH_BUILTIN): Adjust callers.
268 (gfc_init_builtin_functions): Likewise. Remove
269 ATTR_{,CONST_}NOTHROW_LIST enum.
271 2010-10-04 Andi Kleen <ak@linux.intel.com>
273 * Make-lang.in (gfortran, f951): Add + to build rule.
275 2010-10-04 Richard Guenther <rguenther@suse.de>
277 * f95-lang.c (current_translation_unit): New global variable.
278 (gfc_create_decls): Build a translation-unit decl.
279 (pushdecl): In the global binding-level use the
280 translation-unit decl as DECL_CONTEXT.
281 * trans-decl.c (gfc_get_symbol_decl): Use DECL_FILE_SCOPE_P.
282 (build_function_decl): Likewise. Delay setting the assembler
283 name, leave setting of DECL_CONTEXT to pushdecl.
284 (trans_function_start): Use DECL_FILE_SCOPE_P.
285 (gfc_create_module_variable): Likewise. Remove questionable
287 * trans.c (gfc_generate_module_code): Likewise.
289 2010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
291 * cpp.c (cpp_define_builtins): Call functions from cppbuiltin.c
292 instead of duplicating code.
293 * Make-lang.in: Add dependency on cppbuiltin.h. Don't define
296 2010-10-02 Janus Weil <janus@gcc.gnu.org>
299 * resolve.c (resolve_formal_arglist): Avoid setting default type for
300 formal arguments of intrinsic procedures.
302 2010-09-30 Janus Weil <janus@gcc.gnu.org>
305 * resolve.c (resolve_allocate_expr): Do not use
306 'gfc_has_default_initializer'.
308 2010-09-30 Tobias Burnus <burnus@net-b.de>
310 * gfortran.tex (Fortran 2008 status): Update list of
311 implemented features.
313 2010-09-29 Joseph Myers <joseph@codesourcery.com>
315 * lang.opt: Don't use VarExists.
317 2010-09-29 Joseph Myers <joseph@codesourcery.com>
319 * cpp.c (cpp_define_builtins): Update names of gfc_option_t
321 (gfc_cpp_post_options): Update names of cpp_options members.
322 (cb_cpp_error): Update names of diagnostic_context members.
323 * f95-lang.c (gfc_init_builtin_functions): Update names of
324 gfc_option_t members.
325 * gfortran.h (gfc_option_t): Rename warn_conversion and
327 * intrinsic.c (gfc_convert_type_warn): Update names of
328 gfc_option_t members.
329 * options.c (gfc_init_options, gfc_post_options, set_Wall,
330 gfc_handle_option): Update names of gfc_option_t members.
331 * parse.c (next_free, next_fixed): Update names of gfc_option_t
333 * scanner.c (pedantic): Remove extern declaration.
334 (skip_free_comments, skip_fixed_comments, include_line): Update
335 names of gfc_option_t members.
336 * trans-decl.c (gfc_generate_function_code): Update names of
337 gfc_option_t members.
339 2010-09-28 Tobias Burnus <burnus@net-b.de>
343 * intrinsic.c (add_functions): Make compiler_version and
344 compiler_options CLASS_INQUIRY.
345 * gfortran.h (gfc_get_option_string): New prototype.
346 * intrinsic.texi (COMPILER_VERSION, COMPILER_OPTIONS):
348 (C_SIZEOF): Mark as inquiry function of ISO_C_BINDING.
349 (ISO_FORTRAN_ENV): Refer to COMPILER_VERSION and COMPILER_OPTIONS.
350 (ISO_C_BINDING): Refer to C_SIZEOF.
351 * options.c (gfc_get_option_string): New function.
352 * simplify.c (gfc_simplify_compiler_options): Use it.
353 (gfc_simplify_compiler_version): Include compiler name.
355 2010-09-28 Jan Hubicka <jh@suse.cz>
357 * f95-lang.c (gfc_define_builtin): Make leaf.
358 (gfc_init_builtin_functions): Handle only ATTR_CONST_NOTHROW_LEAF_LIST
359 and ATTR_NOTHROW_LEAF_LIST.
360 (DEF_SYNC_BUILTIN): Check ATTR_CONST_NOTHROW_LEAF_LIST.
361 (DEF_GOMP_BUILTIN): Likewise.
363 2010-09-28 Tobias Burnus <burnus@net-b.de>
366 * trans-decl.c (gfc_get_symbol_decl): Use gsym for decl of
369 2010-09-27 Tobias Burnus <burnus@net-b.de>
373 * intrinsic.h (gfc_simplify_compiler_options,
374 gfc_simplify_compiler_version): New prototypes.
375 * intrinsic.c (gfc_intrinsic_function_by_id,
376 make_from_module): New functions.
377 (gfc_find_function, gfc_find_subroutine, gfc_generic_intrinsic,
378 gfc_specific_intrinsic): Don't return module intrinsics.
379 (add_functions): Add compiler_options, compiler_version.
380 (gfc_intrinsic_func_interface): Also lookup symbol by ISYM ID.
381 * symbol.c (std_for_isocbinding_symbol): Add version check for
383 * iso-fortran-env.def: Add compiler_options, compiler_version.
384 * iso-c-binding.def: Add c_sizeof.
385 * gfortran.h (gfc_intrinsic_sym): Add from_module:1.
386 (iso_c_binding_symbol, iso_fortran_env_symbol): Add NAMED_FUNCTIONS.
387 (gfc_intrinsic_function_by_id): New prototype.
388 * module.c (create_intrinsic_function): New function.
389 (import_iso_c_binding_module, use_iso_fortran_env_module): Use it.
390 * trans-types.c (init_c_interop_kinds): Add NAMED_FUNCTIONS.
391 * resolve.c (resolve_intrinsic): Try also to resolve intrinsics
393 * simplify.c (gfc_simplify_compiler_options,
394 gfc_simplify_compiler_version): New functions.
396 2010-09-26 Daniel Kraft <d@domob.eu>
400 * resolve.c (resolve_select_type): Clarify code.
401 (resolve_assoc_var): Only set typespec if it is currently unknown.
403 2010-09-26 Jerry DeLisle <jvdelisle@gcc.gnu.org>
406 * module.c (create_int_parameter_array): Set the array value shape.
408 2010-09-25 Tobias Burnus <burnus@net-b.de>
410 * gfortran.texi: Re-add accidently removed \input line.
412 2010-09-25 Daniel Kraft <d@domob.eu>
415 * gfortran.h (struct gfc_dt): New member `dt_io_kind'.
416 * io.c (resolve_tag): F2008 check for NEWUNIT and variable
417 definition checks for NEWUNIT, IOSTAT, SIZE and IOMSG.
418 (gfc_free_dt): Correctly handle freeing of `dt_io_kind' and
419 `extra_comma' with changed semantics.
420 (gfc_resolve_dt): Check variable definitions.
421 (match_io_element): Remove INTENT and PURE checks here and
422 initialize code->ext.dt member.
423 (match_io): Set dt->dt_io_kind.
424 (gfc_resolve_inquire): Check variable definition for all tags
425 except UNIT, FILE and ID.
426 * resolve.c (resolve_transfer): Variable definition check.
428 2010-09-25 Tobias Burnus <burnus@net-b.de>
430 * interface.c (gfc_match_end_interface): Constify char pointer
433 2010-09-24 Steven G. Kargl < kargl@gcc.gnu.org>
435 * interface.c (gfc_match_end_interface): Deal with user defined
436 operators that overload rational operators and C1202.
438 2010-09-24 Tobias Burnus <burnus@net-b.de>
440 * gfortran.texi: Add second space after end-of-sentence period;
441 change / to /@/ to allow hyphenation of URLs.
442 (Standards): Remove duplicated OpenMP, update wording given that
443 Fortran 2008 now released.
444 (Fortran 2008 status): Update and add list of implemented features.
446 2010-09-24 Tobias Burnus <burnus@net-b.de>
449 * iso-fortran-env.def: Add NAMED_KINDARRAY with
450 character_kinds, integer_kinds, logical_kinds and
452 * gfortran.h: Add them to iso_fortran_env_symbol.
453 * libgfortran.h: Rename GFC_INQUIRE_INTERNAL_UNIT to
454 LIBERROR_INQUIRE_INTERNAL_UNIT and move it from
455 libgfortran_stat_codes to libgfortran_error_codes.
456 * module.c (create_int_parameter_array): New function.
457 (use_iso_fortran_env_module): Use it for
458 NAMED_KINDARRAY of iso-fortran-env.def.
459 * trans-decl.c (gfc_get_symbol_decl): Parameter
460 arrays of intrinsics modules become local static variables.
461 * intrinsic.texi (ISO_FORTRAN_ENV): Add character_kinds,
462 integer_kinds, logical_kinds and real_kinds.
464 2010-09-23 Thomas Koenig <tkoenig@gcc.gnu.org>
467 * frontend-passes.c (optimize_binop_array_assignment):
468 Only re-use lhs as intermediate storage if kind and type
471 2010-09-23 Mikael Morin <mikael@gcc.gnu.org>
475 * trans-array.c (gfc_conv_expr_descriptor): Handle
476 ss->type == GFC_SS_INTRINSIC (for {l,u}bound intrinsics) case.
478 2010-09-23 Tobias Burnus <burnus@net-b.de>
480 * intrinsic.texi (OpenMP modules): Add named constants of
483 2010-09-23 Daniel Kraft <d@domob.eu>
488 * gfortran.h (gfc_check_vardef_context): New method.
489 (struct symbol_attribute): New flag `select_type_temporary'.
490 * primary.c (gfc_variable_attr): Clarify initialization of ref.
491 (match_variable): Remove PROTECTED check and assignment check
492 for PARAMETERs (this is now done later).
493 * match.c (gfc_match_iterator): Remove INTENT(IN) check.
494 (gfc_match_associate): Defer initialization of newAssoc->variable.
495 (gfc_match_nullify): Remove PURE definability check.
496 (select_type_set_tmp): Set new `select_type_temporary' flag.
497 * expr.c (gfc_check_assign): Remove INTENT(IN) check here.
498 (gfc_check_pointer_assign): Ditto (and other checks removed).
499 (gfc_check_vardef_context): New method.
500 * interface.c (compare_parameter_protected): Removed.
501 (compare_actual_formal): Use `gfc_check_vardef_context' for checks
502 related to INTENT([IN]OUT) arguments.
503 * intrinsic.c (check_arglist): Check INTENT for intrinsics.
504 * resolve.c (gfc_resolve_iterator): Use `gfc_check_vardef_context'.
505 (remove_last_array_ref): New method.
506 (resolve_deallocate_expr), (resolve_allocate_expr): Ditto.
507 (resolve_allocate_deallocate): Ditto (for STAT and ERRMSG).
508 (resolve_assoc_var): Remove checks for definability here.
509 (resolve_select_type): Handle resolving of code->block here.
510 (resolve_ordinary_assign): Remove PURE check.
511 (resolve_code): Do not resolve code->blocks for SELECT TYPE here.
512 Use `gfc_check_vardef_context' for assignments and pointer-assignments.
514 2010-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
516 * gfortran.texi (Argument list functions): Allow URL to wrap.
517 * intrinsic.texi (GETGID, GETPID, GETUID, IMAGE_INDEX)
518 (IS_IOSTAT_END, IS_IOSTAT_EOR, NUM_IMAGES, THIS_IMAGE)
519 (ISO_FORTRAN_ENV): Fix markup in index entries, and a couple of
520 code markups in the text.
521 * invoke.texi (Fortran Dialect Options)
522 (Error and Warning Options, Directory Options, Code Gen Options):
523 Likewise. Remove @code inside @smallexample.
525 2010-09-22 Joseph Myers <joseph@codesourcery.com>
527 * gfortranspec.c (lang_specific_driver): Handle OPT__version and
528 OPT__help instead of OPT_fversion and OPT_fhelp.
529 * lang.opt (-all-warnings, -assert, -assert=, -comments,
530 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
531 -dump, -dump=, -include-barrier, -include-directory,
532 -include-directory=, -include-directory-after,
533 -include-directory-after=, -include-prefix, -include-prefix=,
534 -no-line-commands, -no-standard-includes, -output, -output=,
535 -preprocess, -print-missing-file-dependencies, -trace-includes,
536 -undefine-macro, -undefine-macro=, -user-dependencies, -verbose,
537 -write-dependencies, -write-user-dependencies): New.
539 2010-09-21 Jason Blevins <jrblevin@sdf.org>
541 * intrinsics.texi (HYPOT, IMAGE_INDEX, BESSEL_JN, BESSEL_YN,
542 execute_command_line, IEOR, IOR, NORM2, NOT, NULL, PARITY):
545 2010-09-21 Mikael Morin <mikael@gcc.gnu.org>
548 * trans-array.c (gfc_conv_expr_descriptor): Calculate dim out of n and
552 * trans-array.c (gfc_conv_expr_descriptor): Unset full if we are
553 accessing dimensions in reversed order.
556 * trans-array.c (gfc_conv_expr_descriptor): Special case noncopying
557 intrinsic function call.
559 * trans-array.c (gfc_conv_expr_descriptor): Remove ss lookup.
560 Update asserts accordingly.
563 * trans.h (gfc_se): New field force_tmp.
564 * trans-expr.c (gfc_conv_procedure_call): Check for argument alias
565 and set parmse.force_tmp if some alias is found.
566 * trans-array.c (gfc_conv_expr_descriptor): Force a temporary creation
567 if se->force_tmp is set.
569 2010-09-20 Janus Weil <janus@gcc.gnu.org>
572 * trans-expr.c (gfc_conv_procedure_call): Fix pointer checking for
573 TBPs, PPCs and pointer/allocatable components.
575 2010-09-20 Paul Thomas <pault@gcc.gnu.org>
578 * simplify.c (is_constant_array_expr): Allow structure array
579 elements as well as constants.
580 (gfc_simplify_pack, gfc_simplify_reshape, gfc_simplify_spread,
581 gfc_simplify_transpose, gfc_simplify_unpack): Copy the derived
582 type of source to the result.
584 2010-09-19 Thomas Koenig <tkoenig@gcc.gnu.org>
586 * frontend-passes.c (gfc_expr_walker): Also
587 handle EXPR_SUBSTRING.
589 2010-09-19 Thomas Koenig <tkoenig@gcc.gnu.org>
591 * frontend-passes.c (gfc_expr_walker): Handle
592 constructors and references.
594 2010-09-16 Tobias Burnus <burnus@net-b.de>
597 * trans-types.c (create_fn_spec): New function.
598 (gfc_get_function_type): Call it.
600 2010-09-16 Jakub Jelinek <jakub@redhat.com>
602 * gfortran.h (walk_code_fn_t, walk_expr_fn_t): New types.
603 (gfc_expr_walker, gfc_code_walker): New prototypes.
604 * frontend-passes.c (gfc_expr_walker, gfc_code_walker): New functions.
605 (WALK_SUBEXPR, WALK_SUBEXPR_TAIL, WALK_SUBCODE): Define.
606 (optimize_namespace): Use gfc_code_walker.
607 (optimize_code, optimize_expr): Rewritten as gfc_code_walker hooks.
608 (optimize_expr_0, optimize_code_node,
609 optimize_actual_arglist): Removed.
610 (optimize_assignment): Don't call optimize_expr_0.
612 2010-09-16 Janus Weil <janus@gcc.gnu.org>
615 * interface.c (compare_parameter): Create vtab for actual argument,
616 instead of formal (if needed).
618 2010-09-15 Janus Weil <janus@gcc.gnu.org>
621 * resolve.c (resolve_allocate_expr): Do default initialization via
624 2010-09-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
626 * mathbuiltins.def: Do not defined huge_val built-in.
627 * trans-const.c (gfc_build_inf_or_huge): New function.
628 * trans-const.h (gfc_build_inf_or_huge): New prototype.
629 * f95-lang.c (gfc_init_builtin_functions): Don't defined
631 * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): We don't
632 have functions of type (*) (void) anymore.
633 (gfc_conv_intrinsic_minmaxloc): Call gfc_build_inf_or_huge.
634 (gfc_conv_intrinsic_nearest): Call gfc_build_inf_or_huge instead
635 of generating a call to huge_val().
637 2010-09-11 Mikael Morin <mikael@gcc.gnu.org>
639 * gfortran.h (gfc_expr): Remove inline_noncopying_intrinsic attribute.
640 * dependency.c (gfc_check_dependency): Don't depend on
641 expr's inline_noncopying_intrinsic_attribute.
642 * dependency.c (gfc_check_argument_var_dependency,
643 gfc_check_argument_dependency): Ditto. Recursively check dependency
644 as NOT_ELEMENTAL in the non-copying (=transpose) case.
645 * trans-intrinsic.c (gfc_conv_intrinsic_function): Ditto.
646 * resolve.c (find_noncopying_intrinsics): Remove.
647 (resolve_function, resolve_call): Remove call to
648 find_noncopying_intrinsics.
650 * trans-array.c (gfc_conv_array_transpose): Remove.
651 (gfc_walk_subexpr): Make non-static. Move prototype...
652 * trans-array.h (gfc_walk_subexpr): ... here.
653 * trans-intrinsic.c (gfc_conv_intrinsic_function): Update transpose
655 (walk_inline_intrinsic_transpose, walk_inline_intrinsic_function,
656 gfc_inline_intrinsic_function_p): New.
657 (gfc_is_intrinsic_libcall): Return early in inline intrinsic case.
658 Remove transpose from the libcall list.
659 (gfc_walk_intrinsic_function): Special case inline intrinsic.
660 * trans.h (gfc_inline_intrinsic_function_p): New prototype.
662 2010-09-10 Mikael Morin <mikael@gcc.gnu.org>
664 * trans-expr.c (expr_is_variable): New function taking non-copying
665 intrinsic functions into account.
666 (gfc_trans_assignment_1): Use expr_is_variable.
668 2010-09-10 Mikael Morin <mikael@gcc.gnu.org>
670 * trans-array.c (gfc_conv_loop_setup): Access the shape along the
671 real array dimension instead of the scalarizer (loop) dimension.
673 2010-09-10 Mikael Morin <mikael@gcc.gnu.org>
675 * trans-array.c (gfc_conv_resolve_dependencies): Handle same-array
676 transposed references.
678 2010-09-10 Tobias Burnus <burnus@net-b.de>
681 * trans.h (build1_stat_loc, build2_stat_loc, build3_stat_loc,
682 build4_stat_loc): New inline functions.
683 (build1_loc, build2_loc, build3_loc, build4_loc): New macros.
684 (build1_v, build2_v, build3_v, build4_v): Use input_location
686 * trans-array.c (gfc_trans_scalarized_loop_end,
687 gfc_conv_array_parameter): Replace build[1-4] by build[1-4]_loc.
688 * trans.c (gfc_build_addr_expr, gfc_build_array_ref,
689 gfc_finish_wrapped_block): Ditto.
690 * trans-decl.c (gfc_init_default_dt, init_intent_out_dt): Ditto.
691 * trans-expr.c (gfc_conv_missing_dummy,
692 gfc_trans_alloc_subarray_assign, gfc_trans_zero_assign): Ditto.
693 * trans-openmp.c (gfc_omp_clause_default_ctor,
694 gfc_trans_omp_critical, gfc_trans_omp_parallel,
695 gfc_trans_omp_parallel_do, gfc_trans_omp_parallel_sections,
696 gfc_trans_omp_parallel_workshare, gfc_trans_omp_sections
697 gfc_trans_omp_single, gfc_trans_omp_task,
698 gfc_trans_omp_workshare): Ditto.
700 2010-09-09 Steven G. Kargl <kargl@gcc.gnu.org>
702 * fortran/expr.c (check_inquiry): OPTIONAL attribute is not allowed
703 for dummy argument that appears in a specification statement.
705 2010-09-09 Mikael Morin <mikael@gcc.gnu.org>
707 * trans-array.c (gfc_get_array_ref_dim): New function.
708 (gfc_trans_create_temp_array): Reconstruct array
709 bounds from loop bounds. Use array bounds instead of loop bounds.
711 2010-09-09 Mikael Morin <mikael@gcc.gnu.org>
713 * trans-array.c (gfc_set_loop_bounds_from_array_spec):
714 Get the array dimension from the dim array.
716 2010-09-09 Mikael Morin <mikael@gcc.gnu.org>
718 * trans-array.c (gfc_trans_preloop_setup): Unconditionally use the
719 dim array to get the stride in the innermost loop.
721 2010-09-09 Mikael Morin <mikael@gcc.gnu.org>
723 * trans-array.c (gfc_trans_create_temp_array): Don't set dim array.
724 (gfc_conv_loop_setup, gfc_walk_function_expr): Set dim array.
725 * trans-intrinsic.c (gfc_walk_intrinsic_libfunc): Ditto.
727 2010-09-09 Mikael Morin <mikael@gcc.gnu.org>
729 * trans-array.c (gfc_trans_create_temp_array): Assert loop dimension
730 and info dimension are the same. Loop over loop dimension.
731 * trans-stmt.c (gfc_conv_elemental_dependencies): Set loop dimension
733 2010-09-09 Mikael Morin <mikael@gcc.gnu.org>
735 * trans-array.c (gfc_conv_array_transpose): Change generated descriptor
738 2010-09-09 Tobias Burnus <burnus@net-b.de>
741 * intrincic.texi (FGET, FGETC, FPUT, FPUTC, FSTAT, GETCWD, KILL,
742 STAT): Show also syntax for the function version.
743 * intrinsic.c (add_sym_1s_intent, add_sym_2s_intent,
744 add_sym_3s_intent): Remove function.
745 (add_sym_1s, add_sym_2s, add_sym_3s): Take always the intent
747 (add_sym_2_intent): New function.
748 (add_functions): Set intent for functions which modify
749 the argument: fstat, fgetc, fget, hostnm, lstat, stat. Change
750 argument name of hostnm from "a" to "c"
751 (add_subroutines): Change add_sym_*s_intent to
752 add_sym_*s and add intent to the add_sym_*s calls.
754 2010-09-08 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
757 * intrinsic.c (add_functions): Add B{G,L}{E,T}, DSHIFT{L,R},
758 MASK{L,R}, MERGE_BITS and SHIFT{A,L,R}.
759 * gfortran.h: Define ISYM values for above intrinsics.
760 * intrinsic.h (gfc_check_bge_bgt_ble_blt, gfc_check_dshift,
761 gfc_check_mask, gfc_check_merge_bits, gfc_check_shift,
762 gfc_simplify_bge, gfc_simplify_bgt, gfc_simplify_ble,
763 gfc_simplify_blt, gfc_simplify_dshiftl, gfc_simplify_dshiftr,
764 gfc_simplify_lshift, gfc_simplify_maskl, gfc_simplify_maskr,
765 gfc_simplify_merge_bits, gfc_simplify_rshift,
766 gfc_simplify_shifta, gfc_simplify_shiftl, gfc_simplify_shiftr,
767 gfc_resolve_dshift, gfc_resolve_mask, gfc_resolve_merge_bits,
768 gfc_resolve_shift): New prototypes.
769 * iresolve.c (gfc_resolve_dshift, gfc_resolve_mask,
770 gfc_resolve_merge_bits, gfc_resolve_shift): New functions.
771 * check.c (gfc_check_bge_bgt_ble_blt, gfc_check_dshift,
772 gfc_check_mask, gfc_check_merge_bits, gfc_check_shift): New
774 * trans-intrinsic.c (gfc_conv_intrinsic_dshift,
775 gfc_conv_intrinsic_bitcomp, gfc_conv_intrinsic_shift,
776 gfc_conv_intrinsic_merge_bits, gfc_conv_intrinsic_mask): New
778 (gfc_conv_intrinsic_function): Call above static functions.
779 * intrinsic.texi: Document new intrinsics.
780 * simplify.c (gfc_simplify_bge, gfc_simplify_bgt, gfc_simplify_ble,
781 gfc_simplify_blt, gfc_simplify_dshiftl, gfc_simplify_dshiftr,
782 gfc_simplify_lshift, gfc_simplify_maskl, gfc_simplify_maskr,
783 gfc_simplify_merge_bits, gfc_simplify_rshift,
784 gfc_simplify_shifta, gfc_simplify_shiftl, gfc_simplify_shiftr):
787 2010-09-08 Jakub Jelinek <jakub@redhat.com>
789 * frontend-passes.c (optimize_code_node): Walk block chain by default.
792 * trans-openmp.c (gfc_trans_omp_do): Store exit/cycle labels on code
793 instead of code->block.
796 * openmp.c (resolve_omp_do): Report not enough do loops for
797 collapse even if block->next is NULL.
799 2010-09-07 Thomas Koenig <tkoenig@gcc.gnu.org>
802 * dependency.c (gfc_deb_compare_expr): Take missing optional
803 arguments into account.
805 2010-09-08 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
807 * trans.h (gfor_fndecl_clz128, gfor_fndecl_ctz128): Remove.
808 * trans-decl.c (gfor_fndecl_clz128, gfor_fndecl_ctz128): Remove.
809 (gfc_build_intrinsic_function_decls): Don't build the
810 gfor_fndecl_clz128 and gfor_fndecl_ctz128.
811 * trans-intrinsic.c (gfc_conv_intrinsic_leadz,
812 gfc_conv_intrinsic_trailz): Generate inline arithmetic instead
813 of calling clz128/ctz128 library functions.
815 2010-09-07 Jan Hubicka <jh@suse.cz>
817 * trans-expr.c (gfc_conv_initializer): Set STATIC flags for
820 2010-09-07 Tobias Burnus <burnus@net-b.de>
823 * intrinsic.texi (COS): Remove superfluous "n".
825 2010-09-07 Tobias Burnus <burnus@net-b.de>
828 * trans-array.c (gfc_conv_descriptor_data_get,
829 gfc_conv_descriptor_data_set, gfc_conv_descriptor_data_addr,
830 gfc_conv_descriptor_offset, gfc_conv_descriptor_dtype,
831 gfc_conv_descriptor_dimension, gfc_conv_descriptor_stride,
832 gfc_conv_descriptor_lbound, gfc_conv_descriptor_ubound,
833 gfc_conv_shift_descriptor_lbound,
834 gfc_set_loop_bounds_from_array_spec,
835 gfc_trans_allocate_array_storage, gfc_trans_create_temp_array,
836 gfc_conv_array_transpose, gfc_get_iteration_count,
837 gfc_grow_array, gfc_trans_array_ctor_element,
838 gfc_trans_array_constructor_subarray,
839 gfc_trans_array_constructor_value,
840 constant_array_constructor_loop_size, gfc_trans_array_constructor,
841 gfc_set_vector_loop_bounds, gfc_trans_array_bound_check,
842 gfc_conv_array_index_offset, gfc_conv_scalarized_array_ref,
843 gfc_conv_array_ref, gfc_trans_preloop_setup,
844 gfc_trans_scalarized_loop_end, gfc_conv_ss_startstride,
845 gfc_conv_loop_setup, gfc_conv_array_extent_dim,
846 gfc_conv_descriptor_size, gfc_array_init_size,
847 gfc_array_allocate, gfc_array_deallocate,
848 gfc_trans_array_bounds, gfc_trans_auto_array_allocation,
849 gfc_trans_dummy_array_bias, gfc_get_dataptr_offset,
850 get_array_charlen, gfc_conv_expr_descriptor,
851 array_parameter_size, gfc_conv_array_parameter,
852 gfc_trans_dealloc_allocated, get_full_array_size,
853 duplicate_allocatable,
854 structure_alloc_comps): Change fold_build[0-9] to
856 (duplicate_allocatable, structure_alloc_comps,
857 gfc_duplicate_allocatable): Add space after function name.
859 2010-09-07 Mikael Morin <mikael@gcc.gnu.org>
861 * trans-stmt.c (gfc_trans_character_select): Be conversion-safe while
862 checking string length value.
863 * trans-intrinsic.c (gfc_conv_intrinsic_char): Build integer using
864 gfc_charlen_type_node type.
867 * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Convert string
868 length to gfc_charlen_type_node.
870 2010-09-06 Thomas Koenig <tkoenig@gcc.gnu.org>
873 * frontend-passes.c (optimize_binop_array_assignment): New
875 (optimize_assignment): Call it.
877 2010-09-06 Thomas Koenig <tkoenig@gcc.gnu.org>
880 * trans-expr.c (gfc_conv_substring): If start and end
881 of the string reference are equal, set the length to one.
883 2010-09-06 Tobias Burnus <burnus@net-b.de>
886 * dump-parse-tree.c (gfc_debug_expr): Use stderr instead of stdout.
888 2010-09-06 Tobias Burnus <burnus@net-b.de>
891 * dump-parse-tree.c (gfc_debug_expr): New function.
893 2010-09-06 Tobias Burnus <burnus@net-b.de>
896 * intrinsic.c (add_functions): Support IALL, IANY, IPARITY.
897 (check_specific): Special case for those intrinsics.
898 * gfortran.h (gfc_isym_id): Add new intrinsics
899 * intrinsic.h (gfc_check_transf_bit_intrins,
900 gfc_simplify_iall, gfc_simplify_iany, gfc_simplify_iparity,
901 gfc_resolve_iall, gfc_resolve_iany, gfc_resolve_iparity):
903 * iresolve.c (gfc_resolve_iall, gfc_resolve_iany,
904 gfc_resolve_iparity, resolve_transformational): New functions.
905 (gfc_resolve_product, gfc_resolve_sum,
906 gfc_resolve_parity): Use resolve_transformational.
907 * check.c (gfc_check_transf_bit_intrins): New function.
908 * simplify.c (gfc_simplify_iall, gfc_simplify_iany,
909 gfc_simplify_iparity, do_bit_any, do_bit_ior,
910 do_bit_xor, simplify_transformation): New functions.
911 (gfc_simplify_all, gfc_simplify_any, gfc_simplify_parity,
912 gfc_simplify_sum, gfc_simplify_product): Use simplify_transformation.
913 * trans-intrinsic.c (gfc_conv_intrinsic_arith,
914 gfc_conv_intrinsic_function, gfc_is_intrinsic_libcall):
915 Handle IALL, IANY and IPARITY intrinsics.
916 * intrinsic.texi (IMAGE_INDEX): Move up to fix alphabetic
918 (IALL, IANY, IPARITY): Document new intrinsics.
920 2010-09-05 Tobias Burnus <burnus@net-b.de>
923 * f95-lang.c (gfc_truthvalue_conversion): Use
924 fold_build[0-9]_loc instead of fold_build[0-9].
925 * convert.c (convert): Ditto.
926 * trans-intrinsic.c (gfc_conv_intrinsic_conversion,
927 build_fixbound_expr, build_fix_expr, gfc_conv_intrinsic_aint,
928 gfc_conv_intrinsic_int, gfc_conv_intrinsic_imagpart,
929 gfc_conv_intrinsic_conjg, gfc_trans_same_strlen_check,
930 gfc_conv_intrinsic_bound, gfc_conv_intrinsic_abs,
931 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_mod,
932 gfc_conv_intrinsic_dim, gfc_conv_intrinsic_sign,
933 gfc_conv_intrinsic_dprod, gfc_conv_intrinsic_char,
934 gfc_conv_intrinsic_ctime, gfc_conv_intrinsic_fdate,
935 gfc_conv_intrinsic_ttynam, gfc_conv_intrinsic_minmax,
936 gfc_conv_intrinsic_minmax_char, gfc_conv_intrinsic_anyall,
937 gfc_conv_intrinsic_count, gfc_conv_intrinsic_arith,
938 gfc_conv_intrinsic_dot_product, gfc_conv_intrinsic_minmaxloc,
939 gfc_conv_intrinsic_minmaxval, gfc_conv_intrinsic_btest,
940 gfc_conv_intrinsic_bitop, gfc_conv_intrinsic_not,
941 gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ibits,
942 gfc_conv_intrinsic_rlshift, gfc_conv_intrinsic_ishft,
943 gfc_conv_intrinsic_ishftc, gfc_conv_intrinsic_leadz,
944 gfc_conv_intrinsic_trailz, gfc_conv_intrinsic_popcnt_poppar,
945 gfc_conv_intrinsic_ichar, gfc_conv_has_intvalue,
946 gfc_conv_intrinsic_merge, gfc_conv_intrinsic_spacing,
947 gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_size,
948 size_of_string_in_bytes, gfc_conv_intrinsic_sizeof,
949 gfc_conv_intrinsic_storage_size, gfc_conv_intrinsic_strcmp,
950 gfc_conv_intrinsic_transfer, gfc_conv_allocated,
951 gfc_conv_associated, gfc_conv_same_type_as,
952 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat): Ditto.
954 2010-09-04 Tobias Burnus <burnus@net-b.de>
957 * resolve.c (resolve_fl_namelist): Change constraint checking
958 order to prevent endless loop.
960 2010-09-04 Janus Weil <janus@gcc.gnu.org>
963 * resolve.c (resolve_allocate_expr): Generate default initializers
964 already at this point, resolve them and put them into expr3, ...
965 * trans-stmt.c (gfc_trans_allocate): ... instead of waiting until
968 2010-09-03 Tobias Burnus <burnus@net-b.de>
971 * trans-intrinsic.c (gfc_conv_intrinsic_sign,
972 gfc_conv_intrinsic_leadz): Use build_call_expr_loc instead
974 * trans-expr.c (gfc_conv_expr_present, gfc_conv_missing_dummy,
975 gfc_conv_string_length, gfc_conv_substring,
976 gfc_conv_component_ref, gfc_conv_unary_op, gfc_conv_powi,
977 gfc_conv_cst_int_power, gfc_conv_string_tmp, gfc_conv_concat_op,
978 gfc_conv_expr_op, gfc_build_compare_string,
979 gfc_set_interface_mapping_bounds, gfc_conv_subref_array_arg,
980 gfc_conv_derived_to_class, conv_isocbinding_procedure,
981 gfc_conv_procedure_call, fill_with_spaces,
982 gfc_trans_string_copy, gfc_trans_alloc_subarray_assign,
983 gfc_trans_structure_assign, gfc_trans_pointer_assignment,
984 gfc_trans_scalar_assign, gfc_trans_zero_assign,
985 gfc_trans_array_copy, gfc_trans_array_constructor_copy): Change
986 fold_build[0-9] to fold_build[0-9]_loc.
987 * trans-io.c (set_parameter_const, set_parameter_value,
988 set_parameter_ref, gfc_convert_array_to_string, set_string,
989 set_internal_unit, io_result, set_error_locus,
990 nml_get_addr_expr, build_dt): Ditto.
991 * trans-openmp.c (gfc_omp_clause_default_ctor,
992 gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op,
993 gfc_trans_omp_array_reduction, gfc_trans_omp_atomic,
994 gfc_trans_omp_do): Ditto.
995 * trans.c (gfc_add_modify, gfc_build_addr_expr,
996 gfc_build_array_ref, gfc_trans_runtime_error_vararg,
997 gfc_trans_runtime_check, gfc_call_malloc,
998 gfc_allocate_with_status, gfc_allocate_array_with_status,
999 gfc_call_free, gfc_deallocate_with_status,
1000 gfc_call_realloc): Ditto.
1002 2010-09-03 Thomas Koenig <tkoenig@gcc.gnu.org>
1005 * dependency.c (gfc_deb_compare_expr): Compare equal for equal
1006 arglists for pure user functions, or for those intrinsic
1007 functions which are also pure.
1008 * intrinsics.c (add_conv): Mark conversion functions as pure.
1009 (add_char_conversions): Likewise.
1011 2010-09-03 Daniel Kraft <d@domob.eu>
1014 * resolve.c (resolve_actual_arglist): Allow internal procedure
1015 as actual argument with Fortran 2008.
1017 2010-09-03 Daniel Kraft <d@domob.eu>
1020 * gfortran.h (struct gfc_code): Renamed `whichloop' to
1021 `which_construct' as this is no longer restricted to loops.
1022 * parse.h (struct gfc_state_data): New field `construct'.
1023 * match.c (match_exit_cycle): Handle EXIT from non-loops.
1024 * parse.c (push_state): Set `construct' field.
1025 * resolve.c (resolve_select_type): Extend comment.
1026 * trans-stmt.c (gfc_trans_if): Add exit label.
1027 (gfc_trans_block_construct), (gfc_trans_select): Ditto.
1028 (gfc_trans_simple_do): Store exit/cycle labels on the gfc_code itself.
1029 (gfc_trans_do), (gfc_trans_do_while): Ditto.
1030 (gfc_trans_exit): Use new name `which_construct' instead of `whichloop'.
1031 (gfc_trans_cycle): Ditto.
1032 (gfc_trans_if_1): Use fold_build3_loc instead of fold_build3.
1034 2010-09-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1036 * trans-intrinsic.c (gfc_conv_intrinsic_aint): Fix whitespace.
1037 (gfc_conv_intrinsic_ishft): Only evaluate arguments once.
1038 (gfc_conv_intrinsic_ishftc): Only evaluate arguments once.
1039 * intrinsic.texi (RSHIFT): Fix documentation.
1041 2010-09-02 Tobias Burnus <burnus@net-b.de>
1044 * trans-common.c (create_common): Change build[0-9] to
1046 * trans-const.c (gfc_conv_constant_to_tree,
1047 gfc_conv_constant_to_tree): Ditto.
1048 * trans-decl.c (gfc_build_qualified_array, build_entry_thunks,
1049 gfc_get_fake_result_decl, gfc_trans_auto_character_variable,
1050 add_argument_checking, create_main_function,
1051 gfc_generate_return): Ditto.
1052 * trans-types.c (gfc_get_dtype, gfc_get_array_type_bounds): Ditto.
1053 * trans-stmt.c (allocate_temp_for_forall_nest_1,
1054 compute_inner_temp_size, compute_overall_iter_number,
1055 generate_loop_for_rhs_to_temp, generate_loop_for_temp_to_lhs,
1056 gfc_conv_elemental_dependencies, gfc_do_allocate,
1057 gfc_evaluate_where_mask, gfc_trans_allocate,
1058 gfc_trans_arithmetic_if, gfc_trans_call,
1059 gfc_trans_character_select, gfc_trans_deallocate,
1060 gfc_trans_do, gfc_trans_do_while, gfc_trans_forall_1,
1061 gfc_trans_forall_loop, gfc_trans_goto, gfc_trans_if_1,
1062 gfc_trans_integer_select, gfc_trans_logical_select,
1063 gfc_trans_pointer_assign_need_temp, gfc_trans_return,
1064 gfc_trans_simple_do, gfc_trans_sync, gfc_trans_where_2,
1065 gfc_trans_where_assign) Ditto.
1067 2010-09-02 Janus Weil <janus@gcc.gnu.org>
1070 * resolve.c (resolve_symbol): Correct check for attributes of CLASS
1073 2010-09-02 Tobias Burnus <burnus@net-b.de>
1076 * resolve.c (apply_default_init): Mark symbol as referenced,
1077 if it is initialized.
1078 (resolve_symbol): Change intialized check for BT_DERIVED such
1079 that also function results get initialized; remove now obsolete
1080 gfc_set_sym_referenced for BT_CLASS.
1082 2010-09-01 Janus Weil <janus@gcc.gnu.org>
1085 * class.c (gfc_find_derived_vtab): Add component '$def_init'.
1086 * resolve.c (resolve_allocate_expr): Defer handling of default
1087 initialization to 'gfc_trans_allocate'.
1088 (apply_default_init,resolve_symbol): Handle polymorphic dummies.
1089 (resolve_fl_derived): Suppress error messages for vtypes.
1090 * trans-stmt.c (gfc_trans_allocate): Handle initialization via
1091 polymorphic MOLD expression.
1092 * trans-expr.c (gfc_trans_class_init_assign): Now only used for
1093 dummy initialization.
1095 2010-09-01 Tobias Burnus <burnus@net-b.de>
1097 * gfortran.texi (preprocessing): Update URL to COCO.
1099 2010-09-01 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1101 * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Resize
1102 array quad_decls. Remove unnecessary assignment.
1104 2010-09-01 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1106 * trans-expr.c (gfc_conv_power_op): Handle floating-point types
1107 other than long double.
1108 * mathbuiltins.def: Add builtins from the POW and CPOW family.
1109 * trans.h (gfc_builtin_decl_for_float_kind): New prototype.
1110 * trans-intrinsic.c (gfc_builtin_decl_for_float_kind): Add gfc_
1111 prefix to function name.
1112 (gfc_build_intrinsic_lib_fndecls): Add cpow prototype.
1113 (gfc_conv_intrinsic_aint): Use gfc_builtin_decl_for_float_kind
1115 (gfc_conv_intrinsic_exponent): Likewise.
1116 (gfc_conv_intrinsic_abs): Likewise.
1117 (gfc_conv_intrinsic_mod): Likewise.
1118 (gfc_conv_intrinsic_sign): Likewise.
1119 (gfc_conv_intrinsic_arith): Likewise.
1120 (gfc_conv_intrinsic_fraction): Likewise.
1121 (gfc_conv_intrinsic_nearest): Likewise.
1122 (gfc_conv_intrinsic_spacing): Likewise.
1123 (gfc_conv_intrinsic_rrspacing): Likewise.
1124 (gfc_conv_intrinsic_scale): Likewise.
1125 (gfc_conv_intrinsic_set_exponent): Likewise.
1127 2010-09-01 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1129 * intrinsic.c: Add EXECUTE_COMMAND_LINE intrinsic.
1130 * intrinsic.h (gfc_resolve_execute_command_line): New function.
1131 * iresolve.c (gfc_resolve_execute_command_line): New function.
1132 * gfortran.h (GFC_ISYM_EXECUTE_COMMAND_LINE): New value.
1133 * intrinsic.texi: Document EXECUTE_COMMAND_LINE.
1135 2010-08-31 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1138 * f95-lang.c (gfc_init_builtin_functions): Define popcount{,l,ll}
1139 and parity{,l,ll} builtins.
1140 * trans-intrinsic.c (gfc_conv_intrinsic_popcnt_poppar): New function.
1141 (gfc_conv_intrinsic_function): Call above new functions.
1142 * simplify.c (gfc_simplify_popcnt, gfc_simplify_poppar): New
1144 * intrinsic.texi: Document POPCNT and POPPAR.
1146 2010-08-30 Janus Weil <janus@gcc.gnu.org>
1149 * resolve.c (resolve_structure_cons): Handle pointer-valued PPCs.
1151 2010-08-30 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1153 * Make-lang.in: Add frontend-passes.o dependencies.
1155 2010-08-29 Janus Weil <janus@gcc.gnu.org>
1158 * resolve.c (resolve_structure_cons): For derived types, make sure the
1159 type has been resolved.
1160 (resolve_typebound_procedures): Make sure the vtab has been generated.
1162 2010-08-29 Janus Weil <janus@gcc.gnu.org>
1165 * match.c (gfc_match_select_type): Give the associate-name the
1166 FL_VARIABLE attribute.
1168 2010-08-28 Steven G. Kargl <kargl@gcc.gnu.org>
1170 * simplify.c (gfc_simplify_bessel_n2): Fix indention
1173 2010-08-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1176 * trans-types.c (gfc_init_kinds): Disable TFmode.
1178 2010-08-27 Janus Weil <janus@gcc.gnu.org>
1181 * match.c (gfc_match_allocate): Avoid double free on error.
1183 2010-08-27 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1186 * gfortran.h (gfc_real_info): Add c_float128 field.
1187 * mathbuiltins.def: Indicate which builtins are const.
1188 * trans-types.h (float128_type_node, complex_float128_type_node,
1189 gfc_real16_is_float128): New variables.
1190 * trans-types.c (float128_type_node, complex_float128_type_node,
1191 gfc_real16_is_float128): New variables.
1192 (gfc_init_kinds): Allow TFmode.
1193 (gfc_build_real_type): Mark __float128 types as such.
1194 (gfc_init_types): Initialize float128_type_node and
1195 complex_float128_type_node
1196 * f95-lang.c (gfc_init_builtin_functions): Adjust for new
1197 argument of OTHER_BUILTIN macro.
1198 * trans-intrinsic.c (gfc_intrinsic_map_t): Likewise.
1199 (builtin_decl_for_precision): Special case for __float128.
1200 (builtin_decl_for_float_kind): Likewise.
1201 (define_quad_builtin): New function.
1202 (gfc_build_intrinsic_lib_fndecls): Create all __float128
1203 library decls if necessary. Store them in the real16_decl and
1204 complex16_decl builtin map fields.
1205 (gfc_get_intrinsic_lib_fndecl): Handle q-suffixed __float128
1206 library function names.
1208 2010-08-27 Tobias Burnus <burnus@net-b.de>
1211 * gcc/fortran/intrinsic.c (add_functions): Add norm2 and parity.
1212 * gcc/fortran/intrinsic.h (gfc_check_norm2, gfc_check_parity):
1213 gfc_simplify_norm2, gfc_simplify_parity, gfc_resolve_norm2,
1214 gfc_resolve_parity): New prototypes.
1215 * gcc/fortran/gfortran.h (gfc_isym_id): New enum items
1216 GFC_ISYM_NORM2 and GFC_ISYM_PARITY.
1217 * gcc/fortran/iresolve.c (gfc_resolve_norm2,
1218 gfc_resolve_parity): New functions.
1219 * gcc/fortran/check.c (gfc_check_norm2, gfc_check_parity):
1221 * gcc/fortran/trans-intrinsic.c (gfc_conv_intrinsic_arith,
1222 gfc_conv_intrinsic_function): Handle NORM2 and PARITY.
1223 * gcc/fortran/intrinsic.texi (NORM2, PARITY): Add.
1224 * gcc/fortran/simplify.c (simplify_transformation_to_array):
1225 Add post-processing opterator.
1226 (gfc_simplify_all, gfc_simplify_any, gfc_simplify_count,
1227 gfc_simplify_product, gfc_simplify_sum): Update call.
1228 (add_squared, do_sqrt, gfc_simplify_norm2, do_xor,
1229 gfc_simplify_parity): New functions.
1231 2010-08-27 Janus Weil <janus@gcc.gnu.org>
1234 * match.c (select_type_set_tmp): Add the possibility to reset the
1236 (gfc_match_class_is): Reset the temporary in CLASS DEFAULT clauses.
1238 2010-08-27 Thomas Koenig <tkoenig@gcc.gnu.org>
1241 * dependency.c (check_section_vs_section): Single test for
1242 identical strides which takes into account that only one
1243 of the strides may be NULL.
1245 2010-08-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1248 * primary.c (match_hollerith_constant): Calculate padding needed to
1249 fill default integer and allocate string for that size. Set pad bytes
1251 * gfortran.h: Add hollerith pad value to type spec union.
1252 * data.c (create_character_initializer): Fix spelling of function name.
1253 Use hollerith pad value to calculate length.
1254 * arith.c (hollerith2representation); Use hollerith pad value to
1257 2010-08-26 Daniel Kraft <d@domob.eu>
1262 * gfortran.h (struct gfc_association_list): New flag `dangling'.
1263 (gfc_build_block_ns): Declared here...
1264 * parse.h (gfc_build_block_ns): ...instead of here.
1265 * trans.h (gfc_process_block_locals): Expect additionally the
1266 gfc_association_list of BLOCK (if present).
1267 * match.c (select_type_set_tmp): Create sym->assoc for temporary.
1268 * resolve.c (resolve_variable): Only check for invalid *array*
1269 references on associate-names.
1270 (resolve_assoc_var): New method with code previously in resolve_symbol.
1271 (resolve_select_type): Use association to give the selector and
1272 temporaries their values instead of ordinary assignment.
1273 (resolve_fl_var_and_proc): Allow CLASS associate-names.
1274 (resolve_symbol): Use new `resolve_assoc_var' instead of inlining here.
1275 * trans-stmt.c (gfc_trans_block_construct): Pass association-list
1276 to `gfc_process_block_locals' to match new interface.
1277 * trans-decl.c (gfc_get_symbol_decl): Don't defer associate-names
1279 (gfc_process_block_locals): Defer them rather here when linked to
1280 from the BLOCK's association list.
1282 2010-08-25 Jakub Jelinek <jakub@redhat.com>
1284 * trans-decl.c (gfc_build_intrinsic_function_decls): Set
1285 TREE_NOTHROW on fndecls that can't throw. Set
1286 TREE_READONLY on gfor_fndecl_math_ishftc{4,8,16}.
1287 (gfc_build_builtin_function_decls): Set TREE_NOTHROW on
1288 gfor_fndecl_associated.
1290 2010-08-23 Mikael Morin <mikael@gcc.gnu.org>
1293 * frontend-passes.c (optimize_equality): Don't optimize array equality
1295 2010-08-23 Janus Weil <janus@gcc.gnu.org>
1298 * resolve.c (resolve_procedure_interface): New function split off from
1300 (resolve_formal_arglist): Call it here ...
1301 (resolve_symbol): ... and here.
1303 2010-08-22 Joseph Myers <joseph@codesourcery.com>
1305 * Make-lang.in (gfortranspec.o): Update dependencies.
1306 * gfortranspec.c: Include coretypes.h before gcc.h. Include
1308 (MATH_LIBRARY, FORTRAN_LIBRARY): Remove initial "-l".
1309 (ADD_ARG_LIBGFORTRAN, Option, lookup_option): Remove.
1310 (g77_xargc): Make unsigned.
1311 (g77_xargv): Change to g77_x_decoded_options.
1312 (g77_newargc): Make unsigned.
1313 (g77_newargv): Change to g77_new_decoded_options.
1314 (strings_same, options_same): New.
1315 (append_arg): Use cl_decoded_option structures.
1316 (append_option): New.
1317 (add_arg_libgfortran): New.
1318 (lang_specific_driver): Use cl_decoded_option structures.
1320 2010-08-21 Janus Weil <janus@gcc.gnu.org>
1324 * class.c (add_proc_comp): Add static initializer for PPCs.
1325 (add_procs_to_declared_vtab): Modified comment.
1326 * module.c (mio_component): Add argument 'vtype'. Don't read/write the
1327 initializer if the component is part of a vtype.
1328 (mio_component_list): Add argument 'vtype', pass it on to
1330 (mio_symbol): Modified call to 'mio_component_list'.
1331 * trans.h (gfc_conv_initializer): Modified prototype.
1332 (gfc_trans_assign_vtab_procs): Removed.
1333 * trans-common.c (create_common): Modified call to
1334 'gfc_conv_initializer'.
1335 * trans-decl.c (gfc_get_symbol_decl,get_proc_pointer_decl,
1336 gfc_emit_parameter_debug_info): Modified call to
1337 'gfc_conv_initializer'.
1338 (build_function_decl): Remove assertion.
1339 * trans-expr.c (gfc_conv_derived_to_class,gfc_trans_class_assign):
1340 Removed call to 'gfc_trans_assign_vtab_procs'.
1341 (gfc_conv_initializer): Add argument 'procptr'.
1342 (gfc_conv_structure): Modified call to 'gfc_conv_initializer'.
1343 (gfc_trans_assign_vtab_procs): Removed.
1344 * trans-stmt.c (gfc_trans_allocate): Removed call to
1345 'gfc_trans_assign_vtab_procs'.
1347 2010-08-21 Tobias Burnus <burnus@net-b.de>
1351 * intrinsic.c (add_sym): Init value attribute.
1352 (set_attr_value): New function.
1353 (add_functions) Use it and add JN/YN resolvers.
1354 * symbol.c (gfc_copy_formal_args_intr): Copy value attr.
1355 * intrinsic.h (gfc_resolve_bessel_n2): New prototype.
1356 * gfortran.h (gfc_intrinsic_arg): Add value attribute.
1357 * iresolve.c (gfc_resolve_bessel_n2): New function.
1358 * trans-intrinsic.c (gfc_get_symbol_for_expr): Create
1360 (gfc_conv_intrinsic_function,gfc_is_intrinsic_libcall):
1361 Add GFC_ISYM_JN2/GFC_ISYM_YN2 as case value.
1362 * simplify.c (): For YN set to -INF if previous values
1364 * trans-expr.c (gfc_conv_procedure_call): Don't crash
1366 * iresolve.c (gfc_resolve_extends_type_of): Set the
1367 type of the dummy argument to the one of the actual.
1369 2010-08-20 Joseph Myers <joseph@codesourcery.com>
1371 * lang.opt (MD, MMD): Use NoDriverArg instead of NoArgDriver.
1373 2010-08-20 Joseph Myers <joseph@codesourcery.com>
1375 * gfortranspec.c (lang_specific_driver): Refer to -lgfortran in
1378 2010-08-20 Nathan Froyd <froydnj@codesourcery.com>
1380 * trans-openmp.c: Use FOR_EACH_VEC_ELT.
1382 2010-08-19 Daniel Kraft <d@domob.eu>
1386 * trans.h (struct gfc_se): New flag `byref_noassign'.
1387 * trans-array.h (gfc_conv_shift_descriptor_lbound): New method.
1388 (gfc_conv_array_extent_dim), (gfc_conv_descriptor_size): New methods.
1389 * expr.c (gfc_check_pointer_assign): Allow bounds and rank remapping
1390 and check for compile-time errors with those.
1391 * trans-decl.c (trans_associate_var): Use new routine
1392 `gfc_conv_shift_descriptor_lbound' instead of doing it manually.
1393 * trans-array.c (gfc_conv_shift_descriptor_lbound): New method.
1394 (gfc_conv_array_extent_dim), (gfc_conv_descriptor_size): New methods.
1395 (gfc_array_init_size): Use new `gfc_conv_array_extent_dim'.
1396 (gfc_conv_expr_descriptor): Handle new flag `byref_noassign'.
1397 * trans-expr.c (gfc_trans_pointer_assignment): Handle bounds and
1398 rank remapping for assignment.
1400 2010-08-19 Tobias Burnus <burnus@net-b.de>
1402 * intrinsic.texi (Bessel_jn, Bessel_yn): Fix typo.
1403 * * simplify.c (gfc_simplify_bessel_yn): Change recursive
1406 2010-08-19 Tobias Burnus <burnus@net-b.de>
1410 * check.c (gfc_check_bessel_n2): New function.
1411 * gfortran.h (gfc_isym_id): Add GFC_ISYM_JN2 and GFC_ISYM_YN2.
1412 * intrinsic.c (add_functions): Add transformational version
1413 of the Bessel_jn/yn intrinsics.
1414 * intrinsic.h (gfc_check_bessel_n2,gfc_simplify_bessel_jn2,
1415 gfc_simplify_bessel_yn2): New prototypes.
1416 * intrinsic.texi (Bessel_jn, Bessel_yn): Document
1417 transformational variant.
1418 * simplify.c (gfc_simplify_bessel_jn, gfc_simplify_bessel_yn):
1419 Check for negative order.
1420 (gfc_simplify_bessel_n2,gfc_simplify_bessel_jn2,
1421 gfc_simplify_bessel_yn2): New functions.
1423 2010-08-19 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1426 * resolve.c (resolve_transfer): Traverse operands and set expression
1427 to be checked to a non EXPR_OP type.
1429 2010-08-19 Janus Weil <janus@gcc.gnu.org>
1432 * gfortran.h (gfc_add_save): Modified prototype.
1433 * decl.c (add_init_expr_to_sym): Defer checking of proc pointer init.
1434 (match_pointer_init): New function to match F08 pointer initialization.
1435 (variable_decl,match_procedure_decl,match_ppc_decl): Use
1436 'match_pointer_init'.
1437 (match_attr_spec): Module variables are implicitly SAVE.
1438 (gfc_match_save): Modified call to 'gfc_add_save'.
1439 * expr.c (gfc_check_assign_symbol): Extra checks for pointer
1441 * primary.c (gfc_variable_attr): Handle SAVE attribute.
1442 * resolve.c (resolve_structure_cons): Add new argument and do pointer
1443 initialization checks.
1444 (gfc_resolve_expr): Modified call to 'resolve_structure_cons'.
1445 (resolve_values): Call 'resolve_structure_cons' directly with init arg.
1446 (resolve_fl_variable): Handle SAVE_IMPLICIT.
1447 * symbol.c (gfc_add_save,gfc_copy_attr,save_symbol): Handle
1449 * trans-decl.c (gfc_create_module_variable): Module variables with
1450 TARGET can already exist.
1451 * trans-expr.c (gfc_conv_variable): Check for 'current_function_decl'.
1452 (gfc_conv_initializer): Implement non-NULL pointer
1455 2010-08-18 Tobias Burnus <burnus@net-b.de>
1458 * intrinsic.texi (selected_char_kind): Document ISO_10646
1461 2010-08-17 Jakub Jelinek <jakub@redhat.com>
1464 * trans-decl.c (build_library_function_decl_1): Chain on
1465 void_list_node instead of creating a new TREE_LIST.
1466 * trans-intrinsic.c (gfc_get_intrinsic_lib_fndecl): Likewise.
1467 * trans-types.c (gfc_get_function_type): Likewise. Set
1468 typelist to void_list_node for the main program.
1470 2010-08-17 Daniel Kraft <d@domob.eu>
1473 * gfortran.h (struct gfc_association_list): New member `where'.
1474 (gfc_is_associate_pointer) New method.
1475 * match.c (gfc_match_associate): Remember locus for each associate
1476 name matched and do not try to set variable flag.
1477 * parse.c (parse_associate): Use remembered locus for symbols.
1478 * primary.c (match_variable): Instead of variable-flag check for
1479 associate names set it for all such names used.
1480 * symbol.c (gfc_is_associate_pointer): New method.
1481 * resolve.c (resolve_block_construct): Don't generate assignments
1482 to give associate-names their values.
1483 (resolve_fl_var_and_proc): Allow associate-names to be deferred-shape.
1484 (resolve_symbol): Set some more attributes for associate variables,
1485 set variable flag here and check it and don't try to build an
1486 explicitely shaped array-spec for array associate variables.
1487 * trans-expr.c (gfc_conv_variable): Dereference in case of association
1489 * trans-types.c (gfc_is_nodesc_array): Handle array association symbols.
1490 (gfc_sym_type): Return pointer type for association to scalar vars.
1491 * trans-decl.c (gfc_get_symbol_decl): Defer association symbols.
1492 (trans_associate_var): New method.
1493 (gfc_trans_deferred_vars): Handle association symbols.
1495 2010-08-16 Joseph Myers <joseph@codesourcery.com>
1497 * lang.opt (MDX): Change back to MD. Mark NoDriverArg instead of
1499 (MMDX): Change back to MMD. Mark NoDriverArg instead of
1501 * cpp.c (gfc_cpp_handle_option): Use OPT_MD and OPT_MMD instead of
1502 OPT_MDX and OPT_MMDX.
1504 2010-08-16 Joseph Myers <joseph@codesourcery.com>
1506 * lang.opt (MDX, MMDX): Mark RejectDriver.
1508 2010-08-15 Janus Weil <janus@gcc.gnu.org>
1510 * trans-expr.c (gfc_trans_assign_vtab_procs): Clean up (we don't have
1511 vtabs for generics any more).
1513 2010-08-15 Daniel Kraft <d@domob.eu>
1516 * gfortran.h (gfc_find_proc_namespace): New method.
1517 * expr.c (gfc_build_intrinsic_call): No need to build symtree messing
1518 around with namespace.
1519 * symbol.c (gfc_find_proc_namespace): New method.
1520 * trans-decl.c (gfc_build_qualified_array): Use it for correct
1522 * primary.c (gfc_match_varspec): Handle associate-names as arrays.
1523 * parse.c (parse_associate): Removed assignment-generation here...
1524 * resolve.c (resolve_block_construct): ...and added it here.
1525 (resolve_variable): Handle names that are arrays but were not parsed
1526 as such because of association.
1527 (resolve_code): Fix BLOCK resolution.
1528 (resolve_symbol): Generate array-spec for associate-names.
1530 2010-08-15 Tobias Burnus <burnus@net-b.de>
1533 * decl.c (verify_c_interop_param): Remove superfluous space (" ").
1534 (verify_c_interop): Handle unresolved DT with bind(C).
1536 2010-08-15 Tobias Burnus <burnus@net-b.de>
1538 * trans-expr.c (gfc_conv_expr_present): Regard nullified
1539 pointer arrays as absent.
1540 (gfc_conv_procedure_call): Handle EXPR_NULL for non-pointer
1541 dummys as absent argument.
1542 * interface.c (compare_actual_formal,compare_parameter):
1545 2010-08-15 Tobias Burnus <burnus@net-b.de>
1547 * interface.c (compare_pointer, ): Allow passing TARGETs to pointers
1548 dummies with intent(in).
1550 2010-08-15 Daniel Kraft <d@domob.eu>
1553 * decl.c (gfc_match_prefix): Match IMPURE prefix and mark ELEMENTAL
1554 routines not IMPURE also as PURE.
1555 * intrinsic.c (enum klass): New class `CLASS_PURE' and renamed
1556 `NO_CLASS' in `CLASS_IMPURE'.
1557 (add_sym): Set symbol-attributes `pure' and `elemental' correctly.
1558 (add_sym_0s): Renamed `NO_CLASS' in `CLASS_IMPURE'.
1559 (add_functions): Ditto.
1560 (add_subroutines): Ditto and mark `MOVE_ALLOC' as CLASS_PURE.
1561 * resolve.c (gfc_pure): Do not treat ELEMENTAL as automatically PURE.
1562 (resolve_formal_arglist): Check that arguments to ELEMENTAL procedures
1563 are not ALLOCATABLE and have their INTENT specified.
1565 2010-08-13 Daniel Kraft <d@domob.eu>
1567 * gfortran.h (array_type): New type `AS_IMPLIED_SHAPE'.
1568 * array.c (gfc_match_array_spec): Match implied-shape specification and
1569 handle AS_IMPLIED_SHAPE correctly otherwise.
1570 * decl.c (add_init_expr_to_sym): Set upper bounds for implied-shape.
1571 (variable_decl): Some checks for implied-shape declaration.
1572 * resolve.c (resolve_symbol): Assert that array-spec is no longer
1573 AS_IMPLIED_SHAPE in any case.
1575 2010-08-12 Joseph Myers <joseph@codesourcery.com>
1577 * lang.opt (MD, MMD): Change to MDX and MMDX.
1578 * cpp.c (gfc_cpp_handle_option): Use OPT_MMD and OPT_MMDX.
1580 2010-08-11 Janus Weil <janus@gcc.gnu.org>
1583 * intrinsic.c (gfc_current_intrinsic_arg): Change type from 'char' to
1584 'gfc_intrinsic_arg'.
1585 (check_arglist,check_specific): Add reference to 'name' field.
1586 (init_arglist): Remove reference to 'name' field.
1587 * intrinsic.h (gfc_current_intrinsic_arg): Modify prototype.
1588 * check.c (variable_check): Reverse order of checks. Respect intent of
1590 (int_or_proc_check): New function.
1591 (coarray_check): New function.
1592 (allocatable_check): New function.
1593 (gfc_check_allocated,gfc_check_move_alloc): Use 'allocatable_check'.
1594 (gfc_check_complex): Use 'int_or_real_check'.
1595 (gfc_check_lcobound,gfc_check_image_index,gfc_check_this_image,
1596 gfc_check_ucobound): Use 'coarray_check'.
1597 (gfc_check_pack): Use 'real_or_complex_check'.
1598 (gfc_check_alarm_sub,gfc_check_signal,gfc_check_signal_sub): Use
1599 'int_or_proc_check'.
1600 (scalar_check,type_check,numeric_check,int_or_real_check,
1601 real_or_complex_check,kind_check,double_check,logical_array_check,
1602 array_check,same_type_check,rank_check,nonoptional_check,
1603 kind_value_check,gfc_check_a_p,gfc_check_associated,gfc_check_cmplx,
1604 gfc_check_cshift,gfc_check_dcmplx,gfc_check_dot_product,gfc_check_dprod,
1605 gfc_check_eoshift,gfc_check_fn_rc2008,gfc_check_index,gfc_check_kind,
1606 gfc_check_matmul,gfc_check_minloc_maxloc,check_reduction,gfc_check_null,
1607 gfc_check_present,gfc_check_reshape,gfc_check_same_type_as,
1608 gfc_check_spread,gfc_check_unpack,gfc_check_random_seed,
1609 gfc_check_getarg,gfc_check_and,gfc_check_storage_size): Add reference
1612 2010-08-10 Daniel Kraft <d@domob.eu>
1614 * gfortran.texi (Interoperability with C): Fix ordering in menu
1615 and add new subsection about pointers.
1616 (Interoperable Subroutines and Functions): Split off the pointer part.
1617 (working with Pointers): New subsection with extended discussion
1618 of pointers (especially procedure pointers).
1620 2010-08-09 Thomas Koenig <tkoenig@gcc.gnu.org>
1623 * array.c (gfc_ref_dimen_size): Add end argument.
1624 If end is non-NULL, calculate it.
1625 (ref_size): Adjust call to gfc_ref_dimen_size.
1626 (gfc_array_dimen_size): Likewise.
1627 (gfc_array_res_shape): Likewise.
1628 * gfortran.h: Adjust prototype for gfc_ref_dimen_size.
1629 * resolve.c (resolve_array_ref): For stride not equal to -1,
1630 fill in the lowest possible end.
1632 2010-08-09 Janus Weil <janus@gcc.gnu.org>
1634 * intrinsic.texi: Correct documentation of ASINH, ACOSH and ATANH.
1636 2010-08-07 Nathan Froyd <froydnj@codesourcery.com>
1638 * interface.c (compare_actual_formal): Use XALLOCAVEC instead of
1640 (check_some_aliasing): Likewise.
1641 * trans-intrinsic.c (gfc_conv_intrinsic_conversion): Likewise.
1642 (gfc_conv_intrinsic_int): Likewise.
1643 (gfc_conv_intrinsic_lib_function): Likewise.
1644 (gfc_conv_intrinsic_cmplx): Likewise.
1645 (gfc_conv_intrinsic_ctime): Likewise.
1646 (gfc_conv_intrinsic_fdate): Likewise.
1647 (gfc_conv_intrinsic_ttynam): Likewise.
1648 (gfc_conv_intrinsic_minmax): Likewise.
1649 (gfc_conv_intrinsic_minmax_char): Likewise.
1650 (gfc_conv_intrinsic_ishftc): Likewise.
1651 (gfc_conv_intrinsic_index_scan_verify): Likewise.
1652 (gfc_conv_intrinsic_merge): Likewise.
1653 (gfc_conv_intrinsic_trim): Likewise.
1654 * trans.c (gfc_trans_runtime_error_vararg): Likewise.
1656 2010-08-06 Thomas Koenig <tkoenig@gcc.gnu.org>
1659 * dependency.c (check_section_vs_section): Handle cases where
1660 the start expression coincides with the lower or upper
1663 2010-08-04 Janus Weil <janus@gcc.gnu.org>
1668 * class.c (gfc_find_derived_vtab): Do not generate vtabs for class
1669 container types. Do not artificially increase refs. Commit symbols one
1671 * interface.c (compare_parameter): Make sure vtabs are present before
1672 generating module variables.
1673 * resolve.c (resolve_allocate_expr): Ditto.
1675 2010-08-04 Tobias Burnus <burnus@net-b.de>
1679 * resolve.c (resolve_structure_cons): Fix
1682 2010-08-04 Mikael Morin <mikael@gcc.gnu.org>
1686 * symbol.c (changed_syms): Made static again.
1687 (gfc_symbol_state): Don't conditionalize on GFC_DEBUG.
1688 Changed conditional internal error into assert.
1689 Rename function to ...
1690 (gfc_enforce_clean_symbol_state): ... this.
1691 * gfortran.h (gfc_symbol_state, gfc_enforce_clean_symbol_state):
1692 Rename the former to the latter.
1693 * parse.c (decode_statement, decode_omp_directive,
1694 decode_gcc_attribute): Update callers accordingly. Don't conditionalize
1696 (changed_syms): Remove declaration.
1697 (next_statement): Use gfc_enforce_clean_symbol_state.
1699 2010-08-04 Tobias Burnus <burnus@net-b.de>
1702 * resolve.c (resolve_structure_cons): Fix handling of
1703 initialization structure constructors with character
1704 elements of the wrong length.
1705 * array.c (gfc_check_iter_variable): Add NULL check.
1706 (gfc_resolve_character_array_constructor): Also truncate
1709 2010-08-04 Tobias Burnus <burnus@net-b.de>
1711 * trans-io.c (gfc_build_io_library_fndecls): Fix return
1712 value of some libgfortran functions.
1714 2010-08-03 Thomas Koenig <tkoenig@gcc.gnu.org>
1717 * dependency.c (gfc_deb_compare_expr): Remove any integer
1718 conversion functions to larger types from both arguments.
1719 Remove handling these functions futher down.
1721 2010-08-03 Janus Weil <janus@gcc.gnu.org>
1725 * class.c (add_procs_to_declared_vtab1): Don't add erroneous procedures.
1726 * resolve.c (resolve_tb_generic_targets): Check for errors.
1728 2010-08-02 Thomas Koenig <tkoenig@gcc.gnu.org>
1731 * depencency.c (gfc_dep_resolver): Fix logic for when a loop
1734 2010-08-02 Thomas Koenig <tkoenig@gcc.gnu.org>
1737 * dependency.h: Add prototype for gfc_are_identical_variables.
1738 * frontend-passes.c: Include depencency.h.
1739 (optimimize_equality): Use gfc_are_identical_variables.
1740 * dependency.c (identical_array_ref): New function.
1741 (gfc_are_identical_variables): New function.
1742 (gfc_deb_compare_expr): Use gfc_are_identical_variables.
1743 * dependency.c (gfc_check_section_vs_section). Rename gfc_
1744 prefix from statc function.
1745 (check_section_vs_section): Change arguments to gfc_array_ref,
1746 adjust function body accordingly.
1748 2010-08-02 Mikael Morin <mikael@gcc.gnu.org>
1749 Janus Weil <janus@gcc.gnu.org>
1754 * intrinsic.c (gfc_get_intrinsic_sub_symbol): Commit changed symbol.
1755 * symbol.c (gen_cptr_param, gen_fptr_param, gen_shape_param,
1756 gfc_copy_formal_args, gfc_copy_formal_args_intr,
1757 gfc_copy_formal_args_ppc, generate_isocbinding_symbol): Ditto.
1758 * parse.c (parse_derived_contains, parse_spec, parse_progunit):
1759 Call reject_statement in case of error.
1760 (match_deferred_characteritics): Call gfc_undo_symbols in case match
1763 2010-08-01 Janus Weil <janus@gcc.gnu.org>
1766 * class.c (gfc_build_class_symbol): Make '$vptr' component private.
1767 (gfc_find_derived_vtab): Make vtabs and vtypes public.
1768 * module.c (read_module): When reading module files, always import
1769 vtab and vtype symbols.
1771 2010-07-31 Mikael Morin <mikael@gcc.gnu.org>
1775 * symbol.c (changed_syms): Made non-static.
1776 * parse.c (changed_syms): Declare new external.
1777 (next_statement): Assert changed_syms is NULL at the beginning.
1779 2010-07-30 Janus Weil <janus@gcc.gnu.org>
1780 Steven G. Kargl <kargl@gcc.gnu.org>
1783 * match.c (match_type_spec): Try to parse derived types before
1786 2010-07-30 Mikael Morin <mikael@gcc.gnu.org>
1788 * gfortran.h (gfc_release_symbol): New prototype.
1789 * symbol.c (gfc_release_symbol): New. Code taken from free_sym_tree.
1790 (gfc_undo_symbols, free_sym_tree, gfc_free_finalizer):
1791 Use gfc_release_symbol.
1792 * parse.c (gfc_fixup_sibling_symbols): Ditto.
1793 * resolve.c (resolve_symbol): Ditto.
1795 2010-07-29 Tobias Burnus <burnus@net-b.de>
1799 * trans-decl.c (gfc_get_extern_function_decl): Correctly handle
1800 external procedure declarations in modules.
1801 (gfc_get_symbol_decl): Modify assert.
1803 2010-07-29 Janus Weil <janus@gcc.gnu.org>
1806 * resolve.c (resolve_fl_derived): Call gfc_resolve_array_spec.
1808 2010-07-29 Janus Weil <janus@gcc.gnu.org>
1811 * trans-stmt.h (gfc_trans_class_init_assign): New prototype.
1812 (gfc_trans_class_assign): Modified prototype.
1813 * trans.h (gfc_conv_intrinsic_move_alloc): New prototype.
1814 * trans-expr.c (gfc_trans_class_init_assign): Split off from ...
1815 (gfc_trans_class_assign): ... here. Modified actual arguments.
1816 * trans-intrinsic.c (gfc_conv_intrinsic_move_alloc): New function to
1817 handle the MOVE_ALLOC intrinsic with scalar and class arguments.
1818 * trans.c (trans_code): Call 'gfc_conv_intrinsic_move_alloc'.
1820 2010-07-29 Mikael Morin <mikael@gcc.gnu.org>
1824 * class.c (gfc_find_derived_vtab): Accept or discard newly created
1825 symbols before returning.
1827 2010-07-29 Joseph Myers <joseph@codesourcery.com>
1829 * lang.opt (cpp): Remove Joined and Separate markers.
1830 (cpp=): New internal option.
1831 * lang-specs.h (F951_CPP_OPTIONS): Generate -cpp= option.
1832 * cpp.c (gfc_cpp_handle_option): Handle OPT_cpp_ instead of
1835 2010-07-29 Daniel Kraft <d@domob.eu>
1838 * array.c (resolve_array_bound): Fix error message to properly handle
1839 non-variable expressions.
1841 2010-07-28 Mikael Morin <mikael@gcc.gnu.org>
1843 * decl.c (free_value): Also free repeat field.
1844 * data.c (gfc_assign_data_value): Always free offset before returning.
1846 2010-07-28 Daniel Kraft <d@domob.eu>
1848 * gfortran.h (gfc_build_intrinsic_call): New method.
1849 * expr.c (gfc_build_intrinsic_call): New method.
1850 * simplify.c (range_check): Ignore non-constant value.
1851 (simplify_bound_dim): Handle non-variable expressions and
1852 fix memory leak with non-free'ed expression.
1853 (simplify_bound): Handle non-variable expressions.
1854 (gfc_simplify_shape): Ditto.
1855 (gfc_simplify_size): Ditto, but only in certain cases possible.
1857 2010-07-28 Joseph Myers <joseph@codesourcery.com>
1859 * gfortranspec.c (SWITCH_TAKES_ARG, WORD_SWITCH_TAKES_ARG):
1862 2010-07-28 Tobias Burnus <burnus@net-b.de>
1865 * trans-types.c (gfc_get_derived_type): Fix DT declaration
1866 from modules for whole-file mode.
1868 2010-07-27 Joseph Myers <joseph@codesourcery.com>
1870 * gfortran.h (gfc_handle_option): Update prototype and return
1872 * options.c (gfc_handle_option): Update prototype and return value
1875 2010-07-27 Joseph Myers <joseph@codesourcery.com>
1877 * cpp.c (gfc_cpp_init_options): Update prototype. Use number of
1878 decoded options in allocating deferred_opt.
1879 * cpp.h (gfc_cpp_init_options): Update prototype.
1880 * f95-lang.c (LANG_HOOKS_OPTION_LANG_MASK): Define.
1881 * gfortran.h (gfc_option_lang_mask): New.
1882 (gfc_init_options): Update prototype.
1883 * options.c (gfc_option_lang_mask): New.
1884 (gfc_init_options): Update prototype. Pass new arguments to
1885 gfc_cpp_init_options.
1887 2010-07-26 Tobias Burnus <burnus@net-b.de>
1890 * trans-decl.c (gfc_get_extern_function_decl): Fix generation
1891 for functions which are later in the same file.
1892 (gfc_create_function_decl, build_function_decl,
1893 build_entry_thunks): Add global argument.
1894 * trans.c (gfc_generate_module_code): Update
1895 gfc_create_function_decl call.
1896 * trans.h (gfc_create_function_decl): Update prototype.
1897 * resolve.c (resolve_global_procedure): Also resolve for
1900 2010-07-26 Richard Henderson <rth@redhat.com>
1903 * f95-lang.c (LANG_HOOKS_WRITE_GLOBALS): New.
1904 (gfc_write_global_declarations): New.
1906 2010-07-26 Tobias Burnus <burnus@net-b.de>
1909 * trans-io.c (build_dt): Use NULL_TREE rather than NULL
1910 for call to transfer_namelist_element.
1911 * trans-decl.c (gfc_get_symbol_decl): Also set sym->backend_decl
1914 2010-07-25 Thomas Koenig <tkoenig@gcc.gnu.org>
1917 * Make-lang.in: Add fortran/frontend-passes.o.
1918 * gfortran.h: Add prototype for gfc_run_passes.
1919 * resolve.c (gfc_resolve): Call gfc_run_passes.
1920 * frontend-passes.c: New file.
1922 2010-07-25 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1925 * scanner.c (gfc_next_char_literal): Enable truncation warning for
1928 2010-07-25 Mikael Morin <mikael@gcc.gnu.org>
1931 * gfortran.h (gfc_namespace): New field old_equiv.
1932 (gfc_free_equiv_until): New prototype.
1933 * match.c (gfc_free_equiv_until): New, renamed from gfc_free_equiv with
1934 a parameterized stop condition.
1935 (gfc_free_equiv): Use gfc_free_equiv_until.
1936 * parse.c (next_statement): Save equivalence list.
1937 (reject_statement): Restore equivalence list.
1939 2010-07-25 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1942 * scanner.c (gfc_next_char_literal): Move check for truncation earlier
1943 in the function so that it does not get missed by early exits.
1944 (load_line): Add checks for quoted strings and free form comments to
1945 disable warnings on comments. Add check for ampersand as first
1946 character after truncation and don't warn for this case, but warn if
1947 there are subsequent non-whitespace characters.
1949 2010-07-24 Tobias Burnus <burnus@net-b.de>
1952 * parse.c (gfc_parse_file): Do not override
1953 gfc_global_ns_list items.
1955 2010-07-24 Tobias Burnus <burnus@net-b.de>
1957 * options.c (gfc_init_options): Enable -fwhole-file by default.
1958 * interface.c (compare_parameter): Assume a Hollerith constant is
1959 compatible with all other argument types.
1961 2010-07-23 Tobias Burnus <burnus@net-b.de>
1964 * trans-decl.c (gfc_get_symbol_decl): Use module decl with
1965 -fwhole-file also for derived types.
1966 * trans-types.c (copy_dt_decls_ifequal): Remove static and
1967 rename to gfc_copy_dt_decls_ifequal.
1968 (gfc_get_derived_type): Update call.
1969 * trans-types.h (gfc_copy_dt_decls_ifequal): Add prototype.
1971 2010-07-23 Tobias Burnus <burnus@net-b.de>
1974 * resolve.c (resolve_global_procedure): Properly handle ENTRY.
1976 2010-07-23 Jakub Jelinek <jakub@redhat.com>
1978 * trans-types.c (gfc_get_array_descriptor_base,
1979 gfc_get_array_type_bounds): Set TYPE_NAMELESS.
1980 * trans-decl.c (gfc_build_qualified_array): Set DECL_NAMELESS
1981 instead of clearing DECL_NAME.
1982 (gfc_build_dummy_array_decl): Set DECL_NAMELESS.
1984 2009-07-23 Paul Thomas <pault@gcc.gnu.org>
1987 * trans-array.c (gfc_init_loopinfo): Initialize the reverse
1989 gfc_trans_scalarized_loop_end: If reverse set in dimension n,
1990 reverse the scalarization loop.
1991 gfc_conv_resolve_dependencies: Pass the reverse field of the
1992 loopinfo to gfc_dep_resolver.
1993 trans-expr.c (gfc_trans_assignment_1): Enable loop reversal for
1994 assignment by resetting loop.reverse.
1995 gfortran.h : Add the gfc_reverse enum.
1996 trans.h : Add the reverse field to gfc_loopinfo.
1997 dependency.c (gfc_check_dependency): Pass null to the new arg
1998 of gfc_dep_resolver.
1999 (gfc_check_section_vs_section): Check for reverse dependencies.
2000 (gfc_dep_resolver): Add reverse argument and deal with the loop
2002 dependency.h : Modify prototype for gfc_dep_resolver to include
2005 2010-07-23 Daniel Kraft <d@domob.eu>
2008 * gfortran.h (gfc_find_symtree_in_proc): New method.
2009 * symbol.c (gfc_find_symtree_in_proc): New method.
2010 * match.c (match_exit_cycle): Look for loop name also in parent
2011 namespaces within current procedure.
2013 2010-07-22 Tobias Burnus <burnus@net-b.de>
2016 * dependency.c (gfc_check_dependency): Add argument alising check.
2017 * symbol.c (gfc_symbols_could_alias): Add argument alising check.
2019 2010-07-22 Daniel Kraft <d@domob.eu>
2021 * trans-stmt.c (gfc_trans_return): Put back in the handling of se.post,
2022 now in the correct place.
2024 2010-07-21 Steven G. Kargl <kargl@gcc.gnu.org>
2027 * Revert my commit r162325.
2029 2010-07-21 Daniel Kraft <d@domob.eu>
2031 * trans.h (gfc_get_return_label): Removed.
2032 (gfc_generate_return): New method.
2033 (gfc_trans_deferred_vars): Update gfc_wrapped_block rather than
2034 returning a tree directly.
2035 * trans-stmt.c (gfc_trans_return): Use `gfc_generate_return'.
2036 (gfc_trans_block_construct): Update for new interface to
2037 `gfc_trans_deferred_vars'.
2038 * trans-decl.c (current_function_return_label): Removed.
2039 (current_procedure_symbol): New variable.
2040 (gfc_get_return_label): Removed.
2041 (gfc_trans_deferred_vars): Update gfc_wrapped_block rather than
2042 returning a tree directly.
2043 (get_proc_result), (gfc_generate_return): New methods.
2044 (gfc_generate_function_code): Clean up and do init/cleanup here
2045 also with gfc_wrapped_block. Remove return-label but rather
2048 2010-07-19 Steven G. Kargl <kargl@gcc.gnu.org>
2051 * fortran/match.c (match_type_spec): Check for derived type before
2054 2010-07-19 Paul Thomas <pault@gcc.gnu.org>
2057 * interface.c (matching_typebound_op): Add argument for the
2058 return of the generic name for the procedure.
2059 (build_compcall_for_operator): Add an argument for the generic
2060 name of an operator procedure and supply it to the expression.
2061 (gfc_extend_expr, gfc_extend_assign): Use the generic name in
2062 calls to the above procedures.
2063 * resolve.c (resolve_typebound_function): Catch procedure
2064 component calls for CLASS objects, check that the vtable is
2065 complete and insert the $vptr and procedure components, to make
2067 (resolve_typebound_function): The same.
2068 * trans-decl.c (gfc_trans_deferred_vars): Do not deallocate
2069 an allocatable scalar if it is a result.
2071 2010-07-19 Paul Thomas <pault@gcc.gnu.org>
2074 * match.c (gfc_match_iterator): Reverted.
2076 2010-07-18 Paul Thomas <pault@gcc.gnu.org>
2079 * match.c (gfc_match_iterator): Remove error that iterator
2080 cannot be INTENT(IN).
2082 2010-07-17 Mikael Morin <mikael@gcc.gnu.org>
2084 * trans-array.c (gfc_free_ss): Don't free beyond ss rank.
2085 Access subscript through the "dim" field index.
2086 (gfc_trans_create_temp_array): Access ss info through the "dim" field
2088 (gfc_conv_array_index_offset): Ditto.
2089 (gfc_conv_loop_setup): Ditto.
2090 (gfc_conv_expr_descriptor): Ditto.
2091 (gfc_conv_ss_startstride): Ditto. Update call to
2092 gfc_conv_section_startstride.
2093 (gfc_conv_section_startstride): Set values along the array dimension.
2094 Get array dimension directly from the argument.
2096 2010-07-15 Jakub Jelinek <jakub@redhat.com>
2098 * trans.h (gfc_string_to_single_character): New prototype.
2099 * trans-expr.c (string_to_single_character): Renamed to ...
2100 (gfc_string_to_single_character): ... this. No longer static.
2101 (gfc_conv_scalar_char_value, gfc_build_compare_string,
2102 gfc_trans_string_copy): Adjust callers.
2103 * config-lang.in (gtfiles): Add fortran/trans-stmt.c.
2104 * trans-stmt.c: Include ggc.h and gt-fortran-trans-stmt.h.
2105 (select_struct): Move to toplevel, add GTY(()).
2106 (gfc_trans_character_select): Optimize SELECT CASE
2107 with character length 1.
2109 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
2111 * f95-lang.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
2112 * trans-common.c: Likewise.
2113 * trans-decl.c: Likewise.
2114 * trans-types.c: Likewise.
2115 * trans.c: Likewise.
2117 2010-07-15 Janus Weil <janus@gcc.gnu.org>
2120 * resolve.c (resolve_typebound_generic_call): Resolve generic
2121 non-polymorphic type-bound procedure calls to the correct specific
2123 (resolve_typebound_subroutine): Remove superfluous code.
2125 2010-07-15 Daniel Kraft <d@domob.eu>
2128 * trans.h (struct gfc_wrapped_block): New struct.
2129 (gfc_start_wrapped_block), (gfc_add_init_cleanup): New methods.
2130 (gfc_finish_wrapped_block): New method.
2131 (gfc_init_default_dt): Add new init code to block rather than
2133 * trans-array.h (gfc_trans_auto_array_allocation): Use gfc_wrapped_block
2134 (gfc_trans_dummy_array_bias): Ditto.
2135 (gfc_trans_g77_array): Ditto.
2136 (gfc_trans_deferred_array): Ditto.
2137 * trans.c (gfc_add_expr_to_block): Call add_expr_to_chain.
2138 (add_expr_to_chain): New method based on old gfc_add_expr_to_block.
2139 (gfc_start_wrapped_block), (gfc_add_init_cleanup): New methods.
2140 (gfc_finish_wrapped_block): New method.
2141 * trans-array.c (gfc_trans_auto_array_allocation): use gfc_wrapped_block
2142 (gfc_trans_g77_array), (gfc_trans_dummy_array_bias): Ditto.
2143 (gfc_trans_deferred_array): Ditto.
2144 * trans-decl.c (gfc_trans_dummy_character): Ditto.
2145 (gfc_trans_auto_character_variable), (gfc_trans_assign_aux_var): Ditto.
2146 (init_intent_out_dt): Ditto.
2147 (gfc_init_default_dt): Add new init code to block rather than
2149 (gfc_trans_deferred_vars): Use gfc_wrapped_block to collect all init
2150 and cleanup code and put it all together.
2152 2010-07-15 Jakub Jelinek <jakub@redhat.com>
2154 * trans.h (gfc_build_compare_string): Add CODE argument.
2155 * trans-intrinsic.c (gfc_conv_intrinsic_strcmp): Pass OP to
2156 gfc_build_compare_string.
2157 * trans-expr.c (gfc_conv_expr_op): Pass CODE to
2158 gfc_build_compare_string.
2159 (string_to_single_character): Rename len variable to length.
2160 (gfc_optimize_len_trim): New function.
2161 (gfc_build_compare_string): Add CODE argument. If it is EQ_EXPR
2162 or NE_EXPR and one of the strings is string literal with LEN_TRIM
2163 bigger than the length of the other string, they compare unequal.
2166 * trans-stmt.c (gfc_trans_character_select): Always use NULL for high
2167 in CASE_LABEL_EXPR and use NULL for low for the default case.
2169 2010-07-14 Mikael Morin <mikael@gcc.gnu.org>
2171 * trans-array.c (gfc_conv_section_upper_bound): Remove
2172 (gfc_conv_section_startstride): Don't set the upper bound in the
2173 vector subscript case.
2174 (gfc_conv_loop_setup): Don't use gfc_conv_section_upper_bound
2176 2010-07-14 Janus Weil <janus@gcc.gnu.org>
2179 * gfortran.h (gfc_is_data_pointer): Remove prototype.
2180 * dependency.c (gfc_is_data_pointer): Make it static.
2181 * intrinsic.texi: Update documentation on C_LOC.
2182 * resolve.c (gfc_iso_c_func_interface): Fix pointer and target checks
2183 and add a check for polymorphic variables.
2185 2010-07-14 Jakub Jelinek <jakub@redhat.com>
2187 * trans-expr.c (string_to_single_character): Also optimize
2188 string literals containing a single char followed only by spaces.
2189 (gfc_trans_string_copy): Remove redundant string_to_single_character
2192 * trans-decl.c (gfc_build_intrinsic_function_decls,
2193 gfc_build_builtin_function_decls): Mark functions as
2194 DECL_PURE_P or TREE_READONLY.
2196 2010-07-13 Nathan Froyd <froydnj@codesourcery.com>
2198 * trans-decl.c (build_entry_thunks): Call build_call_expr_loc_vec
2199 instead of build_function_call_expr.
2200 * trans-intrinsic.c (gfc_conv_intrinsic_sr_kind): Likewise.
2202 2010-07-13 Tobias Burnus <burnus@net-b.de>
2203 Daniel Franke <franke.daniel@gmail.com>
2206 * trans.h (gfc_build_library_function_decl_with_spec): New prototype.
2207 * trans-decl.c (gfc_build_library_function_decl_with_spec): Removed
2209 * trans-io (gfc_build_io_library_fndecls): Add "fn spec" annotations.
2211 2010-07-13 Daniel Franke <franke.daniel@gmail.com>
2212 Tobias Burnus <burnus@net-b.de>
2215 * trans-decl.c (gfc_build_intrinsic_function_decls): Add
2216 noclobber/noescape annotations to function calls.
2217 (gfc_build_builtin_function_decls): Likewise.
2219 2010-07-13 Janus Weil <janus@gcc.gnu.org>
2225 * gfortran.h (gfc_find_derived_vtab): Modified prototype.
2226 * class.c (gfc_build_class_symbol): Modified call to
2227 'gfc_find_derived_vtab'.
2228 (add_proc_component): Removed, moved code into 'add_proc_comp'.
2229 (add_proc_comps): Renamed to 'add_proc_comp', removed treatment of
2231 (add_procs_to_declared_vtab1): Removed unnecessary argument 'resolved'.
2232 Removed treatment of generics.
2233 (copy_vtab_proc_comps): Removed unnecessary argument 'resolved'.
2234 Call 'add_proc_comp' instead of duplicating code.
2235 (add_procs_to_declared_vtab): Removed unnecessary arguments 'resolved'
2237 (add_generic_specifics,add_generics_to_declared_vtab): Removed.
2238 (gfc_find_derived_vtab): Removed unnecessary argument 'resolved'.
2239 Removed treatment of generics.
2240 * iresolve.c (gfc_resolve_extends_type_of): Modified call to
2241 'gfc_find_derived_vtab'.
2242 * resolve.c (resolve_typebound_function,resolve_typebound_subroutine):
2243 Removed treatment of generics.
2244 (resolve_select_type,resolve_fl_derived): Modified call to
2245 'gfc_find_derived_vtab'.
2246 * trans-decl.c (gfc_get_symbol_decl): Ditto.
2247 * trans-expr.c (gfc_conv_derived_to_class,gfc_trans_class_assign):
2249 * trans-stmt.c (gfc_trans_allocate): Ditto.
2251 2010-07-12 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2254 * trans-io.c (build_dt): Set common.unit to flag chracter(kind=4)
2257 2010-07-12 Mikael Morin <mikael@gcc.gnu.org>
2259 * expr.c (gfc_get_int_expr): Don't initialize mpfr data twice.
2260 * resolve.c (build_default_init_expr): Ditto.
2262 2010-07-11 Tobias Burnus <burnus@net-b.de>
2265 * module.c (sort_iso_c_rename_list): Remove.
2266 (import_iso_c_binding_module,use_iso_fortran_env_module):
2267 Allow multiple imports of the same symbol.
2269 2010-07-11 Mikael Morin <mikael@gcc.gnu.org>
2271 * arith.c (gfc_arith_done_1): Release mpfr internal caches.
2273 2010-07-11 Janus Weil <janus@gcc.gnu.org>
2276 * decl.c (build_sym,attr_decl1): Only build the class container if the
2277 symbol has sufficient attributes.
2278 * expr.c (gfc_check_pointer_assign): Use class_pointer instead of
2279 pointer attribute for classes.
2280 * match.c (gfc_match_allocate,gfc_match_deallocate): Ditto.
2281 * module.c (MOD_VERSION): Bump.
2282 (enum ab_attribute,attr_bits): Add AB_CLASS_POINTER.
2283 (mio_symbol_attribute): Handle class_pointer attribute.
2284 * parse.c (parse_derived): Use class_pointer instead of pointer
2285 attribute for classes.
2286 * primary.c (gfc_variable_attr,gfc_expr_attr): Ditto.
2287 * resolve.c (resolve_structure_cons,resolve_deallocate_expr,
2288 resolve_allocate_expr,resolve_fl_derived): Ditto.
2289 (resolve_fl_var_and_proc): Check for class_ok attribute.
2291 2010-07-10 Mikael Morin <mikael@gcc.gnu.org>
2293 * trans-io.c (gfc_build_st_parameter): Update calls to
2294 gfc_add_field_to_struct.
2295 * trans-stmt.c (ADD_FIELD): Ditto.
2297 (gfc_get_derived_type): Ditto. Don't create backend_decl for C_PTR's
2299 (gfc_add_field_to_struct_1): Set TYPE_FIELDS(context) instead of
2300 fieldlist, remove fieldlist from argument list.
2301 (gfc_add_field_to_struct): Update call to gfc_add_field_to_struct_1
2302 and remove fieldlist from argument list.
2303 (gfc_get_desc_dim_type, gfc_get_array_descriptor_base,
2304 gfc_get_mixed_entry_union): Move setting
2305 TYPE_FIELDS to gfc_add_field_to_struct_1 and update calls to it.
2306 * trans-types.h (gfc_add_field_to_struct): Update prototype.
2308 2010-07-10 Paul Thomas <pault@gcc.gnu.org>
2311 * trans-expr.c (arrayfunc_assign_needs_temporary): No temporary
2312 if the lhs has never been host associated, as well as not being
2313 use associated, a pointer or a target.
2314 * resolve.c (resolve_variable): Mark variables that are host
2316 * gfortran.h: Add the host_assoc bit to the symbol_attribute
2319 2010-07-09 Janus Weil <janus@gcc.gnu.org>
2321 * intrinsic.texi: Add documentation for SAME_TYPE_AS, EXTENDS_TYPE_OF,
2322 STORAGE_SIZE, C_NULL_PTR and C_NULL_FUNPTR. Modify documentation of
2323 SIZEOF and C_SIZEOF.
2325 2010-07-08 Janus Weil <janus@gcc.gnu.org>
2328 * gfortran.h (gfc_isym_id): Add GFC_ISYM_C_SIZEOF,GFC_ISYM_STORAGE_SIZE.
2329 * intrinsic.h (gfc_check_c_sizeof,gfc_check_storage_size,
2330 gfc_resolve_storage_size): New prototypes.
2331 * check.c (gfc_check_c_sizeof,gfc_check_storage_size): New functions.
2332 * intrinsic.c (add_functions): Add STORAGE_SIZE.
2333 * iresolve.c (gfc_resolve_storage_size): New function.
2334 * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): Handle polymorphic
2336 (gfc_conv_intrinsic_storage_size): New function.
2337 (gfc_conv_intrinsic_function): Handle STORAGE_SIZE.
2339 2010-07-08 Jakub Jelinek <jakub@redhat.com>
2342 * match.c (match_exit_cycle): Error on EXIT also from collapsed
2343 !$omp do loops. Error on CYCLE to non-innermost collapsed
2346 2010-07-08 Tobias Burnus <burnus@net-b.de>
2349 * array.c (gfc_match_array_ref): Better error message for
2350 coarrays with too few ranks.
2351 (match_subscript): Move one diagnostic to caller.
2352 * gfortran.h (gfc_get_corank): Add prottype.
2353 * expr.c (gfc_get_corank): New function.
2354 * iresolve.c (resolve_bound): Fix rank for cobounds.
2355 (gfc_resolve_lbound,gfc_resolve_lcobound, gfc_resolve_ubound,
2356 gfc_resolve_ucobound, gfc_resolve_this_image): Update
2359 2010-07-06 Tobias Burnus <burnus@net-b.de>
2362 * array.c (gfc_expand_constructor): Add optional diagnostic.
2363 * gfortran.h (gfc_expand_constructor): Update prototype.
2364 * expr.c (gfc_simplify_expr, check_init_expr,
2365 gfc_reduce_init_expr): Update gfc_expand_constructor call.
2366 * resolve.c (gfc_resolve_expr): Ditto.
2368 2010-07-06 Tobias Burnus <burnus@net-b.de>
2370 * trans-decl.c: Include diagnostic-core.h besides toplev.h.
2371 * trans-intrinsic.c: Ditto.
2372 * trans-types.c: Ditto.
2373 * convert.c: Include diagnostic-core.h instead of toplev.h.
2375 * trans-array.c: Ditto.
2376 * trans-const.c: Ditto.
2377 * trans-expr.c: Ditto.
2378 * trans-io.c: Ditto.
2379 * trans-openmp.c: Ditto.
2382 2010-07-06 Thomas Koenig <tkoenig@gcc.gnu.org>
2385 * check.c (dim_rank_check): Also check intrinsic functions.
2386 Adjust permissible rank for functions which reduce the rank of
2387 their argument. Spread is an exception, where DIM can
2388 be one larger than the rank of array.
2390 2010-07-05 Steven G. Kargl <kargl@gcc.gnu.org>
2393 * fortran/io.c (resolve_tag): Check EXIST tag is a default logical.
2395 2010-07-05 Paul Thomas <pault@gcc.gnu.org>
2398 * trans-types.c (gfc_get_derived_type): Derived type fields
2399 with the vtype attribute must have TYPE_REF_CAN_ALIAS_ALL set
2400 but build_pointer_type_for_mode must be used for this.
2402 2010-07-05 Nathan Froyd <froydnj@codesourcery.com>
2404 * trans.h (gfc_conv_procedure_call): Take a VEC instead of a tree.
2405 * trans-intrinsic.c (gfc_conv_intrinsic_funcall): Adjust for new
2406 type of gfc_conv_procedure_call.
2407 (conv_generic_with_optional_char_arg): Likewise.
2408 * trans-stmt.c (gfc_trans_call): Likewise.
2409 * trans-expr.c (gfc_conv_function_expr): Likewise.
2410 (gfc_conv_procedure_call): Use build_call_vec instead of
2413 2010-07-04 Daniel Kraft <d@domob.eu>
2415 * gfc-internals.texi (gfc_code): Document BLOCK and ASSOCIATE.
2417 2010-07-04 Paul Thomas <pault@gcc.gnu.org>
2421 * trans-types.c (gfc_get_derived_type): Derived type fields
2422 with the vtype attribute must have TYPE_REF_CAN_ALIAS_ALL set.
2424 2010-07-02 Mikael Morin <mikael@gcc.gnu.org>
2427 * decl.c (match_procedure_in_type): Clear structure before using.
2428 (gfc_match_generic): Ditto.
2430 2010-07-02 Nathan Froyd <froydnj@codesourcery.com>
2432 * trans-types.h (gfc_add_field_to_struct): Add tree ** parameter.
2433 * trans-types.c (gfc_add_field_to_struct_1): New function, most
2434 of which comes from...
2435 (gfc_add_field_to_struct): ...here. Call it. Add new parameter.
2436 (gfc_get_desc_dim_type): Call gfc_add_field_to_struct_1 for
2438 (gfc_get_array_descriptor_base): Likewise.
2439 (gfc_get_mixed_entry_union): Likewise.
2440 (gfc_get_derived_type): Add extra chain parameter for
2441 gfc_add_field_to_struct.
2442 * trans-stmt.c (gfc_trans_character_select): Likewise.
2443 * trans-io.c (gfc_build_st_parameter): Likewise.
2445 2010-06-29 Janus Weil <janus@gcc.gnu.org>
2448 * resolve.c (is_external_proc): Prevent procedure pointers from being
2449 regarded as external procedures.
2451 2010-06-29 Janus Weil <janus@gcc.gnu.org>
2454 * trans-intrinsic.c (gfc_conv_associated): Handle polymorphic variables
2455 passed as second argument of ASSOCIATED.
2457 2010-06-29 Paul Thomas <pault@gcc.gnu.org>
2460 * trans-expr.c (arrayfunc_assign_needs_temporary): New function
2461 to determine if a function assignment can be made without a
2463 (gfc_trans_arrayfunc_assign): Move all the conditions that
2464 suppress the direct function call to the above new functon and
2467 2010-06-28 Paul Thomas <pault@gcc.gnu.org>
2470 * interface.c (argument_rank_mismatch): New function.
2471 (compare_parameter): Call new function instead of generating
2474 2010-06-28 Nathan Froyd <froydnj@codesourcery.com>
2476 * trans-openmp.c (dovar_init): Define. Define VECs containing it.
2477 (gfc_trans_omp_do): Use a VEC to accumulate variables and their
2480 2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
2482 * Make-lang.in: Update dependencies.
2484 2010-06-27 Nathan Froyd <froydnj@codesourcery.com>
2486 * gfortran.h (gfc_code): Split backend_decl field into cycle_label
2487 and exit_label fields.
2488 * trans-openmp.c (gfc_trans_omp_do): Assign to new fields
2490 * trans-stmt.c (gfc_trans_simple_do): Likewise.
2491 (gfc_trans_do): Likewise.
2492 (gfc_trans_do_while): Likewise.
2493 (gfc_trans_cycle): Use cycle_label directly.
2494 (gfc_trans_exit): Use exit_label directly.
2496 2010-06-27 Daniel Kraft <d@domob.eu>
2498 * dump-parse-tree.c (show_symbol): Dump target-expression for
2500 (show_code_node): Make distinction between BLOCK and ASSOCIATE.
2501 (show_namespace): Use show_level for correct indentation of
2502 "inner namespaces" (contained procedures or BLOCK).
2504 2010-06-27 Thomas Koenig <tkoenig@gcc.gnu.org>
2507 * dump-parse-tree.c (show_code_node): Show namespace for
2510 2010-06-26 Tobias Burnus <burnus@net-b.de>
2512 * decl.c (gfc_match_decl_type_spec): Support
2513 TYPE(intrinsic-type-spec).
2515 2010-06-25 Tobias Burnus <burnus@net-b.de>
2517 * intrinsic.h (gfc_check_selected_real_kind,
2518 gfc_simplify_selected_real_kind): Update prototypes.
2519 * intrinsic.c (add_functions): Add radix support to
2521 * check.c (gfc_check_selected_real_kind): Ditto.
2522 * simplify.c (gfc_simplify_selected_real_kind): Ditto.
2523 * trans-decl.c (gfc_build_intrinsic_function_decls):
2524 Change call from selected_real_kind to selected_real_kind2008.
2525 * intrinsic.texi (SELECTED_REAL_KIND): Update for radix.
2526 (PRECISION, RANGE, RADIX): Add cross @refs.
2528 2010-06-25 Tobias Burnus <burnus@net-b.de>
2530 * decl.c (gfc_match_entry): Mark ENTRY as GFC_STD_F2008_OBS.
2531 * gfortran.texi (_gfortran_set_options): Update for
2532 GFC_STD_F2008_OBS addition.
2533 * libgfortran.h: Add GFC_STD_F2008_OBS.
2534 * options.c (set_default_std_flags, gfc_handle_option): Handle
2536 io.c (check_format): Fix allow_std check.
2538 2010-06-25 Tobias Burnus <burnus@net-b.de>
2540 * decl.c (gfc_match_entry): Allow END besides
2541 END SUBROUTINE/END FUNCTION for contained procedures.
2543 2010-06-25 Tobias Burnus <burnus@net-b.de>
2545 * parse.c (next_free, next_fixed): Allow ";" as first character.
2547 2010-06-24 Tobias Burnus <burnus@net-b.de>
2550 * decl.c (variable_decl): Fix IMPORT diagnostic for CLASS.
2552 2010-06-22 Janus Weil <janus@gcc.gnu.org>
2555 * resolve.c (resolve_fl_derived): Avoid checking for abstract on class
2558 2010-06-21 Tobias Burnus <burnus@net-b.de>
2561 * interface.c (compare_parameter): Add gfc_is_simply_contiguous
2563 * symbol.c (gfc_add_contiguous): New function.
2564 (gfc_copy_attr, check_conflict): Handle contiguous attribute.
2565 * decl.c (match_attr_spec): Ditto.
2566 (gfc_match_contiguous): New function.
2567 * resolve.c (resolve_fl_derived, resolve_symbol): Handle
2569 * gfortran.h (symbol_attribute): Add contiguous.
2570 (gfc_is_simply_contiguous): Add prototype.
2571 (gfc_add_contiguous): Add prototype.
2572 * match.h (gfc_match_contiguous): Add prototype.
2573 * parse.c (decode_specification_statement,
2574 decode_statement): Handle contiguous attribute.
2575 * expr.c (gfc_is_simply_contiguous): New function.
2576 * dump-parse-tree.c (show_attr): Handle contiguous.
2577 * module.c (ab_attribute, attr_bits, mio_symbol_attribute):
2579 * trans-expr.c (gfc_add_interface_mapping): Copy
2581 * trans-array.c (gfc_conv_descriptor_stride_get,
2582 gfc_conv_array_parameter): Handle contiguous arrays.
2583 * trans-types.c (gfc_build_array_type, gfc_build_array_type,
2584 gfc_sym_type, gfc_get_derived_type, gfc_get_array_descr_info):
2586 * trans.h (gfc_array_kind): Ditto.
2587 * trans-decl.c (gfc_get_symbol_decl): Ditto.
2589 2010-06-20 Joseph Myers <joseph@codesourcery.com>
2591 * options.c (gfc_handle_option): Don't handle N_OPTS.
2593 2010-06-19 Janus Weil <janus@gcc.gnu.org>
2596 * resolve.c (resolve_fl_derived): Reverse ordering of conditions
2599 2010-06-18 Tobias Burnus <burnus@net-b.de>
2602 * resolve.c (resolve_allocate_deallocate): Properly check
2603 part-refs in stat=/errmsg= for invalid use.
2605 2010-06-17 Janus Weil <janus@gcc.gnu.org>
2608 * resolve.c (resolve_typebound_function,resolve_typebound_subroutine):
2609 Return directly in case of an error.
2611 2010-06-16 Janus Weil <janus@gcc.gnu.org>
2614 * gfortran.h (gfc_get_typebound_proc): Modified Prototype.
2615 * decl.c (match_procedure_in_type): Give a unique gfc_typebound_proc
2616 structure to each procedure in a procedure list.
2617 * module.c (mio_typebound_proc): Add NULL argument to
2618 'gfc_get_typebound_proc'.
2619 * symbol.c (gfc_get_typebound_proc): Add a new argument, which is used
2620 to initialize the new structure.
2622 2010-06-15 Janus Weil <janus@gcc.gnu.org>
2625 * gfortran.h (gfc_expr): Add new member 'mold'.
2626 * match.c (gfc_match_allocate): Implement the MOLD tag.
2627 * resolve.c (resolve_allocate_expr): Ditto.
2628 * trans-stmt.c (gfc_trans_allocate): Ditto.
2630 2010-06-15 Jakub Jelinek <jakub@redhat.com>
2633 * trans-openmp.c (gfc_omp_predetermined_sharing): Don't return
2634 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with
2635 GFC_DECL_SAVED_DESCRIPTOR set.
2636 (gfc_omp_report_decl): New function.
2637 * trans.h (gfc_omp_report_decl): New prototype.
2638 * f95-lang.c (LANG_HOOKS_OMP_REPORT_DECL): Redefine.
2640 2010-06-13 Daniel Franke <franke.daniel@gmail.com>
2644 * gfortranspec.c (lang_specific_driver): Removed deprecation
2646 * lang.opt: Add options -M, -MM, -MD, -MMD, -MF, -MG, -MP, -MT, -MQ.
2647 * lang-specs.h (CPP_FORWARD_OPTIONS): Add -M* options.
2648 * cpp.h (gfc_cpp_makedep): New.
2649 (gfc_cpp_add_dep): New.
2650 (gfc_cpp_add_target): New.
2651 * cpp.c (gfc_cpp_option): Add deps* members.
2652 (gfc_cpp_makedep): New.
2653 (gfc_cpp_add_dep): New.
2654 (gfc_cpp_add_target): New.
2655 (gfc_cpp_init_options): Initialize new options.
2656 (gfc_cpp_handle_option): Handle new options.
2657 (gfc_cpp_post_options): Map new options to libcpp-options.
2658 (gfc_cpp_init): Handle deferred -MQ and -MT options.
2659 (gfc_cpp_done): If requested, write dependencies to file.
2660 * module.c (gfc_dump_module): Add a module filename as target.
2661 * scanner.c (open_included_file): New parameter system; add the
2662 included file as dependency.
2663 (gfc_open_included_file): Add the included file as dependency.
2664 (gfc_open_intrinsic_module): Likewise.
2665 * invoke.texi: Removed deprecation warning for -M.
2666 * gfortran.texi: Removed Makefile-dependencies project.
2668 2010-06-12 Daniel Franke <franke.daniel@gmail.com>
2670 * resolve.c (resolve_global_procedure): Improved checking if an
2671 explicit interface is required.
2673 2010-06-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2675 * trans-decl.c (gfc_build_intrinsic_function_decls): Fix
2677 * trans-intrinsic.c (gfc_conv_intrinsic_fdate): Fix argument type.
2678 (gfc_conv_intrinsic_ttynam): Likewise.
2679 (gfc_conv_intrinsic_trim): Likewise.
2681 2010-06-12 Janus Weil <janus@gcc.gnu.org>
2684 * decl.c (match_procedure_in_type): Allow procedure lists (F08).
2686 2010-06-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2688 * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Fix comment.
2690 2010-06-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2692 * mathbuiltins.def: Add builtins that do not directly correspond
2693 to a Fortran intrinsic, with new macro OTHER_BUILTIN.
2694 * f95-lang.c (gfc_init_builtin_functions): Define OTHER_BUILTIN.
2695 * trans-intrinsic.c (gfc_intrinsic_map_t): Remove
2696 code_{r,c}{4,8,10,16} fields. Add
2697 {,complex}{float,double,long_double}_built_in fields.
2698 (gfc_intrinsic_map): Adjust definitions of DEFINE_MATH_BUILTIN,
2699 DEFINE_MATH_BUILTIN_C and LIB_FUNCTION accordingly. Add
2700 definition of OTHER_BUILTIN.
2701 (real_compnt_info): Remove unused struct.
2702 (builtin_decl_for_precision, builtin_decl_for_float_kind): New
2704 (build_round_expr): Call builtin_decl_for_precision instead of
2706 (gfc_conv_intrinsic_aint): Call builtin_decl_for_float_kind
2707 instead of a switch.
2708 (gfc_build_intrinsic_lib_fndecls): Match
2709 {real,complex}{4,8,10,16}decl into the C-style built_in_decls.
2710 (gfc_get_intrinsic_lib_fndecl): Do not hardcode floating-point
2712 (gfc_conv_intrinsic_lib_function): Go through all the extended
2714 (gfc_trans_same_strlen_check): Call builtin_decl_for_float_kind
2715 instead of a switch.
2716 (gfc_conv_intrinsic_abs): Likewise.
2717 (gfc_conv_intrinsic_mod): Likewise.
2718 (gfc_conv_intrinsic_sign): Likewise.
2719 (gfc_conv_intrinsic_fraction): Likewise.
2720 (gfc_conv_intrinsic_nearest): Likewise.
2721 (gfc_conv_intrinsic_spacing): Likewise.
2722 (gfc_conv_intrinsic_rrspacing): Likewise.
2723 (gfc_conv_intrinsic_scale): Likewise.
2724 (gfc_conv_intrinsic_set_exponent): Likewise.
2726 2010-06-11 Paul Thomas <pault@gcc.gnu.org>
2730 * trans-expr.c (gfc_conv_derived_to_class): Handle array-valued
2731 functions with CLASS formal arguments.
2733 2010-06-10 Janus Weil <janus@gcc.gnu.org>
2736 * resolve.c (conformable_arrays): Handle allocatable components.
2738 2010-06-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2741 * gfortran.texi: Document that Cray pointers cannot be function
2744 2010-06-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2747 * gfortran.texi: Document lack of support for syntax
2748 "complex FUNCTION name*16()", and existence of alternative
2749 legacy syntax "complex*16 FUNCTION name()".
2751 2010-06-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2754 * intrinsic.texi (FLUSH): Note the difference between FLUSH and
2755 POSIX's fsync(), and how to call the latter from Fortran code.
2757 2010-06-10 Daniel Franke <franke.daniel@gmail.com>
2760 * interface.c (compare_actual_formal): Reject actual arguments with
2761 array subscript passed to ASYNCHRONOUS dummys.
2763 2010-06-10 Daniel Kraft <d@domob.eu>
2766 * gfortran.h (enum gfc_statement): Add ST_ASSOCIATE, ST_END_ASSOCIATE.
2767 (struct gfc_symbol): New field `assoc'.
2768 (struct gfc_association_list): New struct.
2769 (struct gfc_code): New struct `block' in union, move `ns' there
2770 and add association list.
2771 (gfc_free_association_list): New method.
2772 (gfc_has_vector_subscript): Made public;
2773 * match.h (gfc_match_associate): New method.
2774 * parse.h (enum gfc_compile_state): Add COMP_ASSOCIATE.
2775 * decl.c (gfc_match_end): Handle ST_END_ASSOCIATE.
2776 * interface.c (gfc_has_vector_subscript): Made public.
2777 (compare_actual_formal): Rename `has_vector_subscript' accordingly.
2778 * match.c (gfc_match_associate): New method.
2779 (gfc_match_select_type): Change reference to gfc_code's `ns' field.
2780 * primary.c (match_variable): Don't allow names associated to expr here.
2781 * parse.c (decode_statement): Try matching ASSOCIATE statement.
2782 (case_exec_markers, case_end): Add ASSOCIATE statement.
2783 (gfc_ascii_statement): Hande ST_ASSOCIATE and ST_END_ASSOCIATE.
2784 (parse_associate): New method.
2785 (parse_executable): Handle ST_ASSOCIATE.
2786 (parse_block_construct): Change reference to gfc_code's `ns' field.
2787 * resolve.c (resolve_select_type): Ditto.
2788 (resolve_code): Ditto.
2789 (resolve_block_construct): Ditto and add comment.
2790 (resolve_select_type): Set association list in generated BLOCK to NULL.
2791 (resolve_symbol): Resolve associate names.
2792 * st.c (gfc_free_statement): Change reference to gfc_code's `ns' field
2793 and free association list.
2794 (gfc_free_association_list): New method.
2795 * symbol.c (gfc_new_symbol): NULL new field `assoc'.
2796 * trans-stmt.c (gfc_trans_block_construct): Change reference to
2797 gfc_code's `ns' field.
2799 2010-06-10 Kai Tietz <kai.tietz@onevision.com>
2801 * error.c (error_print): Pre-initialize loc by NULL.
2802 * openmp.c (resolve_omp_clauses): Add explicit
2803 braces to avoid ambigous else.
2804 * array.c (match_subscript): Pre-initialize m to MATCH_ERROR.
2806 2010-06-10 Gerald Pfeifer <gerald@pfeifer.com>
2808 * gfc-internals.texi: Move to GFDL 1.3.
2809 * gfortran.texi: Ditto.
2810 * intrinsic.texi: Ditto.
2811 * invoke.texi: Ditto.
2813 2010-06-09 Daniel Franke <franke.daniel@gmail.com>
2816 * check.c (gfc_check_selected_real_kind): Verify that the
2817 actual arguments are scalar.
2819 2010-06-09 Daniel Franke <franke.daniel@gmail.com>
2822 * intrinsic.c (gfc_convert_type_warn): Further improve -Wconversion.
2824 2010-06-09 Janus Weil <janus@gcc.gnu.org>
2827 * dump-parse-tree.c (show_symbol): Avoid infinite loop.
2829 2010-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
2831 * fortran/symbol.c (check_conflict): Remove an invalid conflict check.
2833 2010-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
2835 * fortran/intrinsic.c (add_functions): Change gfc_check_btest,
2836 gfc_check_ibclr, and gfc_check_ibset to gfc_check_bitfcn.
2837 * fortran/intrinsic.h: Remove prototypes for gfc_check_btest,
2838 gfc_check_ibclr, and gfc_check_ibset. Add prototype for
2840 * fortran/check.c (nonnegative_check, less_than_bitsize1,
2841 less_than_bitsize2): New functions.
2842 (gfc_check_btest): Renamed to gfc_check_bitfcn. Use
2843 nonnegative_check and less_than_bitsize1.
2844 (gfc_check_ibclr, gfc_check_ibset): Removed.
2845 (gfc_check_ibits,gfc_check_mvbits): Use nonnegative_check and
2848 2010-06-09 Janus Weil <janus@gcc.gnu.org>
2851 * resolve.c (resolve_typebound_function,resolve_typebound_subroutine):
2854 2010-06-09 Kai Tietz <kai.tietz@onevision.com>
2856 * resolve.c (resolve_deallocate_expr): Avoid warning
2857 about possible use of iunitialized sym.
2858 (resolve_allocate_expr): Pre-initialize sym by NULL.
2860 2010-06-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2863 * f95-lang.c (gfc_init_builtin_functions): Remove comment.
2865 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
2867 * trans-types.c (gfc_get_nodesc_array_type): Use typed GC
2869 (gfc_get_array_type_bounds): Likewise.
2871 * trans-decl.c (gfc_allocate_lang_decl): Likewise.
2872 (gfc_find_module): Likewise.
2874 * f95-lang.c (pushlevel): Likewise.
2876 * trans.h (struct lang_type): Add variable_size GTY option.
2877 (struct lang_decl): Likewise.
2879 2010-06-08 Tobias Burnus <burnus@net-b.de>
2882 * symbol.c (check_conflict): Move protected--external/procedure check ...
2883 * resolve.c (resolve_select_type): ... to the resolution stage.
2885 2010-06-07 Tobias Burnus <burnus@net-b.de>
2887 * options.c (gfc_handle_option): Fix -fno-recursive.
2889 2010-06-07 Tobias Burnus <burnus@net-b.de>
2891 * gfc-internals.texi (copyrights-gfortran): Fix copyright year format.
2892 * gfortran.texi (copyrights-gfortran): Ditto.
2894 2010-06-07 Joseph Myers <joseph@codesourcery.com>
2896 * lang.opt (fshort-enums): Define using Var and VarExists.
2897 * options.c (gfc_handle_option): Don't set flag_short_enums here.
2899 2010-06-05 Paul Thomas <pault@gcc.gnu.org>
2900 Janus Weil <janus@gcc.gnu.org>
2903 * resolve.c (get_declared_from_expr): Move to before
2904 resolve_typebound_generic_call. Make new_ref and class_ref
2905 ignorable if set to NULL.
2906 (resolve_typebound_generic_call): Once we have resolved the
2907 generic call, check that the specific instance is that which
2908 is bound to the declared type.
2909 (resolve_typebound_function,resolve_typebound_subroutine): Avoid
2910 freeing 'class_ref->next' twice.
2912 2010-06-05 Paul Thomas <pault@gcc.gnu.org>
2915 * trans-array.c (structure_alloc_comps): Dereference scalar
2916 'decl' if it is a REFERENCE_TYPE. Tidy expressions containing
2919 2010-06-04 Joseph Myers <joseph@codesourcery.com>
2921 * gfortranspec.c (append_arg, lang_specific_driver): Use
2922 GCC-specific formats in diagnostics.
2924 2010-06-02 Tobias Burnus <burnus@net-b.de>
2927 * parse.c (gfc_fixup_sibling_symbols): Do not "fix" use-associated
2930 2010-06-01 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2933 * match.c (gfc_match_stopcode): Move gfc_match_eos call inside
2936 2010-05-31 Steven G. Kargl <kargl@gcc.gnu.org>
2938 * fortran/gfortran.texi: Fix typos in description of variable-format-
2941 2010-05-31 Thomas Koenig <tkoenig@gcc.gnu.org>
2944 * dependency.c (gfc_check_section_vs_section): Check
2945 for interleaving array assignments without conflicts.
2947 2010-05-30 Janus Weil <janus@gcc.gnu.org>
2949 * gcc/fortran/gfortran.h (CLASS_DATA): New macro for accessing the
2950 $data component of a class container.
2951 * gcc/fortran/decl.c (attr_decl1): Use macro CLASS_DATA.
2952 * gcc/fortran/expr.c (gfc_check_pointer_assign,gfc_check_assign_symbol,
2953 gfc_has_ultimate_allocatable,gfc_has_ultimate_pointer): Ditto.
2954 * gcc/fortran/interface.c (matching_typebound_op): Ditto.
2955 * gcc/fortran/match.c (gfc_match_allocate, gfc_match_deallocate): Ditto.
2956 * gcc/fortran/parse.c (parse_derived): Ditto.
2957 * gcc/fortran/primary.c (gfc_match_varspec, gfc_variable_attr,
2958 gfc_expr_attr): Ditto.
2959 * gcc/fortran/resolve.c (resolve_structure_cons, find_array_spec,
2960 resolve_deallocate_expr, resolve_allocate_expr, resolve_select_type,
2961 resolve_fl_var_and_proc, resolve_typebound_procedure,
2962 resolve_fl_derived): Ditto.
2963 * gcc/fortran/symbol.c (gfc_type_compatible): Restructured.
2964 * gcc/fortran/trans-array.c (structure_alloc_comps): Use macro
2966 * gcc/fortran/trans-decl.c (gfc_get_symbol_decl,
2967 gfc_trans_deferred_vars): Ditto.
2968 * gcc/fortran/trans-stmt.c (gfc_trans_allocate): Ditto.
2970 2010-05-28 Tobias Burnus <burnus@net-b.de>
2972 * options.c (gfc_handle_option): Fix handling of -fno-whole-file.
2974 2010-05-28 Joseph Myers <joseph@codesourcery.com>
2976 * gfortranspec.c (append_arg, lang_specific_driver): Use
2977 fatal_error instead of fatal. Use warning instead of fprintf for
2980 2010-05-28 Joseph Myers <joseph@codesourcery.com>
2982 * cpp.c (gfc_cpp_init_0): Use xstrerror instead of strerror.
2983 * module.c (write_char, gfc_dump_module, gfc_use_module): Use
2984 xstrerror instead of strerror.
2986 2010-05-26 Joseph Myers <joseph@codesourcery.com>
2988 * cpp.c (cb_cpp_error): Save and restore
2989 global_dc->warn_system_headers, not variable warn_system_headers.
2991 2010-05-26 Steven Bosscher <steven@gcc.gnu.org>
2993 * fortran/f95-lang.c: Do not include libfuncs.h, expr.h, and except.h.
2995 2010-05-26 Steven Bosscher <steven@gcc.gnu.org>
2997 * trans-common.c: Do not include rtl.h, include output.h instead.
2998 * trans-decl.c: Likewise.
3000 2010-05-26 Paul Thomas <pault@gcc.gnu.org>
3003 * resolve.c (resolve_global_procedure): Resolve the gsymbol's
3004 namespace before trying to reorder the gsymbols.
3006 2010-05-25 Daniel Franke <franke.daniel@gmail.com>
3011 * resolve.c (resolve_global_procedure): Add check for global
3012 procedures with implicit interfaces and assumed-shape or optional
3013 dummy arguments. Verify that function return type, kind and string
3016 2010-05-21 Tobias Burnus <burnus@net-b.de>
3018 * gfortran.h: Do not include system.h.
3019 * bbt.c: Include system.h.
3021 * dependency.c: Ditto.
3022 * dump-parse-tree.c: Ditto.
3023 * arith.h: Do not include gfortran.h.
3024 * constructor.h: Do not include gfortran.h and splay-tree.h.
3025 * match.h: Do not include gfortran.h.
3027 * target-memory.h: Ditto.
3028 * openmp.c: Do not include toplev.h and target.h.
3029 * trans-stmt.c: Ditto not include toplev.h.
3031 * trans-common.c: Tell why toplev.h is needed. And
3032 do not include target.h.
3033 * trans-expr.c: Tell why toplev.h is needed.
3034 * trans-array.c: Ditto.
3035 * trans-openmp.c: Ditto.
3036 * trans-const.c: Ditto.
3038 * trans-types.c: Ditto.
3039 * trans-io.c: Ditto.
3040 * trans-decl.c: Ditto.
3043 * trans-intrinsic.c: Ditto.
3046 2010-05-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3049 * match.c (gfc_match_stopcode): Use gfc_match_init_expr. Go to cleanup
3050 before returning MATCH_ERROR. Add check for scalar. Add check for
3051 default integer kind.
3053 2010-05-22 Janus Weil <janus@gcc.gnu.org>
3056 * match.c (gfc_match_select_type): On error jump back out of the local
3058 * parse.c (parse_derived): Defer creation of vtab symbols to resolution
3059 stage, more precisely to ...
3060 * resolve.c (resolve_fl_derived): ... this place.
3062 2010-05-22 Janus Weil <janus@gcc.gnu.org>
3065 * resolve.c (ensure_not_abstract): Allow abstract types with
3066 non-abstract ancestors.
3068 2010-05-21 Steven Bosscher <steven@gcc.gnu.org>
3070 * trans-const.c: Include realmpfr.h.
3071 * Make-lang.in: Update dependencies.
3073 2010-05-21 Steven Bosscher <steven@gcc.gnu.org>
3075 * trans-const.c, trans-types.c, trans-intrinsic.c:
3076 Clean up redundant includes.
3078 2010-05-20 Daniel Franke <franke.daniel@gmail.com>
3081 * lang.opt (Wunused-dummy-argument): New option.
3082 * gfortran.h (gfc_option_t): Add warn_unused_dummy_argument.
3083 * options.c (gfc_init_options): Disable warn_unused_dummy_argument.
3084 (set_Wall): Enable warn_unused_dummy_argument.
3085 (gfc_handle_option): Set warn_unused_dummy_argument according to
3087 * trans-decl.c (generate_local_decl): Separate warnings about
3088 unused variables and unused dummy arguments.
3089 * invoke.texi: Documented new option.
3091 2010-05-20 Steven Bosscher <steven@gcc.gnu.org>
3093 * trans-expr.c: Do not include convert.h, ggc.h, real.h, and gimple.h.
3094 (gfc_conv_string_tmp): Do not assert type comparibilty.
3095 * trans-array.c: Do not include gimple.h, ggc.h, and real.h.
3096 (gfc_conv_expr_descriptor): Remove assert.
3097 * trans-common.c: Clarify why rtl.h and tm.h are included.
3098 * trans-openmp.c: Do not include ggc.h and real.h.
3099 Explain why gimple.h is included.
3100 * trans-const.c: Do not include ggc.h.
3101 * trans-stmt.c: Do not include gimple.h, ggc.h, and real.h.
3102 * trans.c: Do not include ggc.h and real.h.
3103 Explain why gimple.h is included.
3104 * trans-types.c: Do not include tm.h. Explain why langhooks.h
3105 and dwarf2out.h are included.
3106 * trans-io.c: Do not include gimple.h and real.h.
3107 * trans-decl.c: Explain why gimple.h, tm.h, and rtl.h are included.
3108 * trans-intrinsic.c: Do not include gimple.h. Explain why tm.h
3111 2010-05-20 Tobias Burnus <burnus@net-b.de>
3113 * options.c (gfc_init_options,gfc_post_options): Enable
3114 flag_associative_math by default.
3116 2010-05-19 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3119 * trans-stmt.c (gfc_trans_stop): Add generation of call to
3120 gfortran_error_stop_numeric. Fix up some whitespace. Use stop_string for
3121 blank STOP, handling a null expression. (gfc_trans_pause): Use
3122 pause_string for blank PAUSE.
3123 * trans.h: Add external function declaration for error_stop_numeric.
3124 * trans-decl.c (gfc_build_builtin_function_decls): Add the building of
3125 the declaration for the library call. Adjust whitespaces.
3126 * match.c (gfc_match_stopcode): Remove use of the actual stop code to
3127 signal no stop code. Match the expression following the stop and pass
3128 that to the translators. Remove the old use of digit matching. Add
3129 checks that the stop_code expression is INTEGER or CHARACTER, constant,
3130 and if CHARACTER, default character KIND.
3132 2010-05-19 Daniel Franke <franke.daniel@gmail.com>
3135 * lang.opt (Wconversion-extra): New option.
3136 * gfortran.h (gfc_option_t): Add warn_conversion_extra.
3137 * options.c (gfc_init_options): Disable -Wconversion-extra by default.
3138 (set_Wall): Enable -Wconversion.
3139 (gfc_handle_option): Set warn_conversion_extra.
3140 * intrinsic.c (gfc_convert_type_warn): Ignore kind conditions
3141 introduced for -Wconversion if -Wconversion-extra is present.
3142 * invoke.texi: Add -Wconversion to -Wall; document new behaviour of
3143 -Wconversion; document -Wconversion-extra.
3145 2010-05-19 Daniel Franke <franke.daniel@gmail.com>
3148 * gfortran.h (gfc_has_default_initializer): New.
3149 * expr.c (gfc_has_default_initializer): New.
3150 * resolve.c (has_default_initializer): Removed, use
3151 gfc_has_default_initializer() instead. Updated all callers.
3152 * trans-array.c (has_default_initializer): Removed, use
3153 gfc_has_default_initializer() instead. Updated all callers.
3154 * trans-decl.c (generate_local_decl): Do not check the
3155 first component only to check for initializers, but use
3156 gfc_has_default_initializer() instead.
3158 2010-05-19 Daniel Franke <franke.daniel@gmail.com>
3161 * primary.c (match_string_constant): Move start_locus just inside
3163 * data.c (create_character_intializer): Clarified truncation warning.
3165 2010-05-19 Daniel Franke <franke.daniel@gmail.com>
3168 * intrinsic.h (gfc_check_float): New prototype.
3169 (gfc_check_sngl): New prototype.
3170 * check.c (gfc_check_float): New.
3171 (gfc_check_sngl): New.
3172 * intrinsic.c (add_functions): Moved DFLOAT from aliasing DBLE
3173 to be a specific for REAL. Added check routines for FLOAT, DFLOAT
3175 * intrinsic.texi: Removed individual nodes of FLOAT, DFLOAT and SNGL,
3176 added them to the list of specifics of REAL instead.
3178 2010-05-17 Janus Weil <janus@gcc.gnu.org>
3181 * trans-expr.c (gfc_conv_structure): Remove unneeded and buggy code.
3182 This is now handled via 'gfc_class_null_initializer'.
3184 2010-05-17 Janus Weil <janus@gcc.gnu.org>
3186 * class.c (gfc_add_component_ref,gfc_class_null_initializer,
3187 gfc_build_class_symbol,add_proc_component,add_proc_comps,
3188 add_procs_to_declared_vtab1,copy_vtab_proc_comps,
3189 add_procs_to_declared_vtab,add_generic_specifics,
3190 add_generics_to_declared_vtab,gfc_find_derived_vtab,
3191 find_typebound_proc_uop,gfc_find_typebound_proc,
3192 gfc_find_typebound_user_op,gfc_find_typebound_intrinsic_op,
3193 gfc_get_tbp_symtree): Moved here from other places.
3194 * expr.c (gfc_add_component_ref,gfc_class_null_initializer): Move to
3196 * gfortran.h (gfc_build_class_symbol,gfc_find_derived_vtab,
3197 gfc_find_typebound_proc,gfc_find_typebound_user_op,
3198 gfc_find_typebound_intrinsic_op,gfc_get_tbp_symtree,
3199 gfc_add_component_ref, gfc_class_null_initializer): Moved to class.c.
3200 * Make-lang.in: Add class.o.
3201 * symbol.c (gfc_build_class_symbol,add_proc_component,add_proc_comps,
3202 add_procs_to_declared_vtab1,copy_vtab_proc_comps,
3203 add_procs_to_declared_vtab,add_generic_specifics,
3204 add_generics_to_declared_vtab,gfc_find_derived_vtab,
3205 find_typebound_proc_uop,gfc_find_typebound_proc,
3206 gfc_find_typebound_user_op,gfc_find_typebound_intrinsic_op,
3207 gfc_get_tbp_symtree): Move to class.c.
3209 2010-05-17 Nathan Froyd <froydnj@codesourcery.com>
3211 * trans-types.c (gfc_init_types): Use build_function_type_list.
3212 (gfc_get_ppc_type): Likewise.
3213 * trans-decl.c (gfc_generate_constructors): Likewise.
3214 * f95-lang.c (build_builtin_fntypes): Likewise.
3215 (gfc_init_builtin_functions): Likewise.
3216 (DEF_FUNCTION_TYPE_0): Likewise.
3217 (DEF_FUNCTION_TYPE_1): Likewise.
3218 (DEF_FUNCTION_TYPE_2): Likewise.
3219 (DEF_FUNCTION_TYPE_3): Likewise.
3220 (DEF_FUNCTION_TYPE_4): Likewise.
3221 (DEF_FUNCTION_TYPE_5): Likewise.
3222 (DEF_FUNCTION_TYPE_6): Likewise.
3223 (DEF_FUNCTION_TYPE_7): Likewise. Use ARG7.
3224 (DEF_FUNCTION_TYPE_VAR_0): Use build_varags_function_type_list.
3226 2010-05-17 Nathan Froyd <froydnj@codesourcery.com>
3228 * trans-array.c (gfc_trans_array_constructor_value): Use
3229 build_constructor instead of build_constructor_from_list.
3230 (gfc_build_constant_array_constructor): Likewise.
3231 * trans-decl.c (create_main_function): Likewise.
3232 * trans-stmt.c (gfc_trans_character_select): Likewise.
3234 2010-05-17 Janus Weil <janus@gcc.gnu.org>
3237 * resolve.c (resolve_fl_var_and_proc): Move error messages here from ...
3238 (resolve_fl_variable_derived): ... this place.
3239 (resolve_symbol): Make sure function symbols (and their result
3240 variables) are not resolved twice.
3242 2010-05-16 Daniel Franke <franke.daniel@gmail.com>
3245 * array.c (match_array_list): Revert change from 2010-05-13.
3247 2010-05-16 Richard Guenther <rguenther@suse.de>
3249 * trans-decl.c (module_htab_decls_hash): Revert last change.
3251 2010-05-16 Richard Guenther <rguenther@suse.de>
3253 * trans-decl.c (module_htab_decls_hash): Use IDENTIFIER_HASH_VALUE.
3255 2010-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
3257 * options.c (set_Wall): Remove special logic for Wuninitialized
3260 2010-05-15 Janus Weil <janus@gcc.gnu.org>
3264 * trans-decl.c (gfc_trans_deferred_vars): Modify ordering of
3267 2010-05-15 Janus Weil <janus@gcc.gnu.org>
3271 * gfortran.h (gfc_class_null_initializer): New prototype.
3272 * expr.c (gfc_class_null_initializer): New function to build a NULL
3273 initializer for CLASS pointers.
3274 * symbol.c (gfc_build_class_symbol): Modify internal naming of class
3275 containers. Remove default NULL initialization of $data component.
3276 * trans.c (gfc_allocate_array_with_status): Fix wording of an error
3278 * trans-expr.c (gfc_conv_initializer,gfc_trans_subcomponent_assign):
3279 Use new function 'gfc_class_null_initializer'.
3280 * trans-intrinsic.c (gfc_conv_allocated): Handle allocatable scalar
3283 2010-05-14 Steven G. Kargl <kargl@gcc.gnu.org>
3286 * fortran/interface.c (get_sym_storage_size): Use signed instead of
3287 unsigned mpz_get_?i routines.
3289 2010-05-14 Jakub Jelinek <jakub@redhat.com>
3291 * trans.c (trans_code): Set backend locus early.
3292 * trans-decl.c (gfc_get_fake_result_decl): Use source location
3293 of the function instead of current input_location.
3295 2010-05-13 Daniel Franke <franke.daniel@gmail.com>
3298 * intrinsic.c (gfc_init_expr): Renamed to gfc_init_expr_flag.
3300 * expr.c (init_flag): Removed; use gfc_init_expr_flag everywhere.
3301 * array.c (match_array_list): Pass on gfc_init_expr_flag when matching
3304 2010-05-13 Jakub Jelinek <jakub@redhat.com>
3307 * openmp.c (resolve_omp_clauses): Allow procedure pointers in clause
3309 * trans-openmp.c (gfc_omp_privatize_by_reference): Don't privatize
3310 by reference dummy procedures or non-dummy procedure pointers.
3311 (gfc_omp_predetermined_sharing): Return
3312 OMP_CLAUSE_DEFAULT_FIRSTPRIVATE for dummy procedures.
3314 2010-05-11 Daniel Franke <franke.daniel@gmail.com>
3317 * openmp.c (gfc_match_omp_taskwait): Report unexpected characters
3318 after OMP statement.
3319 (gfc_match_omp_critical): Likewise.
3320 (gfc_match_omp_flush): Likewise.
3321 (gfc_match_omp_workshare): Likewise.
3322 (gfc_match_omp_master): Likewise.
3323 (gfc_match_omp_ordered): Likewise.
3324 (gfc_match_omp_atomic): Likewise.
3325 (gfc_match_omp_barrier): Likewise.
3326 (gfc_match_omp_end_nowait): Likewise.
3328 2010-05-11 Daniel Franke <franke.daniel@gmail.com>
3331 * resolve.c (validate_case_label_expr): Removed FIXME.
3332 (resolve_select): Raise default warning on case labels out of range
3333 of the case expression.
3335 2010-05-10 Daniel Franke <franke.daniel@gmail.com>
3340 * intrinsic.c (gfc_convert_type_warn): Be more discriminative
3341 about conversion warnings.
3343 2010-05-10 Janus Weil <janus@gcc.gnu.org>
3346 * match.c (gfc_match_select_type): Move error message to
3347 resolve_select_type.
3348 * resolve.c (resolve_select_type): Error message moved here from
3349 gfc_match_select_type. Correctly set type of temporary.
3351 2010-05-10 Richard Guenther <rguenther@suse.de>
3353 * trans-decl.c (gfc_build_library_function_decl): Split out
3355 (build_library_function_decl_1): ... this new function.
3356 Set a fnspec attribute if a specification was provided.
3357 (gfc_build_library_function_decl_with_spec): New function.
3358 (gfc_build_intrinsic_function_decls): Annotate internal_pack
3359 and internal_unpack.
3361 2010-05-07 Daniel Franke <franke.daniel@gmail.com>
3364 * intrinc.c (gfc_is_intrinsic): Do not prematurely mark symbol
3367 2010-05-07 Jason Merrill <jason@redhat.com>
3369 * trans-expr.c (gfc_conv_procedure_call): Rename nullptr to null_ptr
3370 to avoid -Wc++-compat warning.
3372 2010-05-06 Manuel López-Ibáñez <manu@gcc.gnu.org>
3375 * options.c (gfc_handle_option): Add argument kind.
3376 * gfortran.h (gfc_handle_option): Update declaration.
3378 2010-05-06 Tobias Burnus <burnus@net-b.de>
3381 * trans-types.c (gfc_sym_type): Mark Cray pointees as
3384 2010-05-05 Daniel Franke <franke.daniel@gmail.com>
3387 * resolve.c (traverse_data_list): Rephrase error message for
3388 non-constant bounds in data-implied-do.
3390 2010-05-05 Daniel Franke <franke.daniel@gmail.com>
3393 * gfortran.h: Removed repeat count from constructor, removed
3395 * data.h (gfc_assign_data_value_range): Changed return value from
3397 * data.c (gfc_assign_data_value): Add location to constructor element.
3398 (gfc_assign_data_value_range): Call gfc_assign_data_value()
3399 for each element in range. Return early if an error was generated.
3400 * resolve.c (check_data_variable): Stop early if range assignment
3403 2010-05-05 Janus Weil <janus@gcc.gnu.org>
3406 * resolve.c (resolve_fl_derived): Some fixes for class variables.
3407 * symbol.c (gfc_build_class_symbol): Add separate class container for
3410 2010-05-03 Steven G. Kargl <kargl@gcc.gnu.org>
3413 * fortran/parse.c (parse_interface): Do not dereference a NULL pointer.
3415 2010-05-02 Tobias Burnus <burnus@net-b.de>
3418 * intrinsic.c (add_functions): Fix GFC_STD and add gfc_resolve_ calls
3419 for lcobound, ucobound, image_index and this_image.
3420 * intrinsic.h (gfc_resolve_lcobound, gfc_resolve_this_image,
3421 gfc_resolve_image_index, gfc_resolve_ucobound): New prototypes.
3422 * iresolve.c (gfc_resolve_lcobound, gfc_resolve_this_image,
3423 gfc_resolve_image_index, gfc_resolve_ucobound, resolve_bound): New
3425 (gfc_resolve_lbound, gfc_resolve_ubound): Use resolve_bound.
3427 2010-04-30 Tobias Burnus <burnus@net-b.de>
3431 * trans-types.c (gfc_get_array_descriptor_base): Fix index
3432 calculation for array descriptor types.
3434 2010-04-29 Janus Weil <janus@gcc.gnu.org>
3437 * symbol.c (add_proc_component,copy_vtab_proc_comps): Remove
3438 initializers for PPC members of the vtabs.
3440 2010-04-29 Janus Weil <janus@gcc.gnu.org>
3443 * symbol.c (add_proc_component,add_proc_comps): Correctly set the 'ppc'
3444 attribute for all PPC members of the vtypes.
3445 (copy_vtab_proc_comps): Copy the correct interface.
3446 * trans.h (gfc_trans_assign_vtab_procs): Modified prototype.
3447 * trans-expr.c (gfc_trans_assign_vtab_procs): Pass the derived type as
3448 a dummy argument and make sure all PPC members of the vtab are
3449 initialized correctly.
3450 (gfc_conv_derived_to_class,gfc_trans_class_assign): Additional argument
3451 in call to gfc_trans_assign_vtab_procs.
3452 * trans-stmt.c (gfc_trans_allocate): Ditto.
3454 2010-04-29 Paul Thomas <pault@gcc.gnu.org>
3457 * resolve.c (resolve_typebound_function): Renamed
3458 resolve_class_compcall.Do all the detection of class references
3460 (resolve_typebound_subroutine): resolve_class_typebound_call
3461 renamed. Otherwise same as resolve_typebound_function.
3462 (gfc_resolve_expr): Call resolve_typebound_function.
3463 (resolve_code): Call resolve_typebound_subroutine.
3465 2010-04-29 Janus Weil <janus@gcc.gnu.org>
3468 * resolve.c (resolve_typebound_generic_call): For CLASS methods
3469 pass back the specific symtree name, rather than the target
3472 2010-04-29 Paul Thomas <pault@gcc.gnu.org>
3475 * resolve.c (resolve_structure_cons): Make the initializer of
3476 the vtab component 'extends' the same type as the component.
3478 2010-04-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3481 * interface.c (check_interface1): Pass symbol name rather than NULL to
3482 gfc_compare_interfaces.(gfc_compare_interfaces): Add assert to
3483 trap MULL. (gfc_compare_derived_types): Revert previous change
3484 incorporated incorrectly during merge from trunk, r155778.
3485 * resolve.c (check_generic_tbp_ambiguity): Pass symbol name rather
3486 than NULL to gfc_compare_interfaces.
3487 * symbol.c (add_generic_specifics): Likewise.
3489 2010-02-29 Janus Weil <janus@gcc.gnu.org>
3492 * interface.c (gfc_compare_derived_types): Add condition for vtype.
3493 * symbol.c (gfc_find_derived_vtab): Sey access to private.
3494 (gfc_find_derived_vtab): Likewise.
3495 * module.c (ab_attribute): Add enumerator AB_VTAB.
3496 (mio_symbol_attribute): Use new attribute, AB_VTAB.
3497 (check_for_ambiguous): Likewise.
3499 2010-04-29 Paul Thomas <pault@gcc.gnu.org>
3500 Janus Weil <janus@gcc.gnu.org>
3503 * trans-expr.c (select_class_proc): Remove function.
3504 (conv_function_val): Delete reference to previous.
3505 (gfc_conv_derived_to_class): Add second argument to the call to
3506 gfc_find_derived_vtab.
3507 (gfc_conv_structure): Exclude proc_pointer components when
3508 accessing $data field of class objects.
3509 (gfc_trans_assign_vtab_procs): New function.
3510 (gfc_trans_class_assign): Add second argument to the call to
3511 gfc_find_derived_vtab.
3512 * symbol.c (gfc_build_class_symbol): Add delayed_vtab arg and
3513 implement holding off searching for the vptr derived type.
3514 (add_proc_component): New function.
3515 (add_proc_comps): New function.
3516 (add_procs_to_declared_vtab1): New function.
3517 (copy_vtab_proc_comps): New function.
3518 (add_procs_to_declared_vtab): New function.
3519 (void add_generic_specifics): New function.
3520 (add_generics_to_declared_vtab): New function.
3521 (gfc_find_derived_vtab): Add second argument to the call to
3522 gfc_find_derived_vtab. Add the calls to
3523 add_procs_to_declared_vtab and add_generics_to_declared_vtab.
3524 * decl.c (build_sym, build_struct): Use new arg in calls to
3525 gfc_build_class_symbol.
3526 * gfortran.h : Add vtype bitfield to symbol_attr. Remove the
3527 definition of struct gfc_class_esym_list. Modify prototypes
3528 of gfc_build_class_symbol and gfc_find_derived_vtab.
3529 * trans-stmt.c (gfc_trans_allocate): Add second argument to the
3530 call to gfc_find_derived_vtab.
3531 * module.c : Add the vtype attribute.
3532 * trans.h : Add prototype for gfc_trans_assign_vtab_procs.
3533 * resolve.c (resolve_typebound_generic_call): Add second arg
3534 to pass along the generic name for class methods.
3535 (resolve_typebound_call): The same.
3536 (resolve_compcall): Use the second arg to carry the generic
3537 name from the above. Remove the reference to class_esym.
3538 (check_members, check_class_members, resolve_class_esym,
3539 hash_value_expr): Remove functions.
3540 (resolve_class_compcall, resolve_class_typebound_call): Modify
3541 to use vtable rather than member by member calls.
3542 (gfc_resolve_expr): Modify second arg in call to
3544 (resolve_select_type): Add second arg in call to
3545 gfc_find_derived_vtab.
3546 (resolve_code): Add second arg in call resolve_typebound_call.
3547 (resolve_fl_derived): Exclude vtypes from check for late
3548 procedure definitions. Likewise for checking of explicit
3549 interface and checking of pass arg.
3550 * iresolve.c (gfc_resolve_extends_type_of): Add second arg in
3551 calls to gfc_find_derived_vtab.
3552 * match.c (select_type_set_tmp): Use new arg in call to
3553 gfc_build_class_symbol.
3554 * trans-decl.c (gfc_get_symbol_decl): Complete vtable if
3556 * parse.c (endType): Finish incomplete classes.
3558 2010-04-28 Tobias Burnus <burnus@net-b.de>
3562 * simplify.c (simplify_cobound): Handle scalar coarrays.
3564 2010-04-27 Tobias Burnus <burnus@net-b.de>
3566 * gfc-internals.texi: Update copyright year.
3567 * gfortran.texi: Ditto.
3568 * invoke.texi: Ditto.
3570 2010-04-27 Tobias Burnus <burnus@net-b.de>
3573 * resolve.c (resolve_allocate_expr): Allow array coarrays.
3574 * trans-types.h (gfc_get_array_type_bounds): Update prototype.
3575 * trans-types.c (gfc_get_array_type_bounds,
3576 gfc_get_array_descriptor_base): Add corank argument.
3577 * trans-array.c (gfc_array_init_size): Handle corank.
3578 (gfc_trans_create_temp_array, gfc_array_allocate,
3579 gfc_conv_expr_descriptor): Add corank argument to call.
3580 * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Ditto.
3582 2010-04-24 Steven G. Kargl <kargl@gcc.gnu.org>
3586 * trans-array.c (gfc_trans_array_bound_check): Use TREE_CODE instead
3587 of mucking with a tree directly.
3589 2010-04-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3592 * io.c (gfc_match_open): Remove branch to syntax error. Add call to
3593 gfc_error with new error message.
3595 2010-04-24 Paul Thomas <pault@gcc.gnu.org>
3599 * trans-expr.c (gfc_conv_expr): Supply an address expression for
3601 (gfc_conv_expr_reference): Call gfc_conv_expr and return for
3603 * trans-array.c (gfc_add_loop_ss_code): Store the value rather
3604 than the address of a GFC_SS_REFERENCE.
3605 * trans.h : Change comment on GFC_SS_REFERENCE.
3607 2010-04-22 Richard Guenther <rguenther@suse.de>
3610 * resolve.c (gfc_resolve_index): Wrap around ...
3611 (gfc_resolve_index_1): ... this. Add parameter to allow
3612 any integer kind index type.
3613 (resolve_array_ref): Allow any integer kind for the start
3614 index of an array ref.
3616 2010-04-21 Jakub Jelinek <jakub@redhat.com>
3619 * f95-lang.c (gfc_define_builtin): Set TREE_NOTHROW on
3622 2010-04-20 Harald Anlauf <anlauf@gmx.de>
3624 * intrinsic.c (sort_actual): Remove 'is' in error message.
3626 2010-04-20 Paul Thomas <pault@gcc.gnu.org>
3629 * resolve.c (resolve_fl_derived): If a component character
3630 length has not been resolved, do so now.
3631 (resolve_symbol): The same as above for a symbol character
3633 * trans-decl.c (gfc_create_module_variable): A 'length' decl is
3634 not needed for a character valued, procedure pointer.
3637 * resolve.c (ensure_not_abstract_walker): If 'overriding' is
3638 not found, return FAILURE rather than ICEing.
3640 2010-04-19 Jakub Jelinek <jakub@redhat.com>
3643 * openmp.c (gfc_resolve_do_iterator): Only make iteration vars for
3644 sequential loops private in the innermost containing task region.
3646 2010-04-18 Eric Botcazou <ebotcazou@adacore.com>
3648 * f95-lang.c (gfc_init_decl_processing): Remove second argument in call
3649 to build_common_tree_nodes.
3651 2010-04-17 Steven G. Kargl <kargl@gcc.gnu.org>
3654 * fortran/trans-array.c (gfc_conv_ss_startstride): Remove the use of
3655 gfc_msg_bounds by using 'Array bound mismatch' directly.
3656 (gfc_trans_dummy_array_bias): Remove the use of gfc_msg_bounds. Reword
3657 error message to include the mismatch in the extent of array bound.
3658 * fortran/trans.c: Remove gfc_msg_bounds. It is only used in one place.
3659 * fortran/trans.h: Remove extern definition of gfc_msg_bounds.
3661 2010-04-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3663 * gfortran.texi: Update information on temporary file locations.
3665 2010-04-16 Jakub Jelinek <jakub@redhat.com>
3667 * trans-decl.c (gfc_build_qualified_array): Ensure
3668 ubound.N and lbound.N artificial variable names don't appear
3671 2010-04-15 Steven G. Kargl <kargl@gcc.gnu.org>
3674 * trans-array.c (gfc_trans_array_bound_check): Eliminate a redundant
3675 block of code. Set name to the variable associated with the descriptor.
3677 2010-04-15 Jakub Jelinek <jakub@redhat.com>
3679 * trans-decl.c (gfc_build_qualified_array): Clear DECL_IGNORED_P
3680 on VAR_DECL LBOUND and/or UBOUND, even for -O1.
3682 2010-04-14 Steven G. Kargl <kargl@gcc.gnu.org>
3684 * intrinsic.texi: Add the missing specific name of intrinsic
3685 procedure where the specific name is identical to the generic name.
3686 Fix inconsistent or mismatch in the argument names in intrinsic
3687 procedure descriptions. Add the SCALAR allocatable description to
3690 2010-04-14 Tobias Burnus <burnus@net-b.de>
3693 * array.c (gfc_find_array_ref): Handle codimensions.
3694 (gfc_match_array_spec,gfc_match_array_ref): Use gfc_fatal_error.
3695 * check.c (is_coarray, dim_corank_check, gfc_check_lcobound,
3696 gfc_check_image_index, gfc_check_this_image, gfc_check_ucobound):
3698 * gfortran.h (gfc_isym_id): Add GFC_ISYM_IMAGE_INDEX,
3699 GFC_ISYM_LCOBOUND, GFC_ISYM_THIS_IMAGE,
3701 * intrinsic.h (add_functions): Add this_image, image_index,
3702 lcobound and ucobound intrinsics.
3703 * intrinsic.c (gfc_check_lcobound,gfc_check_ucobound,
3704 gfc_check_image_index, gfc_check_this_image,
3705 gfc_simplify_image_index, gfc_simplify_lcobound,
3706 gfc_simplify_this_image, gfc_simplify_ucobound):
3707 New function prototypes.
3708 * intrinsic.texi (IMAGE_INDEX, LCOBOUND, THIS_IMAGE
3709 IMAGE_INDEX): Document new intrinsic functions.
3710 * match.c (gfc_match_critical, sync_statement): Make -fcoarray=none
3712 * simplify.c (simplify_bound_dim): Handle coarrays.
3713 (simplify_bound): Update simplify_bound_dim call.
3714 (gfc_simplify_num_images): Add -fcoarray=none check.
3715 (simplify_cobound, gfc_simplify_lcobound, gfc_simplify_ucobound,
3716 gfc_simplify_ucobound, gfc_simplify_ucobound): New functions.
3718 2010-04-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3721 * constructor.c: Fix typo in comment.
3722 * expr.c (find_array_section): Add check for max array limit.
3724 2010-04-13 Iain Sandoe <iains@gcc.gnu.org>
3727 * gfortranspec.c (lookup_option): Check for -static and return
3729 (lang_specific_driver): Break when OPTION_static is discovered.
3731 2010-04-12 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3733 * array.c (extract_element): Restore function from trunk.
3734 (gfc_get_array_element): Restore function from trunk.
3735 (gfc_expand_constructor): Restore check against
3736 flag_max_array_constructor.
3737 * constructor.c (node_copy_and_append): Delete unused.
3738 * gfortran.h: Delete comment and extra include.
3739 * constructor.h: Bump copyright and clean up TODO comments.
3740 * resolve.c: Whitespace.
3742 2010-04-12 Daniel Franke <franke.daniel@gmail.com>
3744 * simplify.c (compute_dot_product): Replaced usage of ADVANCE macro
3745 with direct access access to elements. Adjusted prototype, fixed all
3747 (gfc_simplify_dot_product): Removed duplicate check for zero-sized
3749 (gfc_simplify_matmul): Removed usage of ADVANCE macro.
3750 (gfc_simplify_spread): Removed workaround, directly insert elements
3751 at a given array position.
3752 (gfc_simplify_transpose): Likewise.
3753 (gfc_simplify_pack): Replaced usage of ADVANCE macro with corresponding
3755 (gfc_simplify_unpack): Likewise.
3757 2010-04-12 Daniel Franke <franke.daniel@gmail.com>
3759 * simplify.c (only_convert_cmplx_boz): Renamed to ...
3760 (convert_boz): ... this and moved to start of file.
3761 (gfc_simplify_abs): Whitespace fix.
3762 (gfc_simplify_acos): Whitespace fix.
3763 (gfc_simplify_acosh): Whitespace fix.
3764 (gfc_simplify_aint): Whitespace fix.
3765 (gfc_simplify_dint): Whitespace fix.
3766 (gfc_simplify_anint): Whitespace fix.
3767 (gfc_simplify_and): Replaced if-gate by more common switch-over-type.
3768 (gfc_simplify_dnint): Whitespace fix.
3769 (gfc_simplify_asin): Whitespace fix.
3770 (gfc_simplify_asinh): Moved creation of result-expr out of switch.
3771 (gfc_simplify_atan): Likewise.
3772 (gfc_simplify_atanh): Whitespace fix.
3773 (gfc_simplify_atan2): Whitespace fix.
3774 (gfc_simplify_bessel_j0): Removed ATTRIBUTE_UNUSED.
3775 (gfc_simplify_bessel_j1): Likewise.
3776 (gfc_simplify_bessel_jn): Likewise.
3777 (gfc_simplify_bessel_y0): Likewise.
3778 (gfc_simplify_bessel_y1): Likewise.
3779 (gfc_simplify_bessel_yn): Likewise.
3780 (gfc_simplify_ceiling): Reorderd statements.
3781 (simplify_cmplx): Use convert_boz(), check for constant arguments.
3783 (gfc_simplify_cmplx): Use correct default kind. Removed check for
3785 (gfc_simplify_complex): Replaced if-gate. Removed check for
3787 (gfc_simplify_conjg): Whitespace fix.
3788 (gfc_simplify_cos): Whitespace fix.
3789 (gfc_simplify_cosh): Replaced if-gate by more common switch-over-type.
3790 (gfc_simplify_dcmplx): Removed check for constant arguments.
3791 (gfc_simplify_dble): Use convert_boz() and gfc_convert_constant().
3792 (gfc_simplify_digits): Whitespace fix.
3793 (gfc_simplify_dim): Whitespace fix.
3794 (gfc_simplify_dprod): Reordered statements.
3795 (gfc_simplify_erf): Whitespace fix.
3796 (gfc_simplify_erfc): Whitespace fix.
3797 (gfc_simplify_epsilon): Whitespace fix.
3798 (gfc_simplify_exp): Whitespace fix.
3799 (gfc_simplify_exponent): Use convert_boz().
3800 (gfc_simplify_floor): Reorderd statements.
3801 (gfc_simplify_gamma): Whitespace fix.
3802 (gfc_simplify_huge): Whitespace fix.
3803 (gfc_simplify_iand): Whitespace fix.
3804 (gfc_simplify_ieor): Whitespace fix.
3805 (simplify_intconv): Use gfc_convert_constant().
3806 (gfc_simplify_int): Use simplify_intconv().
3807 (gfc_simplify_int2): Reorderd statements.
3808 (gfc_simplify_idint): Reorderd statements.
3809 (gfc_simplify_ior): Whitespace fix.
3810 (gfc_simplify_ishftc): Removed duplicate type check.
3811 (gfc_simplify_len): Use range_check() instead of manual range check.
3812 (gfc_simplify_lgamma): Removed ATTRIBUTE_UNUSED. Whitespace fix.
3813 (gfc_simplify_log): Whitespace fix.
3814 (gfc_simplify_log10): Whitespace fix.
3815 (gfc_simplify_minval): Whitespace fix.
3816 (gfc_simplify_maxval): Whitespace fix.
3817 (gfc_simplify_mod): Whitespace fix.
3818 (gfc_simplify_modulo): Whitespace fix.
3819 (simplify_nint): Reorderd statements.
3820 (gfc_simplify_not): Whitespace fix.
3821 (gfc_simplify_or): Replaced if-gate by more common switch-over-type.
3822 (gfc_simplify_radix): Removed unused result-variable. Whitespace fix.
3823 (gfc_simplify_range): Removed unused result-variable. Whitespace fix.
3824 (gfc_simplify_real): Use convert_boz() and gfc_convert_constant().
3825 (gfc_simplify_realpart): Whitespace fix.
3826 (gfc_simplify_selected_char_kind): Removed unused result-variable.
3827 (gfc_simplify_selected_int_kind): Removed unused result-variable.
3828 (gfc_simplify_selected_real_kind): Removed unused result-variable.
3829 (gfc_simplify_sign): Whitespace fix.
3830 (gfc_simplify_sin): Whitespace fix.
3831 (gfc_simplify_sinh): Replaced if-gate by more common switch-over-type.
3832 (gfc_simplify_sqrt): Avoided goto by inlining check. Whitespace fix.
3833 (gfc_simplify_tan): Replaced if-gate by more common switch-over-type.
3834 (gfc_simplify_tanh): Replaced if-gate by more common switch-over-type.
3835 (gfc_simplify_xor): Replaced if-gate by more common switch-over-type.
3837 2010-04-12 Daniel Franke <franke.daniel@gmail.com>
3839 * gfortran.h (gfc_start_constructor): Removed.
3840 (gfc_get_array_element): Removed.
3841 * array.c (gfc_start_constructor): Removed, use gfc_get_array_expr
3842 instead. Fixed all callers.
3843 (extract_element): Removed.
3844 (gfc_expand_constructor): Temporarily removed check for
3845 max-array-constructor. Will be re-introduced later if still required.
3846 (gfc_get_array_element): Removed, use gfc_constructor_lookup_expr
3847 instead. Fixed all callers.
3848 * expr.c (find_array_section): Replaced manual lookup of elements
3849 by gfc_constructor_lookup.
3851 2010-04-12 Daniel Franke <franke.daniel@gmail.com>
3853 * gfortran.h (gfc_get_null_expr): New prototype.
3854 (gfc_get_operator_expr): New prototype.
3855 (gfc_get_character_expr): New prototype.
3856 (gfc_get_iokind_expr): New prototype.
3857 * expr.c (gfc_get_null_expr): New.
3858 (gfc_get_character_expr): New.
3859 (gfc_get_iokind_expr): New.
3860 (gfc_get_operator_expr): Moved here from matchexp.c (build_node).
3861 * matchexp.c (build_node): Renamed and moved to
3862 expr.c (gfc_get_operator_expr). Reordered arguments to match
3863 other functions. Fixed all callers.
3864 (gfc_get_parentheses): Use specific function to build expr.
3865 * array.c (gfc_match_array_constructor): Likewise.
3866 * arith.c (eval_intrinsic): Likewise.
3867 (gfc_hollerith2int): Likewise.
3868 (gfc_hollerith2real): Likewise.
3869 (gfc_hollerith2complex): Likewise.
3870 (gfc_hollerith2logical): Likewise.
3871 * data.c (create_character_intializer): Likewise.
3872 * decl.c (gfc_match_null): Likewise.
3873 (enum_initializer): Likewise.
3874 * io.c (gfc_match_format): Likewise.
3875 (match_io): Likewise.
3876 * match.c (gfc_match_nullify): Likewise.
3877 * primary.c (match_string_constant): Likewise.
3878 (match_logical_constant): Likewise.
3879 (build_actual_constructor): Likewise.
3880 * resolve.c (build_default_init_expr): Likewise.
3881 * symbol.c (generate_isocbinding_symbol): Likewise.
3882 (gfc_build_class_symbol): Likewise.
3883 (gfc_find_derived_vtab): Likewise.
3884 * simplify.c (simplify_achar_char): Likewise.
3885 (gfc_simplify_adjustl): Likewise.
3886 (gfc_simplify_adjustr): Likewise.
3887 (gfc_simplify_and): Likewise.
3888 (gfc_simplify_bit_size): Likewise.
3889 (gfc_simplify_is_iostat_end): Likewise.
3890 (gfc_simplify_is_iostat_eor): Likewise.
3891 (gfc_simplify_isnan): Likewise.
3892 (simplify_bound): Likewise.
3893 (gfc_simplify_leadz): Likewise.
3894 (gfc_simplify_len_trim): Likewise.
3895 (gfc_simplify_logical): Likewise.
3896 (gfc_simplify_maxexponent): Likewise.
3897 (gfc_simplify_minexponent): Likewise.
3898 (gfc_simplify_new_line): Likewise.
3899 (gfc_simplify_null): Likewise.
3900 (gfc_simplify_or): Likewise.
3901 (gfc_simplify_precision): Likewise.
3902 (gfc_simplify_repeat): Likewise.
3903 (gfc_simplify_scan): Likewise.
3904 (gfc_simplify_size): Likewise.
3905 (gfc_simplify_trailz): Likewise.
3906 (gfc_simplify_trim): Likewise.
3907 (gfc_simplify_verify): Likewise.
3908 (gfc_simplify_xor): Likewise.
3909 * trans-io.c (build_dt): Likewise.
3910 (gfc_new_nml_name_expr): Removed.
3912 2010-04-12 Daniel Franke <franke.daniel@gmail.com>
3914 * arith.h (gfc_constant_result): Removed prototype.
3915 * constructor.h (gfc_build_array_expr): Removed prototype.