1 2010-09-27 Tobias Burnus <burnus@net-b.de>
5 * intrinsic.h (gfc_simplify_compiler_options,
6 gfc_simplify_compiler_version): New prototypes.
7 * intrinsic.c (gfc_intrinsic_function_by_id,
8 make_from_module): New functions.
9 (gfc_find_function, gfc_find_subroutine, gfc_generic_intrinsic,
10 gfc_specific_intrinsic): Don't return module intrinsics.
11 (add_functions): Add compiler_options, compiler_version.
12 (gfc_intrinsic_func_interface): Also lookup symbol by ISYM ID.
13 * symbol.c (std_for_isocbinding_symbol): Add version check for
15 * iso-fortran-env.def: Add compiler_options, compiler_version.
16 * iso-c-binding.def: Add c_sizeof.
17 * gfortran.h (gfc_intrinsic_sym): Add from_module:1.
18 (iso_c_binding_symbol, iso_fortran_env_symbol): Add NAMED_FUNCTIONS.
19 (gfc_intrinsic_function_by_id): New prototype.
20 * module.c (create_intrinsic_function): New function.
21 (import_iso_c_binding_module, use_iso_fortran_env_module): Use it.
22 * trans-types.c (init_c_interop_kinds): Add NAMED_FUNCTIONS.
23 * resolve.c (resolve_intrinsic): Try also to resolve intrinsics
25 * simplify.c (gfc_simplify_compiler_options,
26 gfc_simplify_compiler_version): New functions.
28 2010-09-26 Daniel Kraft <d@domob.eu>
32 * resolve.c (resolve_select_type): Clarify code.
33 (resolve_assoc_var): Only set typespec if it is currently unknown.
35 2010-09-26 Jerry DeLisle <jvdelisle@gcc.gnu.org>
38 * module.c (create_int_parameter_array): Set the array value shape.
40 2010-09-25 Tobias Burnus <burnus@net-b.de>
42 * gfortran.texi: Re-add accidently removed \input line.
44 2010-09-25 Daniel Kraft <d@domob.eu>
47 * gfortran.h (struct gfc_dt): New member `dt_io_kind'.
48 * io.c (resolve_tag): F2008 check for NEWUNIT and variable
49 definition checks for NEWUNIT, IOSTAT, SIZE and IOMSG.
50 (gfc_free_dt): Correctly handle freeing of `dt_io_kind' and
51 `extra_comma' with changed semantics.
52 (gfc_resolve_dt): Check variable definitions.
53 (match_io_element): Remove INTENT and PURE checks here and
54 initialize code->ext.dt member.
55 (match_io): Set dt->dt_io_kind.
56 (gfc_resolve_inquire): Check variable definition for all tags
57 except UNIT, FILE and ID.
58 * resolve.c (resolve_transfer): Variable definition check.
60 2010-09-25 Tobias Burnus <burnus@net-b.de>
62 * interface.c (gfc_match_end_interface): Constify char pointer
65 2010-09-24 Steven G. Kargl < kargl@gcc.gnu.org>
67 * interface.c (gfc_match_end_interface): Deal with user defined
68 operators that overload rational operators and C1202.
70 2010-09-24 Tobias Burnus <burnus@net-b.de>
72 * gfortran.texi: Add second space after end-of-sentence period;
73 change / to /@/ to allow hyphenation of URLs.
74 (Standards): Remove duplicated OpenMP, update wording given that
75 Fortran 2008 now released.
76 (Fortran 2008 status): Update and add list of implemented features.
78 2010-09-24 Tobias Burnus <burnus@net-b.de>
81 * iso-fortran-env.def: Add NAMED_KINDARRAY with
82 character_kinds, integer_kinds, logical_kinds and
84 * gfortran.h: Add them to iso_fortran_env_symbol.
85 * libgfortran.h: Rename GFC_INQUIRE_INTERNAL_UNIT to
86 LIBERROR_INQUIRE_INTERNAL_UNIT and move it from
87 libgfortran_stat_codes to libgfortran_error_codes.
88 * module.c (create_int_parameter_array): New function.
89 (use_iso_fortran_env_module): Use it for
90 NAMED_KINDARRAY of iso-fortran-env.def.
91 * trans-decl.c (gfc_get_symbol_decl): Parameter
92 arrays of intrinsics modules become local static variables.
93 * intrinsic.texi (ISO_FORTRAN_ENV): Add character_kinds,
94 integer_kinds, logical_kinds and real_kinds.
96 2010-09-23 Thomas Koenig <tkoenig@gcc.gnu.org>
99 * frontend-passes.c (optimize_binop_array_assignment):
100 Only re-use lhs as intermediate storage if kind and type
103 2010-09-23 Mikael Morin <mikael@gcc.gnu.org>
107 * trans-array.c (gfc_conv_expr_descriptor): Handle
108 ss->type == GFC_SS_INTRINSIC (for {l,u}bound intrinsics) case.
110 2010-09-23 Tobias Burnus <burnus@net-b.de>
112 * intrinsic.texi (OpenMP modules): Add named constants of
115 2010-09-23 Daniel Kraft <d@domob.eu>
120 * gfortran.h (gfc_check_vardef_context): New method.
121 (struct symbol_attribute): New flag `select_type_temporary'.
122 * primary.c (gfc_variable_attr): Clarify initialization of ref.
123 (match_variable): Remove PROTECTED check and assignment check
124 for PARAMETERs (this is now done later).
125 * match.c (gfc_match_iterator): Remove INTENT(IN) check.
126 (gfc_match_associate): Defer initialization of newAssoc->variable.
127 (gfc_match_nullify): Remove PURE definability check.
128 (select_type_set_tmp): Set new `select_type_temporary' flag.
129 * expr.c (gfc_check_assign): Remove INTENT(IN) check here.
130 (gfc_check_pointer_assign): Ditto (and other checks removed).
131 (gfc_check_vardef_context): New method.
132 * interface.c (compare_parameter_protected): Removed.
133 (compare_actual_formal): Use `gfc_check_vardef_context' for checks
134 related to INTENT([IN]OUT) arguments.
135 * intrinsic.c (check_arglist): Check INTENT for intrinsics.
136 * resolve.c (gfc_resolve_iterator): Use `gfc_check_vardef_context'.
137 (remove_last_array_ref): New method.
138 (resolve_deallocate_expr), (resolve_allocate_expr): Ditto.
139 (resolve_allocate_deallocate): Ditto (for STAT and ERRMSG).
140 (resolve_assoc_var): Remove checks for definability here.
141 (resolve_select_type): Handle resolving of code->block here.
142 (resolve_ordinary_assign): Remove PURE check.
143 (resolve_code): Do not resolve code->blocks for SELECT TYPE here.
144 Use `gfc_check_vardef_context' for assignments and pointer-assignments.
146 2010-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
148 * gfortran.texi (Argument list functions): Allow URL to wrap.
149 * intrinsic.texi (GETGID, GETPID, GETUID, IMAGE_INDEX)
150 (IS_IOSTAT_END, IS_IOSTAT_EOR, NUM_IMAGES, THIS_IMAGE)
151 (ISO_FORTRAN_ENV): Fix markup in index entries, and a couple of
152 code markups in the text.
153 * invoke.texi (Fortran Dialect Options)
154 (Error and Warning Options, Directory Options, Code Gen Options):
155 Likewise. Remove @code inside @smallexample.
157 2010-09-22 Joseph Myers <joseph@codesourcery.com>
159 * gfortranspec.c (lang_specific_driver): Handle OPT__version and
160 OPT__help instead of OPT_fversion and OPT_fhelp.
161 * lang.opt (-all-warnings, -assert, -assert=, -comments,
162 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
163 -dump, -dump=, -include-barrier, -include-directory,
164 -include-directory=, -include-directory-after,
165 -include-directory-after=, -include-prefix, -include-prefix=,
166 -no-line-commands, -no-standard-includes, -output, -output=,
167 -preprocess, -print-missing-file-dependencies, -trace-includes,
168 -undefine-macro, -undefine-macro=, -user-dependencies, -verbose,
169 -write-dependencies, -write-user-dependencies): New.
171 2010-09-21 Jason Blevins <jrblevin@sdf.org>
173 * intrinsics.texi (HYPOT, IMAGE_INDEX, BESSEL_JN, BESSEL_YN,
174 execute_command_line, IEOR, IOR, NORM2, NOT, NULL, PARITY):
177 2010-09-21 Mikael Morin <mikael@gcc.gnu.org>
180 * trans-array.c (gfc_conv_expr_descriptor): Calculate dim out of n and
184 * trans-array.c (gfc_conv_expr_descriptor): Unset full if we are
185 accessing dimensions in reversed order.
188 * trans-array.c (gfc_conv_expr_descriptor): Special case noncopying
189 intrinsic function call.
191 * trans-array.c (gfc_conv_expr_descriptor): Remove ss lookup.
192 Update asserts accordingly.
195 * trans.h (gfc_se): New field force_tmp.
196 * trans-expr.c (gfc_conv_procedure_call): Check for argument alias
197 and set parmse.force_tmp if some alias is found.
198 * trans-array.c (gfc_conv_expr_descriptor): Force a temporary creation
199 if se->force_tmp is set.
201 2010-09-20 Janus Weil <janus@gcc.gnu.org>
204 * trans-expr.c (gfc_conv_procedure_call): Fix pointer checking for
205 TBPs, PPCs and pointer/allocatable components.
207 2010-09-20 Paul Thomas <pault@gcc.gnu.org>
210 * simplify.c (is_constant_array_expr): Allow structure array
211 elements as well as constants.
212 (gfc_simplify_pack, gfc_simplify_reshape, gfc_simplify_spread,
213 gfc_simplify_transpose, gfc_simplify_unpack): Copy the derived
214 type of source to the result.
216 2010-09-19 Thomas Koenig <tkoenig@gcc.gnu.org>
218 * frontend-passes.c (gfc_expr_walker): Also
219 handle EXPR_SUBSTRING.
221 2010-09-19 Thomas Koenig <tkoenig@gcc.gnu.org>
223 * frontend-passes.c (gfc_expr_walker): Handle
224 constructors and references.
226 2010-09-16 Tobias Burnus <burnus@net-b.de>
229 * trans-types.c (create_fn_spec): New function.
230 (gfc_get_function_type): Call it.
232 2010-09-16 Jakub Jelinek <jakub@redhat.com>
234 * gfortran.h (walk_code_fn_t, walk_expr_fn_t): New types.
235 (gfc_expr_walker, gfc_code_walker): New prototypes.
236 * frontend-passes.c (gfc_expr_walker, gfc_code_walker): New functions.
237 (WALK_SUBEXPR, WALK_SUBEXPR_TAIL, WALK_SUBCODE): Define.
238 (optimize_namespace): Use gfc_code_walker.
239 (optimize_code, optimize_expr): Rewritten as gfc_code_walker hooks.
240 (optimize_expr_0, optimize_code_node,
241 optimize_actual_arglist): Removed.
242 (optimize_assignment): Don't call optimize_expr_0.
244 2010-09-16 Janus Weil <janus@gcc.gnu.org>
247 * interface.c (compare_parameter): Create vtab for actual argument,
248 instead of formal (if needed).
250 2010-09-15 Janus Weil <janus@gcc.gnu.org>
253 * resolve.c (resolve_allocate_expr): Do default initialization via
256 2010-09-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
258 * mathbuiltins.def: Do not defined huge_val built-in.
259 * trans-const.c (gfc_build_inf_or_huge): New function.
260 * trans-const.h (gfc_build_inf_or_huge): New prototype.
261 * f95-lang.c (gfc_init_builtin_functions): Don't defined
263 * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): We don't
264 have functions of type (*) (void) anymore.
265 (gfc_conv_intrinsic_minmaxloc): Call gfc_build_inf_or_huge.
266 (gfc_conv_intrinsic_nearest): Call gfc_build_inf_or_huge instead
267 of generating a call to huge_val().
269 2010-09-11 Mikael Morin <mikael@gcc.gnu.org>
271 * gfortran.h (gfc_expr): Remove inline_noncopying_intrinsic attribute.
272 * dependency.c (gfc_check_dependency): Don't depend on
273 expr's inline_noncopying_intrinsic_attribute.
274 * dependency.c (gfc_check_argument_var_dependency,
275 gfc_check_argument_dependency): Ditto. Recursively check dependency
276 as NOT_ELEMENTAL in the non-copying (=transpose) case.
277 * trans-intrinsic.c (gfc_conv_intrinsic_function): Ditto.
278 * resolve.c (find_noncopying_intrinsics): Remove.
279 (resolve_function, resolve_call): Remove call to
280 find_noncopying_intrinsics.
282 * trans-array.c (gfc_conv_array_transpose): Remove.
283 (gfc_walk_subexpr): Make non-static. Move prototype...
284 * trans-array.h (gfc_walk_subexpr): ... here.
285 * trans-intrinsic.c (gfc_conv_intrinsic_function): Update transpose
287 (walk_inline_intrinsic_transpose, walk_inline_intrinsic_function,
288 gfc_inline_intrinsic_function_p): New.
289 (gfc_is_intrinsic_libcall): Return early in inline intrinsic case.
290 Remove transpose from the libcall list.
291 (gfc_walk_intrinsic_function): Special case inline intrinsic.
292 * trans.h (gfc_inline_intrinsic_function_p): New prototype.
294 2010-09-10 Mikael Morin <mikael@gcc.gnu.org>
296 * trans-expr.c (expr_is_variable): New function taking non-copying
297 intrinsic functions into account.
298 (gfc_trans_assignment_1): Use expr_is_variable.
300 2010-09-10 Mikael Morin <mikael@gcc.gnu.org>
302 * trans-array.c (gfc_conv_loop_setup): Access the shape along the
303 real array dimension instead of the scalarizer (loop) dimension.
305 2010-09-10 Mikael Morin <mikael@gcc.gnu.org>
307 * trans-array.c (gfc_conv_resolve_dependencies): Handle same-array
308 transposed references.
310 2010-09-10 Tobias Burnus <burnus@net-b.de>
313 * trans.h (build1_stat_loc, build2_stat_loc, build3_stat_loc,
314 build4_stat_loc): New inline functions.
315 (build1_loc, build2_loc, build3_loc, build4_loc): New macros.
316 (build1_v, build2_v, build3_v, build4_v): Use input_location
318 * trans-array.c (gfc_trans_scalarized_loop_end,
319 gfc_conv_array_parameter): Replace build[1-4] by build[1-4]_loc.
320 * trans.c (gfc_build_addr_expr, gfc_build_array_ref,
321 gfc_finish_wrapped_block): Ditto.
322 * trans-decl.c (gfc_init_default_dt, init_intent_out_dt): Ditto.
323 * trans-expr.c (gfc_conv_missing_dummy,
324 gfc_trans_alloc_subarray_assign, gfc_trans_zero_assign): Ditto.
325 * trans-openmp.c (gfc_omp_clause_default_ctor,
326 gfc_trans_omp_critical, gfc_trans_omp_parallel,
327 gfc_trans_omp_parallel_do, gfc_trans_omp_parallel_sections,
328 gfc_trans_omp_parallel_workshare, gfc_trans_omp_sections
329 gfc_trans_omp_single, gfc_trans_omp_task,
330 gfc_trans_omp_workshare): Ditto.
332 2010-09-09 Steven G. Kargl <kargl@gcc.gnu.org>
334 * fortran/expr.c (check_inquiry): OPTIONAL attribute is not allowed
335 for dummy argument that appears in a specification statement.
337 2010-09-09 Mikael Morin <mikael@gcc.gnu.org>
339 * trans-array.c (gfc_get_array_ref_dim): New function.
340 (gfc_trans_create_temp_array): Reconstruct array
341 bounds from loop bounds. Use array bounds instead of loop bounds.
343 2010-09-09 Mikael Morin <mikael@gcc.gnu.org>
345 * trans-array.c (gfc_set_loop_bounds_from_array_spec):
346 Get the array dimension from the dim array.
348 2010-09-09 Mikael Morin <mikael@gcc.gnu.org>
350 * trans-array.c (gfc_trans_preloop_setup): Unconditionally use the
351 dim array to get the stride in the innermost loop.
353 2010-09-09 Mikael Morin <mikael@gcc.gnu.org>
355 * trans-array.c (gfc_trans_create_temp_array): Don't set dim array.
356 (gfc_conv_loop_setup, gfc_walk_function_expr): Set dim array.
357 * trans-intrinsic.c (gfc_walk_intrinsic_libfunc): Ditto.
359 2010-09-09 Mikael Morin <mikael@gcc.gnu.org>
361 * trans-array.c (gfc_trans_create_temp_array): Assert loop dimension
362 and info dimension are the same. Loop over loop dimension.
363 * trans-stmt.c (gfc_conv_elemental_dependencies): Set loop dimension
365 2010-09-09 Mikael Morin <mikael@gcc.gnu.org>
367 * trans-array.c (gfc_conv_array_transpose): Change generated descriptor
370 2010-09-09 Tobias Burnus <burnus@net-b.de>
373 * intrincic.texi (FGET, FGETC, FPUT, FPUTC, FSTAT, GETCWD, KILL,
374 STAT): Show also syntax for the function version.
375 * intrinsic.c (add_sym_1s_intent, add_sym_2s_intent,
376 add_sym_3s_intent): Remove function.
377 (add_sym_1s, add_sym_2s, add_sym_3s): Take always the intent
379 (add_sym_2_intent): New function.
380 (add_functions): Set intent for functions which modify
381 the argument: fstat, fgetc, fget, hostnm, lstat, stat. Change
382 argument name of hostnm from "a" to "c"
383 (add_subroutines): Change add_sym_*s_intent to
384 add_sym_*s and add intent to the add_sym_*s calls.
386 2010-09-08 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
389 * intrinsic.c (add_functions): Add B{G,L}{E,T}, DSHIFT{L,R},
390 MASK{L,R}, MERGE_BITS and SHIFT{A,L,R}.
391 * gfortran.h: Define ISYM values for above intrinsics.
392 * intrinsic.h (gfc_check_bge_bgt_ble_blt, gfc_check_dshift,
393 gfc_check_mask, gfc_check_merge_bits, gfc_check_shift,
394 gfc_simplify_bge, gfc_simplify_bgt, gfc_simplify_ble,
395 gfc_simplify_blt, gfc_simplify_dshiftl, gfc_simplify_dshiftr,
396 gfc_simplify_lshift, gfc_simplify_maskl, gfc_simplify_maskr,
397 gfc_simplify_merge_bits, gfc_simplify_rshift,
398 gfc_simplify_shifta, gfc_simplify_shiftl, gfc_simplify_shiftr,
399 gfc_resolve_dshift, gfc_resolve_mask, gfc_resolve_merge_bits,
400 gfc_resolve_shift): New prototypes.
401 * iresolve.c (gfc_resolve_dshift, gfc_resolve_mask,
402 gfc_resolve_merge_bits, gfc_resolve_shift): New functions.
403 * check.c (gfc_check_bge_bgt_ble_blt, gfc_check_dshift,
404 gfc_check_mask, gfc_check_merge_bits, gfc_check_shift): New
406 * trans-intrinsic.c (gfc_conv_intrinsic_dshift,
407 gfc_conv_intrinsic_bitcomp, gfc_conv_intrinsic_shift,
408 gfc_conv_intrinsic_merge_bits, gfc_conv_intrinsic_mask): New
410 (gfc_conv_intrinsic_function): Call above static functions.
411 * intrinsic.texi: Document new intrinsics.
412 * simplify.c (gfc_simplify_bge, gfc_simplify_bgt, gfc_simplify_ble,
413 gfc_simplify_blt, gfc_simplify_dshiftl, gfc_simplify_dshiftr,
414 gfc_simplify_lshift, gfc_simplify_maskl, gfc_simplify_maskr,
415 gfc_simplify_merge_bits, gfc_simplify_rshift,
416 gfc_simplify_shifta, gfc_simplify_shiftl, gfc_simplify_shiftr):
419 2010-09-08 Jakub Jelinek <jakub@redhat.com>
421 * frontend-passes.c (optimize_code_node): Walk block chain by default.
424 * trans-openmp.c (gfc_trans_omp_do): Store exit/cycle labels on code
425 instead of code->block.
428 * openmp.c (resolve_omp_do): Report not enough do loops for
429 collapse even if block->next is NULL.
431 2010-09-07 Thomas Koenig <tkoenig@gcc.gnu.org>
434 * dependency.c (gfc_deb_compare_expr): Take missing optional
435 arguments into account.
437 2010-09-08 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
439 * trans.h (gfor_fndecl_clz128, gfor_fndecl_ctz128): Remove.
440 * trans-decl.c (gfor_fndecl_clz128, gfor_fndecl_ctz128): Remove.
441 (gfc_build_intrinsic_function_decls): Don't build the
442 gfor_fndecl_clz128 and gfor_fndecl_ctz128.
443 * trans-intrinsic.c (gfc_conv_intrinsic_leadz,
444 gfc_conv_intrinsic_trailz): Generate inline arithmetic instead
445 of calling clz128/ctz128 library functions.
447 2010-09-07 Jan Hubicka <jh@suse.cz>
449 * trans-expr.c (gfc_conv_initializer): Set STATIC flags for
452 2010-09-07 Tobias Burnus <burnus@net-b.de>
455 * intrinsic.texi (COS): Remove superfluous "n".
457 2010-09-07 Tobias Burnus <burnus@net-b.de>
460 * trans-array.c (gfc_conv_descriptor_data_get,
461 gfc_conv_descriptor_data_set, gfc_conv_descriptor_data_addr,
462 gfc_conv_descriptor_offset, gfc_conv_descriptor_dtype,
463 gfc_conv_descriptor_dimension, gfc_conv_descriptor_stride,
464 gfc_conv_descriptor_lbound, gfc_conv_descriptor_ubound,
465 gfc_conv_shift_descriptor_lbound,
466 gfc_set_loop_bounds_from_array_spec,
467 gfc_trans_allocate_array_storage, gfc_trans_create_temp_array,
468 gfc_conv_array_transpose, gfc_get_iteration_count,
469 gfc_grow_array, gfc_trans_array_ctor_element,
470 gfc_trans_array_constructor_subarray,
471 gfc_trans_array_constructor_value,
472 constant_array_constructor_loop_size, gfc_trans_array_constructor,
473 gfc_set_vector_loop_bounds, gfc_trans_array_bound_check,
474 gfc_conv_array_index_offset, gfc_conv_scalarized_array_ref,
475 gfc_conv_array_ref, gfc_trans_preloop_setup,
476 gfc_trans_scalarized_loop_end, gfc_conv_ss_startstride,
477 gfc_conv_loop_setup, gfc_conv_array_extent_dim,
478 gfc_conv_descriptor_size, gfc_array_init_size,
479 gfc_array_allocate, gfc_array_deallocate,
480 gfc_trans_array_bounds, gfc_trans_auto_array_allocation,
481 gfc_trans_dummy_array_bias, gfc_get_dataptr_offset,
482 get_array_charlen, gfc_conv_expr_descriptor,
483 array_parameter_size, gfc_conv_array_parameter,
484 gfc_trans_dealloc_allocated, get_full_array_size,
485 duplicate_allocatable,
486 structure_alloc_comps): Change fold_build[0-9] to
488 (duplicate_allocatable, structure_alloc_comps,
489 gfc_duplicate_allocatable): Add space after function name.
491 2010-09-07 Mikael Morin <mikael@gcc.gnu.org>
493 * trans-stmt.c (gfc_trans_character_select): Be conversion-safe while
494 checking string length value.
495 * trans-intrinsic.c (gfc_conv_intrinsic_char): Build integer using
496 gfc_charlen_type_node type.
499 * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Convert string
500 length to gfc_charlen_type_node.
502 2010-09-06 Thomas Koenig <tkoenig@gcc.gnu.org>
505 * frontend-passes.c (optimize_binop_array_assignment): New
507 (optimize_assignment): Call it.
509 2010-09-06 Thomas Koenig <tkoenig@gcc.gnu.org>
512 * trans-expr.c (gfc_conv_substring): If start and end
513 of the string reference are equal, set the length to one.
515 2010-09-06 Tobias Burnus <burnus@net-b.de>
518 * dump-parse-tree.c (gfc_debug_expr): Use stderr instead of stdout.
520 2010-09-06 Tobias Burnus <burnus@net-b.de>
523 * dump-parse-tree.c (gfc_debug_expr): New function.
525 2010-09-06 Tobias Burnus <burnus@net-b.de>
528 * intrinsic.c (add_functions): Support IALL, IANY, IPARITY.
529 (check_specific): Special case for those intrinsics.
530 * gfortran.h (gfc_isym_id): Add new intrinsics
531 * intrinsic.h (gfc_check_transf_bit_intrins,
532 gfc_simplify_iall, gfc_simplify_iany, gfc_simplify_iparity,
533 gfc_resolve_iall, gfc_resolve_iany, gfc_resolve_iparity):
535 * iresolve.c (gfc_resolve_iall, gfc_resolve_iany,
536 gfc_resolve_iparity, resolve_transformational): New functions.
537 (gfc_resolve_product, gfc_resolve_sum,
538 gfc_resolve_parity): Use resolve_transformational.
539 * check.c (gfc_check_transf_bit_intrins): New function.
540 * simplify.c (gfc_simplify_iall, gfc_simplify_iany,
541 gfc_simplify_iparity, do_bit_any, do_bit_ior,
542 do_bit_xor, simplify_transformation): New functions.
543 (gfc_simplify_all, gfc_simplify_any, gfc_simplify_parity,
544 gfc_simplify_sum, gfc_simplify_product): Use simplify_transformation.
545 * trans-intrinsic.c (gfc_conv_intrinsic_arith,
546 gfc_conv_intrinsic_function, gfc_is_intrinsic_libcall):
547 Handle IALL, IANY and IPARITY intrinsics.
548 * intrinsic.texi (IMAGE_INDEX): Move up to fix alphabetic
550 (IALL, IANY, IPARITY): Document new intrinsics.
552 2010-09-05 Tobias Burnus <burnus@net-b.de>
555 * f95-lang.c (gfc_truthvalue_conversion): Use
556 fold_build[0-9]_loc instead of fold_build[0-9].
557 * convert.c (convert): Ditto.
558 * trans-intrinsic.c (gfc_conv_intrinsic_conversion,
559 build_fixbound_expr, build_fix_expr, gfc_conv_intrinsic_aint,
560 gfc_conv_intrinsic_int, gfc_conv_intrinsic_imagpart,
561 gfc_conv_intrinsic_conjg, gfc_trans_same_strlen_check,
562 gfc_conv_intrinsic_bound, gfc_conv_intrinsic_abs,
563 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_mod,
564 gfc_conv_intrinsic_dim, gfc_conv_intrinsic_sign,
565 gfc_conv_intrinsic_dprod, gfc_conv_intrinsic_char,
566 gfc_conv_intrinsic_ctime, gfc_conv_intrinsic_fdate,
567 gfc_conv_intrinsic_ttynam, gfc_conv_intrinsic_minmax,
568 gfc_conv_intrinsic_minmax_char, gfc_conv_intrinsic_anyall,
569 gfc_conv_intrinsic_count, gfc_conv_intrinsic_arith,
570 gfc_conv_intrinsic_dot_product, gfc_conv_intrinsic_minmaxloc,
571 gfc_conv_intrinsic_minmaxval, gfc_conv_intrinsic_btest,
572 gfc_conv_intrinsic_bitop, gfc_conv_intrinsic_not,
573 gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ibits,
574 gfc_conv_intrinsic_rlshift, gfc_conv_intrinsic_ishft,
575 gfc_conv_intrinsic_ishftc, gfc_conv_intrinsic_leadz,
576 gfc_conv_intrinsic_trailz, gfc_conv_intrinsic_popcnt_poppar,
577 gfc_conv_intrinsic_ichar, gfc_conv_has_intvalue,
578 gfc_conv_intrinsic_merge, gfc_conv_intrinsic_spacing,
579 gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_size,
580 size_of_string_in_bytes, gfc_conv_intrinsic_sizeof,
581 gfc_conv_intrinsic_storage_size, gfc_conv_intrinsic_strcmp,
582 gfc_conv_intrinsic_transfer, gfc_conv_allocated,
583 gfc_conv_associated, gfc_conv_same_type_as,
584 gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat): Ditto.
586 2010-09-04 Tobias Burnus <burnus@net-b.de>
589 * resolve.c (resolve_fl_namelist): Change constraint checking
590 order to prevent endless loop.
592 2010-09-04 Janus Weil <janus@gcc.gnu.org>
595 * resolve.c (resolve_allocate_expr): Generate default initializers
596 already at this point, resolve them and put them into expr3, ...
597 * trans-stmt.c (gfc_trans_allocate): ... instead of waiting until
600 2010-09-03 Tobias Burnus <burnus@net-b.de>
603 * trans-intrinsic.c (gfc_conv_intrinsic_sign,
604 gfc_conv_intrinsic_leadz): Use build_call_expr_loc instead
606 * trans-expr.c (gfc_conv_expr_present, gfc_conv_missing_dummy,
607 gfc_conv_string_length, gfc_conv_substring,
608 gfc_conv_component_ref, gfc_conv_unary_op, gfc_conv_powi,
609 gfc_conv_cst_int_power, gfc_conv_string_tmp, gfc_conv_concat_op,
610 gfc_conv_expr_op, gfc_build_compare_string,
611 gfc_set_interface_mapping_bounds, gfc_conv_subref_array_arg,
612 gfc_conv_derived_to_class, conv_isocbinding_procedure,
613 gfc_conv_procedure_call, fill_with_spaces,
614 gfc_trans_string_copy, gfc_trans_alloc_subarray_assign,
615 gfc_trans_structure_assign, gfc_trans_pointer_assignment,
616 gfc_trans_scalar_assign, gfc_trans_zero_assign,
617 gfc_trans_array_copy, gfc_trans_array_constructor_copy): Change
618 fold_build[0-9] to fold_build[0-9]_loc.
619 * trans-io.c (set_parameter_const, set_parameter_value,
620 set_parameter_ref, gfc_convert_array_to_string, set_string,
621 set_internal_unit, io_result, set_error_locus,
622 nml_get_addr_expr, build_dt): Ditto.
623 * trans-openmp.c (gfc_omp_clause_default_ctor,
624 gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op,
625 gfc_trans_omp_array_reduction, gfc_trans_omp_atomic,
626 gfc_trans_omp_do): Ditto.
627 * trans.c (gfc_add_modify, gfc_build_addr_expr,
628 gfc_build_array_ref, gfc_trans_runtime_error_vararg,
629 gfc_trans_runtime_check, gfc_call_malloc,
630 gfc_allocate_with_status, gfc_allocate_array_with_status,
631 gfc_call_free, gfc_deallocate_with_status,
632 gfc_call_realloc): Ditto.
634 2010-09-03 Thomas Koenig <tkoenig@gcc.gnu.org>
637 * dependency.c (gfc_deb_compare_expr): Compare equal for equal
638 arglists for pure user functions, or for those intrinsic
639 functions which are also pure.
640 * intrinsics.c (add_conv): Mark conversion functions as pure.
641 (add_char_conversions): Likewise.
643 2010-09-03 Daniel Kraft <d@domob.eu>
646 * resolve.c (resolve_actual_arglist): Allow internal procedure
647 as actual argument with Fortran 2008.
649 2010-09-03 Daniel Kraft <d@domob.eu>
652 * gfortran.h (struct gfc_code): Renamed `whichloop' to
653 `which_construct' as this is no longer restricted to loops.
654 * parse.h (struct gfc_state_data): New field `construct'.
655 * match.c (match_exit_cycle): Handle EXIT from non-loops.
656 * parse.c (push_state): Set `construct' field.
657 * resolve.c (resolve_select_type): Extend comment.
658 * trans-stmt.c (gfc_trans_if): Add exit label.
659 (gfc_trans_block_construct), (gfc_trans_select): Ditto.
660 (gfc_trans_simple_do): Store exit/cycle labels on the gfc_code itself.
661 (gfc_trans_do), (gfc_trans_do_while): Ditto.
662 (gfc_trans_exit): Use new name `which_construct' instead of `whichloop'.
663 (gfc_trans_cycle): Ditto.
664 (gfc_trans_if_1): Use fold_build3_loc instead of fold_build3.
666 2010-09-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
668 * trans-intrinsic.c (gfc_conv_intrinsic_aint): Fix whitespace.
669 (gfc_conv_intrinsic_ishft): Only evaluate arguments once.
670 (gfc_conv_intrinsic_ishftc): Only evaluate arguments once.
671 * intrinsic.texi (RSHIFT): Fix documentation.
673 2010-09-02 Tobias Burnus <burnus@net-b.de>
676 * trans-common.c (create_common): Change build[0-9] to
678 * trans-const.c (gfc_conv_constant_to_tree,
679 gfc_conv_constant_to_tree): Ditto.
680 * trans-decl.c (gfc_build_qualified_array, build_entry_thunks,
681 gfc_get_fake_result_decl, gfc_trans_auto_character_variable,
682 add_argument_checking, create_main_function,
683 gfc_generate_return): Ditto.
684 * trans-types.c (gfc_get_dtype, gfc_get_array_type_bounds): Ditto.
685 * trans-stmt.c (allocate_temp_for_forall_nest_1,
686 compute_inner_temp_size, compute_overall_iter_number,
687 generate_loop_for_rhs_to_temp, generate_loop_for_temp_to_lhs,
688 gfc_conv_elemental_dependencies, gfc_do_allocate,
689 gfc_evaluate_where_mask, gfc_trans_allocate,
690 gfc_trans_arithmetic_if, gfc_trans_call,
691 gfc_trans_character_select, gfc_trans_deallocate,
692 gfc_trans_do, gfc_trans_do_while, gfc_trans_forall_1,
693 gfc_trans_forall_loop, gfc_trans_goto, gfc_trans_if_1,
694 gfc_trans_integer_select, gfc_trans_logical_select,
695 gfc_trans_pointer_assign_need_temp, gfc_trans_return,
696 gfc_trans_simple_do, gfc_trans_sync, gfc_trans_where_2,
697 gfc_trans_where_assign) Ditto.
699 2010-09-02 Janus Weil <janus@gcc.gnu.org>
702 * resolve.c (resolve_symbol): Correct check for attributes of CLASS
705 2010-09-02 Tobias Burnus <burnus@net-b.de>
708 * resolve.c (apply_default_init): Mark symbol as referenced,
709 if it is initialized.
710 (resolve_symbol): Change intialized check for BT_DERIVED such
711 that also function results get initialized; remove now obsolete
712 gfc_set_sym_referenced for BT_CLASS.
714 2010-09-01 Janus Weil <janus@gcc.gnu.org>
717 * class.c (gfc_find_derived_vtab): Add component '$def_init'.
718 * resolve.c (resolve_allocate_expr): Defer handling of default
719 initialization to 'gfc_trans_allocate'.
720 (apply_default_init,resolve_symbol): Handle polymorphic dummies.
721 (resolve_fl_derived): Suppress error messages for vtypes.
722 * trans-stmt.c (gfc_trans_allocate): Handle initialization via
723 polymorphic MOLD expression.
724 * trans-expr.c (gfc_trans_class_init_assign): Now only used for
725 dummy initialization.
727 2010-09-01 Tobias Burnus <burnus@net-b.de>
729 * gfortran.texi (preprocessing): Update URL to COCO.
731 2010-09-01 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
733 * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Resize
734 array quad_decls. Remove unnecessary assignment.
736 2010-09-01 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
738 * trans-expr.c (gfc_conv_power_op): Handle floating-point types
739 other than long double.
740 * mathbuiltins.def: Add builtins from the POW and CPOW family.
741 * trans.h (gfc_builtin_decl_for_float_kind): New prototype.
742 * trans-intrinsic.c (gfc_builtin_decl_for_float_kind): Add gfc_
743 prefix to function name.
744 (gfc_build_intrinsic_lib_fndecls): Add cpow prototype.
745 (gfc_conv_intrinsic_aint): Use gfc_builtin_decl_for_float_kind
747 (gfc_conv_intrinsic_exponent): Likewise.
748 (gfc_conv_intrinsic_abs): Likewise.
749 (gfc_conv_intrinsic_mod): Likewise.
750 (gfc_conv_intrinsic_sign): Likewise.
751 (gfc_conv_intrinsic_arith): Likewise.
752 (gfc_conv_intrinsic_fraction): Likewise.
753 (gfc_conv_intrinsic_nearest): Likewise.
754 (gfc_conv_intrinsic_spacing): Likewise.
755 (gfc_conv_intrinsic_rrspacing): Likewise.
756 (gfc_conv_intrinsic_scale): Likewise.
757 (gfc_conv_intrinsic_set_exponent): Likewise.
759 2010-09-01 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
761 * intrinsic.c: Add EXECUTE_COMMAND_LINE intrinsic.
762 * intrinsic.h (gfc_resolve_execute_command_line): New function.
763 * iresolve.c (gfc_resolve_execute_command_line): New function.
764 * gfortran.h (GFC_ISYM_EXECUTE_COMMAND_LINE): New value.
765 * intrinsic.texi: Document EXECUTE_COMMAND_LINE.
767 2010-08-31 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
770 * f95-lang.c (gfc_init_builtin_functions): Define popcount{,l,ll}
771 and parity{,l,ll} builtins.
772 * trans-intrinsic.c (gfc_conv_intrinsic_popcnt_poppar): New function.
773 (gfc_conv_intrinsic_function): Call above new functions.
774 * simplify.c (gfc_simplify_popcnt, gfc_simplify_poppar): New
776 * intrinsic.texi: Document POPCNT and POPPAR.
778 2010-08-30 Janus Weil <janus@gcc.gnu.org>
781 * resolve.c (resolve_structure_cons): Handle pointer-valued PPCs.
783 2010-08-30 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
785 * Make-lang.in: Add frontend-passes.o dependencies.
787 2010-08-29 Janus Weil <janus@gcc.gnu.org>
790 * resolve.c (resolve_structure_cons): For derived types, make sure the
791 type has been resolved.
792 (resolve_typebound_procedures): Make sure the vtab has been generated.
794 2010-08-29 Janus Weil <janus@gcc.gnu.org>
797 * match.c (gfc_match_select_type): Give the associate-name the
798 FL_VARIABLE attribute.
800 2010-08-28 Steven G. Kargl <kargl@gcc.gnu.org>
802 * simplify.c (gfc_simplify_bessel_n2): Fix indention
805 2010-08-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
808 * trans-types.c (gfc_init_kinds): Disable TFmode.
810 2010-08-27 Janus Weil <janus@gcc.gnu.org>
813 * match.c (gfc_match_allocate): Avoid double free on error.
815 2010-08-27 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
818 * gfortran.h (gfc_real_info): Add c_float128 field.
819 * mathbuiltins.def: Indicate which builtins are const.
820 * trans-types.h (float128_type_node, complex_float128_type_node,
821 gfc_real16_is_float128): New variables.
822 * trans-types.c (float128_type_node, complex_float128_type_node,
823 gfc_real16_is_float128): New variables.
824 (gfc_init_kinds): Allow TFmode.
825 (gfc_build_real_type): Mark __float128 types as such.
826 (gfc_init_types): Initialize float128_type_node and
827 complex_float128_type_node
828 * f95-lang.c (gfc_init_builtin_functions): Adjust for new
829 argument of OTHER_BUILTIN macro.
830 * trans-intrinsic.c (gfc_intrinsic_map_t): Likewise.
831 (builtin_decl_for_precision): Special case for __float128.
832 (builtin_decl_for_float_kind): Likewise.
833 (define_quad_builtin): New function.
834 (gfc_build_intrinsic_lib_fndecls): Create all __float128
835 library decls if necessary. Store them in the real16_decl and
836 complex16_decl builtin map fields.
837 (gfc_get_intrinsic_lib_fndecl): Handle q-suffixed __float128
838 library function names.
840 2010-08-27 Tobias Burnus <burnus@net-b.de>
843 * gcc/fortran/intrinsic.c (add_functions): Add norm2 and parity.
844 * gcc/fortran/intrinsic.h (gfc_check_norm2, gfc_check_parity):
845 gfc_simplify_norm2, gfc_simplify_parity, gfc_resolve_norm2,
846 gfc_resolve_parity): New prototypes.
847 * gcc/fortran/gfortran.h (gfc_isym_id): New enum items
848 GFC_ISYM_NORM2 and GFC_ISYM_PARITY.
849 * gcc/fortran/iresolve.c (gfc_resolve_norm2,
850 gfc_resolve_parity): New functions.
851 * gcc/fortran/check.c (gfc_check_norm2, gfc_check_parity):
853 * gcc/fortran/trans-intrinsic.c (gfc_conv_intrinsic_arith,
854 gfc_conv_intrinsic_function): Handle NORM2 and PARITY.
855 * gcc/fortran/intrinsic.texi (NORM2, PARITY): Add.
856 * gcc/fortran/simplify.c (simplify_transformation_to_array):
857 Add post-processing opterator.
858 (gfc_simplify_all, gfc_simplify_any, gfc_simplify_count,
859 gfc_simplify_product, gfc_simplify_sum): Update call.
860 (add_squared, do_sqrt, gfc_simplify_norm2, do_xor,
861 gfc_simplify_parity): New functions.
863 2010-08-27 Janus Weil <janus@gcc.gnu.org>
866 * match.c (select_type_set_tmp): Add the possibility to reset the
868 (gfc_match_class_is): Reset the temporary in CLASS DEFAULT clauses.
870 2010-08-27 Thomas Koenig <tkoenig@gcc.gnu.org>
873 * dependency.c (check_section_vs_section): Single test for
874 identical strides which takes into account that only one
875 of the strides may be NULL.
877 2010-08-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
880 * primary.c (match_hollerith_constant): Calculate padding needed to
881 fill default integer and allocate string for that size. Set pad bytes
883 * gfortran.h: Add hollerith pad value to type spec union.
884 * data.c (create_character_initializer): Fix spelling of function name.
885 Use hollerith pad value to calculate length.
886 * arith.c (hollerith2representation); Use hollerith pad value to
889 2010-08-26 Daniel Kraft <d@domob.eu>
894 * gfortran.h (struct gfc_association_list): New flag `dangling'.
895 (gfc_build_block_ns): Declared here...
896 * parse.h (gfc_build_block_ns): ...instead of here.
897 * trans.h (gfc_process_block_locals): Expect additionally the
898 gfc_association_list of BLOCK (if present).
899 * match.c (select_type_set_tmp): Create sym->assoc for temporary.
900 * resolve.c (resolve_variable): Only check for invalid *array*
901 references on associate-names.
902 (resolve_assoc_var): New method with code previously in resolve_symbol.
903 (resolve_select_type): Use association to give the selector and
904 temporaries their values instead of ordinary assignment.
905 (resolve_fl_var_and_proc): Allow CLASS associate-names.
906 (resolve_symbol): Use new `resolve_assoc_var' instead of inlining here.
907 * trans-stmt.c (gfc_trans_block_construct): Pass association-list
908 to `gfc_process_block_locals' to match new interface.
909 * trans-decl.c (gfc_get_symbol_decl): Don't defer associate-names
911 (gfc_process_block_locals): Defer them rather here when linked to
912 from the BLOCK's association list.
914 2010-08-25 Jakub Jelinek <jakub@redhat.com>
916 * trans-decl.c (gfc_build_intrinsic_function_decls): Set
917 TREE_NOTHROW on fndecls that can't throw. Set
918 TREE_READONLY on gfor_fndecl_math_ishftc{4,8,16}.
919 (gfc_build_builtin_function_decls): Set TREE_NOTHROW on
920 gfor_fndecl_associated.
922 2010-08-23 Mikael Morin <mikael@gcc.gnu.org>
925 * frontend-passes.c (optimize_equality): Don't optimize array equality
927 2010-08-23 Janus Weil <janus@gcc.gnu.org>
930 * resolve.c (resolve_procedure_interface): New function split off from
932 (resolve_formal_arglist): Call it here ...
933 (resolve_symbol): ... and here.
935 2010-08-22 Joseph Myers <joseph@codesourcery.com>
937 * Make-lang.in (gfortranspec.o): Update dependencies.
938 * gfortranspec.c: Include coretypes.h before gcc.h. Include
940 (MATH_LIBRARY, FORTRAN_LIBRARY): Remove initial "-l".
941 (ADD_ARG_LIBGFORTRAN, Option, lookup_option): Remove.
942 (g77_xargc): Make unsigned.
943 (g77_xargv): Change to g77_x_decoded_options.
944 (g77_newargc): Make unsigned.
945 (g77_newargv): Change to g77_new_decoded_options.
946 (strings_same, options_same): New.
947 (append_arg): Use cl_decoded_option structures.
948 (append_option): New.
949 (add_arg_libgfortran): New.
950 (lang_specific_driver): Use cl_decoded_option structures.
952 2010-08-21 Janus Weil <janus@gcc.gnu.org>
956 * class.c (add_proc_comp): Add static initializer for PPCs.
957 (add_procs_to_declared_vtab): Modified comment.
958 * module.c (mio_component): Add argument 'vtype'. Don't read/write the
959 initializer if the component is part of a vtype.
960 (mio_component_list): Add argument 'vtype', pass it on to
962 (mio_symbol): Modified call to 'mio_component_list'.
963 * trans.h (gfc_conv_initializer): Modified prototype.
964 (gfc_trans_assign_vtab_procs): Removed.
965 * trans-common.c (create_common): Modified call to
966 'gfc_conv_initializer'.
967 * trans-decl.c (gfc_get_symbol_decl,get_proc_pointer_decl,
968 gfc_emit_parameter_debug_info): Modified call to
969 'gfc_conv_initializer'.
970 (build_function_decl): Remove assertion.
971 * trans-expr.c (gfc_conv_derived_to_class,gfc_trans_class_assign):
972 Removed call to 'gfc_trans_assign_vtab_procs'.
973 (gfc_conv_initializer): Add argument 'procptr'.
974 (gfc_conv_structure): Modified call to 'gfc_conv_initializer'.
975 (gfc_trans_assign_vtab_procs): Removed.
976 * trans-stmt.c (gfc_trans_allocate): Removed call to
977 'gfc_trans_assign_vtab_procs'.
979 2010-08-21 Tobias Burnus <burnus@net-b.de>
983 * intrinsic.c (add_sym): Init value attribute.
984 (set_attr_value): New function.
985 (add_functions) Use it and add JN/YN resolvers.
986 * symbol.c (gfc_copy_formal_args_intr): Copy value attr.
987 * intrinsic.h (gfc_resolve_bessel_n2): New prototype.
988 * gfortran.h (gfc_intrinsic_arg): Add value attribute.
989 * iresolve.c (gfc_resolve_bessel_n2): New function.
990 * trans-intrinsic.c (gfc_get_symbol_for_expr): Create
992 (gfc_conv_intrinsic_function,gfc_is_intrinsic_libcall):
993 Add GFC_ISYM_JN2/GFC_ISYM_YN2 as case value.
994 * simplify.c (): For YN set to -INF if previous values
996 * trans-expr.c (gfc_conv_procedure_call): Don't crash
998 * iresolve.c (gfc_resolve_extends_type_of): Set the
999 type of the dummy argument to the one of the actual.
1001 2010-08-20 Joseph Myers <joseph@codesourcery.com>
1003 * lang.opt (MD, MMD): Use NoDriverArg instead of NoArgDriver.
1005 2010-08-20 Joseph Myers <joseph@codesourcery.com>
1007 * gfortranspec.c (lang_specific_driver): Refer to -lgfortran in
1010 2010-08-20 Nathan Froyd <froydnj@codesourcery.com>
1012 * trans-openmp.c: Use FOR_EACH_VEC_ELT.
1014 2010-08-19 Daniel Kraft <d@domob.eu>
1018 * trans.h (struct gfc_se): New flag `byref_noassign'.
1019 * trans-array.h (gfc_conv_shift_descriptor_lbound): New method.
1020 (gfc_conv_array_extent_dim), (gfc_conv_descriptor_size): New methods.
1021 * expr.c (gfc_check_pointer_assign): Allow bounds and rank remapping
1022 and check for compile-time errors with those.
1023 * trans-decl.c (trans_associate_var): Use new routine
1024 `gfc_conv_shift_descriptor_lbound' instead of doing it manually.
1025 * trans-array.c (gfc_conv_shift_descriptor_lbound): New method.
1026 (gfc_conv_array_extent_dim), (gfc_conv_descriptor_size): New methods.
1027 (gfc_array_init_size): Use new `gfc_conv_array_extent_dim'.
1028 (gfc_conv_expr_descriptor): Handle new flag `byref_noassign'.
1029 * trans-expr.c (gfc_trans_pointer_assignment): Handle bounds and
1030 rank remapping for assignment.
1032 2010-08-19 Tobias Burnus <burnus@net-b.de>
1034 * intrinsic.texi (Bessel_jn, Bessel_yn): Fix typo.
1035 * * simplify.c (gfc_simplify_bessel_yn): Change recursive
1038 2010-08-19 Tobias Burnus <burnus@net-b.de>
1042 * check.c (gfc_check_bessel_n2): New function.
1043 * gfortran.h (gfc_isym_id): Add GFC_ISYM_JN2 and GFC_ISYM_YN2.
1044 * intrinsic.c (add_functions): Add transformational version
1045 of the Bessel_jn/yn intrinsics.
1046 * intrinsic.h (gfc_check_bessel_n2,gfc_simplify_bessel_jn2,
1047 gfc_simplify_bessel_yn2): New prototypes.
1048 * intrinsic.texi (Bessel_jn, Bessel_yn): Document
1049 transformational variant.
1050 * simplify.c (gfc_simplify_bessel_jn, gfc_simplify_bessel_yn):
1051 Check for negative order.
1052 (gfc_simplify_bessel_n2,gfc_simplify_bessel_jn2,
1053 gfc_simplify_bessel_yn2): New functions.
1055 2010-08-19 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1058 * resolve.c (resolve_transfer): Traverse operands and set expression
1059 to be checked to a non EXPR_OP type.
1061 2010-08-19 Janus Weil <janus@gcc.gnu.org>
1064 * gfortran.h (gfc_add_save): Modified prototype.
1065 * decl.c (add_init_expr_to_sym): Defer checking of proc pointer init.
1066 (match_pointer_init): New function to match F08 pointer initialization.
1067 (variable_decl,match_procedure_decl,match_ppc_decl): Use
1068 'match_pointer_init'.
1069 (match_attr_spec): Module variables are implicitly SAVE.
1070 (gfc_match_save): Modified call to 'gfc_add_save'.
1071 * expr.c (gfc_check_assign_symbol): Extra checks for pointer
1073 * primary.c (gfc_variable_attr): Handle SAVE attribute.
1074 * resolve.c (resolve_structure_cons): Add new argument and do pointer
1075 initialization checks.
1076 (gfc_resolve_expr): Modified call to 'resolve_structure_cons'.
1077 (resolve_values): Call 'resolve_structure_cons' directly with init arg.
1078 (resolve_fl_variable): Handle SAVE_IMPLICIT.
1079 * symbol.c (gfc_add_save,gfc_copy_attr,save_symbol): Handle
1081 * trans-decl.c (gfc_create_module_variable): Module variables with
1082 TARGET can already exist.
1083 * trans-expr.c (gfc_conv_variable): Check for 'current_function_decl'.
1084 (gfc_conv_initializer): Implement non-NULL pointer
1087 2010-08-18 Tobias Burnus <burnus@net-b.de>
1090 * intrinsic.texi (selected_char_kind): Document ISO_10646
1093 2010-08-17 Jakub Jelinek <jakub@redhat.com>
1096 * trans-decl.c (build_library_function_decl_1): Chain on
1097 void_list_node instead of creating a new TREE_LIST.
1098 * trans-intrinsic.c (gfc_get_intrinsic_lib_fndecl): Likewise.
1099 * trans-types.c (gfc_get_function_type): Likewise. Set
1100 typelist to void_list_node for the main program.
1102 2010-08-17 Daniel Kraft <d@domob.eu>
1105 * gfortran.h (struct gfc_association_list): New member `where'.
1106 (gfc_is_associate_pointer) New method.
1107 * match.c (gfc_match_associate): Remember locus for each associate
1108 name matched and do not try to set variable flag.
1109 * parse.c (parse_associate): Use remembered locus for symbols.
1110 * primary.c (match_variable): Instead of variable-flag check for
1111 associate names set it for all such names used.
1112 * symbol.c (gfc_is_associate_pointer): New method.
1113 * resolve.c (resolve_block_construct): Don't generate assignments
1114 to give associate-names their values.
1115 (resolve_fl_var_and_proc): Allow associate-names to be deferred-shape.
1116 (resolve_symbol): Set some more attributes for associate variables,
1117 set variable flag here and check it and don't try to build an
1118 explicitely shaped array-spec for array associate variables.
1119 * trans-expr.c (gfc_conv_variable): Dereference in case of association
1121 * trans-types.c (gfc_is_nodesc_array): Handle array association symbols.
1122 (gfc_sym_type): Return pointer type for association to scalar vars.
1123 * trans-decl.c (gfc_get_symbol_decl): Defer association symbols.
1124 (trans_associate_var): New method.
1125 (gfc_trans_deferred_vars): Handle association symbols.
1127 2010-08-16 Joseph Myers <joseph@codesourcery.com>
1129 * lang.opt (MDX): Change back to MD. Mark NoDriverArg instead of
1131 (MMDX): Change back to MMD. Mark NoDriverArg instead of
1133 * cpp.c (gfc_cpp_handle_option): Use OPT_MD and OPT_MMD instead of
1134 OPT_MDX and OPT_MMDX.
1136 2010-08-16 Joseph Myers <joseph@codesourcery.com>
1138 * lang.opt (MDX, MMDX): Mark RejectDriver.
1140 2010-08-15 Janus Weil <janus@gcc.gnu.org>
1142 * trans-expr.c (gfc_trans_assign_vtab_procs): Clean up (we don't have
1143 vtabs for generics any more).
1145 2010-08-15 Daniel Kraft <d@domob.eu>
1148 * gfortran.h (gfc_find_proc_namespace): New method.
1149 * expr.c (gfc_build_intrinsic_call): No need to build symtree messing
1150 around with namespace.
1151 * symbol.c (gfc_find_proc_namespace): New method.
1152 * trans-decl.c (gfc_build_qualified_array): Use it for correct
1154 * primary.c (gfc_match_varspec): Handle associate-names as arrays.
1155 * parse.c (parse_associate): Removed assignment-generation here...
1156 * resolve.c (resolve_block_construct): ...and added it here.
1157 (resolve_variable): Handle names that are arrays but were not parsed
1158 as such because of association.
1159 (resolve_code): Fix BLOCK resolution.
1160 (resolve_symbol): Generate array-spec for associate-names.
1162 2010-08-15 Tobias Burnus <burnus@net-b.de>
1165 * decl.c (verify_c_interop_param): Remove superfluous space (" ").
1166 (verify_c_interop): Handle unresolved DT with bind(C).
1168 2010-08-15 Tobias Burnus <burnus@net-b.de>
1170 * trans-expr.c (gfc_conv_expr_present): Regard nullified
1171 pointer arrays as absent.
1172 (gfc_conv_procedure_call): Handle EXPR_NULL for non-pointer
1173 dummys as absent argument.
1174 * interface.c (compare_actual_formal,compare_parameter):
1177 2010-08-15 Tobias Burnus <burnus@net-b.de>
1179 * interface.c (compare_pointer, ): Allow passing TARGETs to pointers
1180 dummies with intent(in).
1182 2010-08-15 Daniel Kraft <d@domob.eu>
1185 * decl.c (gfc_match_prefix): Match IMPURE prefix and mark ELEMENTAL
1186 routines not IMPURE also as PURE.
1187 * intrinsic.c (enum klass): New class `CLASS_PURE' and renamed
1188 `NO_CLASS' in `CLASS_IMPURE'.
1189 (add_sym): Set symbol-attributes `pure' and `elemental' correctly.
1190 (add_sym_0s): Renamed `NO_CLASS' in `CLASS_IMPURE'.
1191 (add_functions): Ditto.
1192 (add_subroutines): Ditto and mark `MOVE_ALLOC' as CLASS_PURE.
1193 * resolve.c (gfc_pure): Do not treat ELEMENTAL as automatically PURE.
1194 (resolve_formal_arglist): Check that arguments to ELEMENTAL procedures
1195 are not ALLOCATABLE and have their INTENT specified.
1197 2010-08-13 Daniel Kraft <d@domob.eu>
1199 * gfortran.h (array_type): New type `AS_IMPLIED_SHAPE'.
1200 * array.c (gfc_match_array_spec): Match implied-shape specification and
1201 handle AS_IMPLIED_SHAPE correctly otherwise.
1202 * decl.c (add_init_expr_to_sym): Set upper bounds for implied-shape.
1203 (variable_decl): Some checks for implied-shape declaration.
1204 * resolve.c (resolve_symbol): Assert that array-spec is no longer
1205 AS_IMPLIED_SHAPE in any case.
1207 2010-08-12 Joseph Myers <joseph@codesourcery.com>
1209 * lang.opt (MD, MMD): Change to MDX and MMDX.
1210 * cpp.c (gfc_cpp_handle_option): Use OPT_MMD and OPT_MMDX.
1212 2010-08-11 Janus Weil <janus@gcc.gnu.org>
1215 * intrinsic.c (gfc_current_intrinsic_arg): Change type from 'char' to
1216 'gfc_intrinsic_arg'.
1217 (check_arglist,check_specific): Add reference to 'name' field.
1218 (init_arglist): Remove reference to 'name' field.
1219 * intrinsic.h (gfc_current_intrinsic_arg): Modify prototype.
1220 * check.c (variable_check): Reverse order of checks. Respect intent of
1222 (int_or_proc_check): New function.
1223 (coarray_check): New function.
1224 (allocatable_check): New function.
1225 (gfc_check_allocated,gfc_check_move_alloc): Use 'allocatable_check'.
1226 (gfc_check_complex): Use 'int_or_real_check'.
1227 (gfc_check_lcobound,gfc_check_image_index,gfc_check_this_image,
1228 gfc_check_ucobound): Use 'coarray_check'.
1229 (gfc_check_pack): Use 'real_or_complex_check'.
1230 (gfc_check_alarm_sub,gfc_check_signal,gfc_check_signal_sub): Use
1231 'int_or_proc_check'.
1232 (scalar_check,type_check,numeric_check,int_or_real_check,
1233 real_or_complex_check,kind_check,double_check,logical_array_check,
1234 array_check,same_type_check,rank_check,nonoptional_check,
1235 kind_value_check,gfc_check_a_p,gfc_check_associated,gfc_check_cmplx,
1236 gfc_check_cshift,gfc_check_dcmplx,gfc_check_dot_product,gfc_check_dprod,
1237 gfc_check_eoshift,gfc_check_fn_rc2008,gfc_check_index,gfc_check_kind,
1238 gfc_check_matmul,gfc_check_minloc_maxloc,check_reduction,gfc_check_null,
1239 gfc_check_present,gfc_check_reshape,gfc_check_same_type_as,
1240 gfc_check_spread,gfc_check_unpack,gfc_check_random_seed,
1241 gfc_check_getarg,gfc_check_and,gfc_check_storage_size): Add reference
1244 2010-08-10 Daniel Kraft <d@domob.eu>
1246 * gfortran.texi (Interoperability with C): Fix ordering in menu
1247 and add new subsection about pointers.
1248 (Interoperable Subroutines and Functions): Split off the pointer part.
1249 (working with Pointers): New subsection with extended discussion
1250 of pointers (especially procedure pointers).
1252 2010-08-09 Thomas Koenig <tkoenig@gcc.gnu.org>
1255 * array.c (gfc_ref_dimen_size): Add end argument.
1256 If end is non-NULL, calculate it.
1257 (ref_size): Adjust call to gfc_ref_dimen_size.
1258 (gfc_array_dimen_size): Likewise.
1259 (gfc_array_res_shape): Likewise.
1260 * gfortran.h: Adjust prototype for gfc_ref_dimen_size.
1261 * resolve.c (resolve_array_ref): For stride not equal to -1,
1262 fill in the lowest possible end.
1264 2010-08-09 Janus Weil <janus@gcc.gnu.org>
1266 * intrinsic.texi: Correct documentation of ASINH, ACOSH and ATANH.
1268 2010-08-07 Nathan Froyd <froydnj@codesourcery.com>
1270 * interface.c (compare_actual_formal): Use XALLOCAVEC instead of
1272 (check_some_aliasing): Likewise.
1273 * trans-intrinsic.c (gfc_conv_intrinsic_conversion): Likewise.
1274 (gfc_conv_intrinsic_int): Likewise.
1275 (gfc_conv_intrinsic_lib_function): Likewise.
1276 (gfc_conv_intrinsic_cmplx): Likewise.
1277 (gfc_conv_intrinsic_ctime): Likewise.
1278 (gfc_conv_intrinsic_fdate): Likewise.
1279 (gfc_conv_intrinsic_ttynam): Likewise.
1280 (gfc_conv_intrinsic_minmax): Likewise.
1281 (gfc_conv_intrinsic_minmax_char): Likewise.
1282 (gfc_conv_intrinsic_ishftc): Likewise.
1283 (gfc_conv_intrinsic_index_scan_verify): Likewise.
1284 (gfc_conv_intrinsic_merge): Likewise.
1285 (gfc_conv_intrinsic_trim): Likewise.
1286 * trans.c (gfc_trans_runtime_error_vararg): Likewise.
1288 2010-08-06 Thomas Koenig <tkoenig@gcc.gnu.org>
1291 * dependency.c (check_section_vs_section): Handle cases where
1292 the start expression coincides with the lower or upper
1295 2010-08-04 Janus Weil <janus@gcc.gnu.org>
1300 * class.c (gfc_find_derived_vtab): Do not generate vtabs for class
1301 container types. Do not artificially increase refs. Commit symbols one
1303 * interface.c (compare_parameter): Make sure vtabs are present before
1304 generating module variables.
1305 * resolve.c (resolve_allocate_expr): Ditto.
1307 2010-08-04 Tobias Burnus <burnus@net-b.de>
1311 * resolve.c (resolve_structure_cons): Fix
1314 2010-08-04 Mikael Morin <mikael@gcc.gnu.org>
1318 * symbol.c (changed_syms): Made static again.
1319 (gfc_symbol_state): Don't conditionalize on GFC_DEBUG.
1320 Changed conditional internal error into assert.
1321 Rename function to ...
1322 (gfc_enforce_clean_symbol_state): ... this.
1323 * gfortran.h (gfc_symbol_state, gfc_enforce_clean_symbol_state):
1324 Rename the former to the latter.
1325 * parse.c (decode_statement, decode_omp_directive,
1326 decode_gcc_attribute): Update callers accordingly. Don't conditionalize
1328 (changed_syms): Remove declaration.
1329 (next_statement): Use gfc_enforce_clean_symbol_state.
1331 2010-08-04 Tobias Burnus <burnus@net-b.de>
1334 * resolve.c (resolve_structure_cons): Fix handling of
1335 initialization structure constructors with character
1336 elements of the wrong length.
1337 * array.c (gfc_check_iter_variable): Add NULL check.
1338 (gfc_resolve_character_array_constructor): Also truncate
1341 2010-08-04 Tobias Burnus <burnus@net-b.de>
1343 * trans-io.c (gfc_build_io_library_fndecls): Fix return
1344 value of some libgfortran functions.
1346 2010-08-03 Thomas Koenig <tkoenig@gcc.gnu.org>
1349 * dependency.c (gfc_deb_compare_expr): Remove any integer
1350 conversion functions to larger types from both arguments.
1351 Remove handling these functions futher down.
1353 2010-08-03 Janus Weil <janus@gcc.gnu.org>
1357 * class.c (add_procs_to_declared_vtab1): Don't add erroneous procedures.
1358 * resolve.c (resolve_tb_generic_targets): Check for errors.
1360 2010-08-02 Thomas Koenig <tkoenig@gcc.gnu.org>
1363 * depencency.c (gfc_dep_resolver): Fix logic for when a loop
1366 2010-08-02 Thomas Koenig <tkoenig@gcc.gnu.org>
1369 * dependency.h: Add prototype for gfc_are_identical_variables.
1370 * frontend-passes.c: Include depencency.h.
1371 (optimimize_equality): Use gfc_are_identical_variables.
1372 * dependency.c (identical_array_ref): New function.
1373 (gfc_are_identical_variables): New function.
1374 (gfc_deb_compare_expr): Use gfc_are_identical_variables.
1375 * dependency.c (gfc_check_section_vs_section). Rename gfc_
1376 prefix from statc function.
1377 (check_section_vs_section): Change arguments to gfc_array_ref,
1378 adjust function body accordingly.
1380 2010-08-02 Mikael Morin <mikael@gcc.gnu.org>
1381 Janus Weil <janus@gcc.gnu.org>
1386 * intrinsic.c (gfc_get_intrinsic_sub_symbol): Commit changed symbol.
1387 * symbol.c (gen_cptr_param, gen_fptr_param, gen_shape_param,
1388 gfc_copy_formal_args, gfc_copy_formal_args_intr,
1389 gfc_copy_formal_args_ppc, generate_isocbinding_symbol): Ditto.
1390 * parse.c (parse_derived_contains, parse_spec, parse_progunit):
1391 Call reject_statement in case of error.
1392 (match_deferred_characteritics): Call gfc_undo_symbols in case match
1395 2010-08-01 Janus Weil <janus@gcc.gnu.org>
1398 * class.c (gfc_build_class_symbol): Make '$vptr' component private.
1399 (gfc_find_derived_vtab): Make vtabs and vtypes public.
1400 * module.c (read_module): When reading module files, always import
1401 vtab and vtype symbols.
1403 2010-07-31 Mikael Morin <mikael@gcc.gnu.org>
1407 * symbol.c (changed_syms): Made non-static.
1408 * parse.c (changed_syms): Declare new external.
1409 (next_statement): Assert changed_syms is NULL at the beginning.
1411 2010-07-30 Janus Weil <janus@gcc.gnu.org>
1412 Steven G. Kargl <kargl@gcc.gnu.org>
1415 * match.c (match_type_spec): Try to parse derived types before
1418 2010-07-30 Mikael Morin <mikael@gcc.gnu.org>
1420 * gfortran.h (gfc_release_symbol): New prototype.
1421 * symbol.c (gfc_release_symbol): New. Code taken from free_sym_tree.
1422 (gfc_undo_symbols, free_sym_tree, gfc_free_finalizer):
1423 Use gfc_release_symbol.
1424 * parse.c (gfc_fixup_sibling_symbols): Ditto.
1425 * resolve.c (resolve_symbol): Ditto.
1427 2010-07-29 Tobias Burnus <burnus@net-b.de>
1431 * trans-decl.c (gfc_get_extern_function_decl): Correctly handle
1432 external procedure declarations in modules.
1433 (gfc_get_symbol_decl): Modify assert.
1435 2010-07-29 Janus Weil <janus@gcc.gnu.org>
1438 * resolve.c (resolve_fl_derived): Call gfc_resolve_array_spec.
1440 2010-07-29 Janus Weil <janus@gcc.gnu.org>
1443 * trans-stmt.h (gfc_trans_class_init_assign): New prototype.
1444 (gfc_trans_class_assign): Modified prototype.
1445 * trans.h (gfc_conv_intrinsic_move_alloc): New prototype.
1446 * trans-expr.c (gfc_trans_class_init_assign): Split off from ...
1447 (gfc_trans_class_assign): ... here. Modified actual arguments.
1448 * trans-intrinsic.c (gfc_conv_intrinsic_move_alloc): New function to
1449 handle the MOVE_ALLOC intrinsic with scalar and class arguments.
1450 * trans.c (trans_code): Call 'gfc_conv_intrinsic_move_alloc'.
1452 2010-07-29 Mikael Morin <mikael@gcc.gnu.org>
1456 * class.c (gfc_find_derived_vtab): Accept or discard newly created
1457 symbols before returning.
1459 2010-07-29 Joseph Myers <joseph@codesourcery.com>
1461 * lang.opt (cpp): Remove Joined and Separate markers.
1462 (cpp=): New internal option.
1463 * lang-specs.h (F951_CPP_OPTIONS): Generate -cpp= option.
1464 * cpp.c (gfc_cpp_handle_option): Handle OPT_cpp_ instead of
1467 2010-07-29 Daniel Kraft <d@domob.eu>
1470 * array.c (resolve_array_bound): Fix error message to properly handle
1471 non-variable expressions.
1473 2010-07-28 Mikael Morin <mikael@gcc.gnu.org>
1475 * decl.c (free_value): Also free repeat field.
1476 * data.c (gfc_assign_data_value): Always free offset before returning.
1478 2010-07-28 Daniel Kraft <d@domob.eu>
1480 * gfortran.h (gfc_build_intrinsic_call): New method.
1481 * expr.c (gfc_build_intrinsic_call): New method.
1482 * simplify.c (range_check): Ignore non-constant value.
1483 (simplify_bound_dim): Handle non-variable expressions and
1484 fix memory leak with non-free'ed expression.
1485 (simplify_bound): Handle non-variable expressions.
1486 (gfc_simplify_shape): Ditto.
1487 (gfc_simplify_size): Ditto, but only in certain cases possible.
1489 2010-07-28 Joseph Myers <joseph@codesourcery.com>
1491 * gfortranspec.c (SWITCH_TAKES_ARG, WORD_SWITCH_TAKES_ARG):
1494 2010-07-28 Tobias Burnus <burnus@net-b.de>
1497 * trans-types.c (gfc_get_derived_type): Fix DT declaration
1498 from modules for whole-file mode.
1500 2010-07-27 Joseph Myers <joseph@codesourcery.com>
1502 * gfortran.h (gfc_handle_option): Update prototype and return
1504 * options.c (gfc_handle_option): Update prototype and return value
1507 2010-07-27 Joseph Myers <joseph@codesourcery.com>
1509 * cpp.c (gfc_cpp_init_options): Update prototype. Use number of
1510 decoded options in allocating deferred_opt.
1511 * cpp.h (gfc_cpp_init_options): Update prototype.
1512 * f95-lang.c (LANG_HOOKS_OPTION_LANG_MASK): Define.
1513 * gfortran.h (gfc_option_lang_mask): New.
1514 (gfc_init_options): Update prototype.
1515 * options.c (gfc_option_lang_mask): New.
1516 (gfc_init_options): Update prototype. Pass new arguments to
1517 gfc_cpp_init_options.
1519 2010-07-26 Tobias Burnus <burnus@net-b.de>
1522 * trans-decl.c (gfc_get_extern_function_decl): Fix generation
1523 for functions which are later in the same file.
1524 (gfc_create_function_decl, build_function_decl,
1525 build_entry_thunks): Add global argument.
1526 * trans.c (gfc_generate_module_code): Update
1527 gfc_create_function_decl call.
1528 * trans.h (gfc_create_function_decl): Update prototype.
1529 * resolve.c (resolve_global_procedure): Also resolve for
1532 2010-07-26 Richard Henderson <rth@redhat.com>
1535 * f95-lang.c (LANG_HOOKS_WRITE_GLOBALS): New.
1536 (gfc_write_global_declarations): New.
1538 2010-07-26 Tobias Burnus <burnus@net-b.de>
1541 * trans-io.c (build_dt): Use NULL_TREE rather than NULL
1542 for call to transfer_namelist_element.
1543 * trans-decl.c (gfc_get_symbol_decl): Also set sym->backend_decl
1546 2010-07-25 Thomas Koenig <tkoenig@gcc.gnu.org>
1549 * Make-lang.in: Add fortran/frontend-passes.o.
1550 * gfortran.h: Add prototype for gfc_run_passes.
1551 * resolve.c (gfc_resolve): Call gfc_run_passes.
1552 * frontend-passes.c: New file.
1554 2010-07-25 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1557 * scanner.c (gfc_next_char_literal): Enable truncation warning for
1560 2010-07-25 Mikael Morin <mikael@gcc.gnu.org>
1563 * gfortran.h (gfc_namespace): New field old_equiv.
1564 (gfc_free_equiv_until): New prototype.
1565 * match.c (gfc_free_equiv_until): New, renamed from gfc_free_equiv with
1566 a parameterized stop condition.
1567 (gfc_free_equiv): Use gfc_free_equiv_until.
1568 * parse.c (next_statement): Save equivalence list.
1569 (reject_statement): Restore equivalence list.
1571 2010-07-25 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1574 * scanner.c (gfc_next_char_literal): Move check for truncation earlier
1575 in the function so that it does not get missed by early exits.
1576 (load_line): Add checks for quoted strings and free form comments to
1577 disable warnings on comments. Add check for ampersand as first
1578 character after truncation and don't warn for this case, but warn if
1579 there are subsequent non-whitespace characters.
1581 2010-07-24 Tobias Burnus <burnus@net-b.de>
1584 * parse.c (gfc_parse_file): Do not override
1585 gfc_global_ns_list items.
1587 2010-07-24 Tobias Burnus <burnus@net-b.de>
1589 * options.c (gfc_init_options): Enable -fwhole-file by default.
1590 * interface.c (compare_parameter): Assume a Hollerith constant is
1591 compatible with all other argument types.
1593 2010-07-23 Tobias Burnus <burnus@net-b.de>
1596 * trans-decl.c (gfc_get_symbol_decl): Use module decl with
1597 -fwhole-file also for derived types.
1598 * trans-types.c (copy_dt_decls_ifequal): Remove static and
1599 rename to gfc_copy_dt_decls_ifequal.
1600 (gfc_get_derived_type): Update call.
1601 * trans-types.h (gfc_copy_dt_decls_ifequal): Add prototype.
1603 2010-07-23 Tobias Burnus <burnus@net-b.de>
1606 * resolve.c (resolve_global_procedure): Properly handle ENTRY.
1608 2010-07-23 Jakub Jelinek <jakub@redhat.com>
1610 * trans-types.c (gfc_get_array_descriptor_base,
1611 gfc_get_array_type_bounds): Set TYPE_NAMELESS.
1612 * trans-decl.c (gfc_build_qualified_array): Set DECL_NAMELESS
1613 instead of clearing DECL_NAME.
1614 (gfc_build_dummy_array_decl): Set DECL_NAMELESS.
1616 2009-07-23 Paul Thomas <pault@gcc.gnu.org>
1619 * trans-array.c (gfc_init_loopinfo): Initialize the reverse
1621 gfc_trans_scalarized_loop_end: If reverse set in dimension n,
1622 reverse the scalarization loop.
1623 gfc_conv_resolve_dependencies: Pass the reverse field of the
1624 loopinfo to gfc_dep_resolver.
1625 trans-expr.c (gfc_trans_assignment_1): Enable loop reversal for
1626 assignment by resetting loop.reverse.
1627 gfortran.h : Add the gfc_reverse enum.
1628 trans.h : Add the reverse field to gfc_loopinfo.
1629 dependency.c (gfc_check_dependency): Pass null to the new arg
1630 of gfc_dep_resolver.
1631 (gfc_check_section_vs_section): Check for reverse dependencies.
1632 (gfc_dep_resolver): Add reverse argument and deal with the loop
1634 dependency.h : Modify prototype for gfc_dep_resolver to include
1637 2010-07-23 Daniel Kraft <d@domob.eu>
1640 * gfortran.h (gfc_find_symtree_in_proc): New method.
1641 * symbol.c (gfc_find_symtree_in_proc): New method.
1642 * match.c (match_exit_cycle): Look for loop name also in parent
1643 namespaces within current procedure.
1645 2010-07-22 Tobias Burnus <burnus@net-b.de>
1648 * dependency.c (gfc_check_dependency): Add argument alising check.
1649 * symbol.c (gfc_symbols_could_alias): Add argument alising check.
1651 2010-07-22 Daniel Kraft <d@domob.eu>
1653 * trans-stmt.c (gfc_trans_return): Put back in the handling of se.post,
1654 now in the correct place.
1656 2010-07-21 Steven G. Kargl <kargl@gcc.gnu.org>
1659 * Revert my commit r162325.
1661 2010-07-21 Daniel Kraft <d@domob.eu>
1663 * trans.h (gfc_get_return_label): Removed.
1664 (gfc_generate_return): New method.
1665 (gfc_trans_deferred_vars): Update gfc_wrapped_block rather than
1666 returning a tree directly.
1667 * trans-stmt.c (gfc_trans_return): Use `gfc_generate_return'.
1668 (gfc_trans_block_construct): Update for new interface to
1669 `gfc_trans_deferred_vars'.
1670 * trans-decl.c (current_function_return_label): Removed.
1671 (current_procedure_symbol): New variable.
1672 (gfc_get_return_label): Removed.
1673 (gfc_trans_deferred_vars): Update gfc_wrapped_block rather than
1674 returning a tree directly.
1675 (get_proc_result), (gfc_generate_return): New methods.
1676 (gfc_generate_function_code): Clean up and do init/cleanup here
1677 also with gfc_wrapped_block. Remove return-label but rather
1680 2010-07-19 Steven G. Kargl <kargl@gcc.gnu.org>
1683 * fortran/match.c (match_type_spec): Check for derived type before
1686 2010-07-19 Paul Thomas <pault@gcc.gnu.org>
1689 * interface.c (matching_typebound_op): Add argument for the
1690 return of the generic name for the procedure.
1691 (build_compcall_for_operator): Add an argument for the generic
1692 name of an operator procedure and supply it to the expression.
1693 (gfc_extend_expr, gfc_extend_assign): Use the generic name in
1694 calls to the above procedures.
1695 * resolve.c (resolve_typebound_function): Catch procedure
1696 component calls for CLASS objects, check that the vtable is
1697 complete and insert the $vptr and procedure components, to make
1699 (resolve_typebound_function): The same.
1700 * trans-decl.c (gfc_trans_deferred_vars): Do not deallocate
1701 an allocatable scalar if it is a result.
1703 2010-07-19 Paul Thomas <pault@gcc.gnu.org>
1706 * match.c (gfc_match_iterator): Reverted.
1708 2010-07-18 Paul Thomas <pault@gcc.gnu.org>
1711 * match.c (gfc_match_iterator): Remove error that iterator
1712 cannot be INTENT(IN).
1714 2010-07-17 Mikael Morin <mikael@gcc.gnu.org>
1716 * trans-array.c (gfc_free_ss): Don't free beyond ss rank.
1717 Access subscript through the "dim" field index.
1718 (gfc_trans_create_temp_array): Access ss info through the "dim" field
1720 (gfc_conv_array_index_offset): Ditto.
1721 (gfc_conv_loop_setup): Ditto.
1722 (gfc_conv_expr_descriptor): Ditto.
1723 (gfc_conv_ss_startstride): Ditto. Update call to
1724 gfc_conv_section_startstride.
1725 (gfc_conv_section_startstride): Set values along the array dimension.
1726 Get array dimension directly from the argument.
1728 2010-07-15 Jakub Jelinek <jakub@redhat.com>
1730 * trans.h (gfc_string_to_single_character): New prototype.
1731 * trans-expr.c (string_to_single_character): Renamed to ...
1732 (gfc_string_to_single_character): ... this. No longer static.
1733 (gfc_conv_scalar_char_value, gfc_build_compare_string,
1734 gfc_trans_string_copy): Adjust callers.
1735 * config-lang.in (gtfiles): Add fortran/trans-stmt.c.
1736 * trans-stmt.c: Include ggc.h and gt-fortran-trans-stmt.h.
1737 (select_struct): Move to toplevel, add GTY(()).
1738 (gfc_trans_character_select): Optimize SELECT CASE
1739 with character length 1.
1741 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
1743 * f95-lang.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
1744 * trans-common.c: Likewise.
1745 * trans-decl.c: Likewise.
1746 * trans-types.c: Likewise.
1747 * trans.c: Likewise.
1749 2010-07-15 Janus Weil <janus@gcc.gnu.org>
1752 * resolve.c (resolve_typebound_generic_call): Resolve generic
1753 non-polymorphic type-bound procedure calls to the correct specific
1755 (resolve_typebound_subroutine): Remove superfluous code.
1757 2010-07-15 Daniel Kraft <d@domob.eu>
1760 * trans.h (struct gfc_wrapped_block): New struct.
1761 (gfc_start_wrapped_block), (gfc_add_init_cleanup): New methods.
1762 (gfc_finish_wrapped_block): New method.
1763 (gfc_init_default_dt): Add new init code to block rather than
1765 * trans-array.h (gfc_trans_auto_array_allocation): Use gfc_wrapped_block
1766 (gfc_trans_dummy_array_bias): Ditto.
1767 (gfc_trans_g77_array): Ditto.
1768 (gfc_trans_deferred_array): Ditto.
1769 * trans.c (gfc_add_expr_to_block): Call add_expr_to_chain.
1770 (add_expr_to_chain): New method based on old gfc_add_expr_to_block.
1771 (gfc_start_wrapped_block), (gfc_add_init_cleanup): New methods.
1772 (gfc_finish_wrapped_block): New method.
1773 * trans-array.c (gfc_trans_auto_array_allocation): use gfc_wrapped_block
1774 (gfc_trans_g77_array), (gfc_trans_dummy_array_bias): Ditto.
1775 (gfc_trans_deferred_array): Ditto.
1776 * trans-decl.c (gfc_trans_dummy_character): Ditto.
1777 (gfc_trans_auto_character_variable), (gfc_trans_assign_aux_var): Ditto.
1778 (init_intent_out_dt): Ditto.
1779 (gfc_init_default_dt): Add new init code to block rather than
1781 (gfc_trans_deferred_vars): Use gfc_wrapped_block to collect all init
1782 and cleanup code and put it all together.
1784 2010-07-15 Jakub Jelinek <jakub@redhat.com>
1786 * trans.h (gfc_build_compare_string): Add CODE argument.
1787 * trans-intrinsic.c (gfc_conv_intrinsic_strcmp): Pass OP to
1788 gfc_build_compare_string.
1789 * trans-expr.c (gfc_conv_expr_op): Pass CODE to
1790 gfc_build_compare_string.
1791 (string_to_single_character): Rename len variable to length.
1792 (gfc_optimize_len_trim): New function.
1793 (gfc_build_compare_string): Add CODE argument. If it is EQ_EXPR
1794 or NE_EXPR and one of the strings is string literal with LEN_TRIM
1795 bigger than the length of the other string, they compare unequal.
1798 * trans-stmt.c (gfc_trans_character_select): Always use NULL for high
1799 in CASE_LABEL_EXPR and use NULL for low for the default case.
1801 2010-07-14 Mikael Morin <mikael@gcc.gnu.org>
1803 * trans-array.c (gfc_conv_section_upper_bound): Remove
1804 (gfc_conv_section_startstride): Don't set the upper bound in the
1805 vector subscript case.
1806 (gfc_conv_loop_setup): Don't use gfc_conv_section_upper_bound
1808 2010-07-14 Janus Weil <janus@gcc.gnu.org>
1811 * gfortran.h (gfc_is_data_pointer): Remove prototype.
1812 * dependency.c (gfc_is_data_pointer): Make it static.
1813 * intrinsic.texi: Update documentation on C_LOC.
1814 * resolve.c (gfc_iso_c_func_interface): Fix pointer and target checks
1815 and add a check for polymorphic variables.
1817 2010-07-14 Jakub Jelinek <jakub@redhat.com>
1819 * trans-expr.c (string_to_single_character): Also optimize
1820 string literals containing a single char followed only by spaces.
1821 (gfc_trans_string_copy): Remove redundant string_to_single_character
1824 * trans-decl.c (gfc_build_intrinsic_function_decls,
1825 gfc_build_builtin_function_decls): Mark functions as
1826 DECL_PURE_P or TREE_READONLY.
1828 2010-07-13 Nathan Froyd <froydnj@codesourcery.com>
1830 * trans-decl.c (build_entry_thunks): Call build_call_expr_loc_vec
1831 instead of build_function_call_expr.
1832 * trans-intrinsic.c (gfc_conv_intrinsic_sr_kind): Likewise.
1834 2010-07-13 Tobias Burnus <burnus@net-b.de>
1835 Daniel Franke <franke.daniel@gmail.com>
1838 * trans.h (gfc_build_library_function_decl_with_spec): New prototype.
1839 * trans-decl.c (gfc_build_library_function_decl_with_spec): Removed
1841 * trans-io (gfc_build_io_library_fndecls): Add "fn spec" annotations.
1843 2010-07-13 Daniel Franke <franke.daniel@gmail.com>
1844 Tobias Burnus <burnus@net-b.de>
1847 * trans-decl.c (gfc_build_intrinsic_function_decls): Add
1848 noclobber/noescape annotations to function calls.
1849 (gfc_build_builtin_function_decls): Likewise.
1851 2010-07-13 Janus Weil <janus@gcc.gnu.org>
1857 * gfortran.h (gfc_find_derived_vtab): Modified prototype.
1858 * class.c (gfc_build_class_symbol): Modified call to
1859 'gfc_find_derived_vtab'.
1860 (add_proc_component): Removed, moved code into 'add_proc_comp'.
1861 (add_proc_comps): Renamed to 'add_proc_comp', removed treatment of
1863 (add_procs_to_declared_vtab1): Removed unnecessary argument 'resolved'.
1864 Removed treatment of generics.
1865 (copy_vtab_proc_comps): Removed unnecessary argument 'resolved'.
1866 Call 'add_proc_comp' instead of duplicating code.
1867 (add_procs_to_declared_vtab): Removed unnecessary arguments 'resolved'
1869 (add_generic_specifics,add_generics_to_declared_vtab): Removed.
1870 (gfc_find_derived_vtab): Removed unnecessary argument 'resolved'.
1871 Removed treatment of generics.
1872 * iresolve.c (gfc_resolve_extends_type_of): Modified call to
1873 'gfc_find_derived_vtab'.
1874 * resolve.c (resolve_typebound_function,resolve_typebound_subroutine):
1875 Removed treatment of generics.
1876 (resolve_select_type,resolve_fl_derived): Modified call to
1877 'gfc_find_derived_vtab'.
1878 * trans-decl.c (gfc_get_symbol_decl): Ditto.
1879 * trans-expr.c (gfc_conv_derived_to_class,gfc_trans_class_assign):
1881 * trans-stmt.c (gfc_trans_allocate): Ditto.
1883 2010-07-12 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1886 * trans-io.c (build_dt): Set common.unit to flag chracter(kind=4)
1889 2010-07-12 Mikael Morin <mikael@gcc.gnu.org>
1891 * expr.c (gfc_get_int_expr): Don't initialize mpfr data twice.
1892 * resolve.c (build_default_init_expr): Ditto.
1894 2010-07-11 Tobias Burnus <burnus@net-b.de>
1897 * module.c (sort_iso_c_rename_list): Remove.
1898 (import_iso_c_binding_module,use_iso_fortran_env_module):
1899 Allow multiple imports of the same symbol.
1901 2010-07-11 Mikael Morin <mikael@gcc.gnu.org>
1903 * arith.c (gfc_arith_done_1): Release mpfr internal caches.
1905 2010-07-11 Janus Weil <janus@gcc.gnu.org>
1908 * decl.c (build_sym,attr_decl1): Only build the class container if the
1909 symbol has sufficient attributes.
1910 * expr.c (gfc_check_pointer_assign): Use class_pointer instead of
1911 pointer attribute for classes.
1912 * match.c (gfc_match_allocate,gfc_match_deallocate): Ditto.
1913 * module.c (MOD_VERSION): Bump.
1914 (enum ab_attribute,attr_bits): Add AB_CLASS_POINTER.
1915 (mio_symbol_attribute): Handle class_pointer attribute.
1916 * parse.c (parse_derived): Use class_pointer instead of pointer
1917 attribute for classes.
1918 * primary.c (gfc_variable_attr,gfc_expr_attr): Ditto.
1919 * resolve.c (resolve_structure_cons,resolve_deallocate_expr,
1920 resolve_allocate_expr,resolve_fl_derived): Ditto.
1921 (resolve_fl_var_and_proc): Check for class_ok attribute.
1923 2010-07-10 Mikael Morin <mikael@gcc.gnu.org>
1925 * trans-io.c (gfc_build_st_parameter): Update calls to
1926 gfc_add_field_to_struct.
1927 * trans-stmt.c (ADD_FIELD): Ditto.
1929 (gfc_get_derived_type): Ditto. Don't create backend_decl for C_PTR's
1931 (gfc_add_field_to_struct_1): Set TYPE_FIELDS(context) instead of
1932 fieldlist, remove fieldlist from argument list.
1933 (gfc_add_field_to_struct): Update call to gfc_add_field_to_struct_1
1934 and remove fieldlist from argument list.
1935 (gfc_get_desc_dim_type, gfc_get_array_descriptor_base,
1936 gfc_get_mixed_entry_union): Move setting
1937 TYPE_FIELDS to gfc_add_field_to_struct_1 and update calls to it.
1938 * trans-types.h (gfc_add_field_to_struct): Update prototype.
1940 2010-07-10 Paul Thomas <pault@gcc.gnu.org>
1943 * trans-expr.c (arrayfunc_assign_needs_temporary): No temporary
1944 if the lhs has never been host associated, as well as not being
1945 use associated, a pointer or a target.
1946 * resolve.c (resolve_variable): Mark variables that are host
1948 * gfortran.h: Add the host_assoc bit to the symbol_attribute
1951 2010-07-09 Janus Weil <janus@gcc.gnu.org>
1953 * intrinsic.texi: Add documentation for SAME_TYPE_AS, EXTENDS_TYPE_OF,
1954 STORAGE_SIZE, C_NULL_PTR and C_NULL_FUNPTR. Modify documentation of
1955 SIZEOF and C_SIZEOF.
1957 2010-07-08 Janus Weil <janus@gcc.gnu.org>
1960 * gfortran.h (gfc_isym_id): Add GFC_ISYM_C_SIZEOF,GFC_ISYM_STORAGE_SIZE.
1961 * intrinsic.h (gfc_check_c_sizeof,gfc_check_storage_size,
1962 gfc_resolve_storage_size): New prototypes.
1963 * check.c (gfc_check_c_sizeof,gfc_check_storage_size): New functions.
1964 * intrinsic.c (add_functions): Add STORAGE_SIZE.
1965 * iresolve.c (gfc_resolve_storage_size): New function.
1966 * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): Handle polymorphic
1968 (gfc_conv_intrinsic_storage_size): New function.
1969 (gfc_conv_intrinsic_function): Handle STORAGE_SIZE.
1971 2010-07-08 Jakub Jelinek <jakub@redhat.com>
1974 * match.c (match_exit_cycle): Error on EXIT also from collapsed
1975 !$omp do loops. Error on CYCLE to non-innermost collapsed
1978 2010-07-08 Tobias Burnus <burnus@net-b.de>
1981 * array.c (gfc_match_array_ref): Better error message for
1982 coarrays with too few ranks.
1983 (match_subscript): Move one diagnostic to caller.
1984 * gfortran.h (gfc_get_corank): Add prottype.
1985 * expr.c (gfc_get_corank): New function.
1986 * iresolve.c (resolve_bound): Fix rank for cobounds.
1987 (gfc_resolve_lbound,gfc_resolve_lcobound, gfc_resolve_ubound,
1988 gfc_resolve_ucobound, gfc_resolve_this_image): Update
1991 2010-07-06 Tobias Burnus <burnus@net-b.de>
1994 * array.c (gfc_expand_constructor): Add optional diagnostic.
1995 * gfortran.h (gfc_expand_constructor): Update prototype.
1996 * expr.c (gfc_simplify_expr, check_init_expr,
1997 gfc_reduce_init_expr): Update gfc_expand_constructor call.
1998 * resolve.c (gfc_resolve_expr): Ditto.
2000 2010-07-06 Tobias Burnus <burnus@net-b.de>
2002 * trans-decl.c: Include diagnostic-core.h besides toplev.h.
2003 * trans-intrinsic.c: Ditto.
2004 * trans-types.c: Ditto.
2005 * convert.c: Include diagnostic-core.h instead of toplev.h.
2007 * trans-array.c: Ditto.
2008 * trans-const.c: Ditto.
2009 * trans-expr.c: Ditto.
2010 * trans-io.c: Ditto.
2011 * trans-openmp.c: Ditto.
2014 2010-07-06 Thomas Koenig <tkoenig@gcc.gnu.org>
2017 * check.c (dim_rank_check): Also check intrinsic functions.
2018 Adjust permissible rank for functions which reduce the rank of
2019 their argument. Spread is an exception, where DIM can
2020 be one larger than the rank of array.
2022 2010-07-05 Steven G. Kargl <kargl@gcc.gnu.org>
2025 * fortran/io.c (resolve_tag): Check EXIST tag is a default logical.
2027 2010-07-05 Paul Thomas <pault@gcc.gnu.org>
2030 * trans-types.c (gfc_get_derived_type): Derived type fields
2031 with the vtype attribute must have TYPE_REF_CAN_ALIAS_ALL set
2032 but build_pointer_type_for_mode must be used for this.
2034 2010-07-05 Nathan Froyd <froydnj@codesourcery.com>
2036 * trans.h (gfc_conv_procedure_call): Take a VEC instead of a tree.
2037 * trans-intrinsic.c (gfc_conv_intrinsic_funcall): Adjust for new
2038 type of gfc_conv_procedure_call.
2039 (conv_generic_with_optional_char_arg): Likewise.
2040 * trans-stmt.c (gfc_trans_call): Likewise.
2041 * trans-expr.c (gfc_conv_function_expr): Likewise.
2042 (gfc_conv_procedure_call): Use build_call_vec instead of
2045 2010-07-04 Daniel Kraft <d@domob.eu>
2047 * gfc-internals.texi (gfc_code): Document BLOCK and ASSOCIATE.
2049 2010-07-04 Paul Thomas <pault@gcc.gnu.org>
2053 * trans-types.c (gfc_get_derived_type): Derived type fields
2054 with the vtype attribute must have TYPE_REF_CAN_ALIAS_ALL set.
2056 2010-07-02 Mikael Morin <mikael@gcc.gnu.org>
2059 * decl.c (match_procedure_in_type): Clear structure before using.
2060 (gfc_match_generic): Ditto.
2062 2010-07-02 Nathan Froyd <froydnj@codesourcery.com>
2064 * trans-types.h (gfc_add_field_to_struct): Add tree ** parameter.
2065 * trans-types.c (gfc_add_field_to_struct_1): New function, most
2066 of which comes from...
2067 (gfc_add_field_to_struct): ...here. Call it. Add new parameter.
2068 (gfc_get_desc_dim_type): Call gfc_add_field_to_struct_1 for
2070 (gfc_get_array_descriptor_base): Likewise.
2071 (gfc_get_mixed_entry_union): Likewise.
2072 (gfc_get_derived_type): Add extra chain parameter for
2073 gfc_add_field_to_struct.
2074 * trans-stmt.c (gfc_trans_character_select): Likewise.
2075 * trans-io.c (gfc_build_st_parameter): Likewise.
2077 2010-06-29 Janus Weil <janus@gcc.gnu.org>
2080 * resolve.c (is_external_proc): Prevent procedure pointers from being
2081 regarded as external procedures.
2083 2010-06-29 Janus Weil <janus@gcc.gnu.org>
2086 * trans-intrinsic.c (gfc_conv_associated): Handle polymorphic variables
2087 passed as second argument of ASSOCIATED.
2089 2010-06-29 Paul Thomas <pault@gcc.gnu.org>
2092 * trans-expr.c (arrayfunc_assign_needs_temporary): New function
2093 to determine if a function assignment can be made without a
2095 (gfc_trans_arrayfunc_assign): Move all the conditions that
2096 suppress the direct function call to the above new functon and
2099 2010-06-28 Paul Thomas <pault@gcc.gnu.org>
2102 * interface.c (argument_rank_mismatch): New function.
2103 (compare_parameter): Call new function instead of generating
2106 2010-06-28 Nathan Froyd <froydnj@codesourcery.com>
2108 * trans-openmp.c (dovar_init): Define. Define VECs containing it.
2109 (gfc_trans_omp_do): Use a VEC to accumulate variables and their
2112 2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
2114 * Make-lang.in: Update dependencies.
2116 2010-06-27 Nathan Froyd <froydnj@codesourcery.com>
2118 * gfortran.h (gfc_code): Split backend_decl field into cycle_label
2119 and exit_label fields.
2120 * trans-openmp.c (gfc_trans_omp_do): Assign to new fields
2122 * trans-stmt.c (gfc_trans_simple_do): Likewise.
2123 (gfc_trans_do): Likewise.
2124 (gfc_trans_do_while): Likewise.
2125 (gfc_trans_cycle): Use cycle_label directly.
2126 (gfc_trans_exit): Use exit_label directly.
2128 2010-06-27 Daniel Kraft <d@domob.eu>
2130 * dump-parse-tree.c (show_symbol): Dump target-expression for
2132 (show_code_node): Make distinction between BLOCK and ASSOCIATE.
2133 (show_namespace): Use show_level for correct indentation of
2134 "inner namespaces" (contained procedures or BLOCK).
2136 2010-06-27 Thomas Koenig <tkoenig@gcc.gnu.org>
2139 * dump-parse-tree.c (show_code_node): Show namespace for
2142 2010-06-26 Tobias Burnus <burnus@net-b.de>
2144 * decl.c (gfc_match_decl_type_spec): Support
2145 TYPE(intrinsic-type-spec).
2147 2010-06-25 Tobias Burnus <burnus@net-b.de>
2149 * intrinsic.h (gfc_check_selected_real_kind,
2150 gfc_simplify_selected_real_kind): Update prototypes.
2151 * intrinsic.c (add_functions): Add radix support to
2153 * check.c (gfc_check_selected_real_kind): Ditto.
2154 * simplify.c (gfc_simplify_selected_real_kind): Ditto.
2155 * trans-decl.c (gfc_build_intrinsic_function_decls):
2156 Change call from selected_real_kind to selected_real_kind2008.
2157 * intrinsic.texi (SELECTED_REAL_KIND): Update for radix.
2158 (PRECISION, RANGE, RADIX): Add cross @refs.
2160 2010-06-25 Tobias Burnus <burnus@net-b.de>
2162 * decl.c (gfc_match_entry): Mark ENTRY as GFC_STD_F2008_OBS.
2163 * gfortran.texi (_gfortran_set_options): Update for
2164 GFC_STD_F2008_OBS addition.
2165 * libgfortran.h: Add GFC_STD_F2008_OBS.
2166 * options.c (set_default_std_flags, gfc_handle_option): Handle
2168 io.c (check_format): Fix allow_std check.
2170 2010-06-25 Tobias Burnus <burnus@net-b.de>
2172 * decl.c (gfc_match_entry): Allow END besides
2173 END SUBROUTINE/END FUNCTION for contained procedures.
2175 2010-06-25 Tobias Burnus <burnus@net-b.de>
2177 * parse.c (next_free, next_fixed): Allow ";" as first character.
2179 2010-06-24 Tobias Burnus <burnus@net-b.de>
2182 * decl.c (variable_decl): Fix IMPORT diagnostic for CLASS.
2184 2010-06-22 Janus Weil <janus@gcc.gnu.org>
2187 * resolve.c (resolve_fl_derived): Avoid checking for abstract on class
2190 2010-06-21 Tobias Burnus <burnus@net-b.de>
2193 * interface.c (compare_parameter): Add gfc_is_simply_contiguous
2195 * symbol.c (gfc_add_contiguous): New function.
2196 (gfc_copy_attr, check_conflict): Handle contiguous attribute.
2197 * decl.c (match_attr_spec): Ditto.
2198 (gfc_match_contiguous): New function.
2199 * resolve.c (resolve_fl_derived, resolve_symbol): Handle
2201 * gfortran.h (symbol_attribute): Add contiguous.
2202 (gfc_is_simply_contiguous): Add prototype.
2203 (gfc_add_contiguous): Add prototype.
2204 * match.h (gfc_match_contiguous): Add prototype.
2205 * parse.c (decode_specification_statement,
2206 decode_statement): Handle contiguous attribute.
2207 * expr.c (gfc_is_simply_contiguous): New function.
2208 * dump-parse-tree.c (show_attr): Handle contiguous.
2209 * module.c (ab_attribute, attr_bits, mio_symbol_attribute):
2211 * trans-expr.c (gfc_add_interface_mapping): Copy
2213 * trans-array.c (gfc_conv_descriptor_stride_get,
2214 gfc_conv_array_parameter): Handle contiguous arrays.
2215 * trans-types.c (gfc_build_array_type, gfc_build_array_type,
2216 gfc_sym_type, gfc_get_derived_type, gfc_get_array_descr_info):
2218 * trans.h (gfc_array_kind): Ditto.
2219 * trans-decl.c (gfc_get_symbol_decl): Ditto.
2221 2010-06-20 Joseph Myers <joseph@codesourcery.com>
2223 * options.c (gfc_handle_option): Don't handle N_OPTS.
2225 2010-06-19 Janus Weil <janus@gcc.gnu.org>
2228 * resolve.c (resolve_fl_derived): Reverse ordering of conditions
2231 2010-06-18 Tobias Burnus <burnus@net-b.de>
2234 * resolve.c (resolve_allocate_deallocate): Properly check
2235 part-refs in stat=/errmsg= for invalid use.
2237 2010-06-17 Janus Weil <janus@gcc.gnu.org>
2240 * resolve.c (resolve_typebound_function,resolve_typebound_subroutine):
2241 Return directly in case of an error.
2243 2010-06-16 Janus Weil <janus@gcc.gnu.org>
2246 * gfortran.h (gfc_get_typebound_proc): Modified Prototype.
2247 * decl.c (match_procedure_in_type): Give a unique gfc_typebound_proc
2248 structure to each procedure in a procedure list.
2249 * module.c (mio_typebound_proc): Add NULL argument to
2250 'gfc_get_typebound_proc'.
2251 * symbol.c (gfc_get_typebound_proc): Add a new argument, which is used
2252 to initialize the new structure.
2254 2010-06-15 Janus Weil <janus@gcc.gnu.org>
2257 * gfortran.h (gfc_expr): Add new member 'mold'.
2258 * match.c (gfc_match_allocate): Implement the MOLD tag.
2259 * resolve.c (resolve_allocate_expr): Ditto.
2260 * trans-stmt.c (gfc_trans_allocate): Ditto.
2262 2010-06-15 Jakub Jelinek <jakub@redhat.com>
2265 * trans-openmp.c (gfc_omp_predetermined_sharing): Don't return
2266 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with
2267 GFC_DECL_SAVED_DESCRIPTOR set.
2268 (gfc_omp_report_decl): New function.
2269 * trans.h (gfc_omp_report_decl): New prototype.
2270 * f95-lang.c (LANG_HOOKS_OMP_REPORT_DECL): Redefine.
2272 2010-06-13 Daniel Franke <franke.daniel@gmail.com>
2276 * gfortranspec.c (lang_specific_driver): Removed deprecation
2278 * lang.opt: Add options -M, -MM, -MD, -MMD, -MF, -MG, -MP, -MT, -MQ.
2279 * lang-specs.h (CPP_FORWARD_OPTIONS): Add -M* options.
2280 * cpp.h (gfc_cpp_makedep): New.
2281 (gfc_cpp_add_dep): New.
2282 (gfc_cpp_add_target): New.
2283 * cpp.c (gfc_cpp_option): Add deps* members.
2284 (gfc_cpp_makedep): New.
2285 (gfc_cpp_add_dep): New.
2286 (gfc_cpp_add_target): New.
2287 (gfc_cpp_init_options): Initialize new options.
2288 (gfc_cpp_handle_option): Handle new options.
2289 (gfc_cpp_post_options): Map new options to libcpp-options.
2290 (gfc_cpp_init): Handle deferred -MQ and -MT options.
2291 (gfc_cpp_done): If requested, write dependencies to file.
2292 * module.c (gfc_dump_module): Add a module filename as target.
2293 * scanner.c (open_included_file): New parameter system; add the
2294 included file as dependency.
2295 (gfc_open_included_file): Add the included file as dependency.
2296 (gfc_open_intrinsic_module): Likewise.
2297 * invoke.texi: Removed deprecation warning for -M.
2298 * gfortran.texi: Removed Makefile-dependencies project.
2300 2010-06-12 Daniel Franke <franke.daniel@gmail.com>
2302 * resolve.c (resolve_global_procedure): Improved checking if an
2303 explicit interface is required.
2305 2010-06-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2307 * trans-decl.c (gfc_build_intrinsic_function_decls): Fix
2309 * trans-intrinsic.c (gfc_conv_intrinsic_fdate): Fix argument type.
2310 (gfc_conv_intrinsic_ttynam): Likewise.
2311 (gfc_conv_intrinsic_trim): Likewise.
2313 2010-06-12 Janus Weil <janus@gcc.gnu.org>
2316 * decl.c (match_procedure_in_type): Allow procedure lists (F08).
2318 2010-06-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2320 * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Fix comment.
2322 2010-06-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2324 * mathbuiltins.def: Add builtins that do not directly correspond
2325 to a Fortran intrinsic, with new macro OTHER_BUILTIN.
2326 * f95-lang.c (gfc_init_builtin_functions): Define OTHER_BUILTIN.
2327 * trans-intrinsic.c (gfc_intrinsic_map_t): Remove
2328 code_{r,c}{4,8,10,16} fields. Add
2329 {,complex}{float,double,long_double}_built_in fields.
2330 (gfc_intrinsic_map): Adjust definitions of DEFINE_MATH_BUILTIN,
2331 DEFINE_MATH_BUILTIN_C and LIB_FUNCTION accordingly. Add
2332 definition of OTHER_BUILTIN.
2333 (real_compnt_info): Remove unused struct.
2334 (builtin_decl_for_precision, builtin_decl_for_float_kind): New
2336 (build_round_expr): Call builtin_decl_for_precision instead of
2338 (gfc_conv_intrinsic_aint): Call builtin_decl_for_float_kind
2339 instead of a switch.
2340 (gfc_build_intrinsic_lib_fndecls): Match
2341 {real,complex}{4,8,10,16}decl into the C-style built_in_decls.
2342 (gfc_get_intrinsic_lib_fndecl): Do not hardcode floating-point
2344 (gfc_conv_intrinsic_lib_function): Go through all the extended
2346 (gfc_trans_same_strlen_check): Call builtin_decl_for_float_kind
2347 instead of a switch.
2348 (gfc_conv_intrinsic_abs): Likewise.
2349 (gfc_conv_intrinsic_mod): Likewise.
2350 (gfc_conv_intrinsic_sign): Likewise.
2351 (gfc_conv_intrinsic_fraction): Likewise.
2352 (gfc_conv_intrinsic_nearest): Likewise.
2353 (gfc_conv_intrinsic_spacing): Likewise.
2354 (gfc_conv_intrinsic_rrspacing): Likewise.
2355 (gfc_conv_intrinsic_scale): Likewise.
2356 (gfc_conv_intrinsic_set_exponent): Likewise.
2358 2010-06-11 Paul Thomas <pault@gcc.gnu.org>
2362 * trans-expr.c (gfc_conv_derived_to_class): Handle array-valued
2363 functions with CLASS formal arguments.
2365 2010-06-10 Janus Weil <janus@gcc.gnu.org>
2368 * resolve.c (conformable_arrays): Handle allocatable components.
2370 2010-06-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2373 * gfortran.texi: Document that Cray pointers cannot be function
2376 2010-06-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2379 * gfortran.texi: Document lack of support for syntax
2380 "complex FUNCTION name*16()", and existence of alternative
2381 legacy syntax "complex*16 FUNCTION name()".
2383 2010-06-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2386 * intrinsic.texi (FLUSH): Note the difference between FLUSH and
2387 POSIX's fsync(), and how to call the latter from Fortran code.
2389 2010-06-10 Daniel Franke <franke.daniel@gmail.com>
2392 * interface.c (compare_actual_formal): Reject actual arguments with
2393 array subscript passed to ASYNCHRONOUS dummys.
2395 2010-06-10 Daniel Kraft <d@domob.eu>
2398 * gfortran.h (enum gfc_statement): Add ST_ASSOCIATE, ST_END_ASSOCIATE.
2399 (struct gfc_symbol): New field `assoc'.
2400 (struct gfc_association_list): New struct.
2401 (struct gfc_code): New struct `block' in union, move `ns' there
2402 and add association list.
2403 (gfc_free_association_list): New method.
2404 (gfc_has_vector_subscript): Made public;
2405 * match.h (gfc_match_associate): New method.
2406 * parse.h (enum gfc_compile_state): Add COMP_ASSOCIATE.
2407 * decl.c (gfc_match_end): Handle ST_END_ASSOCIATE.
2408 * interface.c (gfc_has_vector_subscript): Made public.
2409 (compare_actual_formal): Rename `has_vector_subscript' accordingly.
2410 * match.c (gfc_match_associate): New method.
2411 (gfc_match_select_type): Change reference to gfc_code's `ns' field.
2412 * primary.c (match_variable): Don't allow names associated to expr here.
2413 * parse.c (decode_statement): Try matching ASSOCIATE statement.
2414 (case_exec_markers, case_end): Add ASSOCIATE statement.
2415 (gfc_ascii_statement): Hande ST_ASSOCIATE and ST_END_ASSOCIATE.
2416 (parse_associate): New method.
2417 (parse_executable): Handle ST_ASSOCIATE.
2418 (parse_block_construct): Change reference to gfc_code's `ns' field.
2419 * resolve.c (resolve_select_type): Ditto.
2420 (resolve_code): Ditto.
2421 (resolve_block_construct): Ditto and add comment.
2422 (resolve_select_type): Set association list in generated BLOCK to NULL.
2423 (resolve_symbol): Resolve associate names.
2424 * st.c (gfc_free_statement): Change reference to gfc_code's `ns' field
2425 and free association list.
2426 (gfc_free_association_list): New method.
2427 * symbol.c (gfc_new_symbol): NULL new field `assoc'.
2428 * trans-stmt.c (gfc_trans_block_construct): Change reference to
2429 gfc_code's `ns' field.
2431 2010-06-10 Kai Tietz <kai.tietz@onevision.com>
2433 * error.c (error_print): Pre-initialize loc by NULL.
2434 * openmp.c (resolve_omp_clauses): Add explicit
2435 braces to avoid ambigous else.
2436 * array.c (match_subscript): Pre-initialize m to MATCH_ERROR.
2438 2010-06-10 Gerald Pfeifer <gerald@pfeifer.com>
2440 * gfc-internals.texi: Move to GFDL 1.3.
2441 * gfortran.texi: Ditto.
2442 * intrinsic.texi: Ditto.
2443 * invoke.texi: Ditto.
2445 2010-06-09 Daniel Franke <franke.daniel@gmail.com>
2448 * check.c (gfc_check_selected_real_kind): Verify that the
2449 actual arguments are scalar.
2451 2010-06-09 Daniel Franke <franke.daniel@gmail.com>
2454 * intrinsic.c (gfc_convert_type_warn): Further improve -Wconversion.
2456 2010-06-09 Janus Weil <janus@gcc.gnu.org>
2459 * dump-parse-tree.c (show_symbol): Avoid infinite loop.
2461 2010-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
2463 * fortran/symbol.c (check_conflict): Remove an invalid conflict check.
2465 2010-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
2467 * fortran/intrinsic.c (add_functions): Change gfc_check_btest,
2468 gfc_check_ibclr, and gfc_check_ibset to gfc_check_bitfcn.
2469 * fortran/intrinsic.h: Remove prototypes for gfc_check_btest,
2470 gfc_check_ibclr, and gfc_check_ibset. Add prototype for
2472 * fortran/check.c (nonnegative_check, less_than_bitsize1,
2473 less_than_bitsize2): New functions.
2474 (gfc_check_btest): Renamed to gfc_check_bitfcn. Use
2475 nonnegative_check and less_than_bitsize1.
2476 (gfc_check_ibclr, gfc_check_ibset): Removed.
2477 (gfc_check_ibits,gfc_check_mvbits): Use nonnegative_check and
2480 2010-06-09 Janus Weil <janus@gcc.gnu.org>
2483 * resolve.c (resolve_typebound_function,resolve_typebound_subroutine):
2486 2010-06-09 Kai Tietz <kai.tietz@onevision.com>
2488 * resolve.c (resolve_deallocate_expr): Avoid warning
2489 about possible use of iunitialized sym.
2490 (resolve_allocate_expr): Pre-initialize sym by NULL.
2492 2010-06-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2495 * f95-lang.c (gfc_init_builtin_functions): Remove comment.
2497 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
2499 * trans-types.c (gfc_get_nodesc_array_type): Use typed GC
2501 (gfc_get_array_type_bounds): Likewise.
2503 * trans-decl.c (gfc_allocate_lang_decl): Likewise.
2504 (gfc_find_module): Likewise.
2506 * f95-lang.c (pushlevel): Likewise.
2508 * trans.h (struct lang_type): Add variable_size GTY option.
2509 (struct lang_decl): Likewise.
2511 2010-06-08 Tobias Burnus <burnus@net-b.de>
2514 * symbol.c (check_conflict): Move protected--external/procedure check ...
2515 * resolve.c (resolve_select_type): ... to the resolution stage.
2517 2010-06-07 Tobias Burnus <burnus@net-b.de>
2519 * options.c (gfc_handle_option): Fix -fno-recursive.
2521 2010-06-07 Tobias Burnus <burnus@net-b.de>
2523 * gfc-internals.texi (copyrights-gfortran): Fix copyright year format.
2524 * gfortran.texi (copyrights-gfortran): Ditto.
2526 2010-06-07 Joseph Myers <joseph@codesourcery.com>
2528 * lang.opt (fshort-enums): Define using Var and VarExists.
2529 * options.c (gfc_handle_option): Don't set flag_short_enums here.
2531 2010-06-05 Paul Thomas <pault@gcc.gnu.org>
2532 Janus Weil <janus@gcc.gnu.org>
2535 * resolve.c (get_declared_from_expr): Move to before
2536 resolve_typebound_generic_call. Make new_ref and class_ref
2537 ignorable if set to NULL.
2538 (resolve_typebound_generic_call): Once we have resolved the
2539 generic call, check that the specific instance is that which
2540 is bound to the declared type.
2541 (resolve_typebound_function,resolve_typebound_subroutine): Avoid
2542 freeing 'class_ref->next' twice.
2544 2010-06-05 Paul Thomas <pault@gcc.gnu.org>
2547 * trans-array.c (structure_alloc_comps): Dereference scalar
2548 'decl' if it is a REFERENCE_TYPE. Tidy expressions containing
2551 2010-06-04 Joseph Myers <joseph@codesourcery.com>
2553 * gfortranspec.c (append_arg, lang_specific_driver): Use
2554 GCC-specific formats in diagnostics.
2556 2010-06-02 Tobias Burnus <burnus@net-b.de>
2559 * parse.c (gfc_fixup_sibling_symbols): Do not "fix" use-associated
2562 2010-06-01 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2565 * match.c (gfc_match_stopcode): Move gfc_match_eos call inside
2568 2010-05-31 Steven G. Kargl <kargl@gcc.gnu.org>
2570 * fortran/gfortran.texi: Fix typos in description of variable-format-
2573 2010-05-31 Thomas Koenig <tkoenig@gcc.gnu.org>
2576 * dependency.c (gfc_check_section_vs_section): Check
2577 for interleaving array assignments without conflicts.
2579 2010-05-30 Janus Weil <janus@gcc.gnu.org>
2581 * gcc/fortran/gfortran.h (CLASS_DATA): New macro for accessing the
2582 $data component of a class container.
2583 * gcc/fortran/decl.c (attr_decl1): Use macro CLASS_DATA.
2584 * gcc/fortran/expr.c (gfc_check_pointer_assign,gfc_check_assign_symbol,
2585 gfc_has_ultimate_allocatable,gfc_has_ultimate_pointer): Ditto.
2586 * gcc/fortran/interface.c (matching_typebound_op): Ditto.
2587 * gcc/fortran/match.c (gfc_match_allocate, gfc_match_deallocate): Ditto.
2588 * gcc/fortran/parse.c (parse_derived): Ditto.
2589 * gcc/fortran/primary.c (gfc_match_varspec, gfc_variable_attr,
2590 gfc_expr_attr): Ditto.
2591 * gcc/fortran/resolve.c (resolve_structure_cons, find_array_spec,
2592 resolve_deallocate_expr, resolve_allocate_expr, resolve_select_type,
2593 resolve_fl_var_and_proc, resolve_typebound_procedure,
2594 resolve_fl_derived): Ditto.
2595 * gcc/fortran/symbol.c (gfc_type_compatible): Restructured.
2596 * gcc/fortran/trans-array.c (structure_alloc_comps): Use macro
2598 * gcc/fortran/trans-decl.c (gfc_get_symbol_decl,
2599 gfc_trans_deferred_vars): Ditto.
2600 * gcc/fortran/trans-stmt.c (gfc_trans_allocate): Ditto.
2602 2010-05-28 Tobias Burnus <burnus@net-b.de>
2604 * options.c (gfc_handle_option): Fix handling of -fno-whole-file.
2606 2010-05-28 Joseph Myers <joseph@codesourcery.com>
2608 * gfortranspec.c (append_arg, lang_specific_driver): Use
2609 fatal_error instead of fatal. Use warning instead of fprintf for
2612 2010-05-28 Joseph Myers <joseph@codesourcery.com>
2614 * cpp.c (gfc_cpp_init_0): Use xstrerror instead of strerror.
2615 * module.c (write_char, gfc_dump_module, gfc_use_module): Use
2616 xstrerror instead of strerror.
2618 2010-05-26 Joseph Myers <joseph@codesourcery.com>
2620 * cpp.c (cb_cpp_error): Save and restore
2621 global_dc->warn_system_headers, not variable warn_system_headers.
2623 2010-05-26 Steven Bosscher <steven@gcc.gnu.org>
2625 * fortran/f95-lang.c: Do not include libfuncs.h, expr.h, and except.h.
2627 2010-05-26 Steven Bosscher <steven@gcc.gnu.org>
2629 * trans-common.c: Do not include rtl.h, include output.h instead.
2630 * trans-decl.c: Likewise.
2632 2010-05-26 Paul Thomas <pault@gcc.gnu.org>
2635 * resolve.c (resolve_global_procedure): Resolve the gsymbol's
2636 namespace before trying to reorder the gsymbols.
2638 2010-05-25 Daniel Franke <franke.daniel@gmail.com>
2643 * resolve.c (resolve_global_procedure): Add check for global
2644 procedures with implicit interfaces and assumed-shape or optional
2645 dummy arguments. Verify that function return type, kind and string
2648 2010-05-21 Tobias Burnus <burnus@net-b.de>
2650 * gfortran.h: Do not include system.h.
2651 * bbt.c: Include system.h.
2653 * dependency.c: Ditto.
2654 * dump-parse-tree.c: Ditto.
2655 * arith.h: Do not include gfortran.h.
2656 * constructor.h: Do not include gfortran.h and splay-tree.h.
2657 * match.h: Do not include gfortran.h.
2659 * target-memory.h: Ditto.
2660 * openmp.c: Do not include toplev.h and target.h.
2661 * trans-stmt.c: Ditto not include toplev.h.
2663 * trans-common.c: Tell why toplev.h is needed. And
2664 do not include target.h.
2665 * trans-expr.c: Tell why toplev.h is needed.
2666 * trans-array.c: Ditto.
2667 * trans-openmp.c: Ditto.
2668 * trans-const.c: Ditto.
2670 * trans-types.c: Ditto.
2671 * trans-io.c: Ditto.
2672 * trans-decl.c: Ditto.
2675 * trans-intrinsic.c: Ditto.
2678 2010-05-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2681 * match.c (gfc_match_stopcode): Use gfc_match_init_expr. Go to cleanup
2682 before returning MATCH_ERROR. Add check for scalar. Add check for
2683 default integer kind.
2685 2010-05-22 Janus Weil <janus@gcc.gnu.org>
2688 * match.c (gfc_match_select_type): On error jump back out of the local
2690 * parse.c (parse_derived): Defer creation of vtab symbols to resolution
2691 stage, more precisely to ...
2692 * resolve.c (resolve_fl_derived): ... this place.
2694 2010-05-22 Janus Weil <janus@gcc.gnu.org>
2697 * resolve.c (ensure_not_abstract): Allow abstract types with
2698 non-abstract ancestors.
2700 2010-05-21 Steven Bosscher <steven@gcc.gnu.org>
2702 * trans-const.c: Include realmpfr.h.
2703 * Make-lang.in: Update dependencies.
2705 2010-05-21 Steven Bosscher <steven@gcc.gnu.org>
2707 * trans-const.c, trans-types.c, trans-intrinsic.c:
2708 Clean up redundant includes.
2710 2010-05-20 Daniel Franke <franke.daniel@gmail.com>
2713 * lang.opt (Wunused-dummy-argument): New option.
2714 * gfortran.h (gfc_option_t): Add warn_unused_dummy_argument.
2715 * options.c (gfc_init_options): Disable warn_unused_dummy_argument.
2716 (set_Wall): Enable warn_unused_dummy_argument.
2717 (gfc_handle_option): Set warn_unused_dummy_argument according to
2719 * trans-decl.c (generate_local_decl): Separate warnings about
2720 unused variables and unused dummy arguments.
2721 * invoke.texi: Documented new option.
2723 2010-05-20 Steven Bosscher <steven@gcc.gnu.org>
2725 * trans-expr.c: Do not include convert.h, ggc.h, real.h, and gimple.h.
2726 (gfc_conv_string_tmp): Do not assert type comparibilty.
2727 * trans-array.c: Do not include gimple.h, ggc.h, and real.h.
2728 (gfc_conv_expr_descriptor): Remove assert.
2729 * trans-common.c: Clarify why rtl.h and tm.h are included.
2730 * trans-openmp.c: Do not include ggc.h and real.h.
2731 Explain why gimple.h is included.
2732 * trans-const.c: Do not include ggc.h.
2733 * trans-stmt.c: Do not include gimple.h, ggc.h, and real.h.
2734 * trans.c: Do not include ggc.h and real.h.
2735 Explain why gimple.h is included.
2736 * trans-types.c: Do not include tm.h. Explain why langhooks.h
2737 and dwarf2out.h are included.
2738 * trans-io.c: Do not include gimple.h and real.h.
2739 * trans-decl.c: Explain why gimple.h, tm.h, and rtl.h are included.
2740 * trans-intrinsic.c: Do not include gimple.h. Explain why tm.h
2743 2010-05-20 Tobias Burnus <burnus@net-b.de>
2745 * options.c (gfc_init_options,gfc_post_options): Enable
2746 flag_associative_math by default.
2748 2010-05-19 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2751 * trans-stmt.c (gfc_trans_stop): Add generation of call to
2752 gfortran_error_stop_numeric. Fix up some whitespace. Use stop_string for
2753 blank STOP, handling a null expression. (gfc_trans_pause): Use
2754 pause_string for blank PAUSE.
2755 * trans.h: Add external function declaration for error_stop_numeric.
2756 * trans-decl.c (gfc_build_builtin_function_decls): Add the building of
2757 the declaration for the library call. Adjust whitespaces.
2758 * match.c (gfc_match_stopcode): Remove use of the actual stop code to
2759 signal no stop code. Match the expression following the stop and pass
2760 that to the translators. Remove the old use of digit matching. Add
2761 checks that the stop_code expression is INTEGER or CHARACTER, constant,
2762 and if CHARACTER, default character KIND.
2764 2010-05-19 Daniel Franke <franke.daniel@gmail.com>
2767 * lang.opt (Wconversion-extra): New option.
2768 * gfortran.h (gfc_option_t): Add warn_conversion_extra.
2769 * options.c (gfc_init_options): Disable -Wconversion-extra by default.
2770 (set_Wall): Enable -Wconversion.
2771 (gfc_handle_option): Set warn_conversion_extra.
2772 * intrinsic.c (gfc_convert_type_warn): Ignore kind conditions
2773 introduced for -Wconversion if -Wconversion-extra is present.
2774 * invoke.texi: Add -Wconversion to -Wall; document new behaviour of
2775 -Wconversion; document -Wconversion-extra.
2777 2010-05-19 Daniel Franke <franke.daniel@gmail.com>
2780 * gfortran.h (gfc_has_default_initializer): New.
2781 * expr.c (gfc_has_default_initializer): New.
2782 * resolve.c (has_default_initializer): Removed, use
2783 gfc_has_default_initializer() instead. Updated all callers.
2784 * trans-array.c (has_default_initializer): Removed, use
2785 gfc_has_default_initializer() instead. Updated all callers.
2786 * trans-decl.c (generate_local_decl): Do not check the
2787 first component only to check for initializers, but use
2788 gfc_has_default_initializer() instead.
2790 2010-05-19 Daniel Franke <franke.daniel@gmail.com>
2793 * primary.c (match_string_constant): Move start_locus just inside
2795 * data.c (create_character_intializer): Clarified truncation warning.
2797 2010-05-19 Daniel Franke <franke.daniel@gmail.com>
2800 * intrinsic.h (gfc_check_float): New prototype.
2801 (gfc_check_sngl): New prototype.
2802 * check.c (gfc_check_float): New.
2803 (gfc_check_sngl): New.
2804 * intrinsic.c (add_functions): Moved DFLOAT from aliasing DBLE
2805 to be a specific for REAL. Added check routines for FLOAT, DFLOAT
2807 * intrinsic.texi: Removed individual nodes of FLOAT, DFLOAT and SNGL,
2808 added them to the list of specifics of REAL instead.
2810 2010-05-17 Janus Weil <janus@gcc.gnu.org>
2813 * trans-expr.c (gfc_conv_structure): Remove unneeded and buggy code.
2814 This is now handled via 'gfc_class_null_initializer'.
2816 2010-05-17 Janus Weil <janus@gcc.gnu.org>
2818 * class.c (gfc_add_component_ref,gfc_class_null_initializer,
2819 gfc_build_class_symbol,add_proc_component,add_proc_comps,
2820 add_procs_to_declared_vtab1,copy_vtab_proc_comps,
2821 add_procs_to_declared_vtab,add_generic_specifics,
2822 add_generics_to_declared_vtab,gfc_find_derived_vtab,
2823 find_typebound_proc_uop,gfc_find_typebound_proc,
2824 gfc_find_typebound_user_op,gfc_find_typebound_intrinsic_op,
2825 gfc_get_tbp_symtree): Moved here from other places.
2826 * expr.c (gfc_add_component_ref,gfc_class_null_initializer): Move to
2828 * gfortran.h (gfc_build_class_symbol,gfc_find_derived_vtab,
2829 gfc_find_typebound_proc,gfc_find_typebound_user_op,
2830 gfc_find_typebound_intrinsic_op,gfc_get_tbp_symtree,
2831 gfc_add_component_ref, gfc_class_null_initializer): Moved to class.c.
2832 * Make-lang.in: Add class.o.
2833 * symbol.c (gfc_build_class_symbol,add_proc_component,add_proc_comps,
2834 add_procs_to_declared_vtab1,copy_vtab_proc_comps,
2835 add_procs_to_declared_vtab,add_generic_specifics,
2836 add_generics_to_declared_vtab,gfc_find_derived_vtab,
2837 find_typebound_proc_uop,gfc_find_typebound_proc,
2838 gfc_find_typebound_user_op,gfc_find_typebound_intrinsic_op,
2839 gfc_get_tbp_symtree): Move to class.c.
2841 2010-05-17 Nathan Froyd <froydnj@codesourcery.com>
2843 * trans-types.c (gfc_init_types): Use build_function_type_list.
2844 (gfc_get_ppc_type): Likewise.
2845 * trans-decl.c (gfc_generate_constructors): Likewise.
2846 * f95-lang.c (build_builtin_fntypes): Likewise.
2847 (gfc_init_builtin_functions): Likewise.
2848 (DEF_FUNCTION_TYPE_0): Likewise.
2849 (DEF_FUNCTION_TYPE_1): Likewise.
2850 (DEF_FUNCTION_TYPE_2): Likewise.
2851 (DEF_FUNCTION_TYPE_3): Likewise.
2852 (DEF_FUNCTION_TYPE_4): Likewise.
2853 (DEF_FUNCTION_TYPE_5): Likewise.
2854 (DEF_FUNCTION_TYPE_6): Likewise.
2855 (DEF_FUNCTION_TYPE_7): Likewise. Use ARG7.
2856 (DEF_FUNCTION_TYPE_VAR_0): Use build_varags_function_type_list.
2858 2010-05-17 Nathan Froyd <froydnj@codesourcery.com>
2860 * trans-array.c (gfc_trans_array_constructor_value): Use
2861 build_constructor instead of build_constructor_from_list.
2862 (gfc_build_constant_array_constructor): Likewise.
2863 * trans-decl.c (create_main_function): Likewise.
2864 * trans-stmt.c (gfc_trans_character_select): Likewise.
2866 2010-05-17 Janus Weil <janus@gcc.gnu.org>
2869 * resolve.c (resolve_fl_var_and_proc): Move error messages here from ...
2870 (resolve_fl_variable_derived): ... this place.
2871 (resolve_symbol): Make sure function symbols (and their result
2872 variables) are not resolved twice.
2874 2010-05-16 Daniel Franke <franke.daniel@gmail.com>
2877 * array.c (match_array_list): Revert change from 2010-05-13.
2879 2010-05-16 Richard Guenther <rguenther@suse.de>
2881 * trans-decl.c (module_htab_decls_hash): Revert last change.
2883 2010-05-16 Richard Guenther <rguenther@suse.de>
2885 * trans-decl.c (module_htab_decls_hash): Use IDENTIFIER_HASH_VALUE.
2887 2010-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
2889 * options.c (set_Wall): Remove special logic for Wuninitialized
2892 2010-05-15 Janus Weil <janus@gcc.gnu.org>
2896 * trans-decl.c (gfc_trans_deferred_vars): Modify ordering of
2899 2010-05-15 Janus Weil <janus@gcc.gnu.org>
2903 * gfortran.h (gfc_class_null_initializer): New prototype.
2904 * expr.c (gfc_class_null_initializer): New function to build a NULL
2905 initializer for CLASS pointers.
2906 * symbol.c (gfc_build_class_symbol): Modify internal naming of class
2907 containers. Remove default NULL initialization of $data component.
2908 * trans.c (gfc_allocate_array_with_status): Fix wording of an error
2910 * trans-expr.c (gfc_conv_initializer,gfc_trans_subcomponent_assign):
2911 Use new function 'gfc_class_null_initializer'.
2912 * trans-intrinsic.c (gfc_conv_allocated): Handle allocatable scalar
2915 2010-05-14 Steven G. Kargl <kargl@gcc.gnu.org>
2918 * fortran/interface.c (get_sym_storage_size): Use signed instead of
2919 unsigned mpz_get_?i routines.
2921 2010-05-14 Jakub Jelinek <jakub@redhat.com>
2923 * trans.c (trans_code): Set backend locus early.
2924 * trans-decl.c (gfc_get_fake_result_decl): Use source location
2925 of the function instead of current input_location.
2927 2010-05-13 Daniel Franke <franke.daniel@gmail.com>
2930 * intrinsic.c (gfc_init_expr): Renamed to gfc_init_expr_flag.
2932 * expr.c (init_flag): Removed; use gfc_init_expr_flag everywhere.
2933 * array.c (match_array_list): Pass on gfc_init_expr_flag when matching
2936 2010-05-13 Jakub Jelinek <jakub@redhat.com>
2939 * openmp.c (resolve_omp_clauses): Allow procedure pointers in clause
2941 * trans-openmp.c (gfc_omp_privatize_by_reference): Don't privatize
2942 by reference dummy procedures or non-dummy procedure pointers.
2943 (gfc_omp_predetermined_sharing): Return
2944 OMP_CLAUSE_DEFAULT_FIRSTPRIVATE for dummy procedures.
2946 2010-05-11 Daniel Franke <franke.daniel@gmail.com>
2949 * openmp.c (gfc_match_omp_taskwait): Report unexpected characters
2950 after OMP statement.
2951 (gfc_match_omp_critical): Likewise.
2952 (gfc_match_omp_flush): Likewise.
2953 (gfc_match_omp_workshare): Likewise.
2954 (gfc_match_omp_master): Likewise.
2955 (gfc_match_omp_ordered): Likewise.
2956 (gfc_match_omp_atomic): Likewise.
2957 (gfc_match_omp_barrier): Likewise.
2958 (gfc_match_omp_end_nowait): Likewise.
2960 2010-05-11 Daniel Franke <franke.daniel@gmail.com>
2963 * resolve.c (validate_case_label_expr): Removed FIXME.
2964 (resolve_select): Raise default warning on case labels out of range
2965 of the case expression.
2967 2010-05-10 Daniel Franke <franke.daniel@gmail.com>
2972 * intrinsic.c (gfc_convert_type_warn): Be more discriminative
2973 about conversion warnings.
2975 2010-05-10 Janus Weil <janus@gcc.gnu.org>
2978 * match.c (gfc_match_select_type): Move error message to
2979 resolve_select_type.
2980 * resolve.c (resolve_select_type): Error message moved here from
2981 gfc_match_select_type. Correctly set type of temporary.
2983 2010-05-10 Richard Guenther <rguenther@suse.de>
2985 * trans-decl.c (gfc_build_library_function_decl): Split out
2987 (build_library_function_decl_1): ... this new function.
2988 Set a fnspec attribute if a specification was provided.
2989 (gfc_build_library_function_decl_with_spec): New function.
2990 (gfc_build_intrinsic_function_decls): Annotate internal_pack
2991 and internal_unpack.
2993 2010-05-07 Daniel Franke <franke.daniel@gmail.com>
2996 * intrinc.c (gfc_is_intrinsic): Do not prematurely mark symbol
2999 2010-05-07 Jason Merrill <jason@redhat.com>
3001 * trans-expr.c (gfc_conv_procedure_call): Rename nullptr to null_ptr
3002 to avoid -Wc++-compat warning.
3004 2010-05-06 Manuel López-Ibáñez <manu@gcc.gnu.org>
3007 * options.c (gfc_handle_option): Add argument kind.
3008 * gfortran.h (gfc_handle_option): Update declaration.
3010 2010-05-06 Tobias Burnus <burnus@net-b.de>
3013 * trans-types.c (gfc_sym_type): Mark Cray pointees as
3016 2010-05-05 Daniel Franke <franke.daniel@gmail.com>
3019 * resolve.c (traverse_data_list): Rephrase error message for
3020 non-constant bounds in data-implied-do.
3022 2010-05-05 Daniel Franke <franke.daniel@gmail.com>
3025 * gfortran.h: Removed repeat count from constructor, removed
3027 * data.h (gfc_assign_data_value_range): Changed return value from
3029 * data.c (gfc_assign_data_value): Add location to constructor element.
3030 (gfc_assign_data_value_range): Call gfc_assign_data_value()
3031 for each element in range. Return early if an error was generated.
3032 * resolve.c (check_data_variable): Stop early if range assignment
3035 2010-05-05 Janus Weil <janus@gcc.gnu.org>
3038 * resolve.c (resolve_fl_derived): Some fixes for class variables.
3039 * symbol.c (gfc_build_class_symbol): Add separate class container for
3042 2010-05-03 Steven G. Kargl <kargl@gcc.gnu.org>
3045 * fortran/parse.c (parse_interface): Do not dereference a NULL pointer.
3047 2010-05-02 Tobias Burnus <burnus@net-b.de>
3050 * intrinsic.c (add_functions): Fix GFC_STD and add gfc_resolve_ calls
3051 for lcobound, ucobound, image_index and this_image.
3052 * intrinsic.h (gfc_resolve_lcobound, gfc_resolve_this_image,
3053 gfc_resolve_image_index, gfc_resolve_ucobound): New prototypes.
3054 * iresolve.c (gfc_resolve_lcobound, gfc_resolve_this_image,
3055 gfc_resolve_image_index, gfc_resolve_ucobound, resolve_bound): New
3057 (gfc_resolve_lbound, gfc_resolve_ubound): Use resolve_bound.
3059 2010-04-30 Tobias Burnus <burnus@net-b.de>
3063 * trans-types.c (gfc_get_array_descriptor_base): Fix index
3064 calculation for array descriptor types.
3066 2010-04-29 Janus Weil <janus@gcc.gnu.org>
3069 * symbol.c (add_proc_component,copy_vtab_proc_comps): Remove
3070 initializers for PPC members of the vtabs.
3072 2010-04-29 Janus Weil <janus@gcc.gnu.org>
3075 * symbol.c (add_proc_component,add_proc_comps): Correctly set the 'ppc'
3076 attribute for all PPC members of the vtypes.
3077 (copy_vtab_proc_comps): Copy the correct interface.
3078 * trans.h (gfc_trans_assign_vtab_procs): Modified prototype.
3079 * trans-expr.c (gfc_trans_assign_vtab_procs): Pass the derived type as
3080 a dummy argument and make sure all PPC members of the vtab are
3081 initialized correctly.
3082 (gfc_conv_derived_to_class,gfc_trans_class_assign): Additional argument
3083 in call to gfc_trans_assign_vtab_procs.
3084 * trans-stmt.c (gfc_trans_allocate): Ditto.
3086 2010-04-29 Paul Thomas <pault@gcc.gnu.org>
3089 * resolve.c (resolve_typebound_function): Renamed
3090 resolve_class_compcall.Do all the detection of class references
3092 (resolve_typebound_subroutine): resolve_class_typebound_call
3093 renamed. Otherwise same as resolve_typebound_function.
3094 (gfc_resolve_expr): Call resolve_typebound_function.
3095 (resolve_code): Call resolve_typebound_subroutine.
3097 2010-04-29 Janus Weil <janus@gcc.gnu.org>
3100 * resolve.c (resolve_typebound_generic_call): For CLASS methods
3101 pass back the specific symtree name, rather than the target
3104 2010-04-29 Paul Thomas <pault@gcc.gnu.org>
3107 * resolve.c (resolve_structure_cons): Make the initializer of
3108 the vtab component 'extends' the same type as the component.
3110 2010-04-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3113 * interface.c (check_interface1): Pass symbol name rather than NULL to
3114 gfc_compare_interfaces.(gfc_compare_interfaces): Add assert to
3115 trap MULL. (gfc_compare_derived_types): Revert previous change
3116 incorporated incorrectly during merge from trunk, r155778.
3117 * resolve.c (check_generic_tbp_ambiguity): Pass symbol name rather
3118 than NULL to gfc_compare_interfaces.
3119 * symbol.c (add_generic_specifics): Likewise.
3121 2010-02-29 Janus Weil <janus@gcc.gnu.org>
3124 * interface.c (gfc_compare_derived_types): Add condition for vtype.
3125 * symbol.c (gfc_find_derived_vtab): Sey access to private.
3126 (gfc_find_derived_vtab): Likewise.
3127 * module.c (ab_attribute): Add enumerator AB_VTAB.
3128 (mio_symbol_attribute): Use new attribute, AB_VTAB.
3129 (check_for_ambiguous): Likewise.
3131 2010-04-29 Paul Thomas <pault@gcc.gnu.org>
3132 Janus Weil <janus@gcc.gnu.org>
3135 * trans-expr.c (select_class_proc): Remove function.
3136 (conv_function_val): Delete reference to previous.
3137 (gfc_conv_derived_to_class): Add second argument to the call to
3138 gfc_find_derived_vtab.
3139 (gfc_conv_structure): Exclude proc_pointer components when
3140 accessing $data field of class objects.
3141 (gfc_trans_assign_vtab_procs): New function.
3142 (gfc_trans_class_assign): Add second argument to the call to
3143 gfc_find_derived_vtab.
3144 * symbol.c (gfc_build_class_symbol): Add delayed_vtab arg and
3145 implement holding off searching for the vptr derived type.
3146 (add_proc_component): New function.
3147 (add_proc_comps): New function.
3148 (add_procs_to_declared_vtab1): New function.
3149 (copy_vtab_proc_comps): New function.
3150 (add_procs_to_declared_vtab): New function.
3151 (void add_generic_specifics): New function.
3152 (add_generics_to_declared_vtab): New function.
3153 (gfc_find_derived_vtab): Add second argument to the call to
3154 gfc_find_derived_vtab. Add the calls to
3155 add_procs_to_declared_vtab and add_generics_to_declared_vtab.
3156 * decl.c (build_sym, build_struct): Use new arg in calls to
3157 gfc_build_class_symbol.
3158 * gfortran.h : Add vtype bitfield to symbol_attr. Remove the
3159 definition of struct gfc_class_esym_list. Modify prototypes
3160 of gfc_build_class_symbol and gfc_find_derived_vtab.
3161 * trans-stmt.c (gfc_trans_allocate): Add second argument to the
3162 call to gfc_find_derived_vtab.
3163 * module.c : Add the vtype attribute.
3164 * trans.h : Add prototype for gfc_trans_assign_vtab_procs.
3165 * resolve.c (resolve_typebound_generic_call): Add second arg
3166 to pass along the generic name for class methods.
3167 (resolve_typebound_call): The same.
3168 (resolve_compcall): Use the second arg to carry the generic
3169 name from the above. Remove the reference to class_esym.
3170 (check_members, check_class_members, resolve_class_esym,
3171 hash_value_expr): Remove functions.
3172 (resolve_class_compcall, resolve_class_typebound_call): Modify
3173 to use vtable rather than member by member calls.
3174 (gfc_resolve_expr): Modify second arg in call to
3176 (resolve_select_type): Add second arg in call to
3177 gfc_find_derived_vtab.
3178 (resolve_code): Add second arg in call resolve_typebound_call.
3179 (resolve_fl_derived): Exclude vtypes from check for late
3180 procedure definitions. Likewise for checking of explicit
3181 interface and checking of pass arg.
3182 * iresolve.c (gfc_resolve_extends_type_of): Add second arg in
3183 calls to gfc_find_derived_vtab.
3184 * match.c (select_type_set_tmp): Use new arg in call to
3185 gfc_build_class_symbol.
3186 * trans-decl.c (gfc_get_symbol_decl): Complete vtable if
3188 * parse.c (endType): Finish incomplete classes.
3190 2010-04-28 Tobias Burnus <burnus@net-b.de>
3194 * simplify.c (simplify_cobound): Handle scalar coarrays.
3196 2010-04-27 Tobias Burnus <burnus@net-b.de>
3198 * gfc-internals.texi: Update copyright year.
3199 * gfortran.texi: Ditto.
3200 * invoke.texi: Ditto.
3202 2010-04-27 Tobias Burnus <burnus@net-b.de>
3205 * resolve.c (resolve_allocate_expr): Allow array coarrays.
3206 * trans-types.h (gfc_get_array_type_bounds): Update prototype.
3207 * trans-types.c (gfc_get_array_type_bounds,
3208 gfc_get_array_descriptor_base): Add corank argument.
3209 * trans-array.c (gfc_array_init_size): Handle corank.
3210 (gfc_trans_create_temp_array, gfc_array_allocate,
3211 gfc_conv_expr_descriptor): Add corank argument to call.
3212 * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Ditto.
3214 2010-04-24 Steven G. Kargl <kargl@gcc.gnu.org>
3218 * trans-array.c (gfc_trans_array_bound_check): Use TREE_CODE instead
3219 of mucking with a tree directly.
3221 2010-04-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3224 * io.c (gfc_match_open): Remove branch to syntax error. Add call to
3225 gfc_error with new error message.
3227 2010-04-24 Paul Thomas <pault@gcc.gnu.org>
3231 * trans-expr.c (gfc_conv_expr): Supply an address expression for
3233 (gfc_conv_expr_reference): Call gfc_conv_expr and return for
3235 * trans-array.c (gfc_add_loop_ss_code): Store the value rather
3236 than the address of a GFC_SS_REFERENCE.
3237 * trans.h : Change comment on GFC_SS_REFERENCE.
3239 2010-04-22 Richard Guenther <rguenther@suse.de>
3242 * resolve.c (gfc_resolve_index): Wrap around ...
3243 (gfc_resolve_index_1): ... this. Add parameter to allow
3244 any integer kind index type.
3245 (resolve_array_ref): Allow any integer kind for the start
3246 index of an array ref.
3248 2010-04-21 Jakub Jelinek <jakub@redhat.com>
3251 * f95-lang.c (gfc_define_builtin): Set TREE_NOTHROW on
3254 2010-04-20 Harald Anlauf <anlauf@gmx.de>
3256 * intrinsic.c (sort_actual): Remove 'is' in error message.
3258 2010-04-20 Paul Thomas <pault@gcc.gnu.org>
3261 * resolve.c (resolve_fl_derived): If a component character
3262 length has not been resolved, do so now.
3263 (resolve_symbol): The same as above for a symbol character
3265 * trans-decl.c (gfc_create_module_variable): A 'length' decl is
3266 not needed for a character valued, procedure pointer.
3269 * resolve.c (ensure_not_abstract_walker): If 'overriding' is
3270 not found, return FAILURE rather than ICEing.
3272 2010-04-19 Jakub Jelinek <jakub@redhat.com>
3275 * openmp.c (gfc_resolve_do_iterator): Only make iteration vars for
3276 sequential loops private in the innermost containing task region.
3278 2010-04-18 Eric Botcazou <ebotcazou@adacore.com>
3280 * f95-lang.c (gfc_init_decl_processing): Remove second argument in call
3281 to build_common_tree_nodes.
3283 2010-04-17 Steven G. Kargl <kargl@gcc.gnu.org>
3286 * fortran/trans-array.c (gfc_conv_ss_startstride): Remove the use of
3287 gfc_msg_bounds by using 'Array bound mismatch' directly.
3288 (gfc_trans_dummy_array_bias): Remove the use of gfc_msg_bounds. Reword
3289 error message to include the mismatch in the extent of array bound.
3290 * fortran/trans.c: Remove gfc_msg_bounds. It is only used in one place.
3291 * fortran/trans.h: Remove extern definition of gfc_msg_bounds.
3293 2010-04-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3295 * gfortran.texi: Update information on temporary file locations.
3297 2010-04-16 Jakub Jelinek <jakub@redhat.com>
3299 * trans-decl.c (gfc_build_qualified_array): Ensure
3300 ubound.N and lbound.N artificial variable names don't appear
3303 2010-04-15 Steven G. Kargl <kargl@gcc.gnu.org>
3306 * trans-array.c (gfc_trans_array_bound_check): Eliminate a redundant
3307 block of code. Set name to the variable associated with the descriptor.
3309 2010-04-15 Jakub Jelinek <jakub@redhat.com>
3311 * trans-decl.c (gfc_build_qualified_array): Clear DECL_IGNORED_P
3312 on VAR_DECL LBOUND and/or UBOUND, even for -O1.
3314 2010-04-14 Steven G. Kargl <kargl@gcc.gnu.org>
3316 * intrinsic.texi: Add the missing specific name of intrinsic
3317 procedure where the specific name is identical to the generic name.
3318 Fix inconsistent or mismatch in the argument names in intrinsic
3319 procedure descriptions. Add the SCALAR allocatable description to
3322 2010-04-14 Tobias Burnus <burnus@net-b.de>
3325 * array.c (gfc_find_array_ref): Handle codimensions.
3326 (gfc_match_array_spec,gfc_match_array_ref): Use gfc_fatal_error.
3327 * check.c (is_coarray, dim_corank_check, gfc_check_lcobound,
3328 gfc_check_image_index, gfc_check_this_image, gfc_check_ucobound):
3330 * gfortran.h (gfc_isym_id): Add GFC_ISYM_IMAGE_INDEX,
3331 GFC_ISYM_LCOBOUND, GFC_ISYM_THIS_IMAGE,
3333 * intrinsic.h (add_functions): Add this_image, image_index,
3334 lcobound and ucobound intrinsics.
3335 * intrinsic.c (gfc_check_lcobound,gfc_check_ucobound,
3336 gfc_check_image_index, gfc_check_this_image,
3337 gfc_simplify_image_index, gfc_simplify_lcobound,
3338 gfc_simplify_this_image, gfc_simplify_ucobound):
3339 New function prototypes.
3340 * intrinsic.texi (IMAGE_INDEX, LCOBOUND, THIS_IMAGE
3341 IMAGE_INDEX): Document new intrinsic functions.
3342 * match.c (gfc_match_critical, sync_statement): Make -fcoarray=none
3344 * simplify.c (simplify_bound_dim): Handle coarrays.
3345 (simplify_bound): Update simplify_bound_dim call.
3346 (gfc_simplify_num_images): Add -fcoarray=none check.
3347 (simplify_cobound, gfc_simplify_lcobound, gfc_simplify_ucobound,
3348 gfc_simplify_ucobound, gfc_simplify_ucobound): New functions.
3350 2010-04-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3353 * constructor.c: Fix typo in comment.
3354 * expr.c (find_array_section): Add check for max array limit.
3356 2010-04-13 Iain Sandoe <iains@gcc.gnu.org>
3359 * gfortranspec.c (lookup_option): Check for -static and return
3361 (lang_specific_driver): Break when OPTION_static is discovered.
3363 2010-04-12 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3365 * array.c (extract_element): Restore function from trunk.
3366 (gfc_get_array_element): Restore function from trunk.
3367 (gfc_expand_constructor): Restore check against
3368 flag_max_array_constructor.
3369 * constructor.c (node_copy_and_append): Delete unused.
3370 * gfortran.h: Delete comment and extra include.
3371 * constructor.h: Bump copyright and clean up TODO comments.
3372 * resolve.c: Whitespace.
3374 2010-04-12 Daniel Franke <franke.daniel@gmail.com>
3376 * simplify.c (compute_dot_product): Replaced usage of ADVANCE macro
3377 with direct access access to elements. Adjusted prototype, fixed all
3379 (gfc_simplify_dot_product): Removed duplicate check for zero-sized
3381 (gfc_simplify_matmul): Removed usage of ADVANCE macro.
3382 (gfc_simplify_spread): Removed workaround, directly insert elements
3383 at a given array position.
3384 (gfc_simplify_transpose): Likewise.
3385 (gfc_simplify_pack): Replaced usage of ADVANCE macro with corresponding
3387 (gfc_simplify_unpack): Likewise.
3389 2010-04-12 Daniel Franke <franke.daniel@gmail.com>
3391 * simplify.c (only_convert_cmplx_boz): Renamed to ...
3392 (convert_boz): ... this and moved to start of file.
3393 (gfc_simplify_abs): Whitespace fix.
3394 (gfc_simplify_acos): Whitespace fix.
3395 (gfc_simplify_acosh): Whitespace fix.
3396 (gfc_simplify_aint): Whitespace fix.
3397 (gfc_simplify_dint): Whitespace fix.
3398 (gfc_simplify_anint): Whitespace fix.
3399 (gfc_simplify_and): Replaced if-gate by more common switch-over-type.
3400 (gfc_simplify_dnint): Whitespace fix.
3401 (gfc_simplify_asin): Whitespace fix.
3402 (gfc_simplify_asinh): Moved creation of result-expr out of switch.
3403 (gfc_simplify_atan): Likewise.
3404 (gfc_simplify_atanh): Whitespace fix.
3405 (gfc_simplify_atan2): Whitespace fix.
3406 (gfc_simplify_bessel_j0): Removed ATTRIBUTE_UNUSED.
3407 (gfc_simplify_bessel_j1): Likewise.
3408 (gfc_simplify_bessel_jn): Likewise.
3409 (gfc_simplify_bessel_y0): Likewise.
3410 (gfc_simplify_bessel_y1): Likewise.
3411 (gfc_simplify_bessel_yn): Likewise.
3412 (gfc_simplify_ceiling): Reorderd statements.
3413 (simplify_cmplx): Use convert_boz(), check for constant arguments.
3415 (gfc_simplify_cmplx): Use correct default kind. Removed check for
3417 (gfc_simplify_complex): Replaced if-gate. Removed check for
3419 (gfc_simplify_conjg): Whitespace fix.
3420 (gfc_simplify_cos): Whitespace fix.
3421 (gfc_simplify_cosh): Replaced if-gate by more common switch-over-type.
3422 (gfc_simplify_dcmplx): Removed check for constant arguments.
3423 (gfc_simplify_dble): Use convert_boz() and gfc_convert_constant().
3424 (gfc_simplify_digits): Whitespace fix.
3425 (gfc_simplify_dim): Whitespace fix.
3426 (gfc_simplify_dprod): Reordered statements.
3427 (gfc_simplify_erf): Whitespace fix.
3428 (gfc_simplify_erfc): Whitespace fix.
3429 (gfc_simplify_epsilon): Whitespace fix.
3430 (gfc_simplify_exp): Whitespace fix.
3431 (gfc_simplify_exponent): Use convert_boz().
3432 (gfc_simplify_floor): Reorderd statements.
3433 (gfc_simplify_gamma): Whitespace fix.
3434 (gfc_simplify_huge): Whitespace fix.
3435 (gfc_simplify_iand): Whitespace fix.
3436 (gfc_simplify_ieor): Whitespace fix.
3437 (simplify_intconv): Use gfc_convert_constant().
3438 (gfc_simplify_int): Use simplify_intconv().
3439 (gfc_simplify_int2): Reorderd statements.
3440 (gfc_simplify_idint): Reorderd statements.
3441 (gfc_simplify_ior): Whitespace fix.
3442 (gfc_simplify_ishftc): Removed duplicate type check.
3443 (gfc_simplify_len): Use range_check() instead of manual range check.
3444 (gfc_simplify_lgamma): Removed ATTRIBUTE_UNUSED. Whitespace fix.
3445 (gfc_simplify_log): Whitespace fix.
3446 (gfc_simplify_log10): Whitespace fix.
3447 (gfc_simplify_minval): Whitespace fix.
3448 (gfc_simplify_maxval): Whitespace fix.
3449 (gfc_simplify_mod): Whitespace fix.
3450 (gfc_simplify_modulo): Whitespace fix.
3451 (simplify_nint): Reorderd statements.
3452 (gfc_simplify_not): Whitespace fix.
3453 (gfc_simplify_or): Replaced if-gate by more common switch-over-type.
3454 (gfc_simplify_radix): Removed unused result-variable. Whitespace fix.
3455 (gfc_simplify_range): Removed unused result-variable. Whitespace fix.
3456 (gfc_simplify_real): Use convert_boz() and gfc_convert_constant().
3457 (gfc_simplify_realpart): Whitespace fix.
3458 (gfc_simplify_selected_char_kind): Removed unused result-variable.
3459 (gfc_simplify_selected_int_kind): Removed unused result-variable.
3460 (gfc_simplify_selected_real_kind): Removed unused result-variable.
3461 (gfc_simplify_sign): Whitespace fix.
3462 (gfc_simplify_sin): Whitespace fix.
3463 (gfc_simplify_sinh): Replaced if-gate by more common switch-over-type.
3464 (gfc_simplify_sqrt): Avoided goto by inlining check. Whitespace fix.
3465 (gfc_simplify_tan): Replaced if-gate by more common switch-over-type.
3466 (gfc_simplify_tanh): Replaced if-gate by more common switch-over-type.
3467 (gfc_simplify_xor): Replaced if-gate by more common switch-over-type.
3469 2010-04-12 Daniel Franke <franke.daniel@gmail.com>
3471 * gfortran.h (gfc_start_constructor): Removed.
3472 (gfc_get_array_element): Removed.
3473 * array.c (gfc_start_constructor): Removed, use gfc_get_array_expr
3474 instead. Fixed all callers.
3475 (extract_element): Removed.
3476 (gfc_expand_constructor): Temporarily removed check for
3477 max-array-constructor. Will be re-introduced later if still required.
3478 (gfc_get_array_element): Removed, use gfc_constructor_lookup_expr
3479 instead. Fixed all callers.
3480 * expr.c (find_array_section): Replaced manual lookup of elements
3481 by gfc_constructor_lookup.
3483 2010-04-12 Daniel Franke <franke.daniel@gmail.com>
3485 * gfortran.h (gfc_get_null_expr): New prototype.
3486 (gfc_get_operator_expr): New prototype.
3487 (gfc_get_character_expr): New prototype.
3488 (gfc_get_iokind_expr): New prototype.
3489 * expr.c (gfc_get_null_expr): New.
3490 (gfc_get_character_expr): New.
3491 (gfc_get_iokind_expr): New.
3492 (gfc_get_operator_expr): Moved here from matchexp.c (build_node).
3493 * matchexp.c (build_node): Renamed and moved to
3494 expr.c (gfc_get_operator_expr). Reordered arguments to match
3495 other functions. Fixed all callers.
3496 (gfc_get_parentheses): Use specific function to build expr.
3497 * array.c (gfc_match_array_constructor): Likewise.
3498 * arith.c (eval_intrinsic): Likewise.
3499 (gfc_hollerith2int): Likewise.
3500 (gfc_hollerith2real): Likewise.
3501 (gfc_hollerith2complex): Likewise.
3502 (gfc_hollerith2logical): Likewise.
3503 * data.c (create_character_intializer): Likewise.
3504 * decl.c (gfc_match_null): Likewise.
3505 (enum_initializer): Likewise.
3506 * io.c (gfc_match_format): Likewise.
3507 (match_io): Likewise.
3508 * match.c (gfc_match_nullify): Likewise.
3509 * primary.c (match_string_constant): Likewise.
3510 (match_logical_constant): Likewise.
3511 (build_actual_constructor): Likewise.
3512 * resolve.c (build_default_init_expr): Likewise.
3513 * symbol.c (generate_isocbinding_symbol): Likewise.
3514 (gfc_build_class_symbol): Likewise.
3515 (gfc_find_derived_vtab): Likewise.
3516 * simplify.c (simplify_achar_char): Likewise.
3517 (gfc_simplify_adjustl): Likewise.
3518 (gfc_simplify_adjustr): Likewise.
3519 (gfc_simplify_and): Likewise.
3520 (gfc_simplify_bit_size): Likewise.
3521 (gfc_simplify_is_iostat_end): Likewise.
3522 (gfc_simplify_is_iostat_eor): Likewise.
3523 (gfc_simplify_isnan): Likewise.
3524 (simplify_bound): Likewise.
3525 (gfc_simplify_leadz): Likewise.
3526 (gfc_simplify_len_trim): Likewise.
3527 (gfc_simplify_logical): Likewise.
3528 (gfc_simplify_maxexponent): Likewise.
3529 (gfc_simplify_minexponent): Likewise.
3530 (gfc_simplify_new_line): Likewise.
3531 (gfc_simplify_null): Likewise.
3532 (gfc_simplify_or): Likewise.
3533 (gfc_simplify_precision): Likewise.
3534 (gfc_simplify_repeat): Likewise.
3535 (gfc_simplify_scan): Likewise.
3536 (gfc_simplify_size): Likewise.
3537 (gfc_simplify_trailz): Likewise.
3538 (gfc_simplify_trim): Likewise.
3539 (gfc_simplify_verify): Likewise.
3540 (gfc_simplify_xor): Likewise.
3541 * trans-io.c (build_dt): Likewise.
3542 (gfc_new_nml_name_expr): Removed.
3544 2010-04-12 Daniel Franke <franke.daniel@gmail.com>
3546 * arith.h (gfc_constant_result): Removed prototype.
3547 * constructor.h (gfc_build_array_expr): Removed prototype.
3548 (gfc_build_structure_constructor_expr): Removed prototype.
3549 * gfortran.h (gfc_int_expr): Removed prototype.
3550 (gfc_logical_expr): Removed prototype.
3551 (gfc_get_array_expr): New prototype.
3552 (gfc_get_structure_constructor_expr): New prototype.
3553 (gfc_get_constant_expr): New prototype.
3554 (gfc_get_int_expr): New prototype.
3555 (gfc_get_logical_expr): New prototype.
3556 * arith.c (gfc_constant_result): Moved and renamed to
3557 expr.c (gfc_get_constant_expr). Fixed all callers.
3558 * constructor.c (gfc_build_array_expr): Moved and renamed to
3559 expr.c (gfc_get_array_expr). Split gfc_typespec argument to type
3560 and kind. Fixed all callers.
3561 (gfc_build_structure_constructor_expr): Moved and renamed to
3562 expr.c (gfc_get_structure_constructor_expr). Split gfc_typespec argument
3563 to type and kind. Fixed all callers.
3564 * expr.c (gfc_logical_expr): Renamed to ...
3565 (gfc_get_logical_expr): ... this. Added kind argument. Fixed all callers.
3566 (gfc_int_expr): Renamed to ...
3567 (gfc_get_int_expr): ... this. Added kind and where arguments. Fixed all
3569 (gfc_get_constant_expr): New.
3570 (gfc_get_array_expr): New.
3571 (gfc_get_structure_constructor_expr): New.
3572 * simplify.c (int_expr_with_kind): Removed, callers use gfc_get_int_expr
3575 2010-04-12 Daniel Franke <franke.daniel@gmail.com>
3577 * constructor.h: New.
3578 * constructor.c: New.
3579 * Make-lang.in: Add new files to F95_PARSER_OBJS.
3580 * arith.c (reducy_unary): Use constructor API.
3581 (reduce_binary_ac): Likewise.
3582 (reduce_binary_ca): Likewise.
3583 (reduce_binary_aa): Likewise.
3584 * check.c (gfc_check_pack): Likewise.
3585 (gfc_check_reshape): Likewise.
3586 (gfc_check_unpack): Likewise.
3587 * decl.c (add_init_expr_to_sym): Likewise.
3588 (build_struct): Likewise.
3589 * dependency.c (gfc_check_dependency): Likewise.
3590 (contains_forall_index_p): Likewise.
3591 * dump-parse-tree.c (show_constructor): Likewise.
3592 * expr.c (free_expr0): Likewise.
3593 (gfc_copy_expr): Likewise.
3594 (gfc_is_constant_expr): Likewise.
3595 (simplify_constructor): Likewise.
3596 (find_array_element): Likewise.
3597 (find_component_ref): Likewise.
3598 (find_array_section): Likewise.
3599 (find_substring_ref): Likewise.
3600 (simplify_const_ref): Likewise.
3601 (scalarize_intrinsic_call): Likewise.
3602 (check_alloc_comp_init): Likewise.
3603 (gfc_default_initializer): Likewise.
3604 (gfc_traverse_expr): Likewise.
3605 * iresolve.c (check_charlen_present): Likewise.
3606 (gfc_resolve_reshape): Likewise.
3607 (gfc_resolve_transfer): Likewise.
3608 * module.c (mio_constructor): Likewise.
3609 * primary.c (build_actual_constructor): Likewise.
3610 (gfc_match_structure_constructor): Likewise.
3611 * resolve.c (resolve_structure_cons): Likewise.
3612 * simplify.c (is_constant_array_expr): Likewise.
3613 (init_result_expr): Likewise.
3614 (transformational_result): Likewise.
3615 (simplify_transformation_to_scalar): Likewise.
3616 (simplify_transformation_to_array): Likewise.
3617 (gfc_simplify_dot_product): Likewise.
3618 (simplify_bound): Likewise.
3619 (simplify_matmul): Likewise.
3620 (simplify_minval_maxval): Likewise.
3621 (gfc_simplify_pack): Likewise.
3622 (gfc_simplify_reshape): Likewise.
3623 (gfc_simplify_shape): Likewise.
3624 (gfc_simplify_spread): Likewise.
3625 (gfc_simplify_transpose): Likewise.
3626 (gfc_simplify_unpack): Likewise.q
3627 (gfc_convert_constant): Likewise.
3628 (gfc_convert_char_constant): Likewise.
3629 * target-memory.c (size_array): Likewise.
3630 (encode_array): Likewise.
3631 (encode_derived): Likewise.
3632 (interpret_array): Likewise.
3633 (gfc_interpret_derived): Likewise.
3634 (expr_to_char): Likewise.
3635 (gfc_merge_initializers): Likewise.
3636 * trans-array.c (gfc_get_array_constructor_size): Likewise.
3637 (gfc_trans_array_constructor_value): Likewise.
3638 (get_array_ctor_strlen): Likewise.
3639 (gfc_constant_array_constructor_p): Likewise.
3640 (gfc_build_constant_array_constructor): Likewise.
3641 (gfc_trans_array_constructor): Likewise.
3642 (gfc_conv_array_initializer): Likewise.
3643 * trans-decl.c (check_constant_initializer): Likewise.
3644 * trans-expr.c (flatten_array_ctors_without_strlen): Likewise.
3645 (gfc_apply_interface_mapping_to_cons): Likewise.
3646 (gfc_trans_structure_assign): Likewise.
3647 (gfc_conv_structure): Likewise.
3648 * array.c (check_duplicate_iterator): Likewise.
3649 (match_array_list): Likewise.
3650 (match_array_cons_element): Likewise.
3651 (gfc_match_array_constructor): Likewise.
3652 (check_constructor_type): Likewise.
3653 (check_constructor): Likewise.
3655 (expand_constructor): Likewise.
3656 (extract_element): Likewise.
3657 (gfc_expanded_ac): Likewise.
3658 (resolve_array_list): Likewise.
3659 (gfc_resolve_character_array_constructor): Likewise.
3660 (copy_iterator): Renamed to ...
3661 (gfc_copy_iterator): ... this.
3662 (gfc_append_constructor): Removed.
3663 (gfc_insert_constructor): Removed unused function.
3664 (gfc_get_constructor): Removed.
3665 (gfc_free_constructor): Removed.
3666 (qgfc_copy_constructor): Removed.
3667 * gfortran.h (struct gfc_expr): Removed member 'con_by_offset'.
3668 Removed all references. Replaced constructor list by splay-tree.
3669 (struct gfc_constructor): Removed member 'next', moved 'offset' from
3670 the inner struct, added member 'base'.
3671 (gfc_append_constructor): Removed prototype.
3672 (gfc_insert_constructor): Removed prototype.
3673 (gfc_get_constructor): Removed prototype.
3674 (gfc_free_constructor): Removed prototype.
3675 (qgfc_copy_constructor): Removed prototype.
3676 (gfc_copy_iterator): New prototype.
3677 * trans-array.h (gfc_constant_array_constructor_p): Adjusted prototype.
3679 2010-04-10 Tobias Burnus <burnus@net-b.de>
3682 * expr.c (gfc_is_constant_expr, gfc_traverse_expr): Handle
3683 proc-pointers and type-bound procedures.
3684 (gfc_specification_expr): Check proc-pointers for pureness.
3686 2010-04-09 Iain Sandoe <iains@gcc.gnu.org>
3689 * gfortranspec.c (lang_specific_driver): Do not expose vars
3690 only used by HAVE_LD_STATIC_DYNAMIC targets unless compiling
3693 2010-04-09 Tobias Burnus <burnus@net-b.de>
3696 * decl.c (variable_decl, match_attr_spec): Fix setting the array
3698 * array.c (match_subscript,gfc_match_array_ref): Add coarray support.
3699 * data.c (gfc_assign_data_value): Ditto.
3700 * expr.c (gfc_check_pointer_assign): Add check for coarray constraint.
3701 (gfc_traverse_expr): Traverse also through codimension expressions.
3702 (gfc_is_coindexed, gfc_has_ultimate_allocatable,
3703 gfc_has_ultimate_pointer): New functions.
3704 * gfortran.h (gfc_array_ref_dimen_type): Add DIMEN_STAR for coarrays.
3705 (gfc_array_ref): Add codimen.
3706 (gfc_array_ref): Add in_allocate.
3707 (gfc_is_coindexed, gfc_has_ultimate_allocatable,
3708 gfc_has_ultimate_pointer): Add prototypes.
3709 * interface.c (compare_parameter, compare_actual_formal,
3710 check_intents): Add coarray constraints.
3711 * match.c (gfc_match_iterator): Add coarray constraint.
3712 * match.h (gfc_match_array_ref): Update interface.
3713 * primary.c (gfc_match_varspec): Handle codimensions.
3714 * resolve.c (coarray_alloc, inquiry_argument): New static variables.
3715 (check_class_members): Return gfc_try instead for error recovery.
3716 (resolve_typebound_function,resolve_typebound_subroutine,
3717 check_members): Handle return value of check_class_members.
3718 (resolve_structure_cons, resolve_actual_arglist, resolve_function,
3719 check_dimension, compare_spec_to_ref, resolve_array_ref,
3720 resolve_ref, resolve_variable, gfc_resolve_expr, conformable_arrays,
3721 resolve_allocate_expr, resolve_ordinary_assign): Add coarray
3723 * trans-array.c (gfc_conv_array_ref, gfc_walk_variable_expr):
3724 Skip over coarray refs.
3725 (gfc_array_allocate) Add support for references containing coindexes.
3726 * trans-expr.c (gfc_add_interface_mapping): Copy coarray attribute.
3727 (gfc_map_intrinsic_function): Ignore codimensions.
3729 2010-04-08 Bud Davis <bdavis9659@sbcglobal.net>
3732 * io.c (check_format_string): Added check for additional non
3733 blank characters after the format string was successfully
3735 * io.c (check_format): Changed the error messages for positive
3736 int required and period required to drop through the error logic
3737 and report with gfc_error instead of gfc_error_now. Corrected
3738 format postion for hollerith strings.
3740 2010-04-08 Tobias Burnus <burnus@net-b.de>
3742 * module.c (use_iso_fortran_env_module): Fix standard check.
3744 2010-04-07 Jakub Jelinek <jakub@redhat.com>
3746 * parse.c (parse_derived, parse_enum): Avoid set but not used
3749 2010-04-07 Janne Blomqvist <jb@gcc.gnu.org>
3752 * gfortran.texi: Add section about representation of
3755 2010-04-07 Simon Baldwin <simonb@google.com>
3757 * cpp.c (cb_cpp_error): Add warning reason argument, set a value
3758 for diagnostic_override_option_index if CPP_W_WARNING_DIRECTIVE.
3760 2010-04-07 Richard Guenther <rguenther@suse.de>
3762 * options.c (gfc_init_options): Do not set.
3764 2010-04-06 Tobias Burnus <burnus@net-b.de>
3767 * array.c (gfc_match_array_spec): Add error for -fcoarray=none.
3768 * match.c (gfc_match_critical, sync_statement): Ditto.
3769 * gfortran.h (gfc_fcoarray): New enum.
3770 (gfc_option_t): Use it.
3771 * lang.opt (fcoarray): Add new flag.
3772 * invoke.texi (fcoarray): Document it.
3773 * options.c (gfc_init_options,gfc_handle_option): Handle -fcoarray=.
3774 (gfc_handle_coarray_option): New function.
3776 2010-04-06 Tobias Burnus <burnus@net-b.de>
3779 * gfortran.h (gfc_array_spec): Add cotype.
3780 * array.c (gfc_match_array_spec,gfc_set_array_spec): Use it
3781 and defer error diagnostic.
3782 * resolve.c (resolve_fl_derived): Add missing check.
3783 (resolve_symbol): Add cotype/type check.
3784 * parse.c (parse_derived): Fix setting of coarray_comp.
3786 2010-04-06 Tobias Burnus <burnus@net-b.de>
3789 * array.c (gfc_free_array_spec,gfc_resolve_array_spec,
3790 match_array_element_spec,gfc_copy_array_spec,
3791 gfc_compare_array_spec): Include corank.
3792 (match_array_element_spec,gfc_set_array_spec): Support codimension.
3793 * decl.c (build_sym,build_struct,variable_decl,
3794 match_attr_spec,attr_decl1,cray_pointer_decl,
3795 gfc_match_volatile): Add codimension.
3796 (gfc_match_codimension): New function.
3797 * dump-parse-tree.c (show_array_spec,show_attr): Support codimension.
3798 * gfortran.h (symbol_attribute,gfc_array_spec): Ditto.
3799 (gfc_add_codimension): New function prototype.
3800 * match.h (gfc_match_codimension): New function prototype.
3801 (gfc_match_array_spec): Update prototype
3802 * match.c (gfc_match_common): Update gfc_match_array_spec call.
3803 * module.c (MOD_VERSION): Bump.
3804 (mio_symbol_attribute): Support coarray attributes.
3805 (mio_array_spec): Add corank support.
3806 * parse.c (decode_specification_statement,decode_statement,
3807 parse_derived): Add coarray support.
3808 * resolve.c (resolve_formal_arglist, was_declared,
3809 is_non_constant_shape_array, resolve_fl_variable,
3810 resolve_fl_derived, resolve_symbol): Add coarray support.
3811 * symbol.c (check_conflict, gfc_add_volatile, gfc_copy_attr,
3812 gfc_build_class_symbol): Add coarray support.
3813 (gfc_add_codimension): New function.
3815 2010-04-06 Tobias Burnus <burnus@net-b.de>
3818 * iso-fortran-env.def: Add the integer parameters atomic_int_kind,
3819 atomic_logical_kind, iostat_inquire_internal_unit, stat_locked,
3820 stat_locked_other_image, stat_stopped_image and stat_unlocked of
3822 * intrinsic.texi (iso_fortran_env): Ditto.
3823 * libgfortran.h (libgfortran_stat_codes): New enum.
3824 * module.c (use_iso_fortran_env_module): Honour -std= when loading
3825 constants from the intrinsic module.
3827 2010-04-06 Tobias Burnus <burnus@net-b.de>
3830 * intrinsic.c (add_functions): Add num_images.
3831 * decl.c (gfc_match_end): Handle END CRITICAL.
3832 * intrinsic.h (gfc_simplify_num_images): Add prototype.
3833 * dump-parse-tree.c (show_code_node): Dump CRITICAL, ERROR STOP,
3835 * gfortran.h (gfc_statement): Add enum items for those.
3836 (gfc_exec_op) Ditto.
3837 (gfc_isym_id): Add num_images.
3838 * trans-stmt.c (gfc_trans_stop): Handle ERROR STOP.
3839 (gfc_trans_sync,gfc_trans_critical): New functions.
3840 * trans-stmt.h (gfc_trans_stop,gfc_trans_sync,
3841 gfc_trans_critical): Add/update prototypes.
3842 * trans.c (gfc_trans_code): Handle CRITICAL, ERROR STOP,
3843 and SYNC statements.
3844 * trans.h (gfor_fndecl_error_stop_string) Add variable.
3845 * resolve.c (resolve_sync): Add function.
3846 (gfc_resolve_blocks): Handle CRITICAL.
3847 (resolve_code): Handle CRITICAL, ERROR STOP,
3848 (resolve_branch): Add CRITICAL constraint check.
3849 and SYNC statements.
3850 * st.c (gfc_free_statement): Add new statements.
3851 * trans-decl.c (gfor_fndecl_error_stop_string): Global variable.
3852 (gfc_build_builtin_function_decls): Initialize it.
3853 * match.c (gfc_match_if): Handle ERROR STOP and SYNC.
3854 (gfc_match_critical, gfc_match_error_stop, sync_statement,
3855 gfc_match_sync_all, gfc_match_sync_images, gfc_match_sync_memory):
3857 (match_exit_cycle): Handle CRITICAL constraint.
3858 (gfc_match_stopcode): Handle ERROR STOP.
3859 * match.h (gfc_match_critical, gfc_match_error_stop,
3860 gfc_match_sync_all, gfc_match_sync_images,
3861 gfc_match_sync_memory): Add prototype.
3862 * parse.c (decode_statement, gfc_ascii_statement,
3863 parse_executable): Handle new statements.
3864 (parse_critical_block): New function.
3865 * parse.h (gfc_compile_state): Add COMP_CRITICAL.
3866 * intrinsic.texi (num_images): Document new function.
3867 * simplify.c (gfc_simplify_num_images): Add function.
3869 2010-04-06 Tobias Burnus <burnus@net-b.de>
3872 * trans-array.c (gfc_conv_expr_descriptor): Update
3873 gfc_trans_scalar_assign call.
3874 (has_default_initializer): New function.
3875 (gfc_trans_deferred_array): Nullify less often.
3876 * trans-expr.c (gfc_conv_subref_array_arg,
3877 gfc_trans_subcomponent_assign): Update call to
3878 gfc_trans_scalar_assign.
3879 (gfc_trans_scalar_assign): Add parameter and pass it on.
3880 (gfc_trans_assignment_1): Optionally, do not dealloc before
3882 * trans-openmp.c (gfc_trans_omp_array_reduction): Update
3883 call to gfc_trans_scalar_assign.
3884 * trans-decl.c (gfc_get_symbol_decl): Do not always apply
3885 initializer to static variables.
3886 (gfc_init_default_dt): Add dealloc parameter and pass it on.
3887 * trans-stmt.c (forall_make_variable_temp,
3888 generate_loop_for_temp_to_lhs, generate_loop_for_rhs_to_temp,
3889 gfc_trans_forall_1, gfc_trans_where_assign, gfc_trans_where_3
3890 gfc_trans_allocate): Update gfc_trans_assignment call.
3891 * trans.h (gfc_trans_scalar_assign, gfc_init_default_dt,
3892 gfc_init_default_dt, gfc_trans_assignment): Add bool dealloc