1 2006-07-26 Francois-Xavier Coudert <coudert@clipper.ens.fr>
3 * intrinsic.c (add_functions): Add INT2, SHORT, INT8, LONG,
4 LSTAT, MCLOCK and MCLOCK8 intrinsic functions.
5 (add_subroutines): Add LSTAT intrinsic subroutine.
6 * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_INT2,
7 GFC_ISYM_INT8, GFC_ISYM_LONG, GFC_ISYM_LSTAT, GFC_ISYM_MCLOCK
9 * iresolve.c (gfc_resolve_int2, gfc_resolve_int8,
10 gfc_resolve_long, gfc_resolve_lstat, gfc_resolve_mclock,
11 gfc_resolve_mclock8, gfc_resolve_lstat_sub): New functions.
12 * check.c (gfc_check_intconv): New function.
13 * trans-intrinsic.c (gfc_conv_intrinsic_function): Add cases for
15 * simplify.c (gfc_simplify_intconv, gfc_simplify_int2,
16 gfc_simplify_int8, gfc_simplify_long): New functions.
17 * intrinsic.h (gfc_check_intconv, gfc_simplify_int2,
18 gfc_simplify_int8, gfc_simplify_long, gfc_resolve_int2,
19 gfc_resolve_int8, gfc_resolve_long, gfc_resolve_lstat,
20 gfc_resolve_mclock, gfc_resolve_mclock8, gfc_resolve_lstat_sub):
23 2006-07-24 Erik Edelmann <eedelman@gcc.gnu.org>
26 * trans-array.c (gfc_conv_array_parameter): Give special treatment for
27 ALLOCATABLEs if they are themselves dummy variables.
29 2006-07-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
32 * gfortran.h: Declare gfc_large_io_int_kind.
33 * trans-types.c (gfc_init_kinds): Set gfc_large_io_int_kind
35 * trans-io.c (enum iofield_type): Add large_io_int type.
36 (gfc_build_st_parameter): Same.
37 (gfc_build_io_library_fndecls): Same.
38 * ioparm_def: Use large_io_int to define rec.
40 2006-07-22 Steven Bosscher <steven@gcc.gnu.org>
43 * trans-stmt.c (gfc_trans_arithmetic_if): Evaluate the condition once.
45 2006-07-16 Jakub Jelinek <jakub@redhat.com>
48 * trans-openmp.c (gfc_trans_omp_do): Look for LASTPRIVATE in
49 code->exp.omp_clauses rather than in the 3rd function argument.
51 2006-07-16 Paul Thomas <pault@gcc.gnu.org>
54 * trans-common.c (translate_common): If common_segment is NULL
55 emit error that common block does not exist.
58 * io.c (check_io_constraints): It is an error if an ADVANCE
59 specifier appears without an explicit format.
62 * resolve.c (resolve_generic_s): For a use_associated function,
63 do not search for an alternative symbol in the parent name
67 * resolve.c (resolve_elemental_actual): New function t combine
68 all the checks of elemental procedure actual arguments. In
69 addition, check of array valued optional args(this PR) has
71 (resolve_function, resolve_call): Remove parts that treated
72 elemental procedure actual arguments and call the above.
74 2006-07-14 Steven G. Kargl <kargls@comcast.net>
76 * trans-expr.c (gfc_trans_string_copy): Evaluate the string lengths
78 006-07-13 Paul Thomas <pault@gcc.gnu.org>
81 * trans-expr.c (gfc_conv_aliased_arg): Missing formal arg means
82 that intent is INOUT (fixes regression).
85 * check.c (check_present): The only permitted reference is a
89 * decl.c (variable_decl): Add error if a derived type is not
90 from the current namespace if the namespace is an interface
93 2006-07-12 Francois-Xavier Coudert <coudert@clipper.ens.fr>
96 * trans-expr.c (gfc_trans_string_copy): Generate inline code
97 to perform string copying instead of calling a library function.
98 * trans-decl.c (gfc_build_intrinsic_function_decls): Don't build
100 * trans.h (gfor_fndecl_copy_string): Remove prototype.
102 2006-07-11 Feng Wang <fengwang@nudt.edu.cn>
105 * trans-io.c (transfer_expr): Deal with Hollerith constants used in
108 2006-07-07 Kazu Hirata <kazu@codesourcery.com>
110 * intrinsic.texi: Fix typos.
112 2006-07-07 Paul Thomas <pault@gcc.gnu.org>
116 * io.c (resolve_tag): Any integer that is not an assigned
117 variable is an error.
119 2006-07-06 Francois-Xavier Coudert <coudert@clipper.ens.fr>
122 * trans-array.c (gfc_trans_array_bound_check): Add a locus
123 argument, and use it in the error messages.
124 (gfc_conv_array_index_offset): Donc perform bounds checking on
125 the last dimension of assumed-size arrays.
127 2006-07-06 Francois-Xavier Coudert <coudert@clipper.ens.fr>
130 * trans-stmt.c (compute_inner_temp_size): Don't perform bounds
131 checking when calculating the bounds of scalarization.
133 2006-07-05 Francois-Xavier Coudert <coudert@clipper.ens.fr>
136 * interface.c (gfc_match_interface): Don't allow dummy procedures
137 to have a generic interface.
139 2006-07-04 Paul Thomas <pault@gcc.gnu.org>
142 * trans-array.c (gfc_conv_expr_descriptor): When building temp,
143 ensure that the substring reference uses a new charlen.
144 * trans-expr.c (gfc_conv_aliased_arg): Add the formal intent to
145 the argument list, lift the treatment of missing string lengths
146 from the above and implement the use of the intent.
147 (gfc_conv_function_call): Add the extra argument to the call to
151 * trans-array.c (get_array_ctor_var_strlen): Treat a constant
153 * array.c (gfc_resolve_character_array_constructor): Remove
154 static attribute and add the gfc_ prefix, make use of element
155 charlens for the expression and pick up constant string lengths
156 for expressions that are not themselves constant.
157 * gfortran.h : resolve_character_array_constructor prototype
159 * resolve.c (gfc_resolve_expr): Call resolve_character_array_
160 constructor again after expanding the constructor, to ensure
161 that the character length is passed to the expression.
163 2006-07-04 Francois-Xavier Coudert <coudert@clipper.ens.fr>
164 Daniel Franke <franke.daniel@gmail.com>
166 * intrinsic.c (add_subroutines): Add ITIME and IDATE.
167 * intrinsic.h (gfc_check_itime_idate,gfc_resolve_idate,
168 fc_resolve_itime): New protos.
169 * iresolve.c (gfc_resolve_itime, gfc_resolve_idate): New functions.
170 * check.c (gfc_check_itime_idate): New function.
171 * intrinsic.texi: Document the new intrinsics.
173 2006-07-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
175 * intrinsics/date_and_time.c (itime0,idate0,itime_i4,itime_i8,
176 idate_i4,idate_i8): New functions.
179 2006-07-03 Asher Langton <langton2@llnl.gov>
181 * decl.c (match_old_style_init): Add data attribute to symbol.
183 2006-07-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
185 * iresolve.c (gfc_resolve_cpu_time, gfc_resolve_random_number):
186 Remove ATTRIBUTE_UNUSED for used argument.
188 2006-07-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
190 * intrinsic.texi: Document new intrinsics.
192 2006-07-01 Tobias Schl
\81üter <tobias.schlueter@physik.uni-muenchen.de>
195 * parse.c (next_free): Error out on line starting with semicolon.
196 (next_fixed): Fix formatting. Error out on line starting with
199 2006-06-30 Kazu Hirata <kazu@codesourcery.com>
201 * check.c: Fix a comment typo.
203 2006-06-25 Paul Thomas <pault@gcc.gnu.org>
206 * interface.c (compare_actual_formal): Signal an error if the formal
207 argument is a pure procedure and the actual is not pure.
210 * resolve.c (resolve_actual_arglist): If the type of procedure
211 passed as an actual argument is not already declared, see if it is
215 * resolve.c (resolve_select): Use bits 1 and 2 of a new int to
216 keep track of the appearance of constant logical case expressions.
217 Signal an error is either value appears more than once.
220 * resolve.c (resolve_fl_procedure): Signal an error if an elemental
221 function is not scalar valued.
224 * match.c (recursive_stmt_fcn): Perform implicit typing of variables.
227 * match.c (match_forall_iterator): Mark new variables as
228 FL_UNKNOWN if the match fails.
231 * match.c (gfc_match_forall): Remove extraneous call to
235 * resolve.c (resolve_code, resolve_function): Rework
236 forall_flag scheme so that it is set and has a value of
237 2, when the code->expr (ie. the forall mask) is resolved.
238 This is used to change "block" to "mask" in the non-PURE
241 2006-06-24 Francois-Xavier Coudert <coudert@clipper.ens.fr>
244 * resolve.c (resolve_substring): Don't issue out-of-bounds
245 error messages when the range has zero size.
247 2006-06-24 Francois-Xavier Coudert <coudert@clipper.ens.fr>
250 * lang-specs.h (f95-cpp-input): Pass -ffree-form to f951 unless
251 -ffixed-form is explicitly specified.
253 2006-06-24 Paul Thomas <pault@gcc.gnu.org>
256 * trans-array.c (gfc_conv_expr_descriptor): When building temp,
257 use the substring reference to calculate the length if the
258 expression does not have a charlen.
260 2006-06-24 Francois-Xavier Coudert <coudert@clipper.ens.fr>
263 * trans-intrinsic.c (gfc_conv_intrinsic_mod): Support cases where
264 there is no integer kind equal to the resulting real kind.
265 * intrinsic.c (add_functions): MODULO is not allowed as an actual
268 2006-06-23 Steven G. Kargl <kargls@comcast.net>
271 * match.c (gfc_match_if): Handle errors in assignment in simple if.
273 2006-06-22 Asher Langton <langton2@llnl.gov>
276 * primary.c (gfc_match_rvalue): Don't call match_substring for
277 implicit non-character types.
279 2006-06-22 Francois-Xavier Coudert <coudert@clipper.ens.fr>
282 * iresolve.c (gfc_resolve_reshape): Call reshape_r4 and
283 reshape_r8 instead of reshape_4 and reshape_8.
284 (gfc_resolve_transpose): Likewise for transpose.
286 2006-06-21 Francois-Xavier Coudert <coudert@clipper.ens.fr>
288 * trans-expr.c (gfc_conv_missing_dummy, gfc_conv_unary_op,
289 gfc_conv_cst_int_power, gfc_conv_string_tmp,
290 gfc_conv_function_call): Replace calls to convert on constant
291 integer nodes by build_int_cst.
292 * trans-stmt.c (gfc_trans_do): Likewise.
293 * trans-io.c (set_internal_unit, transfer_namelist_element):
295 * trans-decl.c (build_entry_thunks): Likewise.
297 2006-06-20 Steven G. Kargl <kargls@comcast.net>
299 * simplify.c (gfc_simplify_rrspacing): Initialize and clear mpfr_t
302 2006-06-20 Paul Thomas <pault@gcc.gnu.org>
306 * check.c (non_init_transformational): New function.
307 (find_substring_ref): New function to signal use of disallowed
308 transformational intrinsic in an initialization expression.
309 (gfc_check_all_any): Call previous if initialization expr.
310 (gfc_check_count): The same.
311 (gfc_check_cshift): The same.
312 (gfc_check_dot_product): The same.
313 (gfc_check_eoshift): The same.
314 (gfc_check_minloc_maxloc): The same.
315 (gfc_check_minval_maxval): The same.
316 (gfc_check_gfc_check_product_sum): The same.
317 (gfc_check_pack): The same.
318 (gfc_check_spread): The same.
319 (gfc_check_transpose): The same.
320 (gfc_check_unpack): The same.
323 *intrinsic.c (add_functions): Add gfc_simplify_transfer.
324 *intrinsic.h : Add prototype for gfc_simplify_transfer.
325 *simplify.c (gfc_simplify_transfer) : New function to act as
326 placeholder for eventual implementation. Emit error for now.
329 * expr.c (find_array_element): Eliminate condition on length of
330 offset. Add bounds checking. Rearrange exit. Return try and
331 put gfc_constructor result as an argument.
332 (find_array_section): New function.
333 (find_substring_ref): New function.
334 (simplify_const_ref): Add calls to previous.
335 (simplify_parameter_variable): Return on NULL expr.
336 (gfc_simplify_expr): Only call gfc_expand_constructor for full
340 * match.c (gfc_match_forall): Add missing locus to gfc_code.
342 2006-06-18 Francois-Xavier Coudert <coudert@clipper.ens.fr>
345 * trans-intrinsic.c (gfc_conv_associated): Use pre and post blocks
346 of the scalarization expression.
348 2006-06-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
352 * arith.c (gfc_range_check): Return ARITH_OK if -fno-range-check. Add
353 return of ARITH_NAN, ARITH_UNDERFLOW, and ARITH_OVERFLOW.
354 (gfc_arith_divide): If -fno-range-check allow mpfr to divide by zero.
355 * gfortran.h (gfc_option_t): Add new flag.
356 * invoke.texi: Document new flag.
357 * lang.opt: Add option -frange-check.
358 * options.c (gfc_init_options): Initialize new flag.
359 (gfc_handle_options): Set flag if invoked.
360 * simplify.c (range_check): Add error messages for
361 overflow, underflow, and other errors.
362 * trans-const.c (gfc_conv_mpfr_to_tree): Build NaN and Inf from mpfr
365 2006-06-17 Karl Berry <karl@gnu.org>
367 * gfortran.texi (@dircategory): Use "Software development"
368 instead of "Programming", following the Free Software Directory.
370 2006-06-16 Francois-Xavier Coudert <coudert@clipper.ens.fr>
373 * trans-array.c (gfc_conv_ss_startstride): Correct the runtime
374 conditions for bounds-checking. Check for nonzero stride.
375 Don't check the last dimension of assumed-size arrays. Fix the
376 dimension displayed in the error message.
378 2006-06-15 Thomas Koenig <Thomas.Koenig@online.de>
380 * trans-array.h (gfc_trans_create_temp_array): Add bool
382 * trans-arrray.c (gfc_trans_create_temp_array): Add extra
383 argument "function" to show if we are translating a function.
384 If we are translating a function, perform checks whether
385 the size along any argument is negative. In that case,
387 (gfc_trans_allocate_storage): Add function argument (as
388 false) to gfc_trans_create_temp_array call.
389 * trans-expr.c (gfc_conv_function_call): Add function
390 argument (as true) to gfc_trans_create_temp_array call.
391 * trans-stmt.c (gfc_conv_elemental_dependencies): Add
392 function argument (as false) to gfc_trans_create_temp_array
394 * trans-intrinsic.c: Likewise.
396 2006-06-10 Paul Thomas <pault@gcc.gnu.org>
401 * decl.c (get_proc_name): Add new argument to flag that a
402 module function entry is being treated. If true, correct
403 error condition, add symtree to module namespace and add
405 (gfc_match_function_decl, gfc_match_entry,
406 gfc_match_subroutine): Use the new argument in calls to
408 * resolve.c (resolve_entries): ENTRY symbol reference to
409 to master entry namespace if a module function.
410 * trans-decl.c (gfc_create_module_variable): Return if
411 the symbol is an entry.
412 * trans-exp.c (gfc_conv_variable): Check that parent_decl
415 2006-06-09 Jakub Jelinek <jakub@redhat.com>
418 * trans-openmp.c (gfc_omp_clause_default_ctor): New function.
419 * trans.h (gfc_omp_clause_default_ctor): New prototype.
420 * f95-lang.c (LANG_HOOKS_OMP_CLAUSE_DEFAULT_CTOR): Define.
422 2006-06-08 Francois-Xavier Coudert <coudert@clipper.ens.fr>
425 * trans-expr.c (gfc_conv_substring): If the substring start is
426 greater than its end, the length of the substring is zero, and
428 (gfc_trans_string_copy): Don't generate a call to
429 _gfortran_copy_string when destination length is zero.
431 2006-06-08 Asher Langton <langton2@llnl.gov>
434 * trans-array.c (gfc_conv_array_ref): Eliminate bounds checking
435 for assumed-size Cray pointees.
437 2006-06-08 Steven G. Kargl <kargls@comcat.net>
439 * intrinsic.c (add_subroutine): Make make_noreturn() conditional on
440 the appropriate symbol name.
442 2006-06-07 Paul Thomas <pault@gcc.gnu.org>
445 * resolve.c (resolve_fl_variable): Error if an automatic
446 object has the SAVE attribute.
449 * expr.c (simplify_intrinsic_op): Transfer the rank and
450 the locus to the simplified expression.
454 * gfortran.h : Add int entry_id to gfc_symbol.
455 * resolve.c : Add static variables current_entry_id and
457 (resolve_variable): During code resolution, check if a
458 reference to a dummy variable in an executable expression
459 is preceded by its appearance as a parameter in an entry.
460 Likewise check its specification expressions.
461 (resolve_code): Update current_entry_id on EXEC_ENTRY.
462 (resolve_charlen, resolve_fl_variable): Set and reset
464 (is_non_constant_shape_array): Do not return on detection
465 of a variable but continue to resolve all the expressions.
466 (resolve_codes): set current_entry_id to an out of range
469 2006-06-06 Mike Stump <mrs@apple.com>
471 * Make-lang.in: Rename to htmldir to build_htmldir to avoid
472 installing during build.
474 2006-06-06 Paul Thomas <pault@gcc.gnu.org>
477 * match.c (gfc_match_common): Fix code typo. Remove
478 sym->name, since sym is NULL, and replace with name.
480 2006-06-05 Francois-Xavier Coudert <coudert@clipper.ens.fr>
483 * resolve.c (compute_last_value_for_triplet): New function.
484 (check_dimension): Correctly handle zero-sized array sections.
485 Add checking on last element of array sections.
487 2006-06-05 Steven G. Kargl <kargls@comcast.net>
489 * data.c (gfc_assign_data_value): Fix comment typo. Remove
492 2006-06-05 Paul Thomas <pault@gcc.gnu.org>
495 * data.c (create_character_intializer): Add warning message
496 for truncated string.
499 * symbol.c : Include flags.h.
500 (gfc_add_type): If a procedure and types are the same do not
501 throw an error unless standard is less than gnu or pedantic.
504 * parse.c (parse_do_block): Error if named block do construct
505 does not have a named enddo.
508 * check.c (gfc_check_associated): Pick up EXPR_NULL for pointer
509 as well as target and put error return at end of function.
511 2006-06-03 Francois-Xavier Coudert <coudert@clipper.ens.fr>
513 * trans.c (gfc_msg_bounds, gfc_msg_fault, gfc_msg_wrong_return):
514 Add strings for common runtime error messages.
515 (gfc_trans_runtime_check): Add a locus argument, use a string
516 and not a string tree for the message.
517 * trans.h (gfc_trans_runtime_check): Change prototype accordingly.
518 (gfc_msg_bounds, gfc_msg_fault, gfc_msg_wrong_return): Add proto.
519 * trans-const.c (gfc_strconst_bounds, gfc_strconst_fault,
520 gfc_strconst_wrong_return, gfc_strconst_current_filename): Remove.
521 (gfc_init_constants): Likewise.
522 * trans-const.h: Likewise.
523 * trans-decl.c (gfc_build_builtin_function_decls): Call to
524 _gfortran_runtime_error has only one argument, the message string.
525 * trans-array.h (gfc_conv_array_ref): Add a symbol argument and a
527 * trans-array.c (gfc_trans_array_bound_check): Build precise
529 (gfc_conv_array_ref): Use the new symbol argument and the locus
530 to build more precise error messages.
531 (gfc_conv_ss_startstride): More precise error messages.
532 * trans-expr.c (gfc_conv_variable): Give symbol reference and
533 locus to gfc_conv_array_ref.
534 (gfc_conv_function_call): Use the new prototype for
535 gfc_trans_runtime_check.
536 * trans-stmt.c (gfc_trans_goto): Build more precise error message.
537 * trans-io.c (set_string): Likewise.
538 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Use new prototype
539 for gfc_trans_runtime_check.
541 2006-06-01 Thomas Koenig <Thomas.Koenig@online.de>
544 * arith.c: Cast the characters from the strings to unsigned
545 char to avoid values less than 0 for extended ASCII.
547 2006-06-01 Per Bothner <bothner@bothner.com>
549 * data.c (gfc_assign_data_value): Handle USE_MAPPED_LOCATION.
550 * scanner.c (gfc_gobble_whitespace): Likewise.
552 2006-06-01 Paul Thomas <pault@gcc.gnu.org>
556 * interface.c (compare_parameter): Return 1 if the actual arg
557 is external and the formal is a procedure.
558 (compare_actual_formal): If the actual argument is a variable
559 and the formal a procedure, this an error. If a gsymbol exists
560 for a procedure of the same name, this is not yet resolved and
561 the error is cleared.
563 * trans-intrinsic.c (gfc_conv_associated): Make provision for
564 zero array length or zero string length contingent on presence
565 of target, for consistency with standard.
567 2006-05-30 Asher Langton <langton2@llnl.gov>
569 * symbol.c (check_conflict): Allow external, function, and
570 subroutine attributes with Cray pointees.
571 * trans-expr.c (gfc_conv_function_val): Translate Cray pointees
572 that point to procedures.
573 * gfortran.texi: Document new feature.
575 2006-05-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
578 * io.c (check_format): Add error for missing period in format
579 specifier unless -std=legacy.
580 * gfortran.texi: Add description of expanded namelist read and
581 missing period in format extensions.
583 2006-05-29 Francois-Xavier Coudert <coudert@clipper.ens.fr>
586 * trans-array.c (gfc_conv_array_ref): Perform out-of-bounds
587 checking for assumed-size arrrays for all but the last dimension.
589 2006-05-29 Francois-Xavier Coudert <coudert@clipper.ens.fr>
591 * invoke.texi: Change -fpackderived into -fpack-derived.
593 2006-05-29 Kazu Hirata <kazu@codesourcery.com>
595 * options.c, primary.c, resolve.c, trans-common.c: Fix typos
598 2006-05-28 Kazu Hirata <kazu@codesourcery.com>
600 * check.c, expr.c, resolve.c, trans-common.c,
601 trans-intrinsic.c, trans-stmt.c, trans-types.c: Fix comment typos.
603 2006-05-27 Francois-Xavier Coudert <coudert@clipper.ens.fr>
606 * trans-array.c (gfc_conv_array_ref): Don't perform out-of-bounds
607 checking for assumed-size arrrays.
609 2006-05-27 Paul Thomas <pault@gcc.gnu.org>
611 * trans-intrinsic.c (gfc_conv_associated): If pointer in first
612 arguments has zero array length of zero string length, return
615 2006-05-26 Francois-Xavier Coudert <coudert@clipper.ens.fr>
618 * trans-array.c (gfc_trans_dummy_array_bias): Don't use stride as
619 a temporary variable when -fbounds-check is enabled, since its
620 value will be needed later.
622 2006-05-26 Thomas Koenig <Thomas.Koenig@online.de>
625 * io.c (match_io): print (1,*) is an error.
627 2006-05-26 Paul Thomas <pault@gcc.gnu.org>
630 * resolve.c (find_array_spec): Add gfc_symbol, derived, and
631 use to track repeated component references.
635 * trans-intrinsic.c (gfc_conv_intrinsic_array_transfer): Use
636 se->string_length throughout and use memcpy to populate the
637 expression returned to the scalarizer.
638 (gfc_size_in_bytes): New function.
640 2006-05-21 Paul Thomas <pault@gcc.gnu.org>
643 * primary.c (gfc_match_rvalue): Test if symbol represents a
644 direct recursive function reference. Error if array valued,
645 go to function0 otherwise.
647 2006-05-21 Paul Thomas <pault@gcc.gnu.org>
650 * interface.c (gfc_extend_assign): Use new EXEC_ASSIGN_CALL.
651 * gfortran.h : Put EXEC_ASSIGN_CALL in enum.
652 * trans-stmt.c (gfc_conv_elemental_dependencies): New function.
653 (gfc_trans_call): Call it. Add new boolian argument to flag
654 need for dependency checking. Assert intent OUT and IN for arg1
656 (gfc_trans_forall_1): Use new code EXEC_ASSIGN_CALL.
657 trans-stmt.h : Modify prototype of gfc_trans_call.
658 trans.c (gfc_trans_code): Add call for EXEC_ASSIGN_CALL.
659 st.c (gfc_free_statement): Free actual for EXEC_ASSIGN_CALL.
660 * dependency.c (gfc_check_fncall_dependency): Don't check other
664 * resolve.c : Remove resolving_index_expr.
665 (entry_parameter): Remove.
666 (gfc_resolve_expr, resolve_charlen, resolve_fl_variable): Lift
667 calls to entry_parameter and references to resolving_index_expr.
670 * check.c (gfc_check_associated): Replace NULL assert with an
671 error message, since it is possible to generate bad code that
672 has us fall through to here..
675 * iresolve.c (maxloc, minloc): If DIM is not present, pass the
676 rank of ARRAY as the shape of the result. Otherwise, pass the
677 shape of ARRAY, less the dimension DIM.
678 (maxval, minval): The same, when DIM is present, otherwise no
681 2006-05-19 H.J. Lu <hongjiu.lu@intel.com>
684 * trans-array.c (gfc_conv_expr_descriptor): Don't zero the
685 first stride to indicate a temporary.
686 * trans-expr.c (gfc_conv_function_call): Likewise.
688 2006-05-18 Francois-Xavier Coudert <coudert@clipper.ens.fr>
689 Feng Wang <fengwang@nudt.edu.cn>
692 * dump-parse-tree.c (gfc_show_expr): Deal with Hollerith constants.
693 * data.c (create_character_intializer): Set from_H flag if character is
694 initialized by Hollerith constant.
696 2006-05-17 Francois-Xavier Coudert <coudert@clipper.ens.fr>
699 * resolve.c (resolve_call, resolve_function): Issue an error
700 if a function or subroutine call is recursive but the function or
701 subroutine wasn't declared as such.
703 2006-05-07 Francois-Xavier Coudert <coudert@clipper.ens.fr>
706 * gfortran.dg/recursive_check_1.f: New test.
709 2006-05-17 Francois-Xavier Coudert <coudert@clipper.ens.fr>
712 * dump-parse-tree.c (gfc_show_code_node): Try harder to find the
713 called procedure name.
715 2006-05-17 Jakub Jelinek <jakub@redhat.com>
718 * trans-openmp.c (gfc_trans_omp_parallel_do,
719 gfc_trans_omp_parallel_sections, gfc_trans_omp_parallel_workshare): Set
720 OMP_PARALLEL_COMBINED flag.
722 2006-05-16 H.J. Lu <hongjiu.lu@intel.com>
725 * Make-lang.in (GFORTRAN_D_OBJS): Replace gcc.o with
728 2006-05-15 Paul Thomas <pault@gcc.gnu.org>
731 * resolve.c: Static resolving_index_expr initialized.
732 (entry_parameter): New function to emit errors for variables
733 that are not entry parameters.
734 (gfc_resolve_expr): Call entry_parameter, when resolving
735 variables, if the namespace has entries and resolving_index_expr
737 (resolve_charlen): Set resolving_index_expr before the call to
738 resolve_index_expr and reset it afterwards.
739 (resolve_fl_variable): The same before and after the call to
740 is_non_constant_shape_array, which ultimately makes a call to
744 * resolve.c (resolve_code): Add error condition that the return
745 expression must be scalar.
748 * matchexp.c (gfc_get_parentheses): New function.
749 (match_primary): Remove inline code and call above.
750 * gfortran.h: Provide prototype for gfc_get_parentheses.
751 * resolve.c (resolve_array_ref): Call the above, when start is a
752 derived type variable array reference.
754 2006-05-15 Jakub Jelinek <jakub@redhat.com>
757 * trans-openmp.c (gfc_trans_omp_array_reduction): Ensure
758 OMP_CLAUSE_REDUCTION_{INIT,MERGE} are set to BIND_EXPR.
760 2006-05-14 H.J. Lu <hongjiu.lu@intel.com>
762 * Make-lang.in (fortran/options.o): Depend on $(TARGET_H).
764 2006-05-11 Francois-Xavier Coudert <coudert@clipper.ens.fr>
767 * parse.c (next_free): Return instead of calling decode_statement
770 2005-05-10 Thomas Koenig <Thomas.Koenig@online.de>
773 * trans-array.c(gfc_array_allocate): If ref->next exists
774 that is if there is a statement like ALLOCATE(foo%bar(2)),
775 F95 rules require that bar should be a pointer.
777 2006-05-10 Francois-Xavier Coudert <coudert@clipper.ens.fr>
780 * resolve.c (gfc_resolve_index): Make REAL array indices a
781 GFC_STD_LEGACY feature.
783 2006-05-10 Francois-Xavier Coudert <coudert@clipper.ens.fr>
786 * parse.c (reject_statement): Clear gfc_new_block.
788 2006-05-09 Steven G. Kargl <kargls@comcast.net>
790 * invoke.texi: Missed file in previous commit. Update
791 description of -fall-intrinsics
793 2006-05-07 Steven Boscher <steven@gcc.gnu.org>
796 * parse.c (next_statement): Add check to avoid an ICE when
797 gfc_current_locus.lb is not set.
799 2006-05-07 Tobias Schl
\81üter <tobias.schlueter@physik.uni-muenchen.de>
802 * match.c (match_case_eos): Error out on garbage following
805 2006-05-07 Paul Thomas <pault@gcc.gnu.org>
808 * trans-array.c (get_array_ctor_strlen): Remove static attribute.
809 * trans.h: Add prototype for get_array_ctor_strlen.
810 * trans-intrinsic.c (gfc_conv_intrinsic_len): Switch on EXPR_ARRAY
811 and call get_array_ctor_strlen.
813 2006-05-05 Steven G. Kargl <kargls@comcast.net>
815 * invoke.texi: Update description of -fall-intrinsics
816 * options.c (gfc_post_options): Disable -Wnonstd-intrinsics if
817 -fall-intrinsics is used.
818 (gfc_handle_option): Permit -Wno-nonstd-intrinsics.
820 2006-05-04 Tobias Schl
\81üter <tobias.schlueter@physik.uni-muenchen.de>
822 * simplify.c (ascii_table): Fix wrong entry.
824 2006-05-02 Steven G. Kargl <kargls@comcast.net>
827 * lang.opt: Fix -Wtab description
830 * lang.opt: New flag -fall-intrinsics.
831 * invoke.texi: Document option.
832 * gfortran.h (options_t): New member flag_all_intrinsics.
833 * options.c (gfc_init_options, gfc_handle_option): Set new option.
834 sort nearby misplaced options.
835 * intrinsic.c (add_sym, make_generic, make_alias): Use it.
837 2006-05-02 Paul Thomas <pault@gcc.gnu.org>
840 * module.c: Add static flag in_load_equiv.
841 (mio_expr_ref): Return if no symtree and in_load_equiv.
842 (load_equiv): If any of the equivalence members have no symtree, free
843 the equivalence and the associated expressions.
846 * trans-common.c (gfc_trans_common): Invert the order of calls to
847 finish equivalences and gfc_commit_symbols.
849 2006-04-29 Francois-Xavier Coudert <coudert@clipper.ens.fr>
852 * simplify.c (simplify_len): Character variables with constant
853 length can be simplified.
855 2006-04-29 H.J. Lu <hongjiu.lu@intel.com>
858 * trans-array.c (gfc_conv_array_transpose): Move gcc_assert
859 before gfc_conv_expr_descriptor.
861 2006-04-23 Paul Thomas <pault@gcc.gnu.org>
864 * resolve.c (resolve_call): Check conformity of elemental
865 subroutine actual arguments.
867 2006-04-22 Jakub Jelinek <jakub@redhat.com>
870 * iresolve.c (gfc_resolve_reshape): Use reshape_r16 for real(16).
871 (gfc_resolve_transpose): Use transpose_r16 for real(16).
873 2006-04-21 Paul Thomas <pault@gcc.gnu.org>
876 * resolve.c (resolve_function): Remove general restriction on auto
877 character length function interfaces.
878 (gfc_resolve_uops): Check restrictions on defined operator
880 (resolve_types): Call the check for defined operators.
883 * trans-array.c (gfc_trans_array_constructor_subarray): Remove
884 redundant gfc_todo_error.
885 (get_array_ctor_var_strlen): Remove typo in enum.
887 2006-04-18 Bernhard Fischer <aldot@gcc.gnu.org>
889 * parse.c (next_free): Use consistent error string between
890 free-form and fixed-form for illegal statement label of zero.
891 (next_fixed): Use consistent warning string between free-form
892 and fixed-form for statement labels for empty statements.
894 2006-04-18 Steve Ellcey <sje@cup.hp.com>
896 * trans-io.c (gfc_build_io_library_fndecls): Align pad.
898 2006-04-16 Thomas Koenig <Thomas.Koenig@online.de>
901 * trans-array.c(gfc_array_init_size): Introduce or_expr
902 which is true if the size along any dimension
903 is negative. Create a temporary variable with base
904 name size. If or_expr is true, set the temporary to 0,
905 to the normal size otherwise.
907 2006-04-16 Paul Thomas <pault@gcc.gnu.org>
910 * intrinsic.c (add_functions): Mark LOGICAL as elemental.
913 * expr.c (gfc_check_assign): Extend scope of error to include
914 assignments to a procedure in the main program or, from a
915 module or internal procedure that is not that represented by
916 the lhs symbol. Use VARIABLE rather than l-value in message.
919 * trans-array.c (gfc_trans_deferred_array): If the backend_decl
920 is not a descriptor, dereference and then test and use the type.
923 * trans-decl.c (gfc_trans_deferred_vars): Check if an array
924 result, is also automatic character length. If so, process
925 the character length.
930 * trans_intrinsic.c (gfc_walk_intrinsic_bound): Set
931 data.info.dimen for bound intrinsics.
932 * trans_array.c (gfc_conv_ss_startstride): Pick out LBOUND and
933 UBOUND intrinsics and supply their shape information to the ss
937 * trans_expr.c (gfc_trans_function_call): Add a new block, post,
938 in to which all the argument post blocks are put. Add this block
939 to se->pre after a byref call or to se->post, otherwise.
941 2006-04-14 Roger Sayle <roger@eyesopen.com>
943 * trans-io.c (set_string): Use fold_build2 and build_int_cst instead
944 of build2 and convert to construct "x < 0" rather than "x <= -1".
946 2006-04-13 Richard Henderson <rth@redhat.com>
948 * trans-openmp.c (gfc_trans_omp_sections): Adjust for changed
949 number of operands to OMP_SECTIONS.
951 2006-04-08 Kazu Hirata <kazu@codesourcery.com>
953 * gfortran.texi: Fix typos. Follow spelling conventions.
954 * resolve.c, trans-expr.c, trans-stmt.c: Fix comment typos.
955 Follow spelling conventions.
957 2006-04-05 Roger Sayle <roger@eyesopen.com>
959 * dependency.c (get_no_elements): Delete function.
960 (get_deps): Delete function.
961 (transform_sections): Delete function.
962 (gfc_check_section_vs_section): Significant rewrite.
964 2006-04-04 H.J. Lu <hongjiu.lu@intel.com>
967 * trans-array.c (gfc_conv_expr_descriptor): Only dereference
968 character pointer when copying temporary.
971 * trans-array.c (gfc_conv_expr_descriptor): Properly copy
972 temporary character with non constant size.
974 2006-04-03 Paul Thomas <pault@gcc.gnu.org>
977 * trans.h: Prototype for gfc_conv_missing_dummy.
978 * trans-expr (gfc_conv_missing_dummy): New function
979 (gfc_conv_function_call): Call it and tidy up some of the code.
980 * trans-intrinsic (gfc_conv_intrinsic_function_args): The same.
983 * array.c (gfc_array_dimen_size): If available, return shape[dimen].
984 * resolve.c (resolve_function): If available, use the argument
985 shape for the function expression.
986 * iresolve.c (gfc_resolve_transfer): Set shape[0] = size.
988 2006-04-02 Erik Edelmann <eedelman@gcc.gnu.org>
990 * trans-array.c (gfc_trans_dealloc_allocated): Take a
991 tree representation of the array to be deallocated as argument
992 instead of its gfc_symbol.
993 (gfc_trans_deferred_array): Update call to
994 gfc_trans_dealloc_allocated.
995 * trans-array.h (gfc_trans_dealloc_allocated): Update
997 * trans-expr.c (gfc_conv_function_call): Update call to
998 gfc_trans_dealloc_allocated, get indirect reference to dummy
1001 2006-04-01 Roger Sayle <roger@eyesopen.com>
1004 * trans-array.c (gfc_trans_allocate_array_storage): In array index
1005 calculations use gfc_index_zero_node and gfc_index_one_node instead
1006 of integer_zero_node and integer_one_node respectively.
1007 (gfc_conv_array_transpose): Likewise.
1008 (gfc_conv_ss_startstride): Likewise.
1009 (gfc_trans_dummy_array_bias): Likewise.
1011 2006-04-01 Roger Sayle <roger@eyesopen.com>
1013 * dependency.c (gfc_is_inside_range): Delete.
1014 (gfc_check_element_vs_section): Significant rewrite.
1016 2006-04-01 Roger Sayle <roger@eyesopen.com>
1018 * dependency.c (gfc_dep_compare_expr): Strip parentheses and unary
1019 plus operators when comparing expressions. Handle comparisons of
1020 the form "X+C vs. X", "X vs. X+C", "X-C vs. X" and "X vs. X-C" where
1021 C is an integer constant. Handle comparisons of the form "P+Q vs.
1022 R+S" and "P-Q vs. R-S". Handle comparisons of integral extensions
1023 specially (increasing functions) so extend(A) > extend(B), when A>B.
1024 (gfc_check_element_vs_element): Move test later, so that we ignore
1025 the fact that "A < B" or "A > B" when A or B contains a forall index.
1027 2006-03-31 Asher Langton <langton2@llnl.gov>
1030 * expr.c (gfc_check_assign): Allow cray pointee to be assumes-size.
1032 2006-03-30 Paul Thomas <paulthomas2@wanadoo.fr>
1033 Bud Davis <bdavis9659@sbcglobal.net>
1036 * module.c (load_needed): Traverse entire tree before returning.
1038 2006-03-30 Roger Sayle <roger@eyesopen.com>
1041 * trans.c (gfc_trans_runtime_check): Promote the arguments of
1042 __builtin_expect to the correct types, and the result back to
1045 2006-03-29 Carlos O'Donell <carlos@codesourcery.com>
1047 * Make-lang.in: Rename docdir to gcc_docdir.
1049 2006-03-28 Steven G. Kargl <kargls@comcast.net>
1051 * intrinsic.texi: s/floor/float in previous commit.
1053 2006-03-28 Paul Thomas <pault@gcc.gnu.org>
1056 * resolve.c (resolve_fl_procedure): Do not check the access of
1057 derived types for internal procedures.
1059 2006-03-27 Jakub Jelinek <jakub@redhat.com>
1061 * io.c (check_io_constraints): Don't look at
1062 dt->advance->value.charater.string, unless it is a CHARACTER
1065 * f95-lang.c (gfc_get_alias_set): New function.
1066 (LANG_HOOKS_GET_ALIAS_SET): Define.
1068 2006-03-25 Steven G. Kargl <kargls@comcast.net>
1071 * intrinsic.c (add_functions): Allow FLOAT to accept all integer kinds.
1072 * intrinsic.texi: Document FLOAT.
1074 2006-03-25 Thomas Koenig <Thomas.Koenig@online.de>
1077 * iresolve.c (gfc_resolve_reshape): Remove doubling of
1078 kind for complex. For real(kind=10), call reshape_r10.
1079 (gfc_resolve_transpose): For real(kind=10), call
1082 2006-03-25 Roger Sayle <roger@eyesopen.com>
1084 * dependency.c (gfc_check_dependency): Improve handling of pointers;
1085 Two variables of different types can't have a dependency, and two
1086 variables with the same symbol are equal, even if pointers.
1088 2006-03-24 Roger Sayle <roger@eyesopen.com>
1090 * gfortran.h (gfc_symbol): Add a new "forall_index" bit field.
1091 * match.c (match_forall_iterator): Set forall_index field on
1092 the iteration variable's symbol.
1093 * dependency.c (contains_forall_index_p): New function to
1094 traverse a gfc_expr to check whether it contains a variable
1095 with forall_index set in it's symbol.
1096 (gfc_check_element_vs_element): Return GFC_DEP_EQUAL for scalar
1097 constant expressions that don't variables used as FORALL indices.
1099 2006-03-22 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
1102 * error.c (gfc_fatal_error): Return ICE_EXIT_CODE instead of 4.
1104 2006-03-22 Thomas Koenig <Thomas.Koenig@online.de>
1107 * gfortran.h (gfc_option_t): Add record_marker.
1108 * lang.opt: Add -frecord-marker=4 and -frecord-marker=8.
1109 * trans-decl.c: Add gfor_fndecl_set_record_marker.
1110 (gfc_build_builtin_function_decls): Set
1111 gfor_fndecl_set_record_marker.
1112 (gfc_generate_function_code): If we are in the main program
1113 and -frecord-marker was provided, call set_record_marker.
1114 * options.c (gfc_handle_option): Add handling for
1115 -frecord-marker=4 and -frecord-marker=8.
1116 * invoke.texi: Document -frecord-marker.
1118 2006-03-22 Paul Thomas <pault@gcc.gnu.org>
1121 * trans-intrinsic.c (gfc_conv_intrinsic_array_transfer): New
1122 function to implement array valued TRANSFER intrinsic.
1123 (gfc_conv_intrinsic_function): Call the new function if TRANSFER
1124 and non-null se->ss.
1125 (gfc_walk_intrinsic_function): Treat TRANSFER as one of the
1126 special cases by calling gfc_walk_intrinsic_libfunc directly.
1128 2006-03-21 Toon Moene <toon@moene.indiv.nluug.nl>
1130 * options.c (gfc_init_options): Initialize
1131 flag_argument_noalias to 3.
1133 2006-03-20 Thomas Koenig <Thomas.Koenig@online.de>
1136 * iresolve.c (gfc_resolve_maxloc): If mask is scalar,
1137 prefix the function name with an "s". If the mask is scalar
1138 or if its kind is smaller than gfc_default_logical_kind,
1139 coerce it to default kind.
1140 (gfc_resolve_maxval): Likewise.
1141 (gfc_resolve_minloc): Likewise.
1142 (gfc_resolve_minval): Likewise.
1143 (gfc_resolve_product): Likewise.
1144 (gfc_resolve_sum): Likewise.
1146 2006-03-19 Paul Thomas <pault@gcc.gnu.org>
1149 *expr.c (external_spec_function): Permit elemental functions.
1152 *interface.c (compare_actual_formal): Detect call for procedure
1153 usage and require rank checking, in this case, for assumed shape
1154 and deferred shape arrays.
1155 (gfc_procedure_use): Revert to pre-PR25070 call to
1156 compare_actual_formal that does not require rank checking..
1158 2006-03-16 Roger Sayle <roger@eyesopen.com>
1160 * gfortran.h (gfc_equiv_info): Add length field.
1161 * trans-common.c (copy_equiv_list_to_ns): Set the length field.
1162 * dependency.c (gfc_are_equivalenced_arrays): Use both the offset
1163 and length fields to determine whether the two equivalenced symbols
1166 2006-03-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1169 * gfortran.h: Add warn_ampersand.
1170 * invoke.texi: Add documentation for new option.
1171 * lang.opt: Add Wampersand.
1172 * options.c (gfc_init_options): Initialize warn_ampersand.
1173 (gfc_post_options): Set the warn if pedantic.
1174 (set_Wall): Set warn_ampersand.
1175 (gfc_handle_option: Add Wampersand for itself, -std=f95, and -std=f2003.
1176 * scanner.c (gfc_next_char_literal): Add test for missing '&' in
1177 continued character constant and give warning if missing.
1179 2006-03-14 Steven G. Kargl <kargls@comcast.net>
1182 * gfortran.h: Wrap Copyright line.
1183 (gfc_option_t): add warn_tabs member.
1184 * lang.opt: Update Coyright year. Add the Wtabs.
1185 * invoke.texi: Document -Wtabs.
1186 * scanner.c (gfc_gobble_whitespace): Use warn_tabs. Add linenum to
1187 suppress multiple warnings.
1188 (load_line): Use warn_tabs. Add linenum, current_line, seen_comment
1189 to suppress multiple warnings.
1190 * options.c (gfc_init_options): Initialize warn_tabs.
1191 (set_Wall): set warn_tabs for -Wall.
1192 (gfc_post_options): Adjust flag_tabs depending on -pedantic.
1193 (gfc_handle_option): Process command-line option -W[no-]tabs
1195 2006-03-13 Paul Thomas <pault@gcc.gnu.org>
1198 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Set the initial position to zero and
1199 modify the condition for updating it, to implement the F2003 requirement for all(mask)
1202 2006-03-13 Jakub Jelinek <jakub@redhat.com>
1204 * trans-openmp.c (gfc_trans_omp_variable): Handle references
1206 * trans-expr.c (gfc_conv_variable): Remove useless setting
1207 of parent_flag, formatting.
1209 * trans-decl.c (gfc_get_fake_result_decl): Re-add setting of
1210 GFC_DECL_RESULT flag.
1212 2003-03-11 Roger Sayle <roger@eyesopen.com>
1214 * dependency.c (gfc_dep_compare_expr) <EXPR_OP>: Allow unary and
1215 binary operators to compare equal if their operands are equal.
1216 <EXPR_FUNCTION>: Allow "constant" intrinsic conversion functions
1217 to compare equal, if their operands are equal.
1219 2006-03-11 Erik Edelmann <eedelman@gcc.gnu.org>
1221 * symbol.c (check_conflict): Allow allocatable function results,
1222 except for elemental functions.
1223 * trans-array.c (gfc_trans_allocate_temp_array): Rename to ...
1224 (gfc_trans_create_temp_array): ... this, and add new argument
1226 (gfc_trans_array_constructor, gfc_conv_loop_setup): Update call
1227 to gfc_trans_allocate_temp_array.
1228 * trans-array.h (gfc_trans_allocate_temp_array): Update prototype.
1229 * trans-expr.c (gfc_conv_function_call): Use new arg of
1230 gfc_trans_create_temp_array avoid pre-allocation of temporary
1231 result variables of pointer AND allocatable functions.
1232 (gfc_trans_arrayfunc_assign): Return NULL for allocatable
1234 * resolve.c (resolve_symbol): Copy value of 'allocatable' attribute
1235 from sym->result to sym.
1237 2006-03-09 Erik Edelmann <eedelman@gcc.gnu.org>
1239 * trans-expr.c (gfc_add_interface_mapping): Copy 'allocatable'
1240 attribute from sym to new_sym. Call build_fold_indirect_ref()
1241 for allocatable arguments.
1243 2006-03-09 Paul Thomas <pault@gcc.gnu.org>
1246 * trans-array.c (gfc_conv_expr_descriptor): Exclude calculation of
1247 the offset and data when se->data_not_needed is set.
1248 * trans.h: Include the data_not_need bit in gfc_se.
1249 * trans-intrinsic.c (gfc_conv_intrinsic_size): Set it for SIZE.
1251 2006-03-06 Paul Thomas <pault@gcc.gnu.org>
1252 Erik Edelmann <eedelman@gcc.gnu.org>
1254 * trans-array.c (gfc_trans_dealloc_allocated): New function.
1255 (gfc_trans_deferred_array): Use it, instead of inline code.
1256 * trans-array.h: Prototype for gfc_trans_dealloc_allocated().
1257 * trans-expr.c (gfc_conv_function_call): Deallocate allocated
1258 ALLOCATABLE, INTENT(OUT) arguments upon procedure entry.
1260 2006-03-06 Paul Thomas <pault@gcc.gnu.org>
1263 * resolve.c (resolve_function): Add name after test for pureness.
1266 * trans-expr.c (gfc_conv_variable): Detect reference to parent result,
1267 store current_function_decl, replace with parent, whilst calls are
1268 made to gfc_get_fake_result_decl, and restore afterwards. Signal this
1269 to gfc_get_fake_result_decl with a new argument, parent_flag.
1270 * trans-stmt.c (gfc_trans_return): gfc_get_fake_result_decl 2nd arg
1272 * trans.h: Add parent_flag to gfc_get_fake_result_decl prototype.
1273 * trans-decl.c (gfc_get_fake_result_decl): On parent_flag, being set,
1274 add decl to parent function. Replace refs to current_fake_result_decl
1275 with refs to this_result_decl.
1276 (gfc_generate_function_code): Null parent_fake_result_decl before the
1277 translation of code for contained procedures. Set parent_flag to zero
1278 in call to gfc_get_fake_result_decl.
1279 * trans-intrinsic.c (gfc_conv_intrinsic_len): The same.
1281 2006-03-05 Steven G. Kargl <kargls@comcast.net>
1283 * simplify.c (gfc_simplify_verify): Fix return when SET=''.
1285 2006-03-05 Erik Edelmann <eedelman@gcc.gnu.org>
1288 * symbol.c (conf_std): New macro.
1289 (check_conflict): Use it to allow ALLOCATABLE dummy
1290 arguments for F2003.
1291 * trans-expr.c (gfc_conv_function_call): Pass the
1292 address of the array descriptor when dummy argument is
1294 * interface.c (compare_allocatable): New function.
1295 (compare_actual_formal): Use it.
1296 * resolve.c (resolve_deallocate_expr,
1297 resolve_allocate_expr): Check that INTENT(IN) variables
1298 aren't (de)allocated.
1299 * gfortran.texi (Fortran 2003 status): List ALLOCATABLE
1300 dummy arguments as supported.
1302 2006-03-03 Roger Sayle <roger@eyesopen.com>
1304 * dependency.c (gfc_check_element_vs_element): Revert last change.
1306 2006-03-03 Roger Sayle <roger@eyesopen.com>
1308 * dependency.c (gfc_check_element_vs_element): Consider two
1309 unordered scalar subscripts as (potentially) equal.
1311 2006-03-03 Roger Sayle <roger@eyesopen.com>
1313 * dependency.c (gfc_check_dependency): Call gfc_dep_resolver to
1314 check whether two array references have a dependency.
1315 (gfc_check_element_vs_element): Assume lref and rref must be
1316 REF_ARRAYs. If gfc_dep_compare_expr returns -2, assume these
1317 references could potentially overlap.
1318 (gfc_dep_resolver): Whitespace and comment tweaks. Assume a
1319 dependency if the references have different depths. Rewrite
1320 final term to clarrify we only have a dependency for overlaps.
1322 2006-03-03 Thomas Koenig <Thomas.Koenig@online.de>
1325 * trans-array.h: Adjust gfc_array_allocate prototype.
1326 * trans-array.c (gfc_array_allocate): Change type of
1327 gfc_array_allocatate to bool. Function returns true if
1328 it operates on an array. Change second argument to gfc_expr.
1329 Find last reference in chain.
1330 If the function operates on an allocatable array, emit call to
1331 allocate_array() or allocate64_array().
1332 * trans-stmt.c (gfc_trans_allocate): Code to follow to last
1333 reference has been moved to gfc_array_allocate.
1334 * trans.h: Add declaration for gfor_fndecl_allocate_array and
1335 gfor_fndecl_allocate64_array.
1336 (gfc_build_builtin_function_decls): Add gfor_fndecl_allocate_array
1337 and gfor_fndecl_allocate64_array.
1339 2006-03-01 Roger Sayle <roger@eyesopen.com>
1341 * trans-stmt.c (generate_loop_for_temp_to_lhs): Add an additional
1342 INVERT argument to invert the sense of the WHEREMASK argument.
1343 Remove unneeded code to AND together a list of masks.
1344 (generate_loop_for_rhs_to_temp): Likewise.
1345 (gfc_trans_assign_need_temp): Likewise.
1346 (gfc_trans_forall_1): Likewise.
1347 (gfc_evaluate_where_mask): Likewise, add a new INVERT argument
1348 to specify the sense of the MASK argument.
1349 (gfc_trans_where_assign): Likewise.
1350 (gfc_trans_where_2): Likewise. Restructure code that decides
1351 whether we need to allocate zero, one or two temporary masks.
1352 If this is a top-level WHERE (i.e. the incoming MASK is NULL),
1353 we only need to allocate at most one temporary mask, and can
1354 invert it's sense to provide the complementary pending execution
1355 mask. Only calculate the size of the required temporary arrays
1357 (gfc_trans_where): Update call to gfc_trans_where_2.
1359 2006-03-01 Paul Thomas <pault@gcc.gnu.org>
1361 * iresolve.c (gfc_resolve_dot_product): Remove any difference in
1362 treatment of logical types.
1363 * trans-intrinsic.c (gfc_conv_intrinsic_dot_product): New function.
1366 * trans-decl.c (gfc_get_symbol_decl): Extend condition that symbols
1367 must be referenced to include unreferenced symbols in an interface
1371 * trans-array.c (gfc_conv_resolve_dependencies): Add call to
1372 gfc_are_equivalenced_arrays.
1373 * symbol.c (gfc_free_equiv_infos, gfc_free_equiv_lists): New
1374 functions. (gfc_free_namespace): Call them.
1375 * trans-common.c (copy_equiv_list_to_ns): New function.
1376 (add_equivalences): Call it.
1377 * gfortran.h: Add equiv_lists to gfc_namespace and define
1378 gfc_equiv_list and gfc_equiv_info.
1379 * dependency.c (gfc_are_equivalenced_arrays): New function.
1380 (gfc_check_dependency): Call it.
1381 * dependency.h: Prototype for gfc_are_equivalenced_arrays.
1383 2006-03-01 Roger Sayle <roger@eyesopen.com>
1385 * dependency.c (gfc_is_same_range): Compare the stride, lower and
1386 upper bounds when testing array reference ranges for equality.
1387 (gfc_check_dependency): Fix indentation whitespace.
1388 (gfc_check_element_vs_element): Likewise.
1389 (gfc_dep_resolver): Likewise.
1391 2006-02-28 Thomas Koenig <Thomas.Koenig@online.de>
1393 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc):
1394 If the mask expression exists and has rank 0, enclose the
1395 generated loop in an "if (mask)". Put the default
1396 initialization into the else branch.
1398 2006-02-25 Thomas Koenig <Thomas.Koenig@online.de>
1401 * trans-intrinsic.c (gfc_conv_intrinsic_arith): If the
1402 mask expression exists and has rank 0, enclose the generated
1403 loop in an "if (mask)".
1404 * (gfc_conv_intrinsic_minmaxloc): Likewise.
1406 2006-02-24 Paul Thomas <pault@gcc.gnu.org>
1409 * resolve.c (resolve_contained_functions, resolve_types,
1410 gfc_resolve): Revert patch of 2006-02-19.
1412 2006-02-24 Paul Thomas <pault@gcc.gnu.org>
1415 * dependency.c (gfc_is_same_range): Correct typo.
1416 (gfc_check_section_vs_section): Call gfc_is_same_range.
1419 * trans-common.c (add_equivalences): Add a new flag that is set when
1420 an equivalence is seen that prevents more from being reset until the
1421 start of a new traversal of the list, thus ensuring completion of
1422 all the equivalences.
1424 2006-02-23 Erik Edelmann <eedelman@gcc.gnu.org>
1426 * module.c (read_module): Remove redundant code lines.
1428 2006-02-20 Rafael
\81Ávila de Esp
\81índola <rafael.espindola@gmail.com>
1429 * Make-lang.in (FORTRAN): Remove
1430 (.PHONY): Remove F95 and f95. Add fortran
1432 2006-02-20 Roger Sayle <roger@eyesopen.com>
1434 * trans-stmt.c (gfc_trans_where_2): Avoid updating unused current
1435 execution mask for empty WHERE/ELSEWHERE clauses. Don't allocate
1436 temporary mask arrays if they won't be used.
1438 2006-02-20 Roger Sayle <roger@eyesopen.com>
1440 * trans-stmt.c (gfc_trans_where_assign): Remove code to handle
1441 traversing a linked list of MASKs. The MASK is now always a
1442 single element requiring no ANDing during the assignment.
1444 2006-02-19 Thomas Koenig <Thomas.Koenig@online.de>
1446 * gfortran.texi: Document environment variables which
1447 influence runtime behavior.
1449 2006-02-19 H.J. Lu <hongjiu.lu@intel.com>
1451 * resolve.c (resolve_contained_functions): Call resolve_entries
1453 (resolve_types): Remove calls to resolve_entries and
1454 resolve_contained_functions.
1455 (gfc_resolve): Call resolve_contained_functions.
1457 2006-02-19 Erik Edelmann <eedelman@gcc.gnu.org>
1460 * intrinsic.c (gfc_convert_type_warn): Call
1461 gfc_intrinsic_symbol() on the newly created symbol.
1463 2006-02-19 Paul Thomas <pault@gcc.gnu.org>
1466 * resolve.c (is_non_constant_shape_array): New function.
1467 (resolve_fl_variable): Remove code for the new function and call it.
1468 (resolve_fl_namelist): New function. Add test for namelist array
1469 with non-constant shape, using is_non_constant_shape_array.
1470 (resolve_symbol): Remove code for resolve_fl_namelist and call it.
1473 * match.c (match_namelist): Increment the refs field of an accepted
1474 namelist object symbol.
1475 * resolve.c (resolve_fl_namelist): Test namelist objects for a conflict
1476 with contained or module procedures.
1478 2006-02-18 Roger Sayle <roger@eyesopen.com>
1480 * trans-stmt.c (struct temporary_list): Delete.
1481 (gfc_trans_where_2): Major reorganization. Remove no longer needed
1482 TEMP argument. Allocate and deallocate the control mask and
1483 pending control mask locally.
1484 (gfc_trans_forall_1): Delete TEMP local variable, and update
1485 call to gfc_trans_where_2. No need to deallocate arrays after.
1486 (gfc_evaluate_where_mask): Major reorganization. Change return
1487 type to void. Pass in parent execution mask, MASK, and two
1488 already allocated mask arrays CMASK and PMASK. On return
1489 CMASK := MASK & COND, PMASK := MASK & !COND. MASK, CMASK and
1490 CMASK may all be NULL, or refer to the same temporary arrays.
1491 (gfc_trans_where): Update call to gfc_trans_where_2. We no
1492 longer need a TEMP variable or to deallocate temporary arrays
1493 allocated by gfc_trans_where_2.
1495 2006-02-18 Danny Smith <dannysmith@users.sourceforeg.net>
1497 * gfortran.h (gfc_add_attribute): Change uint to unsigned int.
1498 * symbol.c (gfc_add_attribute): Likewise for definition.
1499 * resolve.c (resolve_global_procedure): Likewise for variable 'type'.
1501 2006-02-17 Richard Sandiford <richard@codesourcery.com>
1503 * trans-common.c: Include rtl.h earlier.
1504 * trans-decl.c: Likewise.
1506 2006-02-16 Jakub Jelinek <jakub@redhat.com>
1509 * parse.c (parse_omp_do, parse_omp_structured_block): Call
1510 gfc_commit_symbols and gfc_warning_check.
1512 * openmp.c (resolve_omp_clauses): Add a dummy case label to workaround
1513 PR middle-end/26316.
1515 2006-02-16 Paul Thomas <pault@gcc.gnu.org>
1518 * trans-expr.c (gfc_add_interface_mapping): Use the actual argument
1519 for character(*) arrays, rather than casting to the type and kind
1520 parameters of the formal argument.
1522 2006-02-15 Toon Moene <toon@moene.indiv.nluug.nl>
1525 * options.c: Do not warn for Fortran 2003 features by default.
1527 2006-02-15 Tobias Schl
\81üter <tobias.schlueter@physik.uni-muenchen.de>
1529 * check.c: Update copyright years.
1531 * check.c (gfc_check_minloc_maxloc, check_reduction): Don't call
1532 dim_range_check on not-present optional dim argument.
1534 2006-02-15 Jakub Jelinek <jakub@redhat.com>
1538 * Make-lang.in (install-finclude-dir): New goal.
1539 (fortran.install-common): Depend on install-finclude-dir.
1540 * lang-specs.h: If not -nostdinc, add -I finclude.
1542 2006-02-14 Thomas Koenig <Thomas.Koenig@online.de>
1545 * check.c (dim_check): Perform all checks if dim is optional.
1546 (gfc_check_minloc_maxloc): Use dim_check and dim_rank_check
1547 to check dim argument.
1548 (check_reduction): Likewise.
1550 2006-02-14 Tobias Schl
\81üter <tobias.schlueter@physik.uni-muenchen.de>
1553 * io.c (match_ltag): Mark label as referenced.
1555 2006-02-14 Jakub Jelinek <jakub@redhat.com>
1556 Richard Henderson <rth@redhat.com>
1557 Diego Novillo <dnovillo@redhat.com>
1559 * invoke.texi: Document -fopenmp.
1560 * gfortran.texi (Extensions): Document OpenMP.
1562 Backport from gomp-20050608-branch
1563 * trans-openmp.c: Call build_omp_clause instead of
1564 make_node when creating OMP_CLAUSE_* trees.
1565 (gfc_trans_omp_reduction_list): Remove argument 'code'.
1568 * trans.h (build4_v): Define.
1569 * trans-openmp.c: Call build4_v to create OMP_PARALLEL nodes.
1570 Call build3_v to create OMP_SECTIONS nodes.
1573 * openmp.c (gfc_match_omp_variable_list): Call gfc_set_sym_referenced
1574 on all symbols added to the variable list.
1576 * openmp.c (gfc_match_omp_clauses): Fix check for non-INTRINSIC
1577 procedure symbol in REDUCTION.
1579 * trans-openmp.c (gfc_trans_omp_array_reduction): Use gfc_add
1580 for MINUS_EXPR OMP_CLAUSE_REDUCTION_CODE.
1582 * trans-openmp.c (gfc_trans_omp_do): Add PBLOCK argument. If PBLOCK
1583 is non-NULL, evaluate INIT/COND/INCR and chunk size expressions in
1584 that statement block.
1585 (gfc_trans_omp_parallel_do): Pass non-NULL PBLOCK to gfc_trans_omp_do
1586 for non-ordered non-static combined loops.
1587 (gfc_trans_omp_directive): Pass NULL PBLOCK to gfc_trans_omp_do.
1589 * openmp.c: Include target.h and toplev.h.
1590 (gfc_match_omp_threadprivate): Emit diagnostic if target does
1592 * Make-lang.in (fortran/openmp.o): Add dependencies on
1593 target.h and toplev.h.
1595 * trans-decl.c (gfc_get_fake_result_decl): Set GFC_DECL_RESULT.
1596 * trans-openmp.c (gfc_omp_privatize_by_reference): Make
1597 DECL_ARTIFICIAL vars predetermined shared except GFC_DECL_RESULT.
1598 (gfc_omp_disregard_value_expr): Handle GFC_DECL_RESULT.
1599 (gfc_trans_omp_variable): New function.
1600 (gfc_trans_omp_variable_list, gfc_trans_omp_reduction_list): Use it.
1601 * trans.h (GFC_DECL_RESULT): Define.
1603 * trans-openmp.c (gfc_omp_firstprivatize_type_sizes): New function.
1604 * f95-lang.c (LANG_HOOKS_OMP_FIRSTPRIVATIZE_TYPE_SIZES): Define.
1605 * trans.h (gfc_omp_firstprivatize_type_sizes): New prototype.
1607 * trans-openmp.c (gfc_omp_privatize_by_reference): Return
1608 true if a pointer has GFC_DECL_SAVED_DESCRIPTOR set.
1609 (gfc_trans_omp_array_reduction, gfc_trans_omp_reduction_list): New
1611 (gfc_trans_omp_clauses): Add WHERE argument. Call
1612 gfc_trans_omp_reduction_list rather than gfc_trans_omp_variable_list
1614 (gfc_trans_omp_do, gfc_trans_omp_parallel, gfc_trans_omp_parallel_do,
1615 gfc_trans_omp_parallel_sections, gfc_trans_omp_parallel_workshare,
1616 gfc_trans_omp_sections, gfc_trans_omp_single): Adjust
1617 gfc_trans_omp_clauses callers.
1619 * openmp.c (omp_current_do_code): New var.
1620 (gfc_resolve_omp_do_blocks): New function.
1621 (gfc_resolve_omp_parallel_blocks): Call it.
1622 (gfc_resolve_do_iterator): Add CODE argument. Don't propagate
1623 predetermination if argument is !$omp do or !$omp parallel do
1625 * resolve.c (resolve_code): Call gfc_resolve_omp_do_blocks
1626 for EXEC_OMP_DO. Adjust gfc_resolve_do_iterator caller.
1627 * fortran.h (gfc_resolve_omp_do_blocks): New prototype.
1628 (gfc_resolve_do_iterator): Add CODE argument.
1630 * trans.h (gfc_omp_predetermined_sharing,
1631 gfc_omp_disregard_value_expr, gfc_omp_private_debug_clause): New
1633 (GFC_DECL_COMMON_OR_EQUIV, GFC_DECL_CRAY_POINTEE): Define.
1634 * trans-openmp.c (gfc_omp_predetermined_sharing,
1635 gfc_omp_disregard_value_expr, gfc_omp_private_debug_clause): New
1637 * trans-common.c (build_equiv_decl, build_common_decl,
1638 create_common): Set GFC_DECL_COMMON_OR_EQUIV flag on the decls.
1639 * trans-decl.c (gfc_finish_cray_pointee): Set GFC_DECL_CRAY_POINTEE
1641 * f95-lang.c (LANG_HOOKS_OMP_PREDETERMINED_SHARING,
1642 LANG_HOOKS_OMP_DISREGARD_VALUE_EXPR,
1643 LANG_HOOKS_OMP_PRIVATE_DEBUG_CLAUSE): Define.
1645 * openmp.c (resolve_omp_clauses): Remove extraneous comma.
1647 * symbol.c (check_conflict): Add conflict between cray_pointee and
1649 * openmp.c (gfc_match_omp_threadprivate): Fail if
1650 gfc_add_threadprivate returned FAILURE.
1651 (resolve_omp_clauses): Diagnose Cray pointees in SHARED,
1652 {,FIRST,LAST}PRIVATE and REDUCTION clauses and Cray pointers in
1653 {FIRST,LAST}PRIVATE and REDUCTION clauses.
1655 * resolve.c (omp_workshare_flag): New variable.
1656 (resolve_function): Diagnose use of non-ELEMENTAL user defined
1657 function in WORKSHARE construct.
1658 (resolve_code): Cleanup forall_save use. Make sure omp_workshare_flag
1659 is set to correct value in different contexts.
1661 * openmp.c (resolve_omp_clauses): Replace %s with '%s' when printing
1663 (resolve_omp_atomic): Likewise.
1666 * scanner.c (skip_free_comments): Set at_bol at the beginning of the
1667 loop, not before it.
1668 (skip_fixed_comments): Handle ! comments in the middle of line here
1670 (gfc_skip_comments): Use skip_fixed_comments for FIXED_FORM even if
1672 (gfc_next_char_literal): Fix expected canonicalized *$omp string.
1674 * trans-openmp.c (gfc_trans_omp_do): Use make_node and explicit
1675 initialization to build OMP_FOR instead of build.
1677 * trans-decl.c (gfc_gimplify_function): Invoke
1678 diagnose_omp_structured_block_errors.
1680 * trans-openmp.c (gfc_trans_omp_master): Use OMP_MASTER.
1681 (gfc_trans_omp_ordered): Use OMP_ORDERED.
1683 * gfortran.h (gfc_resolve_do_iterator, gfc_resolve_blocks,
1684 gfc_resolve_omp_parallel_blocks): New prototypes.
1685 * resolve.c (resolve_blocks): Renamed to...
1686 (gfc_resolve_blocks): ... this. Remove static.
1687 (gfc_resolve_forall): Adjust caller.
1688 (resolve_code): Only call gfc_resolve_blocks if code->block != 0
1689 and not for EXEC_OMP_PARALLEL* directives. Call
1690 gfc_resolve_omp_parallel_blocks for EXEC_OMP_PARALLEL* directives.
1691 Call gfc_resolve_do_iterator if resolved successfully EXEC_DO
1693 * openmp.c: Include pointer-set.h.
1694 (omp_current_ctx): New variable.
1695 (gfc_resolve_omp_parallel_blocks, gfc_resolve_do_iterator): New
1697 * Make-lang.in (fortran/openmp.o): Depend on pointer-set.h.
1699 * openmp.c (gfc_match_omp_clauses): For max/min/iand/ior/ieor,
1700 look up symbol if it exists, use its name instead and, if it is not
1701 INTRINSIC, issue diagnostics.
1703 * parse.c (parse_omp_do): Handle implied end do properly.
1704 (parse_executable): If parse_omp_do returned ST_IMPLIED_ENDDO,
1705 return it instead of continuing.
1707 * trans-openmp.c (gfc_trans_omp_critical): Update for changed
1709 (gfc_trans_omp_do, gfc_trans_omp_parallel, gfc_trans_omp_parallel_do,
1710 gfc_trans_omp_parallel_sections, gfc_trans_omp_parallel_workshare,
1711 gfc_trans_omp_sections, gfc_trans_omp_single): Likewise.
1713 * trans.h (gfc_omp_privatize_by_reference): New prototype.
1714 * f95-lang.c (LANG_HOOKS_OMP_PRIVATIZE_BY_REFERENCE): Redefine
1715 to gfc_omp_privatize_by_reference.
1716 * trans-openmp.c (gfc_omp_privatize_by_reference): New function.
1718 * trans-stmt.h (gfc_trans_omp_directive): Add comment.
1720 * openmp.c (gfc_match_omp_variable_list): Add ALLOW_COMMON argument.
1721 Disallow COMMON matching if it is set.
1722 (gfc_match_omp_clauses, gfc_match_omp_flush): Adjust all callers.
1723 (resolve_omp_clauses): Show locus in error messages. Check that
1724 variable types in reduction clauses are appropriate for reduction
1727 * resolve.c (resolve_symbol): Don't error if a threadprivate module
1728 variable isn't SAVEd.
1730 * trans-openmp.c (gfc_trans_omp_do): Put count into BLOCK, not BODY.
1731 Fix typo in condition. Fix DOVAR initialization.
1733 * openmp.c (gfc_match_omp_clauses): Match min/iand/ior/ieor
1734 rather than .min. etc.
1736 * trans-openmpc.c (omp_not_yet): Remove.
1737 (gfc_trans_omp_parallel_do): Keep listprivate clause on parallel.
1738 Force creation of BIND_EXPR around the workshare construct.
1739 (gfc_trans_omp_parallel_sections): Likewise.
1740 (gfc_trans_omp_parallel_workshare): Likewise.
1742 * types.def (BT_I16, BT_FN_I16_VPTR_I16,
1743 BT_FN_BOOL_VPTR_I16_I16, BT_FN_I16_VPTR_I16_I16): Add.
1745 * trans-openmp.c (gfc_trans_omp_clauses): Create OMP_CLAUSE_DEFAULT.
1746 (gfc_trans_omp_code): New function.
1747 (gfc_trans_omp_do): Use it, remove omp_not_yet uses.
1748 (gfc_trans_omp_parallel, gfc_trans_omp_single): Likewise.
1749 (gfc_trans_omp_sections): Likewise. Only treat empty last section
1750 specially if lastprivate clause is present.
1751 * f95-lang.c (gfc_init_builtin_functions): Create BUILT_IN_TRAP
1754 * trans-openmp.c (gfc_trans_omp_variable_list): Update for
1755 OMP_CLAUSE_DECL name change.
1756 (gfc_trans_omp_do): Likewise.
1758 * trans-openmp.c (gfc_trans_omp_clauses): Create OMP_CLAUSE_REDUCTION
1760 (gfc_trans_omp_atomic): Build OMP_ATOMIC instead of expanding
1761 sync builtins directly.
1762 (gfc_trans_omp_single): Build OMP_SINGLE statement.
1764 * trans-openmp.c (gfc_trans_add_clause): New.
1765 (gfc_trans_omp_variable_list): Take a tree code and build the clause
1766 node here. Link it to the head of a list.
1767 (gfc_trans_omp_clauses): Update to match.
1768 (gfc_trans_omp_do): Use gfc_trans_add_clause.
1770 * trans-openmp.c (gfc_trans_omp_clauses): Change second argument to
1771 gfc_omp_clauses *. Use gfc_evaluate_now instead of creating
1772 temporaries by hand.
1773 (gfc_trans_omp_atomic, gfc_trans_omp_critical): Use buildN_v macros.
1774 (gfc_trans_omp_do): New function.
1775 (gfc_trans_omp_master): Dont' check for gfc_trans_code returning NULL.
1776 (gfc_trans_omp_parallel): Adjust gfc_trans_omp_clauses caller.
1777 Use buildN_v macros.
1778 (gfc_trans_omp_parallel_do, gfc_trans_omp_parallel_sections,
1779 gfc_trans_omp_parallel_workshare, gfc_trans_omp_sections,
1780 gfc_trans_omp_single, gfc_trans_omp_workshare): New functions.
1781 (gfc_trans_omp_directive): Use them.
1782 * parse.c (parse_omp_do): Allow new_st.op == EXEC_NOP.
1783 * openmp.c (resolve_omp_clauses): Check for list items present
1784 in multiple clauses.
1785 (resolve_omp_do): Check that iteration variable is not THREADPRIVATE
1786 and is not present in any clause variable lists other than PRIVATE
1789 * gfortran.h (symbol_attribute): Add threadprivate bit.
1790 (gfc_common_head): Add threadprivate member, change use_assoc
1791 and saved into char to save space.
1792 (gfc_add_threadprivate): New prototype.
1793 * symbol.c (check_conflict): Handle threadprivate.
1794 (gfc_add_threadprivate): New function.
1795 (gfc_copy_attr): Copy threadprivate.
1796 * trans-openmp.c (gfc_trans_omp_clauses): Avoid creating a temporary
1797 if IF or NUM_THREADS is constant. Create OMP_CLAUSE_SCHEDULE and
1799 * resolve.c (resolve_symbol): Complain if a THREADPRIVATE symbol
1800 outside a module and not in COMMON has is not SAVEd.
1801 (resolve_equivalence): Ensure THREADPRIVATE objects don't get
1803 * trans-common.c: Include target.h and rtl.h.
1804 (build_common_decl): Set DECL_TLS_MODEL if THREADPRIVATE.
1805 * trans-decl.c: Include rtl.h.
1806 (gfc_finish_var_decl): Set DECL_TLS_MODEL if THREADPRIVATE.
1807 * dump-parse-tree.c (gfc_show_attr): Handle THREADPRIVATE.
1808 * Make-lang.in (fortran/trans-decl.o): Depend on $(RTL_H).
1809 (fortran/trans-common.o): Depend on $(RTL_H) and $(TARGET_H).
1810 * openmp.c (gfc_match_omp_variable_list): Ensure COMMON block
1811 is from current namespace.
1812 (gfc_match_omp_threadprivate): Rewrite.
1813 (resolve_omp_clauses): Check some clause restrictions.
1814 * module.c (ab_attribute): Add AB_THREADPRIVATE.
1815 (attr_bits): Add THREADPRIVATE.
1816 (mio_symbol_attribute, mio_symbol_attribute): Handle threadprivate.
1817 (load_commons, write_common, write_blank_common): Adjust for type
1818 change of saved, store/load threadprivate bit from the integer
1821 * types.def (BT_FN_UINT_UINT): New.
1822 (BT_FN_VOID_UINT_UINT): Remove.
1824 * trans-openmp.c (gfc_trans_omp_clauses, gfc_trans_omp_barrier,
1825 gfc_trans_omp_critical, gfc_trans_omp_flush, gfc_trans_omp_master,
1826 gfc_trans_omp_ordered, gfc_trans_omp_parallel): New functions.
1827 (gfc_trans_omp_directive): Use them.
1829 * openmp.c (expr_references_sym): Add SE argument, don't look
1831 (is_conversion): New function.
1832 (resolve_omp_atomic): Adjust expr_references_sym callers. Handle
1833 promoted expressions.
1834 * trans-openmp.c (gfc_trans_omp_atomic): New function.
1835 (gfc_trans_omp_directive): Call it.
1837 * f95-lang.c (builtin_type_for_size): New function.
1838 (gfc_init_builtin_functions): Initialize synchronization and
1840 * types.def: New file.
1841 * Make-lang.in (f95-lang.o): Depend on $(BUILTINS_DEF) and
1844 * trans-openmp.c: Rename GOMP_* tree codes into OMP_*.
1846 * dump-parse-tree.c (show_symtree): Don't crash if ns->proc_name
1849 * dump-parse-tree.c (gfc_show_namelist, gfc_show_omp_node): New
1851 (gfc_show_code_node): Call gfc_show_omp_node for EXEC_OMP_* nodes.
1853 * parse.c (parse_omp_do): Call pop_state before next_statement.
1854 * openmp.c (expr_references_sym, resolve_omp_atomic, resolve_omp_do):
1856 (gfc_resolve_omp_directive): Call them.
1857 * match.c (match_exit_cycle): Issue error if EXIT or CYCLE statement
1858 leaves an OpenMP structured block or if EXIT terminates !$omp do
1861 * Make-lang.in (F95_PARSER_OBJS): Add fortran/openmp.o.
1862 (F95_OBJS): Add fortran/trans-openmp.o.
1863 (fortran/trans-openmp.o): Depend on $(GFORTRAN_TRANS_DEPS).
1864 * lang.opt: Add -fopenmp option.
1865 * options.c (gfc_init_options): Initialize it.
1866 (gfc_handle_option): Handle it.
1867 * gfortran.h (ST_OMP_ATOMIC, ST_OMP_BARRIER, ST_OMP_CRITICAL,
1868 ST_OMP_END_CRITICAL, ST_OMP_END_DO, ST_OMP_END_MASTER,
1869 ST_OMP_END_ORDERED, ST_OMP_END_PARALLEL, ST_OMP_END_PARALLEL_DO,
1870 ST_OMP_END_PARALLEL_SECTIONS, ST_OMP_END_PARALLEL_WORKSHARE,
1871 ST_OMP_END_SECTIONS, ST_OMP_END_SINGLE, ST_OMP_END_WORKSHARE,
1872 ST_OMP_DO, ST_OMP_FLUSH, ST_OMP_MASTER, ST_OMP_ORDERED,
1873 ST_OMP_PARALLEL, ST_OMP_PARALLEL_DO, ST_OMP_PARALLEL_SECTIONS,
1874 ST_OMP_PARALLEL_WORKSHARE, ST_OMP_SECTIONS, ST_OMP_SECTION,
1875 ST_OMP_SINGLE, ST_OMP_THREADPRIVATE, ST_OMP_WORKSHARE): New
1877 (OMP_LIST_PRIVATE, OMP_LIST_FIRSTPRIVATE, OMP_LIST_LASTPRIVATE,
1878 OMP_LIST_COPYPRIVATE, OMP_LIST_SHARED, OMP_LIST_COPYIN,
1879 OMP_LIST_PLUS, OMP_LIST_REDUCTION_FIRST, OMP_LIST_MULT,
1880 OMP_LIST_SUB, OMP_LIST_AND, OMP_LIST_OR, OMP_LIST_EQV,
1881 OMP_LIST_NEQV, OMP_LIST_MAX, OMP_LIST_MIN, OMP_LIST_IAND,
1882 OMP_LIST_IOR, OMP_LIST_IEOR, OMP_LIST_REDUCTION_LAST, OMP_LIST_NUM):
1883 New OpenMP variable list types.
1884 (gfc_omp_clauses): New typedef.
1885 (gfc_get_omp_clauses): Define.
1886 (EXEC_OMP_CRITICAL, EXEC_OMP_DO, EXEC_OMP_FLUSH, EXEC_OMP_MASTER,
1887 EXEC_OMP_ORDERED, EXEC_OMP_PARALLEL, EXEC_OMP_PARALLEL_DO,
1888 EXEC_OMP_PARALLEL_SECTIONS, EXEC_OMP_PARALLEL_WORKSHARE,
1889 EXEC_OMP_SECTIONS, EXEC_OMP_SINGLE, EXEC_OMP_WORKSHARE,
1890 EXEC_OMP_ATOMIC, EXEC_OMP_BARRIER, EXEC_OMP_END_NOWAIT,
1891 EXEC_OMP_END_SINGLE): New OpenMP gfc_exec_op codes.
1892 (struct gfc_code): Add omp_clauses, omp_name, omp_namelist
1893 and omp_bool fields to ext union.
1894 (flag_openmp): Declare.
1895 (gfc_free_omp_clauses, gfc_resolve_omp_directive): New prototypes.
1896 * scanner.c (openmp_flag, openmp_locus): New variables.
1897 (skip_free_comments, skip_fixed_comments, gfc_next_char_literal):
1898 Handle OpenMP directive lines and conditional compilation magic
1900 * parse.h (COMP_OMP_STRUCTURED_BLOCK): New compile state.
1901 * parse.c (decode_omp_directive, parse_omp_do, parse_omp_atomic,
1902 parse_omp_structured_block): New functions.
1903 (next_free, next_fixed): Parse OpenMP directives.
1904 (case_executable, case_exec_markers, case_decl): Add ST_OMP_*
1906 (gfc_ascii_statement): Handle ST_OMP_* codes.
1907 (parse_executable): Rearrange the loop slightly, so that
1908 parse_omp_do can return next_statement.
1909 * match.h (gfc_match_omp_eos, gfc_match_omp_atomic,
1910 gfc_match_omp_barrier, gfc_match_omp_critical, gfc_match_omp_do,
1911 gfc_match_omp_flush, gfc_match_omp_master, gfc_match_omp_ordered,
1912 gfc_match_omp_parallel, gfc_match_omp_parallel_do,
1913 gfc_match_omp_parallel_sections, gfc_match_omp_parallel_workshare,
1914 gfc_match_omp_sections, gfc_match_omp_single,
1915 gfc_match_omp_threadprivate, gfc_match_omp_workshare,
1916 gfc_match_omp_end_nowait, gfc_match_omp_end_single): New prototypes.
1917 * resolve.c (resolve_blocks): Ignore EXEC_OMP_* block directives.
1918 (resolve_code): Call gfc_resolve_omp_directive on EXEC_OMP_*
1920 * trans.c (gfc_trans_code): Call gfc_trans_omp_directive for
1921 EXEC_OMP_* directives.
1922 * st.c (gfc_free_statement): Handle EXEC_OMP_* statement freeing.
1923 * trans-stmt.h (gfc_trans_omp_directive): New prototype.
1924 * openmp.c: New file.
1925 * trans-openmp.c: New file.
1927 2006-02-13 Andrew Pinski <pinskia@physics.uc.edu>
1928 Jakub Jelinek <jakub@redhat.com>
1931 * trans-decl.c (gfc_get_symbol_decl, gfc_get_fake_result_decl): Use
1932 gfc_add_decl_to_function rather than gfc_finish_var_decl on length.
1934 2006-02-13 Paul Thomas <pault@gcc.gnu.org>
1938 * resolve.c (resolve_symbol): Extend the requirement that module
1939 arrays have constant bounds to those in the main program. At the
1940 same time simplify the array bounds, to avoiding trapping parameter
1941 array references, and exclude automatic character length from main
1942 and modules. Rearrange resolve_symbol and resolve_derived to put as
1943 each flavor together, as much as is possible and move all specific
1944 code for flavors FL_VARIABLE, FL_PROCEDURE and FL_PARAMETER into new
1946 (resolve_fl_var_and_proc, resolve_fl_variable, resolve_fl_procedure):
1947 New functions to do work of resolve_symbol.
1948 (resolve_index_expr): New function that is called from resolved_symbol
1949 and is extracted from resolve_charlen.
1950 (resolve_charlen): Call this new function.
1951 (resolve_fl_derived): Renamed resolve_derived to be consistent with
1952 the naming of the new functions for the other flavours. Change the
1953 charlen checking so that the style is consistent with other similar
1954 checks. Add the generation of the gfc_dt_list, removed from resolve_
1958 * resolve.c (resolve_actual_arglist): Prevent internal procedures
1959 from being dummy arguments.
1962 * resolve.c (resolve_actual_arglist): Prevent pure but non-intrinsic
1963 procedures from being dummy arguments.
1966 * resolve.c (check_data_variable): Add test that data variable is in
1970 * resolve.c (resolve_call): Add test that the subroutine does not
1973 2006-02-12 Erik Edelmann <eedelman@gcc.gnu.org>
1976 * trans-array.c (gfc_trans_allocate_array_storage): New argument
1977 dealloc; free the temporary only if dealloc is true.
1978 (gfc_trans_allocate_temp_array): New argument bool dealloc, to be
1979 passed onwards to gfc_trans_allocate_array_storage.
1980 (gfc_trans_array_constructor, gfc_conv_loop_setup): Update call to
1981 gfc_trans_allocate_temp_array.
1982 * trans-array.h (gfc_trans_allocate_temp_array): Update function
1984 * trans-expr.c (gfc_conv_function_call): Set new argument 'dealloc'
1985 to gfc_trans_allocate_temp_array to false in case of functions
1987 (gfc_trans_arrayfunc_assign): Return NULL for functions returning
1990 2006-02-10 Steven G. Kargl <kargls@comcast.net>
1993 *decl.c (variable_decl): Improve error message. Remove initialization
1994 typespec. Wrap long line.
1995 *expr.c (gfc_check_pointer_assign): Permit checking of type, kind type,
1997 *simplify.c (gfc_simplify_null): Ensure type, kind type, and rank
2001 2006-02-10 Tobias Schl
\81üter <tobias.schlueter@physik.uni-muenchen.de>
2004 * arith.c (eval_intrinsic): Accept INTRINSIC_PARENTHESES.
2005 * expr.c (check_intrinsic_op): Likewise.
2006 * module.c (mio_expr): Likewise.
2008 2006-02-09 Tobias Schl
\81üter <tobias.schlueter@physik.uni-muenchen.de>
2010 * dump-parse-tree.c: Update copyright years.
2011 * matchexp.c: Likewise.
2012 * module.c: Likewise.
2015 * gfortran.h (gfc_intrinsic_op): Add INTRINSIC_PARENTHESES.
2016 * dump-parse-tree (gfc_show_expr): Handle INTRINSIC_PARENTHESES.
2017 * expr.c (simplify_intrinsic_op): Treat INTRINSIC_PARENTHESES as
2018 if it were INTRINSIC_UPLUS.
2019 * resolve.c (resolve_operator): Handle INTRINSIC_PARENTHESES.
2020 * match.c (intrinsic_operators): Add INTRINSIC_PARENTHESES.
2021 * matchexp.c (match_primary): Record parentheses surrounding
2022 numeric expressions.
2023 * module.c (intrinsics): Add INTRINSIC_PARENTHESES for module
2025 * trans-expr.c (gfc_conv_expr_op): Handle INTRINSIC_PARENTHESES.
2027 2006-02-09 Paul Thomas <pault@gcc.gnu.org>
2030 * trans-stmt.c (gfc_trans_allocate): Provide assumed character length
2031 scalar with missing backend_decl for the hidden dummy charlen.
2034 * interface.c (gfc_extend_assign): Remove detection of non-PURE
2035 subroutine in assignment interface, with gfc_error, and put it in
2036 * resolve.c (resolve_code).
2039 * interface.c (gfc_procedure_use): Flag rank checking for non-
2040 elemental, contained or interface procedures in call to
2041 (compare_actual_formal), where ranks are checked for assumed
2044 2006-02-08 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2047 * trans-decl.c (gfc_generate_function_code): Add new argument,
2048 pedantic, to set_std call.
2050 2006-02-06 Thomas Koenig <Thomas.Koenig@online.de>
2053 * gfortran.texi: Document the GFORTRAN_CONVERT_UNIT environment
2055 * invoke.texi: Mention the "Runtime" chapter.
2056 Document the -fconvert= option.
2057 * gfortran.h: Add options_convert.
2058 * lang.opt: Add fconvert=little-endian, fconvert=big-endian,
2059 fconvert=native and fconvert=swap.
2060 * trans-decl.c (top level): Add gfor_fndecl_set_convert.
2061 (gfc_build_builtin_function_decls): Set gfor_fndecl_set_convert.
2062 (gfc_generate_function_code): If -fconvert was specified,
2063 and this is the main program, add a call to set_convert().
2064 * options.c: Handle the -fconvert options.
2066 2006-02-06 Roger Sayle <roger@eyesopen.com>
2068 * trans-stmt.c (gfc_evaluate_where_mask): Allow the NMASK argument
2069 to be NULL to indicate that the not mask isn't required.
2070 (gfc_trans_where_2): Remove PMASK argument. Avoid calculating the
2071 pending mask for the last clause of a WHERE chain. Update recursive
2073 (gfc_trans_forall_1): Update call to gfc_trans_where_2.
2074 (gfc_trans_where): Likewise.
2076 2006-02-06 Jakub Jelinek <jakub@redhat.com>
2078 Backport from gomp-20050608-branch
2079 * trans-decl.c (create_function_arglist): Handle dummy functions.
2081 * trans-decl.c (gfc_get_symbol_decl): Revert explicit setting of
2083 (gfc_trans_vla_type_sizes): Also "gimplify"
2084 GFC_TYPE_ARRAY_DATAPTR_TYPE for GFC_DESCRIPTOR_TYPE_P types.
2085 * trans-array.c (gfc_trans_deferred_array): Call
2086 gfc_trans_vla_type_sizes.
2088 * trans-decl.c (saved_function_decls, saved_parent_function_decls):
2089 Remove unnecessary initialization.
2090 (create_function_arglist): Make sure __result has complete type.
2091 (gfc_get_fake_result_decl): Change current_fake_result_decl into
2092 a tree chain. For entry master, create a separate variable
2093 for each result name. For BT_CHARACTER results, call
2094 gfc_finish_var_decl on length even if it has been already created,
2095 but not pushdecl'ed.
2096 (gfc_trans_vla_type_sizes): For function/entry result, adjust
2097 result value type, not the FUNCTION_TYPE.
2098 (gfc_generate_function_code): Adjust for current_fake_result_decl
2100 (gfc_trans_deferred_vars): Likewise. Call gfc_trans_vla_type_sizes
2101 even on result if it is assumed-length character.
2103 * trans-decl.c (gfc_trans_dummy_character): Add SYM argument.
2104 Call gfc_trans_vla_type_sizes.
2105 (gfc_trans_auto_character_variable): Call gfc_trans_vla_type_sizes.
2106 (gfc_trans_vla_one_sizepos, gfc_trans_vla_type_sizes_1,
2107 gfc_trans_vla_type_sizes): New functions.
2108 (gfc_trans_deferred_vars): Adjust gfc_trans_dummy_character
2109 callers. Call gfc_trans_vla_type_sizes on assumed-length
2110 character parameters.
2111 * trans-array.c (gfc_trans_array_bounds,
2112 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias): Call
2113 gfc_trans_vla_type_sizes.
2114 * trans.h (gfc_trans_vla_type_sizes): New prototype.
2116 * trans-decl.c (gfc_build_qualified_array): For non-assumed-size
2117 arrays without constant size, create also an index var for
2118 GFC_TYPE_ARRAY_SIZE (type). If the type is incomplete, complete
2120 (gfc_create_string_length): Don't call gfc_defer_symbol_init
2121 if just creating DECL_ARGUMENTS.
2122 (gfc_get_symbol_decl): Call gfc_finish_var_decl and
2123 gfc_defer_symbol_init even if ts.cl->backend_decl is already
2124 set to a VAR_DECL that doesn't have DECL_CONTEXT yet.
2125 (create_function_arglist): Rework, so that hidden length
2126 arguments for CHARACTER parameters are created together with
2127 the parameters. Resolve ts.cl->backend_decl for CHARACTER
2128 parameters. If the argument is a non-constant length array
2129 or CHARACTER, ensure PARM_DECL has different type than
2131 (generate_local_decl): Call gfc_get_symbol_decl even
2132 for non-referenced non-constant length CHARACTER parameters
2133 after optionally issuing warnings.
2134 * trans-array.c (gfc_trans_array_bounds): Set last stride
2135 to GFC_TYPE_ARRAY_SIZE (type) to initialize it as well.
2136 (gfc_trans_dummy_array_bias): Initialize GFC_TYPE_ARRAY_SIZE (type)
2139 * trans-expr.c (gfc_conv_expr_val): Fix comment typo.
2141 * trans-stmt.c (gfc_trans_simple_do): Fix comment.
2143 2006-02-04 Roger Sayle <roger@eyesopen.com>
2145 * dependency.c (gfc_check_dependency): Remove unused vars and nvars
2146 arguments. Replace with an "identical" argument. A full array
2147 reference to the same symbol is a dependency if identical is true.
2148 * dependency.h (gfc_check_dependency): Update prototype.
2149 * trans-array.h (gfc_check_dependency): Delete duplicate prototype.
2150 * trans-stmt.c: #include dependency.h for gfc_check_dependency.
2151 (gfc_trans_forall_1): Update calls to gfc_check_dependency.
2152 (gfc_trans_where_2): Likewise. Remove unneeded variables.
2153 (gfc_trans_where_3): New function for simple non-dependent WHEREs.
2154 (gfc_trans_where): Call gfc_trans_where_3 to translate simple
2155 F90-style WHERE statements without internal dependencies.
2156 * Make-lang.in (trans-stmt.o): Depend upon dependency.h.
2158 2006-02-05 H.J. Lu <hongjiu.lu@intel.com>
2162 * resolve.c (resolve_types): New function.
2163 (resolve_codes): Likewise.
2164 (gfc_resolve): Use them.
2166 2006-02-05 Roger Sayle <roger@eyesopen.com>
2168 * trans-stmt.c (gfc_evaluate_where_mask): Use LOGICAL*1 for WHERE
2169 masks instead of LOGICAL*4.
2171 2006-02-05 Jakub Jelinek <jakub@redhat.com>
2173 * resolve.c (resolve_symbol): Initialize constructor_expr to NULL.
2175 2006-02-04 Thomas Koenig <Thomas.Koenig@online.de>
2178 check.c (identical_dimen_shape): New function.
2179 (check_dot_product): Use identical_dimen_shape() to check sizes
2181 (gfc_check_matmul): Likewise.
2182 (gfc_check_merge): Check conformance between tsource and fsource
2183 and between tsource and mask.
2184 (gfc_check_pack): Check conformance between array and mask.
2186 2006-02-03 Steven G. Kargl <kargls@comcast>
2187 Paul Thomas <pault@gcc.gnu.org>
2190 * resolve.c (resolve_symbol): Default initialization of derived type
2191 component reguires the SAVE attribute.
2193 2006-02-02 Steven G. Kargl <kargls@comcast>
2196 match.c (gfc_match_nullify): Free the list from head not tail.
2199 * match.c (match_forall_header): Fix internal error caused by bogus
2203 2006-01-31 Thomas Koenig <Thomas.Koenig@online.de>
2206 expr.c (gfc_check_conformance): Reorder error message
2208 check.c(gfc_check_minloc_maxloc): Call gfc_check_conformance
2209 for checking arguments array and mask.
2210 (check_reduction): Likewise.
2212 2006-01-30 Erik Edelmann <eedelman@gcc.gnu.org>
2215 * trans-io.c (set_internal_unit): Check the rank of the
2216 expression node itself instead of its symbol.
2218 2006-01-29 Paul Thomas <pault@gcc.gnu.org>
2224 * interface.c (compare_actual_formal): Error for INTENT(OUT or INOUT)
2225 if actual argument is not a variable.
2227 2006-01-28 Paul Thomas <pault@gcc.gnu.org>
2230 * expr.c (gfc_check_assign, gfc_check_pointer_assign): Emit error if
2231 the lvalue is a use associated procedure.
2235 * expr.c (gfc_check_pointer_assign): Emit error if lvalue and rvalue
2236 character lengths are not the same. Use gfc_dep_compare_expr for the
2238 * gfortran.h: Add prototype for gfc_dep_compare_expr.
2239 * dependency.h: Remove prototype for gfc_dep_compare_expr.
2241 2006-01-27 Paul Thomas <pault@gcc.gnu.org>
2244 * resolve.c (resolve_function): Add GFC_ISYM_LOC to the list of
2245 generic_ids exempted from assumed size checking.
2247 2006-01-27 Jakub Jelinek <jakub@redhat.com>
2250 * Make-lang.in (fortran/scanner.o): Depend on toplev.h.
2251 * lang.opt (fpreprocessed): New option.
2252 * scanner.c: Include toplev.h.
2253 (gfc_src_file, gfc_src_preprocessor_lines): New variables.
2254 (preprocessor_line): Unescape filename if there were any
2256 (load_file): If initial and gfc_src_file is not NULL,
2257 use it rather than opening the file. If gfc_src_preprocessor_lines
2258 has non-NULL elements, pass it to preprocessor_line.
2259 (unescape_filename, gfc_read_orig_filename): New functions.
2260 * gfortran.h (gfc_option_t): Add flag_preprocessed.
2261 (gfc_read_orig_filename): New prototype.
2262 * options.c (gfc_init_options): Clear flag_preprocessed.
2263 (gfc_post_options): If flag_preprocessed, call
2264 gfc_read_orig_filename.
2265 (gfc_handle_option): Handle OPT_fpreprocessed.
2266 * lang-specs.h: Pass -fpreprocessed to f951 if preprocessing
2269 2006-01-27 Erik Edelmann <eedelman@gcc.gnu.org>
2271 * symbol.c (free_old_symbol): Fix confusing comment, and add code
2272 to free old_symbol->formal.
2274 2006-01-26 Paul Thomas <pault@gcc.gnu.org>
2277 * resolve.c (resolve_function): Exclude statement functions from
2278 global reference checking.
2284 * resolve.c (resolve_function): Declare a gfc_symbol to replace the
2285 references through the symtree to the symbol associated with the
2286 function expresion. Give error on reference to an assumed character
2287 length function is defined in an interface or an external function
2288 that is not a dummy argument.
2289 (resolve_symbol): Give error if an assumed character length function
2290 is array-valued, pointer-valued, pure or recursive. Emit warning
2291 that character(*) value functions are obsolescent in F95.
2294 * trans-expr.c (gfc_conv_function_call): The above patch to resolve.c
2295 prevents any assumed character length function call from getting here
2296 except intrinsics such as SPREAD. In this case, ensure that no
2297 segfault occurs from referencing non-existent charlen->length->
2298 expr_type and provide a backend_decl for the charlen from the charlen
2299 of the first actual argument.
2301 Cure temp name confusion.
2302 * trans-expr.c (gfc_get_interface_mapping_array): Change name of
2303 temporary from "parm" to "ifm" to avoid clash with temp coming from
2306 2006-01-25 Erik Edelmann <eedelman@gcc.gnu.org>
2309 * symbol.c (free_old_symbol): New function.
2310 (gfc_commit_symbols): Use it.
2311 (gfc_commit_symbol): New function.
2312 (gfc_use_derived): Use it.
2313 * gfortran.h: Add prototype for gfc_commit_symbol.
2314 * intrinsic.c (gfc_find_function): Search in 'conversion'
2315 if not found in 'functions'.
2316 (gfc_convert_type_warn): Add a symtree to the new
2317 expression node, and commit the new symtree->n.sym.
2318 * resolve.c (gfc_resolve_index): Make sure typespec is
2319 properly initialized.
2321 2006-01-23 Paul Thomas <pault@gcc.gnu.org>
2324 * decl.c (get_proc_name): Replace subroutine and function attributes
2325 in "already defined" test by the formal arglist pointer being non-NULL.
2327 Fix regression in testing of admissability of attributes.
2328 * symbol.c (gfc_add_attribute): If the current_attr has non-zero
2329 intent, do not do the check for a dummy being used.
2330 * decl.c (attr_decl1): Add current_attr.intent as the third argument
2331 in the call to gfc_add_attribute.
2332 * gfortran.h: Add the third argument to the prototype for
2335 2006-01-21 Joseph S. Myers <joseph@codesourcery.com>
2337 * gfortranspec.c (lang_specific_driver): Update copyright notice
2340 2006-01-21 Paul Thomas <pault@gcc.gnu.org>
2344 * decl.c (get_proc_name): If there is an existing
2345 symbol in the encompassing namespace, call errors
2346 if it is a procedure of the same name or the kind
2347 field is set, indicating a type declaration.
2353 * decl.c (add_global_entry): New function to check
2354 for existing global symbol with this name and to
2355 create new one if none exists.
2356 (gfc_match_entry): Call add_global_entry before
2357 matching argument lists for subroutine and function
2359 * gfortran.h: Prototype for existing function,
2361 * resolve.c (resolve_global_procedure): New function
2362 to check global symbols for procedures.
2363 (resolve_call, resolve_function): Calls to this
2364 new function for non-contained and non-module
2366 * match.c (match_common): Add check for existing
2367 global symbol, creat one if none exists and emit
2368 error if there is a clash.
2369 * parse.c (global_used): Remove static and use the
2370 gsymbol name rather than the new_block name, so that
2371 the function can be called from resolve.c.
2372 (parse_block_data, parse_module, add_global_procedure):
2373 Improve checks for existing gsymbols. Emit error if
2374 already defined or if references were to another type.
2378 * trans-expr.c (gfc_conv_aliased_arg): New function called by
2379 gfc_conv_function_call that coverts an expression for an aliased
2380 component reference to a derived type array into a temporary array
2381 of the same type as the component. The temporary is passed as an
2382 actual argument for the procedure call and is copied back to the
2383 derived type after the call.
2384 (is_aliased_array): New function that detects an array reference
2385 that is followed by a component reference.
2386 (gfc_conv_function_call): Detect an aliased actual argument with
2387 is_aliased_array and convert it to a temporary and back again
2388 using gfc_conv_aliased_arg.
2390 2006-01-19 Tobias Schl
\81üter <tobias.schlueter@physik.uni-muenchen.de>
2392 * gfortranspec.c: Update copyright years.
2393 * trans.c: Likewise.
2394 * trans-array.c: Likewise.
2395 * trans-array.h: Likewise.
2396 * trans-decl.c: Likewise.
2397 * trans-stmt.c: Likewise.
2398 * trans-stmt.h: Likewise.
2399 * trans-types.c: Likewise.
2401 2006-01-18 Tobias Schl
\81üter <tobias.schlueter@physik.uni-muenchen.de>
2405 * gfortran.h (BBT_HEADER): Move definition up.
2406 (gfc_st_label): Add BBT_HEADER, remove 'prev' and 'next'.
2407 * io.c (format_asterisk): Adapt initializer.
2408 * resolve.c (resolve_branch): Allow FORTRAN 66 cross-block GOTOs
2410 (warn_unused_label): Take gfc_st_label label as argument, adapt to
2412 (gfc_resolve): Adapt call to warn_unused_label.
2413 * symbol.c (compare_st_labels): New function.
2414 (gfc_free_st_label, free_st_labels, gfc_get_st_label): Convert to
2415 using balanced binary tree.
2416 * decl.c (match_char_length, gfc_match_old_kind_spec): Do away
2418 (warn_unused_label): Adapt to binary tree.
2419 * match.c (gfc_match_small_literal_int): Only set cnt if non-NULL.
2420 * primary.c (match_kind_param): Do away with cnt.
2422 2006-01-18 Paul Thomas <pault@gcc.gnu.org>
2427 * symbol.c (check_conflict): Add pointer valued elemental
2428 functions and internal procedures with the external attribute
2429 to the list of conflicts.
2430 (gfc_add_attribute): New catch-all function to perform the
2431 checking of symbol attributes for attribute declaration
2433 * decl.c (attr_decl1): Call gfc_add_attribute for each of -
2434 (gfc_match_external, gfc_match_intent, gfc_match_intrinsic,
2435 gfc_match_pointer, gfc_match_dimension, gfc_match_target):
2436 Remove spurious calls to checks in symbol.c. Set the
2437 attribute directly and use the call to attr_decl() for
2439 * gfortran.h: Add prototype for gfc_add_attribute.
2442 * resolve.c (resolve_function): Exclude PRESENT from assumed size
2443 argument checking. Replace strcmp's with comparisons with generic
2446 2006-01-16 Rafael
\81Ávila de Esp
\81índola <rafael.espindola@gmail.com>
2448 * gfortranspec.c (lang_specific_spec_functions): Remove.
2450 2006-01-16 Richard Guenther <rguenther@suse.de>
2452 * trans-stmt.c (gfc_trans_if_1): Use fold_buildN and build_int_cst.
2453 (gfc_trans_arithmetic_if): Likewise.
2454 (gfc_trans_simple_do): Likewise.
2455 (gfc_trans_do): Likewise.
2456 (gfc_trans_do_while): Likewise.
2457 (gfc_trans_logical_select): Likewise.
2458 (gfc_trans_forall_loop): Likewise.
2459 (generate_loop_for_temp_to_lhs): Likewise.
2460 (generate_loop_for_rhs_to_temp): Likewise.
2461 (gfc_trans_allocate): Likewise.
2462 * trans.c (gfc_add_expr_to_block): Do not fold expr again.
2464 2006-01-16 Richard Guenther <rguenther@suse.de>
2466 * trans-expr.c (gfc_conv_function_call): Use fold_build2.
2467 * trans-stmt.c (gfc_trans_goto): Likewise. Use build_int_cst.
2468 * trans.c (gfc_trans_runtime_check): Don't fold the condition
2471 2006-01-13 Steven G. Kargl <kargls@comcast.net>
2474 * symbol.c (gfc_free_st_label): Give variable meaningful name. Remove
2475 unneeded parenthesis. Fix-up the head of the list (2 lines gleaned
2478 2006-01-13 Diego Novillo <dnovillo@redhat.com>
2480 * trans.c (gfc_add_expr_to_block): Do not fold tcc_statement
2483 2006-01-11 Tobias Schl
\81üter <tobias.schlueter@physik.uni-muenchen.de>
2485 * parse.c (next_fixed): Remove superfluous string concatenation.
2487 2006-01-11 Bernhard Fischer <rep.nop@aon.at>
2490 * scanner.c (load_line): use maxlen to determine the line-length used
2491 for padding lines in fixed form.
2493 2006-01-11 Paul Thomas <pault@gcc.gnu.org>
2496 * trans-types.c (copy_dt_decls_ifequal): Copy backend decl for
2499 2006-01-09 Andrew Pinski <pinskia@physics.uc.edu>
2502 * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Use fold_convert
2503 to avoid type mismatch.
2505 2006-01-09 Andrew Pinski <pinskia@physics.uc.edu>
2508 * trans-decl.c (gfc_generate_function_code): Move the NULLing of
2509 current_fake_result_decl down to below generate_local_vars.
2511 2006-01-09 Feng Wang <fengwang@nudt.edu.cn>
2514 * trans-expr.c (gfc_to_single_character): New function that converts
2515 string to single character if its length is 1.
2516 (gfc_build_compare_string):New function that compare string and handle
2517 single character specially.
2518 (gfc_conv_expr_op): Use gfc_build_compare_string.
2519 (gfc_trans_string_copy): Use gfc_to_single_character.
2520 * trans-intrinsic.c (gfc_conv_intrinsic_strcmp): Use
2521 gfc_build_compare_string.
2522 * trans.h (gfc_build_compare_string): Add prototype.
2524 2006-01-09 Feng Wang <fengwang@nudt.edu.cn>
2526 * simplify.c (gfc_simplify_char): Use UCHAR_MAX instead of literal
2528 (gfc_simplify_ichar): Get the result from unsinged char and in the
2529 range 0 to UCHAR_MAX instead of CHAR_MIN to CHAR_MAX.
2531 2006-01-08 Erik Edelmann <eedelman@gcc.gnu.org>
2534 * resolve.c (resolve_fntype): Check that PUBLIC functions
2535 aren't of PRIVATE type.
2537 2006-01-07 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de>
2539 * decl.c (gfc_match_function_decl): Correctly error out in case of
2540 omitted function argument list.
2542 2006-01-07 Paul Thomas <pault@gcc.gnu.org>
2545 * trans-array.c (gfc_reverse_ss): Remove static attribute.
2546 (gfc_walk_elemental_function_args): Replace gfc_expr * argument for
2547 the function call with the corresponding gfc_actual_arglist*. Change
2549 (gfc_walk_function_expr): Call to gfc_walk_elemental_function_args
2550 now requires the actual argument list instead of the expression for
2552 * trans-array.h: Modify the prototype for gfc_walk_elemental_function_args
2553 and provide a prototype for gfc_reverse_ss.
2554 * trans-stmt.h (gfc_trans_call): Add the scalarization code for the case
2555 where an elemental subroutine has array valued actual arguments.
2561 * resolve.c (check_assumed_size_reference): New function to check for upper
2562 bound in assumed size array references.
2563 (resolve_assumed_size_actual): New function to do a very restricted scan
2564 of actual argument expressions of those procedures for which incomplete
2565 assumed size array references are not allowed.
2566 (resolve_function, resolve_call): Switch off assumed size checking of
2567 actual arguments, except for elemental procedures and intrinsic
2568 inquiry functions, in some circumstances.
2569 (resolve_variable): Call check_assumed_size_reference.
2571 2006-01-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2574 * io.c (next_char_not_space): New function that returns the next
2575 character that is not white space.
2576 (format_lex): Use the new function to skip whitespace within
2579 2006-01-05 Erik Edelmann <eedelman@gcc.gnu.org>
2582 * expr.c (gfc_expr_set_symbols_referenced): New function.
2583 * gfortran.h: Add a function prototype for it.
2584 * resolve.c (resolve_function): Use it for
2585 use associated character functions lengths.
2586 * expr.c, gfortran.h, resolve.c: Updated copyright years.
2588 2006-01-03 Steven G. Kargl <kargls@comcast.net>
2591 * resolve.c (resolve_forall_iterators): Check for scalar variables;
2592 Check stride is nonzero.
2594 2006-01-02 Steven G. Kargl <kargls@comcast.net>
2597 * parse.c (next_free): Check for whitespace after the label.
2598 * match.c (gfc_match_small_literal_int): Initialize cnt variable.
2600 2006-01-01 Steven G. Kargl <kargls@comcast.net>
2602 * ChangeLog: Split previous years into ...
2603 * ChangeLog-2002: here.
2604 * ChangeLog-2003: here.
2605 * ChangeLog-2004: here.
2606 * ChangeLog-2005: here.