1 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
3 * trans-stmt.c (gfc_trans_allocate): free lhs expr.
5 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
7 * trans-array.c (gfc_free_ss_chain): Made non-static.
8 * trans-array.h (gfc_free_ss_chain): New prototype.
9 * trans-stmt.c (gfc_trans_where_2): Free ss chains.
11 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
13 * trans-intrinsic.c (gfc_conv_intrinsic_funcall): Also free symbol's
16 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
18 * trans-stmt.c (gfc_trans_forall_1): Free forall struct at the end.
20 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
22 * trans-expr.c (get_proc_ptr_comp): Restore initial expression type
23 before calling gfc_free_expr.
25 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
27 * trans-array.c (gfc_conv_tmp_array_ref): Add factorized call to
28 gfc_advance_se_ss_chain.
29 * trans-expr.c (gfc_conv_subref_array_ref, gfc_conv_procedure_call,
30 gfc_conv_array_constructor_expr, gfc_trans_assignment_1): Remove
31 calls to gfc_advance_se_ss_chain after gfc_conv_tmp_array_ref.
32 * trans-intrinsic.c (gfc_conv_intrinsic_function): Ditto.
33 * trans-stmt.c (gfc_trans_where_assign, gfc_trans_where_3): Ditto.
35 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
37 * trans.c (gfc_restore_backend_locus): New function.
38 (gfc_get_backend_locus): Renamed to ...
39 (gfc_save_backend_locus): ... this.
40 * trans.h (gfc_restore_backend_locus, gfc_get_backend_locus,
41 gfc_save_backend_locus): Same.
42 * trans-array.c (gfc_trans_g77_array, gfc_trans_dummy_array_bias,
43 gfc_trans_deferred_array): Rename gfc_get_backend_locus to
44 gfc_save_backend_locus.
45 (gfc_trans_dummy_array_bias): Call gfc_restore_backend_locus at the
47 (gfc_trans_g77_array, gfc_trans_deferred_array): Use
48 gfc_restore_backend_locus instead of gfc_set_backend_locus.
49 (gfc_trans_deferred_array): Call gfc_restore_backend_locus on early
51 * trans-decl.c (gfc_get_extern_function_decl, build_entry_thunks,
52 gfc_trans_deferred_vars):
53 Rename gfc_get_backend_locus to gfc_save_backend_locus.
54 Use gfc_restore_backend_locus insted of gfc_set_backend_locus.
56 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
58 * trans-array.c (gfc_build_constant_array_constructor): Free array
61 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
63 * symbol.c (gfc_copy_formal_args_ppc): Free previous formal arg list
64 before overwriting it.
66 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
68 * array.c (gfc_match_array_spec): Don't re-initialize cleared struct.
69 * symbol.c (gen_shape_param): Ditto.
71 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
73 * symbol.c (free_entry_list): New function.
74 (gfc_free_namespace): Free list of entries.
76 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
78 * symbol.c (free_components): Free list of formal args and formal
81 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
83 * simplify.c (gfc_simplify_size): Clear temporary mpz int before
86 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
88 * resolve.c (add_dt_to_dt_list): Remove unneeded if.
90 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
92 * resolve.c (check_typebound_baseobject): Free local expr before
95 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
97 * primary.c (gfc_match_structure_constructor): Invert the assert logic.
99 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
101 * primary.c (gfc_free_structure_ctor_component): Also free the
102 component structure itself.
104 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
106 * module.c (gfc_use_module): Free atom_string when done with it.
108 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
110 * module.c (read_module): Remove useless string duplication.
112 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
114 * gfortranspec.c (append_arg): Remove commented code.
116 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
118 * decl.c (match_procedure_in_type): Assertify if conditions.
120 2010-10-06 Mikael Morin <mikael@gcc.gnu.org>
122 * cpp.c (gfc_cpp_post_options): Don't create a cpp reader if
123 preprocessing is disabled.
125 2010-10-06 Jakub Jelinek <jakub@redhat.com>
128 * f95-lang.c (ATTR_NOTHROW_LEAF_LIST, ATTR_CONST_NOTHROW_LEAF_LIST,
129 ATTR_NOTHROW_LIST, ATTR_CONST_NOTHROW_LIST): Define.
130 (gfc_define_builtin): Change last argument to int bitmask from bool,
131 control addition of TREE_NOTHROW and leaf attribute as well.
132 (DO_DEFINE_MATH_BUILTIN): Adjust callers.
133 (gfc_init_builtin_functions): Likewise. Remove
134 ATTR_{,CONST_}NOTHROW_LIST enum.
136 2010-10-04 Andi Kleen <ak@linux.intel.com>
138 * Make-lang.in (gfortran, f951): Add + to build rule.
140 2010-10-04 Richard Guenther <rguenther@suse.de>
142 * f95-lang.c (current_translation_unit): New global variable.
143 (gfc_create_decls): Build a translation-unit decl.
144 (pushdecl): In the global binding-level use the
145 translation-unit decl as DECL_CONTEXT.
146 * trans-decl.c (gfc_get_symbol_decl): Use DECL_FILE_SCOPE_P.
147 (build_function_decl): Likewise. Delay setting the assembler
148 name, leave setting of DECL_CONTEXT to pushdecl.
149 (trans_function_start): Use DECL_FILE_SCOPE_P.
150 (gfc_create_module_variable): Likewise. Remove questionable
152 * trans.c (gfc_generate_module_code): Likewise.
154 2010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
156 * cpp.c (cpp_define_builtins): Call functions from cppbuiltin.c
157 instead of duplicating code.
158 * Make-lang.in: Add dependency on cppbuiltin.h. Don't define
161 2010-10-02 Janus Weil <janus@gcc.gnu.org>
164 * resolve.c (resolve_formal_arglist): Avoid setting default type for
165 formal arguments of intrinsic procedures.
167 2010-09-30 Janus Weil <janus@gcc.gnu.org>
170 * resolve.c (resolve_allocate_expr): Do not use
171 'gfc_has_default_initializer'.
173 2010-09-30 Tobias Burnus <burnus@net-b.de>
175 * gfortran.tex (Fortran 2008 status): Update list of
176 implemented features.
178 2010-09-29 Joseph Myers <joseph@codesourcery.com>
180 * lang.opt: Don't use VarExists.
182 2010-09-29 Joseph Myers <joseph@codesourcery.com>
184 * cpp.c (cpp_define_builtins): Update names of gfc_option_t
186 (gfc_cpp_post_options): Update names of cpp_options members.
187 (cb_cpp_error): Update names of diagnostic_context members.
188 * f95-lang.c (gfc_init_builtin_functions): Update names of
189 gfc_option_t members.
190 * gfortran.h (gfc_option_t): Rename warn_conversion and
192 * intrinsic.c (gfc_convert_type_warn): Update names of
193 gfc_option_t members.
194 * options.c (gfc_init_options, gfc_post_options, set_Wall,
195 gfc_handle_option): Update names of gfc_option_t members.
196 * parse.c (next_free, next_fixed): Update names of gfc_option_t
198 * scanner.c (pedantic): Remove extern declaration.
199 (skip_free_comments, skip_fixed_comments, include_line): Update
200 names of gfc_option_t members.
201 * trans-decl.c (gfc_generate_function_code): Update names of
202 gfc_option_t members.
204 2010-09-28 Tobias Burnus <burnus@net-b.de>
208 * intrinsic.c (add_functions): Make compiler_version and
209 compiler_options CLASS_INQUIRY.
210 * gfortran.h (gfc_get_option_string): New prototype.
211 * intrinsic.texi (COMPILER_VERSION, COMPILER_OPTIONS):
213 (C_SIZEOF): Mark as inquiry function of ISO_C_BINDING.
214 (ISO_FORTRAN_ENV): Refer to COMPILER_VERSION and COMPILER_OPTIONS.
215 (ISO_C_BINDING): Refer to C_SIZEOF.
216 * options.c (gfc_get_option_string): New function.
217 * simplify.c (gfc_simplify_compiler_options): Use it.
218 (gfc_simplify_compiler_version): Include compiler name.
220 2010-09-28 Jan Hubicka <jh@suse.cz>
222 * f95-lang.c (gfc_define_builtin): Make leaf.
223 (gfc_init_builtin_functions): Handle only ATTR_CONST_NOTHROW_LEAF_LIST
224 and ATTR_NOTHROW_LEAF_LIST.
225 (DEF_SYNC_BUILTIN): Check ATTR_CONST_NOTHROW_LEAF_LIST.
226 (DEF_GOMP_BUILTIN): Likewise.
228 2010-09-28 Tobias Burnus <burnus@net-b.de>
231 * trans-decl.c (gfc_get_symbol_decl): Use gsym for decl of
234 2010-09-27 Tobias Burnus <burnus@net-b.de>
238 * intrinsic.h (gfc_simplify_compiler_options,
239 gfc_simplify_compiler_version): New prototypes.
240 * intrinsic.c (gfc_intrinsic_function_by_id,
241 make_from_module): New functions.
242 (gfc_find_function, gfc_find_subroutine, gfc_generic_intrinsic,
243 gfc_specific_intrinsic): Don't return module intrinsics.
244 (add_functions): Add compiler_options, compiler_version.
245 (gfc_intrinsic_func_interface): Also lookup symbol by ISYM ID.
246 * symbol.c (std_for_isocbinding_symbol): Add version check for
248 * iso-fortran-env.def: Add compiler_options, compiler_version.
249 * iso-c-binding.def: Add c_sizeof.
250 * gfortran.h (gfc_intrinsic_sym): Add from_module:1.
251 (iso_c_binding_symbol, iso_fortran_env_symbol): Add NAMED_FUNCTIONS.
252 (gfc_intrinsic_function_by_id): New prototype.
253 * module.c (create_intrinsic_function): New function.
254 (import_iso_c_binding_module, use_iso_fortran_env_module): Use it.
255 * trans-types.c (init_c_interop_kinds): Add NAMED_FUNCTIONS.
256 * resolve.c (resolve_intrinsic): Try also to resolve intrinsics
258 * simplify.c (gfc_simplify_compiler_options,
259 gfc_simplify_compiler_version): New functions.
261 2010-09-26 Daniel Kraft <d@domob.eu>
265 * resolve.c (resolve_select_type): Clarify code.
266 (resolve_assoc_var): Only set typespec if it is currently unknown.
268 2010-09-26 Jerry DeLisle <jvdelisle@gcc.gnu.org>
271 * module.c (create_int_parameter_array): Set the array value shape.
273 2010-09-25 Tobias Burnus <burnus@net-b.de>
275 * gfortran.texi: Re-add accidently removed \input line.
277 2010-09-25 Daniel Kraft <d@domob.eu>
280 * gfortran.h (struct gfc_dt): New member `dt_io_kind'.
281 * io.c (resolve_tag): F2008 check for NEWUNIT and variable
282 definition checks for NEWUNIT, IOSTAT, SIZE and IOMSG.
283 (gfc_free_dt): Correctly handle freeing of `dt_io_kind' and
284 `extra_comma' with changed semantics.
285 (gfc_resolve_dt): Check variable definitions.
286 (match_io_element): Remove INTENT and PURE checks here and
287 initialize code->ext.dt member.
288 (match_io): Set dt->dt_io_kind.
289 (gfc_resolve_inquire): Check variable definition for all tags
290 except UNIT, FILE and ID.
291 * resolve.c (resolve_transfer): Variable definition check.
293 2010-09-25 Tobias Burnus <burnus@net-b.de>
295 * interface.c (gfc_match_end_interface): Constify char pointer
298 2010-09-24 Steven G. Kargl < kargl@gcc.gnu.org>
300 * interface.c (gfc_match_end_interface): Deal with user defined
301 operators that overload rational operators and C1202.
303 2010-09-24 Tobias Burnus <burnus@net-b.de>
305 * gfortran.texi: Add second space after end-of-sentence period;
306 change / to /@/ to allow hyphenation of URLs.
307 (Standards): Remove duplicated OpenMP, update wording given that
308 Fortran 2008 now released.
309 (Fortran 2008 status): Update and add list of implemented features.
311 2010-09-24 Tobias Burnus <burnus@net-b.de>
314 * iso-fortran-env.def: Add NAMED_KINDARRAY with
315 character_kinds, integer_kinds, logical_kinds and
317 * gfortran.h: Add them to iso_fortran_env_symbol.
318 * libgfortran.h: Rename GFC_INQUIRE_INTERNAL_UNIT to
319 LIBERROR_INQUIRE_INTERNAL_UNIT and move it from
320 libgfortran_stat_codes to libgfortran_error_codes.
321 * module.c (create_int_parameter_array): New function.
322 (use_iso_fortran_env_module): Use it for
323 NAMED_KINDARRAY of iso-fortran-env.def.
324 * trans-decl.c (gfc_get_symbol_decl): Parameter
325 arrays of intrinsics modules become local static variables.
326 * intrinsic.texi (ISO_FORTRAN_ENV): Add character_kinds,
327 integer_kinds, logical_kinds and real_kinds.
329 2010-09-23 Thomas Koenig <tkoenig@gcc.gnu.org>
332 * frontend-passes.c (optimize_binop_array_assignment):
333 Only re-use lhs as intermediate storage if kind and type
336 2010-09-23 Mikael Morin <mikael@gcc.gnu.org>
340 * trans-array.c (gfc_conv_expr_descriptor): Handle
341 ss->type == GFC_SS_INTRINSIC (for {l,u}bound intrinsics) case.
343 2010-09-23 Tobias Burnus <burnus@net-b.de>
345 * intrinsic.texi (OpenMP modules): Add named constants of
348 2010-09-23 Daniel Kraft <d@domob.eu>
353 * gfortran.h (gfc_check_vardef_context): New method.
354 (struct symbol_attribute): New flag `select_type_temporary'.
355 * primary.c (gfc_variable_attr): Clarify initialization of ref.
356 (match_variable): Remove PROTECTED check and assignment check
357 for PARAMETERs (this is now done later).
358 * match.c (gfc_match_iterator): Remove INTENT(IN) check.
359 (gfc_match_associate): Defer initialization of newAssoc->variable.
360 (gfc_match_nullify): Remove PURE definability check.
361 (select_type_set_tmp): Set new `select_type_temporary' flag.
362 * expr.c (gfc_check_assign): Remove INTENT(IN) check here.
363 (gfc_check_pointer_assign): Ditto (and other checks removed).
364 (gfc_check_vardef_context): New method.
365 * interface.c (compare_parameter_protected): Removed.
366 (compare_actual_formal): Use `gfc_check_vardef_context' for checks
367 related to INTENT([IN]OUT) arguments.
368 * intrinsic.c (check_arglist): Check INTENT for intrinsics.
369 * resolve.c (gfc_resolve_iterator): Use `gfc_check_vardef_context'.
370 (remove_last_array_ref): New method.
371 (resolve_deallocate_expr), (resolve_allocate_expr): Ditto.
372 (resolve_allocate_deallocate): Ditto (for STAT and ERRMSG).
373 (resolve_assoc_var): Remove checks for definability here.
374 (resolve_select_type): Handle resolving of code->block here.
375 (resolve_ordinary_assign): Remove PURE check.
376 (resolve_code): Do not resolve code->blocks for SELECT TYPE here.
377 Use `gfc_check_vardef_context' for assignments and pointer-assignments.
379 2010-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
381 * gfortran.texi (Argument list functions): Allow URL to wrap.
382 * intrinsic.texi (GETGID, GETPID, GETUID, IMAGE_INDEX)
383 (IS_IOSTAT_END, IS_IOSTAT_EOR, NUM_IMAGES, THIS_IMAGE)
384 (ISO_FORTRAN_ENV): Fix markup in index entries, and a couple of
385 code markups in the text.
386 * invoke.texi (Fortran Dialect Options)
387 (Error and Warning Options, Directory Options, Code Gen Options):
388 Likewise. Remove @code inside @smallexample.
390 2010-09-22 Joseph Myers <joseph@codesourcery.com>
392 * gfortranspec.c (lang_specific_driver): Handle OPT__version and
393 OPT__help instead of OPT_fversion and OPT_fhelp.
394 * lang.opt (-all-warnings, -assert, -assert=, -comments,
395 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
396 -dump, -dump=, -include-barrier, -include-directory,
397 -include-directory=, -include-directory-after,
398 -include-directory-after=, -include-prefix, -include-prefix=,
399 -no-line-commands, -no-standard-includes, -output, -output=,
400 -preprocess, -print-missing-file-dependencies, -trace-includes,
401 -undefine-macro, -undefine-macro=, -user-dependencies, -verbose,
402 -write-dependencies, -write-user-dependencies): New.
404 2010-09-21 Jason Blevins <jrblevin@sdf.org>
406 * intrinsics.texi (HYPOT, IMAGE_INDEX, BESSEL_JN, BESSEL_YN,
407 execute_command_line, IEOR, IOR, NORM2, NOT, NULL, PARITY):
410 2010-09-21 Mikael Morin <mikael@gcc.gnu.org>
413 * trans-array.c (gfc_conv_expr_descriptor): Calculate dim out of n and
417 * trans-array.c (gfc_conv_expr_descriptor): Unset full if we are
418 accessing dimensions in reversed order.
421 * trans-array.c (gfc_conv_expr_descriptor): Special case noncopying
422 intrinsic function call.
424 * trans-array.c (gfc_conv_expr_descriptor): Remove ss lookup.
425 Update asserts accordingly.
428 * trans.h (gfc_se): New field force_tmp.
429 * trans-expr.c (gfc_conv_procedure_call): Check for argument alias
430 and set parmse.force_tmp if some alias is found.
431 * trans-array.c (gfc_conv_expr_descriptor): Force a temporary creation
432 if se->force_tmp is set.
434 2010-09-20 Janus Weil <janus@gcc.gnu.org>
437 * trans-expr.c (gfc_conv_procedure_call): Fix pointer checking for
438 TBPs, PPCs and pointer/allocatable components.
440 2010-09-20 Paul Thomas <pault@gcc.gnu.org>
443 * simplify.c (is_constant_array_expr): Allow structure array
444 elements as well as constants.
445 (gfc_simplify_pack, gfc_simplify_reshape, gfc_simplify_spread,
446 gfc_simplify_transpose, gfc_simplify_unpack): Copy the derived
447 type of source to the result.
449 2010-09-19 Thomas Koenig <tkoenig@gcc.gnu.org>
451 * frontend-passes.c (gfc_expr_walker): Also
452 handle EXPR_SUBSTRING.
454 2010-09-19 Thomas Koenig <tkoenig@gcc.gnu.org>
456 * frontend-passes.c (gfc_expr_walker): Handle
457 constructors and references.
459 2010-09-16 Tobias Burnus <burnus@net-b.de>
462 * trans-types.c (create_fn_spec): New function.
463 (gfc_get_function_type): Call it.
465 2010-09-16 Jakub Jelinek <jakub@redhat.com>
467 * gfortran.h (walk_code_fn_t, walk_expr_fn_t): New types.
468 (gfc_expr_walker, gfc_code_walker): New prototypes.
469 * frontend-passes.c (gfc_expr_walker, gfc_code_walker): New functions.
470 (WALK_SUBEXPR, WALK_SUBEXPR_TAIL, WALK_SUBCODE): Define.
471 (optimize_namespace): Use gfc_code_walker.
472 (optimize_code, optimize_expr): Rewritten as gfc_code_walker hooks.
473 (optimize_expr_0, optimize_code_node,
474 optimize_actual_arglist): Removed.
475 (optimize_assignment): Don't call optimize_expr_0.
477 2010-09-16 Janus Weil <janus@gcc.gnu.org>
480 * interface.c (compare_parameter): Create vtab for actual argument,
481 instead of formal (if needed).
483 2010-09-15 Janus Weil <janus@gcc.gnu.org>
486 * resolve.c (resolve_allocate_expr): Do default initialization via
489 2010-09-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
491 * mathbuiltins.def: Do not defined huge_val built-in.
492 * trans-const.c (gfc_build_inf_or_huge): New function.
493 * trans-const.h (gfc_build_inf_or_huge): New prototype.
494 * f95-lang.c (gfc_init_builtin_functions): Don't defined
496 * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): We don't
497 have functions of type (*) (void) anymore.
498 (gfc_conv_intrinsic_minmaxloc): Call gfc_build_inf_or_huge.
499 (gfc_conv_intrinsic_nearest): Call gfc_build_inf_or_huge instead
500 of generating a call to huge_val().
502 2010-09-11 Mikael Morin <mikael@gcc.gnu.org>
504 * gfortran.h (gfc_expr): Remove inline_noncopying_intrinsic attribute.
505 * dependency.c (gfc_check_dependency): Don't depend on
506 expr's inline_noncopying_intrinsic_attribute.
507 * dependency.c (gfc_check_argument_var_dependency,
508 gfc_check_argument_dependency): Ditto. Recursively check dependency
509 as NOT_ELEMENTAL in the non-copying (=transpose) case.
510 * trans-intrinsic.c (gfc_conv_intrinsic_function): Ditto.
511 * resolve.c (find_noncopying_intrinsics): Remove.
512 (resolve_function, resolve_call): Remove call to
513 find_noncopying_intrinsics.
515 * trans-array.c (gfc_conv_array_transpose): Remove.
516 (gfc_walk_subexpr): Make non-static. Move prototype...
517 * trans-array.h (gfc_walk_subexpr): ... here.
518 * trans-intrinsic.c (gfc_conv_intrinsic_function): Update transpose
520 (walk_inline_intrinsic_transpose, walk_inline_intrinsic_function,
521 gfc_inline_intrinsic_function_p): New.
522 (gfc_is_intrinsic_libcall): Return early in inline intrinsic case.
523 Remove transpose from the libcall list.
524 (gfc_walk_intrinsic_function): Special case inline intrinsic.
525 * trans.h (gfc_inline_intrinsic_function_p): New prototype.
527 2010-09-10 Mikael Morin <mikael@gcc.gnu.org>
529 * trans-expr.c (expr_is_variable): New function taking non-copying
530 intrinsic functions into account.
531 (gfc_trans_assignment_1): Use expr_is_variable.
533 2010-09-10 Mikael Morin <mikael@gcc.gnu.org>
535 * trans-array.c (gfc_conv_loop_setup): Access the shape along the
536 real array dimension instead of the scalarizer (loop) dimension.
538 2010-09-10 Mikael Morin <mikael@gcc.gnu.org>
540 * trans-array.c (gfc_conv_resolve_dependencies): Handle same-array
541 transposed references.
543 2010-09-10 Tobias Burnus <burnus@net-b.de>
546 * trans.h (build1_stat_loc, build2_stat_loc, build3_stat_loc,
547 build4_stat_loc): New inline functions.
548 (build1_loc, build2_loc, build3_loc, build4_loc): New macros.
549 (build1_v, build2_v, build3_v, build4_v): Use input_location
551 * trans-array.c (gfc_trans_scalarized_loop_end,
552 gfc_conv_array_parameter): Replace build[1-4] by build[1-4]_loc.
553 * trans.c (gfc_build_addr_expr, gfc_build_array_ref,
554 gfc_finish_wrapped_block): Ditto.
555 * trans-decl.c (gfc_init_default_dt, init_intent_out_dt): Ditto.
556 * trans-expr.c (gfc_conv_missing_dummy,
557 gfc_trans_alloc_subarray_assign, gfc_trans_zero_assign): Ditto.
558 * trans-openmp.c (gfc_omp_clause_default_ctor,
559 gfc_trans_omp_critical, gfc_trans_omp_parallel,
560 gfc_trans_omp_parallel_do, gfc_trans_omp_parallel_sections,
561 gfc_trans_omp_parallel_workshare, gfc_trans_omp_sections
562 gfc_trans_omp_single, gfc_trans_omp_task,
563 gfc_trans_omp_workshare): Ditto.
565 2010-09-09 Steven G. Kargl <kargl@gcc.gnu.org>
567 * fortran/expr.c (check_inquiry): OPTIONAL attribute is not allowed
568 for dummy argument that appears in a specification statement.
570 2010-09-09 Mikael Morin <mikael@gcc.gnu.org>
572 * trans-array.c (gfc_get_array_ref_dim): New function.
573 (gfc_trans_create_temp_array): Reconstruct array
574 bounds from loop bounds. Use array bounds instead of loop bounds.
576 2010-09-09 Mikael Morin <mikael@gcc.gnu.org>
578 * trans-array.c (gfc_set_loop_bounds_from_array_spec):
579 Get the array dimension from the dim array.
581 2010-09-09 Mikael Morin <mikael@gcc.gnu.org>
583 * trans-array.c (gfc_trans_preloop_setup): Unconditionally use the
584 dim array to get the stride in the innermost loop.
586 2010-09-09 Mikael Morin <mikael@gcc.gnu.org>
588 * trans-array.c (gfc_trans_create_temp_array): Don't set dim array.
589 (gfc_conv_loop_setup, gfc_walk_function_expr): Set dim array.
590 * trans-intrinsic.c (gfc_walk_intrinsic_libfunc): Ditto.
592 2010-09-09 Mikael Morin <mikael@gcc.gnu.org>
594 * trans-array.c (gfc_trans_create_temp_array): Assert loop dimension
595 and info dimension are the same. Loop over loop dimension.
596 * trans-stmt.c (gfc_conv_elemental_dependencies): Set loop dimension
598 2010-09-09 Mikael Morin <mikael@gcc.gnu.org>
600 * trans-array.c (gfc_conv_array_transpose): Change generated descriptor
603 2010-09-09 Tobias Burnus <burnus@net-b.de>
606 * intrincic.texi (FGET, FGETC, FPUT, FPUTC, FSTAT, GETCWD, KILL,
607 STAT): Show also syntax for the function version.
608 * intrinsic.c (add_sym_1s_intent, add_sym_2s_intent,
609 add_sym_3s_intent): Remove function.
610 (add_sym_1s, add_sym_2s, add_sym_3s): Take always the intent
612 (add_sym_2_intent): New function.
613 (add_functions): Set intent for functions which modify
614 the argument: fstat, fgetc, fget, hostnm, lstat, stat. Change
615 argument name of hostnm from "a" to "c"
616 (add_subroutines): Change add_sym_*s_intent to
617 add_sym_*s and add intent to the add_sym_*s calls.
619 2010-09-08 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
622 * intrinsic.c (add_functions): Add B{G,L}{E,T}, DSHIFT{L,R},
623 MASK{L,R}, MERGE_BITS and SHIFT{A,L,R}.
624 * gfortran.h: Define ISYM values for above intrinsics.
625 * intrinsic.h (gfc_check_bge_bgt_ble_blt, gfc_check_dshift,
626 gfc_check_mask, gfc_check_merge_bits, gfc_check_shift,
627 gfc_simplify_bge, gfc_simplify_bgt, gfc_simplify_ble,
628 gfc_simplify_blt, gfc_simplify_dshiftl, gfc_simplify_dshiftr,
629 gfc_simplify_lshift, gfc_simplify_maskl, gfc_simplify_maskr,
630 gfc_simplify_merge_bits, gfc_simplify_rshift,
631 gfc_simplify_shifta, gfc_simplify_shiftl, gfc_simplify_shiftr,
632 gfc_resolve_dshift, gfc_resolve_mask, gfc_resolve_merge_bits,
633 gfc_resolve_shift): New prototypes.
634 * iresolve.c (gfc_resolve_dshift, gfc_resolve_mask,
635 gfc_resolve_merge_bits, gfc_resolve_shift): New functions.
636 * check.c (gfc_check_bge_bgt_ble_blt, gfc_check_dshift,
637 gfc_check_mask, gfc_check_merge_bits, gfc_check_shift): New
639 * trans-intrinsic.c (gfc_conv_intrinsic_dshift,
640 gfc_conv_intrinsic_bitcomp, gfc_conv_intrinsic_shift,
641 gfc_conv_intrinsic_merge_bits, gfc_conv_intrinsic_mask): New
643 (gfc_conv_intrinsic_function): Call above static functions.
644 * intrinsic.texi: Document new intrinsics.
645 * simplify.c (gfc_simplify_bge, gfc_simplify_bgt, gfc_simplify_ble,
646 gfc_simplify_blt, gfc_simplify_dshiftl, gfc_simplify_dshiftr,
647 gfc_simplify_lshift, gfc_simplify_maskl, gfc_simplify_maskr,
648 gfc_simplify_merge_bits, gfc_simplify_rshift,
649 gfc_simplify_shifta, gfc_simplify_shiftl, gfc_simplify_shiftr):
652 2010-09-08 Jakub Jelinek <jakub@redhat.com>
654 * frontend-passes.c (optimize_code_node): Walk block chain by default.
657 * trans-openmp.c (gfc_trans_omp_do): Store exit/cycle labels on code
658 instead of code->block.
661 * openmp.c (resolve_omp_do): Report not enough do loops for
662 collapse even if block->next is NULL.
664 2010-09-07 Thomas Koenig <tkoenig@gcc.gnu.org>
667 * dependency.c (gfc_deb_compare_expr): Take missing optional
668 arguments into account.
670 2010-09-08 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
672 * trans.h (gfor_fndecl_clz128, gfor_fndecl_ctz128): Remove.
673 * trans-decl.c (gfor_fndecl_clz128, gfor_fndecl_ctz128): Remove.
674 (gfc_build_intrinsic_function_decls): Don't build the
675 gfor_fndecl_clz128 and gfor_fndecl_ctz128.
676 * trans-intrinsic.c (gfc_conv_intrinsic_leadz,
677 gfc_conv_intrinsic_trailz): Generate inline arithmetic instead
678 of calling clz128/ctz128 library functions.
680 2010-09-07 Jan Hubicka <jh@suse.cz>
682 * trans-expr.c (gfc_conv_initializer): Set STATIC flags for
685 2010-09-07 Tobias Burnus <burnus@net-b.de>
688 * intrinsic.texi (COS): Remove superfluous "n".
690 2010-09-07 Tobias Burnus <burnus@net-b.de>
693 * trans-array.c (gfc_conv_descriptor_data_get,
694 gfc_conv_descriptor_data_set, gfc_conv_descriptor_data_addr,
695 gfc_conv_descriptor_offset, gfc_conv_descriptor_dtype,
696 gfc_conv_descriptor_dimension, gfc_conv_descriptor_stride,
697 gfc_conv_descriptor_lbound, gfc_conv_descriptor_ubound,
698 gfc_conv_shift_descriptor_lbound,
699 gfc_set_loop_bounds_from_array_spec,
700 gfc_trans_allocate_array_storage, gfc_trans_create_temp_array,
701 gfc_conv_array_transpose, gfc_get_iteration_count,
702 gfc_grow_array, gfc_trans_array_ctor_element,
703 gfc_trans_array_constructor_subarray,
704 gfc_trans_array_constructor_value,
705 constant_array_constructor_loop_size, gfc_trans_array_constructor,
706 gfc_set_vector_loop_bounds, gfc_trans_array_bound_check,
707 gfc_conv_array_index_offset, gfc_conv_scalarized_array_ref,
708 gfc_conv_array_ref, gfc_trans_preloop_setup,
709 gfc_trans_scalarized_loop_end, gfc_conv_ss_startstride,
710 gfc_conv_loop_setup, gfc_conv_array_extent_dim,
711 gfc_conv_descriptor_size, gfc_array_init_size,
712 gfc_array_allocate, gfc_array_deallocate,
713 gfc_trans_array_bounds, gfc_trans_auto_array_allocation,
714 gfc_trans_dummy_array_bias, gfc_get_dataptr_offset,
715 get_array_charlen, gfc_conv_expr_descriptor,
716 array_parameter_size, gfc_conv_array_parameter,
717 gfc_trans_dealloc_allocated, get_full_array_size,
718 duplicate_allocatable,
719 structure_alloc_comps): Change fold_build[0-9] to
721 (duplicate_allocatable, structure_alloc_comps,
722 gfc_duplicate_allocatable): Add space after function name.
724 2010-09-07 Mikael Morin <mikael@gcc.gnu.org>
726 * trans-stmt.c (gfc_trans_character_select): Be conversion-safe while
727 checking string length value.
728 * trans-intrinsic.c (gfc_conv_intrinsic_char): Build integer using
729 gfc_charlen_type_node type.
732 * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Convert string
733 length to gfc_charlen_type_node.
735 2010-09-06 Thomas Koenig <tkoenig@gcc.gnu.org>
738 * frontend-passes.c (optimize_binop_array_assignment): New
740 (optimize_assignment): Call it.
742 2010-09-06 Thomas Koenig <tkoenig@gcc.gnu.org>
745 * trans-expr.c (gfc_conv_substring): If start and end
746 of the string reference are equal, set the length to one.
748 2010-09-06 Tobias Burnus <burnus@net-b.de>
751 * dump-parse-tree.c (gfc_debug_expr): Use stderr instead of stdout.
753 2010-09-06 Tobias Burnus <burnus@net-b.de>
756 * dump-parse-tree.c (gfc_debug_expr): New function.
758 2010-09-06 Tobias Burnus <burnus@net-b.de>
761 * intrinsic.c (add_functions): Support IALL, IANY, IPARITY.
762 (check_specific): Special case for those intrinsics.
763 * gfortran.h (gfc_isym_id): Add new intrinsics
764 * intrinsic.h (gfc_check_transf_bit_intrins,
765 gfc_simplify_iall, gfc_simplify_iany, gfc_simplify_iparity,
766 gfc_resolve_iall, gfc_resolve_iany, gfc_resolve_iparity):
768 * iresolve.c (gfc_resolve_iall, gfc_resolve_iany,
769 gfc_resolve_iparity, resolve_transformational): New functions.
770 (gfc_resolve_product, gfc_resolve_sum,
771 gfc_resolve_parity): Use resolve_transformational.
772 * check.c (gfc_check_transf_bit_intrins): New function.
773 * simplify.c (gfc_simplify_iall, gfc_simplify_iany,
774 gfc_simplify_iparity, do_bit_any, do_bit_ior,
775 do_bit_xor, simplify_transformation): New functions.
776 (gfc_simplify_all, gfc_simplify_any, gfc_simplify_parity,
777 gfc_simplify_sum, gfc_simplify_product): Use simplify_transformation.
778 * trans-intrinsic.c (gfc_conv_intrinsic_arith,
779 gfc_conv_intrinsic_function, gfc_is_intrinsic_libcall):
780 Handle IALL, IANY and IPARITY intrinsics.
781 * intrinsic.texi (IMAGE_INDEX): Move up to fix alphabetic
783 (IALL, IANY, IPARITY): Document new intrinsics.
785 2010-09-05 Tobias Burnus <burnus@net-b.de>
788 * f95-lang.c (gfc_truthvalue_conversion): Use
789 fold_build[0-9]_loc instead of fold_build[0-9].
790 * convert.c (convert): Ditto.
791 * trans-intrinsic.c (gfc_conv_intrinsic_conversion,
792 build_fixbound_expr, build_fix_expr, gfc_conv_intrinsic_aint,
793 gfc_conv_intrinsic_int, gfc_conv_intrinsic_imagpart,
794 gfc_conv_intrinsic_conjg, gfc_trans_same_strlen_check,
795 gfc_conv_intrinsic_bound, gfc_conv_intrinsic_abs,
796 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_mod,
797 gfc_conv_intrinsic_dim, gfc_conv_intrinsic_sign,
798 gfc_conv_intrinsic_dprod, gfc_conv_intrinsic_char,
799 gfc_conv_intrinsic_ctime, gfc_conv_intrinsic_fdate,
800 gfc_conv_intrinsic_ttynam, gfc_conv_intrinsic_minmax,
801 gfc_conv_intrinsic_minmax_char, gfc_conv_intrinsic_anyall,
802 gfc_conv_intrinsic_count, gfc_conv_intrinsic_arith,
803 gfc_conv_intrinsic_dot_product, gfc_conv_intrinsic_minmaxloc,
804 gfc_conv_intrinsic_minmaxval, gfc_conv_intrinsic_btest,
805 gfc_conv_intrinsic_bitop, gfc_conv_intrinsic_not,
806 gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ibits,
807 gfc_conv_intrinsic_rlshift, gfc_conv_intrinsic_ishft,
808 gfc_conv_intrinsic_ishftc, gfc_conv_intrinsic_leadz,
809 gfc_conv_intrinsic_trailz, gfc_conv_intrinsic_popcnt_poppar,
810 gfc_conv_intrinsic_ichar, gfc_conv_has_intvalue,
811 gfc_conv_intrinsic_merge, gfc_conv_intrinsic_spacing,
812 gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_size,
813 size_of_string_in_bytes, gfc_conv_intrinsic_sizeof,
814 gfc_conv_intrinsic_storage_size, gfc_conv_intrinsic_strcmp,
815 gfc_conv_intrinsic_transfer, gfc_conv_allocated,
816 gfc_conv_associated, gfc_conv_same_type_as,
817 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat): Ditto.
819 2010-09-04 Tobias Burnus <burnus@net-b.de>
822 * resolve.c (resolve_fl_namelist): Change constraint checking
823 order to prevent endless loop.
825 2010-09-04 Janus Weil <janus@gcc.gnu.org>
828 * resolve.c (resolve_allocate_expr): Generate default initializers
829 already at this point, resolve them and put them into expr3, ...
830 * trans-stmt.c (gfc_trans_allocate): ... instead of waiting until
833 2010-09-03 Tobias Burnus <burnus@net-b.de>
836 * trans-intrinsic.c (gfc_conv_intrinsic_sign,
837 gfc_conv_intrinsic_leadz): Use build_call_expr_loc instead
839 * trans-expr.c (gfc_conv_expr_present, gfc_conv_missing_dummy,
840 gfc_conv_string_length, gfc_conv_substring,
841 gfc_conv_component_ref, gfc_conv_unary_op, gfc_conv_powi,
842 gfc_conv_cst_int_power, gfc_conv_string_tmp, gfc_conv_concat_op,
843 gfc_conv_expr_op, gfc_build_compare_string,
844 gfc_set_interface_mapping_bounds, gfc_conv_subref_array_arg,
845 gfc_conv_derived_to_class, conv_isocbinding_procedure,
846 gfc_conv_procedure_call, fill_with_spaces,
847 gfc_trans_string_copy, gfc_trans_alloc_subarray_assign,
848 gfc_trans_structure_assign, gfc_trans_pointer_assignment,
849 gfc_trans_scalar_assign, gfc_trans_zero_assign,
850 gfc_trans_array_copy, gfc_trans_array_constructor_copy): Change
851 fold_build[0-9] to fold_build[0-9]_loc.
852 * trans-io.c (set_parameter_const, set_parameter_value,
853 set_parameter_ref, gfc_convert_array_to_string, set_string,
854 set_internal_unit, io_result, set_error_locus,
855 nml_get_addr_expr, build_dt): Ditto.
856 * trans-openmp.c (gfc_omp_clause_default_ctor,
857 gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op,
858 gfc_trans_omp_array_reduction, gfc_trans_omp_atomic,
859 gfc_trans_omp_do): Ditto.
860 * trans.c (gfc_add_modify, gfc_build_addr_expr,
861 gfc_build_array_ref, gfc_trans_runtime_error_vararg,
862 gfc_trans_runtime_check, gfc_call_malloc,
863 gfc_allocate_with_status, gfc_allocate_array_with_status,
864 gfc_call_free, gfc_deallocate_with_status,
865 gfc_call_realloc): Ditto.
867 2010-09-03 Thomas Koenig <tkoenig@gcc.gnu.org>
870 * dependency.c (gfc_deb_compare_expr): Compare equal for equal
871 arglists for pure user functions, or for those intrinsic
872 functions which are also pure.
873 * intrinsics.c (add_conv): Mark conversion functions as pure.
874 (add_char_conversions): Likewise.
876 2010-09-03 Daniel Kraft <d@domob.eu>
879 * resolve.c (resolve_actual_arglist): Allow internal procedure
880 as actual argument with Fortran 2008.
882 2010-09-03 Daniel Kraft <d@domob.eu>
885 * gfortran.h (struct gfc_code): Renamed `whichloop' to
886 `which_construct' as this is no longer restricted to loops.
887 * parse.h (struct gfc_state_data): New field `construct'.
888 * match.c (match_exit_cycle): Handle EXIT from non-loops.
889 * parse.c (push_state): Set `construct' field.
890 * resolve.c (resolve_select_type): Extend comment.
891 * trans-stmt.c (gfc_trans_if): Add exit label.
892 (gfc_trans_block_construct), (gfc_trans_select): Ditto.
893 (gfc_trans_simple_do): Store exit/cycle labels on the gfc_code itself.
894 (gfc_trans_do), (gfc_trans_do_while): Ditto.
895 (gfc_trans_exit): Use new name `which_construct' instead of `whichloop'.
896 (gfc_trans_cycle): Ditto.
897 (gfc_trans_if_1): Use fold_build3_loc instead of fold_build3.
899 2010-09-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
901 * trans-intrinsic.c (gfc_conv_intrinsic_aint): Fix whitespace.
902 (gfc_conv_intrinsic_ishft): Only evaluate arguments once.
903 (gfc_conv_intrinsic_ishftc): Only evaluate arguments once.
904 * intrinsic.texi (RSHIFT): Fix documentation.
906 2010-09-02 Tobias Burnus <burnus@net-b.de>
909 * trans-common.c (create_common): Change build[0-9] to
911 * trans-const.c (gfc_conv_constant_to_tree,
912 gfc_conv_constant_to_tree): Ditto.
913 * trans-decl.c (gfc_build_qualified_array, build_entry_thunks,
914 gfc_get_fake_result_decl, gfc_trans_auto_character_variable,
915 add_argument_checking, create_main_function,
916 gfc_generate_return): Ditto.
917 * trans-types.c (gfc_get_dtype, gfc_get_array_type_bounds): Ditto.
918 * trans-stmt.c (allocate_temp_for_forall_nest_1,
919 compute_inner_temp_size, compute_overall_iter_number,
920 generate_loop_for_rhs_to_temp, generate_loop_for_temp_to_lhs,
921 gfc_conv_elemental_dependencies, gfc_do_allocate,
922 gfc_evaluate_where_mask, gfc_trans_allocate,
923 gfc_trans_arithmetic_if, gfc_trans_call,
924 gfc_trans_character_select, gfc_trans_deallocate,
925 gfc_trans_do, gfc_trans_do_while, gfc_trans_forall_1,
926 gfc_trans_forall_loop, gfc_trans_goto, gfc_trans_if_1,
927 gfc_trans_integer_select, gfc_trans_logical_select,
928 gfc_trans_pointer_assign_need_temp, gfc_trans_return,
929 gfc_trans_simple_do, gfc_trans_sync, gfc_trans_where_2,
930 gfc_trans_where_assign) Ditto.
932 2010-09-02 Janus Weil <janus@gcc.gnu.org>
935 * resolve.c (resolve_symbol): Correct check for attributes of CLASS
938 2010-09-02 Tobias Burnus <burnus@net-b.de>
941 * resolve.c (apply_default_init): Mark symbol as referenced,
942 if it is initialized.
943 (resolve_symbol): Change intialized check for BT_DERIVED such
944 that also function results get initialized; remove now obsolete
945 gfc_set_sym_referenced for BT_CLASS.
947 2010-09-01 Janus Weil <janus@gcc.gnu.org>
950 * class.c (gfc_find_derived_vtab): Add component '$def_init'.
951 * resolve.c (resolve_allocate_expr): Defer handling of default
952 initialization to 'gfc_trans_allocate'.
953 (apply_default_init,resolve_symbol): Handle polymorphic dummies.
954 (resolve_fl_derived): Suppress error messages for vtypes.
955 * trans-stmt.c (gfc_trans_allocate): Handle initialization via
956 polymorphic MOLD expression.
957 * trans-expr.c (gfc_trans_class_init_assign): Now only used for
958 dummy initialization.
960 2010-09-01 Tobias Burnus <burnus@net-b.de>
962 * gfortran.texi (preprocessing): Update URL to COCO.
964 2010-09-01 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
966 * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Resize
967 array quad_decls. Remove unnecessary assignment.
969 2010-09-01 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
971 * trans-expr.c (gfc_conv_power_op): Handle floating-point types
972 other than long double.
973 * mathbuiltins.def: Add builtins from the POW and CPOW family.
974 * trans.h (gfc_builtin_decl_for_float_kind): New prototype.
975 * trans-intrinsic.c (gfc_builtin_decl_for_float_kind): Add gfc_
976 prefix to function name.
977 (gfc_build_intrinsic_lib_fndecls): Add cpow prototype.
978 (gfc_conv_intrinsic_aint): Use gfc_builtin_decl_for_float_kind
980 (gfc_conv_intrinsic_exponent): Likewise.
981 (gfc_conv_intrinsic_abs): Likewise.
982 (gfc_conv_intrinsic_mod): Likewise.
983 (gfc_conv_intrinsic_sign): Likewise.
984 (gfc_conv_intrinsic_arith): Likewise.
985 (gfc_conv_intrinsic_fraction): Likewise.
986 (gfc_conv_intrinsic_nearest): Likewise.
987 (gfc_conv_intrinsic_spacing): Likewise.
988 (gfc_conv_intrinsic_rrspacing): Likewise.
989 (gfc_conv_intrinsic_scale): Likewise.
990 (gfc_conv_intrinsic_set_exponent): Likewise.
992 2010-09-01 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
994 * intrinsic.c: Add EXECUTE_COMMAND_LINE intrinsic.
995 * intrinsic.h (gfc_resolve_execute_command_line): New function.
996 * iresolve.c (gfc_resolve_execute_command_line): New function.
997 * gfortran.h (GFC_ISYM_EXECUTE_COMMAND_LINE): New value.
998 * intrinsic.texi: Document EXECUTE_COMMAND_LINE.
1000 2010-08-31 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1003 * f95-lang.c (gfc_init_builtin_functions): Define popcount{,l,ll}
1004 and parity{,l,ll} builtins.
1005 * trans-intrinsic.c (gfc_conv_intrinsic_popcnt_poppar): New function.
1006 (gfc_conv_intrinsic_function): Call above new functions.
1007 * simplify.c (gfc_simplify_popcnt, gfc_simplify_poppar): New
1009 * intrinsic.texi: Document POPCNT and POPPAR.
1011 2010-08-30 Janus Weil <janus@gcc.gnu.org>
1014 * resolve.c (resolve_structure_cons): Handle pointer-valued PPCs.
1016 2010-08-30 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1018 * Make-lang.in: Add frontend-passes.o dependencies.
1020 2010-08-29 Janus Weil <janus@gcc.gnu.org>
1023 * resolve.c (resolve_structure_cons): For derived types, make sure the
1024 type has been resolved.
1025 (resolve_typebound_procedures): Make sure the vtab has been generated.
1027 2010-08-29 Janus Weil <janus@gcc.gnu.org>
1030 * match.c (gfc_match_select_type): Give the associate-name the
1031 FL_VARIABLE attribute.
1033 2010-08-28 Steven G. Kargl <kargl@gcc.gnu.org>
1035 * simplify.c (gfc_simplify_bessel_n2): Fix indention
1038 2010-08-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1041 * trans-types.c (gfc_init_kinds): Disable TFmode.
1043 2010-08-27 Janus Weil <janus@gcc.gnu.org>
1046 * match.c (gfc_match_allocate): Avoid double free on error.
1048 2010-08-27 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1051 * gfortran.h (gfc_real_info): Add c_float128 field.
1052 * mathbuiltins.def: Indicate which builtins are const.
1053 * trans-types.h (float128_type_node, complex_float128_type_node,
1054 gfc_real16_is_float128): New variables.
1055 * trans-types.c (float128_type_node, complex_float128_type_node,
1056 gfc_real16_is_float128): New variables.
1057 (gfc_init_kinds): Allow TFmode.
1058 (gfc_build_real_type): Mark __float128 types as such.
1059 (gfc_init_types): Initialize float128_type_node and
1060 complex_float128_type_node
1061 * f95-lang.c (gfc_init_builtin_functions): Adjust for new
1062 argument of OTHER_BUILTIN macro.
1063 * trans-intrinsic.c (gfc_intrinsic_map_t): Likewise.
1064 (builtin_decl_for_precision): Special case for __float128.
1065 (builtin_decl_for_float_kind): Likewise.
1066 (define_quad_builtin): New function.
1067 (gfc_build_intrinsic_lib_fndecls): Create all __float128
1068 library decls if necessary. Store them in the real16_decl and
1069 complex16_decl builtin map fields.
1070 (gfc_get_intrinsic_lib_fndecl): Handle q-suffixed __float128
1071 library function names.
1073 2010-08-27 Tobias Burnus <burnus@net-b.de>
1076 * gcc/fortran/intrinsic.c (add_functions): Add norm2 and parity.
1077 * gcc/fortran/intrinsic.h (gfc_check_norm2, gfc_check_parity):
1078 gfc_simplify_norm2, gfc_simplify_parity, gfc_resolve_norm2,
1079 gfc_resolve_parity): New prototypes.
1080 * gcc/fortran/gfortran.h (gfc_isym_id): New enum items
1081 GFC_ISYM_NORM2 and GFC_ISYM_PARITY.
1082 * gcc/fortran/iresolve.c (gfc_resolve_norm2,
1083 gfc_resolve_parity): New functions.
1084 * gcc/fortran/check.c (gfc_check_norm2, gfc_check_parity):
1086 * gcc/fortran/trans-intrinsic.c (gfc_conv_intrinsic_arith,
1087 gfc_conv_intrinsic_function): Handle NORM2 and PARITY.
1088 * gcc/fortran/intrinsic.texi (NORM2, PARITY): Add.
1089 * gcc/fortran/simplify.c (simplify_transformation_to_array):
1090 Add post-processing opterator.
1091 (gfc_simplify_all, gfc_simplify_any, gfc_simplify_count,
1092 gfc_simplify_product, gfc_simplify_sum): Update call.
1093 (add_squared, do_sqrt, gfc_simplify_norm2, do_xor,
1094 gfc_simplify_parity): New functions.
1096 2010-08-27 Janus Weil <janus@gcc.gnu.org>
1099 * match.c (select_type_set_tmp): Add the possibility to reset the
1101 (gfc_match_class_is): Reset the temporary in CLASS DEFAULT clauses.
1103 2010-08-27 Thomas Koenig <tkoenig@gcc.gnu.org>
1106 * dependency.c (check_section_vs_section): Single test for
1107 identical strides which takes into account that only one
1108 of the strides may be NULL.
1110 2010-08-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1113 * primary.c (match_hollerith_constant): Calculate padding needed to
1114 fill default integer and allocate string for that size. Set pad bytes
1116 * gfortran.h: Add hollerith pad value to type spec union.
1117 * data.c (create_character_initializer): Fix spelling of function name.
1118 Use hollerith pad value to calculate length.
1119 * arith.c (hollerith2representation); Use hollerith pad value to
1122 2010-08-26 Daniel Kraft <d@domob.eu>
1127 * gfortran.h (struct gfc_association_list): New flag `dangling'.
1128 (gfc_build_block_ns): Declared here...
1129 * parse.h (gfc_build_block_ns): ...instead of here.
1130 * trans.h (gfc_process_block_locals): Expect additionally the
1131 gfc_association_list of BLOCK (if present).
1132 * match.c (select_type_set_tmp): Create sym->assoc for temporary.
1133 * resolve.c (resolve_variable): Only check for invalid *array*
1134 references on associate-names.
1135 (resolve_assoc_var): New method with code previously in resolve_symbol.
1136 (resolve_select_type): Use association to give the selector and
1137 temporaries their values instead of ordinary assignment.
1138 (resolve_fl_var_and_proc): Allow CLASS associate-names.
1139 (resolve_symbol): Use new `resolve_assoc_var' instead of inlining here.
1140 * trans-stmt.c (gfc_trans_block_construct): Pass association-list
1141 to `gfc_process_block_locals' to match new interface.
1142 * trans-decl.c (gfc_get_symbol_decl): Don't defer associate-names
1144 (gfc_process_block_locals): Defer them rather here when linked to
1145 from the BLOCK's association list.
1147 2010-08-25 Jakub Jelinek <jakub@redhat.com>
1149 * trans-decl.c (gfc_build_intrinsic_function_decls): Set
1150 TREE_NOTHROW on fndecls that can't throw. Set
1151 TREE_READONLY on gfor_fndecl_math_ishftc{4,8,16}.
1152 (gfc_build_builtin_function_decls): Set TREE_NOTHROW on
1153 gfor_fndecl_associated.
1155 2010-08-23 Mikael Morin <mikael@gcc.gnu.org>
1158 * frontend-passes.c (optimize_equality): Don't optimize array equality
1160 2010-08-23 Janus Weil <janus@gcc.gnu.org>
1163 * resolve.c (resolve_procedure_interface): New function split off from
1165 (resolve_formal_arglist): Call it here ...
1166 (resolve_symbol): ... and here.
1168 2010-08-22 Joseph Myers <joseph@codesourcery.com>
1170 * Make-lang.in (gfortranspec.o): Update dependencies.
1171 * gfortranspec.c: Include coretypes.h before gcc.h. Include
1173 (MATH_LIBRARY, FORTRAN_LIBRARY): Remove initial "-l".
1174 (ADD_ARG_LIBGFORTRAN, Option, lookup_option): Remove.
1175 (g77_xargc): Make unsigned.
1176 (g77_xargv): Change to g77_x_decoded_options.
1177 (g77_newargc): Make unsigned.
1178 (g77_newargv): Change to g77_new_decoded_options.
1179 (strings_same, options_same): New.
1180 (append_arg): Use cl_decoded_option structures.
1181 (append_option): New.
1182 (add_arg_libgfortran): New.
1183 (lang_specific_driver): Use cl_decoded_option structures.
1185 2010-08-21 Janus Weil <janus@gcc.gnu.org>
1189 * class.c (add_proc_comp): Add static initializer for PPCs.
1190 (add_procs_to_declared_vtab): Modified comment.
1191 * module.c (mio_component): Add argument 'vtype'. Don't read/write the
1192 initializer if the component is part of a vtype.
1193 (mio_component_list): Add argument 'vtype', pass it on to
1195 (mio_symbol): Modified call to 'mio_component_list'.
1196 * trans.h (gfc_conv_initializer): Modified prototype.
1197 (gfc_trans_assign_vtab_procs): Removed.
1198 * trans-common.c (create_common): Modified call to
1199 'gfc_conv_initializer'.
1200 * trans-decl.c (gfc_get_symbol_decl,get_proc_pointer_decl,
1201 gfc_emit_parameter_debug_info): Modified call to
1202 'gfc_conv_initializer'.
1203 (build_function_decl): Remove assertion.
1204 * trans-expr.c (gfc_conv_derived_to_class,gfc_trans_class_assign):
1205 Removed call to 'gfc_trans_assign_vtab_procs'.
1206 (gfc_conv_initializer): Add argument 'procptr'.
1207 (gfc_conv_structure): Modified call to 'gfc_conv_initializer'.
1208 (gfc_trans_assign_vtab_procs): Removed.
1209 * trans-stmt.c (gfc_trans_allocate): Removed call to
1210 'gfc_trans_assign_vtab_procs'.
1212 2010-08-21 Tobias Burnus <burnus@net-b.de>
1216 * intrinsic.c (add_sym): Init value attribute.
1217 (set_attr_value): New function.
1218 (add_functions) Use it and add JN/YN resolvers.
1219 * symbol.c (gfc_copy_formal_args_intr): Copy value attr.
1220 * intrinsic.h (gfc_resolve_bessel_n2): New prototype.
1221 * gfortran.h (gfc_intrinsic_arg): Add value attribute.
1222 * iresolve.c (gfc_resolve_bessel_n2): New function.
1223 * trans-intrinsic.c (gfc_get_symbol_for_expr): Create
1225 (gfc_conv_intrinsic_function,gfc_is_intrinsic_libcall):
1226 Add GFC_ISYM_JN2/GFC_ISYM_YN2 as case value.
1227 * simplify.c (): For YN set to -INF if previous values
1229 * trans-expr.c (gfc_conv_procedure_call): Don't crash
1231 * iresolve.c (gfc_resolve_extends_type_of): Set the
1232 type of the dummy argument to the one of the actual.
1234 2010-08-20 Joseph Myers <joseph@codesourcery.com>
1236 * lang.opt (MD, MMD): Use NoDriverArg instead of NoArgDriver.
1238 2010-08-20 Joseph Myers <joseph@codesourcery.com>
1240 * gfortranspec.c (lang_specific_driver): Refer to -lgfortran in
1243 2010-08-20 Nathan Froyd <froydnj@codesourcery.com>
1245 * trans-openmp.c: Use FOR_EACH_VEC_ELT.
1247 2010-08-19 Daniel Kraft <d@domob.eu>
1251 * trans.h (struct gfc_se): New flag `byref_noassign'.
1252 * trans-array.h (gfc_conv_shift_descriptor_lbound): New method.
1253 (gfc_conv_array_extent_dim), (gfc_conv_descriptor_size): New methods.
1254 * expr.c (gfc_check_pointer_assign): Allow bounds and rank remapping
1255 and check for compile-time errors with those.
1256 * trans-decl.c (trans_associate_var): Use new routine
1257 `gfc_conv_shift_descriptor_lbound' instead of doing it manually.
1258 * trans-array.c (gfc_conv_shift_descriptor_lbound): New method.
1259 (gfc_conv_array_extent_dim), (gfc_conv_descriptor_size): New methods.
1260 (gfc_array_init_size): Use new `gfc_conv_array_extent_dim'.
1261 (gfc_conv_expr_descriptor): Handle new flag `byref_noassign'.
1262 * trans-expr.c (gfc_trans_pointer_assignment): Handle bounds and
1263 rank remapping for assignment.
1265 2010-08-19 Tobias Burnus <burnus@net-b.de>
1267 * intrinsic.texi (Bessel_jn, Bessel_yn): Fix typo.
1268 * * simplify.c (gfc_simplify_bessel_yn): Change recursive
1271 2010-08-19 Tobias Burnus <burnus@net-b.de>
1275 * check.c (gfc_check_bessel_n2): New function.
1276 * gfortran.h (gfc_isym_id): Add GFC_ISYM_JN2 and GFC_ISYM_YN2.
1277 * intrinsic.c (add_functions): Add transformational version
1278 of the Bessel_jn/yn intrinsics.
1279 * intrinsic.h (gfc_check_bessel_n2,gfc_simplify_bessel_jn2,
1280 gfc_simplify_bessel_yn2): New prototypes.
1281 * intrinsic.texi (Bessel_jn, Bessel_yn): Document
1282 transformational variant.
1283 * simplify.c (gfc_simplify_bessel_jn, gfc_simplify_bessel_yn):
1284 Check for negative order.
1285 (gfc_simplify_bessel_n2,gfc_simplify_bessel_jn2,
1286 gfc_simplify_bessel_yn2): New functions.
1288 2010-08-19 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1291 * resolve.c (resolve_transfer): Traverse operands and set expression
1292 to be checked to a non EXPR_OP type.
1294 2010-08-19 Janus Weil <janus@gcc.gnu.org>
1297 * gfortran.h (gfc_add_save): Modified prototype.
1298 * decl.c (add_init_expr_to_sym): Defer checking of proc pointer init.
1299 (match_pointer_init): New function to match F08 pointer initialization.
1300 (variable_decl,match_procedure_decl,match_ppc_decl): Use
1301 'match_pointer_init'.
1302 (match_attr_spec): Module variables are implicitly SAVE.
1303 (gfc_match_save): Modified call to 'gfc_add_save'.
1304 * expr.c (gfc_check_assign_symbol): Extra checks for pointer
1306 * primary.c (gfc_variable_attr): Handle SAVE attribute.
1307 * resolve.c (resolve_structure_cons): Add new argument and do pointer
1308 initialization checks.
1309 (gfc_resolve_expr): Modified call to 'resolve_structure_cons'.
1310 (resolve_values): Call 'resolve_structure_cons' directly with init arg.
1311 (resolve_fl_variable): Handle SAVE_IMPLICIT.
1312 * symbol.c (gfc_add_save,gfc_copy_attr,save_symbol): Handle
1314 * trans-decl.c (gfc_create_module_variable): Module variables with
1315 TARGET can already exist.
1316 * trans-expr.c (gfc_conv_variable): Check for 'current_function_decl'.
1317 (gfc_conv_initializer): Implement non-NULL pointer
1320 2010-08-18 Tobias Burnus <burnus@net-b.de>
1323 * intrinsic.texi (selected_char_kind): Document ISO_10646
1326 2010-08-17 Jakub Jelinek <jakub@redhat.com>
1329 * trans-decl.c (build_library_function_decl_1): Chain on
1330 void_list_node instead of creating a new TREE_LIST.
1331 * trans-intrinsic.c (gfc_get_intrinsic_lib_fndecl): Likewise.
1332 * trans-types.c (gfc_get_function_type): Likewise. Set
1333 typelist to void_list_node for the main program.
1335 2010-08-17 Daniel Kraft <d@domob.eu>
1338 * gfortran.h (struct gfc_association_list): New member `where'.
1339 (gfc_is_associate_pointer) New method.
1340 * match.c (gfc_match_associate): Remember locus for each associate
1341 name matched and do not try to set variable flag.
1342 * parse.c (parse_associate): Use remembered locus for symbols.
1343 * primary.c (match_variable): Instead of variable-flag check for
1344 associate names set it for all such names used.
1345 * symbol.c (gfc_is_associate_pointer): New method.
1346 * resolve.c (resolve_block_construct): Don't generate assignments
1347 to give associate-names their values.
1348 (resolve_fl_var_and_proc): Allow associate-names to be deferred-shape.
1349 (resolve_symbol): Set some more attributes for associate variables,
1350 set variable flag here and check it and don't try to build an
1351 explicitely shaped array-spec for array associate variables.
1352 * trans-expr.c (gfc_conv_variable): Dereference in case of association
1354 * trans-types.c (gfc_is_nodesc_array): Handle array association symbols.
1355 (gfc_sym_type): Return pointer type for association to scalar vars.
1356 * trans-decl.c (gfc_get_symbol_decl): Defer association symbols.
1357 (trans_associate_var): New method.
1358 (gfc_trans_deferred_vars): Handle association symbols.
1360 2010-08-16 Joseph Myers <joseph@codesourcery.com>
1362 * lang.opt (MDX): Change back to MD. Mark NoDriverArg instead of
1364 (MMDX): Change back to MMD. Mark NoDriverArg instead of
1366 * cpp.c (gfc_cpp_handle_option): Use OPT_MD and OPT_MMD instead of
1367 OPT_MDX and OPT_MMDX.
1369 2010-08-16 Joseph Myers <joseph@codesourcery.com>
1371 * lang.opt (MDX, MMDX): Mark RejectDriver.
1373 2010-08-15 Janus Weil <janus@gcc.gnu.org>
1375 * trans-expr.c (gfc_trans_assign_vtab_procs): Clean up (we don't have
1376 vtabs for generics any more).
1378 2010-08-15 Daniel Kraft <d@domob.eu>
1381 * gfortran.h (gfc_find_proc_namespace): New method.
1382 * expr.c (gfc_build_intrinsic_call): No need to build symtree messing
1383 around with namespace.
1384 * symbol.c (gfc_find_proc_namespace): New method.
1385 * trans-decl.c (gfc_build_qualified_array): Use it for correct
1387 * primary.c (gfc_match_varspec): Handle associate-names as arrays.
1388 * parse.c (parse_associate): Removed assignment-generation here...
1389 * resolve.c (resolve_block_construct): ...and added it here.
1390 (resolve_variable): Handle names that are arrays but were not parsed
1391 as such because of association.
1392 (resolve_code): Fix BLOCK resolution.
1393 (resolve_symbol): Generate array-spec for associate-names.
1395 2010-08-15 Tobias Burnus <burnus@net-b.de>
1398 * decl.c (verify_c_interop_param): Remove superfluous space (" ").
1399 (verify_c_interop): Handle unresolved DT with bind(C).
1401 2010-08-15 Tobias Burnus <burnus@net-b.de>
1403 * trans-expr.c (gfc_conv_expr_present): Regard nullified
1404 pointer arrays as absent.
1405 (gfc_conv_procedure_call): Handle EXPR_NULL for non-pointer
1406 dummys as absent argument.
1407 * interface.c (compare_actual_formal,compare_parameter):
1410 2010-08-15 Tobias Burnus <burnus@net-b.de>
1412 * interface.c (compare_pointer, ): Allow passing TARGETs to pointers
1413 dummies with intent(in).
1415 2010-08-15 Daniel Kraft <d@domob.eu>
1418 * decl.c (gfc_match_prefix): Match IMPURE prefix and mark ELEMENTAL
1419 routines not IMPURE also as PURE.
1420 * intrinsic.c (enum klass): New class `CLASS_PURE' and renamed
1421 `NO_CLASS' in `CLASS_IMPURE'.
1422 (add_sym): Set symbol-attributes `pure' and `elemental' correctly.
1423 (add_sym_0s): Renamed `NO_CLASS' in `CLASS_IMPURE'.
1424 (add_functions): Ditto.
1425 (add_subroutines): Ditto and mark `MOVE_ALLOC' as CLASS_PURE.
1426 * resolve.c (gfc_pure): Do not treat ELEMENTAL as automatically PURE.
1427 (resolve_formal_arglist): Check that arguments to ELEMENTAL procedures
1428 are not ALLOCATABLE and have their INTENT specified.
1430 2010-08-13 Daniel Kraft <d@domob.eu>
1432 * gfortran.h (array_type): New type `AS_IMPLIED_SHAPE'.
1433 * array.c (gfc_match_array_spec): Match implied-shape specification and
1434 handle AS_IMPLIED_SHAPE correctly otherwise.
1435 * decl.c (add_init_expr_to_sym): Set upper bounds for implied-shape.
1436 (variable_decl): Some checks for implied-shape declaration.
1437 * resolve.c (resolve_symbol): Assert that array-spec is no longer
1438 AS_IMPLIED_SHAPE in any case.
1440 2010-08-12 Joseph Myers <joseph@codesourcery.com>
1442 * lang.opt (MD, MMD): Change to MDX and MMDX.
1443 * cpp.c (gfc_cpp_handle_option): Use OPT_MMD and OPT_MMDX.
1445 2010-08-11 Janus Weil <janus@gcc.gnu.org>
1448 * intrinsic.c (gfc_current_intrinsic_arg): Change type from 'char' to
1449 'gfc_intrinsic_arg'.
1450 (check_arglist,check_specific): Add reference to 'name' field.
1451 (init_arglist): Remove reference to 'name' field.
1452 * intrinsic.h (gfc_current_intrinsic_arg): Modify prototype.
1453 * check.c (variable_check): Reverse order of checks. Respect intent of
1455 (int_or_proc_check): New function.
1456 (coarray_check): New function.
1457 (allocatable_check): New function.
1458 (gfc_check_allocated,gfc_check_move_alloc): Use 'allocatable_check'.
1459 (gfc_check_complex): Use 'int_or_real_check'.
1460 (gfc_check_lcobound,gfc_check_image_index,gfc_check_this_image,
1461 gfc_check_ucobound): Use 'coarray_check'.
1462 (gfc_check_pack): Use 'real_or_complex_check'.
1463 (gfc_check_alarm_sub,gfc_check_signal,gfc_check_signal_sub): Use
1464 'int_or_proc_check'.
1465 (scalar_check,type_check,numeric_check,int_or_real_check,
1466 real_or_complex_check,kind_check,double_check,logical_array_check,
1467 array_check,same_type_check,rank_check,nonoptional_check,
1468 kind_value_check,gfc_check_a_p,gfc_check_associated,gfc_check_cmplx,
1469 gfc_check_cshift,gfc_check_dcmplx,gfc_check_dot_product,gfc_check_dprod,
1470 gfc_check_eoshift,gfc_check_fn_rc2008,gfc_check_index,gfc_check_kind,
1471 gfc_check_matmul,gfc_check_minloc_maxloc,check_reduction,gfc_check_null,
1472 gfc_check_present,gfc_check_reshape,gfc_check_same_type_as,
1473 gfc_check_spread,gfc_check_unpack,gfc_check_random_seed,
1474 gfc_check_getarg,gfc_check_and,gfc_check_storage_size): Add reference
1477 2010-08-10 Daniel Kraft <d@domob.eu>
1479 * gfortran.texi (Interoperability with C): Fix ordering in menu
1480 and add new subsection about pointers.
1481 (Interoperable Subroutines and Functions): Split off the pointer part.
1482 (working with Pointers): New subsection with extended discussion
1483 of pointers (especially procedure pointers).
1485 2010-08-09 Thomas Koenig <tkoenig@gcc.gnu.org>
1488 * array.c (gfc_ref_dimen_size): Add end argument.
1489 If end is non-NULL, calculate it.
1490 (ref_size): Adjust call to gfc_ref_dimen_size.
1491 (gfc_array_dimen_size): Likewise.
1492 (gfc_array_res_shape): Likewise.
1493 * gfortran.h: Adjust prototype for gfc_ref_dimen_size.
1494 * resolve.c (resolve_array_ref): For stride not equal to -1,
1495 fill in the lowest possible end.
1497 2010-08-09 Janus Weil <janus@gcc.gnu.org>
1499 * intrinsic.texi: Correct documentation of ASINH, ACOSH and ATANH.
1501 2010-08-07 Nathan Froyd <froydnj@codesourcery.com>
1503 * interface.c (compare_actual_formal): Use XALLOCAVEC instead of
1505 (check_some_aliasing): Likewise.
1506 * trans-intrinsic.c (gfc_conv_intrinsic_conversion): Likewise.
1507 (gfc_conv_intrinsic_int): Likewise.
1508 (gfc_conv_intrinsic_lib_function): Likewise.
1509 (gfc_conv_intrinsic_cmplx): Likewise.
1510 (gfc_conv_intrinsic_ctime): Likewise.
1511 (gfc_conv_intrinsic_fdate): Likewise.
1512 (gfc_conv_intrinsic_ttynam): Likewise.
1513 (gfc_conv_intrinsic_minmax): Likewise.
1514 (gfc_conv_intrinsic_minmax_char): Likewise.
1515 (gfc_conv_intrinsic_ishftc): Likewise.
1516 (gfc_conv_intrinsic_index_scan_verify): Likewise.
1517 (gfc_conv_intrinsic_merge): Likewise.
1518 (gfc_conv_intrinsic_trim): Likewise.
1519 * trans.c (gfc_trans_runtime_error_vararg): Likewise.
1521 2010-08-06 Thomas Koenig <tkoenig@gcc.gnu.org>
1524 * dependency.c (check_section_vs_section): Handle cases where
1525 the start expression coincides with the lower or upper
1528 2010-08-04 Janus Weil <janus@gcc.gnu.org>
1533 * class.c (gfc_find_derived_vtab): Do not generate vtabs for class
1534 container types. Do not artificially increase refs. Commit symbols one
1536 * interface.c (compare_parameter): Make sure vtabs are present before
1537 generating module variables.
1538 * resolve.c (resolve_allocate_expr): Ditto.
1540 2010-08-04 Tobias Burnus <burnus@net-b.de>
1544 * resolve.c (resolve_structure_cons): Fix
1547 2010-08-04 Mikael Morin <mikael@gcc.gnu.org>
1551 * symbol.c (changed_syms): Made static again.
1552 (gfc_symbol_state): Don't conditionalize on GFC_DEBUG.
1553 Changed conditional internal error into assert.
1554 Rename function to ...
1555 (gfc_enforce_clean_symbol_state): ... this.
1556 * gfortran.h (gfc_symbol_state, gfc_enforce_clean_symbol_state):
1557 Rename the former to the latter.
1558 * parse.c (decode_statement, decode_omp_directive,
1559 decode_gcc_attribute): Update callers accordingly. Don't conditionalize
1561 (changed_syms): Remove declaration.
1562 (next_statement): Use gfc_enforce_clean_symbol_state.
1564 2010-08-04 Tobias Burnus <burnus@net-b.de>
1567 * resolve.c (resolve_structure_cons): Fix handling of
1568 initialization structure constructors with character
1569 elements of the wrong length.
1570 * array.c (gfc_check_iter_variable): Add NULL check.
1571 (gfc_resolve_character_array_constructor): Also truncate
1574 2010-08-04 Tobias Burnus <burnus@net-b.de>
1576 * trans-io.c (gfc_build_io_library_fndecls): Fix return
1577 value of some libgfortran functions.
1579 2010-08-03 Thomas Koenig <tkoenig@gcc.gnu.org>
1582 * dependency.c (gfc_deb_compare_expr): Remove any integer
1583 conversion functions to larger types from both arguments.
1584 Remove handling these functions futher down.
1586 2010-08-03 Janus Weil <janus@gcc.gnu.org>
1590 * class.c (add_procs_to_declared_vtab1): Don't add erroneous procedures.
1591 * resolve.c (resolve_tb_generic_targets): Check for errors.
1593 2010-08-02 Thomas Koenig <tkoenig@gcc.gnu.org>
1596 * depencency.c (gfc_dep_resolver): Fix logic for when a loop
1599 2010-08-02 Thomas Koenig <tkoenig@gcc.gnu.org>
1602 * dependency.h: Add prototype for gfc_are_identical_variables.
1603 * frontend-passes.c: Include depencency.h.
1604 (optimimize_equality): Use gfc_are_identical_variables.
1605 * dependency.c (identical_array_ref): New function.
1606 (gfc_are_identical_variables): New function.
1607 (gfc_deb_compare_expr): Use gfc_are_identical_variables.
1608 * dependency.c (gfc_check_section_vs_section). Rename gfc_
1609 prefix from statc function.
1610 (check_section_vs_section): Change arguments to gfc_array_ref,
1611 adjust function body accordingly.
1613 2010-08-02 Mikael Morin <mikael@gcc.gnu.org>
1614 Janus Weil <janus@gcc.gnu.org>
1619 * intrinsic.c (gfc_get_intrinsic_sub_symbol): Commit changed symbol.
1620 * symbol.c (gen_cptr_param, gen_fptr_param, gen_shape_param,
1621 gfc_copy_formal_args, gfc_copy_formal_args_intr,
1622 gfc_copy_formal_args_ppc, generate_isocbinding_symbol): Ditto.
1623 * parse.c (parse_derived_contains, parse_spec, parse_progunit):
1624 Call reject_statement in case of error.
1625 (match_deferred_characteritics): Call gfc_undo_symbols in case match
1628 2010-08-01 Janus Weil <janus@gcc.gnu.org>
1631 * class.c (gfc_build_class_symbol): Make '$vptr' component private.
1632 (gfc_find_derived_vtab): Make vtabs and vtypes public.
1633 * module.c (read_module): When reading module files, always import
1634 vtab and vtype symbols.
1636 2010-07-31 Mikael Morin <mikael@gcc.gnu.org>
1640 * symbol.c (changed_syms): Made non-static.
1641 * parse.c (changed_syms): Declare new external.
1642 (next_statement): Assert changed_syms is NULL at the beginning.
1644 2010-07-30 Janus Weil <janus@gcc.gnu.org>
1645 Steven G. Kargl <kargl@gcc.gnu.org>
1648 * match.c (match_type_spec): Try to parse derived types before
1651 2010-07-30 Mikael Morin <mikael@gcc.gnu.org>
1653 * gfortran.h (gfc_release_symbol): New prototype.
1654 * symbol.c (gfc_release_symbol): New. Code taken from free_sym_tree.
1655 (gfc_undo_symbols, free_sym_tree, gfc_free_finalizer):
1656 Use gfc_release_symbol.
1657 * parse.c (gfc_fixup_sibling_symbols): Ditto.
1658 * resolve.c (resolve_symbol): Ditto.
1660 2010-07-29 Tobias Burnus <burnus@net-b.de>
1664 * trans-decl.c (gfc_get_extern_function_decl): Correctly handle
1665 external procedure declarations in modules.
1666 (gfc_get_symbol_decl): Modify assert.
1668 2010-07-29 Janus Weil <janus@gcc.gnu.org>
1671 * resolve.c (resolve_fl_derived): Call gfc_resolve_array_spec.
1673 2010-07-29 Janus Weil <janus@gcc.gnu.org>
1676 * trans-stmt.h (gfc_trans_class_init_assign): New prototype.
1677 (gfc_trans_class_assign): Modified prototype.
1678 * trans.h (gfc_conv_intrinsic_move_alloc): New prototype.
1679 * trans-expr.c (gfc_trans_class_init_assign): Split off from ...
1680 (gfc_trans_class_assign): ... here. Modified actual arguments.
1681 * trans-intrinsic.c (gfc_conv_intrinsic_move_alloc): New function to
1682 handle the MOVE_ALLOC intrinsic with scalar and class arguments.
1683 * trans.c (trans_code): Call 'gfc_conv_intrinsic_move_alloc'.
1685 2010-07-29 Mikael Morin <mikael@gcc.gnu.org>
1689 * class.c (gfc_find_derived_vtab): Accept or discard newly created
1690 symbols before returning.
1692 2010-07-29 Joseph Myers <joseph@codesourcery.com>
1694 * lang.opt (cpp): Remove Joined and Separate markers.
1695 (cpp=): New internal option.
1696 * lang-specs.h (F951_CPP_OPTIONS): Generate -cpp= option.
1697 * cpp.c (gfc_cpp_handle_option): Handle OPT_cpp_ instead of
1700 2010-07-29 Daniel Kraft <d@domob.eu>
1703 * array.c (resolve_array_bound): Fix error message to properly handle
1704 non-variable expressions.
1706 2010-07-28 Mikael Morin <mikael@gcc.gnu.org>
1708 * decl.c (free_value): Also free repeat field.
1709 * data.c (gfc_assign_data_value): Always free offset before returning.
1711 2010-07-28 Daniel Kraft <d@domob.eu>
1713 * gfortran.h (gfc_build_intrinsic_call): New method.
1714 * expr.c (gfc_build_intrinsic_call): New method.
1715 * simplify.c (range_check): Ignore non-constant value.
1716 (simplify_bound_dim): Handle non-variable expressions and
1717 fix memory leak with non-free'ed expression.
1718 (simplify_bound): Handle non-variable expressions.
1719 (gfc_simplify_shape): Ditto.
1720 (gfc_simplify_size): Ditto, but only in certain cases possible.
1722 2010-07-28 Joseph Myers <joseph@codesourcery.com>
1724 * gfortranspec.c (SWITCH_TAKES_ARG, WORD_SWITCH_TAKES_ARG):
1727 2010-07-28 Tobias Burnus <burnus@net-b.de>
1730 * trans-types.c (gfc_get_derived_type): Fix DT declaration
1731 from modules for whole-file mode.
1733 2010-07-27 Joseph Myers <joseph@codesourcery.com>
1735 * gfortran.h (gfc_handle_option): Update prototype and return
1737 * options.c (gfc_handle_option): Update prototype and return value
1740 2010-07-27 Joseph Myers <joseph@codesourcery.com>
1742 * cpp.c (gfc_cpp_init_options): Update prototype. Use number of
1743 decoded options in allocating deferred_opt.
1744 * cpp.h (gfc_cpp_init_options): Update prototype.
1745 * f95-lang.c (LANG_HOOKS_OPTION_LANG_MASK): Define.
1746 * gfortran.h (gfc_option_lang_mask): New.
1747 (gfc_init_options): Update prototype.
1748 * options.c (gfc_option_lang_mask): New.
1749 (gfc_init_options): Update prototype. Pass new arguments to
1750 gfc_cpp_init_options.
1752 2010-07-26 Tobias Burnus <burnus@net-b.de>
1755 * trans-decl.c (gfc_get_extern_function_decl): Fix generation
1756 for functions which are later in the same file.
1757 (gfc_create_function_decl, build_function_decl,
1758 build_entry_thunks): Add global argument.
1759 * trans.c (gfc_generate_module_code): Update
1760 gfc_create_function_decl call.
1761 * trans.h (gfc_create_function_decl): Update prototype.
1762 * resolve.c (resolve_global_procedure): Also resolve for
1765 2010-07-26 Richard Henderson <rth@redhat.com>
1768 * f95-lang.c (LANG_HOOKS_WRITE_GLOBALS): New.
1769 (gfc_write_global_declarations): New.
1771 2010-07-26 Tobias Burnus <burnus@net-b.de>
1774 * trans-io.c (build_dt): Use NULL_TREE rather than NULL
1775 for call to transfer_namelist_element.
1776 * trans-decl.c (gfc_get_symbol_decl): Also set sym->backend_decl
1779 2010-07-25 Thomas Koenig <tkoenig@gcc.gnu.org>
1782 * Make-lang.in: Add fortran/frontend-passes.o.
1783 * gfortran.h: Add prototype for gfc_run_passes.
1784 * resolve.c (gfc_resolve): Call gfc_run_passes.
1785 * frontend-passes.c: New file.
1787 2010-07-25 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1790 * scanner.c (gfc_next_char_literal): Enable truncation warning for
1793 2010-07-25 Mikael Morin <mikael@gcc.gnu.org>
1796 * gfortran.h (gfc_namespace): New field old_equiv.
1797 (gfc_free_equiv_until): New prototype.
1798 * match.c (gfc_free_equiv_until): New, renamed from gfc_free_equiv with
1799 a parameterized stop condition.
1800 (gfc_free_equiv): Use gfc_free_equiv_until.
1801 * parse.c (next_statement): Save equivalence list.
1802 (reject_statement): Restore equivalence list.
1804 2010-07-25 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1807 * scanner.c (gfc_next_char_literal): Move check for truncation earlier
1808 in the function so that it does not get missed by early exits.
1809 (load_line): Add checks for quoted strings and free form comments to
1810 disable warnings on comments. Add check for ampersand as first
1811 character after truncation and don't warn for this case, but warn if
1812 there are subsequent non-whitespace characters.
1814 2010-07-24 Tobias Burnus <burnus@net-b.de>
1817 * parse.c (gfc_parse_file): Do not override
1818 gfc_global_ns_list items.
1820 2010-07-24 Tobias Burnus <burnus@net-b.de>
1822 * options.c (gfc_init_options): Enable -fwhole-file by default.
1823 * interface.c (compare_parameter): Assume a Hollerith constant is
1824 compatible with all other argument types.
1826 2010-07-23 Tobias Burnus <burnus@net-b.de>
1829 * trans-decl.c (gfc_get_symbol_decl): Use module decl with
1830 -fwhole-file also for derived types.
1831 * trans-types.c (copy_dt_decls_ifequal): Remove static and
1832 rename to gfc_copy_dt_decls_ifequal.
1833 (gfc_get_derived_type): Update call.
1834 * trans-types.h (gfc_copy_dt_decls_ifequal): Add prototype.
1836 2010-07-23 Tobias Burnus <burnus@net-b.de>
1839 * resolve.c (resolve_global_procedure): Properly handle ENTRY.
1841 2010-07-23 Jakub Jelinek <jakub@redhat.com>
1843 * trans-types.c (gfc_get_array_descriptor_base,
1844 gfc_get_array_type_bounds): Set TYPE_NAMELESS.
1845 * trans-decl.c (gfc_build_qualified_array): Set DECL_NAMELESS
1846 instead of clearing DECL_NAME.
1847 (gfc_build_dummy_array_decl): Set DECL_NAMELESS.
1849 2009-07-23 Paul Thomas <pault@gcc.gnu.org>
1852 * trans-array.c (gfc_init_loopinfo): Initialize the reverse
1854 gfc_trans_scalarized_loop_end: If reverse set in dimension n,
1855 reverse the scalarization loop.
1856 gfc_conv_resolve_dependencies: Pass the reverse field of the
1857 loopinfo to gfc_dep_resolver.
1858 trans-expr.c (gfc_trans_assignment_1): Enable loop reversal for
1859 assignment by resetting loop.reverse.
1860 gfortran.h : Add the gfc_reverse enum.
1861 trans.h : Add the reverse field to gfc_loopinfo.
1862 dependency.c (gfc_check_dependency): Pass null to the new arg
1863 of gfc_dep_resolver.
1864 (gfc_check_section_vs_section): Check for reverse dependencies.
1865 (gfc_dep_resolver): Add reverse argument and deal with the loop
1867 dependency.h : Modify prototype for gfc_dep_resolver to include
1870 2010-07-23 Daniel Kraft <d@domob.eu>
1873 * gfortran.h (gfc_find_symtree_in_proc): New method.
1874 * symbol.c (gfc_find_symtree_in_proc): New method.
1875 * match.c (match_exit_cycle): Look for loop name also in parent
1876 namespaces within current procedure.
1878 2010-07-22 Tobias Burnus <burnus@net-b.de>
1881 * dependency.c (gfc_check_dependency): Add argument alising check.
1882 * symbol.c (gfc_symbols_could_alias): Add argument alising check.
1884 2010-07-22 Daniel Kraft <d@domob.eu>
1886 * trans-stmt.c (gfc_trans_return): Put back in the handling of se.post,
1887 now in the correct place.
1889 2010-07-21 Steven G. Kargl <kargl@gcc.gnu.org>
1892 * Revert my commit r162325.
1894 2010-07-21 Daniel Kraft <d@domob.eu>
1896 * trans.h (gfc_get_return_label): Removed.
1897 (gfc_generate_return): New method.
1898 (gfc_trans_deferred_vars): Update gfc_wrapped_block rather than
1899 returning a tree directly.
1900 * trans-stmt.c (gfc_trans_return): Use `gfc_generate_return'.
1901 (gfc_trans_block_construct): Update for new interface to
1902 `gfc_trans_deferred_vars'.
1903 * trans-decl.c (current_function_return_label): Removed.
1904 (current_procedure_symbol): New variable.
1905 (gfc_get_return_label): Removed.
1906 (gfc_trans_deferred_vars): Update gfc_wrapped_block rather than
1907 returning a tree directly.
1908 (get_proc_result), (gfc_generate_return): New methods.
1909 (gfc_generate_function_code): Clean up and do init/cleanup here
1910 also with gfc_wrapped_block. Remove return-label but rather
1913 2010-07-19 Steven G. Kargl <kargl@gcc.gnu.org>
1916 * fortran/match.c (match_type_spec): Check for derived type before
1919 2010-07-19 Paul Thomas <pault@gcc.gnu.org>
1922 * interface.c (matching_typebound_op): Add argument for the
1923 return of the generic name for the procedure.
1924 (build_compcall_for_operator): Add an argument for the generic
1925 name of an operator procedure and supply it to the expression.
1926 (gfc_extend_expr, gfc_extend_assign): Use the generic name in
1927 calls to the above procedures.
1928 * resolve.c (resolve_typebound_function): Catch procedure
1929 component calls for CLASS objects, check that the vtable is
1930 complete and insert the $vptr and procedure components, to make
1932 (resolve_typebound_function): The same.
1933 * trans-decl.c (gfc_trans_deferred_vars): Do not deallocate
1934 an allocatable scalar if it is a result.
1936 2010-07-19 Paul Thomas <pault@gcc.gnu.org>
1939 * match.c (gfc_match_iterator): Reverted.
1941 2010-07-18 Paul Thomas <pault@gcc.gnu.org>
1944 * match.c (gfc_match_iterator): Remove error that iterator
1945 cannot be INTENT(IN).
1947 2010-07-17 Mikael Morin <mikael@gcc.gnu.org>
1949 * trans-array.c (gfc_free_ss): Don't free beyond ss rank.
1950 Access subscript through the "dim" field index.
1951 (gfc_trans_create_temp_array): Access ss info through the "dim" field
1953 (gfc_conv_array_index_offset): Ditto.
1954 (gfc_conv_loop_setup): Ditto.
1955 (gfc_conv_expr_descriptor): Ditto.
1956 (gfc_conv_ss_startstride): Ditto. Update call to
1957 gfc_conv_section_startstride.
1958 (gfc_conv_section_startstride): Set values along the array dimension.
1959 Get array dimension directly from the argument.
1961 2010-07-15 Jakub Jelinek <jakub@redhat.com>
1963 * trans.h (gfc_string_to_single_character): New prototype.
1964 * trans-expr.c (string_to_single_character): Renamed to ...
1965 (gfc_string_to_single_character): ... this. No longer static.
1966 (gfc_conv_scalar_char_value, gfc_build_compare_string,
1967 gfc_trans_string_copy): Adjust callers.
1968 * config-lang.in (gtfiles): Add fortran/trans-stmt.c.
1969 * trans-stmt.c: Include ggc.h and gt-fortran-trans-stmt.h.
1970 (select_struct): Move to toplevel, add GTY(()).
1971 (gfc_trans_character_select): Optimize SELECT CASE
1972 with character length 1.
1974 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
1976 * f95-lang.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
1977 * trans-common.c: Likewise.
1978 * trans-decl.c: Likewise.
1979 * trans-types.c: Likewise.
1980 * trans.c: Likewise.
1982 2010-07-15 Janus Weil <janus@gcc.gnu.org>
1985 * resolve.c (resolve_typebound_generic_call): Resolve generic
1986 non-polymorphic type-bound procedure calls to the correct specific
1988 (resolve_typebound_subroutine): Remove superfluous code.
1990 2010-07-15 Daniel Kraft <d@domob.eu>
1993 * trans.h (struct gfc_wrapped_block): New struct.
1994 (gfc_start_wrapped_block), (gfc_add_init_cleanup): New methods.
1995 (gfc_finish_wrapped_block): New method.
1996 (gfc_init_default_dt): Add new init code to block rather than
1998 * trans-array.h (gfc_trans_auto_array_allocation): Use gfc_wrapped_block
1999 (gfc_trans_dummy_array_bias): Ditto.
2000 (gfc_trans_g77_array): Ditto.
2001 (gfc_trans_deferred_array): Ditto.
2002 * trans.c (gfc_add_expr_to_block): Call add_expr_to_chain.
2003 (add_expr_to_chain): New method based on old gfc_add_expr_to_block.
2004 (gfc_start_wrapped_block), (gfc_add_init_cleanup): New methods.
2005 (gfc_finish_wrapped_block): New method.
2006 * trans-array.c (gfc_trans_auto_array_allocation): use gfc_wrapped_block
2007 (gfc_trans_g77_array), (gfc_trans_dummy_array_bias): Ditto.
2008 (gfc_trans_deferred_array): Ditto.
2009 * trans-decl.c (gfc_trans_dummy_character): Ditto.
2010 (gfc_trans_auto_character_variable), (gfc_trans_assign_aux_var): Ditto.
2011 (init_intent_out_dt): Ditto.
2012 (gfc_init_default_dt): Add new init code to block rather than
2014 (gfc_trans_deferred_vars): Use gfc_wrapped_block to collect all init
2015 and cleanup code and put it all together.
2017 2010-07-15 Jakub Jelinek <jakub@redhat.com>
2019 * trans.h (gfc_build_compare_string): Add CODE argument.
2020 * trans-intrinsic.c (gfc_conv_intrinsic_strcmp): Pass OP to
2021 gfc_build_compare_string.
2022 * trans-expr.c (gfc_conv_expr_op): Pass CODE to
2023 gfc_build_compare_string.
2024 (string_to_single_character): Rename len variable to length.
2025 (gfc_optimize_len_trim): New function.
2026 (gfc_build_compare_string): Add CODE argument. If it is EQ_EXPR
2027 or NE_EXPR and one of the strings is string literal with LEN_TRIM
2028 bigger than the length of the other string, they compare unequal.
2031 * trans-stmt.c (gfc_trans_character_select): Always use NULL for high
2032 in CASE_LABEL_EXPR and use NULL for low for the default case.
2034 2010-07-14 Mikael Morin <mikael@gcc.gnu.org>
2036 * trans-array.c (gfc_conv_section_upper_bound): Remove
2037 (gfc_conv_section_startstride): Don't set the upper bound in the
2038 vector subscript case.
2039 (gfc_conv_loop_setup): Don't use gfc_conv_section_upper_bound
2041 2010-07-14 Janus Weil <janus@gcc.gnu.org>
2044 * gfortran.h (gfc_is_data_pointer): Remove prototype.
2045 * dependency.c (gfc_is_data_pointer): Make it static.
2046 * intrinsic.texi: Update documentation on C_LOC.
2047 * resolve.c (gfc_iso_c_func_interface): Fix pointer and target checks
2048 and add a check for polymorphic variables.
2050 2010-07-14 Jakub Jelinek <jakub@redhat.com>
2052 * trans-expr.c (string_to_single_character): Also optimize
2053 string literals containing a single char followed only by spaces.
2054 (gfc_trans_string_copy): Remove redundant string_to_single_character
2057 * trans-decl.c (gfc_build_intrinsic_function_decls,
2058 gfc_build_builtin_function_decls): Mark functions as
2059 DECL_PURE_P or TREE_READONLY.
2061 2010-07-13 Nathan Froyd <froydnj@codesourcery.com>
2063 * trans-decl.c (build_entry_thunks): Call build_call_expr_loc_vec
2064 instead of build_function_call_expr.
2065 * trans-intrinsic.c (gfc_conv_intrinsic_sr_kind): Likewise.
2067 2010-07-13 Tobias Burnus <burnus@net-b.de>
2068 Daniel Franke <franke.daniel@gmail.com>
2071 * trans.h (gfc_build_library_function_decl_with_spec): New prototype.
2072 * trans-decl.c (gfc_build_library_function_decl_with_spec): Removed
2074 * trans-io (gfc_build_io_library_fndecls): Add "fn spec" annotations.
2076 2010-07-13 Daniel Franke <franke.daniel@gmail.com>
2077 Tobias Burnus <burnus@net-b.de>
2080 * trans-decl.c (gfc_build_intrinsic_function_decls): Add
2081 noclobber/noescape annotations to function calls.
2082 (gfc_build_builtin_function_decls): Likewise.
2084 2010-07-13 Janus Weil <janus@gcc.gnu.org>
2090 * gfortran.h (gfc_find_derived_vtab): Modified prototype.
2091 * class.c (gfc_build_class_symbol): Modified call to
2092 'gfc_find_derived_vtab'.
2093 (add_proc_component): Removed, moved code into 'add_proc_comp'.
2094 (add_proc_comps): Renamed to 'add_proc_comp', removed treatment of
2096 (add_procs_to_declared_vtab1): Removed unnecessary argument 'resolved'.
2097 Removed treatment of generics.
2098 (copy_vtab_proc_comps): Removed unnecessary argument 'resolved'.
2099 Call 'add_proc_comp' instead of duplicating code.
2100 (add_procs_to_declared_vtab): Removed unnecessary arguments 'resolved'
2102 (add_generic_specifics,add_generics_to_declared_vtab): Removed.
2103 (gfc_find_derived_vtab): Removed unnecessary argument 'resolved'.
2104 Removed treatment of generics.
2105 * iresolve.c (gfc_resolve_extends_type_of): Modified call to
2106 'gfc_find_derived_vtab'.
2107 * resolve.c (resolve_typebound_function,resolve_typebound_subroutine):
2108 Removed treatment of generics.
2109 (resolve_select_type,resolve_fl_derived): Modified call to
2110 'gfc_find_derived_vtab'.
2111 * trans-decl.c (gfc_get_symbol_decl): Ditto.
2112 * trans-expr.c (gfc_conv_derived_to_class,gfc_trans_class_assign):
2114 * trans-stmt.c (gfc_trans_allocate): Ditto.
2116 2010-07-12 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2119 * trans-io.c (build_dt): Set common.unit to flag chracter(kind=4)
2122 2010-07-12 Mikael Morin <mikael@gcc.gnu.org>
2124 * expr.c (gfc_get_int_expr): Don't initialize mpfr data twice.
2125 * resolve.c (build_default_init_expr): Ditto.
2127 2010-07-11 Tobias Burnus <burnus@net-b.de>
2130 * module.c (sort_iso_c_rename_list): Remove.
2131 (import_iso_c_binding_module,use_iso_fortran_env_module):
2132 Allow multiple imports of the same symbol.
2134 2010-07-11 Mikael Morin <mikael@gcc.gnu.org>
2136 * arith.c (gfc_arith_done_1): Release mpfr internal caches.
2138 2010-07-11 Janus Weil <janus@gcc.gnu.org>
2141 * decl.c (build_sym,attr_decl1): Only build the class container if the
2142 symbol has sufficient attributes.
2143 * expr.c (gfc_check_pointer_assign): Use class_pointer instead of
2144 pointer attribute for classes.
2145 * match.c (gfc_match_allocate,gfc_match_deallocate): Ditto.
2146 * module.c (MOD_VERSION): Bump.
2147 (enum ab_attribute,attr_bits): Add AB_CLASS_POINTER.
2148 (mio_symbol_attribute): Handle class_pointer attribute.
2149 * parse.c (parse_derived): Use class_pointer instead of pointer
2150 attribute for classes.
2151 * primary.c (gfc_variable_attr,gfc_expr_attr): Ditto.
2152 * resolve.c (resolve_structure_cons,resolve_deallocate_expr,
2153 resolve_allocate_expr,resolve_fl_derived): Ditto.
2154 (resolve_fl_var_and_proc): Check for class_ok attribute.
2156 2010-07-10 Mikael Morin <mikael@gcc.gnu.org>
2158 * trans-io.c (gfc_build_st_parameter): Update calls to
2159 gfc_add_field_to_struct.
2160 * trans-stmt.c (ADD_FIELD): Ditto.
2162 (gfc_get_derived_type): Ditto. Don't create backend_decl for C_PTR's
2164 (gfc_add_field_to_struct_1): Set TYPE_FIELDS(context) instead of
2165 fieldlist, remove fieldlist from argument list.
2166 (gfc_add_field_to_struct): Update call to gfc_add_field_to_struct_1
2167 and remove fieldlist from argument list.
2168 (gfc_get_desc_dim_type, gfc_get_array_descriptor_base,
2169 gfc_get_mixed_entry_union): Move setting
2170 TYPE_FIELDS to gfc_add_field_to_struct_1 and update calls to it.
2171 * trans-types.h (gfc_add_field_to_struct): Update prototype.
2173 2010-07-10 Paul Thomas <pault@gcc.gnu.org>
2176 * trans-expr.c (arrayfunc_assign_needs_temporary): No temporary
2177 if the lhs has never been host associated, as well as not being
2178 use associated, a pointer or a target.
2179 * resolve.c (resolve_variable): Mark variables that are host
2181 * gfortran.h: Add the host_assoc bit to the symbol_attribute
2184 2010-07-09 Janus Weil <janus@gcc.gnu.org>
2186 * intrinsic.texi: Add documentation for SAME_TYPE_AS, EXTENDS_TYPE_OF,
2187 STORAGE_SIZE, C_NULL_PTR and C_NULL_FUNPTR. Modify documentation of
2188 SIZEOF and C_SIZEOF.
2190 2010-07-08 Janus Weil <janus@gcc.gnu.org>
2193 * gfortran.h (gfc_isym_id): Add GFC_ISYM_C_SIZEOF,GFC_ISYM_STORAGE_SIZE.
2194 * intrinsic.h (gfc_check_c_sizeof,gfc_check_storage_size,
2195 gfc_resolve_storage_size): New prototypes.
2196 * check.c (gfc_check_c_sizeof,gfc_check_storage_size): New functions.
2197 * intrinsic.c (add_functions): Add STORAGE_SIZE.
2198 * iresolve.c (gfc_resolve_storage_size): New function.
2199 * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): Handle polymorphic
2201 (gfc_conv_intrinsic_storage_size): New function.
2202 (gfc_conv_intrinsic_function): Handle STORAGE_SIZE.
2204 2010-07-08 Jakub Jelinek <jakub@redhat.com>
2207 * match.c (match_exit_cycle): Error on EXIT also from collapsed
2208 !$omp do loops. Error on CYCLE to non-innermost collapsed
2211 2010-07-08 Tobias Burnus <burnus@net-b.de>
2214 * array.c (gfc_match_array_ref): Better error message for
2215 coarrays with too few ranks.
2216 (match_subscript): Move one diagnostic to caller.
2217 * gfortran.h (gfc_get_corank): Add prottype.
2218 * expr.c (gfc_get_corank): New function.
2219 * iresolve.c (resolve_bound): Fix rank for cobounds.
2220 (gfc_resolve_lbound,gfc_resolve_lcobound, gfc_resolve_ubound,
2221 gfc_resolve_ucobound, gfc_resolve_this_image): Update
2224 2010-07-06 Tobias Burnus <burnus@net-b.de>
2227 * array.c (gfc_expand_constructor): Add optional diagnostic.
2228 * gfortran.h (gfc_expand_constructor): Update prototype.
2229 * expr.c (gfc_simplify_expr, check_init_expr,
2230 gfc_reduce_init_expr): Update gfc_expand_constructor call.
2231 * resolve.c (gfc_resolve_expr): Ditto.
2233 2010-07-06 Tobias Burnus <burnus@net-b.de>
2235 * trans-decl.c: Include diagnostic-core.h besides toplev.h.
2236 * trans-intrinsic.c: Ditto.
2237 * trans-types.c: Ditto.
2238 * convert.c: Include diagnostic-core.h instead of toplev.h.
2240 * trans-array.c: Ditto.
2241 * trans-const.c: Ditto.
2242 * trans-expr.c: Ditto.
2243 * trans-io.c: Ditto.
2244 * trans-openmp.c: Ditto.
2247 2010-07-06 Thomas Koenig <tkoenig@gcc.gnu.org>
2250 * check.c (dim_rank_check): Also check intrinsic functions.
2251 Adjust permissible rank for functions which reduce the rank of
2252 their argument. Spread is an exception, where DIM can
2253 be one larger than the rank of array.
2255 2010-07-05 Steven G. Kargl <kargl@gcc.gnu.org>
2258 * fortran/io.c (resolve_tag): Check EXIST tag is a default logical.
2260 2010-07-05 Paul Thomas <pault@gcc.gnu.org>
2263 * trans-types.c (gfc_get_derived_type): Derived type fields
2264 with the vtype attribute must have TYPE_REF_CAN_ALIAS_ALL set
2265 but build_pointer_type_for_mode must be used for this.
2267 2010-07-05 Nathan Froyd <froydnj@codesourcery.com>
2269 * trans.h (gfc_conv_procedure_call): Take a VEC instead of a tree.
2270 * trans-intrinsic.c (gfc_conv_intrinsic_funcall): Adjust for new
2271 type of gfc_conv_procedure_call.
2272 (conv_generic_with_optional_char_arg): Likewise.
2273 * trans-stmt.c (gfc_trans_call): Likewise.
2274 * trans-expr.c (gfc_conv_function_expr): Likewise.
2275 (gfc_conv_procedure_call): Use build_call_vec instead of
2278 2010-07-04 Daniel Kraft <d@domob.eu>
2280 * gfc-internals.texi (gfc_code): Document BLOCK and ASSOCIATE.
2282 2010-07-04 Paul Thomas <pault@gcc.gnu.org>
2286 * trans-types.c (gfc_get_derived_type): Derived type fields
2287 with the vtype attribute must have TYPE_REF_CAN_ALIAS_ALL set.
2289 2010-07-02 Mikael Morin <mikael@gcc.gnu.org>
2292 * decl.c (match_procedure_in_type): Clear structure before using.
2293 (gfc_match_generic): Ditto.
2295 2010-07-02 Nathan Froyd <froydnj@codesourcery.com>
2297 * trans-types.h (gfc_add_field_to_struct): Add tree ** parameter.
2298 * trans-types.c (gfc_add_field_to_struct_1): New function, most
2299 of which comes from...
2300 (gfc_add_field_to_struct): ...here. Call it. Add new parameter.
2301 (gfc_get_desc_dim_type): Call gfc_add_field_to_struct_1 for
2303 (gfc_get_array_descriptor_base): Likewise.
2304 (gfc_get_mixed_entry_union): Likewise.
2305 (gfc_get_derived_type): Add extra chain parameter for
2306 gfc_add_field_to_struct.
2307 * trans-stmt.c (gfc_trans_character_select): Likewise.
2308 * trans-io.c (gfc_build_st_parameter): Likewise.
2310 2010-06-29 Janus Weil <janus@gcc.gnu.org>
2313 * resolve.c (is_external_proc): Prevent procedure pointers from being
2314 regarded as external procedures.
2316 2010-06-29 Janus Weil <janus@gcc.gnu.org>
2319 * trans-intrinsic.c (gfc_conv_associated): Handle polymorphic variables
2320 passed as second argument of ASSOCIATED.
2322 2010-06-29 Paul Thomas <pault@gcc.gnu.org>
2325 * trans-expr.c (arrayfunc_assign_needs_temporary): New function
2326 to determine if a function assignment can be made without a
2328 (gfc_trans_arrayfunc_assign): Move all the conditions that
2329 suppress the direct function call to the above new functon and
2332 2010-06-28 Paul Thomas <pault@gcc.gnu.org>
2335 * interface.c (argument_rank_mismatch): New function.
2336 (compare_parameter): Call new function instead of generating
2339 2010-06-28 Nathan Froyd <froydnj@codesourcery.com>
2341 * trans-openmp.c (dovar_init): Define. Define VECs containing it.
2342 (gfc_trans_omp_do): Use a VEC to accumulate variables and their
2345 2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
2347 * Make-lang.in: Update dependencies.
2349 2010-06-27 Nathan Froyd <froydnj@codesourcery.com>
2351 * gfortran.h (gfc_code): Split backend_decl field into cycle_label
2352 and exit_label fields.
2353 * trans-openmp.c (gfc_trans_omp_do): Assign to new fields
2355 * trans-stmt.c (gfc_trans_simple_do): Likewise.
2356 (gfc_trans_do): Likewise.
2357 (gfc_trans_do_while): Likewise.
2358 (gfc_trans_cycle): Use cycle_label directly.
2359 (gfc_trans_exit): Use exit_label directly.
2361 2010-06-27 Daniel Kraft <d@domob.eu>
2363 * dump-parse-tree.c (show_symbol): Dump target-expression for
2365 (show_code_node): Make distinction between BLOCK and ASSOCIATE.
2366 (show_namespace): Use show_level for correct indentation of
2367 "inner namespaces" (contained procedures or BLOCK).
2369 2010-06-27 Thomas Koenig <tkoenig@gcc.gnu.org>
2372 * dump-parse-tree.c (show_code_node): Show namespace for
2375 2010-06-26 Tobias Burnus <burnus@net-b.de>
2377 * decl.c (gfc_match_decl_type_spec): Support
2378 TYPE(intrinsic-type-spec).
2380 2010-06-25 Tobias Burnus <burnus@net-b.de>
2382 * intrinsic.h (gfc_check_selected_real_kind,
2383 gfc_simplify_selected_real_kind): Update prototypes.
2384 * intrinsic.c (add_functions): Add radix support to
2386 * check.c (gfc_check_selected_real_kind): Ditto.
2387 * simplify.c (gfc_simplify_selected_real_kind): Ditto.
2388 * trans-decl.c (gfc_build_intrinsic_function_decls):
2389 Change call from selected_real_kind to selected_real_kind2008.
2390 * intrinsic.texi (SELECTED_REAL_KIND): Update for radix.
2391 (PRECISION, RANGE, RADIX): Add cross @refs.
2393 2010-06-25 Tobias Burnus <burnus@net-b.de>
2395 * decl.c (gfc_match_entry): Mark ENTRY as GFC_STD_F2008_OBS.
2396 * gfortran.texi (_gfortran_set_options): Update for
2397 GFC_STD_F2008_OBS addition.
2398 * libgfortran.h: Add GFC_STD_F2008_OBS.
2399 * options.c (set_default_std_flags, gfc_handle_option): Handle
2401 io.c (check_format): Fix allow_std check.
2403 2010-06-25 Tobias Burnus <burnus@net-b.de>
2405 * decl.c (gfc_match_entry): Allow END besides
2406 END SUBROUTINE/END FUNCTION for contained procedures.
2408 2010-06-25 Tobias Burnus <burnus@net-b.de>
2410 * parse.c (next_free, next_fixed): Allow ";" as first character.
2412 2010-06-24 Tobias Burnus <burnus@net-b.de>
2415 * decl.c (variable_decl): Fix IMPORT diagnostic for CLASS.
2417 2010-06-22 Janus Weil <janus@gcc.gnu.org>
2420 * resolve.c (resolve_fl_derived): Avoid checking for abstract on class
2423 2010-06-21 Tobias Burnus <burnus@net-b.de>
2426 * interface.c (compare_parameter): Add gfc_is_simply_contiguous
2428 * symbol.c (gfc_add_contiguous): New function.
2429 (gfc_copy_attr, check_conflict): Handle contiguous attribute.
2430 * decl.c (match_attr_spec): Ditto.
2431 (gfc_match_contiguous): New function.
2432 * resolve.c (resolve_fl_derived, resolve_symbol): Handle
2434 * gfortran.h (symbol_attribute): Add contiguous.
2435 (gfc_is_simply_contiguous): Add prototype.
2436 (gfc_add_contiguous): Add prototype.
2437 * match.h (gfc_match_contiguous): Add prototype.
2438 * parse.c (decode_specification_statement,
2439 decode_statement): Handle contiguous attribute.
2440 * expr.c (gfc_is_simply_contiguous): New function.
2441 * dump-parse-tree.c (show_attr): Handle contiguous.
2442 * module.c (ab_attribute, attr_bits, mio_symbol_attribute):
2444 * trans-expr.c (gfc_add_interface_mapping): Copy
2446 * trans-array.c (gfc_conv_descriptor_stride_get,
2447 gfc_conv_array_parameter): Handle contiguous arrays.
2448 * trans-types.c (gfc_build_array_type, gfc_build_array_type,
2449 gfc_sym_type, gfc_get_derived_type, gfc_get_array_descr_info):
2451 * trans.h (gfc_array_kind): Ditto.
2452 * trans-decl.c (gfc_get_symbol_decl): Ditto.
2454 2010-06-20 Joseph Myers <joseph@codesourcery.com>
2456 * options.c (gfc_handle_option): Don't handle N_OPTS.
2458 2010-06-19 Janus Weil <janus@gcc.gnu.org>
2461 * resolve.c (resolve_fl_derived): Reverse ordering of conditions
2464 2010-06-18 Tobias Burnus <burnus@net-b.de>
2467 * resolve.c (resolve_allocate_deallocate): Properly check
2468 part-refs in stat=/errmsg= for invalid use.
2470 2010-06-17 Janus Weil <janus@gcc.gnu.org>
2473 * resolve.c (resolve_typebound_function,resolve_typebound_subroutine):
2474 Return directly in case of an error.
2476 2010-06-16 Janus Weil <janus@gcc.gnu.org>
2479 * gfortran.h (gfc_get_typebound_proc): Modified Prototype.
2480 * decl.c (match_procedure_in_type): Give a unique gfc_typebound_proc
2481 structure to each procedure in a procedure list.
2482 * module.c (mio_typebound_proc): Add NULL argument to
2483 'gfc_get_typebound_proc'.
2484 * symbol.c (gfc_get_typebound_proc): Add a new argument, which is used
2485 to initialize the new structure.
2487 2010-06-15 Janus Weil <janus@gcc.gnu.org>
2490 * gfortran.h (gfc_expr): Add new member 'mold'.
2491 * match.c (gfc_match_allocate): Implement the MOLD tag.
2492 * resolve.c (resolve_allocate_expr): Ditto.
2493 * trans-stmt.c (gfc_trans_allocate): Ditto.
2495 2010-06-15 Jakub Jelinek <jakub@redhat.com>
2498 * trans-openmp.c (gfc_omp_predetermined_sharing): Don't return
2499 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with
2500 GFC_DECL_SAVED_DESCRIPTOR set.
2501 (gfc_omp_report_decl): New function.
2502 * trans.h (gfc_omp_report_decl): New prototype.
2503 * f95-lang.c (LANG_HOOKS_OMP_REPORT_DECL): Redefine.
2505 2010-06-13 Daniel Franke <franke.daniel@gmail.com>
2509 * gfortranspec.c (lang_specific_driver): Removed deprecation
2511 * lang.opt: Add options -M, -MM, -MD, -MMD, -MF, -MG, -MP, -MT, -MQ.
2512 * lang-specs.h (CPP_FORWARD_OPTIONS): Add -M* options.
2513 * cpp.h (gfc_cpp_makedep): New.
2514 (gfc_cpp_add_dep): New.
2515 (gfc_cpp_add_target): New.
2516 * cpp.c (gfc_cpp_option): Add deps* members.
2517 (gfc_cpp_makedep): New.
2518 (gfc_cpp_add_dep): New.
2519 (gfc_cpp_add_target): New.
2520 (gfc_cpp_init_options): Initialize new options.
2521 (gfc_cpp_handle_option): Handle new options.
2522 (gfc_cpp_post_options): Map new options to libcpp-options.
2523 (gfc_cpp_init): Handle deferred -MQ and -MT options.
2524 (gfc_cpp_done): If requested, write dependencies to file.
2525 * module.c (gfc_dump_module): Add a module filename as target.
2526 * scanner.c (open_included_file): New parameter system; add the
2527 included file as dependency.
2528 (gfc_open_included_file): Add the included file as dependency.
2529 (gfc_open_intrinsic_module): Likewise.
2530 * invoke.texi: Removed deprecation warning for -M.
2531 * gfortran.texi: Removed Makefile-dependencies project.
2533 2010-06-12 Daniel Franke <franke.daniel@gmail.com>
2535 * resolve.c (resolve_global_procedure): Improved checking if an
2536 explicit interface is required.
2538 2010-06-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2540 * trans-decl.c (gfc_build_intrinsic_function_decls): Fix
2542 * trans-intrinsic.c (gfc_conv_intrinsic_fdate): Fix argument type.
2543 (gfc_conv_intrinsic_ttynam): Likewise.
2544 (gfc_conv_intrinsic_trim): Likewise.
2546 2010-06-12 Janus Weil <janus@gcc.gnu.org>
2549 * decl.c (match_procedure_in_type): Allow procedure lists (F08).
2551 2010-06-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2553 * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Fix comment.
2555 2010-06-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2557 * mathbuiltins.def: Add builtins that do not directly correspond
2558 to a Fortran intrinsic, with new macro OTHER_BUILTIN.
2559 * f95-lang.c (gfc_init_builtin_functions): Define OTHER_BUILTIN.
2560 * trans-intrinsic.c (gfc_intrinsic_map_t): Remove
2561 code_{r,c}{4,8,10,16} fields. Add
2562 {,complex}{float,double,long_double}_built_in fields.
2563 (gfc_intrinsic_map): Adjust definitions of DEFINE_MATH_BUILTIN,
2564 DEFINE_MATH_BUILTIN_C and LIB_FUNCTION accordingly. Add
2565 definition of OTHER_BUILTIN.
2566 (real_compnt_info): Remove unused struct.
2567 (builtin_decl_for_precision, builtin_decl_for_float_kind): New
2569 (build_round_expr): Call builtin_decl_for_precision instead of
2571 (gfc_conv_intrinsic_aint): Call builtin_decl_for_float_kind
2572 instead of a switch.
2573 (gfc_build_intrinsic_lib_fndecls): Match
2574 {real,complex}{4,8,10,16}decl into the C-style built_in_decls.
2575 (gfc_get_intrinsic_lib_fndecl): Do not hardcode floating-point
2577 (gfc_conv_intrinsic_lib_function): Go through all the extended
2579 (gfc_trans_same_strlen_check): Call builtin_decl_for_float_kind
2580 instead of a switch.
2581 (gfc_conv_intrinsic_abs): Likewise.
2582 (gfc_conv_intrinsic_mod): Likewise.
2583 (gfc_conv_intrinsic_sign): Likewise.
2584 (gfc_conv_intrinsic_fraction): Likewise.
2585 (gfc_conv_intrinsic_nearest): Likewise.
2586 (gfc_conv_intrinsic_spacing): Likewise.
2587 (gfc_conv_intrinsic_rrspacing): Likewise.
2588 (gfc_conv_intrinsic_scale): Likewise.
2589 (gfc_conv_intrinsic_set_exponent): Likewise.
2591 2010-06-11 Paul Thomas <pault@gcc.gnu.org>
2595 * trans-expr.c (gfc_conv_derived_to_class): Handle array-valued
2596 functions with CLASS formal arguments.
2598 2010-06-10 Janus Weil <janus@gcc.gnu.org>
2601 * resolve.c (conformable_arrays): Handle allocatable components.
2603 2010-06-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2606 * gfortran.texi: Document that Cray pointers cannot be function
2609 2010-06-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2612 * gfortran.texi: Document lack of support for syntax
2613 "complex FUNCTION name*16()", and existence of alternative
2614 legacy syntax "complex*16 FUNCTION name()".
2616 2010-06-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2619 * intrinsic.texi (FLUSH): Note the difference between FLUSH and
2620 POSIX's fsync(), and how to call the latter from Fortran code.
2622 2010-06-10 Daniel Franke <franke.daniel@gmail.com>
2625 * interface.c (compare_actual_formal): Reject actual arguments with
2626 array subscript passed to ASYNCHRONOUS dummys.
2628 2010-06-10 Daniel Kraft <d@domob.eu>
2631 * gfortran.h (enum gfc_statement): Add ST_ASSOCIATE, ST_END_ASSOCIATE.
2632 (struct gfc_symbol): New field `assoc'.
2633 (struct gfc_association_list): New struct.
2634 (struct gfc_code): New struct `block' in union, move `ns' there
2635 and add association list.
2636 (gfc_free_association_list): New method.
2637 (gfc_has_vector_subscript): Made public;
2638 * match.h (gfc_match_associate): New method.
2639 * parse.h (enum gfc_compile_state): Add COMP_ASSOCIATE.
2640 * decl.c (gfc_match_end): Handle ST_END_ASSOCIATE.
2641 * interface.c (gfc_has_vector_subscript): Made public.
2642 (compare_actual_formal): Rename `has_vector_subscript' accordingly.
2643 * match.c (gfc_match_associate): New method.
2644 (gfc_match_select_type): Change reference to gfc_code's `ns' field.
2645 * primary.c (match_variable): Don't allow names associated to expr here.
2646 * parse.c (decode_statement): Try matching ASSOCIATE statement.
2647 (case_exec_markers, case_end): Add ASSOCIATE statement.
2648 (gfc_ascii_statement): Hande ST_ASSOCIATE and ST_END_ASSOCIATE.
2649 (parse_associate): New method.
2650 (parse_executable): Handle ST_ASSOCIATE.
2651 (parse_block_construct): Change reference to gfc_code's `ns' field.
2652 * resolve.c (resolve_select_type): Ditto.
2653 (resolve_code): Ditto.
2654 (resolve_block_construct): Ditto and add comment.
2655 (resolve_select_type): Set association list in generated BLOCK to NULL.
2656 (resolve_symbol): Resolve associate names.
2657 * st.c (gfc_free_statement): Change reference to gfc_code's `ns' field
2658 and free association list.
2659 (gfc_free_association_list): New method.
2660 * symbol.c (gfc_new_symbol): NULL new field `assoc'.
2661 * trans-stmt.c (gfc_trans_block_construct): Change reference to
2662 gfc_code's `ns' field.
2664 2010-06-10 Kai Tietz <kai.tietz@onevision.com>
2666 * error.c (error_print): Pre-initialize loc by NULL.
2667 * openmp.c (resolve_omp_clauses): Add explicit
2668 braces to avoid ambigous else.
2669 * array.c (match_subscript): Pre-initialize m to MATCH_ERROR.
2671 2010-06-10 Gerald Pfeifer <gerald@pfeifer.com>
2673 * gfc-internals.texi: Move to GFDL 1.3.
2674 * gfortran.texi: Ditto.
2675 * intrinsic.texi: Ditto.
2676 * invoke.texi: Ditto.
2678 2010-06-09 Daniel Franke <franke.daniel@gmail.com>
2681 * check.c (gfc_check_selected_real_kind): Verify that the
2682 actual arguments are scalar.
2684 2010-06-09 Daniel Franke <franke.daniel@gmail.com>
2687 * intrinsic.c (gfc_convert_type_warn): Further improve -Wconversion.
2689 2010-06-09 Janus Weil <janus@gcc.gnu.org>
2692 * dump-parse-tree.c (show_symbol): Avoid infinite loop.
2694 2010-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
2696 * fortran/symbol.c (check_conflict): Remove an invalid conflict check.
2698 2010-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
2700 * fortran/intrinsic.c (add_functions): Change gfc_check_btest,
2701 gfc_check_ibclr, and gfc_check_ibset to gfc_check_bitfcn.
2702 * fortran/intrinsic.h: Remove prototypes for gfc_check_btest,
2703 gfc_check_ibclr, and gfc_check_ibset. Add prototype for
2705 * fortran/check.c (nonnegative_check, less_than_bitsize1,
2706 less_than_bitsize2): New functions.
2707 (gfc_check_btest): Renamed to gfc_check_bitfcn. Use
2708 nonnegative_check and less_than_bitsize1.
2709 (gfc_check_ibclr, gfc_check_ibset): Removed.
2710 (gfc_check_ibits,gfc_check_mvbits): Use nonnegative_check and
2713 2010-06-09 Janus Weil <janus@gcc.gnu.org>
2716 * resolve.c (resolve_typebound_function,resolve_typebound_subroutine):
2719 2010-06-09 Kai Tietz <kai.tietz@onevision.com>
2721 * resolve.c (resolve_deallocate_expr): Avoid warning
2722 about possible use of iunitialized sym.
2723 (resolve_allocate_expr): Pre-initialize sym by NULL.
2725 2010-06-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2728 * f95-lang.c (gfc_init_builtin_functions): Remove comment.
2730 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
2732 * trans-types.c (gfc_get_nodesc_array_type): Use typed GC
2734 (gfc_get_array_type_bounds): Likewise.
2736 * trans-decl.c (gfc_allocate_lang_decl): Likewise.
2737 (gfc_find_module): Likewise.
2739 * f95-lang.c (pushlevel): Likewise.
2741 * trans.h (struct lang_type): Add variable_size GTY option.
2742 (struct lang_decl): Likewise.
2744 2010-06-08 Tobias Burnus <burnus@net-b.de>
2747 * symbol.c (check_conflict): Move protected--external/procedure check ...
2748 * resolve.c (resolve_select_type): ... to the resolution stage.
2750 2010-06-07 Tobias Burnus <burnus@net-b.de>
2752 * options.c (gfc_handle_option): Fix -fno-recursive.
2754 2010-06-07 Tobias Burnus <burnus@net-b.de>
2756 * gfc-internals.texi (copyrights-gfortran): Fix copyright year format.
2757 * gfortran.texi (copyrights-gfortran): Ditto.
2759 2010-06-07 Joseph Myers <joseph@codesourcery.com>
2761 * lang.opt (fshort-enums): Define using Var and VarExists.
2762 * options.c (gfc_handle_option): Don't set flag_short_enums here.
2764 2010-06-05 Paul Thomas <pault@gcc.gnu.org>
2765 Janus Weil <janus@gcc.gnu.org>
2768 * resolve.c (get_declared_from_expr): Move to before
2769 resolve_typebound_generic_call. Make new_ref and class_ref
2770 ignorable if set to NULL.
2771 (resolve_typebound_generic_call): Once we have resolved the
2772 generic call, check that the specific instance is that which
2773 is bound to the declared type.
2774 (resolve_typebound_function,resolve_typebound_subroutine): Avoid
2775 freeing 'class_ref->next' twice.
2777 2010-06-05 Paul Thomas <pault@gcc.gnu.org>
2780 * trans-array.c (structure_alloc_comps): Dereference scalar
2781 'decl' if it is a REFERENCE_TYPE. Tidy expressions containing
2784 2010-06-04 Joseph Myers <joseph@codesourcery.com>
2786 * gfortranspec.c (append_arg, lang_specific_driver): Use
2787 GCC-specific formats in diagnostics.
2789 2010-06-02 Tobias Burnus <burnus@net-b.de>
2792 * parse.c (gfc_fixup_sibling_symbols): Do not "fix" use-associated
2795 2010-06-01 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2798 * match.c (gfc_match_stopcode): Move gfc_match_eos call inside
2801 2010-05-31 Steven G. Kargl <kargl@gcc.gnu.org>
2803 * fortran/gfortran.texi: Fix typos in description of variable-format-
2806 2010-05-31 Thomas Koenig <tkoenig@gcc.gnu.org>
2809 * dependency.c (gfc_check_section_vs_section): Check
2810 for interleaving array assignments without conflicts.
2812 2010-05-30 Janus Weil <janus@gcc.gnu.org>
2814 * gcc/fortran/gfortran.h (CLASS_DATA): New macro for accessing the
2815 $data component of a class container.
2816 * gcc/fortran/decl.c (attr_decl1): Use macro CLASS_DATA.
2817 * gcc/fortran/expr.c (gfc_check_pointer_assign,gfc_check_assign_symbol,
2818 gfc_has_ultimate_allocatable,gfc_has_ultimate_pointer): Ditto.
2819 * gcc/fortran/interface.c (matching_typebound_op): Ditto.
2820 * gcc/fortran/match.c (gfc_match_allocate, gfc_match_deallocate): Ditto.
2821 * gcc/fortran/parse.c (parse_derived): Ditto.
2822 * gcc/fortran/primary.c (gfc_match_varspec, gfc_variable_attr,
2823 gfc_expr_attr): Ditto.
2824 * gcc/fortran/resolve.c (resolve_structure_cons, find_array_spec,
2825 resolve_deallocate_expr, resolve_allocate_expr, resolve_select_type,
2826 resolve_fl_var_and_proc, resolve_typebound_procedure,
2827 resolve_fl_derived): Ditto.
2828 * gcc/fortran/symbol.c (gfc_type_compatible): Restructured.
2829 * gcc/fortran/trans-array.c (structure_alloc_comps): Use macro
2831 * gcc/fortran/trans-decl.c (gfc_get_symbol_decl,
2832 gfc_trans_deferred_vars): Ditto.
2833 * gcc/fortran/trans-stmt.c (gfc_trans_allocate): Ditto.
2835 2010-05-28 Tobias Burnus <burnus@net-b.de>
2837 * options.c (gfc_handle_option): Fix handling of -fno-whole-file.
2839 2010-05-28 Joseph Myers <joseph@codesourcery.com>
2841 * gfortranspec.c (append_arg, lang_specific_driver): Use
2842 fatal_error instead of fatal. Use warning instead of fprintf for
2845 2010-05-28 Joseph Myers <joseph@codesourcery.com>
2847 * cpp.c (gfc_cpp_init_0): Use xstrerror instead of strerror.
2848 * module.c (write_char, gfc_dump_module, gfc_use_module): Use
2849 xstrerror instead of strerror.
2851 2010-05-26 Joseph Myers <joseph@codesourcery.com>
2853 * cpp.c (cb_cpp_error): Save and restore
2854 global_dc->warn_system_headers, not variable warn_system_headers.
2856 2010-05-26 Steven Bosscher <steven@gcc.gnu.org>
2858 * fortran/f95-lang.c: Do not include libfuncs.h, expr.h, and except.h.
2860 2010-05-26 Steven Bosscher <steven@gcc.gnu.org>
2862 * trans-common.c: Do not include rtl.h, include output.h instead.
2863 * trans-decl.c: Likewise.
2865 2010-05-26 Paul Thomas <pault@gcc.gnu.org>
2868 * resolve.c (resolve_global_procedure): Resolve the gsymbol's
2869 namespace before trying to reorder the gsymbols.
2871 2010-05-25 Daniel Franke <franke.daniel@gmail.com>
2876 * resolve.c (resolve_global_procedure): Add check for global
2877 procedures with implicit interfaces and assumed-shape or optional
2878 dummy arguments. Verify that function return type, kind and string
2881 2010-05-21 Tobias Burnus <burnus@net-b.de>
2883 * gfortran.h: Do not include system.h.
2884 * bbt.c: Include system.h.
2886 * dependency.c: Ditto.
2887 * dump-parse-tree.c: Ditto.
2888 * arith.h: Do not include gfortran.h.
2889 * constructor.h: Do not include gfortran.h and splay-tree.h.
2890 * match.h: Do not include gfortran.h.
2892 * target-memory.h: Ditto.
2893 * openmp.c: Do not include toplev.h and target.h.
2894 * trans-stmt.c: Ditto not include toplev.h.
2896 * trans-common.c: Tell why toplev.h is needed. And
2897 do not include target.h.
2898 * trans-expr.c: Tell why toplev.h is needed.
2899 * trans-array.c: Ditto.
2900 * trans-openmp.c: Ditto.
2901 * trans-const.c: Ditto.
2903 * trans-types.c: Ditto.
2904 * trans-io.c: Ditto.
2905 * trans-decl.c: Ditto.
2908 * trans-intrinsic.c: Ditto.
2911 2010-05-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2914 * match.c (gfc_match_stopcode): Use gfc_match_init_expr. Go to cleanup
2915 before returning MATCH_ERROR. Add check for scalar. Add check for
2916 default integer kind.
2918 2010-05-22 Janus Weil <janus@gcc.gnu.org>
2921 * match.c (gfc_match_select_type): On error jump back out of the local
2923 * parse.c (parse_derived): Defer creation of vtab symbols to resolution
2924 stage, more precisely to ...
2925 * resolve.c (resolve_fl_derived): ... this place.
2927 2010-05-22 Janus Weil <janus@gcc.gnu.org>
2930 * resolve.c (ensure_not_abstract): Allow abstract types with
2931 non-abstract ancestors.
2933 2010-05-21 Steven Bosscher <steven@gcc.gnu.org>
2935 * trans-const.c: Include realmpfr.h.
2936 * Make-lang.in: Update dependencies.
2938 2010-05-21 Steven Bosscher <steven@gcc.gnu.org>
2940 * trans-const.c, trans-types.c, trans-intrinsic.c:
2941 Clean up redundant includes.
2943 2010-05-20 Daniel Franke <franke.daniel@gmail.com>
2946 * lang.opt (Wunused-dummy-argument): New option.
2947 * gfortran.h (gfc_option_t): Add warn_unused_dummy_argument.
2948 * options.c (gfc_init_options): Disable warn_unused_dummy_argument.
2949 (set_Wall): Enable warn_unused_dummy_argument.
2950 (gfc_handle_option): Set warn_unused_dummy_argument according to
2952 * trans-decl.c (generate_local_decl): Separate warnings about
2953 unused variables and unused dummy arguments.
2954 * invoke.texi: Documented new option.
2956 2010-05-20 Steven Bosscher <steven@gcc.gnu.org>
2958 * trans-expr.c: Do not include convert.h, ggc.h, real.h, and gimple.h.
2959 (gfc_conv_string_tmp): Do not assert type comparibilty.
2960 * trans-array.c: Do not include gimple.h, ggc.h, and real.h.
2961 (gfc_conv_expr_descriptor): Remove assert.
2962 * trans-common.c: Clarify why rtl.h and tm.h are included.
2963 * trans-openmp.c: Do not include ggc.h and real.h.
2964 Explain why gimple.h is included.
2965 * trans-const.c: Do not include ggc.h.
2966 * trans-stmt.c: Do not include gimple.h, ggc.h, and real.h.
2967 * trans.c: Do not include ggc.h and real.h.
2968 Explain why gimple.h is included.
2969 * trans-types.c: Do not include tm.h. Explain why langhooks.h
2970 and dwarf2out.h are included.
2971 * trans-io.c: Do not include gimple.h and real.h.
2972 * trans-decl.c: Explain why gimple.h, tm.h, and rtl.h are included.
2973 * trans-intrinsic.c: Do not include gimple.h. Explain why tm.h
2976 2010-05-20 Tobias Burnus <burnus@net-b.de>
2978 * options.c (gfc_init_options,gfc_post_options): Enable
2979 flag_associative_math by default.
2981 2010-05-19 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2984 * trans-stmt.c (gfc_trans_stop): Add generation of call to
2985 gfortran_error_stop_numeric. Fix up some whitespace. Use stop_string for
2986 blank STOP, handling a null expression. (gfc_trans_pause): Use
2987 pause_string for blank PAUSE.
2988 * trans.h: Add external function declaration for error_stop_numeric.
2989 * trans-decl.c (gfc_build_builtin_function_decls): Add the building of
2990 the declaration for the library call. Adjust whitespaces.
2991 * match.c (gfc_match_stopcode): Remove use of the actual stop code to
2992 signal no stop code. Match the expression following the stop and pass
2993 that to the translators. Remove the old use of digit matching. Add
2994 checks that the stop_code expression is INTEGER or CHARACTER, constant,
2995 and if CHARACTER, default character KIND.
2997 2010-05-19 Daniel Franke <franke.daniel@gmail.com>
3000 * lang.opt (Wconversion-extra): New option.
3001 * gfortran.h (gfc_option_t): Add warn_conversion_extra.
3002 * options.c (gfc_init_options): Disable -Wconversion-extra by default.
3003 (set_Wall): Enable -Wconversion.
3004 (gfc_handle_option): Set warn_conversion_extra.
3005 * intrinsic.c (gfc_convert_type_warn): Ignore kind conditions
3006 introduced for -Wconversion if -Wconversion-extra is present.
3007 * invoke.texi: Add -Wconversion to -Wall; document new behaviour of
3008 -Wconversion; document -Wconversion-extra.
3010 2010-05-19 Daniel Franke <franke.daniel@gmail.com>
3013 * gfortran.h (gfc_has_default_initializer): New.
3014 * expr.c (gfc_has_default_initializer): New.
3015 * resolve.c (has_default_initializer): Removed, use
3016 gfc_has_default_initializer() instead. Updated all callers.
3017 * trans-array.c (has_default_initializer): Removed, use
3018 gfc_has_default_initializer() instead. Updated all callers.
3019 * trans-decl.c (generate_local_decl): Do not check the
3020 first component only to check for initializers, but use
3021 gfc_has_default_initializer() instead.
3023 2010-05-19 Daniel Franke <franke.daniel@gmail.com>
3026 * primary.c (match_string_constant): Move start_locus just inside
3028 * data.c (create_character_intializer): Clarified truncation warning.
3030 2010-05-19 Daniel Franke <franke.daniel@gmail.com>
3033 * intrinsic.h (gfc_check_float): New prototype.
3034 (gfc_check_sngl): New prototype.
3035 * check.c (gfc_check_float): New.
3036 (gfc_check_sngl): New.
3037 * intrinsic.c (add_functions): Moved DFLOAT from aliasing DBLE
3038 to be a specific for REAL. Added check routines for FLOAT, DFLOAT
3040 * intrinsic.texi: Removed individual nodes of FLOAT, DFLOAT and SNGL,
3041 added them to the list of specifics of REAL instead.
3043 2010-05-17 Janus Weil <janus@gcc.gnu.org>
3046 * trans-expr.c (gfc_conv_structure): Remove unneeded and buggy code.
3047 This is now handled via 'gfc_class_null_initializer'.
3049 2010-05-17 Janus Weil <janus@gcc.gnu.org>
3051 * class.c (gfc_add_component_ref,gfc_class_null_initializer,
3052 gfc_build_class_symbol,add_proc_component,add_proc_comps,
3053 add_procs_to_declared_vtab1,copy_vtab_proc_comps,
3054 add_procs_to_declared_vtab,add_generic_specifics,
3055 add_generics_to_declared_vtab,gfc_find_derived_vtab,
3056 find_typebound_proc_uop,gfc_find_typebound_proc,
3057 gfc_find_typebound_user_op,gfc_find_typebound_intrinsic_op,
3058 gfc_get_tbp_symtree): Moved here from other places.
3059 * expr.c (gfc_add_component_ref,gfc_class_null_initializer): Move to
3061 * gfortran.h (gfc_build_class_symbol,gfc_find_derived_vtab,
3062 gfc_find_typebound_proc,gfc_find_typebound_user_op,
3063 gfc_find_typebound_intrinsic_op,gfc_get_tbp_symtree,
3064 gfc_add_component_ref, gfc_class_null_initializer): Moved to class.c.
3065 * Make-lang.in: Add class.o.
3066 * symbol.c (gfc_build_class_symbol,add_proc_component,add_proc_comps,
3067 add_procs_to_declared_vtab1,copy_vtab_proc_comps,
3068 add_procs_to_declared_vtab,add_generic_specifics,
3069 add_generics_to_declared_vtab,gfc_find_derived_vtab,
3070 find_typebound_proc_uop,gfc_find_typebound_proc,
3071 gfc_find_typebound_user_op,gfc_find_typebound_intrinsic_op,
3072 gfc_get_tbp_symtree): Move to class.c.
3074 2010-05-17 Nathan Froyd <froydnj@codesourcery.com>
3076 * trans-types.c (gfc_init_types): Use build_function_type_list.
3077 (gfc_get_ppc_type): Likewise.
3078 * trans-decl.c (gfc_generate_constructors): Likewise.
3079 * f95-lang.c (build_builtin_fntypes): Likewise.
3080 (gfc_init_builtin_functions): Likewise.
3081 (DEF_FUNCTION_TYPE_0): Likewise.
3082 (DEF_FUNCTION_TYPE_1): Likewise.
3083 (DEF_FUNCTION_TYPE_2): Likewise.
3084 (DEF_FUNCTION_TYPE_3): Likewise.
3085 (DEF_FUNCTION_TYPE_4): Likewise.
3086 (DEF_FUNCTION_TYPE_5): Likewise.
3087 (DEF_FUNCTION_TYPE_6): Likewise.
3088 (DEF_FUNCTION_TYPE_7): Likewise. Use ARG7.
3089 (DEF_FUNCTION_TYPE_VAR_0): Use build_varags_function_type_list.
3091 2010-05-17 Nathan Froyd <froydnj@codesourcery.com>
3093 * trans-array.c (gfc_trans_array_constructor_value): Use
3094 build_constructor instead of build_constructor_from_list.
3095 (gfc_build_constant_array_constructor): Likewise.
3096 * trans-decl.c (create_main_function): Likewise.
3097 * trans-stmt.c (gfc_trans_character_select): Likewise.
3099 2010-05-17 Janus Weil <janus@gcc.gnu.org>
3102 * resolve.c (resolve_fl_var_and_proc): Move error messages here from ...
3103 (resolve_fl_variable_derived): ... this place.
3104 (resolve_symbol): Make sure function symbols (and their result
3105 variables) are not resolved twice.
3107 2010-05-16 Daniel Franke <franke.daniel@gmail.com>
3110 * array.c (match_array_list): Revert change from 2010-05-13.
3112 2010-05-16 Richard Guenther <rguenther@suse.de>
3114 * trans-decl.c (module_htab_decls_hash): Revert last change.
3116 2010-05-16 Richard Guenther <rguenther@suse.de>
3118 * trans-decl.c (module_htab_decls_hash): Use IDENTIFIER_HASH_VALUE.
3120 2010-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
3122 * options.c (set_Wall): Remove special logic for Wuninitialized
3125 2010-05-15 Janus Weil <janus@gcc.gnu.org>
3129 * trans-decl.c (gfc_trans_deferred_vars): Modify ordering of
3132 2010-05-15 Janus Weil <janus@gcc.gnu.org>
3136 * gfortran.h (gfc_class_null_initializer): New prototype.
3137 * expr.c (gfc_class_null_initializer): New function to build a NULL
3138 initializer for CLASS pointers.
3139 * symbol.c (gfc_build_class_symbol): Modify internal naming of class
3140 containers. Remove default NULL initialization of $data component.
3141 * trans.c (gfc_allocate_array_with_status): Fix wording of an error
3143 * trans-expr.c (gfc_conv_initializer,gfc_trans_subcomponent_assign):
3144 Use new function 'gfc_class_null_initializer'.
3145 * trans-intrinsic.c (gfc_conv_allocated): Handle allocatable scalar
3148 2010-05-14 Steven G. Kargl <kargl@gcc.gnu.org>
3151 * fortran/interface.c (get_sym_storage_size): Use signed instead of
3152 unsigned mpz_get_?i routines.
3154 2010-05-14 Jakub Jelinek <jakub@redhat.com>
3156 * trans.c (trans_code): Set backend locus early.
3157 * trans-decl.c (gfc_get_fake_result_decl): Use source location
3158 of the function instead of current input_location.
3160 2010-05-13 Daniel Franke <franke.daniel@gmail.com>
3163 * intrinsic.c (gfc_init_expr): Renamed to gfc_init_expr_flag.
3165 * expr.c (init_flag): Removed; use gfc_init_expr_flag everywhere.
3166 * array.c (match_array_list): Pass on gfc_init_expr_flag when matching
3169 2010-05-13 Jakub Jelinek <jakub@redhat.com>
3172 * openmp.c (resolve_omp_clauses): Allow procedure pointers in clause
3174 * trans-openmp.c (gfc_omp_privatize_by_reference): Don't privatize
3175 by reference dummy procedures or non-dummy procedure pointers.
3176 (gfc_omp_predetermined_sharing): Return
3177 OMP_CLAUSE_DEFAULT_FIRSTPRIVATE for dummy procedures.
3179 2010-05-11 Daniel Franke <franke.daniel@gmail.com>
3182 * openmp.c (gfc_match_omp_taskwait): Report unexpected characters
3183 after OMP statement.
3184 (gfc_match_omp_critical): Likewise.
3185 (gfc_match_omp_flush): Likewise.
3186 (gfc_match_omp_workshare): Likewise.
3187 (gfc_match_omp_master): Likewise.
3188 (gfc_match_omp_ordered): Likewise.
3189 (gfc_match_omp_atomic): Likewise.
3190 (gfc_match_omp_barrier): Likewise.
3191 (gfc_match_omp_end_nowait): Likewise.
3193 2010-05-11 Daniel Franke <franke.daniel@gmail.com>
3196 * resolve.c (validate_case_label_expr): Removed FIXME.
3197 (resolve_select): Raise default warning on case labels out of range
3198 of the case expression.
3200 2010-05-10 Daniel Franke <franke.daniel@gmail.com>
3205 * intrinsic.c (gfc_convert_type_warn): Be more discriminative
3206 about conversion warnings.
3208 2010-05-10 Janus Weil <janus@gcc.gnu.org>
3211 * match.c (gfc_match_select_type): Move error message to
3212 resolve_select_type.
3213 * resolve.c (resolve_select_type): Error message moved here from
3214 gfc_match_select_type. Correctly set type of temporary.
3216 2010-05-10 Richard Guenther <rguenther@suse.de>
3218 * trans-decl.c (gfc_build_library_function_decl): Split out
3220 (build_library_function_decl_1): ... this new function.
3221 Set a fnspec attribute if a specification was provided.
3222 (gfc_build_library_function_decl_with_spec): New function.
3223 (gfc_build_intrinsic_function_decls): Annotate internal_pack
3224 and internal_unpack.
3226 2010-05-07 Daniel Franke <franke.daniel@gmail.com>
3229 * intrinc.c (gfc_is_intrinsic): Do not prematurely mark symbol
3232 2010-05-07 Jason Merrill <jason@redhat.com>
3234 * trans-expr.c (gfc_conv_procedure_call): Rename nullptr to null_ptr
3235 to avoid -Wc++-compat warning.
3237 2010-05-06 Manuel López-Ibáñez <manu@gcc.gnu.org>
3240 * options.c (gfc_handle_option): Add argument kind.
3241 * gfortran.h (gfc_handle_option): Update declaration.
3243 2010-05-06 Tobias Burnus <burnus@net-b.de>
3246 * trans-types.c (gfc_sym_type): Mark Cray pointees as
3249 2010-05-05 Daniel Franke <franke.daniel@gmail.com>
3252 * resolve.c (traverse_data_list): Rephrase error message for
3253 non-constant bounds in data-implied-do.
3255 2010-05-05 Daniel Franke <franke.daniel@gmail.com>
3258 * gfortran.h: Removed repeat count from constructor, removed
3260 * data.h (gfc_assign_data_value_range): Changed return value from
3262 * data.c (gfc_assign_data_value): Add location to constructor element.
3263 (gfc_assign_data_value_range): Call gfc_assign_data_value()
3264 for each element in range. Return early if an error was generated.
3265 * resolve.c (check_data_variable): Stop early if range assignment
3268 2010-05-05 Janus Weil <janus@gcc.gnu.org>
3271 * resolve.c (resolve_fl_derived): Some fixes for class variables.
3272 * symbol.c (gfc_build_class_symbol): Add separate class container for
3275 2010-05-03 Steven G. Kargl <kargl@gcc.gnu.org>
3278 * fortran/parse.c (parse_interface): Do not dereference a NULL pointer.
3280 2010-05-02 Tobias Burnus <burnus@net-b.de>
3283 * intrinsic.c (add_functions): Fix GFC_STD and add gfc_resolve_ calls
3284 for lcobound, ucobound, image_index and this_image.
3285 * intrinsic.h (gfc_resolve_lcobound, gfc_resolve_this_image,
3286 gfc_resolve_image_index, gfc_resolve_ucobound): New prototypes.
3287 * iresolve.c (gfc_resolve_lcobound, gfc_resolve_this_image,
3288 gfc_resolve_image_index, gfc_resolve_ucobound, resolve_bound): New
3290 (gfc_resolve_lbound, gfc_resolve_ubound): Use resolve_bound.
3292 2010-04-30 Tobias Burnus <burnus@net-b.de>
3296 * trans-types.c (gfc_get_array_descriptor_base): Fix index
3297 calculation for array descriptor types.
3299 2010-04-29 Janus Weil <janus@gcc.gnu.org>
3302 * symbol.c (add_proc_component,copy_vtab_proc_comps): Remove
3303 initializers for PPC members of the vtabs.
3305 2010-04-29 Janus Weil <janus@gcc.gnu.org>
3308 * symbol.c (add_proc_component,add_proc_comps): Correctly set the 'ppc'
3309 attribute for all PPC members of the vtypes.
3310 (copy_vtab_proc_comps): Copy the correct interface.
3311 * trans.h (gfc_trans_assign_vtab_procs): Modified prototype.
3312 * trans-expr.c (gfc_trans_assign_vtab_procs): Pass the derived type as
3313 a dummy argument and make sure all PPC members of the vtab are
3314 initialized correctly.
3315 (gfc_conv_derived_to_class,gfc_trans_class_assign): Additional argument
3316 in call to gfc_trans_assign_vtab_procs.
3317 * trans-stmt.c (gfc_trans_allocate): Ditto.
3319 2010-04-29 Paul Thomas <pault@gcc.gnu.org>
3322 * resolve.c (resolve_typebound_function): Renamed
3323 resolve_class_compcall.Do all the detection of class references
3325 (resolve_typebound_subroutine): resolve_class_typebound_call
3326 renamed. Otherwise same as resolve_typebound_function.
3327 (gfc_resolve_expr): Call resolve_typebound_function.
3328 (resolve_code): Call resolve_typebound_subroutine.
3330 2010-04-29 Janus Weil <janus@gcc.gnu.org>
3333 * resolve.c (resolve_typebound_generic_call): For CLASS methods
3334 pass back the specific symtree name, rather than the target
3337 2010-04-29 Paul Thomas <pault@gcc.gnu.org>
3340 * resolve.c (resolve_structure_cons): Make the initializer of
3341 the vtab component 'extends' the same type as the component.
3343 2010-04-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3346 * interface.c (check_interface1): Pass symbol name rather than NULL to
3347 gfc_compare_interfaces.(gfc_compare_interfaces): Add assert to
3348 trap MULL. (gfc_compare_derived_types): Revert previous change
3349 incorporated incorrectly during merge from trunk, r155778.
3350 * resolve.c (check_generic_tbp_ambiguity): Pass symbol name rather
3351 than NULL to gfc_compare_interfaces.
3352 * symbol.c (add_generic_specifics): Likewise.
3354 2010-02-29 Janus Weil <janus@gcc.gnu.org>
3357 * interface.c (gfc_compare_derived_types): Add condition for vtype.
3358 * symbol.c (gfc_find_derived_vtab): Sey access to private.
3359 (gfc_find_derived_vtab): Likewise.
3360 * module.c (ab_attribute): Add enumerator AB_VTAB.
3361 (mio_symbol_attribute): Use new attribute, AB_VTAB.
3362 (check_for_ambiguous): Likewise.
3364 2010-04-29 Paul Thomas <pault@gcc.gnu.org>
3365 Janus Weil <janus@gcc.gnu.org>
3368 * trans-expr.c (select_class_proc): Remove function.
3369 (conv_function_val): Delete reference to previous.
3370 (gfc_conv_derived_to_class): Add second argument to the call to
3371 gfc_find_derived_vtab.
3372 (gfc_conv_structure): Exclude proc_pointer components when
3373 accessing $data field of class objects.
3374 (gfc_trans_assign_vtab_procs): New function.
3375 (gfc_trans_class_assign): Add second argument to the call to
3376 gfc_find_derived_vtab.
3377 * symbol.c (gfc_build_class_symbol): Add delayed_vtab arg and
3378 implement holding off searching for the vptr derived type.
3379 (add_proc_component): New function.
3380 (add_proc_comps): New function.
3381 (add_procs_to_declared_vtab1): New function.
3382 (copy_vtab_proc_comps): New function.
3383 (add_procs_to_declared_vtab): New function.
3384 (void add_generic_specifics): New function.
3385 (add_generics_to_declared_vtab): New function.
3386 (gfc_find_derived_vtab): Add second argument to the call to
3387 gfc_find_derived_vtab. Add the calls to
3388 add_procs_to_declared_vtab and add_generics_to_declared_vtab.
3389 * decl.c (build_sym, build_struct): Use new arg in calls to
3390 gfc_build_class_symbol.
3391 * gfortran.h : Add vtype bitfield to symbol_attr. Remove the
3392 definition of struct gfc_class_esym_list. Modify prototypes
3393 of gfc_build_class_symbol and gfc_find_derived_vtab.
3394 * trans-stmt.c (gfc_trans_allocate): Add second argument to the
3395 call to gfc_find_derived_vtab.
3396 * module.c : Add the vtype attribute.
3397 * trans.h : Add prototype for gfc_trans_assign_vtab_procs.
3398 * resolve.c (resolve_typebound_generic_call): Add second arg
3399 to pass along the generic name for class methods.
3400 (resolve_typebound_call): The same.
3401 (resolve_compcall): Use the second arg to carry the generic
3402 name from the above. Remove the reference to class_esym.
3403 (check_members, check_class_members, resolve_class_esym,
3404 hash_value_expr): Remove functions.
3405 (resolve_class_compcall, resolve_class_typebound_call): Modify
3406 to use vtable rather than member by member calls.
3407 (gfc_resolve_expr): Modify second arg in call to
3409 (resolve_select_type): Add second arg in call to
3410 gfc_find_derived_vtab.
3411 (resolve_code): Add second arg in call resolve_typebound_call.
3412 (resolve_fl_derived): Exclude vtypes from check for late
3413 procedure definitions. Likewise for checking of explicit
3414 interface and checking of pass arg.
3415 * iresolve.c (gfc_resolve_extends_type_of): Add second arg in
3416 calls to gfc_find_derived_vtab.
3417 * match.c (select_type_set_tmp): Use new arg in call to
3418 gfc_build_class_symbol.
3419 * trans-decl.c (gfc_get_symbol_decl): Complete vtable if
3421 * parse.c (endType): Finish incomplete classes.
3423 2010-04-28 Tobias Burnus <burnus@net-b.de>
3427 * simplify.c (simplify_cobound): Handle scalar coarrays.
3429 2010-04-27 Tobias Burnus <burnus@net-b.de>
3431 * gfc-internals.texi: Update copyright year.
3432 * gfortran.texi: Ditto.
3433 * invoke.texi: Ditto.
3435 2010-04-27 Tobias Burnus <burnus@net-b.de>
3438 * resolve.c (resolve_allocate_expr): Allow array coarrays.
3439 * trans-types.h (gfc_get_array_type_bounds): Update prototype.
3440 * trans-types.c (gfc_get_array_type_bounds,
3441 gfc_get_array_descriptor_base): Add corank argument.
3442 * trans-array.c (gfc_array_init_size): Handle corank.
3443 (gfc_trans_create_temp_array, gfc_array_allocate,
3444 gfc_conv_expr_descriptor): Add corank argument to call.
3445 * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Ditto.
3447 2010-04-24 Steven G. Kargl <kargl@gcc.gnu.org>
3451 * trans-array.c (gfc_trans_array_bound_check): Use TREE_CODE instead
3452 of mucking with a tree directly.
3454 2010-04-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3457 * io.c (gfc_match_open): Remove branch to syntax error. Add call to
3458 gfc_error with new error message.
3460 2010-04-24 Paul Thomas <pault@gcc.gnu.org>
3464 * trans-expr.c (gfc_conv_expr): Supply an address expression for
3466 (gfc_conv_expr_reference): Call gfc_conv_expr and return for
3468 * trans-array.c (gfc_add_loop_ss_code): Store the value rather
3469 than the address of a GFC_SS_REFERENCE.
3470 * trans.h : Change comment on GFC_SS_REFERENCE.
3472 2010-04-22 Richard Guenther <rguenther@suse.de>
3475 * resolve.c (gfc_resolve_index): Wrap around ...
3476 (gfc_resolve_index_1): ... this. Add parameter to allow
3477 any integer kind index type.
3478 (resolve_array_ref): Allow any integer kind for the start
3479 index of an array ref.
3481 2010-04-21 Jakub Jelinek <jakub@redhat.com>
3484 * f95-lang.c (gfc_define_builtin): Set TREE_NOTHROW on
3487 2010-04-20 Harald Anlauf <anlauf@gmx.de>
3489 * intrinsic.c (sort_actual): Remove 'is' in error message.
3491 2010-04-20 Paul Thomas <pault@gcc.gnu.org>
3494 * resolve.c (resolve_fl_derived): If a component character
3495 length has not been resolved, do so now.
3496 (resolve_symbol): The same as above for a symbol character
3498 * trans-decl.c (gfc_create_module_variable): A 'length' decl is
3499 not needed for a character valued, procedure pointer.
3502 * resolve.c (ensure_not_abstract_walker): If 'overriding' is
3503 not found, return FAILURE rather than ICEing.
3505 2010-04-19 Jakub Jelinek <jakub@redhat.com>
3508 * openmp.c (gfc_resolve_do_iterator): Only make iteration vars for
3509 sequential loops private in the innermost containing task region.
3511 2010-04-18 Eric Botcazou <ebotcazou@adacore.com>
3513 * f95-lang.c (gfc_init_decl_processing): Remove second argument in call
3514 to build_common_tree_nodes.
3516 2010-04-17 Steven G. Kargl <kargl@gcc.gnu.org>
3519 * fortran/trans-array.c (gfc_conv_ss_startstride): Remove the use of
3520 gfc_msg_bounds by using 'Array bound mismatch' directly.
3521 (gfc_trans_dummy_array_bias): Remove the use of gfc_msg_bounds. Reword
3522 error message to include the mismatch in the extent of array bound.
3523 * fortran/trans.c: Remove gfc_msg_bounds. It is only used in one place.
3524 * fortran/trans.h: Remove extern definition of gfc_msg_bounds.
3526 2010-04-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3528 * gfortran.texi: Update information on temporary file locations.
3530 2010-04-16 Jakub Jelinek <jakub@redhat.com>
3532 * trans-decl.c (gfc_build_qualified_array): Ensure
3533 ubound.N and lbound.N artificial variable names don't appear
3536 2010-04-15 Steven G. Kargl <kargl@gcc.gnu.org>
3539 * trans-array.c (gfc_trans_array_bound_check): Eliminate a redundant
3540 block of code. Set name to the variable associated with the descriptor.
3542 2010-04-15 Jakub Jelinek <jakub@redhat.com>
3544 * trans-decl.c (gfc_build_qualified_array): Clear DECL_IGNORED_P
3545 on VAR_DECL LBOUND and/or UBOUND, even for -O1.
3547 2010-04-14 Steven G. Kargl <kargl@gcc.gnu.org>
3549 * intrinsic.texi: Add the missing specific name of intrinsic
3550 procedure where the specific name is identical to the generic name.
3551 Fix inconsistent or mismatch in the argument names in intrinsic
3552 procedure descriptions. Add the SCALAR allocatable description to
3555 2010-04-14 Tobias Burnus <burnus@net-b.de>
3558 * array.c (gfc_find_array_ref): Handle codimensions.
3559 (gfc_match_array_spec,gfc_match_array_ref): Use gfc_fatal_error.
3560 * check.c (is_coarray, dim_corank_check, gfc_check_lcobound,
3561 gfc_check_image_index, gfc_check_this_image, gfc_check_ucobound):
3563 * gfortran.h (gfc_isym_id): Add GFC_ISYM_IMAGE_INDEX,
3564 GFC_ISYM_LCOBOUND, GFC_ISYM_THIS_IMAGE,
3566 * intrinsic.h (add_functions): Add this_image, image_index,
3567 lcobound and ucobound intrinsics.
3568 * intrinsic.c (gfc_check_lcobound,gfc_check_ucobound,
3569 gfc_check_image_index, gfc_check_this_image,
3570 gfc_simplify_image_index, gfc_simplify_lcobound,
3571 gfc_simplify_this_image, gfc_simplify_ucobound):
3572 New function prototypes.
3573 * intrinsic.texi (IMAGE_INDEX, LCOBOUND, THIS_IMAGE
3574 IMAGE_INDEX): Document new intrinsic functions.
3575 * match.c (gfc_match_critical, sync_statement): Make -fcoarray=none
3577 * simplify.c (simplify_bound_dim): Handle coarrays.
3578 (simplify_bound): Update simplify_bound_dim call.
3579 (gfc_simplify_num_images): Add -fcoarray=none check.
3580 (simplify_cobound, gfc_simplify_lcobound, gfc_simplify_ucobound,
3581 gfc_simplify_ucobound, gfc_simplify_ucobound): New functions.
3583 2010-04-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3586 * constructor.c: Fix typo in comment.
3587 * expr.c (find_array_section): Add check for max array limit.
3589 2010-04-13 Iain Sandoe <iains@gcc.gnu.org>
3592 * gfortranspec.c (lookup_option): Check for -static and return
3594 (lang_specific_driver): Break when OPTION_static is discovered.
3596 2010-04-12 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3598 * array.c (extract_element): Restore function from trunk.
3599 (gfc_get_array_element): Restore function from trunk.
3600 (gfc_expand_constructor): Restore check against
3601 flag_max_array_constructor.
3602 * constructor.c (node_copy_and_append): Delete unused.
3603 * gfortran.h: Delete comment and extra include.
3604 * constructor.h: Bump copyright and clean up TODO comments.
3605 * resolve.c: Whitespace.
3607 2010-04-12 Daniel Franke <franke.daniel@gmail.com>
3609 * simplify.c (compute_dot_product): Replaced usage of ADVANCE macro
3610 with direct access access to elements. Adjusted prototype, fixed all
3612 (gfc_simplify_dot_product): Removed duplicate check for zero-sized
3614 (gfc_simplify_matmul): Removed usage of ADVANCE macro.
3615 (gfc_simplify_spread): Removed workaround, directly insert elements
3616 at a given array position.
3617 (gfc_simplify_transpose): Likewise.
3618 (gfc_simplify_pack): Replaced usage of ADVANCE macro with corresponding
3620 (gfc_simplify_unpack): Likewise.
3622 2010-04-12 Daniel Franke <franke.daniel@gmail.com>
3624 * simplify.c (only_convert_cmplx_boz): Renamed to ...
3625 (convert_boz): ... this and moved to start of file.
3626 (gfc_simplify_abs): Whitespace fix.
3627 (gfc_simplify_acos): Whitespace fix.
3628 (gfc_simplify_acosh): Whitespace fix.
3629 (gfc_simplify_aint): Whitespace fix.
3630 (gfc_simplify_dint): Whitespace fix.
3631 (gfc_simplify_anint): Whitespace fix.
3632 (gfc_simplify_and): Replaced if-gate by more common switch-over-type.
3633 (gfc_simplify_dnint): Whitespace fix.
3634 (gfc_simplify_asin): Whitespace fix.
3635 (gfc_simplify_asinh): Moved creation of result-expr out of switch.
3636 (gfc_simplify_atan): Likewise.
3637 (gfc_simplify_atanh): Whitespace fix.
3638 (gfc_simplify_atan2): Whitespace fix.
3639 (gfc_simplify_bessel_j0): Removed ATTRIBUTE_UNUSED.
3640 (gfc_simplify_bessel_j1): Likewise.
3641 (gfc_simplify_bessel_jn): Likewise.
3642 (gfc_simplify_bessel_y0): Likewise.
3643 (gfc_simplify_bessel_y1): Likewise.
3644 (gfc_simplify_bessel_yn): Likewise.
3645 (gfc_simplify_ceiling): Reorderd statements.
3646 (simplify_cmplx): Use convert_boz(), check for constant arguments.
3648 (gfc_simplify_cmplx): Use correct default kind. Removed check for
3650 (gfc_simplify_complex): Replaced if-gate. Removed check for
3652 (gfc_simplify_conjg): Whitespace fix.
3653 (gfc_simplify_cos): Whitespace fix.
3654 (gfc_simplify_cosh): Replaced if-gate by more common switch-over-type.
3655 (gfc_simplify_dcmplx): Removed check for constant arguments.
3656 (gfc_simplify_dble): Use convert_boz() and gfc_convert_constant().
3657 (gfc_simplify_digits): Whitespace fix.
3658 (gfc_simplify_dim): Whitespace fix.
3659 (gfc_simplify_dprod): Reordered statements.
3660 (gfc_simplify_erf): Whitespace fix.
3661 (gfc_simplify_erfc): Whitespace fix.
3662 (gfc_simplify_epsilon): Whitespace fix.
3663 (gfc_simplify_exp): Whitespace fix.
3664 (gfc_simplify_exponent): Use convert_boz().
3665 (gfc_simplify_floor): Reorderd statements.
3666 (gfc_simplify_gamma): Whitespace fix.
3667 (gfc_simplify_huge): Whitespace fix.
3668 (gfc_simplify_iand): Whitespace fix.
3669 (gfc_simplify_ieor): Whitespace fix.
3670 (simplify_intconv): Use gfc_convert_constant().
3671 (gfc_simplify_int): Use simplify_intconv().
3672 (gfc_simplify_int2): Reorderd statements.
3673 (gfc_simplify_idint): Reorderd statements.
3674 (gfc_simplify_ior): Whitespace fix.
3675 (gfc_simplify_ishftc): Removed duplicate type check.
3676 (gfc_simplify_len): Use range_check() instead of manual range check.
3677 (gfc_simplify_lgamma): Removed ATTRIBUTE_UNUSED. Whitespace fix.
3678 (gfc_simplify_log): Whitespace fix.
3679 (gfc_simplify_log10): Whitespace fix.
3680 (gfc_simplify_minval): Whitespace fix.
3681 (gfc_simplify_maxval): Whitespace fix.
3682 (gfc_simplify_mod): Whitespace fix.
3683 (gfc_simplify_modulo): Whitespace fix.
3684 (simplify_nint): Reorderd statements.
3685 (gfc_simplify_not): Whitespace fix.
3686 (gfc_simplify_or): Replaced if-gate by more common switch-over-type.
3687 (gfc_simplify_radix): Removed unused result-variable. Whitespace fix.
3688 (gfc_simplify_range): Removed unused result-variable. Whitespace fix.
3689 (gfc_simplify_real): Use convert_boz() and gfc_convert_constant().
3690 (gfc_simplify_realpart): Whitespace fix.
3691 (gfc_simplify_selected_char_kind): Removed unused result-variable.
3692 (gfc_simplify_selected_int_kind): Removed unused result-variable.
3693 (gfc_simplify_selected_real_kind): Removed unused result-variable.
3694 (gfc_simplify_sign): Whitespace fix.
3695 (gfc_simplify_sin): Whitespace fix.
3696 (gfc_simplify_sinh): Replaced if-gate by more common switch-over-type.
3697 (gfc_simplify_sqrt): Avoided goto by inlining check. Whitespace fix.
3698 (gfc_simplify_tan): Replaced if-gate by more common switch-over-type.
3699 (gfc_simplify_tanh): Replaced if-gate by more common switch-over-type.
3700 (gfc_simplify_xor): Replaced if-gate by more common switch-over-type.
3702 2010-04-12 Daniel Franke <franke.daniel@gmail.com>
3704 * gfortran.h (gfc_start_constructor): Removed.
3705 (gfc_get_array_element): Removed.
3706 * array.c (gfc_start_constructor): Removed, use gfc_get_array_expr
3707 instead. Fixed all callers.
3708 (extract_element): Removed.
3709 (gfc_expand_constructor): Temporarily removed check for
3710 max-array-constructor. Will be re-introduced later if still required.
3711 (gfc_get_array_element): Removed, use gfc_constructor_lookup_expr
3712 instead. Fixed all callers.
3713 * expr.c (find_array_section): Replaced manual lookup of elements
3714 by gfc_constructor_lookup.
3716 2010-04-12 Daniel Franke <franke.daniel@gmail.com>
3718 * gfortran.h (gfc_get_null_expr): New prototype.
3719 (gfc_get_operator_expr): New prototype.
3720 (gfc_get_character_expr): New prototype.
3721 (gfc_get_iokind_expr): New prototype.
3722 * expr.c (gfc_get_null_expr): New.
3723 (gfc_get_character_expr): New.
3724 (gfc_get_iokind_expr): New.
3725 (gfc_get_operator_expr): Moved here from matchexp.c (build_node).
3726 * matchexp.c (build_node): Renamed and moved to
3727 expr.c (gfc_get_operator_expr). Reordered arguments to match
3728 other functions. Fixed all callers.
3729 (gfc_get_parentheses): Use specific function to build expr.
3730 * array.c (gfc_match_array_constructor): Likewise.
3731 * arith.c (eval_intrinsic): Likewise.
3732 (gfc_hollerith2int): Likewise.
3733 (gfc_hollerith2real): Likewise.
3734 (gfc_hollerith2complex): Likewise.
3735 (gfc_hollerith2logical): Likewise.
3736 * data.c (create_character_intializer): Likewise.
3737 * decl.c (gfc_match_null): Likewise.
3738 (enum_initializer): Likewise.
3739 * io.c (gfc_match_format): Likewise.
3740 (match_io): Likewise.
3741 * match.c (gfc_match_nullify): Likewise.
3742 * primary.c (match_string_constant): Likewise.
3743 (match_logical_constant): Likewise.
3744 (build_actual_constructor): Likewise.
3745 * resolve.c (build_default_init_expr): Likewise.
3746 * symbol.c (generate_isocbinding_symbol): Likewise.
3747 (gfc_build_class_symbol): Likewise.
3748 (gfc_find_derived_vtab): Likewise.
3749 * simplify.c (simplify_achar_char): Likewise.
3750 (gfc_simplify_adjustl): Likewise.
3751 (gfc_simplify_adjustr): Likewise.
3752 (gfc_simplify_and): Likewise.
3753 (gfc_simplify_bit_size): Likewise.
3754 (gfc_simplify_is_iostat_end): Likewise.
3755 (gfc_simplify_is_iostat_eor): Likewise.
3756 (gfc_simplify_isnan): Likewise.
3757 (simplify_bound): Likewise.
3758 (gfc_simplify_leadz): Likewise.
3759 (gfc_simplify_len_trim): Likewise.
3760 (gfc_simplify_logical): Likewise.
3761 (gfc_simplify_maxexponent): Likewise.
3762 (gfc_simplify_minexponent): Likewise.
3763 (gfc_simplify_new_line): Likewise.
3764 (gfc_simplify_null): Likewise.
3765 (gfc_simplify_or): Likewise.
3766 (gfc_simplify_precision): Likewise.
3767 (gfc_simplify_repeat): Likewise.
3768 (gfc_simplify_scan): Likewise.
3769 (gfc_simplify_size): Likewise.
3770 (gfc_simplify_trailz): Likewise.
3771 (gfc_simplify_trim): Likewise.
3772 (gfc_simplify_verify): Likewise.
3773 (gfc_simplify_xor): Likewise.
3774 * trans-io.c (build_dt): Likewise.
3775 (gfc_new_nml_name_expr): Removed.
3777 2010-04-12 Daniel Franke <franke.daniel@gmail.com>
3779 * arith.h (gfc_constant_result): Removed prototype.
3780 * constructor.h (gfc_build_array_expr): Removed prototype.
3781 (gfc_build_structure_constructor_expr): Removed prototype.
3782 * gfortran.h (gfc_int_expr): Removed prototype.
3783 (gfc_logical_expr): Removed prototype.
3784 (gfc_get_array_expr): New prototype.
3785 (gfc_get_structure_constructor_expr): New prototype.
3786 (gfc_get_constant_expr): New prototype.
3787 (gfc_get_int_expr): New prototype.
3788 (gfc_get_logical_expr): New prototype.
3789 * arith.c (gfc_constant_result): Moved and renamed to
3790 expr.c (gfc_get_constant_expr). Fixed all callers.
3791 * constructor.c (gfc_build_array_expr): Moved and renamed to
3792 expr.c (gfc_get_array_expr). Split gfc_typespec argument to type
3793 and kind. Fixed all callers.
3794 (gfc_build_structure_constructor_expr): Moved and renamed to
3795 expr.c (gfc_get_structure_constructor_expr). Split gfc_typespec argument
3796 to type and kind. Fixed all callers.
3797 * expr.c (gfc_logical_expr): Renamed to ...
3798 (gfc_get_logical_expr): ... this. Added kind argument. Fixed all callers.
3799 (gfc_int_expr): Renamed to ...
3800 (gfc_get_int_expr): ... this. Added kind and where arguments. Fixed all
3802 (gfc_get_constant_expr): New.
3803 (gfc_get_array_expr): New.
3804 (gfc_get_structure_constructor_expr): New.
3805 * simplify.c (int_expr_with_kind): Removed, callers use gfc_get_int_expr
3808 2010-04-12 Daniel Franke <franke.daniel@gmail.com>
3810 * constructor.h: New.
3811 * constructor.c: New.
3812 * Make-lang.in: Add new files to F95_PARSER_OBJS.
3813 * arith.c (reducy_unary): Use constructor API.
3814 (reduce_binary_ac): Likewise.
3815 (reduce_binary_ca): Likewise.
3816 (reduce_binary_aa): Likewise.
3817 * check.c (gfc_check_pack): Likewise.
3818 (gfc_check_reshape): Likewise.
3819 (gfc_check_unpack): Likewise.
3820 * decl.c (add_init_expr_to_sym): Likewise.
3821 (build_struct): Likewise.
3822 * dependency.c (gfc_check_dependency): Likewise.
3823 (contains_forall_index_p): Likewise.
3824 * dump-parse-tree.c (show_constructor): Likewise.
3825 * expr.c (free_expr0): Likewise.
3826 (gfc_copy_expr): Likewise.
3827 (gfc_is_constant_expr): Likewise.
3828 (simplify_constructor): Likewise.
3829 (find_array_element): Likewise.
3830 (find_component_ref): Likewise.
3831 (find_array_section): Likewise.
3832 (find_substring_ref): Likewise.
3833 (simplify_const_ref): Likewise.
3834 (scalarize_intrinsic_call): Likewise.
3835 (check_alloc_comp_init): Likewise.
3836 (gfc_default_initializer): Likewise.
3837 (gfc_traverse_expr): Likewise.
3838 * iresolve.c (check_charlen_present): Likewise.
3839 (gfc_resolve_reshape): Likewise.
3840 (gfc_resolve_transfer): Likewise.
3841 * module.c (mio_constructor): Likewise.
3842 * primary.c (build_actual_constructor): Likewise.
3843 (gfc_match_structure_constructor): Likewise.
3844 * resolve.c (resolve_structure_cons): Likewise.
3845 * simplify.c (is_constant_array_expr): Likewise.
3846 (init_result_expr): Likewise.
3847 (transformational_result): Likewise.
3848 (simplify_transformation_to_scalar): Likewise.
3849 (simplify_transformation_to_array): Likewise.
3850 (gfc_simplify_dot_product): Likewise.
3851 (simplify_bound): Likewise.
3852 (simplify_matmul): Likewise.
3853 (simplify_minval_maxval): Likewise.
3854 (gfc_simplify_pack): Likewise.
3855 (gfc_simplify_reshape): Likewise.
3856 (gfc_simplify_shape): Likewise.
3857 (gfc_simplify_spread): Likewise.
3858 (gfc_simplify_transpose): Likewise.
3859 (gfc_simplify_unpack): Likewise.q
3860 (gfc_convert_constant): Likewise.
3861 (gfc_convert_char_constant): Likewise.
3862 * target-memory.c (size_array): Likewise.
3863 (encode_array): Likewise.
3864 (encode_derived): Likewise.
3865 (interpret_array): Likewise.
3866 (gfc_interpret_derived): Likewise.
3867 (expr_to_char): Likewise.
3868 (gfc_merge_initializers): Likewise.
3869 * trans-array.c (gfc_get_array_constructor_size): Likewise.
3870 (gfc_trans_array_constructor_value): Likewise.
3871 (get_array_ctor_strlen): Likewise.
3872 (gfc_constant_array_constructor_p): Likewise.
3873 (gfc_build_constant_array_constructor): Likewise.
3874 (gfc_trans_array_constructor): Likewise.
3875 (gfc_conv_array_initializer): Likewise.
3876 * trans-decl.c (check_constant_initializer): Likewise.
3877 * trans-expr.c (flatten_array_ctors_without_strlen): Likewise.
3878 (gfc_apply_interface_mapping_to_cons): Likewise.
3879 (gfc_trans_structure_assign): Likewise.
3880 (gfc_conv_structure): Likewise.
3881 * array.c (check_duplicate_iterator): Likewise.
3882 (match_array_list): Likewise.
3883 (match_array_cons_element): Likewise.
3884 (gfc_match_array_constructor): Likewise.
3885 (check_constructor_type): Likewise.
3886 (check_constructor): Likewise.
3888 (expand_constructor): Likewise.
3889 (extract_element): Likewise.
3890 (gfc_expanded_ac): Likewise.
3891 (resolve_array_list): Likewise.
3892 (gfc_resolve_character_array_constructor): Likewise.
3893 (copy_iterator): Renamed to ...
3894 (gfc_copy_iterator): ... this.
3895 (gfc_append_constructor): Removed.
3896 (gfc_insert_constructor): Removed unused function.
3897 (gfc_get_constructor): Removed.
3898 (gfc_free_constructor): Removed.
3899 (qgfc_copy_constructor): Removed.
3900 * gfortran.h (struct gfc_expr): Removed member 'con_by_offset'.
3901 Removed all references. Replaced constructor list by splay-tree.
3902 (struct gfc_constructor): Removed member 'next', moved 'offset' from
3903 the inner struct, added member 'base'.
3904 (gfc_append_constructor): Removed prototype.
3905 (gfc_insert_constructor): Removed prototype.
3906 (gfc_get_constructor): Removed prototype.
3907 (gfc_free_constructor): Removed prototype.
3908 (qgfc_copy_constructor): Removed prototype.