1 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
3 * trans-array.c (gfc_conv_expr_descriptor): Simplify coarray
6 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
8 * resolve.c (compare_spec_to_ref): Move coarray ref initialization
10 (resolve_array_ref): ... here.
12 2011-10-07 Mikael Morin <mikael.morin@sfr.fr>
14 * check.c (is_coarray): Remove.
15 (coarray_check): Use gfc_is_coarray.
17 2011-10-07 Janus Weil <janus@gcc.gnu.org>
20 * class.c (gfc_build_class_symbol): Fix whitespace.
21 * module.c (mio_symbol): Set 'class_ok' attribute.
22 * trans-decl.c (gfc_get_symbol_decl): Make sure the backend_decl has
23 been built for class symbols.
25 2011-10-04 Janus Weil <janus@gcc.gnu.org>
28 * interface.c (check_dummy_characteristics): Check the array shape.
30 2011-10-01 Janus Weil <janus@gcc.gnu.org>
33 * interface.c (get_expr_storage_size): Check if 'length' component is
36 2011-09-29 Janus Weil <janus@gcc.gnu.org>
39 * resolve.c (resolve_formal_arglist): Fix pureness check for dummy
43 * symbol.c (check_conflict): Forbid TARGET attribute for statement
46 2011-09-27 Jakub Jelinek <jakub@redhat.com>
48 * trans-types.c (gfc_type_for_size): Return wider type
49 if no suitable narrower type has been found.
50 (gfc_type_for_mode): Return NULL_TREE if gfc_type_for_size
51 returned type doesn't have expected TYPE_MODE.
53 2011-09-26 Janus Weil <janus@gcc.gnu.org>
56 * resolve.c (resolve_common_blocks): Check for EXTERNAL attribute.
59 * interface.c (gfc_compare_interfaces): Bugfix in check for result type.
61 2011-09-22 Janus Weil <janus@gcc.gnu.org>
64 * expr.c (gfc_check_pointer_assign): Check for nonintrinsic elemental
66 * interface.c (gfc_compare_interfaces): Rename 'intent_flag'. Check
67 for PURE and ELEMENTAL attributes.
68 (compare_actual_formal): Remove pureness check here.
70 2011-09-20 Steven G. Kargl <kargl@gcc.gnu.org>
72 * check.c (gfc_check_c_sizeof): Remove redundant word.
74 2011-09-20 Simon Baldwin <simonb@google.com>
76 * module.c (gfc_dump_module): Omit timestamp from output.
78 2011-09-17 Janus Weil <janus@gcc.gnu.org>
81 * symbol.c (gfc_use_derived): Fix coding style.
83 2011-09-15 Janus Weil <janus@gcc.gnu.org>
86 * resolve.c (resolve_transfer): Check if component 'ref' is defined.
89 * symbol.c (gfc_use_derived): Check if argument 'sym' is defined.
91 2011-09-14 Tobias Burnus <burnus@net-b.de>
95 * check.c (gfc_check_null): Allow allocatables as MOLD to NULL.
96 * resolve.c (resolve_transfer): Reject NULL without MOLD.
97 * interface.c (gfc_procedure_use): Reject NULL without MOLD
98 if no explicit interface is known.
99 (gfc_search_interface): Reject NULL without MOLD if it would
102 2011-09-13 Janus Weil <janus@gcc.gnu.org>
105 * symbol.c (check_conflict): Check conflict between GENERIC and RESULT
108 2011-09-11 Thomas Koenig <tkoenig@gcc.gnu.org>
111 * frontend-passes.c (dummy_expr_callback): New function.
112 (convert_do_while): New function.
113 (optimize_namespace): Call code walker to convert do while loops.
115 2011-09-11 Janus Weil <janus@gcc.gnu.org>
119 * interface.c (check_dummy_characteristics): New function to check the
120 characteristics of dummy arguments.
121 (gfc_compare_interfaces,gfc_check_typebound_override): Call it here.
123 2011-09-08 Mikael Morin <mikael.morin@sfr.fr>
125 * trans-array.c (gfc_trans_constant_array_constructor): Remove
126 superfluous initialisation of DIM field.
127 (gfc_trans_array_constructor): Assert that DIMEN field is properly set.
128 (gfc_conv_expr_descriptor): Ditto.
129 * trans-expr.c (gfc_conv_procedure_call): Ditto.
131 2011-09-08 Mikael Morin <mikael.morin@sfr.fr>
133 * trans-array.h (gfc_get_scalar_ss): New prototype.
134 * trans-array.c (gfc_get_scalar_ss): New function.
135 (gfc_walk_variable_expr, gfc_walk_op_expr,
136 gfc_walk_elemental_function_args): Re-use gfc_get_scalar_ss.
137 * trans-expr.c (gfc_trans_subarray_assign): Ditto.
138 (gfc_trans_assignment_1): Ditto.
139 * trans-stmt.c (compute_inner_temp_size, gfc_trans_where_assign,
140 gfc_trans_where_3): Ditto.
142 2011-09-08 Mikael Morin <mikael.morin@sfr.fr>
144 * trans-array.h (gfc_get_temp_ss): New prototype.
145 * trans-array.c (gfc_get_temp_ss): New function.
146 (gfc_conv_resolve_dependencies): Re-use gfc_get_temp_ss.
147 (gfc_conv_expr_descriptor): Ditto.
148 * trans-expr.c (gfc_conv_subref_array_arg): Ditto.
150 2011-09-08 Mikael Morin <mikael.morin@sfr.fr>
152 * trans-array.h (gfc_get_array_ss): New prototype.
153 * trans-array.c (gfc_get_array_ss): New function.
154 (gfc_walk_variable_expr, gfc_walk_function_expr,
155 gfc_walk_array_constructor): Re-use gfc_get_array_ss.
156 * trans-expr.c (gfc_trans_subarray_assign): Ditto.
157 * trans-intrinsic.c (gfc_walk_intrinsic_bound,
158 gfc_walk_intrinsic_libfunc): Ditto.
159 * trans-io.c (transfer_array_component): Ditto.
161 2011-09-08 Tobias Burnus <burnus@net-b.de>
164 * decl.c (gfc_match_entry, gfc_match_end): Handle COMP_DO_CONCURRENT.
165 * dump-parse-tree.c (show_code_node): Handle EXEC_DO_CONCURRENT.
166 * gfortran.h (gfc_exec_op): Add EXEC_DO_CONCURRENT.
167 * match.c (gfc_match_critical, match_exit_cycle, gfc_match_stopcode,
168 lock_unlock_statement, sync_statement, gfc_match_allocate,
169 gfc_match_deallocate, gfc_match_return): Add DO CONCURRENT diagnostic.
170 (gfc_match_do): Match DO CONCURRENT.
171 (match_derived_type_spec, match_type_spec, gfc_free_forall_iterator,
172 match_forall_iterator, match_forall_header, match_simple_forall,
173 gfc_match_forall): Move up in the file.
174 * parse.c (check_do_closure, parse_do_block): Handle do concurrent.
175 * parse.h (gfc_compile_state): Add COMP_DO_CONCURRENT.
176 * resolve.c (do_concurrent_flag): New global variable.
177 (resolve_function, pure_subroutine, resolve_branch,
178 gfc_resolve_blocks, resolve_code, resolve_types): Add do concurrent
180 * st.c (gfc_free_statement): Handle EXEC_DO_CONCURRENT.
181 * trans-stmt.c (gfc_trans_do_concurrent): New function.
182 (gfc_trans_forall_1): Handle do concurrent.
183 * trans-stmt.h (gfc_trans_do_concurrent): New function prototype.
184 * trans.c (trans_code): Call it.
185 * frontend-passes.c (gfc_code_walker): Handle EXEC_DO_CONCURRENT.
187 2011-09-07 Janus Weil <janus@gcc.gnu.org>
190 * primary.c (gfc_match_structure_constructor): Handle parsing of
191 procedure pointers components in structure constructors.
192 * resolve.c (resolve_structure_cons): Check interface of procedure
193 pointer components. Changed wording of some error messages.
195 2011-09-04 Janus Weil <janus@gcc.gnu.org>
198 * trans-types.c (gfc_sym_type): Check for proc_name.
200 2011-08-30 Tobias Burnus <burnus@net-b.de>
203 * trans-common.c (build_common_decl): Warn if named common
204 block's size is not everywhere the same.
206 2011-08-30 Steven G. Kargl <kargl@gcc.gnu.org>
209 * trans-stmt.c (gfc_trans_allocate): Evaluate the substring.
211 2011-08-29 Janus Weil <janus@gcc.gnu.org>
214 * trans-decl.c (gfc_generate_function_code): Nullify polymorphic
215 allocatable function results.
217 2011-08-29 Tobias Burnus <burnus@net-b.de>
219 * trans-decl.c (generate_coarray_sym_init): Use
220 GFC_CAF_COARRAY_STATIC for static coarrays.
222 2011-08-28 Dodji Seketeli <dodji@redhat.com>
224 * scanner.c (load_file): Don't abuse LC_RENAME reason while
225 (indirectly) calling linemap_add.
227 2011-08-26 Jakub Jelinek <jakub@redhat.com>
229 * trans-decl.c (get_proc_pointer_decl): Set DECL_TLS_MODEL
231 * symbol.c (check_conflict): Allow threadprivate attribute with
232 FL_PROCEDURE if proc_pointer.
234 2011-08-25 Mikael Morin <mikael.morin@gcc.gnu.org>
237 * expr.c (gfc_free_shape): Do nothing if shape is NULL.
238 (free_expr0): Remove redundant NULL shape check.
239 * resolve.c (check_host_association): Ditto.
240 * trans-expr.c (gfc_trans_subarray_assign): Assert that shape is
242 * trans-io.c (transfer_array_component): Ditto.
244 2011-08-25 Tobias Burnus <burnus@net-b.de>
246 * trans-array.c (gfc_conv_descriptor_token): Add assert.
247 * trans-decl.c (gfc_build_qualified_array,
248 create_function_arglist): Handle assumed-shape arrays.
249 * trans-expr.c (gfc_conv_procedure_call): Ditto.
250 * trans-types.c (gfc_get_array_descriptor_base): Ditto, don't
251 add "caf_token" to assumed-shape descriptors, new akind argument.
252 (gfc_get_array_type_bounds): Pass akind.
253 * trans.h (lang_decl): New elements caf_offset and token.
254 (GFC_DECL_TOKEN, GFC_DECL_CAF_OFFSET): New macros.
256 2011-08-25 Tobias Burnus <burnus@net-b.de>
258 * trans-array.c (structure_alloc_comps): Fix for allocatable
259 scalar coarray components.
260 * trans-expr.c (gfc_conv_component_ref): Ditto.
261 * trans-type.c (gfc_get_derived_type): Ditto.
263 2011-08-24 Tobias Burnus <burnus@net-b.de>
266 * expr.c (check_init_expr): Return when an error occured.
268 2011-08-24 Joseph Myers <joseph@codesourcery.com>
270 * Make-lang.in (fortran/cpp.o): Remove explicit compilation rule.
272 2011-08-23 Tobias Burnus <burnus@net-b.de>
275 * symbol.c (gfc_add_type): Better diagnostic if redefining
276 use-associated symbol.
277 * module.c (gfc_use_module): Use module name as locus.
279 2011-08-22 Gabriel Charette <gchare@google.com>
281 * cpp.c (gfc_cpp_init): Force BUILTINS_LOCATION for tokens
282 defined in cpp_define_builtins.
284 2011-08-22 Mikael Morin <mikael.morin@gcc.gnu.org>
287 * gfortran.h (gfc_clear_shape, gfc_free_shape): New prototypes.
288 * expr.c (gfc_clear_shape, gfc_free_shape): New functions.
289 (free_expr0): Re-use gfc_free_shape.
290 * trans-expr.c (gfc_trans_subarray_assign): Ditto.
291 * trans-io.c (transfer_array_component): Ditto.
292 * resolve.c (check_host_association): Ditto.
293 (gfc_expr_to_initialize): Don't force the rank value and free the shape
294 after updating the expression. Recalculate shape and rank.
295 (resolve_where_shape): Re-use gfc_clear_shape.
296 * array.c (gfc_array_ref_shape): Ditto.
298 2011-08-21 Thomas Koenig <tkoenig@gcc.gnu.org>
301 * expr.c (gfc_check_assign): Check for type conversions when the
302 right-hand side is a constant REAL/COMPLEX contstant the left-hand
303 side is also REAL/COMPLEX. Don't warn when a narrowing conversion
304 for REAL does not change the value of the constant.
306 2011-08-21 Thomas Koenig <tkoenig@gcc.gnu.org>
309 * resolve.c (resolve_array_ref): Don't calculate upper bound
310 if the stride is zero.
312 2011-08-20 Janus Weil <janus@gcc.gnu.org>
315 * dependency.c (gfc_dep_compare_expr): Add new result value "-3".
316 (gfc_check_element_vs_section,gfc_check_element_vs_element): Handle
318 * frontend-passes.c (optimize_comparison): Ditto.
319 * interface.c (gfc_check_typebound_override): Ditto.
321 2011-08-19 Mikael Morin <mikael.morin@sfr.fr>
324 * parse.c (parse_where): Undo changes after emitting an error.
326 2011-08-19 Jakub Jelinek <jakub@redhat.com>
329 * trans-expr.c (gfc_trans_assignment_1): Set OMPWS_SCALARIZER_WS
330 bit in ompws_flags only if loop.temp_ss is NULL, and clear it if
331 lhs needs reallocation.
332 * trans-openmp.c (gfc_trans_omp_workshare): Don't return early if
333 code is NULL, emit a barrier if workshare emitted no code at all
334 and NOWAIT clause isn't present.
336 2011-08-19 Mikael Morin <mikael.morin@sfr.fr>
339 * gfortran.h (gfc_exec_op): New constant EXEC_END_NESTED_BLOCK.
340 * parse.c (check_statement_label): Accept ST_END_BLOCK and
341 ST_END_ASSOCIATE as valid branch target.
342 (accept_statement): Change EXEC_END_BLOCK to EXEC_END_NESTED_BLOCK.
343 Add EXEC_END_BLOCK code in the ST_END_BLOCK and ST_END_ASSOCIATE cases.
344 * resolve.c (find_reachable_labels): Change EXEC_END_BLOCK to
345 EXEC_END_NESTED_BLOCK.
346 (resolve_branch): Ditto.
347 (resolve_code): Add EXEC_END_NESTED_BLOCK case.
348 * st.c (gfc_free_statement): Ditto.
349 * trans.c (trans_code): Ditto.
351 2011-08-18 Mikael Morin <mikael.morin@sfr.fr>
354 * symbol.c (gfc_get_st_label): Use the derived type namespace when
355 we are parsing a derived type definition.
357 2011-08-18 Tobias Burnus <burnus@net-b.de>
360 * parse.c (parse_derived): Add lock_type
361 checks, improve coarray_comp handling.
362 * resolve.c (resolve_allocate_expr,
363 resolve_lock_unlock, resolve_symbol): Fix lock_type
366 2011-08-17 Tobias Burnus <burnus@net-b.de>
369 * trans-decl.c (generate_local_decl): Warn about
370 unused explicitly imported module variables/parameters.
372 2011-08-17 Janus Weil <janus@gcc.gnu.org>
375 * resolve.c (resolve_fl_variable): Reject non-constant character lengths
378 2011-08-16 Tobias Burnus <burnus@net-b.de>
379 Dominique Dhumieres <dominiq@lps.ens.fr>
382 * resolve.c (resolve_symbol): Fix stupid typo.
384 2011-08-15 Tobias Burnus <burnus@net-b.de>
386 * resolve.c (resolve_symbol): Fix coarray result-var check.
388 2011-08-14 Steven G. Kargl <kargl@gcc.gnu.org>
390 * module.c (use_iso_fortran_env_module): Spell 'referrenced' correctly.
392 2011-08-14 Janus Weil <janus@gcc.gnu.org>
395 * decl.c (check_function_name): New function, separated off from
396 'variable_decl' and slightly extended.
397 (variable_decl,attr_decl1): Call it.
399 2011-08-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
401 * Make-lang.in (gfortran$(exeext)): Add $(EXTRA_GCC_LIBS).
403 2011-08-07 Janus Weil <janus@gcc.gnu.org>
404 Thomas Koenig <tkoenig@gcc.gnu.org>
407 * dependency.c (are_identical_variables): For dummy arguments only
408 check for equal names, not equal symbols.
409 * interface.c (gfc_check_typebound_override): Add checking for rank
410 and character length.
412 2011-08-07 Janus Weil <janus@gcc.gnu.org>
415 * dependency.h (gfc_is_same_range,gfc_are_identical_variables): Remove
417 * dependency.c (gfc_are_identical_variables,are_identical_variables):
418 Renamed the former to the latter and made static.
419 (gfc_dep_compare_expr): Renamed 'gfc_are_identical_variables', handle
420 commutativity of multiplication.
421 (gfc_is_same_range,is_same_range): Renamed the former to the latter,
422 made static and removed argument 'def'.
423 (check_section_vs_section): Renamed 'gfc_is_same_range'.
424 * gfortran.h (gfc_check_typebound_override): New prototype.
425 * interface.c (gfc_check_typebound_override): Moved here from ...
426 * resolve.c (check_typebound_override): ... here (and renamed).
427 (resolve_typebound_procedure): Renamed 'check_typebound_override'.
429 2011-08-06 Thomas Koenig <tkoenig@gcc.gnu.org>
432 * target-memory.c (gfc_target_expr-size): Don't clobber typespec
434 * simplify.c (gfc_simplify_transfer): Don't calculate source_size
437 2011-08-05 Thomas Koenig <tkoenig@gcc.gnu.org>
440 * gfortran.h (gfc_calculate_transfer_sizes): Add prototype.
441 * target-memory.h (gfc_target_interpret_expr): Add boolean
442 argument wether to convert wide characters.
443 * target-memory.c (gfc_target_expr_size): Also return length
444 of characters for non-constant expressions if these can be
445 determined from the cl.
446 (interpret_array): Add argument for gfc_target_interpret_expr.
447 (gfc_interpret_derived): Likewise.
448 (gfc_target_interpret_expr): Likewise.
449 * check.c: Include target-memory.h.
450 (gfc_calculate_transfer_sizes): New function.
451 (gfc_check_transfer): When -Wsurprising is in force, calculate
452 sizes and warn if result is larger than size (check moved from
453 gfc_simplify_transfer).
454 * simplify.c (gfc_simplify_transfer): Use
455 gfc_calculate_transfer_sizes. Remove warning.
457 2011-08-04 Richard Guenther <rguenther@suse.de>
460 * trans-array.c (add_to_offset): New function.
461 (gfc_conv_array_ref): Build the array index expression in optimally
463 (gfc_walk_variable_expr): Adjust for the backward walk.
465 2011-08-02 Daniel Kraft <d@domob.eu>
468 * trans-array.c (gfc_trans_auto_array_allocation): Change
469 gfc_start_block to gfc_init_block to avoid spurious extra-scope.
471 2011-08-02 Tobias Burnus <burnus@net-b.de>
473 * trans-array.c (gfc_array_allocate): Pass token to
474 gfc_allocate_allocatable for -fcoarray=lib.
475 * trans-stmt.c (gfc_trans_allocate): Update
476 gfc_allocate_allocatable call.
477 * trans.h (gfc_allocate_allocatable): Update prototype.
478 (gfc_allocate_using_lib): Remove.
479 * trans.c (gfc_allocate_using_lib): Make static, handle token.
480 (gfc_allocate_allocatable): Ditto.
482 2011-08-02 Jakub Jelinek <jakub@redhat.com>
485 * cpp.c (cpp_define_builtins): Change _OPENMP to 201107.
486 * openmp.c (gfc_free_omp_clauses): Free also final_expr.
487 (OMP_CLAUSE_FINAL, OMP_CLAUSE_MERGEABLE): Define.
488 (gfc_match_omp_clauses): Handle parsing final and mergeable
490 (OMP_TASK_CLAUSES): Allow final and mergeable clauses.
491 (gfc_match_omp_taskyield): New function.
492 (resolve_omp_clauses): Resolve final clause. Allow POINTERs and
493 Cray pointers in clauses other than REDUCTION.
494 (gfc_match_omp_atomic): Match optional
495 read/write/update/capture keywords after !$omp atomic.
496 (resolve_omp_atomic): Handle all OpenMP 3.1 atomic forms.
497 * dump-parse-tree.c (show_omp_node): Handle EXEC_OMP_TASKYIELD,
498 print final and mergeable clauses.
499 (show_code_node): Handle EXEC_OMP_TASKYIELD.
500 * trans-openmp.c (gfc_trans_omp_clauses): Handle final and
502 (gfc_trans_omp_taskyield): New function.
503 (gfc_trans_omp_directive): Handle EXEC_OMP_TASKYIELD.
504 (gfc_trans_omp_atomic): Handle all OpenMP 3.1 atomic forms.
505 (gfc_omp_clause_copy_ctor): Handle non-allocated allocatable.
506 (gfc_omp_predetermined_sharing): Adjust comment.
507 * gfortran.h (gfc_statement): Add ST_OMP_TASKYIELD and
509 (gfc_omp_clauses): Add final_expr and mergeable fields.
510 (gfc_exec_op): Add EXEC_OMP_TASKYIELD.
511 (gfc_omp_atomic_op): New enum typedef.
512 (struct gfc_code): Add ext.omp_atomic.
513 * trans.c (trans_code): Handle EXEC_OMP_TASKYIELD.
514 * frontend-passes.c (gfc_code_walker): Also walk final_expr.
515 * resolve.c (gfc_resolve_blocks, resolve_code): Handle
517 * st.c (gfc_free_statement): Likewise.
518 * match.h (gfc_match_omp_taskyield): New prototype.
519 * parse.c (decode_omp_directive): Handle taskyield directive.
520 Handle !$omp end atomic.
521 (case_executable): Add ST_OMP_TASKYIELD case.
522 (gfc_ascii_statement): Handle ST_OMP_TASKYIELD.
523 (parse_omp_atomic): Return gfc_statement instead of void.
524 For !$omp atomic capture parse two assignments instead of
525 just one and require !$omp end atomic afterwards, for
526 other !$omp atomic forms just allow !$omp end atomic at the
528 (parse_omp_structured_block, parse_executable): Adjust
529 parse_omp_atomic callers.
531 2011-08-02 Tobias Burnus <burnus@net-b.de>
533 * intrinsic.c (OMP_LIB): Updated openmp_version's
535 * gfortran.texi (OpenMP): Update ref to OpenMP 3.1.
536 * intrinsic.texi (OpenMP Modules): Update ref to OpenMP 3.1;
537 remove deleted omp_integer_kind and omp_logical_kind constants.
539 2011-07-31 Janus Weil <janus@gcc.gnu.org>
542 * resolve.c (resolve_structure_cons): Don't do the full dt resolution,
543 only call 'resolve_fl_derived0'.
544 (resolve_typebound_procedures): Resolve typebound procedures of
546 (resolve_fl_derived0): New function, which does a part of the work
547 for 'resolve_fl_derived'.
548 (resolve_fl_derived): Call 'resolve_fl_derived0' and do some additional
551 2011-07-30 Thomas Koenig <tkoenig@gcc.gnu.org>
554 * expr.c (gfc_simplify_expr): If end of a string is less
555 than zero, set it to zero.
557 2011-07-28 Jakub Jelinek <jakub@redhat.com>
560 * frontend-passes.c (optimize_minmaxloc): New function.
561 (optimize_expr): Call it.
563 2011-07-27 Tobias Burnus <burnus@net-b.de>
566 * trans-types.c (gfc_get_derived_type): Ensure that pointer
567 component types are marked as nonrestricted.
569 2011-07-27 Daniel Carrera <dcarrera@gmail.com>
572 * trans.c (gfc_allocate_using_malloc): Change function signature.
573 Return nothing. New parameter "pointer". Eliminate temorary variables.
574 (gfc_allocate_using_lib): Ditto.
575 (gfc_allocate_allocatable): Ditto. Update call to gfc_allocate_using_lib
576 and gfc_allocate_using_malloc. Do not free and then reallocate a
577 variable that is already allocated.
578 (gfc_likely): New function. Basedon gfc_unlikely.
579 * trans-array.c (gfc_array_init_size): New parameter "descriptor_block".
580 Instructions to modify the array descriptor are stored in this block
581 while other instructions continue to be stored in "pblock".
582 (gfc_array_allocate): Update call to gfc_array_init_size. Move the
583 descriptor_block so that the array descriptor is only updated if
584 the array was allocated successfully.
585 Update calls to gfc_allocate_allocatable and gfc_allocate_using_malloc.
586 * trans.h (gfc_allocate_allocatable): Change function signature.
587 Function now returns void.
588 (gfc_allocate_using_lib): Ditto, and new function parameter.
589 (gfc_allocate_using_malloc): Ditto.
590 * trans-openmp.c (gfc_omp_clause_default_ctor,
591 gfc_omp_clause_copy_ctor,gfc_trans_omp_array_reduction): Replace a call
592 to gfc_allocate_allocatable with gfc_allocate_using_malloc.
593 * trans-stmt.c (gfc_trans_allocate): Update function calls for
594 gfc_allocate_allocatable and gfc_allocate_using_malloc.
596 2011-07-26 Tobias Burnus <burnus@net-b.de>
598 * trans-array.c (CAF_TOKEN_FIELD): New macro constant.
599 (gfc_conv_descriptor_token): New function.
600 * trans-array.h (gfc_conv_descriptor_token): New prototype.
601 * trans-types.c (gfc_get_array_descriptor_base): For coarrays
602 with -fcoarray=lib, append "void *token" to the array descriptor.
603 (gfc_array_descriptor_base_caf): New static variable.
604 * trans-expr.c (gfc_conv_procedure_call): Handle token and offset
605 when passing a descriptor coarray to a nondescriptor dummy.
607 2011-07-23 Tobias Burnus <burnus@net-b.de>
609 * resolve.c (resolve_symbol): Fix coarray var decl check.
611 2011-07-21 Daniel Carrera <dcarrera@gmail.com>
613 * trans.c (gfc_allocate_with_status): Split into two functions
614 gfc_allocate_using_malloc and gfc_allocate_usig_lib.
615 (gfc_allocate_using_malloc): The status parameter is now the
616 actual status rather than a pointer. Code cleanup.
617 (gfc_allocate_using_lib): Ditto. Add new parametrs errmsg and
618 errlen. Pass these to the coarray lib.
619 * trans-openmp.c (gfc_omp_clause_default_ctor): Update calls to
620 gfc_allocate_allocatable.
621 (gfc_omp_clause_copy_ctor): Ditto.
622 (gfc_trans_omp_array_reduction): Ditto.
623 * trans-stmt.c (gfc_trans_allocate): Ditto. Update call to
624 gfc_allocate_using_malloc. Pass stat rather than pstat to the allocate
625 fuctions. If using coarray lib, pass errmsg and errlen to the allocate
626 functions. Move error checking outside the if (!gfc_array_allocate)
627 block so that it also affects trees produced by gfc_array_allocate.
628 * trans-array.c (gfc_array_allocate): Add new parameters errmsg
629 and errlen. Replace parameter pstat by status. Code cleanup. Update
630 calls to gfc_allocate_allocatable and gfc_allocate_using_malloc.
631 * trans-array.h (gfc_array_allocate): Update signature of
634 2011-07-21 Steven G. Kargl <kargl@gcc.gnu.org>
636 * gfortran.texi: Remove a duplicate word.
638 2011-07-21 Tobias Burnus <burnus@net-b.de>
640 * check.c (gfc_check_present): Allow coarrays.
641 * trans-array.c (gfc_conv_array_ref): Avoid casting
642 when a pointer is wanted.
643 * trans-decl.c (create_function_arglist): For -fcoarray=lib,
644 handle hidden token and offset arguments for nondescriptor
646 * trans-expr.c (get_tree_for_caf_expr): New function.
647 (gfc_conv_procedure_call): For -fcoarray=lib pass the
648 token and offset for nondescriptor coarray dummies.
649 * trans.h (lang_type): Add caf_offset tree.
650 (GFC_TYPE_ARRAY_CAF_OFFSET): New macro.
652 2011-07-19 Tobias Burnus <burnus@net-b.de>
654 * expr.c (gfc_is_coarray): New function.
655 * gfortran.h (gfc_is_coarray): New prototype.
656 * interface.c (compare_parameter): Use it.
658 2011-07-19 Richard Guenther <rguenther@suse.de>
660 * trans-expr.c (fill_with_spaces): Use fold_build_pointer_plus.
661 (gfc_trans_string_copy): Likewise.
662 * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Likewise.
663 * trans-types.c (gfc_get_array_descr_info): Likewise.
664 * trans.c (gfc_build_array_ref): Likewise.
666 2011-07-19 Janus Weil <janus@gcc.gnu.org>
669 * resolve.c (resolve_allocate_expr): Fix diagnostics for pointers.
671 2011-07-18 Tobias Burnus <burnus@net-b.de>
673 * trans-decl.c (gfc_build_qualified_array): Make coarray's
674 token TYPE_QUAL_RESTRICT.
676 2011-07-18 Tobias Burnus <burnus@net-b.de>
678 * resolve.c (resolve_transfer): Mention defined I/O
679 in the diagnostic for alloc_comp/pointer_comp.
681 2011-07-17 Tobias Burnus <burnus@net-b.de>
684 * module.c (check_for_ambiguous): Check whether the name is matches
685 the current program unit.
687 2011-07-17 Tobias Burnus <burnus@net-b.de>
690 * expr.c (gfc_check_pointer_assign): Fix checking for invalid
693 2011-07-16 Tobias Burnus <burnus@net-b.de>
695 * expr.c (gfc_ref_this_image): New function.
696 (gfc_is_coindexed): Use it.
697 * gfortran.h (gfc_ref_this_image): New prototype.
698 * resolve.c (resolve_deallocate_expr,
699 resolve_allocate_expr): Support alloc scalar coarrays.
700 * trans-array.c (gfc_conv_array_ref, gfc_array_init_size,
701 gfc_conv_descriptor_cosize, gfc_array_allocate,
702 gfc_trans_deferred_array): Ditto.
703 * trans-expr.c (gfc_conv_variable) Ditto.:
704 * trans-stmt.c (gfc_trans_deallocate): Ditto.
705 * trans-types.c (gfc_get_element_type, gfc_get_array_type_bounds
706 gfc_get_array_descr_info): Ditto.
707 * trans-decl.c (gfc_get_symbol_decl): Ditto.
709 2011-07-11 Jakub Jelinek <jakub@redhat.com>
712 * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Initialize
713 inner_size to gfc_index_one_node instead of integer_one_node.
715 2011-07-10 Tobias Burnus <burnus@net-b.de>
718 * intrinsic.c (add_functions): Use BT_VOID for 2nd argument of SIGNAL.
720 2011-07-09 Uros Bizjak <ubizjak@gmail.com>
723 * expr.c (gfc_get_corank): Change return value to int.
724 * gfortran.h (gfc_get_corank): Update function prototype.
726 2011-07-07 Mikael Morin <mikael.morin@sfr.fr>
729 * resolve.c (resolve_symbol): Force resolution of function result's
732 2011-07-07 Tobias Burnus <burnus@net-b.de>
734 * trans.c (gfc_allocate_with_status): Call _gfortran_caf_register
735 with NULL arguments for (new) stat=/errmsg= arguments.
737 2011-07-06 Daniel Carrera <dcarrera@gmail.com>
739 * trans-array.c (gfc_array_allocate): Rename allocatable_array to
740 allocatable. Rename function gfc_allocate_array_with_status to
741 gfc_allocate_allocatable_with_status. Update function call for
742 gfc_allocate_with_status.
743 * trans-opemp.c (gfc_omp_clause_default_ctor): Rename function
744 gfc_allocate_array_with_status to gfc_allocate_allocatable_with_status.
745 * trans-stmt.c (gfc_trans_allocate): Update function call for
746 gfc_allocate_with_status. Rename function gfc_allocate_array_with_status
747 to gfc_allocate_allocatable_with_status.
748 * trans.c (gfc_call_malloc): Add new parameter gfc_allocate_with_status
749 so it uses the library for memory allocation when -fcoarray=lib.
750 (gfc_allocate_allocatable_with_status): Renamed from
751 gfc_allocate_array_with_status.
752 (gfc_allocate_allocatable_with_status): Update function call for
753 gfc_allocate_with_status.
754 * trans.h (gfc_coarray_type): New enum.
755 (gfc_allocate_with_status): Update prototype.
756 (gfc_allocate_allocatable_with_status): Renamed from
757 gfc_allocate_array_with_status.
758 * trans-decl.c (generate_coarray_sym_init): Use the new constant
759 GFC_CAF_COARRAY_ALLOC in the call to gfor_fndecl_caf_register.
761 2011-07-06 Richard Guenther <rguenther@suse.de>
763 * f95-lang.c (gfc_init_decl_processing):
764 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
766 2011-07-04 Jakub Jelinek <jakub@redhat.com>
769 * gfortranspec.c (lang_specific_driver): Ignore options with
770 CL_ERR_MISSING_ARG errors.
772 2011-07-02 Janus Weil <janus@gcc.gnu.org>
775 * expr.c (gfc_check_vardef_context): Handle type-bound procedures.
777 2011-06-30 Jakub Jelinek <jakub@redhat.com>
780 * gfortran.h (gfc_constructor): Add repeat field.
781 * trans-array.c (gfc_conv_array_initializer): Handle repeat > 1.
782 * array.c (current_expand): Add repeat field.
783 (expand_constructor): Copy repeat.
784 * constructor.c (node_free, node_copy, gfc_constructor_get,
785 gfc_constructor_lookup): Handle repeat field.
786 (gfc_constructor_lookup_next, gfc_constructor_remove): New functions.
787 * data.h (gfc_assign_data_value): Add mpz_t * argument.
788 (gfc_assign_data_value_range): Removed.
789 * constructor.h (gfc_constructor_advance): Removed.
790 (gfc_constructor_lookup_next, gfc_constructor_remove): New prototypes.
791 * data.c (gfc_assign_data_value): Add REPEAT argument, handle it and
792 also handle overwriting a range with a single entry.
793 (gfc_assign_data_value_range): Removed.
794 * resolve.c (check_data_variable): Adjust gfc_assign_data_value
795 call. Use gfc_assign_data_value instead of
796 gfc_assign_data_value_expr.
798 2011-06-27 Janus Weil <janus@gcc.gnu.org>
801 * trans-array.c (structure_alloc_comps): Make sure sub-components
802 and extended types are correctly deallocated.
804 2011-06-21 Andrew MacLeod <amacleod@redhat.com>
806 * trans-openmp.c: Add sync_ or SYNC__ to builtin names.
807 * trans-stmt.c: Add sync_ or SYNC__ to builtin names.
808 * trans-decl.c: Add sync_ or SYNC__ to builtin names.
810 2011-06-21 Janus Weil <janus@gcc.gnu.org>
813 * class.c (gfc_find_derived_vtab): Make vtab and default initialization
814 symbols SAVE_IMPLICIT.
816 2011-06-20 Tobias Burnus <burnus@net-b.de>
819 * gfortran.h (gfc_check_vardef_context): Update prototype.
820 (iso_fortran_env_symbol): Handle derived types.
821 (symbol_attribute): Add lock_comp.
822 * expr.c (gfc_check_vardef_context): Add LOCK_TYPE check.
823 * interface.c (compare_parameter, gfc_procedure_use): Handle
825 (compare_actual_formal): Update
826 gfc_check_vardef_context call.
827 * check.c (gfc_check_atomic_def, gfc_check_atomic_ref): Ditto.
828 * intrinsic.c (check_arglist): Ditto.
829 * io.c (resolve_tag, gfc_resolve_dt, gfc_resolve_inquire): Ditto.
830 * iso-fortran-env.def (ISOFORTRAN_LOCK_TYPE): Add.
831 * intrinsic.texi (ISO_FORTRAN_ENV): Document LOCK_TYPE.
832 * module.c (mio_symbol_attribute): Handle lock_comp.
833 (create_derived_type): New function.
834 (use_iso_fortran_env_module): Call it to handle LOCK_TYPE.
835 * parse.c (parse_derived): Add constraint check for LOCK_TYPE.
836 * resolve.c (resolve_symbol, resolve_lock_unlock): Add constraint
837 checks for LOCK_TYPE.
838 (gfc_resolve_iterator, resolve_deallocate_expr,
839 resolve_allocate_expr, resolve_code, resolve_transfer): Update
840 gfc_check_vardef_context call.
841 * trans-stmt.h (gfc_trans_lock_unlock): New prototype.
842 * trans-stmt.c (gfc_trans_lock_unlock): New function.
843 * trans.c (trans_code): Handle LOCK and UNLOCK.
845 2011-06-18 Janus Weil <janus@gcc.gnu.org>
848 * decl.c (gfc_match_procedure): Allow PROCEDURE declarations inside
851 2011-06-17 Janus Weil <janus@gcc.gnu.org>
854 * check.c (gfc_check_move_alloc): If 'TO' argument is polymorphic,
855 make sure the vtab is present.
857 2011-06-16 Janus Weil <janus@gcc.gnu.org>
860 * interface.c (gfc_extend_assign): Propagate the locus from the
861 assignment to the type-bound procedure call.
863 2011-06-16 Janus Weil <janus@gcc.gnu.org>
866 * module.c (mio_component): Make sure the 'class_ok' attribute is set
867 for use-associated CLASS components.
868 * parse.c (parse_derived): Check for 'class_ok' attribute.
869 * resolve.c (resolve_fl_derived): Ditto.
871 2011-06-13 Thomas Koenig <tkoenig@gcc.gnu.org>
873 * frontend-passes.c (remove_trim): New function.
874 (optimize_assignment): Use it.
875 (optimize_comparison): Likewise. Return correct status
878 2011-06-12 Tobias Burnus
881 * trans-expr.c (gfc_trans_assignment_1): Tell
882 gfc_trans_scalar_assign to also deep-copy RHS nonvariables
883 with allocatable components.
884 * trans-array.c (gfc_conv_expr_descriptor): Ditto.
886 2011-05-11 Thomas Koenig <tkoenig@gcc.gnu.org>
888 * frontend-passes.c (optimize_assignment): Follow chains
889 of concatenation operators to the end for removing trailing
890 TRIMS for assignments.
892 2011-06-10 Daniel Carrera <dcarrera@gmail.com>
894 * trans-decl.c (gfc_build_builtin_function_decls):
895 Updated declaration of caf_sync_all and caf_sync_images.
896 * trans-stmt.c (gfc_trans_sync): Function
897 can now handle a "stat" variable that has an integer type
898 different from integer_type_node.
900 2011-06-09 Richard Guenther <rguenther@suse.de>
902 * trans.c (gfc_allocate_array_with_status): Mark error path
905 2011-06-08 Tobias Burnus <burnus@net-b.de>
908 * gfortran.h (gfc_statement): Add ST_LOCK and ST_UNLOCK.
909 (gfc_exec_op): Add EXEC_LOCK and EXEC_UNLOCK.
910 (gfc_code): Add expr4.
911 * match.h (gfc_match_lock, gfc_match_unlock): New prototypes.
912 * match.c (gfc_match_lock, gfc_match_unlock,
913 lock_unlock_statement): New functions.
914 (sync_statement): Bug fix, avoiding double freeing.
915 (gfc_match_if): Handle LOCK/UNLOCK statement.
916 * parse.c (decode_statement, next_statement,
917 gfc_ascii_statement): Ditto.
918 * st.c (gfc_free_statement): Handle LOCK and UNLOCK.
919 * resolve.c (resolve_lock_unlock): New function.
920 (resolve_code): Call it.
921 * dump-parse-tree.c (show_code_node): Handle LOCK/UNLOCK.
923 2011-06-07 Richard Guenther <rguenther@suse.de>
925 * f95-lang.c (gfc_init_decl_processing): Do not set
926 size_type_node or call set_sizetype.
928 2011-06-05 Tobias Burnus <burnus@net-b.de>
931 * trans-expr.c (gfc_conv_procedure_call): Fix -fcheck=pointer
934 2011-06-05 Andreas Schmidt <andreas.schmidt.42@gmx.net>
935 Thomas Koenig <tkoenig@gcc.gnu.org>
937 * dump-parse-tree.c (show_symbol): Don't dump namespace
938 for ENTRY to avoid infinite recursion.
940 2011-06-02 Asher Langton <langton2@llnl.gov>
943 * trans-decl.c (gfc_trans_deferred_vars): Treat assumed-size Cray
944 pointees as AS_EXPLICIT.
946 2011-06-02 Asher Langton <langton2@llnl.gov>
949 * decl.c (variable_decl): Merge current_as before copying to cp_as.
951 2011-06-02 Steven G. Kargl <kargl@gcc.gnu.org>
954 * decl.c (gfc_match_modproc): Allow for a double colon in a module
956 * parse.c ( decode_statement): Deal with whitespace around :: in
959 2011-05-31 Tobias Burnus <burnus@net-b.de>
962 * intrinsic.c (klass): Add CLASS_ATOMIC.
963 (add_subroutines): Add atomic_ref/atomic_define.
964 * intrinsic.texi (ATOMIC_REF, ATOMIC_DEFINE): Document.
965 * intrinsic.h (gfc_check_atomic_def, gfc_check_atomic_ref,
966 gfc_resolve_atomic_def, gfc_resolve_atomic_ref): New prototypes.
967 * gfortran.h (gfc_isym_id): Add GFC_ISYM_ATOMIC_DEF
968 and GFC_ISYM_ATOMIC_REF.
969 (gfc_atomic_int_kind, gfc_atomic_logical_kind): New global vars.
970 * iresolve.c (gfc_resolve_atomic_def, gfc_resolve_atomic_ref): New
972 * check.c (gfc_check_atomic, gfc_check_atomic_def,
973 gfc_check_atomic_ref): New functions.
974 * iso-fortran-env.def (ISOFORTRANENV_FILE_ATOMIC_INT_KIND,
975 ISOFORTRANENV_FILE_ATOMIC_LOGICAL_KIND): Change kind value.
976 * trans-intrinsic.c (conv_intrinsic_atomic_def,
977 conv_intrinsic_atomic_ref, gfc_conv_intrinsic_subroutine): New
979 (conv_intrinsic_move_alloc) Renamed from
980 gfc_conv_intrinsic_move_alloc - and made static.
981 * trans.h (gfc_conv_intrinsic_move_alloc): Remove.
982 (gfc_conv_intrinsic_subroutine) Add prototype.
983 * trans.c (trans_code): Call gfc_conv_intrinsic_subroutine.
984 * trans-types (gfc_atomic_int_kind, gfc_atomic_logical_kind): New
986 (gfc_init_kinds): Set them.
988 2011-05-31 Tobias Burnus <burnus@net-b.de>
991 * trans-array.c (gfc_trans_dummy_array_bias): Handle
992 cobounds of assumed-shape arrays.
994 2011-05-31 Tobias Burnus <burnus@net-b.de>
997 * resolve.c (resolve_fl_variable): Handle static coarrays
998 with non-constant cobounds.
1000 2011-05-29 Janus Weil <janus@gcc.gnu.org>
1003 * module.c (mio_component_ref): Handle components of extended types.
1004 * symbol.c (gfc_find_component): Return is sym is NULL.
1006 2011-05-29 Tobias Burnus <burnus@net-b.de>
1009 * interface.c (compare_parameter): Add check for passing coarray
1010 to allocatable noncoarray dummy.
1012 2011-05-29 Tobias Burnus <burnus@net-b.de>
1013 Richard Guenther <rguenther@suse.de>
1016 * trans-types.c (gfc_get_nodesc_array_type): Don't mess with
1017 the type's TREE_TYPE.
1018 * trans-array.c (gfc_conv_array_ref): Use TYPE_MAIN_VARIANT.
1019 * trans.c (gfc_build_array_ref): Ditto.
1021 2011-05-27 Tobias Burnus <burnus@net-b.de>
1024 * check.c (gfc_check_associated, gfc_check_null): Add coindexed check.
1025 * match.c (gfc_match_nullify): Ditto.
1026 * resolve.c (resolve_deallocate_expr): Ditto.
1027 * trans-types.c (gfc_get_nodesc_array_type): Don't set restricted
1030 2011-05-27 Tobias Burnus <burnus@net-b.de>
1033 * gfortran.h (gfc_isym_id): Add GFC_ISYM_RANK.
1034 * intrinsic.c (add_functions): Add rank intrinsic.
1035 (gfc_check_intrinsic_standard): Handle GFC_STD_F2008_TR.
1036 * intrinsic.h (gfc_simplify_rank, gfc_check_rank): Add prototypes.
1037 * simplify.c (gfc_simplify_rank): New function.
1038 * intrinsic.texi (RANK): Add description for rank intrinsic.
1039 * check.c (gfc_check_rank): New function.
1041 2011-05-26 Paul Thomas <pault@gcc.gnu.org>
1042 Thomas Koenig <tkoenig@gcc.gnu.org>
1045 * trans-expr.c (gfc_trans_assignment_1): GFC_REVERSE_NOT_SET
1046 changed to GFC_ENABLE_REVERSE.
1047 * trans-array.c (gfc_init_loopinfo): GFC_CANNOT_REVERSE changed
1048 to GFC_INHIBIT_REVERSE.
1049 * gfortran.h : Enum gfc_reverse is now GFC_ENABLE_REVERSE,
1050 GFC_FORWARD_SET, GFC_REVERSE_SET and GFC_INHIBIT_REVERSE.
1051 * dependency.c (gfc_dep_resolver): Change names for elements of
1052 gfc_reverse as necessary. Change the logic so that forward
1053 dependences are remembered as well as backward ones. When both
1054 have appeared, force a temporary.
1056 2011-05-26 Tobias Burnus <burnus@net-b.de>
1059 * trans-array.c (gfc_conv_array_ref): Handle pointer coarrays.
1060 * trans-decl.c (has_coarray_vars, caf_init_block,
1061 gfor_fndecl_caf_register): New file-global variables.
1062 (gfc_finish_var_decl): Make sure that coarrays in main are static.
1063 (gfc_build_qualified_array): Generate coarray token variable.
1064 (gfc_get_symbol_decl): Don't use a static initializer for coarrays.
1065 (gfc_build_builtin_function_decls): Set gfor_fndecl_caf_register.
1066 (gfc_trans_deferred_vars, gfc_emit_parameter_debug_info): Skip for
1068 (generate_local_decl): Check for local coarrays.
1069 (create_main_function): SYNC ALL before calling MAIN.
1070 (generate_coarray_sym_init): Register static coarray.
1071 (generate_coarray_init): Generate CAF registering constructor
1073 (gfc_generate_function_code): Call it, if needed, do not create
1075 (gfc_generate_module_vars, gfc_process_block_locals): Call
1076 generate_coarray_init.
1077 * trans-types.c (gfc_get_nodesc_array_type): Generate pointers for
1079 * trans.h (gfor_fndecl_caf_register): New variable.
1080 (lang_type): New element caf_token.
1081 (GFC_TYPE_ARRAY_CAF_TOKEN): New macro.
1083 2011-05-24 Joseph Myers <joseph@codesourcery.com>
1085 * Make-lang.in (GFORTRAN_D_OBJS): Remove prefix.o.
1086 (gfortran$(exeext)): Use libcommon-target.a.
1088 2011-05-22 Thomas Koenig <tkoenig@gcc.gnu.org>
1090 * frontend-passes.c (cfe_register_funcs): Also register
1091 character functions if their charlens are known and constant.
1092 Also register allocatable functions.
1094 2011-05-21 Janus Weil <janus@gcc.gnu.org>
1097 * match.c (select_type_set_tmp): Make the temporary ALLOCATABLE if the
1098 selector is ALLOCATABLE.
1100 2011-05-20 Janus Weil <janus@gcc.gnu.org>
1103 * module.c (write_dt_extensions): Do not write extended types which
1104 are local to a subroutine.
1106 2011-05-20 Joseph Myers <joseph@codesourcery.com>
1108 * Make-lang.in (GFORTRAN_D_OBJS): Remove version.o and intl.o.
1110 2011-05-20 Janne Blomqvist <jb@gcc.gnu.org>
1112 * gfortran.texi (set_fpe): Update documentation.
1113 * invoke.texi (-ffpe-trap): Likewise.
1114 * libgfortran.h (GFC_FPE_PRECISION): Rename to GFC_FPE_INEXACT.
1115 * options.c (gfc_handle_fpe_trap_option): Handle inexact and make
1116 precision an alias for it.
1118 2011-05-19 Tobias Burnus <burnus@net-b.de>
1121 * trans-types.c (gfc_get_element_type): Handle scalar coarrays.
1122 (gfc_get_nodesc_array_type): Make a variant-type copy for scalar
1124 * trans.c (gfc_build_array_ref): Return original type not variant
1125 copy for scalar coarrays.
1126 * trans-array.c (gfc_conv_array_ref): Ditto.
1128 2011-05-18 Janus Weil <janus@gcc.gnu.org>
1131 * trans-intrinsic.c (gfc_conv_intrinsic_move_alloc): Deallocate 'TO'
1132 argument to avoid memory leaks.
1134 2011-05-16 Tobias Burnus <burnus@net-b.de>
1136 * gfortran.texi (_gfortran_set_options): Add GFC_STD_F2008_TR.
1137 (Fortran 2008 status): Multi-image support for coarrays.
1138 (TR 19113 status): New section.
1140 2011-05-15 Tobias Burnus <burnus@net-b.de>
1143 actual argument is not an array; rank mismatch is diagnosted later.
1144 * trans-decl.c (gfc_get_symbol_decl, gfc_trans_deferred_vars): Handle
1146 * trans-types.c (gfc_get_array_type_bounds): Ditto.
1148 2011-05-15 Joern Rennecke <amylaar@spamcop.net>
1151 * trans-types.c: Include "tm.h".
1152 [0] (c_size_t_size): Remove.
1154 2011-05-15 Janne Blomqvist <jb@gcc.gnu.org>
1157 * gfortran.texi (_gfortran_set_options): Even though -fbacktrace
1158 is now the default, the library defaults to backtracing disabled.
1160 2011-05-14 Tobias Burnus <burnus@net-b.de>
1162 * lang.opt (fdump-core): Re-add as ignored option
1163 for backward compatibility.
1165 2011-05-14 Janne Blomqvist <jb@gcc.gnu.org>
1168 * gfortran.texi: Update mixed-language programming section
1169 reflecting the removal of the fdump-core option, and that
1170 -fbacktrace is now enabled by default.
1172 2011-05-14 Thomas Koenig <tkoenig@gcc.gnu.org>
1175 * frontend-passes.c (cfe_register_funcs): Also register functions
1176 for potential elimination if the rank is > 0, the shape is unknown
1177 and reallocate on assignment is active.
1178 (create_var): For rank > 0 functions with unknown shape, create
1179 an allocatable temporary.
1181 2011-05-14 Tobias Burnus <burnus@net-b.de>
1184 * interface.c (compare_parameter): Skip diagnostic if
1185 actual argument is not an array; rank mismatch is diagnosted later.
1187 2011-05-14 Tobias Burnus <burnus@net-b.de>
1189 * options.c (gfc_init_options, gfc_post_options): Enable
1190 -fstack-arrays by default if -Ofast is used.
1191 * invoke.texi (-fstack-arrays): Document this.
1193 2011-05-14 Janne Blomqvist <jb@gcc.gnu.org>
1196 * gfortran.h (gfc_option_t): Remove flag_dump_core.
1197 * gfortran.texi (GFORTRAN_ERROR_DUMPCORE): Remove section.
1198 (GFORTRAN_ERROR_BACKTRACE): Document that it's enabled by default.
1199 * intrinsic.texi (ABORT): Remove explanation of -fdump-core.
1200 * invoke.texi: Remove -fdump-core, document that -fbacktrace is
1202 * lang.opt: Remove -fdump-core.
1203 * options.c (gfc_init_options): Make backtrace default to enabled,
1205 (gfc_handle_option): Remove OPT_fdump-core.
1206 * trans-decl.c: Pass a 0 to preserve ABI.
1208 2011-05-14 Janne Blomqvist <jb@gcc.gnu.org>
1210 * gfortran.texi: Remove GFORTRAN_USE_STDERR documentation.
1212 2011-05-13 Tobias Burnus <burnus@net-b.de>
1215 * io.c (resolve_tag_format, resolve_tag): Make sure
1216 that the string is of default kind.
1217 (gfc_resolve_inquire): Also resolve decimal tag.
1219 2011-05-12 Tobias Burnus <burnus@net-b.de>
1222 * resolve.c (resolve_intrinsic): Don't resolve module
1223 intrinsics multiple times.
1225 2011-05-11 Tobias Burnus <burnus@net-b.de>
1228 * expr.c (gfc_is_constant_expr): Use e->value.function.esym
1229 instead of e->symtree->n.sym, if available.
1231 2011-05-07 Eric Botcazou <ebotcazou@adacore.com>
1233 * f95-lang.c (global_bindings_p): Return bool and simplify.
1235 2011-05-07 Tobias Burnus <burnus@net-b.de>
1239 * trans.h: Move gfc_init_coarray_decl prototype ...
1240 * gfortran.h: ... to here.
1241 * parse.c (translate_all_program_units): Call gfc_init_coarray_decl.
1242 (gfc_parse_file): Update translate_all_program_units call.
1243 * trans-decl.c (gfc_init_coarray_decl): Fix variable declaration,
1244 new argument whether DECL_EXTERNAL should be used.
1245 (create_main_function): Update gfc_init_coarray_decl call.
1246 * trans-intrinsic.c (trans_this_image, trans_image_index,
1247 conv_intrinsic_cobound): Ditto.
1249 2011-05-06 Tobias Burnus <burnus@net-b.de>
1252 * trans-array.c (gfc_walk_variable_expr): Continue walking
1253 for scalar coarrays.
1254 * trans-intrinsic.c (convert_element_to_coarray_ref): New function.
1255 (trans_this_image, trans_image_index, conv_intrinsic_cobound): Use it.
1256 (trans_this_image): Fix algorithm.
1257 * trans-types.c (gfc_get_element_type, gfc_get_array_descriptor_base,
1258 gfc_sym_type): Handle scalar coarrays.
1260 2011-05-06 Tobias Burnus <burnus@net-b.de>
1264 * lang.opt (std=f2008tr): New.
1265 * libgfortran.h (GFC_STD_F2008_TR): New macro constant.
1266 * decl.c (verify_c_interop_param): Allow OPTIONAL in BIND(C)
1267 procedures for -std=f2008tr/gnu/legacy.
1268 (gfc_match_import): Set sym to NULL.
1269 * options.c (set_default_std_flags,gfc_handle_option): Handle
1271 * invoke.texi (-std=): Document -std=f2008tr.
1273 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
1275 * trans-decl.c (gfc_trans_entry_master_switch): Call build_case_label.
1276 * trans-io.c (add_case): Likewise.
1277 * trans-stmt.c (gfc_trans_integer_select): Likewise.
1278 (gfc_trans_character_select): Likewise.
1280 2011-05-05 Eric Botcazou <ebotcazou@adacore.com>
1282 * trans-decl.c (trans_function_start): Do not set
1283 dont_save_pending_sizes_p.
1285 2011-05-04 Nathan Froyd <froydnj@codesourcery.com>
1287 * trans.h (gfc_chainon_list): Delete.
1288 * trans.c (gfc_chainon_list): Delete.
1290 2011-05-04 Tobias Burnus <burnus@net-b.de>
1293 * invoke.texi (fno-protect-parens): Document
1294 that -Ofast implies -fno-protect-parens.
1295 * options.c (gfc_init_options, gfc_post_options):
1296 Make -Ofast imply -fno-protect-parens.
1298 2011-05-04 Nathan Froyd <froydnj@codesourcery.com>
1300 * trans-decl.c (build_library_function_decl_1): Call
1301 build_function_type_vec. Adjust argument list building accordingly.
1302 * trans-intrinsic.c (gfc_get_intrinsic_lib_fndecl): Likewise.
1303 * trans-types.c (gfc_get_function_type): Likewise.
1305 2011-05-04 Richard Guenther <rguenther@suse.de>
1307 * trans-array.c (gfc_trans_array_constructor_value): Use
1308 size_int for bounds of range types.
1309 (gfc_trans_array_constructor_value): Use size_type_node
1310 for memcpy argument.
1311 * trans-common.c (build_field): Use gfc_charlen_type_node
1313 * trans-openmp.c (gfc_trans_omp_clauses): Do not pass NULL
1314 as type to build_int_cst.
1315 * trans-const.c (gfc_build_string_const): Use size_int
1316 for bounds of range types.
1317 (gfc_build_wide_string_const): Likewise.
1318 * trans-stmt.c (gfc_trans_label_assign): Use gfc_charlen_type_node
1320 (gfc_trans_character_select): Likewise.
1321 (gfc_trans_character_select): Do not pass NULL
1322 as type to build_int_cst.
1323 (gfc_trans_character_select): Use size_int for bounds of range types.
1324 * trans-io.c (gfc_build_io_library_fndecls): Likewise.
1325 (add_case): Do not pass NULL as type to build_int_cst.
1326 (transfer_expr): Likewise.
1327 (transfer_array_desc): Likewise.
1328 * trans-decl.c (gfc_add_assign_aux_vars): Use gfc_charlen_type_node
1330 (gfc_trans_assign_aux_var): Likewise.
1331 (create_main_function): Use size_int for bounds of range types.
1332 * trans-intrinsic.c (gfc_conv_intrinsic_minmax_char): Do not pass
1333 NULL as type to build_int_cst.
1334 (gfc_conv_intrinsic_spacing): Likewise.
1335 (gfc_conv_intrinsic_rrspacing): Likewise.
1336 (gfc_conv_intrinsic_len): Use gfc_charlen_type_node for lengths.
1338 2011-05-04 Richard Guenther <rguenther@suse.de>
1340 * trans-types.c (gfc_get_array_type_bounds): Remove zero notrunc
1341 argument to int_const_binop.
1343 2011-05-03 Tobias Burnus <burnus@net-b.de>
1346 * trans-intrinsic.c (trans_this_image): Implement version with
1348 (conv_intrinsic_cobound): Simplify code.
1349 (gfc_conv_intrinsic_function): Call trans_this_image for
1350 this_image(coarray) except for -fcoarray=single.
1352 2011-05-02 Steven G. Kargl <kargl@gcc.gnu.org>
1355 * gfortran.texi: Document the 'Q' exponent-letter extension.
1356 * invoke.texi: Document -Wreal-q-constant.
1357 * lang.opt: Add -Wreal-q-constant option.
1358 * gfortran.h: Add warn_real_q_constant to option struct.
1359 * primary.c (match_real_constant): Use it. Accept 'Q' as
1360 exponent-letter for REAL(16) real-literal-constant with a
1361 fallback to REAL(10) or error if REAL(10) is not available.
1362 * options.c (gfc_init_options, set_Wall) Set it.
1363 (gfc_handle_option): Handle new option.
1365 2011-04-30 Thomas Koenig <tkoenig@gcc.gnu.org>
1367 * dump-prase-tree.c (show_code_node): Set the current
1368 namespace to the BLOCK before displaying it; restore
1371 2011-04-30 Tobias Burnus <burnus@net-b.de>
1374 * decl.c (gfc_match_import): Don't try to find the
1375 symbol if already found.
1377 2011-04-30 Paul Thomas <pault@gcc.gnu.org>
1380 * trans-expr.c (fcncall_realloc_result): Set the bounds and the
1381 offset so that the lbounds are one.
1382 (gfc_trans_arrayfunc_assign): Add rank to arguments of above.
1384 2011-04-29 Paul Thomas <pault@gcc.gnu.org>
1387 * trans-expr.c (arrayfunc_assign_needs_temporary): Deal with
1388 automatic reallocation when the lhs is a target.
1391 * trans-expr.c (fcncall_realloc_result): Make sure that the
1392 result dtype field is set before the function call.
1394 2011-04-29 Tobias Burnus <burnus@net-b.de>
1397 * resolve.c (resolve_typebound_generic_call): Don't check access
1398 flags of the specific function.
1401 * resolve.c (resolve_formal_arglist): Don't change AS_DEFERRED
1402 to AS_ASSUMED_SHAPE for function results.
1403 (resolve_fl_var_and_proc): Print also for function results with
1404 AS_DEFERRED an error, if they are not a pointer or allocatable.
1405 (resolve_types): Make sure arguments of procedures in interface
1406 blocks are resolved.
1408 2011-04-29 Michael Matz <matz@suse.de>
1410 * options.c (options.c): Set warn_maybe_uninitialized.
1412 2011-04-28 Tobias Burnus <burnus@net-b.de>
1415 * resolve.c (resolve_fl_var_and_proc): Print diagnostic of
1416 function results only once.
1417 (resolve_symbol): Always resolve function results.
1420 * expr.c (gfc_check_vardef_context): Fix handling of generic
1422 * interface.c (check_interface0): Reject internal functions
1423 in generic interfaces, unless -std=gnu.
1425 2011-04-27 Tobias Burnus <burnus@net-b.de>
1428 * resolve.c (resolve_global_procedure): Error recovery -
1429 avoid segfault for (non)character-returning functions.
1431 2011-04-26 Thomas Koenig <tkoenig@gcc.gnu.org>
1433 * decl.c (gfc_match_end): Check that the block name starts
1435 * parse.c (gfc_build_block_ns): Make block names unique by
1438 2011-04-26 Thomas Koenig <tkoenig@gcc.gnu.org>
1440 * frontend-passes.c (inserted_block): New variable.
1441 (changed_statement): Likewise.
1442 (create_var): Encase statement to be operated on in a BLOCK.
1443 Adjust code insertion for BLOCK.
1444 (cfe_code): Set inserted_block and changed_statement to NULL.
1446 2011-04-23 Tobias Burnus <burnus@net-b.de>
1449 * module.c (mio_array_spec): Set as->cotype on reading.
1450 * resolve.c (resolve_allocate_expr): Fix allocating coarray
1453 2011-04-21 Thomas Koenig <tkoenig@gcc.gnu.org>
1456 * frontend_passes (cfe_register_funcs): Remove workaround for DO
1458 (gfc_code_walker): Make sure the pointer to the current
1459 statement doen't change when other statements are inserted.
1461 2011-04-21 Tobias Burnus <burnus@net-b.de>
1464 * array.c (gfc_match_array_spec): Fix maximal rank(+corank) check.
1466 2011-04-20 Jim Meyering <meyering@redhat.com>
1468 * expr.c (free_expr0): Remove useless if-before-free.
1469 * gfortranspec.c (lang_specific_pre_link): Likewise.
1470 * interface.c (gfc_extend_expr): Likewise.
1471 * trans-openmp.c (gfc_trans_omp_array_reduction): Likewise.
1473 2011-04-19 Tobias Burnus <burnus@net-b.de>
1478 * module.c (fix_mio_expr): Commit created symbol.
1480 2011-04-19 Janne Blomqvist <jb@gcc.gnu.org>
1482 * scanner.c (load_file): Use XCNEWVAR instead of xcalloc.
1484 2011-04-19 Janne Blomqvist <jb@gcc.gnu.org>
1486 * frontend-passes.c (gfc_run_passes): Use XDELETEVEC instead of
1489 2011-04-19 Janne Blomqvist <jb@gcc.gnu.org>
1491 * misc.c (gfc_getmem): Remove function.
1492 * gfortran.h: Remove gfc_getmem prototype. Replace gfc_getmem
1493 usage with XCNEW or XCNEWVEC.
1494 * expr.c (gfc_check_assign_symbol): Replace gfc_getmem usage with
1496 * options.c (gfc_handle_module_path_options)
1497 (gfc_get_option_string): Likewise.
1498 * resolve.c (gfc_resolve_forall): Likewise.
1499 * simplify.c (simplify_transformation_to_array): Likewise.
1500 * target-memory.c (gfc_target_interpret_expr): Likewise.
1501 * trans-common.c (get_segment_info, copy_equiv_list_to_ns)
1502 (get_init_field): Likewise.
1503 * trans-expr.c (gfc_conv_statement_function): Likewise.
1504 * trans-io.c (nml_full_name): Likewise.
1505 * trans-stmt.c (gfc_trans_forall_1): Likewise.
1506 * scanner.c (load_file): Replace gfc_getmem usage with xcalloc.
1508 2011-04-19 Tobias Burnus <burnus@net-b.de>
1511 * parse.c (resolve_all_program_units): Skip modules.
1512 (translate_all_program_units): Handle modules.
1513 (gfc_parse_file): Defer code generation for modules.
1515 2011-04-19 Martin Jambor <mjambor@suse.cz>
1517 * trans-decl.c (gfc_generate_function_code): Call cgraph_create_node
1518 instead of cgraph_get_create_node.
1520 2011-04-18 Jim Meyering <meyering@redhat.com>
1522 remove now-unused definition of gfc_free
1523 * misc.c (gfc_free): Remove function.
1524 * gfortran.h (gfc_free): Remove its prototype.
1526 2011-04-18 Jim Meyering <meyering@redhat.com>
1528 convert each use of gfc_free (p) to free (p)
1529 Do that by running this command:
1530 perl -pi -e 's/\bgfc_free ?\(/free (/' \
1531 $(git grep -El '\bgfc_free ?\(')
1532 which also corrects the few uses that lacked a space between
1533 the function name and the open parenthesis.
1534 Manually undo the change to the function definition itself
1535 and its prototype. They'll be removed next.
1536 * array.c (gfc_free_array_spec, gfc_set_array_spec): s/gfc_free/free/
1537 * constructor.c (node_free): Likewise.
1538 * cpp.c (dump_queued_macros): Likewise.
1539 * data.c (gfc_assign_data_value): Likewise.
1540 * decl.c (free_variable, free_value, gfc_free_data): Likewise.
1541 (gfc_free_data_all, match_old_style_init): Likewise.
1542 (gfc_set_constant_character_len, gfc_free_enum_history, NUM_DECL):
1544 (gfc_match_modproc): Likewise.
1545 * dependency.c (check_section_vs_section): Likewise.
1546 * error.c (gfc_pop_error, gfc_free_error): Likewise.
1547 * expr.c (free_expr0, gfc_free_expr, gfc_free_actual_arglist): Likewise.
1548 (gfc_free_ref_list, gfc_replace_expr, gfc_copy_ref): Likewise.
1549 (find_substring_ref, gfc_simplify_expr, gfc_check_assign_symbol):
1551 * frontend-passes.c (gfc_run_passes, cfe_expr_0): Likewise.
1552 (strip_function_call, optimize_comparison): Likewise.
1553 * interface.c (gfc_free_interface, arginfo, check_interface0): Likewise.
1554 (CHECK_OS_COMPARISON, gfc_extend_assign, gfc_free_formal_arglist):
1556 * intrinsic.c (gfc_intrinsic_done_1, gfc_convert_type_warn): Likewise.
1557 (gfc_convert_chartype): Likewise.
1558 * io.c (gfc_free_open, compare_to_allowed_values, gfc_free_close):
1560 (gfc_free_filepos, gfc_free_dt, gfc_free_inquire): Likewise.
1561 * match.c (gfc_free_iterator, gfc_match_associate): Likewise.
1562 (gfc_free_alloc_list, gfc_free_namelist, gfc_free_equiv_until):
1564 (free_case, gfc_free_forall_iterator): Likewise.
1566 * module.c (free_pi_tree, resolve_fixups, free_rename): Likewise.
1567 (free_true_name, peek_atom, mio_allocated_wide_string): Likewise.
1568 (mio_pool_string, mio_internal_string, mio_gmp_integer): Likewise.
1569 (mio_gmp_real, mio_expr, mio_typebound_proc): Likewise.
1570 (mio_full_typebound_tree, skip_list, load_equiv): Likewise.
1571 (free_written_common, gfc_use_module, gfc_free_use_stmts): Likewise.
1572 * openmp.c (gfc_free_omp_clauses): Likewise.
1573 * options.c (gfc_post_options): Likewise.
1574 * parse.c (select_type_pop, parse_omp_structured_block): Likewise.
1575 * primary.c (gfc_free_structure_ctor_component): Likewise.
1576 * resolve.c (resolve_structure_cons, check_host_association): Likewise.
1577 (gfc_resolve_forall, resolve_equivalence): Likewise.
1578 * scanner.c (gfc_scanner_done_1, gfc_release_include_path): Likewise.
1579 (gfc_define_undef_line, preprocessor_line, include_line): Likewise.
1580 (load_file, gfc_read_orig_filename): Likewise.
1581 * simplify.c (simplify_transformation_to_array): Likewise.
1582 (gfc_simplify_ibits, simplify_shift, gfc_simplify_ishftc, STRING):
1584 (gfc_simplify_compiler_options): Likewise.
1585 * st.c (gfc_free_statement, gfc_free_statements): Likewise.
1586 (gfc_free_association_list): Likewise.
1587 * symbol.c (free_components, gfc_free_st_label, free_st_labels):
1589 (gfc_delete_symtree, gfc_free_symbol, gfc_undo_symbols): Likewise.
1590 (free_old_symbol, gfc_commit_symbols, free_tb_tree): Likewise.
1591 (free_common_tree, free_uop_tree, free_sym_tree): Likewise.
1592 (gfc_free_dt_list, gfc_free_equiv_infos, gfc_free_equiv_lists):
1594 (gfc_free_finalizer, gfc_free_charlen, free_entry_list): Likewise.
1595 (gfc_free_namespace): Likewise.
1596 * trans-array.c (gfc_free_ss, gfc_trans_array_bound_check): Likewise.
1597 (gfc_conv_array_ref, gfc_conv_ss_startstride): Likewise.
1598 (gfc_trans_dummy_array_bias, gfc_conv_array_parameter): Likewise.
1599 * trans-common.c (get_init_field, create_common): Likewise.
1600 * trans-const.c (gfc_build_wide_string_const): Likewise.
1601 (gfc_conv_string_init): Likewise.
1602 * trans-decl.c (gfc_generate_function_code): Likewise.
1603 * trans-expr.c (gfc_conv_substring, gfc_free_interface_mapping):
1605 (SCALAR_POINTER, gfc_conv_statement_function): Likewise.
1606 (gfc_trans_subarray_assign): Likewise.
1607 * trans-intrinsic.c (conv_generic_with_optional_char_arg): Likewise.
1608 * trans-io.c (gfc_trans_io_runtime_check, set_string): Likewise.
1609 (transfer_namelist_element, transfer_array_component): Likewise.
1610 * trans-openmp.c (gfc_trans_omp_array_reduction): Likewise.
1611 * trans-stmt.c (cleanup_forall_symtrees, gfc_trans_forall_1): Likewise.
1612 * trans.c (trans_runtime_error_vararg, gfc_restore_backend_locus):
1615 2011-04-15 Jim Meyering <meyering@redhat.com>
1617 gfortran: remove cpp definition of free, ...
1618 in preparation for the s/gfc_free/free/ transformation.
1619 * gfortran.h (free): Remove macro definition that would otherwise
1620 prevent direct use of the function.
1622 2011-04-18 Tobias Burnus <burnus@net-b.de>
1625 * array.c (gfc_match_array_ref): Check for too many codimensions.
1626 * check.c (gfc_check_image_index): Check number of elements
1628 * simplify.c (gfc_simplify_image_index): Remove unreachable checks.
1630 2011-04-18 Tobias Burnus <burnus@net-b.de>
1633 * iresolve.c (gfc_resolve_image_index): Set ts.type.
1634 * simplify.c (gfc_simplify_image_index): Don't abort if the bounds
1635 are not known at compile time and handle -fcoarray=lib.
1636 * trans-intrinsics.c (gfc_conv_intrinsic_function): Handle
1638 (conv_intrinsic_cobound): Fix comment typo.
1639 (trans_this_image): New function.
1640 * trans-array.c (gfc_unlikely): Move to trans.c.
1641 * trans.c (gfc_unlikely): Function moved from trans-array.c.
1642 (gfc_trans_runtime_check): Use it.
1643 * trans-io.c (gfc_trans_io_runtime_check): Ditto.
1644 * trans.h (gfc_unlikely): Add prototype.
1646 2011-04-18 Paul Thomas <pault@gcc.gnu.org>
1649 * trans-expr.c (fcncall_realloc_result): Renamed version of
1650 realloc_lhs_bounds_for_intrinsic_call that does not touch the
1651 descriptor bounds anymore but makes a temporary descriptor to
1653 (gfc_trans_arrayfunc_assign): Modify the reference to above
1656 2011-05-17 Tobias Burnus <burnus@net-b.de>
1659 * trans-decl.c (gfc_get_extern_function_decl): Fix decl
1660 for external procedures with proc arguments.
1662 2011-04-15 Michael Matz <matz@suse.de>
1664 * trans-array.c (toplevel): Include gimple.h.
1665 (gfc_trans_allocate_array_storage): Check flag_stack_arrays,
1666 properly expand variable length arrays.
1667 (gfc_trans_auto_array_allocation): If flag_stack_arrays create
1668 variable length decls and associate them with their scope.
1669 * gfortran.h (gfc_option_t): Add flag_stack_arrays member.
1670 * options.c (gfc_init_options): Handle -fstack_arrays option.
1671 * lang.opt (fstack-arrays): Add option.
1672 * invoke.texi (Code Gen Options): Document it.
1673 * Make-lang.in (trans-array.o): Depend on GIMPLE_H.
1675 2011-04-15 Tobias Burnus <burnus@net-b.de>
1678 * trans-intrinsic.c (conv_intrinsic_cobound): Remove unused
1679 code which is also causing an ICE.
1681 2011-04-14 Nathan Froyd <froydnj@codesourcery.com>
1683 * f95-lang.c (poplevel): Use BLOCK_CHAIN and block_chainon.
1685 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
1687 * f95-lang.c (union lang_tree_node): Check for TS_COMMON before
1690 2011-04-12 Paul Thomas <pault@gcc.gnu.org>
1694 * trans-array.c (get_std_lbound): For derived type variables
1695 return array valued component lbound.
1697 2011-04-12 Martin Jambor <mjambor@suse.cz>
1699 * trans-decl.c (gfc_generate_function_code): Call
1700 cgraph_get_create_node instead of cgraph_node.
1702 2011-04-11 Tobias Burnus <burnus@net-b.de>
1705 * simplify.c (simplify_bound_dim): Exit for
1706 ucobound's last dimension unless -fcoarray=single.
1707 * trans-array (gfc_conv_descriptor_size_1): Renamed from
1708 gfc_conv_descriptor_size, made static, has now from_dim and
1710 (gfc_conv_descriptor_size): Call gfc_conv_descriptor_size.
1711 (gfc_conv_descriptor_cosize): New function.
1712 * trans-array.h (gfc_conv_descriptor_cosize): New prototype.
1713 * trans-intrinsic.c (conv_intrinsic_cobound): Add input_location
1714 and handle last codim of ucobound for when -fcoarray is not "single".
1716 2011-04-08 Thomas Koenig <tkoenig@gcc.gnu.org>
1719 * gfortran.h (gfc_option_t): Add warn_function_elimination and
1720 flag_frontend_optimize.
1721 * lang.opt (Wfunction-elimination): Add.
1722 (ffrontend-optimize): Add.
1723 * invoke.texi: Add documentation for -Wfunction-elimination
1724 and -ffrontend-optimize. Add -faggressive-function-elimination
1725 to list of code generation options.
1726 * frontend-passes.c (gfc_run_passes): Run optimizations if
1727 flag_frontend_optimize is set.
1728 (warn_function_elimination): New function.
1729 (cfe_expr_0): Call it if requested to do so.
1730 * options.c (gfc_init_options): Initiate warn_function_elimination
1731 and flag_frontend_optimize.
1732 (gfc_post_options): Set flag_frontend_optimize if not specified
1733 by user, depending on the optimization level.
1734 (gfc_handle_option): Handle -Wfunction-elimination and
1735 -ffrontend-optimize.
1737 2011-04-06 Tobias Burnus <burnus@net-b.de>
1740 * trans-intrinsic.c (gfc_conv_intrinsic_function): Fix
1741 call for this_image.
1743 2011-04-05 Nathan Froyd <froydnj@codesourcery.com>
1745 * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Use
1746 build_function_type_list instead of build_function_type. Correct
1747 argument order for func_frexp and func_scalbn.
1749 2011-04-05 Duncan Sands <baldrick@free.fr>
1751 * f95-lang.c (build_builtin_fntypes): Swap frexp parameter types.
1753 2011-04-04 Thomas Koenig <tkoenig@gcc.gnu.org>
1755 * frontend-passes: (optimize_lexical_comparison): New function.
1756 (optimize_expr): Call it.
1757 (optimize_comparison): Also handle lexical comparison functions.
1758 Return false instad of -2 for unequal comparison.
1760 2011-04-04 Thomas Koenig <tkoenig@gcc.gnu.org>
1763 * frontend-passes (cfe_expr_0): Reverse the order of going
1766 2011-04-04 Tobias Burnus <burnus@net-b.de>
1767 Mikael Morin <mikael.morin@sfr.fr>
1770 * check.c (is_coarray): Update - because of DIMEN_THIS_IMAGE.
1771 * expr.c (gfc_is_coindexed): Ditto.
1772 * gfortran.h (gfc_array_ref_dimen_type): Add DIMEN_THIS_IMAGE.
1773 * interface.c (compare_parameter): Use gfc_expr_attr and
1775 * resolve.c (check_dimension, compare_spec_to_ref,
1776 resolve_allocate_expr, check_data_variable): Update for
1778 * simplify.c (gfc_simplify_lcobound, gfc_simplify_this_image,
1779 gfc_simplify_ucobound): Allow non-constant bounds.
1780 * trans-array.c (gfc_set_loop_bounds_from_array_spec,
1781 gfc_trans_create_temp_array, gfc_trans_constant_array_constructor,
1782 gfc_set_vector_loop_bounds, gfc_conv_array_index_offset,
1783 gfc_start_scalarized_body, gfc_trans_scalarizing_loops,
1784 gfc_trans_scalarized_loop_boundary, gfc_conv_section_startstride,
1785 gfc_conv_ss_startstride, gfc_conv_loop_setup,
1786 gfc_trans_array_bounds, gfc_conv_expr_descriptor,
1787 gfc_walk_variable_expr): Handle codimen.
1788 * trans-decl.c (gfc_build_qualified_array): Save cobounds.
1789 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Use arg2.
1790 (conv_intrinsic_cobound): New function.
1791 (gfc_conv_intrinsic_function): Call it.
1792 (gfc_walk_intrinsic_function, gfc_add_intrinsic_ss_code): Handle
1793 ucobound, lcobound, this_image.
1794 * fortran/trans-types.c (gfc_build_array_type): Save cobounds.
1795 (gfc_get_dtype): Honour corank.
1796 (gfc_get_nodesc_array_type): Save corank and codimensions.
1797 (gfc_get_array_type_bounds): Save cobound.
1798 * fortran/trans.h (gfc_ss_info,gfc_loopinfo): Add codimen item.
1799 (gfc_array_kind): Add corank item.
1800 (GFC_TYPE_ARRAY_CORANK): New macro.
1802 2011-04-03 Kai Tietz <ktietz@redhat.com>
1805 * Make-lang.in (f95-lang.o): Add some missing dependencies.
1807 2011-04-01 Thomas Koenig <tkoenig@gcc.gnu.org>
1810 * frontend-passes (cfe_register_funcs): Don't
1811 register functions if they appear as iterators in DO loops.
1813 2011-03-30 Michael Matz <matz@suse.de>
1816 * trans-expr.c (realloc_lhs_loop_for_fcn_call): Take loop as parameter,
1817 don't use local variable.
1818 (gfc_trans_arrayfunc_assign): Adjust caller.
1820 2011-03-29 Janus Weil <janus@gcc.gnu.org>
1823 * decl.c (match_procedure_decl,match_ppc_decl): Set flavor of interface.
1824 * module.c (MOD_VERSION): Bump.
1825 (mio_typespec): Read/write 'interface' field.
1826 * primary.c (match_string_constant,match_logical_constant): Remove
1828 (match_complex_constant): Make sure to clear the typespec.
1830 2011-03-29 Thomas Koenig <tkoenig@gcc.gnu.org>
1832 * frontend-passes.c (create_var): Warn about creating an
1833 array temporary if requested.
1835 2011-03-27 Thomas Koenig <tkoenig@gcc.gnu.org>
1838 * frontend-passes.c (optimize_trim): Also follow references, except
1839 when they are substring references or array references.
1841 2011-03-27 Tobias Burnus <burnus@net-b.de>
1844 * gfortran.h (gfc_isym_id): Rename GFC_ISYM_NUMIMAGES to
1845 GFC_ISYM_NUM_IMAGES.
1846 (gfc_fcoarray): Add GFC_FCOARRAY_LIB.
1847 * intrinsic.c (add_functions): Update due to GFC_ISYM_NUM_IMAGES
1849 * invoke.texi (-fcoarray=): Document "lib" argument.
1850 * iresolve.c (gfc_resolve_this_image): Fix THIS IMAGE().
1851 * libgfortran.h (libgfortran_stat_codes): Add comments.
1852 * options.c (gfc_handle_coarray_option): Add -fcoarray=lib.
1853 * simplify.c (gfc_simplify_num_images, gfc_simplify_this_image):
1854 Handle GFC_FCOARRAY_LIB.
1855 * trans.h (gfc_init_coarray_decl): New prototype.
1856 (gfor_fndecl_caf_init, gfor_fndecl_caf_finalize,
1857 gfor_fndecl_caf_critical, gfor_fndecl_caf_end_critical,
1858 gfor_fndecl_caf_sync_all, gfor_fndecl_caf_sync_images,
1859 gfor_fndecl_caf_error_stop, gfor_fndecl_caf_error_stop_str,
1860 gfort_gvar_caf_num_images, gfort_gvar_caf_this_image):
1861 New global variables.
1862 * trans-decl.c: Declare several CAF functions (cf. above).
1863 (gfc_build_builtin_function_decls): Initialize those.
1864 (gfc_init_coarray_decl): New function.
1865 (create_main_function): Call CAF init/finalize functions.
1866 * trans-intrinsic.c (trans_this_image, trans_num_images): New.
1867 (gfc_conv_intrinsic_function): Call those.
1868 * trans-stmt.c (gfc_trans_stop, gfc_trans_sync, gfc_trans_critical):
1869 Add code for GFC_FCOARRAY_LIB.
1871 2011-03-26 Janus Weil <janus@gcc.gnu.org>
1874 * class.c (get_unique_hashed_string): Adjust maximum allowable length
1875 for unique type string.
1877 2011-03-25 Kai Tietz <ktietz@redhat.com>
1879 * scanner.c (preprocessor_line): Use filename_cmp
1882 2011-03-25 Tobias Burnus <burnus@net-b.de>
1886 * trans-types.c (gfc_get_function_type): Don't use varargs if the
1887 procedure is known to have no arguments.
1889 2011-03-21 Thomas Koenig <tkoenig@gcc.gnu.org>
1892 * gfortran.h (gfc_option_t) : Add
1893 flag_aggressive_function_elimination.
1894 (gfc_dep_compare_functions): Add prototype.
1895 * lang.opt: Add faggressive-function-elimination.
1896 * invoke.texi: Document -faggressive-function-elimination.
1897 * frontend_passes (expr_array): New static variable.
1898 (expr_size): Likewise.
1899 (expr_count): Likewise.
1900 (current_code): Likewise.
1901 (current_ns): Likewise.
1902 (gfc_run_passes): Allocate and free space for expressions.
1903 (cfe_register_funcs): New function.
1904 (create_var): New function.
1905 (cfc_expr_0): New function.
1906 (cfe_code): New function.
1907 (optimize_namespace): Invoke gfc_code_walker with cfe_code
1909 * dependency.c (gfc_dep_compare_functions): New function.
1910 (gfc_dep_compare_expr): Use it.
1911 * options.c (gfc_init_options): Handle
1912 flag_aggressive_function_elimination.
1913 (gfc_handle_option): Likewise.
1915 2011-03-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1917 * arith.c (arith_power): Plug memory leak.
1919 2011-03-12 Janus Weil <janus@gcc.gnu.org>
1922 * trans-expr.c (gfc_apply_interface_mapping_to_expr): Replace base type
1923 for polymorphic arguments.
1925 2011-03-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1928 * intrinsic.texi: Clarify doc of logarithm functions.
1930 2011-03-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1933 * trans-intrinsic.c (gfc_conv_intrinsic_ctime): Fix type of
1934 the string length variable.
1936 2011-03-11 Janus Weil <janus@gcc.gnu.org>
1939 * module.c (ab_attribute,attr_bits): Add AB_PROC_POINTER_COMP.
1940 (mio_symbol_attribute): Handle attribute 'proc_pointer_comp'.
1942 2011-03-06 Paul Thomas <pault@gcc.gnu.org>
1943 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1946 * expr.c (gfc_is_constant_expr): Only use gfc_constant_ac if
1947 the expression has an iterator. Otherwise, iterate through the
1948 array, checking for constant expressions for each element.
1950 2011-03-04 Janne Blomqvist <jb@gcc.gnu.org>
1953 * intrinsic.texi: Update CTIME and FDATE documentation.
1955 2011-03-03 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1957 * invoke.texi (Option Summary, Fortran Dialect Options)
1958 (Preprocessing Options, Runtime Options, Code Gen Options):
1959 Fix vertical list spacing by using @itemx for additinoal
1960 items, empty line before @table. Fix typos.
1962 2011-02-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1965 * intrinsic.texi: Fix doc of the VERIFY intrinsic.
1967 2011-02-26 Tobias Burnus <burnus@net-b.de>
1970 * trans-stmt.c (gfc_trans_allocate): Fix allocation with
1971 type-spec of deferred-length strings.
1973 2011-02-26 Tobias Burnus <burnus@net-b.de>
1976 * openmp.c (gfc_resolve_omp_directive): Resolve if()
1977 condition of OpenMP's task.
1979 2011-02-26 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1982 * intrinsic.texi: Fix doc of the VERIFY intrinsic.
1984 2011-02-24 Tobias Burnus <burnus@net-b.de>
1987 * intrinsic.texi (ALLOCATED, ATAN, BESSEL_JN, BESSEL_YN): Add
1988 multitable for linebreak between different syntax variants.
1990 2011-02-24 Richard Guenther <rguenther@suse.de>
1993 * f95-lang.c (pushdecl): For externs in non-global scope push
1994 a copy of the decl into the BLOCK.
1996 2011-02-23 Mikael Morin <mikael@gcc.gnu.org>
1999 * trans.c (gfc_prepend_expr_to_block): New function.
2000 * trans.h (gfc_prepend_expr_to_block): Declare.
2001 * trans-array.c (gfc_conv_array_parameter): Replace
2002 gfc_add_expr_to_block with gfc_prepend_expr_to_block.
2004 2011-02-22 Paul Thomas <pault@gcc.gnu.org>
2007 * trans-decl.c (gfc_get_extern_function_decl): Don't use the
2008 gsymbol backend_decl if the procedure has a formal argument
2009 that is a procedure.
2011 2011-02-22 Tobias Burnus <burnus@net-b.de>
2014 * trans-stmt.c (gfc_trans_if_1): Use correct line for
2015 expressions in the if condition.
2017 2011-02-20 Tobias Burnus <burnus@net-b.de>
2020 * trans-decl.c (gfc_trans_deferred_vars): Use gfc_set_backend_locus and
2021 gfc_restore_backend_locus to have better debug locations.
2022 * trans-array.c (gfc_trans_deferred_array): Ditto.
2024 2011-02-20 Paul Thomas <pault@gcc.gnu.org>
2028 * trans-types.c (gfc_get_derived_type): Remove code that looks
2029 for decls in gsym and add call to gfc_get_module_backend_decl.
2030 * trans.h : Add prototype for gfc_get_module_backend_decl.
2031 * trans-decl.c (gfc_get_module_backend_decl): New function.
2032 (gfc_get_symbol_decl): Call it.
2034 2011-02-19 Paul Thomas <pault@gcc.gnu.org>
2037 * trans-array.c (get_array_ctor_all_strlen): Move up in file.
2038 (get_array_ctor_var_strlen): Add block dummy and add call to
2039 get_array_ctor_all_strlen instead of giving up on substrings.
2040 Call gcc_unreachable for default case.
2041 (get_array_ctor_strlen): Add extra argument to in call to
2042 get_array_ctor_var_strlen.
2044 2011-02-18 Janus Weil <janus@gcc.gnu.org>
2047 * primary.c (gfc_match_structure_constructor): Handle empty parent
2050 2011-02-18 Tobias Burnus
2053 * trans-expr.c (arrayfunc_assign_needs_temporary): Use
2054 esym to check whether the specific procedure returns an
2055 allocatable or pointer.
2057 2011-02-18 Michael Matz <matz@suse.de>
2060 * gfortran.h (struct gfc_component): Add norestrict_decl member.
2061 * trans.h (struct lang_type): Add nonrestricted_type member.
2062 * trans-expr.c (gfc_conv_component_ref): Search fields with correct
2064 * trans-types.c (mirror_fields, gfc_nonrestricted_type): New.
2065 (gfc_sym_type): Use it.
2067 2011-02-18 Janus Weil <janus@gcc.gnu.org>
2070 * resolve.c (resolve_transfer): Reject variables with procedure pointer
2073 2011-02-18 Janus Weil <janus@gcc.gnu.org>
2076 * gfortran.h (gfc_check_access): Removed prototype.
2077 (gfc_check_symbol_access): Added prototype.
2078 * module.c (gfc_check_access): Renamed to 'check_access', made static.
2079 (gfc_check_symbol_access): New function, basically a shortcut for
2081 (write_dt_extensions,write_symbol0,write_generic,write_symtree): Use
2082 'gfc_check_symbol_access'.
2083 (write_operator,write_module): Renamed 'gfc_check_access'.
2084 * resolve.c (resolve_fl_procedure,resolve_fl_derived,
2085 resolve_fl_namelist,resolve_symbol,resolve_fntype): Use
2086 'gfc_check_symbol_access'.
2088 2011-02-16 Janus Weil <janus@gcc.gnu.org>
2091 * class.c (gfc_build_class_symbol): Set 'class_ok' attribute.
2092 * decl.c (build_sym,attr_decl1): Move setting of 'class_ok' into
2093 'gfc_build_class_symbol'.
2094 (gfc_match_decl_type_spec): Reject unlimited polymorphism.
2095 * interface.c (matching_typebound_op): Check for 'class_ok' attribute.
2096 * match.c (select_type_set_tmp): Move setting of 'class_ok' into
2097 'gfc_build_class_symbol'.
2098 * primary.c (gfc_variable_attr): Check for 'class_ok' attribute.
2100 2011-02-15 Steven G. Kargl <kargl@gcc.gnu.org>
2103 . simplify.c (gfc_simplify_compiler_version): Fix off-by-one issue.
2105 2011-02-14 Janus Weil <janus@gcc.gnu.org>
2108 * parse.c (gfc_build_block_ns): Commit 'block@' symbol.
2110 2011-02-14 Janus Weil <janus@gcc.gnu.org>
2113 * class.c (gfc_build_class_symbol): Give a fatal error on polymorphic
2115 * primary.c (gfc_match_varspec): Avoid ICE for invalid class
2118 2011-02-14 Janus Weil <janus@gcc.gnu.org>
2121 * interface.c (get_expr_storage_size): Handle derived-type components.
2123 2011-02-13 Tobias Burnus <burnus@net-b.de>
2126 * interface.c (compare_parameter): Avoid ICE with
2127 character components.
2129 2011-02-12 Janus Weil <janus@gcc.gnu.org>
2131 * class.c (gfc_build_class_symbol): Reject polymorphic arrays.
2132 * decl.c (build_sym,build_struct,attr_decl1): Use return value of
2133 'gfc_build_class_symbol'.
2135 2011-02-12 Michael Matz <matz@suse.de>
2136 Janus Weil <janus@gcc.gnu.org>
2137 Tobias Burnus <burnus@net-b.de>
2140 * trans-expr.c (conv_parent_component_references): Avoid unintendent
2141 skipping of parent compounds.
2143 2011-02-11 Tobias Burnus <burnus@net-b.de>
2146 * resolve.c (resolve_formal_arglist): PURE with VALUE
2147 and no INTENT: Add -std= diagnostics.
2149 2011-02-09 Janus Weil <janus@gcc.gnu.org>
2152 * resolve.c (resolve_procedure_interface): If interface has a result
2153 variable, copy the typespec and set result pointer to self.
2155 2011-02-09 Janus Weil <janus@gcc.gnu.org>
2158 * resolve.c (resolve_typebound_subroutine): Remove erroneous line.
2160 2011-02-09 Janus Weil <janus@gcc.gnu.org>
2163 * trans-decl.c (init_intent_out_dt): Handle CLASS arguments.
2165 2011-02-08 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2167 * io.c (match_io_element): Do not set dt if not inquire.
2169 2011-02-08 Janus Weil <janus@gcc.gnu.org>
2172 * expr.c (gfc_check_assign_symbol): Reject pointers as pointer
2173 initialization target.
2175 2011-02-07 Janne Blomqvist <jb@gcc.gnu.org>
2176 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2178 * gfortran.texi (Thread-safety): texinfo styling fixes.
2179 * intrinsic.texi: Likewise.
2181 2011-02-06 Janne Blomqvist <jb@gcc.gnu.org>
2183 * gfortran.texi (Compiler Characteristics): Add reference to
2184 thread-safety section.
2186 2011-02-06 Janne Blomqvist <jb@gcc.gnu.org>
2188 * gfortran.texi (Thread-safety): New section.
2189 * intrinsic.texi (EXECUTE_COMMAND_LINE): Mention thread-safety.
2191 (GET_ENVIRONMENT_VARIABLE): Likewise.
2194 2011-02-06 Paul Thomas <pault@gcc.gnu.org>
2197 * trans-stmt.c (gfc_trans_allocate): For deferred character
2198 length allocations with SOURCE, store to the values and string
2199 length to avoid calculating twice. Replace gfc_start_block
2200 with gfc_init_block to avoid unnecessary contexts and to keep
2201 declarations of temporaries where they should be. Tidy up the
2204 2011-02-05 Janne Blomqvist <jb@gcc.gnu.org>
2207 * intrinsic.texi (SYSTEM_CLOCK): Update documentation.
2209 2011-02-02 Janus Weil <janus@gcc.gnu.org>
2210 Paul Thomas <pault@gcc.gnu.org>
2213 * trans-expr.c (gfc_trans_class_init_assign): Add call to
2214 gfc_get_derived_type.
2215 * module.c (read_cleanup): Do not use unique_symtrees for vtabs
2218 2011-02-02 Janus Weil <janus@gcc.gnu.org>
2221 * resolve.c (resolve_fl_variable): Handle polymorphic allocatables.
2223 2011-02-01 Janus Weil <janus@gcc.gnu.org>
2226 * trans-expr.c (gfc_conv_structure): Handle constructors for procedure
2227 pointer components with allocatable result.
2229 2011-01-31 Janus Weil <janus@gcc.gnu.org>
2232 * trans-expr.c (gfc_conv_procedure_call): Handle procedure pointers
2233 with pointer or allocatable result.
2235 2011-01-31 Paul Thomas <pault@gcc.gnu.org>
2238 * trans-stmt.c (gfc_trans_allocate): Improve handling of
2239 deferred character lengths with SOURCE.
2240 * iresolve.c (gfc_resolve_repeat): Calculate character
2241 length from source length and ncopies.
2242 * dump-parse-tree.c (show_code_node): Show MOLD and SOURCE
2243 expressions for ALLOCATE.
2245 2011-01-31 Janus Weil <janus@gcc.gnu.org>
2248 * resolve.c (resolve_typebound_subroutine): Bug fix for the case of
2249 an argument of a typebound assignment being a component.
2251 2011-01-31 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2253 * gfortranspec.c (add_arg_libgfortran) [HAVE_LD_STATIC_DYNAMIC] Use
2254 LD_STATIC_OPTION, LD_DYNAMIC_OPTION.
2256 2011-01-31 Tobias Burnus <burnus@net-b.de>
2259 * resolve.c (resolve_fl_procedure): Reject stmt functions
2260 with pointer/allocatable attribute.
2262 2011-01-31 Tobias Burnus <burnus@net-b.de>
2265 * interface.c (gfc_procedure_use): Add explicit interface check for
2266 pointer/allocatable functions.
2268 2011-01-30 Paul Thomas <pault@gcc.gnu.org>
2271 * trans-expr.c (gfc_trans_assignment_1): If the rhs is an op
2272 expr and is assigned to a deferred character length scalar,
2273 make sure that the function is called before reallocation,
2274 so that the length is available. Include procedure pointer
2275 and procedure pointer component rhs as well.
2280 * gfortran.dg/allocatable_function_5.f90: New test not added by
2281 mistake on 2011-01-28.
2283 2011-01-29 Tobias Burnus <burnus@net-b.de>
2286 * check.c (gfc_check_shape): Support kind argument in SHAPE.
2287 * intrinsic.c (add_functions): Ditto.
2288 * resolve.c (gfc_resolve_shape): Ditto.
2289 * simplify.c (gfc_simplify_shape): Ditto.
2290 * intrinsic.h (gfc_check_shape, gfc_resolve_shape,
2291 gfc_simplify_shape): Update prototypes.
2292 * intrinisc.text (SHAPE): Document kind argument.
2294 2011-01-28 Tobias Burnus <burnus@net-b.de>
2297 * resolve.c (resolve_formal_arglist): Allow arguments with VALUE
2298 attribute also without INTENT.
2300 2011-01-28 Tobias Burnus <burnus@net-b.de>
2302 * gfortran.texi (Fortran 2003 status): Mention support for
2303 nonconstant namelist variables.
2305 2011-01-28 Paul Thomas <pault@gcc.gnu.org>
2306 Tobias Burnus <burnus@gcc.gnu.org>
2311 * interface.c (compare_actual_formal): An allocatable or pointer
2312 deferred length actual is only allowed if the formal argument
2313 is also deferred length. Clean up whitespace.
2314 * trans-expr.c (gfc_conv_procedure_call): Pass string length for
2315 deferred character length formal arguments by reference. Do the
2316 same for function results.
2317 (gfc_trans_pointer_assignment): Do not do runtime check of lhs
2318 and rhs character lengths, if deferred length lhs. In this case
2319 set the lhs character length to that of the rhs.
2320 (gfc_conv_string_parameter): Remove assert that string length is
2322 (is_scalar_reallocatable_lhs): New function.
2323 (alloc_scalar_allocatable_for_assignment): New function.
2324 (gfc_trans_assignment_1): Call above new function. If the rhs is
2325 a deferred character length itself, makes ure that the function
2326 is called before reallocation, so that the length is available.
2327 (gfc_trans_asssignment): Remove error about assignment to
2328 deferred length character variables.
2329 * gfortran.texi : Update entry about (re)allocation on
2331 * trans-stmt.c (gfc_trans_allocate): Add code to handle deferred
2332 length character variables.
2333 * module.c (mio_typespec): Transfer deferred characteristic.
2334 * trans-types.c (gfc_get_function_type): New code to generate
2335 hidden typelist, so that those character lengths that are
2336 passed by reference get the right type.
2337 * resolve.c (resolve_contained_fntype): Supress error for
2338 deferred character length functions.
2339 (resolve_function, resolve_fl_procedure) The same.
2340 (check_symbols): Remove the error that support for
2341 entity with deferred type parameter is not yet implemented.
2342 (resolve_fl_derived): The same.
2343 match.c (alloc_opt_list): Allow MOLD for deferred length object.
2344 * trans-decl.c (gfc_get_symbol_decl): For deferred character
2345 length dummies, generate a local variable for string length.
2346 (create_function_arglist): Hidden length can be a pointer.
2347 (gfc_trans_deferred_vars): For deferred character length
2348 results and dummies, assign the string length to the local
2349 variable from the hidden argument on entry and the other way
2350 round on exit, as appropriate.
2352 2011-01-27 Tobias Burnus <burnus@net-b.de>
2355 * trans-decl.c (gfc_generate_function_code): Fix init
2356 of allocatable result variable with allocatable components.
2358 2011-01-27 Tobias Burnus <burnus@net-b.de>
2361 * options.c (gfc_handle_module_path_options): Save
2362 module path without trailing slash as include path.
2364 2011-01-25 Tobias Burnus <burnus@net-b.de>
2367 * interface.c (gfc_check_operator_interface): Fix
2368 defined-assignment check.
2370 2011-01-23 Tobias Burnus <burnus@net-b.de>
2373 * trans-decl.c (gfc_trans_deferred_vars): Do not nullify
2374 scalar allocatable dummy arguments.
2376 2011-01-22 Thomas Koenig <tkoenig@gcc.gnu.org>
2379 * resolve.c (gfc_iso_c_func_interface): For C_LOC,
2380 check for array sections followed by component references
2381 which are illegal. Also check for coindexed arguments.
2383 2011-01-22 Tobias Burnus <burnus@net-b.de>
2386 * primary.c (gfc_match_varspec): Relax gcc_assert to allow for
2389 2011-01-21 Tobias Burnus <burnus@net-b.de>
2392 * error.c (gfc_error_now, gfc_fatal_error, gfc_error_check):
2393 Use defined instead of magic number exit status codes.
2394 * scanner.c (include_line, gfc_new_file): Ditto.
2396 2011-01-21 Tobias Burnus <burnus@net-b.de>
2399 * expr.c (gfc_check_pointer_assign): Reject expr data-targets
2400 without pointer attribute.
2402 2011-01-18 Janus Weil <janus@gcc.gnu.org>
2405 * resolve.c (expression_rank): Fix rank of procedure poiner components.
2406 * trans-expr.c (gfc_conv_procedure_call): Take care of procedure
2407 pointer components as actual arguments.
2409 2011-01-17 Jakub Jelinek <jakub@redhat.com>
2412 * gfortran.h (struct gfc_omp_saved_state): New type.
2413 (gfc_omp_save_and_clear_state, gfc_omp_restore_state): New prototypes.
2414 * resolve.c (resolve_global_procedure): Call it around gfc_resolve
2416 * openmp.c (gfc_omp_save_and_clear_state, gfc_omp_restore_state): New
2419 2011-01-17 Tobias Burnus <burnus@net-b.de>
2422 * invoke.texi (Options to request or suppress errors
2423 and warnings): Fix cross link.
2425 2011-01-15 Tobias Burnus <burnus@net-b.de>
2427 * gfortran.texi: Update Fortran 2003 Status section.
2430 * invoke.texi: Add missing "-E" to the -dM example.
2432 2011-01-13 Tobias Burnus <burnus@net-b.de>
2435 * intrinsic.texi (get_command_argument, get_environment_variable):
2436 Mark arguments as optional in the Arguments section.
2438 2011-01-13 Kai Tietz <kai.tietz@onevision.com>
2439 Tobias Burnus <burnus@net-b.de>
2442 * trans-decl.c (gfc_get_extern_function_decl,
2443 build_function_decl): Set TREE_PUBLIC/TREE_EXTERNAL before
2444 calling decl_attributes.
2446 2011-01-13 Tobias Burnus <burnus@net-b.de>
2447 Mikael Morin <mikael@gcc.gnu.org>
2451 * gfortran.h (gfc_code): Move union ext's case_list into
2453 * dump-parse-tree.c (show_code_node): Adapt by prefixing case_list
2455 * frontend-passes.c (gfc_code_walker): Ditto.
2456 * match.c (gfc_match_goto, gfc_match_call, gfc_match_case,
2457 gfc_match_type_is, gfc_match_class_is): Ditto.
2458 * resolve.c (resolve_select, resolve_select_type): Ditto.
2459 * st.c (gfc_free_statement): Ditto.
2460 * trans-stmt.c (gfc_trans_integer_select, gfc_trans_logical_select,
2461 gfc_trans_character_select): Ditto.
2462 * parse.c (resolve_all_program_units): For error recovery, avoid
2463 segfault is proc_name is NULL.
2465 2011-01-11 Paul Thomas <pault@gcc.gnu.org>
2468 * trans-array.c (gfc_alloc_allocatable_for_assignment): Change
2469 to be standard compliant by testing for shape rather than size
2470 before skipping reallocation. Improve comments.
2472 2011-01-09 Janus Weil <janus@gcc.gnu.org>
2475 * resolve.c (resolve_actual_arglist): Remove unneeded and buggy piece
2478 2011-01-09 Thomas Koenig <tkoenig@gcc.gnu.org>
2481 * resolve.c (is_scalar_expr_ptr): For a substring reference,
2482 use gfc_dep_compare_expr to compare start and end expession.
2483 Add FIXME for using gfc_deb_compare_expr elsewhere.
2485 2011-01-09 Janus Weil <janus@gcc.gnu.org>
2488 * class.c (get_unique_type_string): Make type name start with upper
2491 2011-01-08 Thomas Koenig <tkoenig@gcc.gnu.org>
2494 * invoke.texi: Mention -ffree-line-length-none and
2495 -ffixed-line-length-none for preprocessing.
2497 2011-01-08 Paul Thomas <pault@gcc.gnu.org>
2500 * trans-expr.c (gfc_conv_procedure_call): With a non-copying
2501 procedure argument (eg TRANSPOSE) use a temporary if there is
2502 any chance of aliasing due to host or use association.
2503 (arrayfunc_assign_needs_temporary): Correct logic for function
2504 results and do not use a temporary for implicitly PURE
2505 variables. Use a temporary for Cray pointees.
2506 * symbol.c (gfc_add_save): Explicit SAVE not compatible with
2507 implicit pureness of containing procedure.
2508 * decl.c (match_old_style_init, gfc_match_data): Where decl
2509 would fail in PURE procedure, set implicit_pure to zero.
2510 * gfortran.h : Add implicit_pure to structure symbol_attr and
2511 add prototype for function gfc_implicit_pure.
2512 * expr.c (gfc_check_pointer_assign, gfc_check_vardef_context):
2513 Where decl would fail in PURE procedure, reset implicit_pure.
2514 * io.c (match_vtag, gfc_match_open, gfc_match_close,
2515 gfc_match_print, gfc_match_inquire, gfc_match_wait): The same.
2516 * match.c (gfc_match_critical, gfc_match_stopcode,
2517 sync_statement, gfc_match_allocate, gfc_match_deallocate): The
2519 * parse.c (decode_omp_directive): The same.
2520 (parse_contained): If not PURE, set implicit pure attribute.
2521 * resolve.c (resolve_formal_arglist, resolve_structure_cons,
2522 resolve_function, resolve_ordinary_assign) : The same.
2523 (gfc_implicit_pure): New function.
2524 * module.c (mio_symbol_attribute): Introduce AB_IMPLICIT_PURE
2525 to ab_attribute enum and use it in this function.
2527 2011-01-08 Thomas Koenig <tkoenig@gcc.gnu.org>
2530 * symbol.c (gfc_symbols_could_alias): Strip gfc_ prefix,
2531 make static and move in front of its only caller, to ...
2532 * trans-array.c (symbols_could_alias): ... here.
2533 Pass information about pointer and target status as
2534 arguments. Allocatable arrays don't alias anything
2535 unless they have the POINTER attribute.
2536 (gfc_could_be_alias): Keep track of pointer and target
2537 status when following references. Also check if typespecs
2538 of components match those of other components or symbols.
2540 2011-01-07 Tobias Burnus <burnus@net-b.de>
2543 * class.c (gfc_build_class_symbol): Mark __vtab as attr.vtab.
2544 * intrinsic.c (add_functions): Use simplify functions for
2545 EXTENDS_TYPE_OF and SAME_TYPE_AS.
2546 * intrinsic.h (gfc_simplify_extends_type_of,
2547 gfc_simplify_same_type_as): New prototypes.
2548 * simplify.c (is_last_ref_vtab, gfc_simplify_extends_type_of,
2549 gfc_simplify_same_type_as): New functions.
2551 2011-01-07 Janus Weil <janus@gcc.gnu.org>
2555 * gfortran.h (gfc_lval_expr_from_sym): Moved prototype.
2556 * class.c (gfc_class_null_initializer): Initialize _vptr to declared
2558 * expr.c (gfc_lval_expr_from_sym): Moved here from symbol.c.
2559 * resolve.c (resolve_deallocate_expr): _data component will be added
2560 at translation stage.
2561 * symbol.c (gfc_lval_expr_from_sym): Moved to expr.c.
2562 * trans-stmt.c (gfc_trans_deallocate): Reset _vptr to declared type.
2564 2011-01-06 Daniel Franke <franke.daniel@gmail.com>
2568 * parse.c (parse_interface): Remove check for procedure types.
2569 * interface.c (check_interface0): Verify that procedures are
2570 either all SUBROUTINEs or all FUNCTIONs.
2572 2011-01-05 Janus Weil <janus@gcc.gnu.org>
2575 * trans-expr.c (gfc_trans_class_assign): Bugfix for r168524 (make sure
2576 'vtab' is initialized).
2578 2011-01-05 Janus Weil <janus@gcc.gnu.org>
2581 * trans-expr.c (gfc_trans_class_assign): For a polymorphic NULL pointer
2582 assignment, set the _vptr component to the declared type.
2584 2011-01-05 Thomas Koenig <tkoenig@gcc.gnu.org>
2587 * resolve.c (resolve_allocate_deallocate): Follow references to
2588 check for duplicate occurence of allocation/deallocation objects.
2590 2011-01-05 Janus Weil <janus@gcc.gnu.org>
2593 * trans-decl.c (gfc_trans_deferred_vars): Initialize the _vpr component
2594 of polymorphic allocatables according to their declared type.
2596 2011-01-04 Janus Weil <janus@gcc.gnu.org>
2599 * class.c (gfc_find_derived_vtab): Set the module field for the copying
2600 routine to make sure it receives module name mangling.
2602 2011-01-03 Jakub Jelinek <jakub@redhat.com>
2604 * gfortranspec.c (lang_specific_driver): Update copyright notice
2607 2011-01-03 Janus Weil <janus@gcc.gnu.org>
2609 * intrinsic.texi (LEADZ): Fix example.
2611 2011-01-02 Janus Weil <janus@gcc.gnu.org>
2614 * class.c (gfc_find_derived_vtab): Use EXEC_INIT_ASSIGN for __copy_
2618 Copyright (C) 2011 Free Software Foundation, Inc.
2620 Copying and distribution of this file, with or without modification,
2621 are permitted in any medium without royalty provided the copyright
2622 notice and this notice are preserved.