1 2007-08-21 Paul Brook <paul@codesourcery.com>
2 Nathan Sidwell <nathan@codesourcery.com>
3 Mark Mitchell <mark@codesourcery.com>
4 Joseph Myers <joseph@codesourcery.com>
6 * gfortranspec.c (lang_specific_driver): Use pkgversion_string.
7 * Make-lang.in (gfortran.pod): Define BUGURL.
8 * invoke.texi: Use BUGURL for bug-reporting instructions.
10 2007-08-19 Roger Sayle <roger@eyesopen.com>
12 * match.c (intrinsic_operators): Make static.
13 (gfc_op2string): New function for converting a gfc_intrinsic_op to
14 to a "const char*", replacing the macro of the same name.
15 * gfortran.h (intrinsic_operators): Delete prototype.
16 (gfc_op2string): Replace macro with function prototype.
18 2007-08-18 Tobias Burnus <burnus@net-b.de>
20 * gfortran.h (gfc_is_intrinsic_typename): Add declaration.
21 * symbol.c (gfc_is_intrinsic_typename): New function.
22 * parse.c (decode_statement): Check for space in ABSTRACT INTERFACE.
23 (parse_interface): Use gfc_is_intrinsic_typename.
24 * decl.c (gfc_match_derived_decl): Ditto.
25 * module.c (gfc_match_use): Use gcc_unreachable() for
26 INTERFACE_ABSTRACT in switch().
28 2007-08-18 Roger Sayle <roger@eyesopen.com>
30 * primary.c (match_logical_constant_string): New function to match
31 a ".true." or a ".false.".
32 (match_logical_constant): Use it instead of gfc_match_strings.
34 2007-08-18 Paul Thomas <pault@gcc.gnu.org>
35 Janus Weil <jaydub66@gmail.com>
37 * interface.c (gfc_match_interface,gfc_match_abstract_interface,
38 gfc_match_end_interface,gfc_add_interface): Add abstract interface.
39 * dump-parse-tree.c (gfc_show_attr): Ditto.
40 * gfortran.h (interface_type,symbol_attribute): Ditto.
41 * module.c (gfc_match_use,ab_attribute,attr_bits,
42 mio_symbol_attribute): Ditto.
43 * resolve.c (resolve_function): Ditto.
45 * parse.c (decode_statement): Ditto.
46 (parse_interface): Ditto, check for C1203 (name of abstract interface
47 cannot be the same as an intrinsic type).
48 * decl.c (gfc_match_bind_c): Check for NAME= with abstract interfaces.
49 (access_attr_decl): Handle Abstract interfaces.
51 2007-08-18 Paul Thomas <pault@gcc.gnu.org>
54 * expr.c (gfc_check_pointer_assign): If the rhs is the
55 initialization expression for the rhs, there is no error.
57 2007-08-18 Paul Thomas <pault@gcc.gnu.org>
60 * trans-array.c (get_array_ctor_strlen): Set the character
61 length of a zero length array to zero.
63 2007-08-16 Tobias Burnus <burnus@net-b.de>
66 * module.c (gfc_match_use): Mark user operators as such.
67 (find_use_name_n): Distinguish between operators and other symbols.
68 (find_use_name,number_use_names,mio_namelist,
69 load_operator_interfaces,load_generic_interfaces,read_module,
70 write_generic): Update find_use_name_n calls.
72 2007-08-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
75 * trans.c (gfc_create_var_np): Do not emit warnings for
78 2007-08-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
81 * decl.c (gfc_get_type_attr_spec): Fix whitespace.
82 (gfc_match_derived_decl): Fix logic.
84 2007-08-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
87 * trans-intrinsic.c (build_fixbound_expr): Convert to result type
90 2007-08-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
93 * trans-expr.c (gfc_conv_substring_expr): Only call
94 gfc_conv_substring if expr->ref is not NULL.
95 * expr.c (gfc_is_constant_expr): If e->ref is NULL, the substring
96 expression might be a constant.
97 (gfc_simplify_expr): Handle missing start and end, as well as
100 2007-08-13 Paul Thomas <pault@gcc.gnu.org>
103 * match.c (gfc_match_call): Do not create a new symtree in the
104 case where the existing symbol is external and not referenced.
106 2007-08-13 Paul Thomas <pault@gcc.gnu.org>
109 * decl.c (variable_decl): Check for an imported symbol
110 by looking for its symtree and testing for the imported
112 (gfc_match_import): Remove change of symbol's namespace
113 and set the attribute imported instead.
114 * symbol.c (gfc_get_sym_tree): It is not an error if a
116 * gfortran.h : Add the 'imported' to symbol_attribute.
118 2007-08-13 Paul Thomas <pault@gcc.gnu.org>
121 * trans-array.c (gfc_conv_array_transpose): Set the offset
122 of the destination to zero if the loop is zero based.
124 2007-08-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
127 * intrinsic.c (add_functions): Add optional KIND argument to ACHAR.
128 * iresolve.c (gfc_resolve_achar): Handle the KIND argument.
129 * check.c (gfc_check_achar): Check for the optional KIND argument.
130 * simplify.c (gfc_simplify_achar): Use KIND argument.
131 * intrinsic.h (gfc_check_achar, gfc_simplify_achar,
132 gfc_resolve_achar): Adjust prototypes.
134 2007-08-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
138 * trans-expr.c (gfc_conv_function_call): When no formal argument
139 list is available, we still substitute missing optional arguments.
140 * check.c (gfc_check_random_seed): Correct the check on the
141 number of arguments to RANDOM_SEED.
142 * intrinsic.c (add_subroutines): Add a resolution function to
144 * iresolve.c (gfc_resolve_random_seed): New function.
145 * intrinsic.h (gfc_resolve_random_seed): New prototype.
147 2007-08-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
150 * error.c (error_uinteger): New function.
151 (error_integer): Call error_uinteger.
152 (error_print): Handle %u, %lu, %li and %ld format specifiers.
153 * interface.c (compare_actual_formal): Use the new %lu specifier.
155 2007-08-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
158 * lang.opt (-fmodule-private): New option.
159 * gfortran.h (gfc_option_t): Add flag_module_private member.
160 * invoke.texi (-fmodule-private): Document the new option.
161 * module.c (gfc_check_access): Allow the -fmodule-private option
162 to modify the default behaviour.
163 * options.c (gfc_init_options): Initialize flag_module_private.
164 (gfc_handle_option): Handle -fmodule-private.
166 2007-08-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
169 * intrinsic.c (add_functions): Add KIND arguments to COUNT,
170 IACHAR, ICHAR, INDEX, LBOUND, LEN, LEN_TRIM, SCAN, SIZE, UBOUND
172 * iresolve.c (gfc_resolve_count): Add kind argument.
173 (gfc_resolve_iachar): New function.
174 (gfc_resolve_ichar): Add kind argument.
175 (gfc_resolve_index_func): Likewise.
176 (gfc_resolve_lbound): Likewise.
177 (gfc_resolve_len): Likewise.
178 (gfc_resolve_len_trim): Likewise.
179 (gfc_resolve_scan): Likewise.
180 (gfc_resolve_size): New function.
181 (gfc_resolve_ubound): Add kind argument.
182 (gfc_resolve_verify): Likewise.
183 * trans-decl.c (gfc_get_extern_function_decl): Allow specific
184 intrinsics to have 4 arguments.
185 * check.c (gfc_check_count): Add kind argument.
186 (gfc_check_ichar_iachar): Likewise.
187 (gfc_check_index): Likewise.
188 (gfc_check_lbound): Likewise.
189 (gfc_check_len_lentrim): New function.
190 (gfc_check_scan): Add kind argument.
191 (gfc_check_size): Likewise.
192 (gfc_check_ubound): Likewise.
193 (gfc_check_verify): Likewise.
194 * intrinsic.texi: Update documentation for COUNT, IACHAR, ICHAR,
195 INDEX, LBOUND, LEN, LEN_TRIM, SCAN, SIZE, UBOUND and VERIFY.
196 * simplify.c (get_kind): Whitespace fix.
197 (int_expr_with_kind): New function.
198 (gfc_simplify_iachar): Add kind argument.
199 (gfc_simplify_iachar): Likewise.
200 (gfc_simplify_ichar): Likewise.
201 (gfc_simplify_index): Likewise.
202 (simplify_bound_dim): Likewise.
203 (simplify_bound): Likewise.
204 (gfc_simplify_lbound): Likewise.
205 (gfc_simplify_len): Likewise.
206 (gfc_simplify_len_trim): Likewise.
207 (gfc_simplify_scan): Likewise.
208 (gfc_simplify_shape): Pass NULL as kind argument to gfc_simplify_size.
209 (gfc_simplify_size): Add kind argument.
210 (gfc_simplify_ubound): Likewise.
211 (gfc_simplify_verify): Likewise.
212 * intrinsic.h: Update prototypes and add new ones.
213 * trans-intrinsic.c (gfc_conv_intrinsic_index): Rename into
214 gfc_conv_intrinsic_index_scan_verify.
215 (gfc_conv_intrinsic_scan, gfc_conv_intrinsic_verify): Remove.
216 (gfc_conv_intrinsic_function): Call
217 gfc_conv_intrinsic_index_scan_verify to translate the INDEX,
218 SCAN and VERIFY intrinsics.
220 2007-08-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
223 * invoke.texi (-fbacktrace): Document the new behaviour.
225 2007-08-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
228 * trans-array.c (gfc_conv_expr_descriptor): Use
229 gfc_conv_const_charlen to generate backend_decl of right type.
230 * trans-expr.c (gfc_conv_expr_op): Use correct return type.
231 (gfc_build_compare_string): Use int type instead of default
232 integer kind for single character comparison.
233 (gfc_conv_aliased_arg): Give backend_decl the right type.
234 * trans-decl.c (gfc_build_intrinsic_function_decls): Make
235 compare_string return an int.
237 2007-08-11 Ian Lance Taylor <iant@google.com>
239 * f95-lang.c (gfc_get_alias_set): Change return type to
242 2007-08-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
245 * trans.c (gfc_trans_runtime_check): Reorder arguments and
246 add extra variable arguments. Hand them to the library function.
247 * trans.h (gfc_trans_runtime_check): Update prototype.
248 * trans-array.c (gfc_trans_array_bound_check): Issue more
249 detailled error messages.
250 (gfc_conv_array_ref): Likewise.
251 (gfc_conv_ss_startstride): Likewise.
252 (gfc_trans_dummy_array_bias): Reorder arguments to
253 gfc_trans_runtime_check.
254 * trans-expr.c (gfc_conv_substring): Issue more detailled
256 (gfc_conv_function_call): Reorder arguments to gfc_trans_runtime_check.
257 * trans-stmt.c (gfc_trans_goto): Likewise.
258 * trans-io.c (set_string): Reorder arguments to
259 gfc_trans_runtime_check and issue a more detailled error message.
260 * trans-decl.c (gfc_build_builtin_function_decls): Make
261 runtime_error and runtime_error_at handle a variable number of
263 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Reorder arguments
264 to gfc_trans_runtime_check.
265 (gfc_conv_intrinsic_minmax): Likewise.
266 (gfc_conv_intrinsic_repeat): Issue more detailled error messages.
268 2007-08-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
270 * gfortranspec.c (lang_specific_driver): Use CONST_CAST.
271 * options.c (gfc_post_options): Likewise.
272 * parse.c (parse_omp_structured_block): Likewise.
273 * st.c (gfc_free_statement): Likewise.
275 2007-08-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
278 * trans-decl.c (gfc_build_builtin_function_decls): Change
279 prototype for associated.
280 * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Convert the
281 result of __builtin_isnan into a boolean.
282 (gfc_conv_intrinsic_strcmp): Cleanup.
283 (gfc_conv_associated): Convert the result of the associated
284 function into a boolean.
286 2007-08-09 Tobias Burnus <burnus@net-b.de>
289 * io.c (format_token): Add FMT_ERROR.
290 (next_char_not_space): Print error/warning when
291 '\t' are used in format specifications.
292 (format_lex): Propagate error.
293 (check_format): Ditto.
295 2007-08-09 Tobias Burnus <burnus@net-b.de>
298 * arith.c (arith_error): Point in the error message
301 2007-08-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
304 * intrinsic.texi (SIZEOF): Add mention to C_SIZE_T.
306 2007-08-06 Christopher D. Rickett <crickett@lanl.gov>
309 * trans-expr.c (gfc_conv_scalar_char_value): Convert the tree and
310 actual arg expressions for scalar characters passed by-value to
312 (gfc_conv_function_call): Call gfc_conv_scalar_char_value.
313 * trans.h: Add prototype for gfc_conv_scalar_char_value.
314 * trans-decl.c (generate_local_decl): Convert by-value character
315 dummy args of bind(c) procedures using
316 gfc_conv_scalar_char_value.
318 2007-08-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
321 * iresolve.c (gfc_resolve_alarm_sub): Suffix the subroutine name
322 with the kind of the STATUS argument.
324 2007-08-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
327 * intrinsic.c (add_functions): Fix name of argument to CHDIR.
329 2007-08-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
332 * iresolve.c (gfc_resolve_exit): Convert argument to default
335 2007-08-06 Daniel Franke <franke.daniel@gmail.com>
337 * resolve.c (derived_pointer): Removed, replaced callers by access
338 to appropiate attribute bit.
339 (derived_inaccessable): Shortcut recursion depth.
340 (resolve_fl_namelist): Fixed checks for private components in namelists.
342 2007-08-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
345 * trans.h (gfor_fndecl_string_minmax): New prototype.
346 * trans-decl.c (gfor_fndecl_string_minmax): New variable.
347 (gfc_build_intrinsic_function_decls): Create gfor_fndecl_string_minmax.
348 * check.c (gfc_check_min_max): Allow for character arguments.
349 * trans-intrinsic.c (gfc_conv_intrinsic_minmax_char): New function.
350 (gfc_conv_intrinsic_function): Add special case for MIN and MAX
351 intrinsics with character arguments.
352 * simplify.c (simplify_min_max): Add simplification for character
355 2007-08-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
358 * invoke.texi: Adjust documentation for option -fsyntax-only.
360 2007-08-05 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
361 Tobias Burnus <burnus@gcc.gnu.org>
364 * intrinsic.h (gfc_check_isnan): Add prototype.
365 * gfortran.h (gfc_isym_id): Add GFC_ISYM_ISNAN.
366 * intrinsic.c (add_functions): Add ISNAN intrinsic.
367 * check.c (gfc_check_isnan): New function.
368 * trans-intrinsic.c (gfc_conv_intrinsic_isnan): New function.
369 (gfc_conv_intrinsic_function): Call gfc_conv_intrinsic_isnan
371 * intrinsic.texi: Document ISNAN.
373 2007-08-04 Paul Thomas <pault@gcc.gnu.org>
376 * symbol.c (get_unique_symtree): Moved from module.c.
377 * module.c (get_unique_symtree): Moved to symbol.c.
378 * decl.c (get_proc_name): Transfer the typespec from the local
379 symbol to the module symbol, in the case that an entry is also
380 a module procedure. Ensure the local symbol is cleaned up by
381 pointing to it with a unique symtree.
383 * dump_parse_tree (gfc_show_code_node): Add EXEC_ASSIGN_CALL.
385 2008-08-04 Steven G. Kargl <kargl@gcc.gnu.org>
388 * iresolve.c (gfc_resolve_rrspacing): Convert argument(s) to
390 (gfc_resolve_scale): Ditto.
391 (gfc_resolve_set_exponent): Ditto.
392 (gfc_resolve_spacing): Ditto.
395 * trans-intrinsic.c (gfc_conv_intrinsic_si_kind,
396 gfc_conv_intrinsic_sr_kind): Convert the argument(s) to the
397 expected KIND, and fold the result to the expected KIND.
399 2007-08-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
402 * f95-lang.c (gfc_init_builtin_functions): Defin builtins for
403 lround{f,,l} and llround{f,,l}.
404 * trans-intrinsic.c (build_fix_expr): Generate calls to the
405 {l,}round{f,,l} functions.
407 2007-08-01 Thomas Koenig <tkoenig@gcc.gnu.org>
410 * intrinsic.c (resolve_mask_arg): New function.
411 (gfc_resolve_maxloc): Use resolve_mask_arg for mask resolution.
412 (gfc_resolve_maxval): Likewise.
413 (gfc_resolve_minloc): Likewise.
414 (gfc_resolve_minval): Likewise.
415 (gfc_resolve_pack): Likewise.
416 (gfc_resolve_product): Likewise.
417 (gfc_resolve_sum): Likewise.
418 (gfc_resolve_unpack): Likewise.
420 2007-08-01 Tobias Burnus <burnus@net-b.de>
423 * match.c (gfc_match_allocate): Better check that STAT is
426 * check.c (gfc_check_allocated): Reorder checks to improve
429 2007-08-01 Nick Clifton <nickc@redhat.com>
431 * arith.c: Change copyright header to refer to version 3 of the
432 GNU General Public License and to point readers at the COPYING3
433 file and the FSF's license web page.
434 * openmp.c, interface.c, intrinsic.c, trans-array.c, trans-expr.c,
435 symbol.c, iso-fortran-env.def, intrinsic.h, decl.c, trans-array.h,
436 matchexp.c, dump-parse-tree.c, trans-common.c, array.c,
437 Make-lang.in, trans-openmp.c, gfortran.h, error.c,
438 iso-c-binding.def, lang.opt, data.c, trans-const.c, trans-stmt.c,
439 expr.c, trans-const.h, trans-stmt.h, module.c, trans.c, scanner.c,
440 trans-types.c, trans.h, gfortranspec.c, trans-types.h,
441 lang-specs.h, io.c, bbt.c, resolve.c, f95-lang.c, st.c,
442 iresolve.c, match.c, trans-decl.c, trans-io.c, target-memory.c,
443 match.h, target-memory.h, parse.c, arith.h, check.c, dependency.c,
444 parse.h, types.def, convert.c, dependency.h, primary.c,
445 trans-intrinsic.c, options.c, misc.c, simplify.c: Likewise.
447 2007-08-01 Daniel Franke <franke.daniel@gmail.com>
449 * trans-decl.c (generate_local_decl): Emit warning on unused parameter
450 on "-Wall -Wextra" or "-Wunused-parameter" but not on "-Wall", changed
451 messages that start with lower case to upper case.
452 * invoke.texi (-Wparameter-unused): Document differences between gcc
453 and gfortran regarding this option.
455 2007-08-01 Daniel Franke <franke.daniel@gmail.com>
458 * expr.c (check_specification_function): Skip check if no symtree
461 2007-08-01 Paul Thomas <pault@gcc.gnu.org>
464 * resolve.c (resolve_entries): Entries declared to be module
465 procedures must point to the function namespace.
467 2007-07-31 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
470 * trans-stmt.c (gfc_trans_return): Convert to correct type.
472 2007-07-31 Steven G. Kargl <kargl@gcc.gnu.org>
475 * trans-intrinsic.c (gfc_conv_intrinsic_exponent): Convert to correct
478 2007-07-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
480 * invoke.texi: Document -fsign-zero flag.
482 2007-07-29 Paul Thomas <pault@gcc.gnu.org>
485 * trans-expr.c (gfc_conv_expr_reference): Add block for case of
486 scalar pointer functions so that NULL result is correctly
490 * trans-array.c (gfc_trans_array_constructor): On detecting a
491 multi-dimensional parameter array, set the loop limits.
493 2007-07-29 Daniel Franke <franke.daniel@gmail.com>
496 * resolve.c (resolve_fl_parameter): Check for constant shape arrays,
497 adjusted error message.
499 2007-07-29 Daniel Franke <franke.daniel@gmail.com>
501 * invoke.texi: Removed -w from option summary.
503 2007-07-29 Daniel Franke <franke.daniel@gmail.com>
506 * intrinsic.texi (IRAND, RAND, RANDOM_NUMBER): Document algorithm
507 used for random number generator.
509 2007-07-28 Kazu Hirata <kazu@codesourcery.com>
511 * gfortran.h, interface.c, resolve.c, symbol.c: Fix comment
513 * intrinsic.texi, invoke.texi: Fix typos.
515 2007-07-28 Jerry DeLisle <jvdelisle@gcc.gnu.org>
518 * resolve.c (generic_sym): Check for a same symbol and if so, return to
519 avoid infinite recursion.
521 2007-07-28 Daniel Franke <franke.daniel@gmail.com>
526 * gfortran.h (symbol_attribute): Added bits for pointer_comp,
528 * parse.c (parse_derived): Set pointer_comp/private_comp bits if
529 the derived type ultimately contains pointer components or private
531 * module.c (ab_attribute): New values AB_POINTER_COMP, AB_PRIVATE_COMP.
532 (attr_bits): Added names for new ab_attributes.
533 (mio_symbol_attribute): Save/restore new attribute bits in modules.
534 * match.c (gfc_match_namelist): Removed check for namelist objects
536 * resolve.c (resolve_fl_namelist): Added check for pointer or
537 private components in nested types. Added check for namelist objects
540 2007-07-28 Paul Thomas <pault@gcc.gnu.org>
543 * trans-expr.c (gfc_trans_scalar_assign): Revert to fixed order
544 for lse and rse pre expressions, for derived types with
545 allocatable components. Instead, assign the lhs to a temporary
546 and deallocate after the assignment.
548 2007-07-28 Janne Blomqvist <jb@gcc.gnu.org>
551 * trans-stmt.c (gfc_trans_character_select): Replace occurrences
552 of gfc_c_int_type_node with integer_type_node.
553 * trans-decl.c (gfc_build_intrinsic_function_decls): Likewise.
554 (gfc_build_builtin_function_decls): Likewise.
555 (gfc_generate_function_code): Likewise.
556 * trans-io.c (gfc_build_io_library_fndecls): Likewise.
558 2007-07-27 Janne Blomqvist <jb@gcc.gnu.org>
560 * trans-decl.c (gfc_build_builtin_function_decls): Use existing
561 gfc_array_index_type rather than creating another typenode for
562 gfc_index_integer_kind.
564 2007-07-27 Janne Blomqvist <jb@gcc.gnu.org>
566 * trans-io.c (gfc_build_io_library_fndecls): Change to use
567 gfc_array_index_type for array descriptor triplets instead of
570 2007-07-26 Steven G. Kargl <kargl@gcc.gnu.org>
573 * resolve.c (resolve_operator): Add INTRINSIC_EQ_OS comparison.
575 2007-07-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
576 Daniel Franke <franke.daniel@gmail.com>
579 * primary.c (match_variable): Do not call gfc_add_flavor if symbol has
580 attribute of ACCESS_PUBLIC or ACCESS_PRIVATE already marked.
582 2007-07-27 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
585 * trans-stmt.c (gfc_trans_character_select): Replace the
586 mechanism with labels by a SWITCH_EXPR.
587 * trans-decl.c (gfc_build_builtin_function_decls): Change
588 return type for select_string.
590 2007-07-27 Paul Thomas <pault@gcc.gnu.org>
593 * trans-decl.c (gfc_trans_deferred_vars): Set intent(out)
594 derived types as referenced, if they have the the default
597 2007-07-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
599 * gfortran.h (generate_isocbinding_symbol): Constify.
600 * symbol.c (gen_special_c_interop_ptr, gen_cptr_param,
601 generate_isocbinding_symbol): Likewise.
603 2007-07-24 Paul Thomas <pault@gcc.gnu.org>
607 * trans-expr.c (gfc_conv_function_call): Remove the default
608 initialization of intent(out) derived types.
609 * symbol.c (gfc_lval_expr_from_sym): New function.
610 * matchexp.c (gfc_get_parentheses): Return argument, if it is
611 character and posseses a ref.
612 * gfortran.h : Add prototype for gfc_lval_expr_from_sym.
613 * resolve.c (has_default_initializer): Move higher up in file.
614 (resolve_code): On detecting an interface assignment, check
615 if the rhs and the lhs are the same symbol. If this is so,
616 enclose the rhs in parenetheses to generate a temporary and
617 prevent any possible aliasing.
618 (apply_default_init): Remove code making the lval and call
619 gfc_lval_expr_from_sym instead.
620 (resolve_operator): Give a parentheses expression a type-
621 spec if it has no type.
622 * trans-decl.c (gfc_trans_deferred_vars): Apply the a default
623 initializer, if any, to an intent(out) derived type, using
624 gfc_lval_expr_from_sym and gfc_trans_assignment. Check if
625 the dummy is present.
627 2007-07-24 Daniel Franke <franke.daniel@gmail.com>
630 * expr.c (check_init_expr): Simplify matched functions.
632 2007-07-24 Daniel Franke <franke.daniel@gmail.com>
635 * intrinsic.c (add_sym): Do not exclude any symbols, even if not part
636 of the selected standard.
637 (make generic): Likewise.
638 (make alias): Likewise, set standard the alias belongs to.
639 (add_subroutines): Call make_noreturn unconditionally.
640 (check_intrinsic_standard): Change return value to try.
641 (gfc_intrinsic_func_interface): Check return value of above function.
642 (gfc_intrinsic_sub_interface): Likewise.
644 2007-07-24 Thomas Koenig <tkoenig@gcc.gnu.org>
647 * trans-decl.c (generate_function_code): Add argument
648 for flag_bounds_check to the array for set_options.
649 * invoke.texi (-fbounds-check): Document new libarary run-time
652 2007-07-23 Daniel Franke <franke.daniel@gmail.com>
656 * expr.c (check_transformational): Reject valid transformational
657 intrinsics to avoid ICE.
658 (check_inquiry): Report error for assumed character lengths for
659 all supported standards.
660 (check_init_expr): Whitespace fix.
662 2007-07-23 Christopher D. Rickett <crickett@lanl.gov>
666 * decl.c (verify_bind_c_sym): Use the result symbol for functions
667 with a result clause. Warn if implicitly typed. Verify the type
668 and rank of the SHAPE argument, if given.
669 * resolve.c (gfc_iso_c_sub_interface): Use gfc_procedure_use to
670 check the actual args against the formal, sorting them if
672 * symbol.c (gen_shape_param): Initialize type of SHAPE param to
675 2007-07-23 Christopher D. Rickett <crickett@lanl.gov>
678 * trans-decl.c (generate_local_decl): Convert the TREE_TYPE for by
679 value character dummy args of BIND(C) procedures.
680 * trans-expr.c (gfc_conv_variable): Do not build address
681 expression for BT_CHARACTER dummy args.
683 2007-07-23 Christopher D. Rickett <crickett@lanl.gov>
684 Tobias Burnus <burnus@net-b.de>
687 * trans-expr.c (gfc_conv_function_call): Handle c_funloc.
688 * trans-types.c: Add pfunc_type_node.
689 (gfc_init_types,gfc_typenode_for_spec): Use it.
690 * resolve.c (gfc_iso_c_func_interface): Fix whitespace and
691 improve error message.
693 2007-07-22 Daniel Franke <franke.daniel@gmail.com>
696 * parse.c (gfc_fixup_sibling_symbols): No replacement of symbols if
697 the current is a namelist.
699 2007-07-22 Daniel Franke <franke.daniel@gmail.com>
705 * gfortran.h (gfc_intrinsic_sym): Changed members elemental, pure,
706 generic, specific, actual_ok, noreturn into bits of a bitfield,
707 added bits for inquiry, transformational, conversion.
708 * check.c (non_init_transformational): Removed, removed all callers.
709 * intrinsic.c (enum class): New.
710 (add_sym*): Replaced argument elemetal by enum class. Changed all
712 (add_functions): Assign appropriate classes to intrinsic functions.
713 (add_subroutines): Assign appropriate classes to intrinsic subroutines.
714 (add_conv): Set conversion attribute.
715 (gfc_init_expr_extensions): Removed, removed all callers.
716 (gfc_intrinsic_func_interface): Reimplemented check for non-standard
717 initializatione expressions.
718 * expr.c (check_specification_function): New.
719 (gfc_is_constant_expr): Added check for specification functions.
720 (check_init_expr_arguments): New.
721 (check_inquiry): Changed return value to MATCH, added checks for
722 inquiry functions defined by F2003.
723 (check_transformational): New.
725 (check_elemental): New.
726 (check_conversion): New.
727 (check_init_expr): Call new check functions, add more specific error
730 2007-07-21 Christopher D. Rickett <crickett@lanl.gov>
733 * resolve.c (set_name_and_label): Set kind number for character
734 version of c_f_pointer.
735 (gfc_iso_c_sub_interface): Set the kind of the SHAPE formal arg to
736 that of the actual SHAPE arg.
737 * symbol.c (gen_shape_param): Initialize kind for SHAPE arg.
739 2007-07-21 Christopher D. Rickett <crickett@lanl.gov>
742 * symbol.c (generate_isocbinding_symbol): Remove unnecessary
746 * resolve.c (gfc_iso_c_func_interface): Reject assumed-shape and
747 deferred-shape arrays as args to C_LOC. Fix bug in testing
748 character args to C_LOC.
750 2007-07-21 Lee Millward <lee.millward@gmail.com>
753 * trans-intrinsic.c (gfc_conv_intrinsic_int): Evaluate all
754 arguments passed, not just the first one. Adjust code to
755 refer to "args[0]" instead of "arg" as a result.
757 2007-07-19 Christopher D. Rickett <crickett@lanl.gov>
760 * trans-expr.c (gfc_conv_function_call): Inline C_LOC.
762 2007-07-18 Christopher D. Rickett <crickett@lanl.gov>
765 * symbol.c (generate_isocbinding_symbol): Fix bug where
766 ISOCBINDING_FUNPTR was generated for C_LOC instead of the needed
769 2007-07-17 Janus Weil <jaydub66@gmail.com>
772 * resolve.c (resolve_fl_namelist): Check for namelist private
773 components in contained subprograms.
775 2007-07-17 Paul Thomas <pault@gcc.gnu.org>
779 * trans-expr.c (gfc_trans_subcomponent_assign): Ensure that
780 renormalization unity base is done independently of existing
782 (gfc_trans_scalar_assign): If rhs is not a variable, put
783 lse->pre after rse->pre to ensure that de-allocation of lhs
784 occurs after evaluation of rhs.
786 2007-07-16 Lee Millward <lee.millward@gmail.com>
791 * trans-intrinsic.c (gfc_conv_intrinsic_function_args): Adjust
792 to operate on a stack allocated array for the intrinsic arguments
793 instead of creating a TREE_LIST. Add two new parameters for the
794 array and the number of elements. Update all callers to allocate
795 an array of the correct length to pass in. Update comment.
796 (gfc_intrinsic_argument_list_length): New function.
797 (gfc_conv_intrinsic_conversion): Call it.
798 (gfc_conv_intrinsic_mnimax): Likewise.
799 (gfc_conv_intrinsic_merge): Likewise.
800 (gfc_conv_intrinsic_lib_function): Call it. Use new CALL_EXPR
802 (gfc_conv_intrinsic_cmplx): Likewise.
803 (gfc_conv_intrinsic_ctime): Likewise.
804 (gfc_covn_intrinsic_fdate): Likewise.
805 (gfc_conv_intrinsic_ttynam): Likewise.
806 (gfc_conv_intrinsic_ishftc): Likewise.
807 (gfc_conv_intrinsic_index): Likewise.
808 (gfc_conv_intrinsic_scan): Likewise.
809 (gfc_conv_intrinsic_verify): Likewise.
810 (gfc_conv_intrinsic_trim): Likewise.
811 (gfc_conv_intrinsic_aint): Use new CALL_EXPR constructors.
812 (gfc_conv_intrinsic_exponent): Likewise.
813 (gfc_conv_intrinsic_bound): Likewise.
814 (gfc_conv_intrinsic_abs): Likewise.
815 (gfc_conv_intrinsic_mod): Likewise.
816 (gfc_conv_intrinsic_sign): Likewise.
817 (gfc_conv_intrinsic_len): Likewise.
818 (gfc_conv_intrinsic_adjust): Likewise.
819 (gfc_conv_intrinsic_si_kind): Likewise.
821 2007-07-16 Janne Blomqvist <jb@gcc.gnu.org>
824 * trans-decl.c (gfc_build_builtin_function_decls): Remove
825 DECL_IS_MALLOC attribute from internal_realloc, thus reverting
826 part of my 2007-07-03 patch.
828 2007-07-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
829 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
832 * gfortran.h (gfc_option_t): Add flag_sign_zero field.
833 * lang.opt (-fsign-zero): New option.
834 * trans.h: Rename gfor_fndecl_set_std into gfor_fndecl_set_options.
835 * trans-decl.c (gfc_build_builtin_function_decls): Build the function
836 declaration to pass an array containing the options to be used by the
837 runtime library. (gfc_generate_function_code): Build an array that
838 contains option values to be passed to the runtime library and the call
840 * options.c (gfc_init_options): Initialize the flag_sign_zero field.
841 (gfc_handle_option): Handle the -fsign-zero option.
843 2007-07-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
846 * trans-array.c (gfc_conv_array_ref): Only evaluate index once.
848 2007-07-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
851 * iresolve.c (gfc_resolve_mvbits): Convert FROMPOS, LEN and TOPOS
854 2007-07-14 Thomas Koenig <tkoenig@gcc.gnu.org>
857 * iresolve.c(gfc_resolve_pack): A scalar mask has
858 to be kind=4, an array mask with kind<4 is converted
859 to gfc_default_logical_kind automatically.
860 (gfc_resolve_unpack): Convert mask to gfc_default_lotical_kind
863 2007-07-14 Paul Thomas <pault@gcc.gnu.org>
866 * parse.c (parse_spec): Emit error on unexpected statement
869 2007-07-13 Daniel Franke <franke.daniel@gmail.com>
871 * invoke.texi: Unified upper- and lower-case in menus.
872 (-w, -W): Removed, documented by gcc.
873 * intrinsic.texi: Unified Class-section entries, added
874 subroutine/function warning where appropiate.
876 2007-07-12 Daniel Franke <franke.daniel@gmail.com>
879 * decl.c (gfc_match_suffix): Removed surplus general error that hides
880 a more specific message.
881 * resolve.c (resolve_fl_variable): Reject illegal initializiers only
883 (resolve_fl_procedure): Added check for initializers of functions.
885 2007-07-12 Daniel Franke <franke.daniel@gmail.com>
888 * invoke.texi (-static-libgfortran): Document new option.
890 2007-07-12 Paul Thomas <pault@gcc.gnu.org>
894 * module.c (write_generic): Restore patch of 2007-07-10 and use
895 symbol name if there are no use names.
897 2007-07-12 Christopher D. Rickett <crickett@lanl.gov>
900 * decl.c (verify_c_interop_param): Require character string dummy
901 args to BIND(C) procedures to have length 1.
902 * resolve.c (resolve_fl_procedure): Modify parameter checking for
906 * resolve.c (gfc_iso_c_func_interface): Verify that a valid
907 expression is given as an argument to C_LOC and C_ASSOCIATED.
908 * trans-io.c (transfer_expr): Add argument for code block. Add
909 standards check to determine if an error message should be
910 reported for printing C_PTR or C_FUNPTR.
911 (transfer_array_component): Update arguments to transfer_expr.
912 (gfc_trans_transfer): Ditto.
914 * symbol.c (gen_cptr_param): Fix whitespace.
916 2007-07-12 Jakub Jelinek <jakub@redhat.com>
919 * trans.h (GFC_POINTER_TYPE_P): Define.
920 * trans-types.c (gfc_sym_type): Set it for types on attr->sym.pointer.
921 * trans-openmp.c (gfc_omp_privatize_by_reference): Return false
922 if GFC_POINTER_TYPE_P is set on the type.
924 2007-07-12 Richard Guenther <rguenther@suse.de>
926 * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Convert
927 arguments to gfc_charlen_type_node.
928 * trans-io.c (gfc_convert_array_to_string): Convert type
929 size to gfc_array_index_type.
931 2007-07-12 Daniel Franke <franke.daniel@gmail.com>
935 * module.c: Reverted Paul's patch from 2007-07-10.
937 2007-07-11 Richard Guenther <rguenther@suse.de>
939 * trans-array.c (gfc_conv_array_parameter): Use correct
940 types for comparison.
941 * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Use
942 correct types for POINTER_PLUS_EXPR.
943 * trans-stmt.c (gfc_trans_forall_loop): Use correct type
944 for integer one constant.
946 2007-07-10 Paul Thomas <pault@gcc.gnu.org>
949 * resolve.c (is_external_proc): New function. Adds test that
950 the symbol is not an intrinsic procedure.
951 * (resolve_function, resolve_call): Replace logical statements
952 with call to is_external_proc.
955 * simplify.c (gfc_simplify_transfer): If mold has rank, the
959 * module.c (write_generic): Write the local name of the
962 2007-07-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
965 * trans-array.c (gfc_trans_array_constructor): Mark offset field
966 with TREE_NO_WARNING.
967 * trans-decl.c (gfc_build_qualified_array): Mark lbound, ubound,
968 stride and size variables with TREE_NO_WARNING.
970 2007-07-09 Steven G. Kargl <kargl@gcc.gnu.org>
972 * trans-decl.c (set_tree_decl_type_code): Remove function.
973 (generate_local_decl): Remove reference to set_tree_decl_type_code.
975 2007-07-09 Daniel Franke <franke.daniel@gmail.com>
978 * trans-decl.c (generate_local_decl) Emit a warning if an unused
981 2007-07-08 Daniel Franke <franke.daniel@gmail.com>
984 * module.c (gfc_match_use): Do not set an non-existant
985 intrinsic operator if a user-defined operator is found.
987 2007-07-08 Daniel Franke <franke.daniel@gmail.com>
991 * trans-decl.c (generate_local_decl): Adjusted warning on unused
992 dummy arguments, tell middle-end not to emit additional warnings.
994 2007-07-08 Daniel Franke <franke.daniel@gmail.com>
995 Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
998 * gfortran.h (gfc_intrinsic_op): Added INTRINSIC_EQ_OS,
999 INTRINSIC_NE_OS, INTRINSIC_GT_OS, INTRINSIC_GE_OS,
1000 INTRINSIC_LT_OS and INTRINSIC_LE_OS.
1001 * arith.c (eval_intrinsic, eval_type_intrinsic0): Likewise.
1002 * arith.h (gfc_eq, gfc_ne, gfc_gt, gfc_ge, gfc_lt, gfc_le):
1003 Added gfc_intrinsic_op as third argument type.
1004 * dump-parse-tree.c (gfc_show_expr): Account for new enum values.
1005 * expr.c (simplify_intrinsic_op, check_intrinsic_op): Likewise.
1006 * interface.c (check_operator_interface): Likewise.
1007 (gfc_check_interfaces): Added cross-checks for FORTRAN 77 and
1008 Fortran 90 style operators using new enum values.
1009 (gfc_extend_expr): Likewise.
1010 (gfc_add_interface): Likewise.
1011 * match.c (intrinsic_operators): Distinguish FORTRAN 77 style
1012 operators from Fortran 90 style operators using new enum values.
1013 * matchexp.c (match_level_4): Account for new enum values.
1014 * module.c (mio_expr): Likewise.
1015 * resolve.c (resolve_operator): Deal with new enum values, fix
1016 inconsistent error messages.
1017 * trans-expr.c (gfc_conv_expr_op): Account for new enum values.
1019 2007-07-08 Tobias Burnus <burnus@net-b.de>
1022 * interface.c (get_expr_storage_size): Properly obtain lower bound.
1023 (compare_actual_formal): Add space before parenthesis.
1025 2007-07-08 Daniel Franke <franke.daniel@gmail.com>
1028 * resolve.c (resolve_fl_procedure): Added check for PRIVATE types
1029 in PUBLIC interfaces.
1031 2007-07-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1034 * decl.c (match_attr_spec): Don't return MATCH_ERROR if comma found and
1035 gfc_match_bind_c does not return MATCH_YES.
1037 2007-07-07 Kazu Hirata <kazu@codesourcery.com>
1039 * decl.c, gfortran.h, interface.c, module.c, resolve.c,
1040 trans-array.c, trans-decl.c: Fix comment typos. Follow
1041 spelling conventions.
1042 * intrinsic.texi: Fix typos. Follow spelling conventions.
1044 2007-05-06 Daniel Franke <franke.daniel@gmail.com>
1047 * symbol.c (save_status): New.
1048 * gfortran.h (save_status): Added external declaration.
1049 (check_conflict): Check for conflicting explicite SAVE statements
1051 (gen_special_c_interop_ptr): Use SAVE_EXPLICIT constant.
1052 * module.c (ab_attribute, attr_bits): Removed enumerator value
1053 AB_SAVE for save attribute.
1054 (mio_symbol_attribute): Import/export the full SAVE status,
1055 removed usage of AB_SAVE.
1056 * dump-parse-tree.c (gfc_show_attr): Dump full SAVE status.
1057 * decl.c (add_init_expr_to_sym): Set SAVE_IMPLICIT only if not
1060 2007-07-05 Daniel Franke <franke.daniel@gmail.com>
1061 Tobias Burnus <burnus@net-b.de>
1064 * gfortran.h (symbol_attribute): Change save attribute into an enum.
1065 * decl.c (add_init_expr_to_sym): Set it to SAVE_IMPLICIT.
1066 * symbol.c (gfc_add_save): Check for SAVE_EXPLICIT.
1067 * resolve.c (resolve_fl_variable): Check for SAVE_EXPLICIT.
1068 (resolve_symbol): Allow OMP threadprivate with
1069 initialization SAVEd and save_all variable.
1070 * trans-decl.c (gfc_finish_var_decl): Remove obsolete sym->value check.
1072 2007-07-05 Paul Thomas <pault@gcc.gnu.org>
1075 * match.c (gfc_match_call): Check, in all cases, that a symbol
1076 is neither generic nor a subroutine before trying to add it as
1080 * match.c (gfc_match_do): Reset the implied_index attribute.
1082 2007-07-04 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1085 * trans-intrinsic.c (trans-intrinsic.c): Handle optional
1086 arguments correctly for MIN and MAX intrinsics.
1088 2007-07-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1091 * io.c (check_format): Always call gfc_error for errors.
1092 (check_format_string): Change type of this function to try and
1093 return the result of check_format.
1094 (check_io_constraints): Return MATCH_ERROR if check_format_string
1097 2007-07-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1100 * decl.c (get_proc_name): Include attr->mod_proc in check for error.
1102 2007-07-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1105 * gfortran.h: Change type of gfc_assign_data_value from void to try.
1106 * data.c (gfc_assign_data_value): Return FAILURE if error found.
1107 * resolve.c (check_data_variable): If gfc_assign_data_value returns
1108 failure, break out of loop and return failure.
1110 2007-07-03 Christopher D. Rickett <crickett@lanl.gov>
1113 * symbol.c (gen_cptr_param): Generate C_PTR and C_FUNPTR if necessary.
1114 (build_formal_args): Pass intrinsic module symbol id to
1117 2007-07-03 Tobias Burnus <burnus@net-b.de>
1120 * resolve.c (resolve_common_blocks): New check function.
1121 (resolve_types): Use it.
1123 2007-07-03 Tobias Burnus <burnus@net-b.de>
1126 * interface.c (get_sym_storage_size): New function.
1127 (get_sym_storage_size): New function.
1128 (compare_actual_formal): Enhance sequence association
1129 support and improve checking.
1131 2007-07-03 Janne Blomqvist <jb@gcc.gnu.org>
1133 * trans-decl.c (gfc_build_builtin_function_decls): Mark
1134 internal_realloc as a malloc function.
1136 2007-07-03 Tobias Burnus <burnus@net-b.de>
1139 * resolve.c (resolve_operator): Check for NULL as operand.
1141 2007-07-02 Tobias Burnus <burnus@net-b.de>
1143 * gfortran.texi (Fortran 2003): Add ISO Bind C.
1144 * intrinsic.texi (C_ASSOCIATED,C_F_POINTER,C_F_PROCPOINTER,
1145 C_FUNLOC,C_LOC): Document new ISO Bind C intrinsics.
1147 2007-07-01 Christopher D. Rickett <crickett@lanl.gov>
1149 * interface.c (gfc_compare_derived_types): Special case for comparing
1150 derived types across namespaces.
1151 (gfc_compare_types): Deal with BT_VOID.
1152 (compare_parameter): Use BT_VOID to accept ISO C Binding pointers.
1153 * trans-expr.c (gfc_conv_function_call): Remove setting parm_kind
1155 (gfc_conv_initializer): Deal with ISO C Binding NULL_PTR and
1157 (gfc_conv_expr): Convert expressions for ISO C Binding derived types.
1158 * symbol.c (gfc_set_default_type): BIND(C) variables should not be
1159 Implicitly declared.
1160 (check_conflict): Add BIND(C) and check for conflicts.
1161 (gfc_add_explicit_interface): Whitespace.
1162 (gfc_add_is_bind_c): New function.
1163 (gfc_copy_attr): Use it.
1164 (gfc_new_symbol): Initialize ISO C Binding objects.
1165 (get_iso_c_binding_dt): New function.
1166 (verify_bind_c_derived_type): Ditto.
1167 (gen_special_c_interop_ptr): Ditto.
1168 (add_formal_arg): Ditto.
1169 (gen_cptr_param): Ditto.
1170 (gen_fptr_param): Ditto.
1171 (gen_shape_param): Ditto.
1172 (add_proc_interface): Ditto.
1173 (build_formal_args): Ditto.
1174 (generate_isocbinding_symbol): Ditto.
1175 (get_iso_c_sym): Ditto.
1176 * decl.c (num_idents_on_line, has_name_equals): New variables.
1177 (verify_c_interop_param): New function.
1178 (build_sym): Finish binding labels and deal with COMMON blocks.
1179 (add_init_expr_to_sym): Check if the initialized expression is
1180 an iso_c_binding named constants
1181 (variable_decl): Set ISO C Binding type_spec components.
1182 (gfc_match_kind_spec): Check match for C interoperable kind.
1183 (match_char_spec): Fix comment. Chnage gfc_match_small_int
1184 to gfc_match_small_int_expr. Check for C interoperable kind.
1185 (match_type_spec): Clear the current binding label.
1186 (match_attr_spec): Add DECL_IS_BIND_C. If BIND(C) is found, use it
1188 (set_binding_label): New function.
1189 (set_com_block_bind_c): Ditto.
1190 (verify_c_interop): Ditto.
1191 (verify_com_block_vars_c_interop): Ditto.
1192 (verify_bind_c_sym): Ditto.
1193 (set_verify_bind_c_sym): Ditto.
1194 (set_verify_bind_c_com_block): Ditto.
1195 (get_bind_c_idents): Ditto.
1196 (gfc_match_bind_c_stmt): Ditto.
1197 (gfc_match_data_decl): Use num_idents_on_line.
1198 (match_result): Deal with right paren in BIND(C).
1199 (gfc_match_suffix): New function.
1200 (gfc_match_function_decl): Use it. Code is re-arranged to deal with
1201 ISO C Binding result clauses.
1202 (gfc_match_subroutine): Deal with BIND(C).
1203 (gfc_match_bind_c): New function.
1204 (gfc_get_type_attr_spec): New function. Code is re-arranged in and
1205 taken from gfc_match_derived_decl.
1206 (gfc_match_derived_decl): Add check for BIND(C).
1207 * trans-common.c: Forward declare gfc_get_common.
1208 (gfc_sym_mangled_common_id): Change arg from 'const char *name' to
1209 'gfc_common_head *com'. Check for ISO C Binding of the common block.
1210 (build_common_decl): 'com->name' to 'com in SET_DECL_ASSEMBLER_NAME.
1211 * gfortran.h: Add GFC_MAX_BINDING_LABEL_LEN
1213 (sym_flavor): Add FL_VOID.
1214 (iso_fortran_env_symbol, iso_c_binding_symbol, intmod_id): New enum
1215 (CInteropKind_t): New struct.
1216 (c_interop_kinds_table): Use it. Declare an array of structs.
1217 (symbol_attribute): Add is_bind_c, is_c_interop, and is_iso_c
1219 (gfc_typespec): Add is_c_interop; is_iso_c, and f90_type members.
1220 (gfc_symbol): Add from_intmod, intmod_sym_id, binding_label, and
1221 common_block members.
1222 (gfc_common_head): Add binding_label and is_bind_c members.
1223 (gfc_gsymbol): Add sym_name, mod_name, and binding_label members.
1224 Add prototypes for get_c_kind, gfc_validate_c_kind,
1225 gfc_check_any_c_kind, gfc_add_is_bind_c, gfc_add_value,
1226 verify_c_interop, verify_c_interop_param, verify_bind_c_sym,
1227 verify_bind_c_derived_type, verify_com_block_vars_c_interop,
1228 generate_isocbinding_symbol, get_iso_c_sym, gfc_iso_c_sub_interface
1229 * iso-c-binding.def: New file. This file contains the definitions
1230 of the types provided by the Fortran 2003 ISO_C_BINDING intrinsic
1232 * trans-const.c (gfc_conv_constant_to_tree): Deal with C_NULL_PTR
1233 or C_NULL_FUNPTR expressions.
1234 * expr.c (gfc_copy_expr): Add BT_VOID case. For BT_CHARACTER, the
1235 ISO C Binding requires a minimum string length of 1 for '\0'.
1236 * module.c (intmod_sym): New struct.
1237 (pointer_info): Add binding_label member.
1238 (write_atom): Set len to 0 for NULL pointers. Check for NULL p and *p.
1239 (ab_attribute): Add AB_IS_BIND_C, AB_IS_C_INTEROP and AB_IS_ISO_C.
1240 (attr_bits): Add "IS_BIND_C", "IS_C_INTEROP", and "IS_ISO_C".
1241 (mio_symbol_attribute): Deal with ISO C Binding attributes.
1242 (bt_types): Add "VOID".
1243 (mio_typespec): Deal with ISO C Binding components.
1244 (mio_namespace_ref): Add intmod variable.
1245 (mio_symbol): Check for symbols from an intrinsic module.
1246 (load_commons): Check for BIND(C) common block.
1247 (read_module): Read binding_label and use it.
1248 (write_common): Add label. Write BIND(C) info.
1249 (write_blank_common): Blank commons are not BIND(C). Explicitly
1251 (write_symbol): Deal with binding_label.
1252 (sort_iso_c_rename_list): New function.
1253 (import_iso_c_binding_module): Ditto.
1254 (create_int_parameter): Add to args.
1255 (use_iso_fortran_env_module): Adjust to deal with iso_c_binding
1257 * trans-types.c (c_interop_kinds_table): new array of structs.
1258 (gfc_validate_c_kind): New function.
1259 (gfc_check_any_c_kind): Ditto.
1260 (get_real_kind_from_node): Ditto.
1261 (get_int_kind_from_node): Ditto.
1262 (get_int_kind_from_width): Ditto.
1263 (get_int_kind_from_minimal_width): Ditto.
1264 (init_c_interop_kinds): Ditto.
1265 (gfc_init_kinds): call init_c_interop_kinds.
1266 (gfc_typenode_for_spec): Adjust for BT_VOID and ISO C Binding pointers.
1267 Adjust handling of BT_DERIVED.
1268 (gfc_sym_type): Whitespace.
1269 (gfc_get_derived_type): Account for iso_c_binding derived types
1270 * resolve.c (is_scalar_expr_ptr): New function.
1271 (gfc_iso_c_func_interface): Ditto.
1272 (resolve_function): Use gfc_iso_c_func_interface.
1273 (set_name_and_label): New function.
1274 (gfc_iso_c_sub_interface): Ditto.
1275 (resolve_specific_s0): Use gfc_iso_c_sub_interface.
1276 (resolve_bind_c_comms): New function.
1277 (resolve_bind_c_derived_types): Ditto.
1278 (gfc_verify_binding_labels): Ditto.
1279 (resolve_fl_procedure): Check for ISO C interoperability.
1280 (resolve_symbol): Check C interoperability.
1281 (resolve_types): Walk the namespace. Check COMMON blocks.
1282 * trans-decl.c (gfc_sym_mangled_identifier): Prevent the mangling
1283 of identifiers that have an assigned binding label.
1284 (gfc_sym_mangled_function_id): Use the binding label rather than
1286 (gfc_finish_var_decl): Put variables that are BIND(C) into a common
1287 segment of the object file, because this is what C would do.
1288 (gfc_create_module_variable): Conver to proper types
1289 (set_tree_decl_type_code): New function.
1290 (generate_local_decl): Check dummy variables and derived types for
1291 ISO C Binding attributes.
1292 * match.c (gfc_match_small_int_expr): New function.
1293 (gfc_match_name_C): Ditto.
1294 (match_common_name): Deal with ISO C Binding in COMMON blocks
1295 * trans-io.c (transfer_expr): Deal with C_NULL_PTR or C_NULL_FUNPTR
1297 * match.h: Add prototypes for gfc_match_small_int_expr,
1298 gfc_match_name_C, match_common_name, set_com_block_bind_c,
1299 set_binding_label, set_verify_bind_c_sym,
1300 set_verify_bind_c_com_block, get_bind_c_idents,
1301 gfc_match_bind_c_stmt, gfc_match_suffix, gfc_match_bind_c,
1302 gfc_get_type_attr_spec
1303 * parse.c (decode_statement): Use gfc_match_bind_c_stmt
1304 (parse_derived): Init *derived_sym = NULL, and gfc_current_block
1305 later for valiadation.
1306 * primary.c (got_delim): Set ISO C Binding components of ts.
1307 (match_logical_constant): Ditto.
1308 (match_complex_constant): Ditto.
1309 (match_complex_constant): Ditto.
1310 (gfc_match_rvalue): Check for existence of at least one arg for
1311 C_LOC, C_FUNLOC, and C_ASSOCIATED.
1312 * misc.c (gfc_clear_ts): Clear ISO C Bindoing components in ts.
1313 (get_c_kind): New function.
1315 2007-07-01 Janne Blomqvist <jb@gcc.gnu.org>
1318 * trans-expr.c (gfc_conv_power_op): Use builtin_powi for
1320 * f95-lang.c (gfc_init_builtin_functions): Add builtin_powi to the
1323 2007-07-01 Janne Blomqvist <jb@gcc.gnu.org>
1325 * trans.h: Remove decls for 64-bit allocation functions.
1326 * trans-array.c (gfc_grow_array): Always pick the standard realloc
1328 (gfc_array_allocate): Likewise.
1329 * trans-decl.c: Remove trees for 64-bit allocation functions.
1330 (gfc_build_builtin_function_decls): Don't build fndecls for 64-bit
1331 allocations functions, use index_int_type for normal allocation
1334 2007-06-30 Daniel Franke <franke.daniel@gmail.com>
1337 * intrinsic.c (add_functions): Additional function types.
1338 (gfc_convert_type_warn): Remove intrinsic-flag from
1339 conversion functions.
1340 * resolve.c (resolve_symbol): Added type checks to
1341 explicitly defined intrinsics.
1343 2007-06-30 Tobias Burnus <burnus@net-b.de>
1346 * io.c (check_format): Allow zero to precede the
1349 2007-06-30 Paul Thomas <pault@gcc.gnu.org>
1352 * simplify.c (gfc_simplify_repeat): Add handling of character
1353 literal for first argument.
1355 2007-06-29 Daniel Franke <franke.daniel@gmail.com>
1357 * resolve.c (resolve_operator): Added check whether a user
1358 defined operator is available.
1360 2007-06-29 Daniel Franke <franke.daniel@gmail.com>
1362 * openmp.c (resolve_omp_clauses): Adjust error message to
1363 better reflect the actual requirement.
1365 2007-06-29 Tobias Burnus <burnus@net-b.de>
1368 * io.c (format_lex): Fix FMT_ZERO.
1369 (check_format,check_format_string,gfc_match_format,
1370 check_io_constraints) Additional checking for READ.
1372 2007-06-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1375 * lang.opt (static-libgfortran): New option.
1376 * gfortranspec.c (ADD_ARG_LIBGFORTRAN): New macro.
1377 (Option): Add OPTION_static and OPTION_static_libgfortran.
1378 (lookup_option): Handle the new -static-libgfortran option.
1379 (lang_specific_driver): Check whether -static is passed.
1380 Handle the new -static-libgfortran option.
1381 * options.c (gfc_handle_option): If -static-libgfortran is
1382 passed and isn't supported on this configuration, error out.
1384 2007-06-27 Daniel Franke <franke.daniel@gmail.com>
1387 * openmp.c (resolve_omp_clauses): Emit error on allocatable
1388 components in COPYIN, COPYPRIVATE, FIRSTPRIVATE and LASTPRIVATE
1391 2007-06-25 Paul Thomas <pault@gcc.gnu.org>
1394 * resolve.c (check_host_association): Return if the old symbol
1395 is use associated. Introduce retval to reduce the number of
1396 evaluations of the first-order return value.
1399 * match.c (gfc_match_call): If a host associated symbol is not
1400 a subroutine, build a new symtree/symbol in the current name
1403 2007-06-24 Tobias Burnus <burnus@net-de>
1406 * interface.c (gfc_compare_derived_types): Add access check.
1407 * symbol.c (gfc_find_component): Ditto.
1408 (gfc_set_component_attr,gfc_get_component_attr) Copy access state.
1409 * dump-parse-tree.c (gfc_show_components): Dump access state.
1410 * gfortran.h (struct gfc_component): Add gfc_access.
1411 * module.c (mio_component): Add access state.
1412 * (gfc_match_structure_constructor): Check for private access state.
1414 2007-06-24 Paul Thomas <pault@gcc.gnu.org>
1418 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Calculate
1419 the offset between the loop counter and the position as
1420 defined. Add the offset within the loop so that the mask acts
1421 correctly. Do not advance the location on the basis that it
1424 2007-06-22 Daniel Franke <franke.daniel@gmail.com>
1427 * symbol.c (gfc_copy_attr): Emit errors for duplicate
1428 EXTERNAL/INTRINSIC statements.
1430 2007-06-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1433 * expr.c (gfc_check_assign): If the rvalue expression type is NULL_EXPR,
1434 check to see if the lvalue has attribute pointer and data.
1436 2007-06-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1439 * resolve.c (gfc_resolve_iterator_expr): Add check for REAL using
1440 gfc_notify_standard. (gfc_resolve_iterator): Remove check.
1441 (resolve_branch): Change "Obsolete" to "Deleted feature".
1442 * io.c (resolve_tag): Ditto.
1443 * match.c (gfc_match_pause, gfc_match_assign, gfc_match_goto): Ditto.
1445 2007-06-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1448 * match.c (gfc_match_common): If the symbol value expression type is
1449 NULL_EXPR, don't error if previously initialized.
1451 2007-06-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1454 * decl.c (get_proc_name) Check symbol for generic interface
1457 2007-06-20 Andrew Pinski <andrew_pinski@playstation.sony.com>
1458 Richard Guenther <rguenther@suse.de>
1461 * trans.c (gfc_build_addr_expr): Use the correct types.
1463 2007-06-19 Paul Thomas <pault@gcc.gnu.org>
1467 * resolve.c (resolve_code): Use gfc_impure_variable as a
1468 condition for rejecting derived types with pointers, in pure
1470 (gfc_impure_variable): Add test for dummy arguments of pure
1471 procedures; any for functions and INTENT_IN for subroutines.
1474 * data.c (gfc_assign_data_value): Change the ICE on an array
1475 reference initializer not being an array into an error and
1476 clear init to prevent a repetition of the error.
1478 2007-06-17 Janne Blomqvist <jb@gcc.gnu.org>
1480 * gfortran.texi: Add documentation for GFORTRAN_UNBUFFERED_n
1481 environment variables. Fix documentation for
1482 GFORTRAN_UNBUFFERED_ALL environment variable.
1484 2007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
1486 * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Use
1487 POINTER_PLUS_EXPR instead of PLUS_EXPR for pointer addition.
1488 * trans-expr.c (gfc_trans_string_copy): Create
1489 POINTER_PLUS_EXPR instead of a PLUS_EXPR
1492 2007-06-14 Paul Thomas <pault@gcc.gnu.org>
1495 * trans-common.c (build_common_decl): If resizing of common
1496 decl is needed, update the TREE_TYPE.
1498 2007-06-13 Tobias Burnus <burnus@net-b.de>
1501 * interface.c (has_vector_section): New.
1502 (compare_actual_formal): Check for array sections with vector subscript.
1504 2007-06-12 Dirk Mueller <dmueller@suse.de>
1506 * trans-stmt.c (gfc_trans_call): fix gcc_assert to
1507 a comparison, not an assignment.
1509 2007-06-12 Paul Thomas <pault@gcc.gnu.org>
1511 * trans-common.c (create_common): Initialize 'field_init'.
1513 2007-06-12 Paul Thomas <pault@gcc.gnu.org>
1517 * trans-common.c (get_init_field): New function.
1518 (create_common): Call get_init_field for overlapping
1519 initializers in equivalence blocks.
1520 * resolve.c (resolve_equivalence_derived, resolve_equivalence):
1521 Remove constraints on initializers in equivalence blocks.
1522 * target-memory.c (expr_to_char, gfc_merge_initializers):
1524 (encode_derived): Add the bit offset to the byte offset to get
1525 the total offset to the field.
1526 * target-memory.h : Add prototype for gfc_merge_initializers.
1528 2007-06-11 Rafael Avila de Espindola <espindola@google.com>
1530 * trans-types.c (gfc_signed_type): Remove.
1531 * trans-types.h (gfc_signed_type): Remove.
1532 * f95-lang.c (LANG_HOOKS_SIGNED_TYPE): Remove.
1534 2007-06-08 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1536 * trans-intrinsic.c: Revert Lee's 2007-06-04 patch.
1538 2007-06-07 Steven G. Kargl <kargl@gcc.gnu.org>
1539 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1542 * match.c (gfc_match_special_char): New function. Match special char.
1544 * match.h: Add prototype.
1545 * io.c (next_char): Use it.
1546 * primary.c (next_string_char): Ditto.
1548 2007-06-06 Steven G. Kargl <kargl@gcc.gnu.org>
1550 * decl.c: Miscellaneous whitespace fixes.
1552 * gfortran.h: Likewise.
1553 * interface.c : Likewise.
1555 * match.c: Likewise.
1556 * match.h: Likewise.
1557 * module.c: Likewise.
1558 * parse.c: Likewise.
1559 * resolve.c: Likewise.
1560 * symbol.c: Likewise.
1561 * trans-array.c: Likewise.
1562 * trans-common.c: Likewise.
1563 * trans-decl.c: Likewise.
1564 * trans-intrinsic.c: Likewise.
1565 * trans-io.c: Likewise.
1566 * trans-stmt.c: Likewise.
1567 * trans-types.c: Likewise.
1569 2007-06-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1572 * parse.c (decode_statement): Don't call gfc_undo_symbols on MATCH_ERROR
1573 for ST_FUNCTION since it is called in reject_statement.
1574 (parse_contained): If error, loop back after reject_statement and try
1575 again. Free the namespace if an error occured.
1577 2007-06-04 Lee Millward <lee.millward@codesourcery.com>
1579 * trans-intrinsic.c (gfc_conv_intrinsic_function_args): Adjust
1580 to operate on a stack allocated array for the intrinsic arguments
1581 instead of creating a TREE_LIST. Add two new parameters for the
1582 array and the number of elements. Update all callers to allocate
1583 an array of the correct length to pass in. Update comment.
1584 (gfc_intrinsic_argument_list_length): New function.
1585 (gfc_conv_intrinsic_mnimax): Call it.
1586 (gfc_conv_intrinsic_merge): Likewise.
1587 (gfc_conv_intrinsic_lib_function): Call it. Use new CALL_EXPR
1589 (gfc_conv_intrinsic_cmplx): Likewise.
1590 (gfc_conv_intrinsic_ctime): Likewise.
1591 (gfc_covn_intrinsic_fdate): Likewise.
1592 (gfc_conv_intrinsic_ttynam): Likewise.
1593 (gfc_conv_intrinsic_ishftc): Likewise.
1594 (gfc_conv_intrinsic_index): Likewise.
1595 (gfc_conv_intrinsic_scan): Likewise.
1596 (gfc_conv_intrinsic_verify): Likewise.
1597 (gfc_conv_intrinsic_trim): Likewise.
1598 (gfc_conv_intrinsic_aint): Use new CALL_EXPR constructors.
1599 (gfc_conv_intrinsic_exponent): Likewise.
1600 (gfc_conv_intrinsic_bound): Likewise.
1601 (gfc_conv_intrinsic_abs): Likewise.
1602 (gfc_conv_intrinsic_mod): Likewise.
1603 (gfc_conv_intrinsic_sign): Likewise.
1604 (gfc_conv_intrinsic_len): Likewise.
1605 (gfc_conv_intrinsic_adjust): Likewise.
1606 (gfc_conv_intrinsic_si_kind): Likewise.
1608 2007-06-04 Steve Ellcey <sje@cup.hp.com>
1610 * trans-array.c (gfc_conv_array_parameter): Initialize tmp.
1612 2007-05-31 Richard Guenther <rguenther@suse.de>
1614 * trans-expr.c (gfc_conv_expr_op): Use zero constant
1615 that matches the lse type.
1616 (gfc_trans_string_copy): Use sizetype zero constant.
1617 * intrinsic.c (add_functions): The sizeof intrinsic has
1619 * trans-types.c (gfc_get_dtype): Convert size to index
1620 type before shifting.
1621 * trans-array.c (gfc_trans_array_constructor_value): Use
1622 index type for offset computation.
1623 * trans-intrinsic.c (gfc_conv_associated): Use correct type
1626 2007-05-31 Paul Thomas <pault@gcc.gnu.org>
1629 * trans-array.c (gfc_trans_array_constructor): Treat the case
1630 where the ss expression charlen is missing.
1632 22007-05-31 Paul Thomas <pault@gcc.gnu.org>
1635 * module.c (mio_symtree_ref): If an equivalence group member
1636 is not used, give it a hidden symbol and set the pointer_info.
1637 (load_equiv): Only free the equivalence if none of the members
1640 2007-05-29 Daniel Franke <franke.daniel@gmail.com>
1642 * gfortran.h: Renamed 'enum gfc_generic_isym_id' to 'enum gfc_isym_id',
1643 added missing GFC_ISYM_* enumerators, ordered alphabetically.
1644 (struct gfc_intrinsic_sym): Renamed 'generic_id' to 'id'.
1645 (gfc_find_subroutine): New prototype.
1646 * intrinsic.c (add_sym, add_sym_*): Added argument 'id' and changed all callers.
1647 (find_subroutine): Renamed to 'gfc_find_subroutine', removed static.
1648 * dependency.c: Changed usage of isym->generic_id to isym->id.
1649 * openmp.c: Likewise.
1650 * resolve.c: Likewise.
1651 * trans-array.c: Likewise.
1652 * trans-expr.c: Likewise.
1653 * trans-intrinsic.c: Likewise.
1654 * trans-openmp.c: Likewise.
1656 2007-05-28 Tobias Schlüter <tobi@gcc.gnu.org>
1658 * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_SIZEOF.
1659 * intrinsic.c (add_functions): Add stuff for SIZEOF intrinsic.
1660 * intrinsic.h (gfc_check_sizeof): Add prototype of ...
1661 * check.c (gfc_check_sizeof): .. new function.
1662 * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): New function.
1663 (gfc_conv_intrinsic_strcmp): Whitespace fix.
1664 (gfc_conv_intrinsic_array_transfer): Remove double initialization,
1665 use fold_build. where appropriate.
1666 (gfc_conv_intrinsic_function): Add case for SIZEOF.
1667 * intrinsic.texi: Add documentation for SIZEOF.
1669 2007-05-28 Brooks Moses <brooks.moses@codesourcery.com>
1671 * trans-array.c (gfc_conv_expr_descriptor): Edit comment.
1673 2007-05-28 Brooks Moses <brooks.moses@codesourcery.com>
1676 * target-memory.c (gfc_target_expr_size): Add handling
1677 for size of BT_HOLLERITH variables.
1678 * check.c (gfc_check_transfer): Reject BT_HOLLERITH
1679 variables in MOLD argument of TRANSFER.
1681 2007-05-28 Brooks Moses <brooks.moses@codesourcery.com>
1683 * gfortran.h (gfc_expr): Remove from_H, add "representation"
1685 * primary.c (match_hollerith_constant): Store the representation
1686 of the Hollerith in representation, not in value.character.
1687 * arith.c: Add dependency on target-memory.h.
1688 (eval_intrinsic): Remove check for from_H.
1689 (hollerith2representation): New function.
1690 (gfc_hollerith2int): Determine value of the new constant.
1691 (gfc_hollerith2real): Likewise.
1692 (gfc_hollerith2complex): Likewise.
1693 (gfc_hollerith2logical): Likewise.
1694 (gfc_hollerith2character): Point both representation.string and
1695 value.character.string at the value string.
1696 * data.c (create_character_initializer): For BT_HOLLERITH
1697 rvalues, get the value from the representation rather than
1699 * expr.c (free_expr0): Update handling of BT_HOLLERITH values
1700 and values with representation.string.
1701 (gfc_copy_expr): Likewise.
1702 * intrinsic.c (do_simplify): Remove special treatement of
1703 variables resulting from Hollerith constants.
1704 * dump-parse-trees.c (gfc_show_expr): Update handling of
1706 * trans-const.c (gfc_conv_constant_to_tree): Replace from_H
1707 check with check for representation.string; get Hollerith
1708 representation from representation.string, not value.character.
1709 * trans-expr.c (is_zero_initializer_p): Replace from_H check
1710 with check for representation.string.
1711 * trans-stmt.c (gfc_trans_integer_select): Use
1712 gfc_conv_mpz_to_tree for case values, so as to avoid picking up
1713 the memory representation if the case is given by a transfer
1715 * target-memory.c (gfc_target_encode_expr): Use the known memory
1716 representation rather than the value, if it exists.
1717 (gfc_target_interpret_expr): Store the memory representation of
1718 the interpreted expression as well as its value.
1719 (interpret_integer): Move to gfc_interpret_integer, make
1721 (interpret_float): Move to gfc_interpret_float, make non-static.
1722 (interpret_complex): Move to gfc_interpret_complex, make
1724 (interpret_logical): Move to gfc_interpret_logical, make
1726 (interpret_character): Move to gfc_interpret_character, make
1728 (interpret_derived): Move to gfc_interpret_derived, make
1730 * target-memory.h: Add prototypes for newly-exported
1731 gfc_interpret_* functions.
1733 2007-05-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1736 * parse.c (next_statement): Warn for truncated lines if source is free
1739 2007-05-27 Paul Thomas <pault@gcc.gnu.org>
1740 Tobias Burnus <burnus@net-b.de>
1743 * symbol.c (gfc_check_function_type): Copy dimensions of
1745 * resolve.c (resolve_contained_fntype): Improve symbol output in
1748 2007-05-26 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1751 * io.c (check_format): Add warning for H specifier in format.
1753 2007-05-26 Tobias Burnus <burnus@net-b.de>
1755 * gfortran.texi: Document the GFORTRAN_ERROR_DUMPCORE and
1756 GFORTRAN_ERROR_BACKTRACE environment variables.
1758 2007-05-26 Paul Thomas <pault@gcc.gnu.org>
1761 * trans.h : Add no_function_call bitfield to gfc_se structure.
1762 Add stmtblock_t argument to prototype of get_array_ctor_strlen.
1763 * trans-array.c (get_array_ctor_all_strlen): New function.
1764 (get_array_ctor_strlen): Add new stmtblock_t argument and call
1765 new function for character elements that are not constants,
1766 arrays or variables.
1767 (gfc_conv_array_parameter): Call get_array_ctor_strlen to get
1769 * trans-intrinsic (gfc_conv_intrinsic_len): Add new argument
1770 to call of get_array_ctor_strlen.
1772 2007-05-25 Kazu Hirata <kazu@codesourcery.com>
1774 * intrinsic.texi: Fix typos.
1776 2007-05-25 Paul Thomas <pault@gcc.gnu.org>
1779 * trans-expr.c (gfc_apply_interface_mapping_to_expr): Change
1780 order in logic under EXPR_FUNCTION to handle functions with
1783 2007-05-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1786 * array.c (spec_dimen_size): Test for correct BT_INTEGER type.
1788 2007-05-23 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1791 * trans-expr.c (gfc_trans_zero_assign): Convert the result of
1792 TYPE_SIZE_UNIT into a signed type.
1793 (gfc_trans_array_copy): Likewise.
1794 (gfc_trans_array_constructor_copy): Likewise.
1795 * trans-array.c (gfc_trans_create_temp_array): Likewise.
1796 (gfc_grow_array): Likewise.
1797 (gfc_array_init_size): Likewise.
1798 (gfc_duplicate_allocatable): Likewise.
1799 * trans-stmt.c (allocate_temp_for_forall_nest_1): Likewise.
1801 2007-05-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1804 * resolve.c (resolve_function): Don't call resolve_global_procedure if
1805 there is no name. Delete duplicated statement in ELSE clause.
1807 2007-05-22 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1810 * trans-array.c (gfc_trans_array_bound_check): Take extra argument to
1811 indicate whether we should check the upper bound in that dimension.
1812 (gfc_conv_array_index_offset): Check only the lower bound of the
1813 last dimension for assumed-size arrays.
1814 (gfc_conv_array_ref): Likewise.
1815 (gfc_conv_ss_startstride): Likewise.
1817 2007-05-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1818 Daniel Franke <franke.daniel@gmail.com>
1821 * resolve.c (resolve_actual_arglist): Resolve actual argument after
1822 being identified as variable.
1824 2007-05-21 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1827 * trans-stmt.c (gfc_trans_do): Fix the value of loop variable
1830 2007-05-21 H.J. Lu <hongjiu.lu@intel.com>
1832 * trans-stmt.c (gfc_trans_do): Fix a typo in comment.
1834 2007-05-21 Paul Thomas <pault@gcc.gnu.org>
1838 * trans-array.c (gfc_conv_expr_descriptor): Obtain the stored
1839 offset for non-descriptor, source arrays and correct for stride
1840 not equal to one before writing to field of output descriptor.
1842 2007-05-20 Daniel Franke <franke.daniel@gmail.com>
1845 * check.c (check_rest): Improved argument conformance check and
1846 fixed error message generation.
1848 2007-05-19 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1851 * Make-lang.in: Remove use of -Wno-error for expr.o, resolve.o,
1852 simplify.o and trans-common.o.
1854 2007-05-19 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1857 * trans-array.c (gfc_trans_auto_array_allocation): Avoid
1858 multiplication of mismatched types.
1860 2007-05-18 Daniel Franke <franke.daniel@gmail.com>
1863 * symbol.c (gfc_add_flavor): Add the NAME to error message if
1866 2007-05-15 Daniel Franke <franke.daniel@gmail.com>
1871 * intrinsic.c (check_specific): Check elemental intrinsics for
1873 (add_functions): Fixed dummy argument names of BESJN and BESYN.
1874 Fixed elemental status of MCLOCK and MCLOCK8.
1875 * check.c (check_rest): Added check for array conformance.
1876 (gfc_check_merge): Removed check for array conformance.
1877 (gfc_check_besn): Removed check for scalarity.
1878 * intrinsic.texi (CSHIFT, EOSHIFT): Fixed typos.
1879 (BESJN, BESYN): Clarified documentation.
1881 2007-05-17 Tobias Burnus <burnus@net-b.de>
1883 * gfortran.texi (GFORTRAN_CONVERT_UNIT): Improve documentation.
1885 2007-05-16 Brooks Moses <brooks.moses@codesourcery.com>
1892 * target-memory.c: New file.
1893 * target-memory.h: New file.
1894 * simplify.c: Add #include "target-memory.h".
1895 (gfc_simplify_transfer): Implement constant-
1896 folding for TRANSFER intrinsic.
1897 * Make-lang.in: Add dependencies on new target-memory.* files.
1899 2007-05-15 Paul Brook <paul@codesourcery.com>
1901 * trans-types.c (gfc_type_for_size): Handle signed TImode.
1903 2007-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1906 * trans.h (gfor_fndecl_internal_malloc, gfor_fndecl_internal_malloc64,
1907 gfor_fndecl_internal_free): Remove prototypes.
1908 (gfor_fndecl_os_error, gfc_call_free, gfc_call_malloc): Add prototypes.
1909 * trans.c (gfc_call_malloc, gfc_call_free): New functions.
1910 * f95-lang.c (gfc_init_builtin_functions): Add __builtin_free
1911 and __builtin_malloc builtins.
1912 * trans-decl.c (gfor_fndecl_internal_malloc,
1913 gfor_fndecl_internal_malloc64, gfor_fndecl_internal_free): Remove.
1914 (gfor_fndecl_os_error): Add.
1915 (gfc_build_builtin_function_decls): Don't create internal_malloc,
1916 internal_malloc64 and internal_free library function declaration.
1917 Create os_error library call function declaration.
1918 * trans-array.c (gfc_trans_allocate_array_storage,
1919 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
1920 gfc_conv_array_parameter, gfc_duplicate_allocatable): Use
1921 gfc_call_malloc and gfc_call_free instead of building calls to
1922 internal_malloc and internal_free.
1923 * trans-expr.c (gfc_conv_string_tmp): Likewise.
1924 * trans-stmt.c (gfc_do_allocate, gfc_trans_assign_need_temp,
1925 gfc_trans_pointer_assign_need_temp, gfc_trans_forall_1,
1926 gfc_trans_where_2: Likewise.
1927 * trans-intrinsic.c (gfc_conv_intrinsic_ctime,
1928 gfc_conv_intrinsic_fdate, gfc_conv_intrinsic_ttynam,
1929 gfc_conv_intrinsic_array_transfer, gfc_conv_intrinsic_trim): Likewise.
1931 2007-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1934 * trans-expr.c (gfc_conv_substring): Evaluate substring bounds
1937 2007-05-14 Rafael Avila de Espindola <espindola@google.com>
1939 * f95-lang.c (LANG_HOOKS_UNSIGNED_TYPE): Remove.
1940 * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Use unsigned_type_for
1941 instead of gfc_unsigned_type.
1942 * trans-stmt.c (gfc_trans_do): Use unsigned_type_for instead of
1944 * trans-types.c (gfc_unsigned_type): Remove.
1945 * trans-types.h (gfc_unsigned_type): Remove.
1947 2007-05-12 Paul Thomas <pault@gcc.gnu.org>
1950 * resolve.c (check_host_association): New function that detects
1951 incorrect host association and corrects it.
1952 (gfc_resolve_expr): Call the new function for variables and
1954 * match.h : Remove prototype for gfc_match_rvalue.
1955 * gfortran.h : Add prototype for gfc_match_rvalue.
1957 2007-05-11 Paul Thomas <pault@gcc.gnu.org>
1960 * trans-expr.c (gfc_conv_function_call): Reduce indirection for
1961 direct assignments of recursive array valued functions.
1962 * primary.c (gfc_match_rvalue): Correct error for recursive
1963 function calls such that directly recursive calls of scalar
1964 function without an explicit result are disallowed.
1966 2007-05-11 Paul Thomas <pault@gcc.gnu.org>
1969 * resolve.c (resolve_fl_namelist): It is not an error if the
1970 namelist element is the result variable of the enclosing
1971 function. Search for the symbol in current and all parent
1972 namespaces for a potential conflict.
1973 * symbol.c (check_conflict): Remove the conflict between
1974 'in_namelist' and 'FL_PROCEDURE' because the symbol info
1975 is not available to exclude function result variables.
1976 * trans-io.c (nml_get_addr_expr): Use the fake result decl
1977 if the symbol is an implicit result variable.
1979 2007-05-11 Paul Thomas <pault@gcc.gnu.org>
1982 * decl.c (get_proc_name): If an entry has already been declared
1983 as a module procedure, pick up the symbol and the symtree and
1984 use them for the entry.
1986 2007-05-08 Paul Thomas <pault@gcc.gnu.org>
1989 * resolve.c (resolve_symbol): Remove the flagging mechanism from the
1990 formal namespace resolution and instead check that the formal
1991 namespace is not the current namespace.
1993 2007-05-08 Paul Thomas <pault@gcc.gnu.org>
1996 * trans-array.c (gfc_conv_array_parameter): Convert full array
1997 references to the result of the procedure enclusing the call.
1999 2007-05-08 Paul Thomas <pault@gcc.gnu.org>
2003 * decl.c (add_init_expr_to_sym): Expand a scalar initializer
2004 for a parameter array into an array expression with the right
2006 * array.c (spec_dimen_size): Remove static attribute.
2007 * gfortran.h : Prototype for spec_dimen_size.
2009 2007-05-07 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2012 * trans-stmt.c (gfc_trans_do): Handle large loop counts.
2014 2007-05-07 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2017 * simplify.c (gfc_simplify_new_line): NEW_LINE can be simplified
2018 even for non constant arguments.
2020 2007-05-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2021 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2024 * gfortran.h: Add runtime error codes from libgfortran.h. Define
2026 * trans.c (gfc_trans_runtime_check): Update the format of runtime error
2027 messages to match library runtime errors. Use call to new library
2028 function runtime_error_at().
2029 * trans.h: Add prototype for new function gfc_trans_io_runtime_check.
2030 Add declaration for library functions runtime_error_at and
2032 * trans_io.c (gfc_trans_io_runtime_check): New function.
2033 (set_parameter_value): Add error checking for UNIT numbers.
2034 (set_parameter_ref): Initialize the users variable to zero.
2035 (gfc_trans_open): Move setting of unit number to after setting of common
2036 flags so that runtime error trapping can be detected.
2037 (gfc_trans_close): Likewise. (build_filepos): Likewise.
2038 (gfc_trans_inquire): Likewise. (build_dt): Likewise.
2039 * trans-decl.c: Add declarations for runtime_error_at and
2040 generate_error. (gfc_build_builtin_function_decls): Build function
2041 declarations for runtime_error_at and generate_error.
2043 2007-05-06 Paul Thomas <pault@gcc.gnu.org>
2046 * resolve.c (resolve_fl_procedure): Resolve constant character
2049 2007-05-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2052 * decl.c (match_char_spec): Add check for invalid character lengths.
2054 2007-05-04 Brooks Moses <brooks.moses@codesourcery.com>
2056 * intrinsic.texi (CMPLX): Document result kind.
2057 (COMPLEX): Add documentation.
2059 2007-05-04 Daniel Franke <franke.daniel@gmail.com>
2062 * intrinsic.c (add_functions): Replaced calls to gfc_check_g77_math1
2063 by gfc_check_fn_r to avoid checks for scalarity.
2064 * check.c (gfc_check_besn): Removed check for scalarity.
2065 (gfc_check_g77_math1): Removed.
2066 * intrinsic.h (gfc_check_g77_math1): Removed.
2068 2007-05-04 Daniel Franke <franke.daniel@gmail.com>
2070 * check.c (gfc_check_fseek_sub): Fixed typo.
2072 2007-05-04 Daniel Franke <franke.daniel@gmail.com>
2075 * intrinsic.c (add_subroutines): Added FSEEK.
2076 * intrinsic.h (gfc_resolve_fseek_sub, gfc_check_fseek_sub): New.
2077 * iresolve.c (gfc_resolve_fseek_sub): New.
2078 * check.c (gfc_check_fseek_sub): New.
2079 * intrinsic.texi (FSEEK): Updated.
2081 2007-05-04 Tobias Burnus <burnus@net-b.de>
2084 * expr.c (gfc_check_pointer_assign): Check for NULL pointer.
2086 2007-05-04 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2089 * simplify.c (gfc_simplify_len): Only simplify integer lengths.
2091 2007-05-04 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2094 * simplify.c (gfc_simplify_repeat): Don't put function call with
2095 side effect in a gcc_assert().
2097 2007-05-04 Tobias Burnus <burnus@net-b.de>
2100 * interface.c (compare_actual_formal): Check character length.
2102 2007-05-01 Thomas Koenig <tkoenig@gcc.gnu.org>
2105 * dependency.c (gfc_full_array_ref_p): If the reference is
2106 to a single element, check that the array has a single
2107 element and that the correct element is referenced.
2109 2007-05-01 Daniel Franke <franke.daniel@gmail.com>
2111 * intrinsic.c (add_functions): Fixed ELEMENTAL specifications.
2112 (add_subroutines): Replaced magic numbers in function calls by
2113 ELEMENTAL and NOT_ELEMENTAL respectively.
2114 * intrinsic.texi (MVBITS): Changed class to elemental subroutine.
2115 (RANDOM_NUMBER): Changed class to subroutine.
2116 (HUGE, TINY): Changed class to inquiry function.
2118 2007-04-30 Brooks Moses <brooks.moses@codesourcery.com>
2120 * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_get_double_int.
2121 (gfc_conv_tree_to_mpz): New function.
2122 (gfc_conv_mpfr_to_tree): Use real_from_mpfr.
2123 (gfc_conv_tree_to_mpfr): New function.
2124 * trans-const.h: (gfc_conv_tree_to_mpz): New prototype.
2125 (gfc_conv_tree_to_mpfr): New prototype.
2127 2007-04-30 Daniel Franke <franke.daniel@gmail.com>
2129 * intrinsic.texi (IERRNO): Changed class to non-elemental function.
2130 (LOG10): Removed COMPLEX as accepted argument type.
2131 (NEW_LINE): Changed class from elemental to inquiry function.
2132 (SIGN): Removed requirement of scalar arguments.
2133 (SNGL): Changed class to elemental function.
2135 2007-04-29 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2138 * simplify.c (simplify_bound_dim): New function.
2139 (simplify_bound): Use the above. Perform simplification of LBOUND
2140 and UBOUND when DIM argument is not present.
2142 2007-04-29 Daniel Franke <franke.daniel@gmail.com>
2144 * gfortran.texi: Cleaned up keyword index.
2145 * invoke.texi: Likewise.
2146 * intrinsic.texi: Likewise.
2148 2007-04-29 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2151 * scanner.c (load_file): Discard the byte order mark if one is
2152 found on the first non-preprocessor line of a file.
2154 2007-04-29 Paul Thomas <pault@gcc.gnu.org>
2157 * trans-array.c (gfc_conv_resolve_dependencies): Create a temp
2158 whenever a dependency is found.
2160 2007-04-28 Tobias Schlüter <tobi@gcc.gnu.org>
2162 * options.c (gfc_handle_option): Ensure requested free form line
2163 length is not too small.
2165 2007-04-27 Brooks Moses <brooks.moses@codesourcery.com>
2167 * intrinsic.texi (Transfer): Improve documentation.
2169 2007-04-27 Brooks Moses <brooks.moses@codesourcery.com>
2171 * gfortran.texi (Option Index): Add @samp as needed.
2173 2007-04-27 Daniel Franke <franke.daniel@gmail.com>
2175 * gfortran.texi: Added node and menu entry for an option index.
2176 * invoke.texi: Moved command line option related entries of the concept
2177 index to the option index.
2179 2007-04-27 Daniel Franke <franke.daniel@gmail.com>
2181 * intrinsic.texi (AND, FPUT, FPUTC, MODULO, OR, SET_EXPONENT,
2182 XOR): Fixed examples.
2184 2007-04-27 Daniel Franke <franke.daniel@gmail.com>
2186 * intrinsic.texi (PRODUCT, RESHAPE, SPACING, SPREAD, SUM,
2187 SYSTEM_CLOCK, TRANSFER, UNPACK): New.
2188 (DATE_AND_TIME, CPU_TIME, RRSPACING): Added cross references.
2190 2007-04-26 Daniel Franke <franke.daniel@gmail.com>
2192 * intrinsic.texi (NULL, PACK, PRESENT, REPEAT, SCAN, SHAPE,
2193 SIZE, TRANSPOSE, TRIM, VERIFY): New.
2194 (ADJUSTL, ADJUSTR, INDEX): Added cross references.
2195 (INT, INT2, INT8, LONG): Enabled section header.
2197 2007-04-25 Janne Blomqvist <jb@gcc.gnu.org>
2199 * module.c (module_char): Replace fgetc() with
2201 (write_char): Replace fputc() with putc().
2202 * scanner.c (load_line): Replace fgetc() with getc().
2203 (gfc_read_orig_filename): Likewise.
2205 2007-04-25 Tobias Burnus <burnus@net-b.de>
2208 * error.c (error_print): Fix %% support.
2209 * intrinsic.c (sort_actual): Improve error message.
2210 * resolve.c (resolve_actual_arglist): Allow %VAL for
2211 interfaces defined in the module declaration part.
2213 2007-04-25 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2216 * intrinsic.texi (GETLOG): Update documentation to reflect
2219 2007-04-24 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2222 * module.c (write_char): Add character to the MD5 buffer.
2223 (read_md5_from_module_file): New function.
2224 (gfc_dump_module): Compute MD5 for new module file. Call
2225 read_md5_from_module_file. Only overwrite old module file
2226 if the new MD5 is different.
2228 2007-04-23 Paul Thomas <pault@gcc.gnu.org>
2231 * resolve.c (resolve_symbol): Allow resolution of formal
2232 namespaces nested within formal namespaces coming from modules.
2235 * trans-expr.c (gfc_trans_assignment): Make the call to
2236 gfc_trans_zero_assign conditional on the lhs array ref being
2239 2007-04-23 Tobias Burnus <burnus@net-b.de>
2241 * primary.c (match_integer_constant): Mention -fno-range-check
2242 in the error message.
2244 2007-04-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2247 * scanner.c (load_line): Remove check for comment after ampersand and
2248 adjust tracking of ampersand.
2250 2007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
2252 * f95-lang.c (lang_tree_node): Use GENERIC_NEXT
2253 instead of checking GIMPLE_STMT_P in chain_next.
2255 2007-04-17 Tobias Schlüter <tobi@gcc.gnu.org>
2257 * trans-types.h (gfc_packed): New enum.
2258 (gfc_get_nodesc_array_type): Change prototype to use new enum.
2259 * trans-types.c (gfc_get_nodesc_array): Use gfc_packed for
2260 argument packed. Adapt all references to values accordingly.
2261 (gfc_sym_type): Use enum values in call to gfc_get_nodesc_array.
2262 (gfc_get_derived_type): Likewise.
2263 * trans-array.c (gfc_build_constant_array_constructor): Likewise.
2264 * trans-expr.c (gfc_get_interface_mapping_charlen): Changed packed
2265 argument to type gfc_packed.
2266 (gfc_add_interface_mapping): Use enum values in call to
2267 gfc_get_interface_mapping.
2268 * trans-decl.c (gfc_build_dummy_array_decl): Adapt to use enum
2269 values when determining packing.
2271 * trans-decl.c (gfc_finish_decl): Remove unused second argument
2272 'init'. Simplify code accordingly. Remove calls to
2273 gfc_fatal_error in favor of gcc_assert.
2274 (create_function_arglist): Remove second argument from calls to
2276 (gfc_trans_dummy_character): Likewise.
2278 * arith.h: Update copyright years.
2279 * dependency.h: Likewise.
2280 * gfortran.h: Likewise.
2281 * lang-specs.h: Likewise.
2282 * parse.h: Likewise.
2283 * symbol.c: Likewise.
2284 * trans.h: Likewise.
2285 * trans.c: Likewise.
2286 * trans-array.c: Likewise.
2287 * trans-common.c: Likewise.
2288 * trans-const.h: Likewise.
2289 * trans-const.c: Likewise.
2290 * trans-decl.c: Likewise.
2291 * trans-expr.c: Likewise.
2292 * trans-io.c: Likewise.
2293 * trans-openmp.c: Likewise.
2294 * trans-types.h: Likewise.
2295 * types.def: Likewise.
2297 2007-04-17 Tobias Schlüter <tobi@gcc.gnu.org>
2300 * decl.c (gfc_sym_mangled_identifier): Use capital letters in name
2302 (gfc_sym_mangled_function_id): Likewise.
2304 2007-04-15 Paul Thomas <pault@gcc.gnu.org>
2307 * primary.c (check_for_implicit_index): New function to check
2308 that a host associated variable is not an undeclared implied
2310 (gfc_match_rvalue, match_variable): Use it and reset the
2311 implied_index attribute.
2312 * gfortran.h : Add the implied_index field to symbol_attribute.
2313 * match.c (gfc_match_iterator): Mark the iterator variable
2314 with the new attribute.
2315 * decl.c (build_sym): Reset the new attribute.
2317 2007-04-15 Kazu Hirata <kazu@codesourcery.com>
2319 * gfc-internals.texi: Fix typos.
2320 * simplify.c: Fix a comment typo.
2322 2007-04-14 Bernhard Fischer <aldot@gcc.gnu.org>
2324 * primary.c: Commentary typo fix; Add question about redundant (?)
2327 2007-04-14 Paul Thomas <pault@gcc.gnu.org>
2331 * expr.c (scalarize_intrinsic_call): New function to
2332 scalarize elemental intrinsic functions in initialization
2334 (check_init_expr): Detect elemental intrinsic functions
2335 in initalization expressions and call previous.
2337 2007-04-13 Tobias Burnus <burnus@net-b.de>
2340 * primary.c (match_variable): External functions
2343 2007-04-13 Paul Thomas <pault@gcc.gnu.org>
2346 * trans-types.c (copy_dt_decls_ifequal): Do not get pointer
2347 derived type components.
2349 2007-04-13 Tobias Schlüter <tobi@gcc.gnu.org>
2352 * resolve.c: Include obstack.h and bitmap.h. New variable
2354 (code_stack): Add tail and reachable_labels fields.
2355 (reachable_labels): New function.
2356 (resolve_branch): Rework to use new fields in code_stack.
2357 (resolve_code): Call reachable_labels.
2358 (resolve_codes): Allocate and free labels_obstack.
2360 2007-04-12 Tobias Schlüter <tobi@gcc.gnu.org>
2363 * decl.c (match_char_spec): Move check for negative CHARACTER
2365 * resolve.c (resolve_charlen): ... here.
2366 (resolve_types): Resolve CHARACTER lengths earlier.
2368 2007-04-12 Daniel Franke <franke.daniel@gmail.com>
2371 * intrinsic.texi (RANDOM_SEED, RANDOM_NUMBER): New.
2373 2007-04-12 Tobias Schlüter <tobi@gcc.gnu.org>
2376 * primary.c (gfc_variable_attr): Don't copy string length if it
2378 * resolve.c (resolve_code): Clarify error message.
2381 * decl.c (gfc_match_end): Also check for construct name in END
2382 FORALL and END WERE statements.
2383 * match.c (match_case_eos): Use uppercase for statement name in
2385 (match_elsewhere): Construct name may appear iff construct has a
2388 * trans-types.c: Update copyright years. Reformat long comment
2389 explaining array descriptor format. Remove obsolete mention of
2392 * arith.c (gfc_arith_uplus): Rename to ...
2393 (gfc_arith_identity): ... this.
2394 (gfc_parentheses): New function.
2395 (gfc_uplus): Adapt to renamed function.
2396 * arith.h (gfc_parentheses): Add prototype.
2397 * expr.c (gfc_copy_expr): Deal with INTRINSIC_PARENTHESES.
2398 (simplifiy_intrinsic_op): Treat INTRINSIC_UPLUS separately from
2399 INTRINSIC_PARENTHESES.
2401 2007-04-12 Tobias Burnus <burnus@net-b.de>
2404 * decl.c (match_attr_spec): Allow PRIVATE/PUBLIC
2405 attribute in type definitions.
2406 (gfc_match_private): Allow PRIVATE statement only
2407 in specification part of modules.
2408 (gfc_match_public): Ditto for PUBLIC.
2409 (gfc_match_derived_decl): Allow PRIVATE/PUBLIC attribute only in
2410 specificification part of modules.
2412 2007-04-07 Paul Thomas <pault@gcc.gnu.org>
2415 * intrinsic.c (add_functions): Add ref. to gfc_resolve_achar.
2416 * intrinsic.h : Add prototype for gfc_resolve_achar.
2417 * iresolve.c (gfc_resolve_achar): New function.
2419 2007-04-07 Paul Thomas <pault@gcc.gnu.org>
2422 * resolve.c (resolve_fl_variable): Set flag to 2 for automatic
2423 arrays. Make condition for automatic array error explicit.
2424 If a dummy, no error on an INTENT(OUT) derived type.
2426 2007-04-07 Paul Thomas <pault@gcc.gnu.org>
2429 * expr.c (find_array_element): Correct arithmetic for rank > 1.
2431 2007-04-07 Paul Thomas <pault@gcc.gnu.org>
2434 * check.c (numeric_check): If an expresson has not got a type,
2435 see if it is a symbol for which a default type applies.
2437 2007-04-07 Paul Thomas <pault@gcc.gnu.org>
2440 * trans-decl.c (gfc_get_symbol_decl): Allow unreferenced use
2443 2007-04-07 Paul Thomas <pault@gcc.gnu.org>
2446 * symbol.c (gfc_check_function_type): New function.
2447 * gfortran.h : Add prototype for previous.
2448 * parse.c (parse_progunit): Call it after parsing specification
2451 2007-04-05 Paul Thomas <pault@gcc.gnu.org>
2454 * trans-expr.c (gfc_conv_function_call): Give a dummy
2455 procedure the correct type if it has alternate returns.
2457 2007-04-05 Paul Thomas <pault@gcc.gnu.org>
2460 * decl.c (gfc_match_modproc): Go up to the top of the namespace
2461 tree to find the module namespace for gfc_get_symbol.
2463 2007-04-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2466 * fortran/gfortran.h (gfc_charlen_int_kind): New prototype.
2467 * fortran/trans-types.c (gfc_charlen_int_kind): New variable.
2468 (gfc_init_types): Define gfc_charlen_int_kind.
2469 * fortran/trans.h (gfor_fndecl_string_repeat): Remove prototype.
2470 * fortran/trans-decl.c (gfor_fndecl_string_repeat): Delete.
2471 (gfc_build_intrinsic_function_decls): Don't set
2472 gfor_fndecl_string_repeat.
2473 * fortran/trans-intrinsic.c (gfc_conv_intrinsic_repeat): Rewrite
2474 so that we don't have to call a library function.
2475 * fortran/simplify.c (gfc_simplify_repeat): Perform the necessary
2476 checks on the NCOPIES argument, and work with arbitrary size
2479 2007-03-31 Tobias Burnus <burnus@net-b.de>
2481 * intrinsic.c (add_functions): Fix name of dummy argument
2482 for new_line and exit intrinsic.
2484 2007-03-31 Paul Thomas <pault@gcc.gnu.org>
2487 * gfortran.texi: Add a section for the %VAL, %REF and %LOC
2490 2007-03-30 Rafael Avila de Espindola <espindola@google.com>
2492 * trans-types.c (gfc_signed_or_unsigned_type): Remove.
2493 (gfc_unsigned_type): Use get_signed_or_unsigned_type instead of
2494 gfc_signed_or_unsigned_type.
2495 (gfc_signed_type): Ditto.
2496 * trans-types.h (gfc_signed_or_unsigned_type): Remove.
2497 * f95-lang.c (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove.
2499 2007-03-30 Tobias Schlüter <tobi@gcc.gnu.org>
2501 * symbol.c (gfc_find_gsymbol): Simplify, don't unconditionally
2502 descend into all branches.
2504 2007-03-29 Tobias Schlüter <tobi@gcc.gnu.org>
2506 * intrinsic.c (conv_name): Let gfc_get_string handle the format.
2507 (find_conv): Compare pointers instead of calling strcmp.
2508 (find_sym): Likewise, but ensure that the compared pointer is in
2509 the global string table.
2511 2007-03-28 Tobias Schlüter <tobi@gcc.gnu.org>
2513 * gfc-internals.texi: Fix output filename. Merge type index into
2514 concept index. Start documentation of gfc_code structure.
2516 2007-03-26 Brooks Moses <brooks.moses@codesourcery.com>
2518 * gfc-internals.texi: New file,
2519 * Make-lang.in: Add rules to convert it to dvi, pdf, and info.
2521 2007-03-26 Brooks Moses <brooks.moses@codesourcery.com>
2523 * error.c (show_locus): Remove always-false test.
2525 2007-03-26 Brooks Moses <brooks.moses@codesourcery.com>
2527 * lang.opt: Minor edits to descriptions.
2529 2007-03-25 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2532 * fortran/interface.c (check_operator_interface): Implement
2533 the standard checks on user operators extending intrinsic operators.
2534 * fortran/resolve.c (resolve_operator): If the ranks of operators
2535 don't match, don't error out but try the user-defined ones first.
2537 2007-03-24 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2540 * expr.c (check_dimension): Fix logic of comparisons.
2542 2007-03-24 Paul Thomas <pault@gcc.gnu.org>
2545 * trans-expr.c (gfc_apply_interface_mapping_to_expr): Return
2546 int result that is non-zero if the expression is the function
2547 result. Only the characteristics of the result expression
2548 can be used in a procedure interface, so simplify LEN in situ
2549 using its character length.
2553 * trans-expr.c (gfc_conv_function_call): Do not use
2554 gfc_conv_expr_reference for actual pointer function with formal
2555 target because a temporary is created that does not transfer
2556 the reference correctly. Do not indirect formal pointer
2557 functions since it is the function reference that is needed.
2559 2007-03-24 Brooks Moses <brooks.moses@codesourcery.com>
2561 * gfortran.h: Edit comments on GFC_STD_*.
2563 2007-03-23 Brooks Moses <brooks.moses@codesourcery.com>
2565 * invoke.texi: Misc. small typo fixes.
2566 (-Wcharacter-truncation): Add.
2567 (-Wnonstd-intrinsics): Correct spelling.
2569 (-fintrinsic-modules-path): Add.
2571 2007-03-23 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2574 * arith.c (complex_pow): Rewrite to handle large power.
2575 (gfc_arith_power): Handle large power in the real and integer
2578 2007-03-22 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2581 * trans-const.c (gfc_conv_mpz_to_tree): Allow integer constants
2582 larger than twice the width of a HOST_WIDE_INT.
2584 2006-03-22 Paul Thomas <pault@gcc.gnu.org>
2587 * trans-intrinsic.c (gfc_size_in_bytes): Remove function.
2588 (gfc_conv_intrinsic_array_transfer): Remove calls to previous.
2589 Explicitly extract TREE_TYPEs for source and mold. Use these
2590 to calculate length of source and mold, except for characters,
2591 where the se string_length is used. For mold, the TREE_TYPE is
2592 recalculated using gfc_get_character_type_len so that the
2593 result is correctly cast for character literals and substrings.
2594 Do not use gfc_typenode_for_spec for the final cast.
2596 2007-03-22 Tobias Schlüter <tobi@gcc.gnu.org>
2599 * decl.c (gfc_match_derived_decl): Reliably reject
2600 'doubleprecision' and 'doublecomplex' as type names.
2602 2007-03-19 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2605 * trans-expr.c (gfc_trans_init_string_length): Length should
2607 (gfc_conv_function_call): Likewise.
2609 2007-03-18 Paul Thomas <pault@gcc.gnu.org>
2613 * symbo.c : Add gfc_derived_types.
2614 (gfc_free_dt_list): Free derived type list gfc_derived_types.
2615 (gfc_free_namespace): Remove call to gfc_free_dt_list.
2616 (gfc_symbol_done_2): Call gfc_free_dt_list.
2617 * gfortran.h : Declare gfc_derived_types to be external. Remove
2618 derived types field from gfc_namespace.
2619 * resolve.c (resolve_fl_derived): Refer to gfc_derived types
2620 rather than namespace derived_types.
2621 (resolve_fntype): Remove special treatment for module
2622 derived type functions.
2623 * trans-types.c (gfc_get_derived_type): Remove search for like
2624 derived types. Finish by copying back end declaration to like
2625 derived types in the derived type list gfc_derived_types.
2627 2007-03-17 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2630 * trans-expr.c (gfc_conv_powi): Make n argument unsigned hwi.
2631 (gfc_conv_cst_int_power): Handle integer exponent with care,
2632 since it might be too large for us.
2634 2007-03-17 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2637 * invoke.texi: Fix typo.
2639 2007-03-16 Tobias Burnus <burnus@net-b.de>
2641 * trans-decl.c (gfc_generate_function_code): Use all arguments of
2644 2007-03-15 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2646 * gfortran.h (gfc_option_t): Add flag_backtrace field.
2647 * lang.opt: Add -fbacktrace option.
2648 * invoke.texi: Document the new option.
2649 * trans-decl.c (gfc_build_builtin_function_decls): Add new
2650 option to the call to set_std.
2651 * options.c (gfc_init_options, gfc_handle_option): Handle the
2654 2007-03-15 Tobias Burnus <burnus@gcc.gnu.org>
2655 Paul Thomas <pault@gcc.gnu.org>
2658 * decl.c (gfc_match_import): If the parent of the current name-
2659 space is null, try looking for an imported symbol in the parent
2660 of the proc_name interface.
2661 * resolve.c (resolve_fl_variable): Do not check for blocking of
2662 host association by a same symbol, if the symbol is in an
2665 2007-03-15 Paul Thomas <pault@gcc.gnu.org>
2668 * decl.c (match_data_constant): Before going on to try to match
2669 a name, try to match a structure component.
2673 * resolve.c (resolve_actual_arglist): Do not reject a generic
2674 actual argument if it has a same name specific interface.
2677 * trans-array.c (parse_interface): Do not nullify allocatable
2678 components if the symbol has the saved attribute.
2680 2007-03-14 Francois-Xavier Coudert <coudert@clipper.ens.fr>
2682 * trans-array.c (gfc_trans_auto_array_allocation): Replace
2683 fold(convert()) by fold_convert().
2684 (gfc_duplicate_allocatable): Likewise.
2685 * trans-intrinsic.c (gfc_conv_intrinsic_dot_product): Use
2686 build_int_cst instead of converting an integer_zero_node
2689 2007-03-14 Jakub Jelinek <jakub@redhat.com>
2691 * module.c (mio_typespec): Don't look at ts->cl if not BT_CHARACTER.
2693 2007-03-13 Brooks Moses <brooks.moses@codesourcery.com>
2698 * intrinsics.texi (CHDIR): Fix argument names, note
2699 that STATUS must be a default integer.
2700 (CTIME): Fix argument names, note that RESULT must
2701 be a default integer.
2702 (EXIT): Note that STATUS must be a default integer.
2704 2007-03-13 Brooks Moses <brooks.moses@codesourcery.com>
2707 * intrinsic.texi: General whitespace cleanup, remove
2708 comment about missing intrinsics.
2709 (menu): Add lines for new entries listed below.
2710 (ACOSH): Mention specific function DACOSH, correct
2711 description phrasing.
2712 (ASINH): Mention specific function DASINH, correct
2713 description phrasing.
2714 (ATANH): Mention specific function DATANH, correct
2715 description phrasing.
2716 (COS): Add index entry for CCOS.
2717 (CPU_TIME): Correct "REAL" to "REAL(*)".
2718 (EXP): Add index entry for CEXP.
2719 (INT): Correct argument name to "A".
2723 (MAX): Add index entries for specific variants.
2724 (MCLOCK): New entry.
2725 (MCLOCK8): New entry.
2726 (SECNDS): Adjust to a more standard form.
2727 (SECOND): New entry.
2728 (TIME): Add cross-reference to MCLOCK.
2729 (TIME8): Add cross-reference to MCLOCK8.
2731 2007-03-11 Paul Thomas <pault@gcc.gnu.org>
2734 * parse.c (parse_interface): Use the default types from the
2735 formal namespace if a function or its result do not have a type
2736 after parsing the specification statements.
2738 2007-03-08 Brooks Moses <brooks.moses@codesourcery.com>
2740 * intrinsic.texi: (ICHAR) Improve internal I/O note.
2741 (ACHAR): Reference it.
2742 (CHAR): Reference it.
2743 (IACHAR): Reference it.
2745 2007-03-08 Brooks Moses <brooks.moses@codesourcery.com>
2747 * intrinsic.texi: (LINK) Document function form.
2753 2007-03-08 Brooks Moses <brooks.moses@codesourcery.com>
2755 * intrinsic.texi: minor typo fixes, removed prologue.
2756 (FSEEK): moved to correct place in alphabetical order.
2758 2007-03-08 Daniel Franke <franke.daniel@gmail.com>
2761 * check.c (gfc_check_alarm_sub): Added check for default integer
2762 kind of status argument.
2763 * iresolve.c (gfc_resolve_alarm_sub): Removed conversion of
2765 * intrinsic.texi (ALARM): Extended documentation.
2767 2007-03-08 Daniel Franke <franke.daniel@gmail.com>
2769 * intrinsic.texi (GERROR, ISATTY, TTYNAM): New.
2770 (ABORT, FLUSH, FNUM, IRAND, MALLOC, SIGNAL, SRAND): Fixed typo.
2771 * intrinsic.c (add_subroutines): Adjusted dummy argument names
2772 of GERROR and TTYNAM.
2774 2007-07-08 Tobias Burnus <burnus@net-b.de>
2776 * module.c (gfc_match_use): Support renaming of operators
2778 * gfortran.texi (Fortran 2003 Status): Document support of
2779 renaming of operators.
2781 2007-07-08 Tobias Burnus <burnus@net-b.de>
2784 * module.c (read_module): Always import module name as symbol.
2785 (gfc_match_use): Disallow module name in the only clause of
2788 2007-03-08 Paul Thomas <pault@gcc.gnu.org>
2791 * expr.c (find_array_section): Correct arithmetic for section
2794 2007-03-07 Brooks Moses <brooks.moses@codesourcery.com>
2796 * iresolve.c (gfc_resolve_ishftc): Correct s_kind value.
2798 2007-03-06 Daniel Franke <franke.daniel@gmail.com>
2800 PR documentation/30950
2801 * intrinsic.texi (AND, CPU_TIME): Fix dummy argument names.
2802 (FREE): Fix call syntax.
2804 2007-03-06 Brooks Moses <brooks.moses@codesourcery.com>
2806 * intrinsic.texi: Limit column widths to a total of .85.
2808 2007-03-05 Brooks Moses <brooks.moses@codesourcery.com>
2810 * gfortran.texi (GFortran and G77): Rewrite completely.
2812 2007-03-05 Brooks Moses <brooks.moses@codesourcery.com>
2814 * match.c (gfc_match_name): Expanded comment.
2816 2007-03-05 Brooks Moses <brooks.moses@codesourcery.com>
2818 * gfortran.texi (Old-style kind specifications): Document
2819 special handling of old-style kind specifiers for COMPLEX.
2820 * decl.c (gfc_match_old_kind_spec): Document kind/bytesize
2821 assumptions for COMPLEX in comment.
2823 2007-03-05 Brooks Moses <brooks.moses@codesourcery.com>
2826 * gfortranspec.c (lang_specific_driver): Update program
2827 name and copyright date.
2829 2007-03-03 Paul Thomas <pault@gcc.gnu.org>
2832 * check.c (dim_rank_check): The shape of subsections of
2833 assumed-size arrays is known.
2835 2007-03-02 Paul Thomas <pault@gcc.gnu.org>
2836 Tobias Burnus <burnus@net-b.de>
2839 * decl.c (gfc_match_entry): Remove erroneous entry result check.
2841 2007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
2843 * Make-lang.in: Add install-pdf target as copied from
2844 automake v1.10 rules.
2846 2007-03-01 Tobias Burnus <burnus@net-b.de>
2849 * trans-intrinsic.c (gfc_conv_intrinsic_size): Compare pointers.
2851 2007-02-28 Tobias Burnus <burnus@net-b.de>
2852 Paul Thomas <pault@gcc.gnu.org>
2856 * resolve.c (resolve_actual_arglist): Allow by-value
2857 arguments and non-default-kind for %VAL().
2858 * trans-expr.c (conv_arglist_function): Allow
2859 non-default-kind for %VAL().
2861 2007-02-28 Tobias Burnus <burnus@net-b.de>
2864 * primary.c (next_string_char): Correct reading a character
2865 after the delimiter.
2866 (match_string_constant): Print warning message only once.
2868 2007-02-27 Richard Guenther <rguenther@suse.de>
2870 * trans-array.c (structure_alloc_comps): Use correct type
2871 for null pointer constant.
2873 2007-02-26 Brooks Moses <brooks.moses@codesourcery.com>
2875 * gfortran.texi: Standardize title page, remove version number
2876 from copyright page.
2878 2007-02-26 Thomas Koenig <Thomas.Koenig@online.de>
2879 Paul Thomas <pault@gcc.gnu.org>
2882 * trans-intrinsic.c (gfc_conv_intrinsic_size):
2883 If dim is an optional argument, check for its
2884 presence and call size0 or size1, respectively.
2886 2007-02-23 Paul Thomas <pault@gcc.gnu.org>
2889 * resolve.c (has_default_initializer): New function.
2890 (resolve_fl_variable): Call has_default_initializer to determine if
2891 the derived type has a default initializer to its ultimate
2895 2007-02-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2897 * options.c (set_default_std_flags): New function to consolidate
2899 (gfc_init_options): Use new function.
2900 (gfc_handle_option): Use new function.
2902 2007-02-22 Brooks Moses <brooks.moses@codesourcery.com>
2904 * gfortran.texi (Old-style kind specifications): Document
2905 special handling of old-style kind specifiers for COMPLEX.
2906 * decl.c (gfc_match_old_kind_spec): Documented kind/bytesize
2907 assumptions in comment.
2909 2007-02-21 Bernhard Fischer <aldot@gcc.gnu.org>
2911 * parse.c (next_free): Gooble spaces after OpenMP sentinel.
2913 2007-02-20 Thomas Koenig <Thomas.Koenig@online.de>
2916 * match.c (gfc_match_iterator): Remove conflict between
2917 loop variable and pointer.
2919 2007-02-20 Tobias Burnus <burnus@net-b.de>
2922 * symbol.c (gfc_add_volatile): Allow to set VOLATILE
2923 attribute for host-associated variables.
2924 * gfortran.h (symbol_attribute): Save namespace
2925 where VOLATILE has been set.
2926 * trans-decl.c (gfc_finish_var_decl): Move variable
2927 declaration to the top.
2929 2007-02-20 Tobias Burnus <burnus@net-b.de>
2932 * resolve.c (resolve_symbol): Add character dummy VALUE check.
2934 2007-02-19 Thomas Koenig <Thomas.Koenig@online.de>
2937 * fortran/iresolve.c (gfc_resolve_maxloc): Remove coercion of
2938 argument to default integer.
2939 (gfc_resolve_minloc): Likewise.
2941 2007-02-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2944 * options.c (gfc_init_options): Relax warning level for obsolescent.
2945 * match.c (match_arithmetic_if): Change to obsolescent from deleted.
2946 (gfc_match_if): Same.
2948 2007-02-18 Roger Sayle <roger@eyesopen.com>
2950 * trans-array.c (gfc_build_constant_array_constructor): When the
2951 shape of the constructor is known, use that to construct the
2953 (gfc_trans_constant_array_constructor): Initialize the "info"
2954 information for all of the dimensions of the array constructor.
2955 (constant_array_constructor_loop_size): New function.
2956 (gfc_trans_array_constructor): Use it to determine whether a
2957 loop is suitable for "constant array constructor" optimization.
2959 * trans-intrinsic.c (gfc_conv_intrinsic_anyall): Use fold_build2
2960 instead of build2, to avoid conditions like "(a != b) != 0".
2962 2007-02-18 Roger Sayle <roger@eyesopen.com>
2963 Paul Thomas <pault@gcc.gnu.org>
2966 * match.c (match_forall_iterator): Use gfc_match_expr instead
2967 of gfc_match_variable to match the iterator variable. Return
2968 MATCH_NO if not a variable. Remove the reset of the symbol's
2971 2007-02-16 Tobias Burnus <burnus@net-b.de>
2974 * trans-decl.c (gfc_generate_function_code): Do not initialize
2975 pointers to derived components.
2977 2007-02-15 Sandra Loosemore <sandra@codesourcery.com>
2978 Brooks Moses <brooks.moses@codesourcery.com>
2979 Lee Millward <lee.millward@codesourcery.com>
2981 * trans-expr.c (gfc_conv_power_op): Use build_call_expr.
2982 (gfc_conv_string_tmp): Likewise.
2983 (gfc_conv_concat_op): Likewise.
2984 (gfc_build_compare_string): Likewise.
2985 (gfc_conv_function_call): Use build_call_list instead of build3.
2987 * trans-array.c (gfc_trans_allocate_array_storage): Use
2989 (gfc_grow_array): Likewise.
2990 (gfc_trans_array_ctor_element): Likewise.
2991 (gfc_trans_array_constructor_value): Likewise.
2992 (gfc_array_allocate): Likewise.
2993 (gfc_array_deallocate): Likewise.
2994 (gfc_trans_auto_array_allocation): Likewise.
2995 (gfc_trans_dummy_array_bias): Likewise.
2996 (gfc_conv_array_parameter): Likewise.
2997 (gfc_trans_dealloc_allocated): Likewise.
2998 (gfc_duplicate_allocatable): Likewise.
3000 * trans-openmp.c (gfc_trans_omp_barrier): Use build_call_expr.
3001 (gfc_trans_omp_flush): Likewise.
3003 * trans-stmt.c (gfc_conv_elementel_dependencies): Use build_call_expr.
3004 (gfc_trans_pause): Likewise.
3005 (gfc_trans_stop): Likewise.
3006 (gfc_trans_character_select): Likewise.
3007 (gfc_do_allocate): Likewise.
3008 (gfc_trans_assign_need_temp): Likewise.
3009 (gfc_trans_pointer_assign_need_temp): Likewise.
3010 (gfc_trans_forall_1): Likewise.
3011 (gfc_trans_where_2): Likewise.
3012 (gfc_trans_allocate): Likewise.
3013 (gfc_trans_deallocate): Likewise.
3015 * trans.c (gfc_trans_runtime_check): Use build_call_expr.
3017 * trans-io.c (gfc_trans_open): Use build_call_expr.
3018 (gfc_trans_close): Likewise.
3019 (build_filepos): Likewise.
3020 (gfc_trans_inquire): Likewise.
3021 (NML_FIRST_ARG): Delete.
3022 (NML_ADD_ARG): Delete.
3023 (transfer_namelist_element): Use build_call_expr.
3024 (build_dt): Likewise.
3025 (gfc_trans_dt_end): Likewise.
3026 (transfer_expr): Likewise.
3027 (transfer_array-desc): Likewise.
3029 * trans-decl.c (gfc_generate_function_code): Use build_call_expr.
3030 (gfc_generate_constructors): Likewise.
3032 * trans-intrinsic.c (gfc_conv_intrinsic_ctime): Use build_call_expr.
3033 (gfc_conv_intrinsic_fdate): Likewise.
3034 (gfc_conv_intrinsic_ttynam): Likewise.
3035 (gfc_conv_intrinsic_array_transfer): Likewise.
3036 (gfc_conv_associated): Likewise.
3037 (gfc_conv_intrinsic_si_kind): Likewise.
3038 (gfc_conv_intrinsic_trim): Likewise.
3039 (gfc_conv_intrinsic_repeat: Likewise.
3040 (gfc_conv_intrinsic_iargc): Likewise.
3042 2007-02-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3045 * scanner.c (gfc_next_char_literal): Add check for end of file after
3046 call to advance_line.
3048 2007-02-14 Steven G. Kargl <kargl@gcc.gnu.org>
3051 * primary.c (match_logical_constant): Return MATCH_ERROR on invalid
3054 2007-02-14 Steven G. Kargl <kargl@gcc.gnu.org>
3056 * misc.c (gfc_typename): Fix potential buffer overflow.
3058 2007-02-13 Paul Thomas <pault@gcc.gnu.org>
3061 * module.c (read_module): Set pointer_info to referenced if the
3062 symbol has no namespace.
3064 2007-02-12 Nick Clifton <nickc@redhat.com>
3066 * lang.opt: Add Warning attribute to warning options.
3068 2007-02-11 Daniel Franke <franke.daniel@gmail.com>
3070 * intrinsic.texi (HOSTNM): Fix typographical error in syntax.
3071 (SLEEP): Added section and documentation.
3073 2007-02-11 Tobias Schlüter <tobi@gcc.gnu.org>
3076 * decl.c (add_init_expr_to_sym): Remove ENUM specific code.
3077 (variable_decl): Likewise. Rewrap comment.
3078 (match_attr_spec): Remove ENUM specific code.
3079 (gfc_match_enum): Fix typo in error message.
3080 (enumerator_decl): New function.
3081 (gfc_match_enumerator_def): Use enumerator_decl instead of
3082 variable_decl. Adapt code accordingly.
3084 2007-02-11 Paul Thomas <pault@gcc.gnu.org>
3087 * module.c (find_symtree_for_symbol): New function to return
3088 a symtree that is not a "unique symtree" given a symbol.
3089 (read_module): Do not automatically set pointer_info to
3090 referenced because this inhibits the generation of a unique
3091 symtree. Recycle the existing symtree if possible by calling
3092 find_symtree_for_symbol.
3095 * decl.c (add_init_expr_to_sym): Make new charlen for an array
3096 constructor initializer.
3098 2007-02-10 Richard Henderson <rth@redhat.com>, Jakub Jelinek <jakub@redhat.com>
3100 * f95-lang.c (gfc_init_builtin_functions): Add __emutls_get_address
3101 and __emutls_register_common.
3102 * openmp.c (gfc_match_omp_threadprivate): Don't error if !have_tls.
3103 * trans-common.c (build_common_decl): Don't check have_tls.
3104 * trans-decl.c (gfc_finish_var_decl): Likewise.
3105 * types.def (BT_WORD, BT_FN_PTR_PTR): New.
3106 (BT_FN_VOID_PTR_WORD_WORD_PTR): New.
3108 2007-02-09 Tobias Burnus <burnus@net-b.de>
3111 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc,
3112 gfc_conv_intrinsic_minmaxval): Use HUGE-1 for most negative integer.
3114 2007-02-09 Francois-Xavier Coudert <coudert@clipper.ens.fr>
3117 * trans-array.c (gfc_trans_create_temp_array): Remove use of the
3118 function argument. Always generate code for negative extent.
3120 * trans-array.h (gfc_trans_create_temp_array): Change prototype.
3121 * trans-expr.c (gfc_conv_function_call): Remove use of last argument
3122 of gfc_trans_create_temp_array.
3123 * trans-intrinsic.c (gfc_conv_intrinsic_array_transfer): Likewise.
3124 * trans-stmt.c (gfc_conv_elemental_dependencies): Likewise.
3126 2007-02-08 Roger Sayle <roger@eyesopen.com>
3128 * trans-stmt.c (gfc_trans_forall_1): Optimize the cases where the
3129 mask expression is a compile-time constant (".true." or ".false.").
3131 2007-02-04 Francois-Xavier Coudert <coudert@clipper.ens.fr>
3134 * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Evaluate
3135 arguments only once. Generate check that NCOPIES argument is not
3138 2007-02-04 Steven G. Kargl <kargl@gcc.gnu.org>
3141 * fortran/invoke.texi: Update documentation.
3142 * fortran/options.c (gfc_post_options): Deal with tabs with -std=f2003
3145 2007-02-03 Kazu Hirata <kazu@codesourcery.com>
3147 * trans-array.c: Fix a comment typo.
3149 2007-02-03 Paul Thomas <pault@gcc.gnu.org>
3152 * array.c (match_array_element_spec): If the length of an array is
3153 negative, adjust the upper limit to make it zero length.
3156 * resolve.c (pure_function, resolve_function): Initialize name to
3157 null to clear up build warnings.
3158 (resolve_fl_variable): Look at components explicitly to check for
3159 default initializer, rather than using gfc_default_initializer.
3161 2007-02-02 Steven G. Kargl <kargl@gcc.gnu.org>
3164 * resolve.c (resolve_generic_f): Check for non-NULL sym.
3166 2007-02-02 Roger Sayle <roger@eyesopen.com>
3168 * trans.c (gfc_build_array_ref): Use STRIP_TYPE_NOPS to eliminate
3169 NON_LVALUE_EXPR nodes and useless type conversions.
3171 2007-02-02 Paul Thomas <pault@gcc.gnu.org>
3175 * trans-expr.c (gfc_conv_aliased_arg): Remove static attribute
3176 from function and make sure that substring lengths are
3178 (is_aliased_array): Remove static attribute.
3179 * trans.c : Add prototypes for gfc_conv_aliased_arg and
3181 * trans-io.c (set_internal_unit): Add the post block to the
3182 arguments of the function. Use is_aliased_array to check if
3183 temporary is needed; if so call gfc_conv_aliased_arg.
3184 (build_dt): Pass the post block to set_internal_unit and
3185 add to the block after all io activiy is done.
3187 2007-02-01 Roger Sayle <roger@eyesopen.com>
3189 * trans-array.c (gfc_conv_expr_descriptor): We don't need to use
3190 a temporary array to pass a constant non-character array constructor.
3191 Generalize the descriptor generation code to handle scalarizer
3192 "info" without an array reference.
3194 2007-02-01 Roger Sayle <roger@eyesopen.com>
3196 * dependency.c (gfc_check_dependency) <EXPR_ARRAY>: Implement
3197 dependency checking for array constructors.
3199 2007-02-01 Roger Sayle <roger@eyesopen.com>
3201 * trans-stmt.c (compute_overall_iter_number): Document function
3202 arguments. Generalize "unconditional forall nest with constant
3203 bounds" optimization to eliminate unconditional inner loops with
3206 2007-01-31 Tobias Burnus <burnus@net-b.de>
3209 * interface.c (compare_actual_formal): Check conformance between
3210 actual and VOLATILE dummy arguments.
3211 * symbol.c (gfc_add_volatile): Allow setting of VOLATILE
3212 multiple times in different scopes.
3213 * decl.c (gfc_match_volatile): Search symbol in host association.
3215 2007-01-31 Kazu Hirata <kazu@codesourcery.com>
3217 * simplify.c, trans-array.c: Fix comment typos.
3219 2007-01-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3221 * invoke.texi (Code Gen Options): Fix abbreviation typo.
3222 * intrinsic.texi (ACCESS, LSHIFT, RSHIFT): Fix typos.
3224 2007-01-30 Steve Ellcey <sje@cup.hp.com>
3227 * trans-types.c (gfc_get_function_type): Do not add void_type_node
3229 * trans-decl.c (create_function_arglist): Change assert.
3231 2007-01-29 Paul Thomas <pault@gcc.gnu.org>
3234 * module.c (read_module): If a symbol is excluded by an ONLY
3235 clause, check to see if there is a symtree already loaded. If
3236 so, attach the symtree to the pointer_info.
3238 2007-01-28 Thomas Koenig <Thomas.Koenig@online.de>
3241 * gfortran.h: Remove gfc_simplify_init_1.
3242 * arith.h: Remove third argument from gfc_compare_string.
3243 * arith.c (gfc_compare_expression): Remove third argument
3244 from call to gfc_compare_string.
3245 (gfc_compare_string): Remove third argument xcoll_table.
3246 Remove use of xcoll_table.
3247 * misc.c (gfc_init_1): Remove call to gfc_simplify_init_1.
3248 * simplify.c (ascii_table): Remove.
3249 (xascii_table): Likewise.
3250 (gfc_simplify_achar): ICE if extract_int fails. Remove use of
3251 ascii_table. Warn if -Wsurprising and value < 0 or > 127.
3252 (gfc_simplify_char): ICE if extract_int fails. Error if
3253 value < 0 or value > 255.
3254 (gfc_simplify_iachar): Remove use of xascii_table.
3255 Char values outside of 0..255 are an ICE.
3256 (gfc_simplify_lge): Remove use of xascii_table.
3257 (gfc_simplify_lgt): Likewise.
3258 (gfc_simplify_lle): Likewise.
3259 (gfc_simplify_llt): Likewise.
3260 (invert_table): Remove.
3261 (gfc_simplify_init_1): Remove.
3263 2007-01-27 Roger Sayle <roger@eyesopen.com>
3265 * trans-stmt.c (forall_info): Replace the next_nest and outer
3266 fields that previously implemented a doubly-linked list with a
3267 single prev_nest field (singly-linked list).
3268 (gfc_trans_nested_forall_loop): The nested_forall_info argument
3269 now denotes the innermost FORALL in the loop nest.
3270 (compute_overall_iter_number): Use prev_nest instead of next_nest.
3271 (gfc_trans_forall_1): Link/cons the new "info" to the head of the
3272 nested_forall_info linked list. Free the current "info" when done.
3274 2007-01-27 Paul Thomas <pault@gcc.gnu.org>
3277 * trans-expr.c (gfc_conv_operator_assign): New function.
3278 * trans.h : Add prototype for gfc_conv_operator_assign.
3279 * trans-stmt.c (gfc_trans_where_assign): Add a gfc_symbol for
3280 a potential operator assignment subroutine. If it is non-NULL
3281 call gfc_conv_operator_assign instead of the first assignment.
3282 ( gfc_trans_where_2): In the case of an operator assignment,
3283 extract the argument expressions from the code for the
3284 subroutine call and pass the symbol to gfc_trans_where_assign.
3285 resolve.c (resolve_where, gfc_resolve_where_code_in_forall,
3286 gfc_resolve_forall_body): Resolve the subroutine call for
3287 operator assignments.
3289 2007-01-26 Steven Bosscher <stevenb.gcc@gmail.com>
3290 Steven G. Kargl <kargl@gcc.gnu.org>
3293 * fortran/io.c (next_char): Deal with backslash escaped characters.
3294 Issue warnings in non -std=gnu cases.
3295 * fortran/primary.c (next_string_char): Issue warnings in non
3297 2007-01-26 Tobias Burnus <burnus@net-b.de>
3299 * lang-specs.h: Add support for .f03 and .F03 extensions.
3300 * gfortran.texi: Document .f03 extension.
3301 * options.c (form_from_filename): Recognize .f03.
3303 2007-01-25 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
3306 * lang.opt (Wall): Remove RejectNegative.
3307 * options.c (gfc_handle_option): Wall can be disabled.
3308 (set_Wall): Add a parameter for disabling Wall.
3310 2007-01-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3313 * scanner.c (load_line): Remove check fot ctrl-z and don't gobble.
3315 2007-01-23 Paul Thomas <pault@gcc.gnu.org>
3318 * match.c (gfc_match_namelist): Add check for assumed size character
3319 in namelist and provide error if found.
3321 2007-01-21 Brooks Moses <brooks.moses@codesourcery.com>
3323 * intrinsic.texi (ACHAR): Added cross-references.
3324 (CHAR): Put cross-references in alphabetical order.
3325 (IACHAR): Added cross-references.
3326 (ICHAR): Added cross-references.
3328 2007-01-20 Brooks Moses <brooks.moses@codesourcery.com>
3330 * intrinsic.texi: Edited all "Syntax" examples to a consistent form.
3331 (MAXVAL): Corrected description of result characteristics.
3333 (UMASK): Added documentation.
3335 2007-01-20 Steven G. Kargl <kargl@gcc.gnu.org>
3337 * openmp.c, matchexp.c, module.c, scanner.c, resolve.c, st.c,
3338 parse.c, primary.c, options.c, misc.c, simplify.c: Next installment
3339 in the massive whitespace patch.
3341 2007-01-20 Roger Sayle <roger@eyesopen.com>
3343 * module.c (mio_array_ref): The dimen_type fields of an array ref
3344 are an enumerated type and can't be read/written directly with a
3345 call to mio_integer. Instead loop over and cast each element.
3347 2007-01-20 Roger Sayle <roger@eyesopen.com>
3349 * dependency.c (gfc_full_array_ref_p): Check that ref->next is NULL,
3350 i.e. that the ARRAY_REF doesn't mention components.
3351 * trans-array.c (gfc_constant_array_constructor_p): Export external
3352 function renamed from constant_array_constructor_p.
3353 (gfc_build_constant_array_constructor): Export.
3354 (gfc_trans_array_constructor): Update call to the renamed function
3355 constant_array_constructor_p.
3356 * trans-array.h (gfc_constant_array_constructor_p): Prototype here.
3357 (gfc_build_constant_array_constructor): Likewise.
3358 * trans-expr.c (gfc_build_memcpy_call): New helper function split
3359 out from gfc_trans_array_copy.
3360 (gfc_trans_array_copy): Use gfc_build_memcpy_call.
3361 (gfc_trans_array_constructor_copy): New function to optimize
3362 assigning an entire array from a constant array constructor.
3363 (gfc_trans_assignment): Call gfc_trans_array_constructor_copy
3366 2007-01-20 Roger Sayle <roger@eyesopen.com>
3368 * trans-intrinsic.c (gfc_conv_intrinsic_sign): New branchless
3369 implementation for the SIGN intrinsic with integral operands.
3370 (gfc_conv_intrinsic_minmax): Fix whitespace.
3372 2007-01-20 Francois-Xavier Coudert <coudert@clipper.ens.fr>
3374 * gfortran.h (gfc_options_t): Add flag_allow_leading_underscore.
3375 * lang.opt: Add -fallow-leading-underscore.
3376 * match.c (gfc_match_name): Allow leading underscore in symbol
3377 name if -fallow-leading-underscore is used.
3378 * symbol.c (gfc_get_default_type): Add special case for symbol
3379 names beginning with an underscore.
3380 * trans-decl.c (gfc_get_extern_function_decl,
3381 gfc_build_intrinsic_function_decls): Add _gfortran prefix to
3382 library symbols selected_int_kind, selected_real_kind and
3384 * options.c (gfc_init_options, gfc_handle_option): Handle the
3385 new -fallow-leading-underscore option.
3387 2007-01-20 Francois-Xavier Coudert <coudert@clipper.ens.fr>
3390 * options.c (gfc_handle_module_path_options): Path used in -J
3391 option is now added to the module search path.
3393 2007-01-20 Richard Guenther <rguenther@suse.de>
3396 * f95-lang.c (gfc_init_builtin_functions): Provide cbrt and
3397 cexpi builtins if we have TARGET_C99_FUNCTIONS. Provide
3398 sincos builtins if the target has sincos.
3400 2007-01-19 Brooks Moses <brooks.moses@codesourcery.com>
3402 * intrinsic.texi (MATMUL): Corrected a typo.
3403 (MAX): Separated @var arguments.
3404 (MIN): Separated @var arguments.
3406 2007-01-19 Brooks Moses <brooks.moses@codesourcery.com>
3408 * intrinsic.texi: general whitespace cleanup.
3409 (menu): Added TIME8, removed UNMASK.
3410 (AINT): Clarified argument requirement.
3411 (ANINT): Clarified argument requirement.
3412 (CEILING): Clarified argument requirement.
3413 (CHAR): Clarified argument requirement.
3414 (CMPLX): Clarified argument requirement.
3415 (DCMPLX): Clarified argument requirement.
3416 (FGET): Line rewrapping.
3417 (FLOOR): Clarified argument requirement.
3418 (GMTIME): Added documentation.
3419 (IAND): Added cross-reference.
3420 (IBCLR): Added cross-reference.
3421 (IBSET): Added cross-reference.
3422 (IEOR): Added cross-reference.
3423 (INT): Collapsed examples, clarified argument requirement.
3424 (IOR): Added cross-references.
3425 (LEN_TRIM): Corrected result kind.
3426 (LINK): Added cross-reference.
3427 (LLT): Removed "documentation pending".
3428 (LOGICAL): Added documentation.
3429 (LSHIFT): Added documentation.
3430 (LTIME): Added documentation.
3431 (MATMUL): Added documentation.
3432 (MAX): Added documentation.
3433 (MAXLOC): Added documentation.
3434 (MAXVAL): Added documentation.
3435 (MERGE): Added documentation.
3436 (MIN): Added documentation.
3437 (MINLOC): Added documentation.
3438 (MINVAL): Added documentation.
3439 (MVBITS): Moved to correct place, added documentation.
3440 (NOT): Added documentation.
3441 (PERROR): Added documentation.
3442 (RAN): Moved to correct place, added documentation.
3443 (REAL): Clarified argument requirement.
3444 (RENAME): Added documentation.
3445 (RSHIFT): Clarified argument requirement.
3446 (SIGN): Corrected table specification.
3447 (SYMLNK): Added documentation.
3448 (SYSTEM): Added documentation.
3449 (TIME): Added documentation.
3450 (TIME8): Added section and documentation.
3451 (UNMASK): Removed erroneous section.
3453 2007-01-18 H.J. Lu <hongjiu.lu@intel.com>
3455 * trans-stmt.c (compute_overall_iter_number): Fix a typo.
3457 2007-01-18 Roger Sayle <roger@eyesopen.com>
3459 * trans-expr.c (copyable_array_p): Consider user derived types without
3460 allocatable components to be copyable.
3462 2007-01-18 Roger Sayle <roger@eyesopen.com>
3464 * trans-stmt.c (compute_overall_iter_number): Enhance to precompute
3465 the number of interations in unconditional FORALL nests with constant
3468 2007-01-18 Francois-Xavier Coudert <coudert@clipper.ens.fr>
3469 Tobias Burnus <burnus@net-b.de>
3472 * gfortran.h (gfc_option_t): Add flag_dump_core.
3473 * lang.opt: Add -fdump-core option.
3474 * invoke.texi: Document the new options.
3475 * trans-decl.c (gfc_build_builtin_function_decls): Add new
3476 options to the call to set_std.
3477 * options.c (gfc_init_options, gfc_handle_option): Set the
3480 2007-01-17 Paul Thomas <pault@gcc.gnu.org>
3483 * module.c (load_generic_interfaces): Make the marking of the
3484 symbol as ambiguous conditional on the module names being
3486 (write_generic): Ensure that the generic interface has a
3487 non-NULL module field.
3489 2007-01-16 Roger Sayle <roger@eyesopen.com>
3492 * trans-stmt.c (forall_info): Remove pmask field.
3493 (gfc_trans_forall_loop): Remove NVAR argument, instead assume that
3494 NVAR covers all the interation variables in the current forall_info.
3495 Add an extra OUTER parameter, which specified the loop header in
3496 which to place mask index initializations.
3497 (gfc_trans_nested_forall_loop): Remove NEST_FLAG argument.
3498 Change the semantics of MASK_FLAG to only control the mask in the
3500 (compute_overall_iter_number): Optimize the trivial case of a
3501 top-level loop having a constant number of iterations. Update
3502 call to gfc_trans_nested_forall_loop. Calculate the number of
3503 times the inner loop will be executed, not to size of the
3505 (allocate_temp_for_forall_nest_1): Reuse SIZE as BYTESIZE when
3506 sizeof(type) == 1. Tidy up.
3507 (gfc_trans_assign_need_temp): Remove NEST_FLAG argument from calls
3508 to gfc_trans_nested_forall_loop.
3509 (gfc_trans_pointer_assign_need_temp): Likewise.
3510 (gfc_trans_forall_1): Remove unused BYTESIZE, TMPVAR, SIZEVAR and
3511 LENVAR local variables. Split mask allocation into a separate
3512 hunk/pass from mask population. Use allocate_temp_for_forall_nest
3513 to allocate the FORALL mask with the correct size. Update calls
3514 to gfc_trans_nested_forall_loop.
3515 (gfc_evaluate_where_mask): Update call to
3516 gfc_trans_nested_forall_loop.
3517 (gfc_trans_where_2): Likewise.
3519 2007-01-15 Paul Thomas <pault@gcc.gnu.org>
3522 * trans-stmt.c (gfc_trans_call): If it does not have one, get
3523 a backend_decl for an alternate return.
3526 * resolve.c (pure_function): Statement functions are pure. Note
3527 that this will have to recurse to comply fully with F95.
3530 * resolve.c (resolve_function): Only a reference to the final
3531 dimension of an assumed size array is an error in an inquiry
3535 * resolve.c (resolve_function): Make sure that the function
3536 expression has a type.
3538 2007-01-14 Paul Thomas <pault@gcc.gnu.org>
3541 * trans-decl.c (gfc_sym_mangled_function_id): Module, external
3542 symbols must not have the module name prepended.
3544 2007-01-11 Thomas Koenig <Thomas.Koenig@online.de>
3547 * iresolve.c (gfc_resolve_maxloc): If the rank
3548 of the return array is nonzero and we process an
3549 integer array smaller than default kind, coerce
3550 the array to default integer.
3551 * iresolve.c (gfc_resolve_minloc): Likewise.
3553 2007-01-11 Brooks Moses <brooks.moses@codesourcery.com>
3555 * simplify.c: Update copyright to 2007.
3558 2007-01-11 Francois-Xavier Coudert <coudert@clipper.ens.fr>
3561 * scanner.c (gfc_release_include_path): Free gfc_option.module_dir
3564 2007-01-09 Brooks Moses <brooks.moses@codesourcery.com>
3566 * simplify.c (gfc_simplify_ibclr): Fix POS comparison.
3567 (gfc_simplify_ibset): Same.
3569 2007-01-09 Brooks Moses <brooks.moses@codesourcery.com>
3573 * simplify.c (convert_mpz_to_unsigned): New function.
3574 (convert_mpz_to_signed): New function, largely based on
3576 (twos_complement): Removed.
3577 (gfc_simplify_ibclr): Add conversions to and from an
3578 unsigned representation before bit-twiddling.
3579 (gfc_simplify_ibset): Same.
3580 (gfc_simplify_ishftc): Add checks for overly large
3581 constant arguments, only check the third argument if
3582 it's present, carry over high bits into the result as
3583 appropriate, and perform the final conversion back to
3584 a signed representation using the correct sign bit.
3585 (gfc_simplify_not): Removed unnecessary masking.
3587 2007-01-09 Paul Thomas <pault@gcc.gnu.org>
3590 * resolve.c (resolve_code): Use the code->expr character length
3591 directly to set length of llen.
3593 2007-01-09 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3596 * lang.opt: Add Wcharacter_truncation option.
3597 * options.c (gfc_init_options): Initialize
3598 gfc_option.warn_character_truncation to zero.
3599 (gfc_handle_option): Add case for OPT_Wcharacter_truncation.
3601 2007-01-08 Steven G. Kargl <kargl@gcc.gnu.org>
3603 * interface.c, intrinsic.c, gfortranspec.c, io.c, f95-lang.c,
3604 iresolve.c, match.c: Update Copyright years. Whitespace.
3606 2007-01-08 Richard Guenther <rguenther@suse.de>
3608 * trans-io.c (transfer_array_desc): Use build_int_cst instead
3611 2007-01-08 Roger Sayle <roger@eyesopen.com>
3613 * trans-array.c (constant_array_constructor_p): New function to
3614 determine whether an array constructor consists only of constant
3615 elements, and if so return it's size.
3616 (gfc_build_constant_array_constructor): Construct a statically
3617 initialized gfortran array for a given EXPR_ARRAY.
3618 (gfc_trans_constant_array_constructor): Efficiently scalarize
3619 a constant array constructor.
3620 (gfc_trans_array_constructor): Tidy up use of CONST_STRING.
3621 Special case scalarization of constant array constructors, all of
3622 whose elements are specified, using constant_array_constructor_p
3623 and gfc_trans_constant_array_constructor.
3624 (gfc_conv_scalarized_array_ref): Check whetger info->offset is zero
3625 before adding it to index, to avoid creating a NON_LVALUE_EXPR.
3627 2007-01-08 Kazu Hirata <kazu@codesourcery.com>
3629 gfortran.texi: Fix typos.
3631 2007-01-07 Steven G. Kargl <kargl@gcc.gnu.org>
3633 * decl.c, dump-parse-tree.c, error.c, data.c, expr.c, dependency.c,
3634 convert.c: Update Copyright dates. Fix whitespace.
3636 2007-01-07 Bernhard Fischer <aldot@gcc.gnu.org>
3638 * data.c (gfc_assign_data_value): Fix whitespace.
3640 2007-01-07 Bernhard Fischer <aldot@gcc.gnu.org>
3642 * trans-array.c (gfc_trans_create_temp_array, gfc_array_init_size):
3643 Commentary typo fix.
3645 2007-01-07 Bernhard Fischer <aldot@gcc.gnu.org>
3648 * match.c (gfc_match_name): Print diagnostics for invalid
3651 2007-01-06 Steven G. Kargl <kargl@gcc.gnu.org>
3653 * array.c: Fix whitespace in comment table.
3655 2007-01-06 Steven G. Kargl <kargl@gcc.gnu.org>
3657 * array.c, bbt.c, check.c: Update copyright years. Whitespace.
3659 2007-01-06 Steven G. Kargl <kargl@gcc.gnu.org>
3661 * arith.c: Update copyright years. Whitespace.
3663 2007-01-05 Roger Sayle <roger@eyesopen.com>
3665 * trans-expr.c (gfc_trans_assignment_1): New subroutine to scalarize
3666 array assignments split out from gfc_trans_assignment.
3667 (gfc_trans_array_copy): New function to implement array to array
3668 copies via calls to __builtin_memcpy.
3669 (copyable_array_p): New helper function to identify an array of
3670 simple/POD types, that may be copied/assigned using memcpy.
3671 (gfc_trans_assignment): Use gfc_trans_array_copy to handle simple
3672 whole array assignments considered suitable by copyable_array_p.
3673 Invoke gfc_trans_assignment_1 to perform the fallback scalarization.
3675 2007-01-05 Roger Sayle <roger@eyesopen.com>
3677 * trans-array.c (gfc_trans_array_constructor_value): Make the
3678 static const "data" array as TREE_READONLY.
3679 * trans-stmt.c (gfc_trans_character_select): Likewise.
3681 2007-01-05 Roger Sayle <roger@eyesopen.com>
3683 * trans-array.c (gfc_conv_loop_setup): Test whether the loop
3684 stride is one, to avoid fold_build2 introducing a useless
3685 NON_LVALUE_EXPR node.
3687 2007-01-05 Tobias Burnus <burnus@net-b.de>
3689 * symbol.c (check_conflict): Fix error message.
3691 2007-01-05 Paul Thomas <pault@gcc.gnu.org>
3694 * decl.c (gfc_in_match_data, gfc_set_in_match_data): New
3695 functions to signal that a DATA statement is being matched.
3696 (gfc_match_data): Call gfc_set_in_match_data on entry and on
3698 * gfortran.h : Add prototypes for above.
3699 * expr.c (check_init_expr): Avoid check on parameter or
3700 variable if gfc_in_match_data is true.
3701 (gfc_match_init_expr): Do not call error on non-reduction of
3702 expression if gfc_in_match_data is true.
3706 * decl.c (gfc_set_constant_character_len): Add boolean arg to
3707 flag array constructor resolution. Warn if string is being
3708 truncated. Standard dependent error if string is padded. Set
3709 new arg to false for all three calls to
3710 gfc_set_constant_character_len.
3711 * match.h : Add boolean arg to prototype for
3712 gfc_set_constant_character_len.
3713 * gfortran.h : Add warn_character_truncation to gfc_options.
3714 * options.c (set_Wall): Set warn_character_truncation if -Wall
3716 * resolve.c (resolve_code): Warn if rhs string in character
3717 assignment has to be truncated.
3718 * array.c (gfc_resolve_character_array_constructor): Set new
3719 argument to true for call to gfc_set_constant_character_len.
3721 2007-01-05 Tobias Burnus <burnus@net-b.de>
3724 * interface.c (compare_parameter_intent): New function.
3725 (check_intents): Support pointer intents.
3726 * symbol.c (check_conflict): Support pointer intents,
3727 better conflict_std message.
3728 * expr.c (gfc_check_assign,gfc_check_pointer_assign):
3729 Support pointer intents.
3730 * resolve.c (resolve_deallocate_expr,resolve_allocate_expr):
3731 Support pointer intents.
3733 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
3736 * check.c (gfc_check_kill_sub): Add checks for non-scalar
3739 2007-01-04 Brooks Moses <brooks.moses@codesourcery.com>
3741 * intrinsic.texi: Minor cleanup, reflowing overlong
3742 paragraphs, and correcting whitespace.
3744 2007-01-04 Brooks Moses <brooks.moses@codesourcery.com>
3746 * intrinsic.texi (LBOUND): Add documentation.
3747 (LGE): Add documentation.
3748 (LGT): Add documentation.
3749 (LINK): Add documentation.
3750 (LLE): Add documentation.
3751 (LLT): Add documentation.
3752 (LNBLNK): Add documentation.
3753 (UBOUND): Add documentation.
3754 (UNLINK): Add documentation.
3756 2007-01-04 Brooks Moses <brooks.moses@codesourcery.com>
3758 * intrinsic.texi (IAND): Clarify argument specifications.
3759 (IBCLR): Add documentation.
3760 (IBITS): Add documentation.
3761 (IBSET): Add documentation.
3762 (IEOR): Add documentation.
3763 (IERRNO): Add documentation.
3764 (INDEX): Add documentation.
3765 (IOR): Add documentation.
3766 (ISHFT): Add documentation.
3767 (ISHFTC): Add documentation.
3768 (KILL): Add documentation.
3769 (LEN_TRIM): Add documentation.
3771 2007-01-04 Brooks Moses <brooks.moses@codesourcery.com>
3774 * interface.c (compare_actual_formal): check for
3775 alternate returns when iterating over non-present
3778 2007-01-04 Brooks Moses <brooks.moses@codesourcery.com>
3780 * invoke.texi: Update manpage copyright to include 2007.
3782 2007-01-04 Brooks Moses <brooks.moses@codesourcery.com>
3784 * gfortran.texi: Update copyright to include 2007.
3785 * intrinsic.texi: Update copyright to include 2007.
3786 * invoke.texi: Update copyright to include 2007.
3788 2007-01-02 Tobias Burnus <burnus@net-b.de>
3789 Jakub Jelinek <jakub@redhat.com>
3792 * scanner.c (open_included_file): Revert patch.
3793 (gfc_open_included_file): Support absolute pathnames.
3794 (gfc_open_intrinsic_module): Support absolute pathnames.
3796 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
3798 * gfortran.texi (GNU Fortran and GCC): Rewrite
3800 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
3802 * gfortran.texi (Introduction): Lower "Part I:
3803 Introduction" to a chapter, renumber Parts II and III to
3805 * intrinsic.texi (Introduction): Rename to "Introduction
3806 to Intrinsics" to avoid conflict with the new chapter.
3808 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
3810 * intrinsic.texi (Introduction): Rewrite first paragraph.
3812 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
3814 * invoke.texi (OpenMP): Added index entry.
3815 * gfortran.texi (title page): Removed erroneous '*'.
3817 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
3819 * gfortran.texi (GFORTRAN_DEFAULT_RECL): Added units
3821 (Extensions): Miscellaneous minor rewriting and copyediting.
3822 (BOZ-literal constants): Renamed from Hexadecimal constants.
3823 (Hollerith constants support): Added explanation and
3824 suggestions for standard-conforming modern equivalents.
3826 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
3828 * intrinsic.texi: Improvements to index entries; change
3829 @findex entries to @cindex entries.
3830 * invoke.texi: Standardize and improve index entries.
3831 * gfortran.texi: Fix @code in one index entry.
3833 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
3835 * invoke.texi: Change @code-type macros to appropriate
3836 variants (@command, @option, etc.)
3837 * gfortran.texi: Same.
3839 2007-01-03 Brooks Moses <brooks.moses@codesourcery.com>
3841 * intrinsic.texi: Various minor cleanups.
3843 2007-01-02 Steven G. Kargl <kargls@comcast.net>
3845 * trans-intrinsic.c (gfc_conv_intrinsic_ibits): Fix call to
3848 2007-01-02 Tobias Burnus <burnus@net-b.de>
3851 * scanner.c (open_included_file): Support full-path filenames.
3853 2007-01-02 Paul Thomas <pault@gcc.gnu.org>
3856 * interface.c (check_sym_interfaces): Remove call to
3857 resolve_global_procedure.
3858 gfortran.h : Remove prototype for resolve_global_procedure.
3859 resolve.c (resolve_global_procedure): Add static attribute
3860 to function declaration.
3862 2007-01-01 Steven G. Kargl <kargls@comcast.net>
3864 * ChangeLog: Copy to ...
3865 * ChangeLog-2006: here.