1 2005-03-05 Erik Edelmann <eedelman@gcc.gnu.org>
4 * symbol.c (conf_std): New macro.
5 (check_conflict): Use it to allow ALLOCATABLE dummy
7 * trans-expr.c (gfc_conv_function_call): Pass the
8 address of the array descriptor when dummy argument is
10 * interface.c (compare_allocatable): New function.
11 (compare_actual_formal): Use it.
12 * resolve.c (resolve_deallocate_expr,
13 resolve_allocate_expr): Check that INTENT(IN) variables
15 * gfortran.texi (Fortran 2003 status): List ALLOCATABLE
16 dummy arguments as supported.
18 2006-03-03 Roger Sayle <roger@eyesopen.com>
20 * dependency.c (gfc_check_element_vs_element): Revert last change.
22 2006-03-03 Roger Sayle <roger@eyesopen.com>
24 * dependency.c (gfc_check_element_vs_element): Consider two
25 unordered scalar subscripts as (potentially) equal.
27 2006-03-03 Roger Sayle <roger@eyesopen.com>
29 * dependency.c (gfc_check_dependency): Call gfc_dep_resolver to
30 check whether two array references have a dependency.
31 (gfc_check_element_vs_element): Assume lref and rref must be
32 REF_ARRAYs. If gfc_dep_compare_expr returns -2, assume these
33 references could potentially overlap.
34 (gfc_dep_resolver): Whitespace and comment tweaks. Assume a
35 dependency if the references have different depths. Rewrite
36 final term to clarrify we only have a dependency for overlaps.
38 2006-03-03 Thomas Koenig <Thomas.Koenig@online.de>
41 * trans-array.h: Adjust gfc_array_allocate prototype.
42 * trans-array.c (gfc_array_allocate): Change type of
43 gfc_array_allocatate to bool. Function returns true if
44 it operates on an array. Change second argument to gfc_expr.
45 Find last reference in chain.
46 If the function operates on an allocatable array, emit call to
47 allocate_array() or allocate64_array().
48 * trans-stmt.c (gfc_trans_allocate): Code to follow to last
49 reference has been moved to gfc_array_allocate.
50 * trans.h: Add declaration for gfor_fndecl_allocate_array and
51 gfor_fndecl_allocate64_array.
52 (gfc_build_builtin_function_decls): Add gfor_fndecl_allocate_array
53 and gfor_fndecl_allocate64_array.
55 2006-03-01 Roger Sayle <roger@eyesopen.com>
57 * trans-stmt.c (generate_loop_for_temp_to_lhs): Add an additional
58 INVERT argument to invert the sense of the WHEREMASK argument.
59 Remove unneeded code to AND together a list of masks.
60 (generate_loop_for_rhs_to_temp): Likewise.
61 (gfc_trans_assign_need_temp): Likewise.
62 (gfc_trans_forall_1): Likewise.
63 (gfc_evaluate_where_mask): Likewise, add a new INVERT argument
64 to specify the sense of the MASK argument.
65 (gfc_trans_where_assign): Likewise.
66 (gfc_trans_where_2): Likewise. Restructure code that decides
67 whether we need to allocate zero, one or two temporary masks.
68 If this is a top-level WHERE (i.e. the incoming MASK is NULL),
69 we only need to allocate at most one temporary mask, and can
70 invert it's sense to provide the complementary pending execution
71 mask. Only calculate the size of the required temporary arrays
73 (gfc_trans_where): Update call to gfc_trans_where_2.
75 2006-03-01 Paul Thomas <pault@gcc.gnu.org>
77 * iresolve.c (gfc_resolve_dot_product): Remove any difference in
78 treatment of logical types.
79 * trans-intrinsic.c (gfc_conv_intrinsic_dot_product): New function.
82 * trans-decl.c (gfc_get_symbol_decl): Extend condition that symbols
83 must be referenced to include unreferenced symbols in an interface
87 * trans-array.c (gfc_conv_resolve_dependencies): Add call to
88 gfc_are_equivalenced_arrays.
89 * symbol.c (gfc_free_equiv_infos, gfc_free_equiv_lists): New
90 functions. (gfc_free_namespace): Call them.
91 * trans-common.c (copy_equiv_list_to_ns): New function.
92 (add_equivalences): Call it.
93 * gfortran.h: Add equiv_lists to gfc_namespace and define
94 gfc_equiv_list and gfc_equiv_info.
95 * dependency.c (gfc_are_equivalenced_arrays): New function.
96 (gfc_check_dependency): Call it.
97 * dependency.h: Prototype for gfc_are_equivalenced_arrays.
99 2006-03-01 Roger Sayle <roger@eyesopen.com>
101 * dependency.c (gfc_is_same_range): Compare the stride, lower and
102 upper bounds when testing array reference ranges for equality.
103 (gfc_check_dependency): Fix indentation whitespace.
104 (gfc_check_element_vs_element): Likewise.
105 (gfc_dep_resolver): Likewise.
107 2006-02-28 Thomas Koenig <Thomas.Koenig@online.de>
109 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc):
110 If the mask expression exists and has rank 0, enclose the
111 generated loop in an "if (mask)". Put the default
112 initialization into the else branch.
114 2006-02-25 Thomas Koenig <Thomas.Koenig@online.de>
117 * trans-intrinsic.c (gfc_conv_intrinsic_arith): If the
118 mask expression exists and has rank 0, enclose the generated
119 loop in an "if (mask)".
120 * (gfc_conv_intrinsic_minmaxloc): Likewise.
122 2006-02-24 Paul Thomas <pault@gcc.gnu.org>
125 * resolve.c (resolve_contained_functions, resolve_types,
126 gfc_resolve): Revert patch of 2006-02-19.
128 2006-02-24 Paul Thomas <pault@gcc.gnu.org>
131 * dependency.c (gfc_is_same_range): Correct typo.
132 (gfc_check_section_vs_section): Call gfc_is_same_range.
135 * trans-common.c (add_equivalences): Add a new flag that is set when
136 an equivalence is seen that prevents more from being reset until the
137 start of a new traversal of the list, thus ensuring completion of
138 all the equivalences.
140 2006-02-23 Erik Edelmann <eedelman@gcc.gnu.org>
142 * module.c (read_module): Remove redundant code lines.
144 2006-02-20 Rafael
\81Ávila de Esp
\81índola <rafael.espindola@gmail.com>
145 * Make-lang.in (FORTRAN): Remove
146 (.PHONY): Remove F95 and f95. Add fortran
148 2006-02-20 Roger Sayle <roger@eyesopen.com>
150 * trans-stmt.c (gfc_trans_where_2): Avoid updating unused current
151 execution mask for empty WHERE/ELSEWHERE clauses. Don't allocate
152 temporary mask arrays if they won't be used.
154 2006-02-20 Roger Sayle <roger@eyesopen.com>
156 * trans-stmt.c (gfc_trans_where_assign): Remove code to handle
157 traversing a linked list of MASKs. The MASK is now always a
158 single element requiring no ANDing during the assignment.
160 2006-02-19 Thomas Koenig <Thomas.Koenig@online.de>
162 * gfortran.texi: Document environment variables which
163 influence runtime behavior.
165 2006-02-19 H.J. Lu <hongjiu.lu@intel.com>
167 * resolve.c (resolve_contained_functions): Call resolve_entries
169 (resolve_types): Remove calls to resolve_entries and
170 resolve_contained_functions.
171 (gfc_resolve): Call resolve_contained_functions.
173 2006-02-19 Erik Edelmann <eedelman@gcc.gnu.org>
176 * intrinsic.c (gfc_convert_type_warn): Call
177 gfc_intrinsic_symbol() on the newly created symbol.
179 2005-02-19 Paul Thomas <pault@gcc.gnu.org>
182 * resolve.c (is_non_constant_shape_array): New function.
183 (resolve_fl_variable): Remove code for the new function and call it.
184 (resolve_fl_namelist): New function. Add test for namelist array
185 with non-constant shape, using is_non_constant_shape_array.
186 (resolve_symbol): Remove code for resolve_fl_namelist and call it.
189 * match.c (match_namelist): Increment the refs field of an accepted
190 namelist object symbol.
191 * resolve.c (resolve_fl_namelist): Test namelist objects for a conflict
192 with contained or module procedures.
194 2006-02-18 Roger Sayle <roger@eyesopen.com>
196 * trans-stmt.c (struct temporary_list): Delete.
197 (gfc_trans_where_2): Major reorganization. Remove no longer needed
198 TEMP argument. Allocate and deallocate the control mask and
199 pending control mask locally.
200 (gfc_trans_forall_1): Delete TEMP local variable, and update
201 call to gfc_trans_where_2. No need to deallocate arrays after.
202 (gfc_evaluate_where_mask): Major reorganization. Change return
203 type to void. Pass in parent execution mask, MASK, and two
204 already allocated mask arrays CMASK and PMASK. On return
205 CMASK := MASK & COND, PMASK := MASK & !COND. MASK, CMASK and
206 CMASK may all be NULL, or refer to the same temporary arrays.
207 (gfc_trans_where): Update call to gfc_trans_where_2. We no
208 longer need a TEMP variable or to deallocate temporary arrays
209 allocated by gfc_trans_where_2.
211 2006-02-18 Danny Smith <dannysmith@users.sourceforeg.net>
213 * gfortran.h (gfc_add_attribute): Change uint to unsigned int.
214 * symbol.c (gfc_add_attribute): Likewise for definition.
215 * resolve.c (resolve_global_procedure): Likewise for variable 'type'.
217 2006-02-17 Richard Sandiford <richard@codesourcery.com>
219 * trans-common.c: Include rtl.h earlier.
220 * trans-decl.c: Likewise.
222 2006-02-16 Jakub Jelinek <jakub@redhat.com>
225 * parse.c (parse_omp_do, parse_omp_structured_block): Call
226 gfc_commit_symbols and gfc_warning_check.
228 * openmp.c (resolve_omp_clauses): Add a dummy case label to workaround
231 2005-02-16 Paul Thomas <pault@gcc.gnu.org>
234 * trans-expr.c (gfc_add_interface_mapping): Use the actual argument
235 for character(*) arrays, rather than casting to the type and kind
236 parameters of the formal argument.
238 2006-02-15 Toon Moene <toon@moene.indiv.nluug.nl>
241 * options.c: Do not warn for Fortran 2003 features by default.
243 2006-02-15 Tobias Schl
\81üter <tobias.schlueter@physik.uni-muenchen.de>
245 * check.c: Update copyright years.
247 * check.c (gfc_check_minloc_maxloc, check_reduction): Don't call
248 dim_range_check on not-present optional dim argument.
250 2006-02-15 Jakub Jelinek <jakub@redhat.com>
254 * Make-lang.in (install-finclude-dir): New goal.
255 (fortran.install-common): Depend on install-finclude-dir.
256 * lang-specs.h: If not -nostdinc, add -I finclude.
258 2006-02-14 Thomas Koenig <Thomas.Koenig@online.de>
261 * check.c (dim_check): Perform all checks if dim is optional.
262 (gfc_check_minloc_maxloc): Use dim_check and dim_rank_check
263 to check dim argument.
264 (check_reduction): Likewise.
266 2006-02-14 Tobias Schl
\81üter <tobias.schlueter@physik.uni-muenchen.de>
269 * io.c (match_ltag): Mark label as referenced.
271 2006-02-14 Jakub Jelinek <jakub@redhat.com>
272 Richard Henderson <rth@redhat.com>
273 Diego Novillo <dnovillo@redhat.com>
275 * invoke.texi: Document -fopenmp.
276 * gfortran.texi (Extensions): Document OpenMP.
278 Backport from gomp-20050608-branch
279 * trans-openmp.c: Call build_omp_clause instead of
280 make_node when creating OMP_CLAUSE_* trees.
281 (gfc_trans_omp_reduction_list): Remove argument 'code'.
284 * trans.h (build4_v): Define.
285 * trans-openmp.c: Call build4_v to create OMP_PARALLEL nodes.
286 Call build3_v to create OMP_SECTIONS nodes.
289 * openmp.c (gfc_match_omp_variable_list): Call gfc_set_sym_referenced
290 on all symbols added to the variable list.
292 * openmp.c (gfc_match_omp_clauses): Fix check for non-INTRINSIC
293 procedure symbol in REDUCTION.
295 * trans-openmp.c (gfc_trans_omp_array_reduction): Use gfc_add
296 for MINUS_EXPR OMP_CLAUSE_REDUCTION_CODE.
298 * trans-openmp.c (gfc_trans_omp_do): Add PBLOCK argument. If PBLOCK
299 is non-NULL, evaluate INIT/COND/INCR and chunk size expressions in
300 that statement block.
301 (gfc_trans_omp_parallel_do): Pass non-NULL PBLOCK to gfc_trans_omp_do
302 for non-ordered non-static combined loops.
303 (gfc_trans_omp_directive): Pass NULL PBLOCK to gfc_trans_omp_do.
305 * openmp.c: Include target.h and toplev.h.
306 (gfc_match_omp_threadprivate): Emit diagnostic if target does
308 * Make-lang.in (fortran/openmp.o): Add dependencies on
309 target.h and toplev.h.
311 * trans-decl.c (gfc_get_fake_result_decl): Set GFC_DECL_RESULT.
312 * trans-openmp.c (gfc_omp_privatize_by_reference): Make
313 DECL_ARTIFICIAL vars predetermined shared except GFC_DECL_RESULT.
314 (gfc_omp_disregard_value_expr): Handle GFC_DECL_RESULT.
315 (gfc_trans_omp_variable): New function.
316 (gfc_trans_omp_variable_list, gfc_trans_omp_reduction_list): Use it.
317 * trans.h (GFC_DECL_RESULT): Define.
319 * trans-openmp.c (gfc_omp_firstprivatize_type_sizes): New function.
320 * f95-lang.c (LANG_HOOKS_OMP_FIRSTPRIVATIZE_TYPE_SIZES): Define.
321 * trans.h (gfc_omp_firstprivatize_type_sizes): New prototype.
323 * trans-openmp.c (gfc_omp_privatize_by_reference): Return
324 true if a pointer has GFC_DECL_SAVED_DESCRIPTOR set.
325 (gfc_trans_omp_array_reduction, gfc_trans_omp_reduction_list): New
327 (gfc_trans_omp_clauses): Add WHERE argument. Call
328 gfc_trans_omp_reduction_list rather than gfc_trans_omp_variable_list
330 (gfc_trans_omp_do, gfc_trans_omp_parallel, gfc_trans_omp_parallel_do,
331 gfc_trans_omp_parallel_sections, gfc_trans_omp_parallel_workshare,
332 gfc_trans_omp_sections, gfc_trans_omp_single): Adjust
333 gfc_trans_omp_clauses callers.
335 * openmp.c (omp_current_do_code): New var.
336 (gfc_resolve_omp_do_blocks): New function.
337 (gfc_resolve_omp_parallel_blocks): Call it.
338 (gfc_resolve_do_iterator): Add CODE argument. Don't propagate
339 predetermination if argument is !$omp do or !$omp parallel do
341 * resolve.c (resolve_code): Call gfc_resolve_omp_do_blocks
342 for EXEC_OMP_DO. Adjust gfc_resolve_do_iterator caller.
343 * fortran.h (gfc_resolve_omp_do_blocks): New prototype.
344 (gfc_resolve_do_iterator): Add CODE argument.
346 * trans.h (gfc_omp_predetermined_sharing,
347 gfc_omp_disregard_value_expr, gfc_omp_private_debug_clause): New
349 (GFC_DECL_COMMON_OR_EQUIV, GFC_DECL_CRAY_POINTEE): Define.
350 * trans-openmp.c (gfc_omp_predetermined_sharing,
351 gfc_omp_disregard_value_expr, gfc_omp_private_debug_clause): New
353 * trans-common.c (build_equiv_decl, build_common_decl,
354 create_common): Set GFC_DECL_COMMON_OR_EQUIV flag on the decls.
355 * trans-decl.c (gfc_finish_cray_pointee): Set GFC_DECL_CRAY_POINTEE
357 * f95-lang.c (LANG_HOOKS_OMP_PREDETERMINED_SHARING,
358 LANG_HOOKS_OMP_DISREGARD_VALUE_EXPR,
359 LANG_HOOKS_OMP_PRIVATE_DEBUG_CLAUSE): Define.
361 * openmp.c (resolve_omp_clauses): Remove extraneous comma.
363 * symbol.c (check_conflict): Add conflict between cray_pointee and
365 * openmp.c (gfc_match_omp_threadprivate): Fail if
366 gfc_add_threadprivate returned FAILURE.
367 (resolve_omp_clauses): Diagnose Cray pointees in SHARED,
368 {,FIRST,LAST}PRIVATE and REDUCTION clauses and Cray pointers in
369 {FIRST,LAST}PRIVATE and REDUCTION clauses.
371 * resolve.c (omp_workshare_flag): New variable.
372 (resolve_function): Diagnose use of non-ELEMENTAL user defined
373 function in WORKSHARE construct.
374 (resolve_code): Cleanup forall_save use. Make sure omp_workshare_flag
375 is set to correct value in different contexts.
377 * openmp.c (resolve_omp_clauses): Replace %s with '%s' when printing
379 (resolve_omp_atomic): Likewise.
382 * scanner.c (skip_free_comments): Set at_bol at the beginning of the
384 (skip_fixed_comments): Handle ! comments in the middle of line here
386 (gfc_skip_comments): Use skip_fixed_comments for FIXED_FORM even if
388 (gfc_next_char_literal): Fix expected canonicalized *$omp string.
390 * trans-openmp.c (gfc_trans_omp_do): Use make_node and explicit
391 initialization to build OMP_FOR instead of build.
393 * trans-decl.c (gfc_gimplify_function): Invoke
394 diagnose_omp_structured_block_errors.
396 * trans-openmp.c (gfc_trans_omp_master): Use OMP_MASTER.
397 (gfc_trans_omp_ordered): Use OMP_ORDERED.
399 * gfortran.h (gfc_resolve_do_iterator, gfc_resolve_blocks,
400 gfc_resolve_omp_parallel_blocks): New prototypes.
401 * resolve.c (resolve_blocks): Renamed to...
402 (gfc_resolve_blocks): ... this. Remove static.
403 (gfc_resolve_forall): Adjust caller.
404 (resolve_code): Only call gfc_resolve_blocks if code->block != 0
405 and not for EXEC_OMP_PARALLEL* directives. Call
406 gfc_resolve_omp_parallel_blocks for EXEC_OMP_PARALLEL* directives.
407 Call gfc_resolve_do_iterator if resolved successfully EXEC_DO
409 * openmp.c: Include pointer-set.h.
410 (omp_current_ctx): New variable.
411 (gfc_resolve_omp_parallel_blocks, gfc_resolve_do_iterator): New
413 * Make-lang.in (fortran/openmp.o): Depend on pointer-set.h.
415 * openmp.c (gfc_match_omp_clauses): For max/min/iand/ior/ieor,
416 look up symbol if it exists, use its name instead and, if it is not
417 INTRINSIC, issue diagnostics.
419 * parse.c (parse_omp_do): Handle implied end do properly.
420 (parse_executable): If parse_omp_do returned ST_IMPLIED_ENDDO,
421 return it instead of continuing.
423 * trans-openmp.c (gfc_trans_omp_critical): Update for changed
425 (gfc_trans_omp_do, gfc_trans_omp_parallel, gfc_trans_omp_parallel_do,
426 gfc_trans_omp_parallel_sections, gfc_trans_omp_parallel_workshare,
427 gfc_trans_omp_sections, gfc_trans_omp_single): Likewise.
429 * trans.h (gfc_omp_privatize_by_reference): New prototype.
430 * f95-lang.c (LANG_HOOKS_OMP_PRIVATIZE_BY_REFERENCE): Redefine
431 to gfc_omp_privatize_by_reference.
432 * trans-openmp.c (gfc_omp_privatize_by_reference): New function.
434 * trans-stmt.h (gfc_trans_omp_directive): Add comment.
436 * openmp.c (gfc_match_omp_variable_list): Add ALLOW_COMMON argument.
437 Disallow COMMON matching if it is set.
438 (gfc_match_omp_clauses, gfc_match_omp_flush): Adjust all callers.
439 (resolve_omp_clauses): Show locus in error messages. Check that
440 variable types in reduction clauses are appropriate for reduction
443 * resolve.c (resolve_symbol): Don't error if a threadprivate module
444 variable isn't SAVEd.
446 * trans-openmp.c (gfc_trans_omp_do): Put count into BLOCK, not BODY.
447 Fix typo in condition. Fix DOVAR initialization.
449 * openmp.c (gfc_match_omp_clauses): Match min/iand/ior/ieor
450 rather than .min. etc.
452 * trans-openmpc.c (omp_not_yet): Remove.
453 (gfc_trans_omp_parallel_do): Keep listprivate clause on parallel.
454 Force creation of BIND_EXPR around the workshare construct.
455 (gfc_trans_omp_parallel_sections): Likewise.
456 (gfc_trans_omp_parallel_workshare): Likewise.
458 * types.def (BT_I16, BT_FN_I16_VPTR_I16,
459 BT_FN_BOOL_VPTR_I16_I16, BT_FN_I16_VPTR_I16_I16): Add.
461 * trans-openmp.c (gfc_trans_omp_clauses): Create OMP_CLAUSE_DEFAULT.
462 (gfc_trans_omp_code): New function.
463 (gfc_trans_omp_do): Use it, remove omp_not_yet uses.
464 (gfc_trans_omp_parallel, gfc_trans_omp_single): Likewise.
465 (gfc_trans_omp_sections): Likewise. Only treat empty last section
466 specially if lastprivate clause is present.
467 * f95-lang.c (gfc_init_builtin_functions): Create BUILT_IN_TRAP
470 * trans-openmp.c (gfc_trans_omp_variable_list): Update for
471 OMP_CLAUSE_DECL name change.
472 (gfc_trans_omp_do): Likewise.
474 * trans-openmp.c (gfc_trans_omp_clauses): Create OMP_CLAUSE_REDUCTION
476 (gfc_trans_omp_atomic): Build OMP_ATOMIC instead of expanding
477 sync builtins directly.
478 (gfc_trans_omp_single): Build OMP_SINGLE statement.
480 * trans-openmp.c (gfc_trans_add_clause): New.
481 (gfc_trans_omp_variable_list): Take a tree code and build the clause
482 node here. Link it to the head of a list.
483 (gfc_trans_omp_clauses): Update to match.
484 (gfc_trans_omp_do): Use gfc_trans_add_clause.
486 * trans-openmp.c (gfc_trans_omp_clauses): Change second argument to
487 gfc_omp_clauses *. Use gfc_evaluate_now instead of creating
489 (gfc_trans_omp_atomic, gfc_trans_omp_critical): Use buildN_v macros.
490 (gfc_trans_omp_do): New function.
491 (gfc_trans_omp_master): Dont' check for gfc_trans_code returning NULL.
492 (gfc_trans_omp_parallel): Adjust gfc_trans_omp_clauses caller.
494 (gfc_trans_omp_parallel_do, gfc_trans_omp_parallel_sections,
495 gfc_trans_omp_parallel_workshare, gfc_trans_omp_sections,
496 gfc_trans_omp_single, gfc_trans_omp_workshare): New functions.
497 (gfc_trans_omp_directive): Use them.
498 * parse.c (parse_omp_do): Allow new_st.op == EXEC_NOP.
499 * openmp.c (resolve_omp_clauses): Check for list items present
501 (resolve_omp_do): Check that iteration variable is not THREADPRIVATE
502 and is not present in any clause variable lists other than PRIVATE
505 * gfortran.h (symbol_attribute): Add threadprivate bit.
506 (gfc_common_head): Add threadprivate member, change use_assoc
507 and saved into char to save space.
508 (gfc_add_threadprivate): New prototype.
509 * symbol.c (check_conflict): Handle threadprivate.
510 (gfc_add_threadprivate): New function.
511 (gfc_copy_attr): Copy threadprivate.
512 * trans-openmp.c (gfc_trans_omp_clauses): Avoid creating a temporary
513 if IF or NUM_THREADS is constant. Create OMP_CLAUSE_SCHEDULE and
515 * resolve.c (resolve_symbol): Complain if a THREADPRIVATE symbol
516 outside a module and not in COMMON has is not SAVEd.
517 (resolve_equivalence): Ensure THREADPRIVATE objects don't get
519 * trans-common.c: Include target.h and rtl.h.
520 (build_common_decl): Set DECL_TLS_MODEL if THREADPRIVATE.
521 * trans-decl.c: Include rtl.h.
522 (gfc_finish_var_decl): Set DECL_TLS_MODEL if THREADPRIVATE.
523 * dump-parse-tree.c (gfc_show_attr): Handle THREADPRIVATE.
524 * Make-lang.in (fortran/trans-decl.o): Depend on $(RTL_H).
525 (fortran/trans-common.o): Depend on $(RTL_H) and $(TARGET_H).
526 * openmp.c (gfc_match_omp_variable_list): Ensure COMMON block
527 is from current namespace.
528 (gfc_match_omp_threadprivate): Rewrite.
529 (resolve_omp_clauses): Check some clause restrictions.
530 * module.c (ab_attribute): Add AB_THREADPRIVATE.
531 (attr_bits): Add THREADPRIVATE.
532 (mio_symbol_attribute, mio_symbol_attribute): Handle threadprivate.
533 (load_commons, write_common, write_blank_common): Adjust for type
534 change of saved, store/load threadprivate bit from the integer
537 * types.def (BT_FN_UINT_UINT): New.
538 (BT_FN_VOID_UINT_UINT): Remove.
540 * trans-openmp.c (gfc_trans_omp_clauses, gfc_trans_omp_barrier,
541 gfc_trans_omp_critical, gfc_trans_omp_flush, gfc_trans_omp_master,
542 gfc_trans_omp_ordered, gfc_trans_omp_parallel): New functions.
543 (gfc_trans_omp_directive): Use them.
545 * openmp.c (expr_references_sym): Add SE argument, don't look
547 (is_conversion): New function.
548 (resolve_omp_atomic): Adjust expr_references_sym callers. Handle
549 promoted expressions.
550 * trans-openmp.c (gfc_trans_omp_atomic): New function.
551 (gfc_trans_omp_directive): Call it.
553 * f95-lang.c (builtin_type_for_size): New function.
554 (gfc_init_builtin_functions): Initialize synchronization and
556 * types.def: New file.
557 * Make-lang.in (f95-lang.o): Depend on $(BUILTINS_DEF) and
560 * trans-openmp.c: Rename GOMP_* tree codes into OMP_*.
562 * dump-parse-tree.c (show_symtree): Don't crash if ns->proc_name
565 * dump-parse-tree.c (gfc_show_namelist, gfc_show_omp_node): New
567 (gfc_show_code_node): Call gfc_show_omp_node for EXEC_OMP_* nodes.
569 * parse.c (parse_omp_do): Call pop_state before next_statement.
570 * openmp.c (expr_references_sym, resolve_omp_atomic, resolve_omp_do):
572 (gfc_resolve_omp_directive): Call them.
573 * match.c (match_exit_cycle): Issue error if EXIT or CYCLE statement
574 leaves an OpenMP structured block or if EXIT terminates !$omp do
577 * Make-lang.in (F95_PARSER_OBJS): Add fortran/openmp.o.
578 (F95_OBJS): Add fortran/trans-openmp.o.
579 (fortran/trans-openmp.o): Depend on $(GFORTRAN_TRANS_DEPS).
580 * lang.opt: Add -fopenmp option.
581 * options.c (gfc_init_options): Initialize it.
582 (gfc_handle_option): Handle it.
583 * gfortran.h (ST_OMP_ATOMIC, ST_OMP_BARRIER, ST_OMP_CRITICAL,
584 ST_OMP_END_CRITICAL, ST_OMP_END_DO, ST_OMP_END_MASTER,
585 ST_OMP_END_ORDERED, ST_OMP_END_PARALLEL, ST_OMP_END_PARALLEL_DO,
586 ST_OMP_END_PARALLEL_SECTIONS, ST_OMP_END_PARALLEL_WORKSHARE,
587 ST_OMP_END_SECTIONS, ST_OMP_END_SINGLE, ST_OMP_END_WORKSHARE,
588 ST_OMP_DO, ST_OMP_FLUSH, ST_OMP_MASTER, ST_OMP_ORDERED,
589 ST_OMP_PARALLEL, ST_OMP_PARALLEL_DO, ST_OMP_PARALLEL_SECTIONS,
590 ST_OMP_PARALLEL_WORKSHARE, ST_OMP_SECTIONS, ST_OMP_SECTION,
591 ST_OMP_SINGLE, ST_OMP_THREADPRIVATE, ST_OMP_WORKSHARE): New
593 (OMP_LIST_PRIVATE, OMP_LIST_FIRSTPRIVATE, OMP_LIST_LASTPRIVATE,
594 OMP_LIST_COPYPRIVATE, OMP_LIST_SHARED, OMP_LIST_COPYIN,
595 OMP_LIST_PLUS, OMP_LIST_REDUCTION_FIRST, OMP_LIST_MULT,
596 OMP_LIST_SUB, OMP_LIST_AND, OMP_LIST_OR, OMP_LIST_EQV,
597 OMP_LIST_NEQV, OMP_LIST_MAX, OMP_LIST_MIN, OMP_LIST_IAND,
598 OMP_LIST_IOR, OMP_LIST_IEOR, OMP_LIST_REDUCTION_LAST, OMP_LIST_NUM):
599 New OpenMP variable list types.
600 (gfc_omp_clauses): New typedef.
601 (gfc_get_omp_clauses): Define.
602 (EXEC_OMP_CRITICAL, EXEC_OMP_DO, EXEC_OMP_FLUSH, EXEC_OMP_MASTER,
603 EXEC_OMP_ORDERED, EXEC_OMP_PARALLEL, EXEC_OMP_PARALLEL_DO,
604 EXEC_OMP_PARALLEL_SECTIONS, EXEC_OMP_PARALLEL_WORKSHARE,
605 EXEC_OMP_SECTIONS, EXEC_OMP_SINGLE, EXEC_OMP_WORKSHARE,
606 EXEC_OMP_ATOMIC, EXEC_OMP_BARRIER, EXEC_OMP_END_NOWAIT,
607 EXEC_OMP_END_SINGLE): New OpenMP gfc_exec_op codes.
608 (struct gfc_code): Add omp_clauses, omp_name, omp_namelist
609 and omp_bool fields to ext union.
610 (flag_openmp): Declare.
611 (gfc_free_omp_clauses, gfc_resolve_omp_directive): New prototypes.
612 * scanner.c (openmp_flag, openmp_locus): New variables.
613 (skip_free_comments, skip_fixed_comments, gfc_next_char_literal):
614 Handle OpenMP directive lines and conditional compilation magic
616 * parse.h (COMP_OMP_STRUCTURED_BLOCK): New compile state.
617 * parse.c (decode_omp_directive, parse_omp_do, parse_omp_atomic,
618 parse_omp_structured_block): New functions.
619 (next_free, next_fixed): Parse OpenMP directives.
620 (case_executable, case_exec_markers, case_decl): Add ST_OMP_*
622 (gfc_ascii_statement): Handle ST_OMP_* codes.
623 (parse_executable): Rearrange the loop slightly, so that
624 parse_omp_do can return next_statement.
625 * match.h (gfc_match_omp_eos, gfc_match_omp_atomic,
626 gfc_match_omp_barrier, gfc_match_omp_critical, gfc_match_omp_do,
627 gfc_match_omp_flush, gfc_match_omp_master, gfc_match_omp_ordered,
628 gfc_match_omp_parallel, gfc_match_omp_parallel_do,
629 gfc_match_omp_parallel_sections, gfc_match_omp_parallel_workshare,
630 gfc_match_omp_sections, gfc_match_omp_single,
631 gfc_match_omp_threadprivate, gfc_match_omp_workshare,
632 gfc_match_omp_end_nowait, gfc_match_omp_end_single): New prototypes.
633 * resolve.c (resolve_blocks): Ignore EXEC_OMP_* block directives.
634 (resolve_code): Call gfc_resolve_omp_directive on EXEC_OMP_*
636 * trans.c (gfc_trans_code): Call gfc_trans_omp_directive for
637 EXEC_OMP_* directives.
638 * st.c (gfc_free_statement): Handle EXEC_OMP_* statement freeing.
639 * trans-stmt.h (gfc_trans_omp_directive): New prototype.
640 * openmp.c: New file.
641 * trans-openmp.c: New file.
643 2006-02-13 Andrew Pinski <pinskia@physics.uc.edu>
644 Jakub Jelinek <jakub@redhat.com>
647 * trans-decl.c (gfc_get_symbol_decl, gfc_get_fake_result_decl): Use
648 gfc_add_decl_to_function rather than gfc_finish_var_decl on length.
650 2006-02-13 Paul Thomas <pault@gcc.gnu.org>
654 * resolve.c (resolve_symbol): Extend the requirement that module
655 arrays have constant bounds to those in the main program. At the
656 same time simplify the array bounds, to avoiding trapping parameter
657 array references, and exclude automatic character length from main
658 and modules. Rearrange resolve_symbol and resolve_derived to put as
659 each flavor together, as much as is possible and move all specific
660 code for flavors FL_VARIABLE, FL_PROCEDURE and FL_PARAMETER into new
662 (resolve_fl_var_and_proc, resolve_fl_variable, resolve_fl_procedure):
663 New functions to do work of resolve_symbol.
664 (resolve_index_expr): New function that is called from resolved_symbol
665 and is extracted from resolve_charlen.
666 (resolve_charlen): Call this new function.
667 (resolve_fl_derived): Renamed resolve_derived to be consistent with
668 the naming of the new functions for the other flavours. Change the
669 charlen checking so that the style is consistent with other similar
670 checks. Add the generation of the gfc_dt_list, removed from resolve_
674 * resolve.c (resolve_actual_arglist): Prevent internal procedures
675 from being dummy arguments.
678 * resolve.c (resolve_actual_arglist): Prevent pure but non-intrinsic
679 procedures from being dummy arguments.
682 * resolve.c (check_data_variable): Add test that data variable is in
686 * resolve.c (resolve_call): Add test that the subroutine does not
689 2006-02-12 Erik Edelmann <eedelman@gcc.gnu.org>
692 * trans-array.c (gfc_trans_allocate_array_storage): New argument
693 dealloc; free the temporary only if dealloc is true.
694 (gfc_trans_allocate_temp_array): New argument bool dealloc, to be
695 passed onwards to gfc_trans_allocate_array_storage.
696 (gfc_trans_array_constructor, gfc_conv_loop_setup): Update call to
697 gfc_trans_allocate_temp_array.
698 * trans-array.h (gfc_trans_allocate_temp_array): Update function
700 * trans-expr.c (gfc_conv_function_call): Set new argument 'dealloc'
701 to gfc_trans_allocate_temp_array to false in case of functions
703 (gfc_trans_arrayfunc_assign): Return NULL for functions returning
706 2006-02-10 Steven G. Kargl <kargls@comcast.net>
709 *decl.c (variable_decl): Improve error message. Remove initialization
710 typespec. Wrap long line.
711 *expr.c (gfc_check_pointer_assign): Permit checking of type, kind type,
713 *simplify.c (gfc_simplify_null): Ensure type, kind type, and rank
717 2006-02-10 Tobias Schl
\81üter <tobias.schlueter@physik.uni-muenchen.de>
720 * arith.c (eval_intrinsic): Accept INTRINSIC_PARENTHESES.
721 * expr.c (check_intrinsic_op): Likewise.
722 * module.c (mio_expr): Likewise.
724 2006-02-09 Tobias Schl
\81üter <tobias.schlueter@physik.uni-muenchen.de>
726 * dump-parse-tree.c: Update copyright years.
727 * matchexp.c: Likewise.
728 * module.c: Likewise.
731 * gfortran.h (gfc_intrinsic_op): Add INTRINSIC_PARENTHESES.
732 * dump-parse-tree (gfc_show_expr): Handle INTRINSIC_PARENTHESES.
733 * expr.c (simplify_intrinsic_op): Treat INTRINSIC_PARENTHESES as
734 if it were INTRINSIC_UPLUS.
735 * resolve.c (resolve_operator): Handle INTRINSIC_PARENTHESES.
736 * match.c (intrinsic_operators): Add INTRINSIC_PARENTHESES.
737 * matchexp.c (match_primary): Record parentheses surrounding
739 * module.c (intrinsics): Add INTRINSIC_PARENTHESES for module
741 * trans-expr.c (gfc_conv_expr_op): Handle INTRINSIC_PARENTHESES.
743 2006-02-09 Paul Thomas <pault@gcc.gnu.org>
746 * trans-stmt.c (gfc_trans_allocate): Provide assumed character length
747 scalar with missing backend_decl for the hidden dummy charlen.
750 * interface.c (gfc_extend_assign): Remove detection of non-PURE
751 subroutine in assignment interface, with gfc_error, and put it in
752 * resolve.c (resolve_code).
755 * interface.c (gfc_procedure_use): Flag rank checking for non-
756 elemental, contained or interface procedures in call to
757 (compare_actual_formal), where ranks are checked for assumed
760 2006-02-08 Francois-Xavier Coudert <coudert@clipper.ens.fr>
763 * trans-decl.c (gfc_generate_function_code): Add new argument,
764 pedantic, to set_std call.
766 2005-02-06 Thomas Koenig <Thomas.Koenig@online.de>
769 * gfortran.texi: Document the GFORTRAN_CONVERT_UNIT environment
771 * invoke.texi: Mention the "Runtime" chapter.
772 Document the -fconvert= option.
773 * gfortran.h: Add options_convert.
774 * lang.opt: Add fconvert=little-endian, fconvert=big-endian,
775 fconvert=native and fconvert=swap.
776 * trans-decl.c (top level): Add gfor_fndecl_set_convert.
777 (gfc_build_builtin_function_decls): Set gfor_fndecl_set_convert.
778 (gfc_generate_function_code): If -fconvert was specified,
779 and this is the main program, add a call to set_convert().
780 * options.c: Handle the -fconvert options.
782 2006-02-06 Roger Sayle <roger@eyesopen.com>
784 * trans-stmt.c (gfc_evaluate_where_mask): Allow the NMASK argument
785 to be NULL to indicate that the not mask isn't required.
786 (gfc_trans_where_2): Remove PMASK argument. Avoid calculating the
787 pending mask for the last clause of a WHERE chain. Update recursive
789 (gfc_trans_forall_1): Update call to gfc_trans_where_2.
790 (gfc_trans_where): Likewise.
792 2006-02-06 Jakub Jelinek <jakub@redhat.com>
794 Backport from gomp-20050608-branch
795 * trans-decl.c (create_function_arglist): Handle dummy functions.
797 * trans-decl.c (gfc_get_symbol_decl): Revert explicit setting of
799 (gfc_trans_vla_type_sizes): Also "gimplify"
800 GFC_TYPE_ARRAY_DATAPTR_TYPE for GFC_DESCRIPTOR_TYPE_P types.
801 * trans-array.c (gfc_trans_deferred_array): Call
802 gfc_trans_vla_type_sizes.
804 * trans-decl.c (saved_function_decls, saved_parent_function_decls):
805 Remove unnecessary initialization.
806 (create_function_arglist): Make sure __result has complete type.
807 (gfc_get_fake_result_decl): Change current_fake_result_decl into
808 a tree chain. For entry master, create a separate variable
809 for each result name. For BT_CHARACTER results, call
810 gfc_finish_var_decl on length even if it has been already created,
812 (gfc_trans_vla_type_sizes): For function/entry result, adjust
813 result value type, not the FUNCTION_TYPE.
814 (gfc_generate_function_code): Adjust for current_fake_result_decl
816 (gfc_trans_deferred_vars): Likewise. Call gfc_trans_vla_type_sizes
817 even on result if it is assumed-length character.
819 * trans-decl.c (gfc_trans_dummy_character): Add SYM argument.
820 Call gfc_trans_vla_type_sizes.
821 (gfc_trans_auto_character_variable): Call gfc_trans_vla_type_sizes.
822 (gfc_trans_vla_one_sizepos, gfc_trans_vla_type_sizes_1,
823 gfc_trans_vla_type_sizes): New functions.
824 (gfc_trans_deferred_vars): Adjust gfc_trans_dummy_character
825 callers. Call gfc_trans_vla_type_sizes on assumed-length
826 character parameters.
827 * trans-array.c (gfc_trans_array_bounds,
828 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias): Call
829 gfc_trans_vla_type_sizes.
830 * trans.h (gfc_trans_vla_type_sizes): New prototype.
832 * trans-decl.c (gfc_build_qualified_array): For non-assumed-size
833 arrays without constant size, create also an index var for
834 GFC_TYPE_ARRAY_SIZE (type). If the type is incomplete, complete
836 (gfc_create_string_length): Don't call gfc_defer_symbol_init
837 if just creating DECL_ARGUMENTS.
838 (gfc_get_symbol_decl): Call gfc_finish_var_decl and
839 gfc_defer_symbol_init even if ts.cl->backend_decl is already
840 set to a VAR_DECL that doesn't have DECL_CONTEXT yet.
841 (create_function_arglist): Rework, so that hidden length
842 arguments for CHARACTER parameters are created together with
843 the parameters. Resolve ts.cl->backend_decl for CHARACTER
844 parameters. If the argument is a non-constant length array
845 or CHARACTER, ensure PARM_DECL has different type than
847 (generate_local_decl): Call gfc_get_symbol_decl even
848 for non-referenced non-constant length CHARACTER parameters
849 after optionally issuing warnings.
850 * trans-array.c (gfc_trans_array_bounds): Set last stride
851 to GFC_TYPE_ARRAY_SIZE (type) to initialize it as well.
852 (gfc_trans_dummy_array_bias): Initialize GFC_TYPE_ARRAY_SIZE (type)
855 * trans-expr.c (gfc_conv_expr_val): Fix comment typo.
857 * trans-stmt.c (gfc_trans_simple_do): Fix comment.
859 2006-02-04 Roger Sayle <roger@eyesopen.com>
861 * dependency.c (gfc_check_dependency): Remove unused vars and nvars
862 arguments. Replace with an "identical" argument. A full array
863 reference to the same symbol is a dependency if identical is true.
864 * dependency.h (gfc_check_dependency): Update prototype.
865 * trans-array.h (gfc_check_dependency): Delete duplicate prototype.
866 * trans-stmt.c: #include dependency.h for gfc_check_dependency.
867 (gfc_trans_forall_1): Update calls to gfc_check_dependency.
868 (gfc_trans_where_2): Likewise. Remove unneeded variables.
869 (gfc_trans_where_3): New function for simple non-dependent WHEREs.
870 (gfc_trans_where): Call gfc_trans_where_3 to translate simple
871 F90-style WHERE statements without internal dependencies.
872 * Make-lang.in (trans-stmt.o): Depend upon dependency.h.
874 2006-02-05 H.J. Lu <hongjiu.lu@intel.com>
878 * resolve.c (resolve_types): New function.
879 (resolve_codes): Likewise.
880 (gfc_resolve): Use them.
882 2006-02-05 Roger Sayle <roger@eyesopen.com>
884 * trans-stmt.c (gfc_evaluate_where_mask): Use LOGICAL*1 for WHERE
885 masks instead of LOGICAL*4.
887 2006-02-05 Jakub Jelinek <jakub@redhat.com>
889 * resolve.c (resolve_symbol): Initialize constructor_expr to NULL.
891 2006-02-04 Thomas Koenig <Thomas.Koenig@online.de>
894 check.c (identical_dimen_shape): New function.
895 (check_dot_product): Use identical_dimen_shape() to check sizes
897 (gfc_check_matmul): Likewise.
898 (gfc_check_merge): Check conformance between tsource and fsource
899 and between tsource and mask.
900 (gfc_check_pack): Check conformance between array and mask.
902 2006-02-03 Steven G. Kargl <kargls@comcast>
903 Paul Thomas <pault@gcc.gnu.org>
906 * resolve.c (resolve_symbol): Default initialization of derived type
907 component reguires the SAVE attribute.
909 2006-02-02 Steven G. Kargl <kargls@comcast>
912 match.c (gfc_match_nullify): Free the list from head not tail.
915 * match.c (match_forall_header): Fix internal error caused by bogus
919 2006-01-31 Thomas Koenig <Thomas.Koenig@online.de>
922 expr.c (gfc_check_conformance): Reorder error message
924 check.c(gfc_check_minloc_maxloc): Call gfc_check_conformance
925 for checking arguments array and mask.
926 (check_reduction): Likewise.
928 2005-01-30 Erik Edelmann <eedelman@gcc.gnu.org>
931 * trans-io.c (set_internal_unit): Check the rank of the
932 expression node itself instead of its symbol.
934 2006-01-29 Paul Thomas <pault@gcc.gnu.org>
940 * interface.c (compare_actual_formal): Error for INTENT(OUT or INOUT)
941 if actual argument is not a variable.
943 2006-01-28 Paul Thomas <pault@gcc.gnu.org>
946 * expr.c (gfc_check_assign, gfc_check_pointer_assign): Emit error if
947 the lvalue is a use associated procedure.
951 * expr.c (gfc_check_pointer_assign): Emit error if lvalue and rvalue
952 character lengths are not the same. Use gfc_dep_compare_expr for the
954 * gfortran.h: Add prototype for gfc_dep_compare_expr.
955 * dependency.h: Remove prototype for gfc_dep_compare_expr.
957 2005-01-27 Paul Thomas <pault@gcc.gnu.org>
960 * resolve.c (resolve_function): Add GFC_ISYM_LOC to the list of
961 generic_ids exempted from assumed size checking.
963 2006-01-27 Jakub Jelinek <jakub@redhat.com>
966 * Make-lang.in (fortran/scanner.o): Depend on toplev.h.
967 * lang.opt (fpreprocessed): New option.
968 * scanner.c: Include toplev.h.
969 (gfc_src_file, gfc_src_preprocessor_lines): New variables.
970 (preprocessor_line): Unescape filename if there were any
972 (load_file): If initial and gfc_src_file is not NULL,
973 use it rather than opening the file. If gfc_src_preprocessor_lines
974 has non-NULL elements, pass it to preprocessor_line.
975 (unescape_filename, gfc_read_orig_filename): New functions.
976 * gfortran.h (gfc_option_t): Add flag_preprocessed.
977 (gfc_read_orig_filename): New prototype.
978 * options.c (gfc_init_options): Clear flag_preprocessed.
979 (gfc_post_options): If flag_preprocessed, call
980 gfc_read_orig_filename.
981 (gfc_handle_option): Handle OPT_fpreprocessed.
982 * lang-specs.h: Pass -fpreprocessed to f951 if preprocessing
985 2005-01-27 Erik Edelmann <eedelman@gcc.gnu.org>
987 * symbol.c (free_old_symbol): Fix confusing comment, and add code
988 to free old_symbol->formal.
990 2005-01-26 Paul Thomas <pault@gcc.gnu.org>
993 * resolve.c (resolve_function): Exclude statement functions from
994 global reference checking.
1000 * resolve.c (resolve_function): Declare a gfc_symbol to replace the
1001 references through the symtree to the symbol associated with the
1002 function expresion. Give error on reference to an assumed character
1003 length function is defined in an interface or an external function
1004 that is not a dummy argument.
1005 (resolve_symbol): Give error if an assumed character length function
1006 is array-valued, pointer-valued, pure or recursive. Emit warning
1007 that character(*) value functions are obsolescent in F95.
1010 * trans-expr.c (gfc_conv_function_call): The above patch to resolve.c
1011 prevents any assumed character length function call from getting here
1012 except intrinsics such as SPREAD. In this case, ensure that no
1013 segfault occurs from referencing non-existent charlen->length->
1014 expr_type and provide a backend_decl for the charlen from the charlen
1015 of the first actual argument.
1017 Cure temp name confusion.
1018 * trans-expr.c (gfc_get_interface_mapping_array): Change name of
1019 temporary from "parm" to "ifm" to avoid clash with temp coming from
1022 2005-01-25 Erik Edelmann <eedelman@gcc.gnu.org>
1025 * symbol.c (free_old_symbol): New function.
1026 (gfc_commit_symbols): Use it.
1027 (gfc_commit_symbol): New function.
1028 (gfc_use_derived): Use it.
1029 * gfortran.h: Add prototype for gfc_commit_symbol.
1030 * intrinsic.c (gfc_find_function): Search in 'conversion'
1031 if not found in 'functions'.
1032 (gfc_convert_type_warn): Add a symtree to the new
1033 expression node, and commit the new symtree->n.sym.
1034 * resolve.c (gfc_resolve_index): Make sure typespec is
1035 properly initialized.
1037 2005-01-23 Paul Thomas <pault@gcc.gnu.org>
1040 * decl.c (get_proc_name): Replace subroutine and function attributes
1041 in "already defined" test by the formal arglist pointer being non-NULL.
1043 Fix regression in testing of admissability of attributes.
1044 * symbol.c (gfc_add_attribute): If the current_attr has non-zero
1045 intent, do not do the check for a dummy being used.
1046 * decl.c (attr_decl1): Add current_attr.intent as the third argument
1047 in the call to gfc_add_attribute.
1048 * gfortran.h: Add the third argument to the prototype for
1051 2006-01-21 Joseph S. Myers <joseph@codesourcery.com>
1053 * gfortranspec.c (lang_specific_driver): Update copyright notice
1056 2005-01-21 Paul Thomas <pault@gcc.gnu.org>
1060 * decl.c (get_proc_name): If there is an existing
1061 symbol in the encompassing namespace, call errors
1062 if it is a procedure of the same name or the kind
1063 field is set, indicating a type declaration.
1069 * decl.c (add_global_entry): New function to check
1070 for existing global symbol with this name and to
1071 create new one if none exists.
1072 (gfc_match_entry): Call add_global_entry before
1073 matching argument lists for subroutine and function
1075 * gfortran.h: Prototype for existing function,
1077 * resolve.c (resolve_global_procedure): New function
1078 to check global symbols for procedures.
1079 (resolve_call, resolve_function): Calls to this
1080 new function for non-contained and non-module
1082 * match.c (match_common): Add check for existing
1083 global symbol, creat one if none exists and emit
1084 error if there is a clash.
1085 * parse.c (global_used): Remove static and use the
1086 gsymbol name rather than the new_block name, so that
1087 the function can be called from resolve.c.
1088 (parse_block_data, parse_module, add_global_procedure):
1089 Improve checks for existing gsymbols. Emit error if
1090 already defined or if references were to another type.
1094 * trans-expr.c (gfc_conv_aliased_arg): New function called by
1095 gfc_conv_function_call that coverts an expression for an aliased
1096 component reference to a derived type array into a temporary array
1097 of the same type as the component. The temporary is passed as an
1098 actual argument for the procedure call and is copied back to the
1099 derived type after the call.
1100 (is_aliased_array): New function that detects an array reference
1101 that is followed by a component reference.
1102 (gfc_conv_function_call): Detect an aliased actual argument with
1103 is_aliased_array and convert it to a temporary and back again
1104 using gfc_conv_aliased_arg.
1106 2006-01-19 Tobias Schl
\81üter <tobias.schlueter@physik.uni-muenchen.de>
1108 * gfortranspec.c: Update copyright years.
1109 * trans.c: Likewise.
1110 * trans-array.c: Likewise.
1111 * trans-array.h: Likewise.
1112 * trans-decl.c: Likewise.
1113 * trans-stmt.c: Likewise.
1114 * trans-stmt.h: Likewise.
1115 * trans-types.c: Likewise.
1117 2006-01-18 Tobias Schl
\81üter <tobias.schlueter@physik.uni-muenchen.de>
1121 * gfortran.h (BBT_HEADER): Move definition up.
1122 (gfc_st_label): Add BBT_HEADER, remove 'prev' and 'next'.
1123 * io.c (format_asterisk): Adapt initializer.
1124 * resolve.c (resolve_branch): Allow FORTRAN 66 cross-block GOTOs
1126 (warn_unused_label): Take gfc_st_label label as argument, adapt to
1128 (gfc_resolve): Adapt call to warn_unused_label.
1129 * symbol.c (compare_st_labels): New function.
1130 (gfc_free_st_label, free_st_labels, gfc_get_st_label): Convert to
1131 using balanced binary tree.
1132 * decl.c (match_char_length, gfc_match_old_kind_spec): Do away
1134 (warn_unused_label): Adapt to binary tree.
1135 * match.c (gfc_match_small_literal_int): Only set cnt if non-NULL.
1136 * primary.c (match_kind_param): Do away with cnt.
1138 2006-01-18 Paul Thomas <pault@gcc.gnu.org>
1143 * symbol.c (check_conflict): Add pointer valued elemental
1144 functions and internal procedures with the external attribute
1145 to the list of conflicts.
1146 (gfc_add_attribute): New catch-all function to perform the
1147 checking of symbol attributes for attribute declaration
1149 * decl.c (attr_decl1): Call gfc_add_attribute for each of -
1150 (gfc_match_external, gfc_match_intent, gfc_match_intrinsic,
1151 gfc_match_pointer, gfc_match_dimension, gfc_match_target):
1152 Remove spurious calls to checks in symbol.c. Set the
1153 attribute directly and use the call to attr_decl() for
1155 * gfortran.h: Add prototype for gfc_add_attribute.
1158 * resolve.c (resolve_function): Exclude PRESENT from assumed size
1159 argument checking. Replace strcmp's with comparisons with generic
1162 2006-01-16 Rafael
\81Ávila de Esp
\81índola <rafael.espindola@gmail.com>
1164 * gfortranspec.c (lang_specific_spec_functions): Remove.
1166 2006-01-16 Richard Guenther <rguenther@suse.de>
1168 * trans-stmt.c (gfc_trans_if_1): Use fold_buildN and build_int_cst.
1169 (gfc_trans_arithmetic_if): Likewise.
1170 (gfc_trans_simple_do): Likewise.
1171 (gfc_trans_do): Likewise.
1172 (gfc_trans_do_while): Likewise.
1173 (gfc_trans_logical_select): Likewise.
1174 (gfc_trans_forall_loop): Likewise.
1175 (generate_loop_for_temp_to_lhs): Likewise.
1176 (generate_loop_for_rhs_to_temp): Likewise.
1177 (gfc_trans_allocate): Likewise.
1178 * trans.c (gfc_add_expr_to_block): Do not fold expr again.
1180 2006-01-16 Richard Guenther <rguenther@suse.de>
1182 * trans-expr.c (gfc_conv_function_call): Use fold_build2.
1183 * trans-stmt.c (gfc_trans_goto): Likewise. Use build_int_cst.
1184 * trans.c (gfc_trans_runtime_check): Don't fold the condition
1187 2006-01-13 Steven G. Kargl <kargls@comcast.net>
1190 * symbol.c (gfc_free_st_label): Give variable meaningful name. Remove
1191 unneeded parenthesis. Fix-up the head of the list (2 lines gleaned
1194 2006-01-13 Diego Novillo <dnovillo@redhat.com>
1196 * trans.c (gfc_add_expr_to_block): Do not fold tcc_statement
1199 2006-01-11 Tobias Schl
\81üter <tobias.schlueter@physik.uni-muenchen.de>
1201 * parse.c (next_fixed): Remove superfluous string concatenation.
1203 2006-01-11 Bernhard Fischer <rep.nop@aon.at>
1206 * scanner.c (load_line): use maxlen to determine the line-length used
1207 for padding lines in fixed form.
1209 2005-01-11 Paul Thomas <pault@gcc.gnu.org>
1212 * trans-types.c (copy_dt_decls_ifequal): Copy backend decl for
1215 2006-01-09 Andrew Pinski <pinskia@physics.uc.edu>
1218 * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Use fold_convert
1219 to avoid type mismatch.
1221 2006-01-09 Andrew Pinski <pinskia@physics.uc.edu>
1224 * trans-decl.c (gfc_generate_function_code): Move the NULLing of
1225 current_fake_result_decl down to below generate_local_vars.
1227 2006-01-09 Feng Wang <fengwang@nudt.edu.cn>
1230 * trans-expr.c (gfc_to_single_character): New function that converts
1231 string to single character if its length is 1.
1232 (gfc_build_compare_string):New function that compare string and handle
1233 single character specially.
1234 (gfc_conv_expr_op): Use gfc_build_compare_string.
1235 (gfc_trans_string_copy): Use gfc_to_single_character.
1236 * trans-intrinsic.c (gfc_conv_intrinsic_strcmp): Use
1237 gfc_build_compare_string.
1238 * trans.h (gfc_build_compare_string): Add prototype.
1240 2006-01-09 Feng Wang <fengwang@nudt.edu.cn>
1242 * simplify.c (gfc_simplify_char): Use UCHAR_MAX instead of literal
1244 (gfc_simplify_ichar): Get the result from unsinged char and in the
1245 range 0 to UCHAR_MAX instead of CHAR_MIN to CHAR_MAX.
1247 2005-01-08 Erik Edelmann <eedelman@gcc.gnu.org>
1250 * resolve.c (resolve_fntype): Check that PUBLIC functions
1251 aren't of PRIVATE type.
1253 2005-01-07 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
1255 * decl.c (gfc_match_function_decl): Correctly error out in case of
1256 omitted function argument list.
1258 2006-01-07 Paul Thomas <pault@gcc.gnu.org>
1261 * trans-array.c (gfc_reverse_ss): Remove static attribute.
1262 (gfc_walk_elemental_function_args): Replace gfc_expr * argument for
1263 the function call with the corresponding gfc_actual_arglist*. Change
1265 (gfc_walk_function_expr): Call to gfc_walk_elemental_function_args
1266 now requires the actual argument list instead of the expression for
1268 * trans-array.h: Modify the prototype for gfc_walk_elemental_function_args
1269 and provide a prototype for gfc_reverse_ss.
1270 * trans-stmt.h (gfc_trans_call): Add the scalarization code for the case
1271 where an elemental subroutine has array valued actual arguments.
1277 * resolve.c (check_assumed_size_reference): New function to check for upper
1278 bound in assumed size array references.
1279 (resolve_assumed_size_actual): New function to do a very restricted scan
1280 of actual argument expressions of those procedures for which incomplete
1281 assumed size array references are not allowed.
1282 (resolve_function, resolve_call): Switch off assumed size checking of
1283 actual arguments, except for elemental procedures and intrinsic
1284 inquiry functions, in some circumstances.
1285 (resolve_variable): Call check_assumed_size_reference.
1287 2006-01-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1290 * io.c (next_char_not_space): New function that returns the next
1291 character that is not white space.
1292 (format_lex): Use the new function to skip whitespace within
1295 2006-01-05 Erik Edelmann <eedelman@gcc.gnu.org>
1298 * expr.c (gfc_expr_set_symbols_referenced): New function.
1299 * gfortran.h: Add a function prototype for it.
1300 * resolve.c (resolve_function): Use it for
1301 use associated character functions lengths.
1302 * expr.c, gfortran.h, resolve.c: Updated copyright years.
1304 2006-01-03 Steven G. Kargl <kargls@comcast.net>
1307 * resolve.c (resolve_forall_iterators): Check for scalar variables;
1308 Check stride is nonzero.
1310 2006-01-02 Steven G. Kargl <kargls@comcast.net>
1313 * parse.c (next_free): Check for whitespace after the label.
1314 * match.c (gfc_match_small_literal_int): Initialize cnt variable.
1316 2006-01-01 Steven G. Kargl <kargls@comcast.net>
1318 * ChangeLog: Split previous years into ...
1319 * ChangeLog-2002: here.
1320 * ChangeLog-2003: here.
1321 * ChangeLog-2004: here.
1322 * ChangeLog-2005: here.