1 2009-06-08 Paul Thomas <pault@gcc.gnu.org>
3 * trans-array.h : Replace prototypes for
4 gfc_conv_descriptor_offset, gfc_conv_descriptor_stride,
5 gfc_conv_descriptor_lbound, gfc_conv_descriptor_ubound with new
6 prototypes of the same names with _get or _set appended.
7 * trans-array.c : Make the originals of the above static and
8 new functions for the _get and _set functions. Update all the
9 references to these descriptor access functions.
10 * trans-expr.c : Update references to the above descriptor
12 * trans-intrinsic.c : The same.
13 * trans-openmp.c : The same.
14 * trans-stmt.c : The same.
16 2009-06-08 Alexandre Oliva <aoliva@redhat.com>
18 * options.c (gfc_post_options): Disable dump_parse_tree
19 during -fcompare-debug-second.
21 2009-06-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
24 * gfortran.h (gfc_open): Add newunit expression to structure.
25 * io.c (io_tag): Add new unit tag and fix whitespace.
26 (match_open_element): Add matching for newunit.
27 (gfc_free_open): Free the newunit expression.
28 (gfc_resolve_open): Add newunit to resolution and check constraints.
29 (gfc_resolve_close): Add check for non-negative unit.
30 (gfc_resolve_filepos): Likewise.
31 (gfc_resolve_dt): Likewise.
32 * trans-io.c (set_parameter_value): Build runtime checks for unit
33 numbers within range of kind=4 integer. (gfc_trans_open) Set the
35 * ioparm.def (IOPARM): Define the newunit parameter as a pointer
36 to GFC_INTEGER_4, pint4.
38 2009-06-07 Daniel Franke <franke.daniel@gmail.com>
42 * array.c (gfc_append_constructor): Added NULL-check.
43 * check.c (gfc_check_spread): Check DIM.
44 (gfc_check_unpack): Check that the ARRAY arguments provides enough
46 * intrinsic.h (gfc_simplify_spread): New prototype.
47 (gfc_simplify_unpack): Likewise.
48 * intrinsic.c (add_functions): Added new simplifier callbacks.
49 * simplify.c (gfc_simplify_spread): New.
50 (gfc_simplify_unpack): New.
51 * expr.c (check_transformational): Allow additional transformational
52 intrinsics in initialization expression.
54 2009-06-07 Daniel Franke <franke.daniel@gmail.com>
58 * check.c (gfc_check_all_any): Check rank of DIM.
59 (gfc_check_count): Likewise.
60 * intrinsic.h (gfc_simplify_all): New prototype.
61 (gfc_simplify_any): Likewise.
62 (gfc_simplify_count): Likewise.
63 (gfc_simplify_sum): Likewise.
64 (gfc_simplify_product): Likewise.
65 * intrinsic.c (add_functions): Added new simplifier callbacks.
66 * simplify.c (transformational_result): New.
67 (simplify_transformation_to_scalar): New.
68 (simplify_transformation_to_array): New.
70 (gfc_simplify_all): New.
71 (gfc_simplify_any): New.
72 (gfc_simplify_count): New.
73 (gfc_simplify_sum): New.
74 (gfc_simplify_product): New.
75 * expr.c (check_transformational): Allow additional transformational
76 intrinsics in initialization expression.
78 2009-06-07 Daniel Franke <franke.daniel@gmail.com>
80 * check.c (dim_rank_check): Return SUCCESS if DIM=NULL.
81 (gfc_check_lbound): Removed (now) redundant check for DIM=NULL.
82 (gfc_check_minloc_maxloc): Likewise.
83 (check_reduction): Likewise.
84 (gfc_check_size): Likewise.
85 (gfc_check_ubound): Likewise.
86 (gfc_check_cshift): Added missing shape-conformance checks.
87 (gfc_check_eoshift): Likewise.
88 * gfortran.h (gfc_check_conformance): Modified prototype to printf-style.
89 * expr.c (gfc_check_conformance): Accept error-message chunks in
90 printf-style. Changed all callers.
93 2009-06-07 Daniel Franke <franke.daniel@gmail.com>
97 * intrinsic.h (gfc_simplify_dot_product): New prototype.
98 (gfc_simplify_matmul): Likewise.
99 (gfc_simplify_transpose): Likewise.
100 * intrinsic.c (add_functions): Added new simplifier callbacks.
101 * simplify.c (init_result_expr): New.
102 (compute_dot_product): New.
103 (gfc_simplify_dot_product): New.
104 (gfc_simplify_matmul): New.
105 (gfc_simplify_transpose): New.
106 * expr.c (check_transformational): Allow transformational intrinsics
107 with simplifier in initialization expression.
109 2009-06-06 Daniel Franke <franke.daniel@gmail.com>
112 * simplify.c (gfc_simplify_reshape): Fixed reshaping of empty arrays
115 2009-06-06 Daniel Franke <franke.daniel@gmail.com>
118 * intrinsic.h (gfc_simplify_pack): New prototype.
119 * intrinsic.c (add_functions): Added
120 simplifier-callback to PACK.
121 * simplify.c (is_constant_array_expr): Moved
122 to beginning of file.
123 (gfc_simplify_pack): New.
124 * check.c (gfc_check_pack): Check that VECTOR has enough elements.
125 Added safeguards for empty arrays.
127 2009-06-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
129 * simplify.c (call_mpc_func): Use mpc_realref/mpc_imagref
130 instead of MPC_RE/MPC_IM.
132 2009-06-05 Alexandre Oliva <aoliva@redhat.com>
134 * trans-decl.c (gfc_build_qualified_array): Don't skip generation
136 * trans.h (struct lang_type): Add base_decls.
137 (GFC_TYPE_ARRAY_BASE_DECL): New.
138 * trans-types.c (gfc_get_array_type_bounds): Initialize base decls
139 proactively and excessively.
140 (gfc_get_array_descr_info): Use existing base decls if available.
142 2009-06-04 Daniel Franke <franke.daniel@gmail.com>
145 * check.c (gfc_check_reshape): Additional checks for the
146 SHAPE and ORDER arguments.
147 * simplify.c (gfc_simplify_reshape): Converted argument checks
150 2009-06-03 Tobias Burnus <burnus@net-b.de>
152 * gfortran.texi: Add mixed-language programming, mention
153 varying string lengths, some clean up of introduction parts.
154 * intrinsic.texi (instrinsic modules): Create @menu for subsections.
155 (ISO_C_BINDING): Support ISOCBINDING_INT_FAST128_T.
156 * libgfortran.h: Comment to rember to keep gfortran.texi in sync.
157 * iso-c-binding.def: Support ISOCBINDING_INT_FAST128_T.
159 2009-06-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
160 Tobias Burnus <burnus@net-b.de>
162 * iso-c-binding.def: Use INTMAX_TYPE instead of intmax_type_node.
163 * trans-types.c (init_c_interop_kinds): Remove intmax_type_node.
165 2009-06-03 Alexandre Oliva <aoliva@redhat.com>
167 * module.c (mio_f2k_derived): Initialize cur.
169 2009-06-01 Tobias Burnus <burnus@net-b.de>
172 * trans-decl.c (gfc_sym_identifier): Use "MAIN__" for PROGRAM "main".
173 (create_main_function): Set main_identifier_node.
175 2009-05-29 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
178 * trans-types.c (gfc_build_uint_type): Make nonstatic.
179 * trans.h (gfor_fndecl_clz128, gfor_fndecl_ctz128): New prototypes.
180 * trans-types.h (gfc_build_uint_type): Add prototype.
181 * trans-decl.c (gfc_build_intrinsic_function_decls): Build
182 gfor_fndecl_clz128 and gfor_fndecl_ctz128.
183 * trans-intrinsic.c (gfc_conv_intrinsic_leadz,
184 gfc_conv_intrinsic_trailz): Call the right builtins or library
185 functions, and cast arguments to unsigned types first.
186 * simplify.c (gfc_simplify_leadz): Deal with negative arguments.
188 2009-05-27 Ian Lance Taylor <iant@google.com>
190 * Make-lang.in (gfortran$(exeext)): Change $(COMPILER) to
192 (f951$(exeext)): Likewise.
194 2009-05-27 Tobias Burnus <burnus@net-b.de>
197 * trans-decl.c (create_main_function): Mark MAIN__ and
198 argc/argv as TREE_USED and push/pop function_decl context
201 2009-05-26 Tobias Burnus <burnus@net-b.de>
204 * gfortranspec.c (lang_specific_driver): Stop linking
206 * trans-decl.c (gfc_build_builtin_function_decls): Stop
207 making MAIN__ publicly visible.
208 (gfc_build_builtin_function_decls): Add
209 gfor_fndecl_set_args.
210 (create_main_function) New function.
211 (gfc_generate_function_code): Use it.
213 2009-05-26 Tobias Burnus <burnus@net-b.de>
216 * match.c (gfc_match_nullify): NULLify freed pointer.
218 2009-05-26 Ian Lance Taylor <iant@google.com>
220 * Make-lang.in (gfortranspec.o): Use $(COMPILER).
221 (gfortran$(exeext), f951$(exeext), fortran/cpp.o): Likewise.
223 2009-05-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
225 * gfortran.h (GFC_MPC_RND_MODE): New.
226 * simplify.c (call_mpc_func): New helper function.
227 (gfc_simplify_cos, gfc_simplify_exp, gfc_simplify_log,
228 gfc_simplify_sin, gfc_simplify_sqrt): Add MPC support.
230 2009-05-25 Janus Weil <janus@gcc.gnu.org>
233 * primary.c (gfc_match_varspec): Handle procedure pointer components
234 with array return value.
235 * resolve.c (resolve_expr_ppc): Ditto.
236 (resolve_symbol): Make sure the interface of a procedure pointer has
238 * trans-array.c (gfc_walk_function_expr): Handle procedure pointer
239 components with array return value.
240 * trans-expr.c (gfc_conv_component_ref,gfc_conv_procedure_call,
241 gfc_trans_arrayfunc_assign): Ditto.
242 (gfc_trans_pointer_assignment): Handle procedure pointer assignments,
243 where the rhs is a dummy argument.
244 * trans-types.c (gfc_get_ppc_type,gfc_get_derived_type): Handle
245 procedure pointer components with array return value.
247 2009-05-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
252 * trans-array.c (gfc_conv_ss_startstride): Add one to index.
254 2009-05-22 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
257 * module.c (read_md5_from_module_file): Close file before returning.
259 2009-05-18 Janus Weil <janus@gcc.gnu.org>
262 * primary.c (gfc_match_rvalue): Handle procedure pointer components in
264 * resolve.c (resolve_ppc_call,resolve_expr_ppc): Resolve component and
266 (resolve_fl_derived): Procedure pointer components are not required to
267 have constant array bounds in their return value.
269 2009-05-18 Janus Weil <janus@gcc.gnu.org>
271 * intrinsic.c (add_sym): Fix my last commit (r147655),
272 which broke bootstrap.
274 2009-05-18 Richard Guenther <rguenther@suse.de>
277 * trans-expr.c (gfc_trans_zero_assign): For local array
278 destinations use an assignment from an empty constructor.
280 2009-05-18 Janus Weil <janus@gcc.gnu.org>
284 * expr.c (gfc_check_pointer_assign): Check intents when comparing
286 * gfortran.h (typedef struct gfc_intrinsic_arg): Add 'intent' member.
287 (gfc_compare_interfaces): Additional argument.
288 * interface.c (operator_correspondence): Add check for equality of
289 intents, and new argument 'intent_check'.
290 (gfc_compare_interfaces): New argument 'intent_check', which is passed
291 on to operator_correspondence.
292 (check_interface1): Don't check intents when comparing interfaces.
293 (compare_parameter): Do check intents when comparing interfaces.
294 * intrinsic.c (add_sym): Add intents for arguments of intrinsic
296 (add_sym_1,add_sym_1s,add_sym_1m,add_sym_2,add_sym_2s,add_sym_3,
297 add_sym_3ml,add_sym_3red,add_sym_3s,add_sym_4): Use INTENT_IN by
299 (add_sym_1_intent,add_sym_1s_intent,add_sym_2s_intent,add_sym_3s_intent)
300 : New functions to add intrinsic symbols, specifying custom intents.
301 (add_sym_4s,add_sym_5s): Add new arguments to specify intents.
302 (add_functions,add_subroutines): Add intents for various intrinsics.
303 * resolve.c (check_generic_tbp_ambiguity): Don't check intents when
304 comparing interfaces.
305 * symbol.c (gfc_copy_formal_args_intr): Copy intent.
307 2009-05-17 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
309 * iso-fortran-env.def: Define INT8, INT16, INT32, INT64, REAL32,
311 * gfortran.h (gfc_get_int_kind_from_width_isofortranenv,
312 gfc_get_real_kind_from_width_isofortranenv): New prototypes.
313 * iso-c-binding.def: Update definitions for the INT*_T,
314 INT_LEAST*_T and INT_FAST*_T named parameters.
315 * trans-types.c (get_typenode_from_name, get_int_kind_from_name,
316 gfc_get_real_kind_from_width_isofortranenv): New functions.
318 2009-05-17 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
321 * intrinsic.c (add_functions, add_subroutines): Fix argument
322 names and wrap long lines.
323 * intrinsic.texi: Fix documentation and argument names of
324 LOG_GAMMA, DATAN2, DBESJN, DTIME, ETIME, FSTAT, STAT, LSTAT,
325 GET_COMMAND, IDATE, LTIME, MOVE_ALLOC, NINT, OR, PRODUCT,
326 SUM, RAND, RANDOM_SEED, REAL, SELECTED_INT_KIND,
327 SELECTED_REAL_KIND and XOR.
329 2009-05-16 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
332 * intrinsic.c (add_functions): Use ERFC_SCALED simplification.
333 * intrinsic.h (gfc_simplify_erfc_scaled): New prototype.
334 * simplify.c (fullprec_erfc_scaled, asympt_erfc_scaled,
335 gfc_simplify_erfc_scaled): New functions.
337 2009-05-16 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
340 * resolve.c (resolve_substring): Don't allow too large substring
342 (gfc_resolve_substring_charlen): Fix typo.
343 (gfc_resolve_character_operator): Fix typo.
344 (resolve_charlen): Catch unreasonably large string lengths.
345 * simplify.c (gfc_simplify_len): Don't error out on LEN
348 2009-05-16 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
351 * decl.c (set_enum_kind): Use global short-enums flag.
352 * gfortran.h (gfc_option_t): Remove short_enums flag.
353 * lang.opt (-fshort-enums): Refer to C documentation.
354 * options.c (gfc_init_options, gfc_handle_option): Use global
357 2009-05-15 Tobias Burnus <burnus@net-b.de>
360 * f95-lang.c: Add gfc_maybe_initialize_eh.
361 * gfortran.h: Add gfc_maybe_initialize_eh prototype.
362 * Make-lang.in: Add new .h dendencies for f95-lang.c
363 * openmp.c (resolve_omp_do): Call gfc_maybe_initialize_eh.
364 * misc.c (gfc_free): Avoid #define trickery for free.
366 2009-05-14 Steven G. Kargl <kargl@gcc.gnu.org>
368 * dump-parse-tree.c (show_code_node): Add ERRMSG to the dumping
369 of allocate and deallocate statements.
371 2009-05-14 Ian Lance Taylor <iant@google.com>
373 * decl.c (match_attr_spec): Change d to unsigned int.
374 * dump-parse-tree.c (show_namespace): Change op to int. Add cast.
375 * interface.c (gfc_check_interfaces): Change i to int. Add casts.
376 * module.c (read_module): Change i to int. Add cast.
377 (write_module): Change i to int.
378 * symbol.c (gfc_get_namespace): Change in to int.
379 (gfc_free_namespace): Change i to int.
380 * trans-io.c (gfc_build_io_library_fndecls): Change ptype to
381 unsigned int. Add cast.
382 * trans-types.c (gfc_init_kinds): Change mode to unsigned int.
385 2009-05-14 Daniel Kraft <d@domob.eu>
388 * dump-parse-tree.c (show_typebound): Fix missing adaption to new
389 type-bound procedure storage structure.
391 2009-05-14 Janus Weil <janus@gcc.gnu.org>
394 * decl.c (gfc_match_function_decl): Use gfc_add_type.
395 * symbol.c (gfc_add_type): Better checking for duplicate types in
396 function declarations. And: Always give an error for duplicte types,
397 not just a warning with -std=gnu.
399 2009-05-14 Jakub Jelinek <jakub@redhat.com>
402 * io.c (resolve_tag_format): CHARACTER array in FMT= argument
403 isn't an extension. Reject non-CHARACTER array element of
404 assumed shape or pointer or assumed size array.
405 * trans-array.c (array_parameter_size): New function.
406 (gfc_conv_array_parameter): Add size argument. Call
407 array_parameter_size if it is non-NULL.
408 * trans-array.h (gfc_conv_array_parameter): Adjust prototype.
409 * trans-expr.c (gfc_conv_function_call, gfc_trans_arrayfunc_assign):
411 * trans-intrinsic.c (gfc_conv_intrinsic_loc): Likewise.
412 * trans-io.c (gfc_convert_array_to_string): Rewritten.
414 2009-05-13 Steven G. Kargl <kargl@gcc.gnu.org>
416 * gfortran.h (gfc_code): Rename struct member expr to expr1.
417 * openmp.c (resolve_omp_atomic): Update expr to expr1.
418 * interface.c (gfc_extend_assign): Ditto.
419 * trans-expr.c (gfc_conv_expr_reference, gfc_trans_assignment,
420 gfc_trans_init_assign): Ditto.
421 * dump-parse-tree.c (show_code_node): Ditto.
422 * trans-openmp.c (gfc_trans_omp_atomic): Ditto.
423 * trans-stmt.c ( gfc_trans_label_assign, gfc_trans_goto, gfc_trans_call,
424 gfc_trans_return, gfc_trans_pause, gfc_trans_stop, gfc_trans_if_1,
425 gfc_trans_arithmetic_if, gfc_trans_do_while, gfc_trans_integer_select,
426 gfc_trans_logical_select, gfc_trans_character_select
427 forall_make_variable_temp, check_forall_dependencies
428 gfc_trans_forall_1, gfc_trans_where_2, gfc_trans_where_3
429 gfc_trans_where, gfc_trans_allocate, gfc_trans_deallocate): Ditto.
430 * io.c (match_io_element, gfc_match_inquire): Ditto.
431 * resolve.c (resolve_typebound_call, resolve_ppc_call,
432 resolve_allocate_expr, resolve_allocate_deallocate, resolve_select,
433 resolve_transfer, resolve_where, gfc_resolve_assign_in_forall,
434 gfc_resolve_blocks, resolve_code, build_init_assign): Ditto.
435 * st.c (gfc_free_statement): Ditto.
436 * match.c (gfc_match_assignment, gfc_match_pointer_assignment,
437 match_arithmetic_if, gfc_match_if, gfc_match_elseif
438 gfc_match_stopcode, gfc_match_assign, gfc_match_goto,
439 gfc_match_nullify, match_typebound_call, gfc_match_call
440 gfc_match_select, match_simple_where, gfc_match_where
441 gfc_match_elsewhere, match_simple_forall, gfc_match_forall): Ditto.
442 * trans-io.c (gfc_trans_transfer): Ditto.
443 * parse.c (parse_where_block, parse_if_block): Ditto.
445 2009-05-13 Steven G. Kargl <kargl@gcc.gnu.org>
447 * gfortran.h (gfc_code): Rename struct member label to label1.
448 * dump-parse-tree.c (show_code_node): Update symbol.
449 * trans-stmt.c (gfc_trans_label_assign, gfc_trans_goto,
450 gfc_trans_arithmetic_if): Ditto.
451 * resolve.c (gfc_resolve_blocks, resolve_code): Ditto.
452 * match.c (match_arithmetic_if, gfc_match_if, gfc_reference_st_label,
453 gfc_match_assign, gfc_match_goto): Ditto.
454 * parse.c (parse_do_block): Ditto.
456 2009-05-13 Tobias Burnus <burnus@net-b.de>
459 * gfortran.h (gfc_exec_op): Add EXEC_END_PROCEDURE.
460 * dump-parse-tree.c (show_code_node): Use EXEC_END_PROCEDURE.
461 * trans.c (gfc_trans_code): Ditto.
462 * resolve.c (resolve_code): Ditto.
463 * st.c (gfc_free_statement): Ditto.
464 * parse.c (accept_statement): Ditto.
466 2009-05-12 Tobias Burnus <burnus@net-b.de>
469 * decl.c (gfc_match_kind_spec): Turn C kind error into a warning.
471 2009-05-11 Steve Ellcey <sje@cup.hp.com>
473 * resolve.c (check_host_association): Initialize tail.
475 2009-05-11 Janus Weil <janus@gcc.gnu.org>
478 * resolve.c (resolve_fl_derived): Only return FAILURE if
479 gfc_notify_std fails.
481 2009-05-10 Ian Lance Taylor <iant@google.com>
483 * gfortran.h (enum gfc_omp_sched_kind): New enum, broken out of
485 (enum gfc_omp_default_sharing): Likewise.
486 * module.c (enum gfc_rsym_state): New enum, broken out of
488 (enum gfc_wsym_state): Likewise.
489 * parse.c (enum state_order): New enum, broken out of st_state.
491 2009-05-10 Paul Thomas <pault@gcc.gnu.org>
494 * trans-array.c (gfc_trans_array_constructor_value): Fold
495 convert numeric constants.
496 (gfc_build_constant_array_constructor): The same.
498 2009-05-10 Paul Thomas <pault@gcc.gnu.org>
501 * trans-expr.c (gfc_conv_operator_assign): Remove function.
502 * trans.h : Remove prototype for gfc_conv_operator_assign.
503 * trans-stmt.c (gfc_conv_elemental_dependencies): Initialize
504 derivde types with intent(out).
505 (gfc_trans_call): Add mask, count1 and invert arguments. Add
506 code to use mask for WHERE assignments.
507 (gfc_trans_forall_1): Use new arguments for gfc_trans_call.
508 (gfc_trans_where_assign): The gfc_symbol argument is replaced
509 by the corresponding code. If this has a resolved_sym, then
510 gfc_trans_call is called. The call to gfc_conv_operator_assign
512 (gfc_trans_where_2): Change the last argument in the call to
513 gfc_trans_where_assign.
514 * trans-stmt.h : Modify prototype for gfc_trans_call.
515 * trans.c (gfc_trans_code): Use new args for gfc_trans_call.
517 2009-05-08 Janus Weil <janus@gcc.gnu.org>
520 * intrinsic.c (gfc_is_intrinsic): Do not add the EXTERNAL attribute if
521 the symbol is a module procedure.
523 2009-05-08 Tobias Burnus <burnus@net-b.de>
525 * invoke.texi: Add do/recursion to the -fcheck= summary.
527 2009-05-07 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
530 * gfortran.texi: Document that we don't support variable FORMAT
533 2009-05-07 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
536 * error.c (error_print): Add missing break statement.
538 2009-05-07 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
541 * invoke.texi: Document that -fdollar-ok does not allow $ to be
542 used in IMPLICIT statement.
544 2009-05-06 Janus Weil <janus@gcc.gnu.org>
545 Paul Thomas <pault@gcc.gnu.org>
548 * decl.c (match_procedure_interface): New function to match the
549 interface for a PROCEDURE statement.
550 (match_procedure_decl): Call match_procedure_interface.
551 (match_ppc_decl): New function to match the declaration of a
552 procedure pointer component.
553 (gfc_match_procedure): Call match_ppc_decl.
554 (match_binding_attributes): Add new argument 'ppc' and handle the
555 POINTER attribute for procedure pointer components.
556 (match_procedure_in_type,gfc_match_generic): Added new argument to
557 match_binding_attributes.
558 * dump-parse-tree.c (show_expr,show_components,show_code_node): Handle
559 procedure pointer components.
560 * expr.c (free_expr0,gfc_copy_expr,gfc_simplify_expr): Handle EXPR_PPC.
561 (gfc_check_pointer_assign): Handle procedure pointer components, but no
563 (is_proc_ptr_comp): New function to determine if an expression is a
564 procedure pointer component.
565 * gfortran.h (expr_t): Add EXPR_PPC.
566 (symbol_attribute): Add new member 'proc_pointer_comp'.
567 (gfc_component): Add new member 'formal'.
568 (gfc_exec_op): Add EXEC_CALL_PPC.
569 (gfc_get_default_type): Changed first argument.
570 (is_proc_ptr_comp): Add prototype.
571 (gfc_match_varspec): Add new argument.
572 * interface.c (compare_actual_formal): Handle procedure pointer
574 * match.c (gfc_match_pointer_assignment,match_typebound_call): Handle
575 procedure pointer components.
576 * module.c (mio_expr): Handle EXPR_PPC.
577 * parse.c (parse_derived): Handle procedure pointer components.
578 * primary.c (gfc_match_varspec): Add new argument 'ppc_arg' and handle
579 procedure pointer components.
580 (gfc_variable_attr): Handle procedure pointer components.
581 (gfc_match_rvalue): Added new argument to gfc_match_varspec and changed
582 first argument of gfc_get_default_type.
583 (match_variable): Added new argument to gfc_match_varspec.
584 * resolve.c (resolve_entries,set_type,resolve_fl_parameter): Changed
585 first argument of gfc_get_default_type.
586 (resolve_structure_cons,resolve_actual_arglist): Handle procedure
588 (resolve_ppc_call): New function to resolve a call to a procedure
589 pointer component (subroutine).
590 (resolve_expr_ppc): New function to resolve a call to a procedure
591 pointer component (function).
592 (gfc_resolve_expr): Handle EXPR_PPC.
593 (resolve_code): Handle EXEC_CALL_PPC.
594 (resolve_fl_derived): Copy the interface for a procedure pointer
596 (resolve_symbol): Fix overlong line.
597 * st.c (gfc_free_statement): Handle EXEC_CALL_PPC.
598 * symbol.c (gfc_get_default_type): Changed first argument.
599 (gfc_set_default_type): Changed first argument of gfc_get_default_type.
600 (gfc_add_component): Initialize ts.type to BT_UNKNOWN.
601 * trans.h (gfc_conv_function_call): Renamed.
602 * trans.c (gfc_trans_code): Handle EXEC_CALL_PPC.
603 * trans-expr.c (gfc_conv_component_ref): Ditto.
604 (gfc_conv_function_val): Rename to 'conv_function_val', add new
605 argument 'expr' and handle procedure pointer components.
606 (gfc_conv_operator_assign): Renamed gfc_conv_function_val.
607 (gfc_apply_interface_mapping_to_expr): Handle EXPR_PPC.
608 (gfc_conv_function_call): Rename to 'gfc_conv_procedure_call', add new
609 argument 'expr' and handle procedure pointer components.
610 (gfc_get_proc_ptr_comp): New function to get the backend decl for a
611 procedure pointer component.
612 (gfc_conv_function_expr): Renamed gfc_conv_function_call.
613 (gfc_conv_structure): Handle procedure pointer components.
614 * trans-intrinsic.c (gfc_conv_intrinsic_funcall,
615 conv_generic_with_optional_char_arg): Renamed gfc_conv_function_call.
616 * trans-stmt.h (gfc_get_proc_ptr_comp): Add prototype.
617 * trans-stmt.c (gfc_trans_call): Renamed gfc_conv_function_call.
618 * trans-types.h (gfc_get_ppc_type): Add prototype.
619 * trans-types.c (gfc_get_ppc_type): New function to build a tree node
620 for a procedure pointer component.
621 (gfc_get_derived_type): Handle procedure pointer components.
623 2009-05-06 Tobias Burnus <burnus@net-b.de>
626 * resolve.c (resolve_symbol): Print no warning for implicitly
627 typed intrinsic functions.
629 2009-05-05 Janus Weil <janus@gcc.gnu.org>
632 * expr.c (gfc_check_pointer_assign): Check for statement functions and
633 internal procedures in procedure pointer assignments.
635 2009-04-28 Janus Weil <janus@gcc.gnu.org>
638 * resolve.c (resolve_symbol): Correctly copy the interface of a
639 PROCEDURE statement if the interface involves a RESULT variable.
641 2009-04-28 Janus Weil <janus@gcc.gnu.org>
645 * expr.c (gfc_check_pointer_assign): Correctly detect if the left hand
647 * parse.c (gfc_fixup_sibling_symbols): Don't check for ambiguity.
649 2009-04-28 Paul Thomas <pault@gcc.gnu.org>
652 * trans_expr.c (gfc_conv_procedure_call): Deep copy a derived
653 type parentheses argument if it is a variable with allocatable
656 2009-04-27 Ian Lance Taylor <iant@google.com>
658 * trans-intrinsic.c (DEFINE_MATH_BUILTIN): Add casts to enum
660 * trans-io.c (st_parameter_field): Add casts to enum type.
662 2009-04-26 Steven G. Kargl <kargl@gcc.gnu.org>
665 fortran/data.c (gfc_assign_data_value): If the lvalue is an
666 assumed character length entity in a data statement, then
667 return FAILURE to prevent segmentation fault.
669 2009-04-26 Jakub Jelinek <jakub@redhat.com>
671 * trans-decl.c: Include pointer-set.h.
672 (nonlocal_dummy_decl_pset, tree nonlocal_dummy_decls): New variables.
673 (gfc_nonlocal_dummy_array_decl): New function.
674 (gfc_get_symbol_decl): Call it for non-local dummy args with saved
676 (gfc_get_symbol_decl): Set DECL_BY_REFERENCE when needed.
677 (gfc_generate_function_code): Initialize nonlocal_dummy_decl{s,_pset},
678 chain it to outermost block's vars, destroy it afterwards.
679 * Make-lang.in (trans-decl.o): Depend on pointer-set.h.
681 2009-04-25 Janus Weil <janus@gcc.gnu.org>
684 * decl.c (gfc_match_import): Use 'sym->name' instead of 'name'.
685 They differ if the symbol has been use-renamed.
687 2009-04-24 Ian Lance Taylor <iant@google.com>
689 * gfortran.h (enum gfc_symbol_type): New named enum type, broken
690 out of struct gfc_symbol.
691 (struct gfc_symbol): Use enum gfc_symbol_type.
692 (enum gfc_array_ref_dimen_type): New named enum type, broken out
693 of struct gfc_array_ref).
694 (struct gfc_array_ref): Use enum gfc_array_ref_dimen_type.
695 (mod_pointee_as): Update declaration.
696 * decl.c (add_global_entry): Change type to enum gfc_symbol_type.
697 (gfc_mod_pointee_as): Change return type to "match".
698 * module.c (mio_array_ref): Add cast to enum type.
699 (mio_symbol): Likewise.
700 * resolve.c (resolve_global_procedure): Change type to enum
702 * trans-io.c (gfc_build_st_parameter): Change type to unsigned
705 2009-04-24 Daniel Kraft <d@domob.eu>
707 * gfortran.h (gfc_get_typebound_proc): Removed as macro, now a function.
708 (struct gfc_symtree): Moved "typebound" member inside union.
709 (struct gfc_namespace): Add "tb_sym_root" as new symtree to sort out
710 type-bound procedures there.
711 (gfc_get_tbp_symtree): New procedure.
712 * symbol.c (tentative_tbp_list): New global.
713 (gfc_get_namespace): NULL new "tb_sym_root" member.
714 (gfc_new_symtree): Removed initialization of "typebound" member.
715 (gfc_undo_symbols): Process list of tentative tbp's.
716 (gfc_commit_symbols): Ditto.
717 (free_tb_tree): New method.
718 (gfc_free_namespace): Call it.
719 (gfc_get_typebound_proc): New method.
720 (gfc_get_tbp_symtree): New method.
721 (gfc_find_typebound_proc): Adapt to structural changes of gfc_symtree
722 and gfc_namespace with regards to tbp's.
723 * dump-parse-tree.c (show_typebound): Ditto.
724 * primary.c (gfc_match_varspec): Ditto. Don't reference tbp-symbol
725 as it isn't a symbol any longer.
726 * module.c (mio_typebound_symtree): Adapt to changes.
727 (mio_typebound_proc): Ditto, create symtrees using "gfc_get_tbp_symtree"
728 rather than "gfc_get_sym_tree".
729 (mio_f2k_derived): Ditto.
730 * decl.c (match_procedure_in_type): Ditto.
731 (gfc_match_generic): Ditto. Don't reference tbp-symbol.
732 * resolve.c (check_typebound_override): Adapt to changes.
733 (resolve_typebound_generic): Ditto.
734 (resolve_typebound_procedures): Ditto.
735 (ensure_not_abstract_walker): Ditto.
736 (ensure_not_abstract): Ditto.
737 (resolve_typebound_procedure): Ditto, ignore erraneous symbols (for
738 instance, through removed tentative ones).
739 * gfc-internals.texi (Type-bound procedures): Document changes.
741 2009-04-24 Janus Weil <janus@gcc.gnu.org>
745 * symbol.c (gfc_copy_formal_args_intr): Set attr.flavor and attr.dummy
746 for the formal arguments.
748 2009-04-21 Taras Glek <tglek@mozilla.com>
750 * f95-lang.c: Update GTY annotations to new syntax.
751 * trans-intrinsic.c: Likewise.
752 * trans-io.c: Likewise.
755 2009-04-22 Janus Weil <janus@gcc.gnu.org>
758 * decl.c (add_hidden_procptr_result): Bugfix for procptr results.
759 (match_procedure_decl): Set if_source.
760 * expr.c (gfc_check_pointer_assign): Bugfix: Return after error.
761 And: Check interface also for IFSRC_UNKNOWN (return type may be known).
762 * gfortran.h (typedef enum ifsrc): Remove IFSRC_USAGE,
763 add documentation. Rename copy_formal_args and copy_formal_args_intr.
764 * interface.c (gfc_compare_interfaces): Check for return types,
765 handle IFSRC_UNKNOWN.
766 (compare_intr_interfaces,compare_actual_formal_intr): Obsolete, removed.
767 (gfc_procedure_use): Modified handling of intrinsics.
768 * intrinsic.c (add_functions): Bugfix for "dim".
769 * resolve.c (resolve_intrinsic): New function to resolve intrinsics,
770 which copies the interface from isym to sym.
771 (resolve_procedure_expression,resolve_function): Use new function
773 (resolve_symbol): Add function attribute for externals with return type
774 and use new function 'resolve_intrinsic'.
775 * symbol.c (ifsrc_types): Remove string for IFSRC_USAGE.
776 (copy_formal_args): Renamed to gfc_copy_formal_args.
777 (copy_formal_args_intr): Renamed to gfc_copy_formal_args_intr.
778 * trans-const.c (gfc_conv_const_charlen): Handle cl==NULL.
780 2009-04-21 Joseph Myers <joseph@codesourcery.com>
782 * ChangeLog, ChangeLog-2002, ChangeLog-2003, ChangeLog-2004,
783 ChangeLog-2005, ChangeLog-2006, ChangeLog-2007, ChangeLog-2008,
784 ChangeLog.ptr, config-lang.in, ioparm.def, mathbuiltins.def: Add
785 copyright and license notices.
786 * ChangeLog, ChangeLog-2005, ChangeLog-2006, ChangeLog-2007,
787 ChangeLog-2008: Correct dates.
789 2009-04-20 Tobias Burnus <burnus@net-b.de>
792 * scanner.c (load_line): Fix bogus "&" compile-time diagnostic.
794 2009-04-20 Paul Thomas <pault@gcc.gnu.org>
797 * resolve.c (is_sym_host_assoc): New function.
798 (resolve_fl_derived): Call it when checking PRIVATE components
799 of PUBLIC derived types. Change gfc_error to a gfc_notify_std
801 (resolve_fl_namelist): Call it twice to check for host
804 2009-04-20 Ian Lance Taylor <iant@google.com>
806 * module.c (import_iso_c_binding_module): Add casts to enum type.
807 * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Change op to enum
809 (gfc_conv_intrinsic_anyall): Likewise.
810 (gfc_conv_intrinsic_arith): Likewise.
811 (gfc_conv_intrinsic_minmaxloc): Likewise.
812 (gfc_conv_intrinsic_minmaxval): Likewise.
813 (gfc_conv_intrinsic_bitop): Likewise.
814 (gfc_conv_intrinsic_singlebitop): Likewise.
815 (gfc_conv_intrinsic_strcmp): Likewise.
817 2009-04-20 Vasilis Liaskovitis <vliaskov@gmail.com>
818 Jakub Jelinek <jakub@redhat.com>
821 * trans.h (OMPWS_WORKSHARE_FLAG, OMPWS_CURR_SINGLEUNIT,
822 OMPWS_SCALARIZER_WS, OMPWS_NOWAIT): Define.
823 (ompws_flags): New extern decl.
824 * trans-array.c (gfc_trans_scalarized_loop_end): Build OMP_FOR
825 for the outer dimension if ompws_flags allow it.
826 * trans.c (gfc_generate_code): Clear ompws_flags.
827 * trans-expr.c (gfc_trans_assignment_1): Allow worksharing
828 array assignments inside of !$omp workshare.
829 * trans-stmt.c (gfc_trans_where_3): Similarly for where statements
831 * trans-openmp.c (ompws_flags): New variable.
832 (gfc_trans_omp_workshare): Rewritten.
834 2009-04-11 Daniel Kraft <d@domob.eu>
837 * gfortran.h (struct gfc_charlen): New field "passed_length" to store
838 the actual passed string length for dummy arguments.
839 * trans-decl.c (gfc_create_string_length): Formatting fixes and added
840 assertion, moved a local variable into the innermost block it is needed.
841 (create_function_arglist): Removed TODO about the check being
842 implemented and initialize cl->passed_length here.
843 (add_argument_checking): New method.
844 (gfc_generate_function_code): Call the argument checking method.
846 2009-04-11 Janus Weil <janus@gcc.gnu.org>
849 * symbol.c (check_conflict): Reject procedure pointers for -std=f95.
851 2009-04-11 Daniel Franke <franke.daniel@gmail.com>
853 * resolve.c (resolve_global_procedure): Enable whole-file checking for
854 procedures that are declared later in the file.
856 2009-04-10 Paolo Bonzini <bonzini@gnu.org>
859 * trans.c (gfc_allocate_with_status): Fix type mismatches
862 2009-04-10 Daniel Franke <franke.daniel@gmail.com>
865 * expr.c (find_array_section): Leave early on zero-sized arrays.
867 2009-04-09 Janus Weil <janus@gcc.gnu.org>
870 * decl.c (add_hidden_procptr_result): New function for handling
871 procedure pointer return values by adding a hidden result variable.
872 (variable_decl,match_procedure_decl,gfc_match_function_decl,
873 gfc_match_subroutine,gfc_match_end,attr_decl1): Handle procedure pointer
875 * parse.c (parse_interface): Add EXTERNAL attribute only after
876 FUNCTION/SUBROUTINE declaration is complete.
877 * primary.c (replace_hidden_procptr_result): New function for replacing
878 function symbol by hidden result variable.
879 (gfc_match_rvalue,match_variable): Replace symbol by hidden result
881 * resolve.c (resolve_contained_fntype,resolve_function,resolve_variable,
882 resolve_symbol): Allow for procedure pointer function results.
883 (resolve_fl_procedure): Conflict detection moved here from
885 * symbol.c (gfc_check_function_type): Allow for procedure pointer
887 (check_conflict): Move some conflict detection to resolution stage.
888 * trans-types.c (gfc_sym_type,gfc_get_function_type): Handle hidden
891 2009-04-08 Jakub Jelinek <jakub@redhat.com>
893 * trans-types.c (gfc_init_types): Ensure gfc_integer_types doesn't
894 contain TYPE_STRING_FLAG types.
896 2009-04-08 Janne Blomqvist <jb@gcc.gnu.org>
899 * invoke.texi (fdollar-ok): Fix typo.
901 2009-04-08 Daniel Franke <franke.daniel@gmail.com>
904 * invoke.texi (fdollar-ok): Clarify limitations.
906 2009-04-08 Paul Thomas <pault@gcc.gnu.org>
909 * trans-array.c (gfc_trans_deferred_array): Return if this
910 is a result variable.
912 2009-04-07 Janus Weil <janus@gcc.gnu.org>
915 * trans-decl.c (gfc_get_symbol_decl): Correctly set decl location for
916 procedure pointer decls.
918 2009-04-07 Janus Weil <janus@gcc.gnu.org>
921 * expr.c (gfc_check_pointer_assign): Enable interface check for
923 * gfortran.h: Add copy_formal_args_intr.
924 * interface.c (gfc_compare_interfaces): Call gfc_compare_intr_interfaces
925 if second argument is an intrinsic.
926 (compare_intr_interfaces): Correctly set attr.function, attr.subroutine
928 (compare_parameter): Call gfc_compare_interfaces also for intrinsics.
929 * resolve.c (resolve_specific_f0,resolve_specific_s0): Don't resolve
930 intrinsic interfaces here. Must happen earlier.
931 (resolve_symbol): Resolution of intrinsic interfaces moved here from
932 resolve_specific_..., and formal args are now copied from intrinsic
934 * symbol.c (copy_formal_args_intr): New function to copy the formal
935 arguments from an intinsic procedure.
937 2009-04-06 Paul Thomas <pault@gcc.gnu.org>
940 * dependency.c (ref_same_as_full_array): New function.
941 (gfc_dep_resolver): Call it.
943 2009-04-06 Janus Weil <janus@gcc.gnu.org>
946 * decl.c (match_procedure_decl): Fix double declaration problems with
947 PROCEDURE statements.
948 * symbol.c (gfc_add_type): Ditto.
950 2009-04-06 Paul Thomas <pault@gcc.gnu.org>
953 * trans-array.c (gfc_conv_array_ref): If the symbol has the
954 temporary attribute use the array_spec for the bounds.
955 * gfortran.h : Add the temporary field to the structure
957 * trans-stmt.c (forall_make_variable_temp): Set the symbol's
960 2009-04-05 Daniel Franke <franke.daniel@gmail.com>
963 * trans-array.c (gfc_trans_array_constructor_value): Shadow
964 implied do-loop variable to avoid spurious middle-end warnings.
966 2009-04-04 Tobias Burnus <burnus@net-b.de>
969 * trans-decl.c (gfc_generate_function_code): Move recursive
970 check to the right position.
972 2009-04-04 Paul Thomas <pault@gcc.gnu.org>
975 * trans-common.c (translate_common): Do not offset the whole
978 2009-04-03 Tobias Burnus <burnus@net-b.de>
981 * resolve.c (resolve_common_vars): Add FL_VARIABLE to symbol
982 if it is not a procedure pointer.
983 * primary.c (match_actual_arg): Ditto.
985 2009-03-31 Joseph Myers <joseph@codesourcery.com>
987 PR preprocessor/15638
988 * cpp.c (cb_cpp_error): Handle CPP_DL_FATAL.
990 2009-03-30 Steven G. Kargl <kargls@comcast.net>
993 * trans-stmt.c(gfc_trans_allocate): Add translation of ERRMSG.
994 (gfc_trans_deallocate): Add translation of ERRMSG. Remove stale
995 comments. Minor whitespace cleanup.
996 * resolve.c(is_scalar_expr_ptr): Whitespace cleanup.
997 (resolve_deallocate_expr (gfc_expr *e): Update error message.
998 (resolve_allocate_expr): Remove dead code. Update error message.
999 Move error checking to ...
1000 (resolve_allocate_deallocate): ... here. Add additional error
1001 checking for STAT, ERRMSG, and allocate-objects.
1002 * match.c(gfc_match_allocate,gfc_match_deallocate): Parse ERRMSG.
1003 Check for redundant uses of STAT and ERRMSG. Reword error message
1004 and add checking for pointer, allocatable, and proc_pointer attributes.
1006 2009-03-30 Paul Thomas <pault@gcc.gnu.org>
1011 * symbol.c : Add gfc_global_ns_list.
1012 * decl.c (add_global_entry): Set the namespace ('ns') field.
1013 * gfortran.h : Add the resolved field to gfc_namespace. Add the
1014 namespace ('ns') field to gfc_gsymbol. Add flag_whole_file to
1015 gfc_option_t. Add the prototype for gfc_free_dt_list.
1016 * lang.opt : Add the whole-file option.
1017 * invoke.texi : Document the whole-file option.
1018 * resolve.c (resolve_global_procedure): If the fwhole-file
1019 option is set, reorder gsymbols to ensure that translation is
1020 in the right order. Resolve the gsymbol's namespace if that
1021 has not occurred and then check interfaces.
1022 (resolve_function): Move call to resolve_global_procedure.
1023 (resolve_call): The same.
1024 (resolve_codes): Store the current labels_obstack.
1025 (gfc_resolve) : Return if the namespace is already resolved.
1026 trans-decl.c (gfc_get_extern_function_decl): If the whole_file
1027 option is selected, use the backend_decl of a gsymbol, if it is
1029 parse.c (add_global_procedure, add_global_program): If the flag
1030 whole-file is set, add the namespace to the gsymbol.
1031 (gfc_parse_file): On -fwhole-file, put procedure namespaces on
1032 the global namespace list. Rearrange to do resolution of all
1033 the procedures in a file, followed by their translation.
1034 * options.c (gfc_init_options): Add -fwhole-file.
1035 (gfc_handle_option): The same.
1037 2009-03-30 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1039 * f95-lang.c (gfc_init_builtin_functions): Define BUILT_IN_HUGE_VAL
1040 family of intrinsics instead of BUILT_IN_INF family.
1041 * trans-intrinsics.c (gfc_conv_intrinsic_nearest): Use
1042 BUILT_IN_HUGE_VAL instead of BUILT_IN_INF.
1044 2009-03-30 Jakub Jelinek <jakub@redhat.com>
1046 * trans-types.c (gfc_sym_type, gfc_return_by_reference): For
1047 sym->attr.result check sym->ns->proc_name->attr.is_bind_c.
1049 2009-03-30 Joseph Myers <joseph@codesourcery.com>
1051 PR rtl-optimization/323
1052 * options.c (gfc_post_options): Set
1053 flag_excess_precision_cmdline. Give an error for
1054 -fexcess-precision=standard for processors where the option is
1057 2009-03-29 Joseph Myers <joseph@codesourcery.com>
1059 PR preprocessor/34695
1060 * cpp.c (cb_cpp_error): New.
1061 (gfc_cpp_post_options): Don't set cpp_option->inhibit_warnings.
1062 Don't check cpp_errors (cpp_in).
1063 (gfc_cpp_init_0): Set cb->error.
1065 2009-03-29 Steven G. Kargl <kargl@gcc.gnu.org>
1068 * gfortran.h: Add ARITH_PROHIBIT to arith enum.
1069 expr.c (gfc_match_init_expr): Add global variable init_flag to
1070 flag matching an initialization expression.
1071 (check_intrinsic_op): Move no longer reachable error message to ...
1072 * arith.c (arith_power): ... here. Remove gfc_ prefix in
1073 gfc_arith_power. Use init_flag. Allow constant folding of x**y
1074 when y is REAL or COMPLEX.
1075 (eval_intrinsic): Remove restriction that y in x**y must be INTEGER
1076 for constant folding.
1077 * gfc_power: Update gfc_arith_power to arith_power
1079 2009-03-29 Daniel Kraft <d@domob.eu>
1082 * gfortran.h (struct gfc_typebound_proc): Added new flag "deferred" and
1083 added a comment explaining DEFERRED binding handling.
1084 * decl.c (match_binding_attributes): Really match DEFERRED attribute.
1085 (match_procedure_in_type): Really match PROCEDURE(interface) syntax
1086 and do some validity checks for DEFERRED and this construct.
1087 * module.c (binding_overriding): New string constant for DEFERRED.
1088 (mio_typebound_proc): Module-IO DEFERRED flag.
1089 * resolve.c (check_typebound_override): Ensure that a non-DEFERRED
1090 binding is not overridden by a DEFERRED one.
1091 (resolve_typebound_procedure): Allow abstract interfaces as targets
1092 for DEFERRED bindings.
1093 (ensure_not_abstract_walker), (ensure_not_abstract): New methods.
1094 (resolve_fl_derived): Use new "ensure_not_abstract" method for
1095 non-ABSTRACT types extending ABSTRACT ones to ensure each DEFERRED
1096 binding is overridden.
1097 (check_typebound_baseobject): New method.
1098 (resolve_compcall), (resolve_typebound_call): Check base-object of
1099 the type-bound procedure call.
1100 * gfc-internals.texi (Type-bound procedures): Document a little bit
1101 about internal handling of DEFERRED bindings.
1103 2009-03-29 Tobias Schlueter <tobi@gcc.gnu.org>
1106 * gfortran.h (gfc_st_label): Fix comment.
1107 (gfc_exec_op): Add statement code EXEC_END_BLOCK for end of block.
1108 * parse.c (accept_statement): Use EXEC_END_BLOCK for END IF and
1109 END SELECT with labels.
1110 (check_do_closure): Fix formatting.
1111 (parse_do_block): Fix typo in error message.
1112 * resolve.c (code_stack): Remove tail member. Update comment to
1113 new use of reachable_labels.
1114 (reachable_labels): Rename to ...
1115 (find_reachable_labels): ... this. Overhaul. Update preceding
1117 (resolve_branch): Fix comment preceding function. Rewrite.
1118 (resolve_code): Update call to find_reachable_labels. Add code to
1119 deal with EXEC_END_BLOCK.
1120 * st.c (gfc_free_statement): Add code to deal with EXEC_END_BLOCK.
1121 Add 2009 to copyright years.
1122 * trans.c (gfc_trans_code): Likewise on both counts.
1124 2009-03-31 Paul Thomas <pault@gcc.gnu.org>
1127 * expr.c (gfc_check_assign): Allow pointer components when
1131 * resolve.c (check_data_variable): Treat pointer arrays with
1134 2009-03-31 Paul Thomas <pault@gcc.gnu.org>
1137 * trans-expr.c (gfc_trans_assignment_1): Ensure temporaries
1138 have a string_length.
1140 2009-03-28 Tobias Burnus <burnus@net-b.de>
1143 * trans-stmt.c (gfc_trans_simple_do, gfc_trans_do):
1144 Add GFC_RTCHECK_DO support.
1145 * option.c (gfc_handle_runtime_check_option): Enable GFC_RTCHECK_DO.
1146 * invoke.texi (-fcheck): Document "do" option.
1148 2009-03-28 Paul Thomas <pault@gcc.gnu.org>
1151 * trans-array.c (get_elemental_fcn_charlen): Remove.
1152 (get_array_charlen): New function to replace previous.
1154 2009-03-28 Paul Thomas <pault@gcc.gnu.org>
1157 * parse.c (parse_derived): Do not break on finding pointer,
1158 allocatable or private components.
1160 2009-03-28 Tobias Burnus <burnus@net-b.de>
1163 * option.c (gfc_handle_runtime_check_option): Enable recursion check.
1164 * trans-decl.c (gfc_generate_function_code): Add recursion check.
1165 * invoke.texi (-fcheck): Add recursive option.
1167 2009-03-28 Tobias Burnus <burnus@net-b.de>
1170 * resolve.c (gfc_resolve_iterator): Add zero-loop warning.
1172 2009-03-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1173 Paul Thomas <pault@gcc.gnu.org>
1174 Tobias Burnus <burnus@net-b.de>
1176 * gfortran.h (gfc_option_t): Add rtcheck.
1177 * lang.opt: New option -fcheck.
1178 * libgfortran.h: Add GFC_RTCHECK_* constants.
1179 * invoke.texi: Document -fcheck.
1180 * options.c (gfc_handle_runtime_check_option): New function.
1181 (gfc_init_options,gfc_post_options,gfc_handle_option):
1184 2009-03-27 Richard Guenther <rguenther@suse.de>
1186 * trans-array.c (gfc_conv_descriptor_data_addr): Use
1187 gfc_build_addr_expr instead of build_fold_addr_expr.
1188 (gfc_trans_allocate_array_storage, gfc_trans_array_constructor_value,
1189 gfc_trans_constant_array_constructor, gfc_conv_array_data,
1190 gfc_conv_expr_descriptor, gfc_conv_array_parameter): Likewise.
1191 * trans-expr.c (gfc_conv_missing_dummy, gfc_conv_variable,
1192 gfc_conv_function_val, gfc_conv_operator_assign,
1193 gfc_conv_subref_array_arg, gfc_conv_function_call,
1194 gfc_conv_expr_reference, gfc_trans_scalar_assign): Likewise.
1195 * trans-intrinsic.c (gfc_conv_intrinsic_exponent,
1196 gfc_conv_intrinsic_ctime, gfc_conv_intrinsic_fdate,
1197 gfc_conv_intrinsic_ttynam, gfc_conv_intrinsic_minmax_char,
1198 gfc_conv_intrinsic_fraction, gfc_conv_intrinsic_spacing,
1199 gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_set_exponent,
1200 gfc_conv_intrinsic_array_transfer, gfc_conv_intrinsic_transfer,
1201 gfc_conv_intrinsic_si_kind, gfc_conv_intrinsic_trim): Likewise.
1202 * trans-io.c (gfc_trans_io_runtime_check, set_parameter_ref,
1203 gfc_convert_array_to_string, gfc_trans_open, gfc_trans_close,
1204 build_filepos, gfc_trans_inquire, gfc_trans_wait,
1205 nml_get_addr_expr, transfer_namelist_element, build_dt,
1206 gfc_trans_dt_end, transfer_array_component, transfer_expr,
1207 transfer_array_desc, gfc_trans_transfer): Likewise.
1208 * trans-stmt.c (gfc_trans_allocate, gfc_trans_deallocate): Likewise.
1209 * trans.c (gfc_build_addr_expr): Mark the base of the address
1212 2009-03-27 Tobias Burnus <burnus@net-b.de>
1214 * gfortran.h (enum init_local_real.): Add GFC_INIT_REAL_SNAN.
1215 (gfc_expr): Add is_snan.
1216 * trans-const.c (gfc_conv_mpfr_to_tree): Support SNaN.
1217 (gfc_conv_constant_to_tree): Update call to gfc_conv_mpfr_to_tree.
1218 * trans-const.h (gfc_conv_mpfr_to_tree): Update prototype.
1219 * resolve.c (build_default_init_expr): Update call.
1220 * target-memory.c (encode_float): Ditto.
1221 * trans-intrinsic.c (gfc_conv_intrinsic_aint,gfc_conv_intrinsic_mod,
1223 2009-03-18 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1225 * lang.opt: Unify help texts for -I, -Wconversion, -d, -fopenmp,
1228 2009-03-06 Alexandre Oliva <aoliva@redhat.com>
1230 * simplify.c (gfc_simplify_transfer): Zero-initialize the
1233 2009-02-27 Tobias Burnus <burnus@net-b.de>
1236 * module.c (read_md5_from_module_file): Add missing quote.
1238 2009-02-27 Tobias Burnus <burnus@net-b.de>
1241 * module.c (read_md5_from_module_file): Include mod version
1242 in had-changed test.
1244 2009-02-26 Paul Thomas <pault@gcc.gnu.org>
1247 * interface.c (compare_type_rank_if): Return 1 if the symbols
1248 are the same and deal with external procedures where one is
1249 identified to be a function or subroutine by usage but the
1252 2009-02-26 Paul Thomas <pault@gcc.gnu.org>
1255 * trans-array.c (gfc_conv_array_initializer): Convert all
1256 expressions rather than ICEing.
1258 2009-02-21 Thomas Koenig <tkoenig@gcc.gnu.org>
1261 * array.c (ref_dimen_size): Rename to gfc_ref_dimen_size,
1262 make global. Change function name in error messages.
1263 (ref_size): Change ref_dimen_size to gfc_ref_dimen_size.
1264 (gfc_array_ref_shape): Likewise.
1265 * gfortran.h: Add prototype for gfc_ref_dimen_size.
1266 * simplify.c (simplify_bound_dim): Add ref argument.
1267 If the reference isn't a full array, return one for
1268 the lower bound and the extent for the upper bound.
1269 (simplify_bound): For array sections, take as from the
1270 argument. Add reference to all to simplify_bound_dim.
1272 2009-02-19 Daniel Franke <franke.daniel@gmail.com>
1274 * scanner.c (load_line): At end of line, skip '\r' without setting
1275 the truncation flag.
1277 2009-02-18 Daniel Kraft <d@domob.eu>
1279 * gfortran.texi: New chapter about compiler characteristics.
1280 (Compiler Characteristics): Document KIND type parameters here.
1282 2009-02-18 Tobias Burnus <burnus@net-b.de>
1284 * intrinsic.texi (MALLOC): Make example more portable.
1286 2009-02-13 Mikael Morin <mikael.morin@tele2.fr>
1289 * module.c (gfc_dump_module,gfc_use_module): Add module
1292 2009-02-13 Paul Thomas <pault@gcc.gnu.org>
1296 * trans-expr.c (gfc_conv_function_val): Stabilize Cray-pointer
1297 function references to ensure that a valid expression is used.
1298 (gfc_conv_function_call): Pass Cray pointers to procedures.
1300 2009-02-03 Jakub Jelinek <jakub@redhat.com>
1302 * gfortranspec.c (lang_specific_driver): Update copyright notice
1305 2009-01-28 Paul Thomas <pault@gcc.gnu.org>
1309 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Use the array
1310 descriptor ubound for UBOUND, when the array lbound == 1.
1312 2009-01-27 Daniel Kraft <d@domob.eu>
1315 * trans-stmt.c (gfc_conv_elemental_dependencies): Create temporary
1316 for the real type needed to make it work for subcomponent-references.
1318 2009-01-21 Daniel Kraft <d@domob.eu>
1320 * trans-stmt.c (gfc_conv_elemental_dependencies): Cleaned up comment.
1322 2009-01-20 Paul Thomas <pault@gcc.gnu.org>
1325 * resolve.c (check_host_association): Remove the matching to
1326 correct an incorrect host association and use manipulation of
1327 the expression instead.
1329 2009-01-20 Tobias Burnus <burnus@net-b.de>
1331 * invoke.texi (RANGE): RANGE also takes INTEGER arguments.
1333 2009-01-19 Mikael Morin <mikael.morin@tele2.fr>
1336 * simplify.c (simplify_bound): Don't use array specification
1337 if variable or component has subsequent references.
1339 2009-01-17 Paul Thomas <pault@gcc.gnu.org>
1342 * module.c (write_common_0): Add argument 'this_module' and
1343 check that non-use associated common blocks are written first.
1344 (write_common): Call write_common_0 twice, once with true and
1347 2009-01-17 Paul Thomas <pault@gcc.gnu.org>
1350 * trans-intrinsic.c (gfc_conv_intrinsic_array_transfer): Has
1351 been absorbed into gfc_conv_intrinsic_transfer. All
1352 references to it in trans-intrinsic.c have been changed
1353 accordingly. PR fixed by using a temporary for scalar
1354 character transfer, when the source is shorter than the
1357 2009-01-17 Paul Thomas <pault@gcc.gnu.org>
1360 * module.c (write_common_0): Revert patch of 2009-01-05.
1362 2009-01-16 Janus Weil <janus@gcc.gnu.org>
1365 * expr.c (gfc_check_pointer_assign): Allow use-associated procedure
1367 * trans-decl.c (get_proc_pointer_decl,gfc_create_module_variable):
1368 Enable procedure pointers as module variables.
1370 2009-01-14 Steven G. Kargl <kargl@gcc.gnu.org>
1372 * ChangeLog-2007: Clean out svn merge droppings.
1374 2009-01-10 Paul Thomas <pault@gcc.gnu.org>
1377 * target-memory.c (encode_derived): Encode NULL.
1379 2009-01-10 Paul Thomas <pault@gcc.gnu.org>
1382 * resolve.c (check_host_association): Use the symtree name to
1383 search for a potential contained procedure, since this is the
1384 name by which it would be referenced.
1386 2009-01-06 Thomas Koenig <tkoenig@gcc.gnu.org>
1389 * interface.c (gfc_procedure_use): Don't warn about functions
1391 * symbol.c (generate_isocbinding_symbol): Mark c_loc and
1394 2009-01-05 Paul Thomas <pault@gcc.gnu.org>
1397 * module.c (write_common_0): Use the name of the symtree rather
1398 than the common block, to determine if the common has been
1401 2009-01-05 Daniel Franke <franke.daniel@gmail.com>
1404 * check.c (gfc_check_random_seed): Added size check for GET
1405 dummy argument, reworded error messages to follow common pattern.
1407 2009-01-05 Thomas Koenig <tkoenig@gcc.gnu.org>
1410 * trans-types.c (gfc_get_derived_type): Check for the
1411 presence of derived->ns->proc_name before
1412 accessing derived->ns->proc_name->attr.flavor .
1413 * resolve.c (resolve_symbol): Likewise.
1415 2009-01-05 Paul Thomas <pault@gcc.gnu.org>
1418 * gfortran.h : Add bit to gfc_expr 'user_operator'
1419 * interface.c (gfc_extend_expr): Set the above if the operator
1420 is substituted by a function.
1421 * resolve.c (check_host_association): Return if above is set.
1423 2009-01-04 Mikael Morin <mikael.morin@tele2.fr>
1426 * ChangeLog-2008: Fix function name.
1429 * dependency.c (gfc_check_argument_var_dependency):
1430 Move the check for pointerness inside the if block
1431 so that it doesn't affect the return value.
1434 * trans-stmt.c (gfc_trans_call):
1435 Add the dependency code after the loop bounds calculation one.
1437 2009-01-04 Daniel Franke <franke.daniel@gmail.com>
1439 * intrinsic.c (do_simplify): Removed already implemented TODO.
1441 2009-01-04 Daniel Franke <franke.daniel@gmail.com>
1444 * simplify.c (gfc_simplify_merge): New.
1445 * intrinsic.h (gfc_simplify_merge): New prototype.
1446 * intrinsic.c (add_functions): Added simplification for MERGE.
1448 2009-01-04 Mikael Morin <mikael.morin@tele2.fr>
1451 * gfortran.h (gfc_is_data_pointer): Added prototype
1452 * resolve.c (gfc_iso_c_func_interface):
1453 Use gfc_is_data_pointer to test for pointer attribute.
1454 * dependency.c (gfc_is_data_pointer):
1455 Support pointer-returning functions.
1457 2009-01-03 Daniel Franke <franke.daniel@gmail.com>
1459 * symbol.c (save_symbol): Don't SAVE function results.
1461 2009-01-03 Paul Thomas <pault@gcc.gnu.org>
1464 * resolve.c (resolve_call): When searching for proper host
1465 association, use symtree rather than symbol. For everything
1466 except generic subroutines, substitute the symtree in the call
1467 rather than the symbol.
1470 Copyright (C) 2009 Free Software Foundation, Inc.
1472 Copying and distribution of this file, with or without modification,
1473 are permitted in any medium without royalty provided the copyright
1474 notice and this notice are preserved.