OSDN Git Service

PR fortran/30964
[pf3gnuchains/gcc-fork.git] / gcc / fortran / ChangeLog
1 2007-08-12  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2
3         PR fortran/30964
4         PR fortran/33054
5         * trans-expr.c (gfc_conv_function_call): When no formal argument
6         list is available, we still substitute missing optional arguments.
7         * check.c (gfc_check_random_seed): Correct the check on the
8         number of arguments to RANDOM_SEED.
9         * intrinsic.c (add_subroutines): Add a resolution function to
10         RANDOM_SEED.
11         * iresolve.c (gfc_resolve_random_seed): New function.
12         * intrinsic.h (gfc_resolve_random_seed): New prototype.
13
14 2007-08-12  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
15
16         PR fortran/32860
17         * error.c (error_uinteger): New function.
18         (error_integer): Call error_uinteger.
19         (error_print): Handle %u, %lu, %li and %ld format specifiers.
20         * interface.c (compare_actual_formal): Use the new %lu specifier.
21
22 2007-08-12  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
23
24         PR fortran/31629
25         * lang.opt (-fmodule-private): New option.
26         * gfortran.h (gfc_option_t): Add flag_module_private member.
27         * invoke.texi (-fmodule-private): Document the new option.
28         * module.c (gfc_check_access): Allow the -fmodule-private option
29         to modify the default behaviour.
30         * options.c (gfc_init_options): Initialize flag_module_private.
31         (gfc_handle_option): Handle -fmodule-private.
32
33 2007-08-12  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
34
35         PR fortran/29600
36         * intrinsic.c (add_functions): Add KIND arguments to COUNT,
37         IACHAR, ICHAR, INDEX, LBOUND, LEN, LEN_TRIM, SCAN, SIZE, UBOUND
38         and VERIFY.
39         * iresolve.c (gfc_resolve_count): Add kind argument.
40         (gfc_resolve_iachar): New function.
41         (gfc_resolve_ichar): Add kind argument.
42         (gfc_resolve_index_func): Likewise.
43         (gfc_resolve_lbound): Likewise.
44         (gfc_resolve_len): Likewise.
45         (gfc_resolve_len_trim): Likewise.
46         (gfc_resolve_scan): Likewise.
47         (gfc_resolve_size): New function.
48         (gfc_resolve_ubound): Add kind argument.
49         (gfc_resolve_verify): Likewise.
50         * trans-decl.c (gfc_get_extern_function_decl): Allow specific
51         intrinsics to have 4 arguments.
52         * check.c (gfc_check_count): Add kind argument.
53         (gfc_check_ichar_iachar): Likewise.
54         (gfc_check_index): Likewise.
55         (gfc_check_lbound): Likewise.
56         (gfc_check_len_lentrim): New function.
57         (gfc_check_scan): Add kind argument.
58         (gfc_check_size): Likewise.
59         (gfc_check_ubound): Likewise.
60         (gfc_check_verify): Likewise.
61         * intrinsic.texi: Update documentation for COUNT, IACHAR, ICHAR,
62         INDEX, LBOUND, LEN, LEN_TRIM, SCAN, SIZE, UBOUND and VERIFY.
63         * simplify.c (get_kind): Whitespace fix.
64         (int_expr_with_kind): New function.
65         (gfc_simplify_iachar): Add kind argument.
66         (gfc_simplify_iachar): Likewise.
67         (gfc_simplify_ichar): Likewise.
68         (gfc_simplify_index): Likewise.
69         (simplify_bound_dim): Likewise.
70         (simplify_bound): Likewise.
71         (gfc_simplify_lbound): Likewise.
72         (gfc_simplify_len): Likewise.
73         (gfc_simplify_len_trim): Likewise.
74         (gfc_simplify_scan): Likewise.
75         (gfc_simplify_shape): Pass NULL as kind argument to gfc_simplify_size.
76         (gfc_simplify_size): Add kind argument.
77         (gfc_simplify_ubound): Likewise.
78         (gfc_simplify_verify): Likewise.
79         * intrinsic.h: Update prototypes and add new ones.
80         * trans-intrinsic.c (gfc_conv_intrinsic_index): Rename into
81         gfc_conv_intrinsic_index_scan_verify.
82         (gfc_conv_intrinsic_scan, gfc_conv_intrinsic_verify): Remove.
83         (gfc_conv_intrinsic_function): Call
84         gfc_conv_intrinsic_index_scan_verify to translate the INDEX,
85         SCAN and VERIFY intrinsics.
86
87 2007-08-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
88
89         PR fortran/31189
90         * invoke.texi (-fbacktrace): Document the new behaviour.
91
92 2007-08-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
93
94         PR fortran/32937
95         * trans-array.c (gfc_conv_expr_descriptor): Use
96         gfc_conv_const_charlen to generate backend_decl of right type.
97         * trans-expr.c (gfc_conv_expr_op): Use correct return type.
98         (gfc_build_compare_string): Use int type instead of default
99         integer kind for single character comparison.
100         (gfc_conv_aliased_arg): Give backend_decl the right type.
101         * trans-decl.c (gfc_build_intrinsic_function_decls): Make
102         compare_string return an int.
103
104 2007-08-11  Ian Lance Taylor  <iant@google.com>
105
106         * f95-lang.c (gfc_get_alias_set): Change return type to
107         alias_set_type.
108
109 2007-08-10  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
110
111         PR fortran/31270
112         * trans.c (gfc_trans_runtime_check): Reorder arguments and
113         add extra variable arguments. Hand them to the library function.
114         * trans.h (gfc_trans_runtime_check): Update prototype.
115         * trans-array.c (gfc_trans_array_bound_check): Issue more
116         detailled error messages.
117         (gfc_conv_array_ref): Likewise.
118         (gfc_conv_ss_startstride): Likewise.
119         (gfc_trans_dummy_array_bias): Reorder arguments to
120         gfc_trans_runtime_check.
121         * trans-expr.c (gfc_conv_substring): Issue more detailled
122         error messages.
123         (gfc_conv_function_call): Reorder arguments to gfc_trans_runtime_check.
124         * trans-stmt.c (gfc_trans_goto): Likewise.
125         * trans-io.c (set_string): Reorder arguments to
126         gfc_trans_runtime_check and issue a more detailled error message.
127         * trans-decl.c (gfc_build_builtin_function_decls): Make
128         runtime_error and runtime_error_at handle a variable number of
129         arguments.
130         * trans-intrinsic.c (gfc_conv_intrinsic_bound): Reorder arguments
131         to gfc_trans_runtime_check.
132         (gfc_conv_intrinsic_minmax): Likewise.
133         (gfc_conv_intrinsic_repeat): Issue more detailled error messages.
134
135 2007-08-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
136
137         * gfortranspec.c (lang_specific_driver): Use CONST_CAST.
138         * options.c (gfc_post_options): Likewise.
139         * parse.c (parse_omp_structured_block): Likewise.
140         * st.c (gfc_free_statement): Likewise.
141
142 2007-08-10  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
143
144         PR fortran/32933
145         * trans-decl.c (gfc_build_builtin_function_decls): Change
146         prototype for associated.
147         * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Convert the
148         result of __builtin_isnan into a boolean.
149         (gfc_conv_intrinsic_strcmp): Cleanup.
150         (gfc_conv_associated): Convert the result of the associated
151         function into a boolean.
152
153 2007-08-09  Tobias Burnus  <burnus@net-b.de>
154
155         PR fortran/32987
156         * io.c (format_token): Add FMT_ERROR.
157         (next_char_not_space): Print error/warning when
158         '\t' are used in format specifications.
159         (format_lex): Propagate error.
160         (check_format): Ditto.
161
162 2007-08-09  Tobias Burnus  <burnus@net-b.de>
163
164         PR fortran/33001
165         * arith.c (arith_error): Point in the error message
166         to -fno-range-check.
167
168 2007-08-09  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
169
170         PR fortran/32902
171         * intrinsic.texi (SIZEOF): Add mention to C_SIZE_T.
172
173 2007-08-06  Christopher D. Rickett  <crickett@lanl.gov>
174
175         PR fortran/32732
176         * trans-expr.c (gfc_conv_scalar_char_value): Convert the tree and
177         actual arg expressions for scalar characters passed by-value to
178         bind(c) routines.
179         (gfc_conv_function_call): Call gfc_conv_scalar_char_value.
180         * trans.h: Add prototype for gfc_conv_scalar_char_value.
181         * trans-decl.c (generate_local_decl): Convert by-value character
182         dummy args of bind(c) procedures using
183         gfc_conv_scalar_char_value.
184
185 2007-08-06  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
186
187         PR fortran/30947
188         * iresolve.c (gfc_resolve_alarm_sub): Suffix the subroutine name
189         with the kind of the STATUS argument.
190
191 2007-08-06  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
192
193         PR fortran/30948
194         * intrinsic.c (add_functions): Fix name of argument to CHDIR.
195
196 2007-08-06  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
197
198         PR fortran/30933
199         * iresolve.c (gfc_resolve_exit): Convert argument to default
200         integer kind.
201
202 2007-08-06  Daniel Franke  <franke.daniel@gmail.com>
203
204         * resolve.c (derived_pointer): Removed, replaced callers by access 
205         to appropiate attribute bit.
206         (derived_inaccessable): Shortcut recursion depth.
207         (resolve_fl_namelist): Fixed checks for private components in namelists.
208
209 2007-08-06  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
210
211         PR fortran/29828
212         * trans.h (gfor_fndecl_string_minmax): New prototype.
213         * trans-decl.c (gfor_fndecl_string_minmax): New variable.
214         (gfc_build_intrinsic_function_decls): Create gfor_fndecl_string_minmax.
215         * check.c (gfc_check_min_max): Allow for character arguments.
216         * trans-intrinsic.c (gfc_conv_intrinsic_minmax_char): New function.
217         (gfc_conv_intrinsic_function): Add special case for MIN and MAX
218         intrinsics with character arguments.
219         * simplify.c (simplify_min_max): Add simplification for character
220         arguments.
221
222 2007-08-06  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
223
224         PR fortran/31612
225         * invoke.texi: Adjust documentation for option -fsyntax-only.
226
227 2007-08-05  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
228             Tobias Burnus  <burnus@gcc.gnu.org>
229
230         PR fortran/32979
231         * intrinsic.h (gfc_check_isnan): Add prototype.
232         * gfortran.h (gfc_isym_id): Add GFC_ISYM_ISNAN.
233         * intrinsic.c (add_functions): Add ISNAN intrinsic.
234         * check.c (gfc_check_isnan): New function.
235         * trans-intrinsic.c (gfc_conv_intrinsic_isnan): New function.
236         (gfc_conv_intrinsic_function): Call gfc_conv_intrinsic_isnan
237         to translate ISNAN.
238         * intrinsic.texi: Document ISNAN.
239
240 2007-08-04  Paul Thomas  <pault@gcc.gnu.org>
241
242         PR fortran/31214
243         * symbol.c (get_unique_symtree): Moved from module.c.
244         * module.c (get_unique_symtree): Moved to symbol.c.
245         * decl.c (get_proc_name): Transfer the typespec from the local
246         symbol to the module symbol, in the case that an entry is also
247         a module procedure.  Ensure the local symbol is cleaned up by
248         pointing to it with a unique symtree.
249
250         * dump_parse_tree (gfc_show_code_node): Add EXEC_ASSIGN_CALL.
251
252 2008-08-04  Steven G. Kargl  <kargl@gcc.gnu.org>
253
254         PR fortran/32969
255         * iresolve.c (gfc_resolve_rrspacing): Convert argument(s) to
256         expected KIND.
257         (gfc_resolve_scale): Ditto.
258         (gfc_resolve_set_exponent): Ditto.
259         (gfc_resolve_spacing): Ditto.
260  
261         PR fortran/32968
262         * trans-intrinsic.c (gfc_conv_intrinsic_si_kind,
263         gfc_conv_intrinsic_sr_kind): Convert the argument(s) to the
264         expected KIND, and fold the result to the expected KIND.
265
266 2007-08-03  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
267
268         PR fortran/31202
269         * f95-lang.c (gfc_init_builtin_functions): Defin builtins for 
270         lround{f,,l} and llround{f,,l}.
271         * trans-intrinsic.c (build_fix_expr): Generate calls to the
272         {l,}round{f,,l} functions.
273
274 2007-08-01  Thomas Koenig  <tkoenig@gcc.gnu.org>
275
276         PR libfortran/32954
277         * intrinsic.c (resolve_mask_arg):  New function.
278         (gfc_resolve_maxloc):  Use resolve_mask_arg for mask resolution.
279         (gfc_resolve_maxval):  Likewise.
280         (gfc_resolve_minloc):  Likewise.
281         (gfc_resolve_minval):  Likewise.
282         (gfc_resolve_pack):  Likewise.
283         (gfc_resolve_product):  Likewise.
284         (gfc_resolve_sum):  Likewise.
285         (gfc_resolve_unpack):  Likewise.
286
287 2007-08-01  Tobias Burnus  <burnus@net-b.de>
288
289         PR fortran/32936
290         * match.c (gfc_match_allocate): Better check that STAT is
291         a variable.
292
293         * check.c (gfc_check_allocated): Reorder checks to improve
294         error message.
295
296 2007-08-01  Nick Clifton  <nickc@redhat.com>
297
298         * arith.c: Change copyright header to refer to version 3 of the
299         GNU General Public License and to point readers at the COPYING3
300         file and the FSF's license web page.
301         * openmp.c, interface.c, intrinsic.c, trans-array.c, trans-expr.c,
302         symbol.c, iso-fortran-env.def, intrinsic.h, decl.c, trans-array.h,
303         matchexp.c, dump-parse-tree.c, trans-common.c, array.c,
304         Make-lang.in, trans-openmp.c, gfortran.h, error.c,
305         iso-c-binding.def, lang.opt, data.c, trans-const.c, trans-stmt.c,
306         expr.c, trans-const.h, trans-stmt.h, module.c, trans.c, scanner.c,
307         trans-types.c, trans.h, gfortranspec.c, trans-types.h,
308         lang-specs.h, io.c, bbt.c, resolve.c, f95-lang.c, st.c,
309         iresolve.c, match.c, trans-decl.c, trans-io.c, target-memory.c,
310         match.h, target-memory.h, parse.c, arith.h, check.c, dependency.c,
311         parse.h, types.def, convert.c, dependency.h, primary.c,
312         trans-intrinsic.c, options.c, misc.c, simplify.c: Likewise.
313
314 2007-08-01  Daniel Franke  <franke.daniel@gmail.com>
315
316         * trans-decl.c (generate_local_decl): Emit warning on unused parameter
317         on "-Wall -Wextra" or "-Wunused-parameter" but not on "-Wall", changed
318         messages that start with lower case to upper case.
319         * invoke.texi (-Wparameter-unused): Document differences between gcc
320         and gfortran regarding this option.
321
322 2007-08-01  Daniel Franke  <franke.daniel@gmail.com>
323
324         PR fortran/32945
325         * expr.c (check_specification_function): Skip check if no symtree 
326         is available.
327
328 2007-08-01  Paul Thomas  <pault@gcc.gnu.org>
329
330         PR fortran/31609
331         * resolve.c (resolve_entries): Entries declared to be module
332         procedures must point to the function namespace.
333
334 2007-07-31  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
335
336         PR fortran/32938
337         * trans-stmt.c (gfc_trans_return): Convert to correct type.
338
339 2007-07-31  Steven G. Kargl  <kargl@gcc.gnu.org>
340
341         PR fortran/32942
342         * trans-intrinsic.c (gfc_conv_intrinsic_exponent): Convert to correct
343         type.
344
345 2007-07-29  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
346
347         * invoke.texi: Document -fsign-zero flag.
348
349 2007-07-29  Paul Thomas  <pault@gcc.gnu.org>
350
351         PR fortran/31211
352         * trans-expr.c (gfc_conv_expr_reference): Add block for case of
353         scalar pointer functions so that NULL result is correctly
354         handled.
355
356         PR fortran/32682
357         * trans-array.c (gfc_trans_array_constructor): On detecting a
358         multi-dimensional parameter array, set the loop limits.
359
360 2007-07-29  Daniel Franke  <franke.daniel@gmail.com>
361
362         PR fortran/32906
363         * resolve.c (resolve_fl_parameter): Check for constant shape arrays,
364         adjusted error message.
365
366 2007-07-29  Daniel Franke  <franke.daniel@gmail.com>
367
368         * invoke.texi: Removed -w from option summary.
369
370 2007-07-29  Daniel Franke  <franke.daniel@gmail.com>
371
372         PR fortran/32879
373         * intrinsic.texi (IRAND, RAND, RANDOM_NUMBER): Document algorithm
374         used for random number generator.
375
376 2007-07-28  Kazu Hirata  <kazu@codesourcery.com>
377
378         * gfortran.h, interface.c, resolve.c, symbol.c: Fix comment
379         typos.
380         * intrinsic.texi, invoke.texi: Fix typos.
381
382 2007-07-28  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
383
384         PR fortran/31609
385         * resolve.c (generic_sym): Check for a same symbol and if so, return to
386         avoid infinite recursion.
387
388 2007-07-28  Daniel Franke  <franke.daniel@gmail.com>
389
390         PR fortran/31818
391         PR fortran/32876
392         PR fortran/32905
393         * gfortran.h (symbol_attribute): Added bits for pointer_comp, 
394         private_comp.
395         * parse.c (parse_derived): Set pointer_comp/private_comp bits if 
396         the derived type ultimately contains pointer components or private 
397         components.
398         * module.c (ab_attribute): New values AB_POINTER_COMP, AB_PRIVATE_COMP.
399         (attr_bits): Added names for new ab_attributes.
400         (mio_symbol_attribute): Save/restore new attribute bits in modules.
401         * match.c (gfc_match_namelist): Removed check for namelist objects
402         of assumed shape.
403         * resolve.c (resolve_fl_namelist): Added check for pointer or
404         private components in nested types. Added check for namelist objects
405         of assumed shape.
406
407 2007-07-28  Paul Thomas  <pault@gcc.gnu.org>
408
409         PR fortran/32880
410         * trans-expr.c (gfc_trans_scalar_assign): Revert to fixed order
411         for lse and rse pre expressions, for derived types with
412         allocatable components.  Instead, assign the lhs to a temporary
413         and deallocate after the assignment.
414
415 2007-07-28  Janne Blomqvist  <jb@gcc.gnu.org>
416
417         PR fortran/32909
418         * trans-stmt.c (gfc_trans_character_select): Replace occurrences
419         of gfc_c_int_type_node with integer_type_node.
420         * trans-decl.c (gfc_build_intrinsic_function_decls): Likewise.
421         (gfc_build_builtin_function_decls): Likewise.
422         (gfc_generate_function_code): Likewise.
423         * trans-io.c (gfc_build_io_library_fndecls): Likewise.
424
425 2007-07-27  Janne Blomqvist  <jb@gcc.gnu.org>
426
427         * trans-decl.c (gfc_build_builtin_function_decls): Use existing
428         gfc_array_index_type rather than creating another typenode for
429         gfc_index_integer_kind.
430
431 2007-07-27  Janne Blomqvist  <jb@gcc.gnu.org>
432
433         * trans-io.c (gfc_build_io_library_fndecls): Change to use
434         gfc_array_index_type for array descriptor triplets instead of
435         gfc_int4_type_node.
436
437 2007-07-26  Steven G. Kargl  <kargl@gcc.gnu.org>
438
439         PR fortran/32899
440         * resolve.c (resolve_operator): Add INTRINSIC_EQ_OS comparison.
441
442 2007-07-27  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
443             Daniel Franke  <franke.daniel@gmail.com>
444
445         PR fortran/32760
446         * primary.c (match_variable): Do not call gfc_add_flavor if symbol has
447         attribute of ACCESS_PUBLIC or ACCESS_PRIVATE already marked.
448
449 2007-07-27  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
450
451         PR fortran/32035
452         * trans-stmt.c (gfc_trans_character_select): Replace the
453         mechanism with labels by a SWITCH_EXPR.
454         * trans-decl.c (gfc_build_builtin_function_decls): Change
455         return type for select_string.
456
457 2007-07-27  Paul Thomas  <pault@gcc.gnu.org>
458
459         PR fortran/32903
460         * trans-decl.c (gfc_trans_deferred_vars): Set intent(out)
461         derived types as referenced, if they have the the default
462         initializer set.
463
464 2007-07-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
465
466         * gfortran.h (generate_isocbinding_symbol): Constify.
467         * symbol.c (gen_special_c_interop_ptr, gen_cptr_param,
468         generate_isocbinding_symbol): Likewise.
469
470 2007-07-24  Paul Thomas  <pault@gcc.gnu.org>
471
472         PR fortran/31205
473         PR fortran/32842
474         * trans-expr.c (gfc_conv_function_call): Remove the default
475         initialization of intent(out) derived types.
476         * symbol.c (gfc_lval_expr_from_sym): New function.
477         * matchexp.c (gfc_get_parentheses): Return argument, if it is
478         character and posseses a ref.
479         * gfortran.h : Add prototype for gfc_lval_expr_from_sym.
480         * resolve.c (has_default_initializer): Move higher up in file.
481         (resolve_code): On detecting an interface assignment, check
482         if the rhs and the lhs are the same symbol.  If this is so,
483         enclose the rhs in parenetheses to generate a temporary and
484         prevent any possible aliasing.
485         (apply_default_init): Remove code making the lval and call
486         gfc_lval_expr_from_sym instead.
487         (resolve_operator): Give a parentheses expression a type-
488         spec if it has no type.
489         * trans-decl.c (gfc_trans_deferred_vars): Apply the a default
490         initializer, if any, to an intent(out) derived type, using
491         gfc_lval_expr_from_sym and gfc_trans_assignment.  Check if
492         the dummy is present.
493
494 2007-07-24  Daniel Franke  <franke.daniel@gmail.com>
495
496         PR fortran/32867
497         * expr.c (check_init_expr): Simplify matched functions.
498
499 2007-07-24  Daniel Franke  <franke.daniel@gmail.com>
500
501         PR fortran/32778
502         * intrinsic.c (add_sym): Do not exclude any symbols, even if not part
503         of the selected standard.
504         (make generic): Likewise.
505         (make alias): Likewise, set standard the alias belongs to.
506         (add_subroutines): Call make_noreturn unconditionally.
507         (check_intrinsic_standard): Change return value to try.
508         (gfc_intrinsic_func_interface): Check return value of above function.
509         (gfc_intrinsic_sub_interface): Likewise.
510
511 2007-07-24  Thomas Koenig  <tkoenig@gcc.gnu.org>
512
513         PR fortran/30814
514         * trans-decl.c (generate_function_code):  Add argument
515         for flag_bounds_check to the array for set_options.
516         * invoke.texi (-fbounds-check): Document new libarary run-time
517         behaviour.
518
519 2007-07-23  Daniel Franke  <franke.daniel@gmail.com>
520
521         PR fortran/25104
522         PR fortran/31639
523         * expr.c (check_transformational): Reject valid transformational
524         intrinsics to avoid ICE.
525         (check_inquiry): Report error for assumed character lengths for
526         all supported standards.
527         (check_init_expr): Whitespace fix.
528
529 2007-07-23  Christopher D. Rickett  <crickett@lanl.gov>
530
531         PR fortran/32797
532         PR fortran/32800
533         * decl.c (verify_bind_c_sym): Use the result symbol for functions
534         with a result clause.  Warn if implicitly typed.  Verify the type
535         and rank of the SHAPE argument, if given.
536         * resolve.c (gfc_iso_c_sub_interface): Use gfc_procedure_use to
537         check the actual args against the formal, sorting them if
538         necessary.
539         * symbol.c (gen_shape_param): Initialize type of SHAPE param to
540         BT_VOID.
541
542 2007-07-23  Christopher D. Rickett  <crickett@lanl.gov>
543
544         PR fortran/32732
545         * trans-decl.c (generate_local_decl): Convert the TREE_TYPE for by
546         value character dummy args of BIND(C) procedures.
547         * trans-expr.c (gfc_conv_variable): Do not build address
548         expression for BT_CHARACTER dummy args.
549
550 2007-07-23  Christopher D. Rickett  <crickett@lanl.gov>
551             Tobias Burnus  <burnus@net-b.de>
552
553         PR fortran/32600
554         * trans-expr.c (gfc_conv_function_call): Handle c_funloc.
555         * trans-types.c: Add pfunc_type_node.
556         (gfc_init_types,gfc_typenode_for_spec): Use it.
557         * resolve.c (gfc_iso_c_func_interface): Fix whitespace and
558         improve error message.
559
560 2007-07-22  Daniel Franke  <franke.daniel@gmail.com>
561
562         PR fortran/32710
563         * parse.c (gfc_fixup_sibling_symbols): No replacement of symbols if
564         the current is a namelist.
565
566 2007-07-22  Daniel Franke  <franke.daniel@gmail.com>
567
568         PR fortran/29962
569         PR fortran/31253
570         PR fortran/31265
571         PR fortran/31639
572         * gfortran.h (gfc_intrinsic_sym): Changed members elemental, pure,
573         generic, specific, actual_ok, noreturn into bits of a bitfield, 
574         added bits for inquiry, transformational, conversion.
575         * check.c (non_init_transformational): Removed, removed all callers.
576         * intrinsic.c (enum class): New.
577         (add_sym*): Replaced argument elemetal by enum class. Changed all
578         callers.
579         (add_functions): Assign appropriate classes to intrinsic functions.
580         (add_subroutines): Assign appropriate classes to intrinsic subroutines.
581         (add_conv): Set conversion attribute.
582         (gfc_init_expr_extensions): Removed, removed all callers.
583         (gfc_intrinsic_func_interface): Reimplemented check for non-standard
584         initializatione expressions.
585         * expr.c (check_specification_function): New.
586         (gfc_is_constant_expr): Added check for specification functions.
587         (check_init_expr_arguments): New.
588         (check_inquiry): Changed return value to MATCH, added checks for
589         inquiry functions defined by F2003.
590         (check_transformational): New.
591         (check_null): New.
592         (check_elemental): New.
593         (check_conversion): New.
594         (check_init_expr): Call new check functions, add more specific error
595         messages.
596
597 2007-07-21  Christopher D. Rickett  <crickett@lanl.gov>
598
599         PR fortran/32627
600         * resolve.c (set_name_and_label): Set kind number for character
601         version of c_f_pointer.
602         (gfc_iso_c_sub_interface): Set the kind of the SHAPE formal arg to
603         that of the actual SHAPE arg.
604         * symbol.c (gen_shape_param): Initialize kind for SHAPE arg.
605
606 2007-07-21  Christopher D. Rickett  <crickett@lanl.gov>
607
608         PR fortran/32801
609         * symbol.c (generate_isocbinding_symbol): Remove unnecessary
610         conditional.
611
612         PR fortran/32804
613         * resolve.c (gfc_iso_c_func_interface): Reject assumed-shape and
614         deferred-shape arrays as args to C_LOC.  Fix bug in testing
615         character args to C_LOC.
616
617 2007-07-21  Lee Millward  <lee.millward@gmail.com>
618
619         PR fortran/32823
620         * trans-intrinsic.c (gfc_conv_intrinsic_int): Evaluate all
621         arguments passed, not just the first one. Adjust code to 
622         refer to "args[0]" instead of "arg" as a result.
623         
624 2007-07-19  Christopher D. Rickett  <crickett@lanl.gov>
625
626         PR fortran/32600
627         * trans-expr.c (gfc_conv_function_call): Inline C_LOC.
628
629 2007-07-18  Christopher D. Rickett  <crickett@lanl.gov>
630
631         PR fortran/32801
632         * symbol.c (generate_isocbinding_symbol): Fix bug where
633         ISOCBINDING_FUNPTR was generated for C_LOC instead of the needed
634         ISOCBINDING_PTR.
635
636 2007-07-17  Janus Weil  <jaydub66@gmail.com> 
637
638         PR fortran/32535
639         * resolve.c (resolve_fl_namelist): Check for namelist private 
640         components in contained subprograms.
641
642 2007-07-17  Paul Thomas  <pault@gcc.gnu.org>
643
644         PR fortran/31320
645         PR fortran/32665
646         * trans-expr.c (gfc_trans_subcomponent_assign): Ensure that
647         renormalization unity base is done independently of existing
648         lbound value.
649         (gfc_trans_scalar_assign): If rhs is not a variable, put
650         lse->pre after rse->pre to ensure that de-allocation of lhs
651         occurs after evaluation of rhs.
652
653 2007-07-16  Lee Millward  <lee.millward@gmail.com>
654
655         PR fortran/32222
656         PR fortran/32238
657         PR fortran/32242        
658         * trans-intrinsic.c (gfc_conv_intrinsic_function_args): Adjust
659         to operate on a stack allocated array for the intrinsic arguments
660         instead of creating a TREE_LIST. Add two new parameters for the
661         array and the number of elements. Update all callers to allocate
662         an array of the correct length to pass in. Update comment.
663         (gfc_intrinsic_argument_list_length): New function.
664         (gfc_conv_intrinsic_conversion): Call it.
665         (gfc_conv_intrinsic_mnimax): Likewise.
666         (gfc_conv_intrinsic_merge): Likewise.
667         (gfc_conv_intrinsic_lib_function): Call it. Use new CALL_EXPR
668         constructors.
669         (gfc_conv_intrinsic_cmplx): Likewise.
670         (gfc_conv_intrinsic_ctime): Likewise.
671         (gfc_covn_intrinsic_fdate): Likewise.
672         (gfc_conv_intrinsic_ttynam): Likewise.
673         (gfc_conv_intrinsic_ishftc): Likewise.
674         (gfc_conv_intrinsic_index): Likewise.
675         (gfc_conv_intrinsic_scan): Likewise.
676         (gfc_conv_intrinsic_verify): Likewise.
677         (gfc_conv_intrinsic_trim): Likewise.
678         (gfc_conv_intrinsic_aint): Use new CALL_EXPR constructors.
679         (gfc_conv_intrinsic_exponent): Likewise.
680         (gfc_conv_intrinsic_bound): Likewise.
681         (gfc_conv_intrinsic_abs): Likewise.
682         (gfc_conv_intrinsic_mod): Likewise.
683         (gfc_conv_intrinsic_sign): Likewise.
684         (gfc_conv_intrinsic_len): Likewise.
685         (gfc_conv_intrinsic_adjust): Likewise.
686         (gfc_conv_intrinsic_si_kind): Likewise. 
687         
688 2007-07-16  Janne Blomqvist  <jb@gcc.gnu.org>
689
690         PR fortran/32748
691         * trans-decl.c (gfc_build_builtin_function_decls): Remove
692         DECL_IS_MALLOC attribute from internal_realloc, thus reverting
693         part of my 2007-07-03 patch.
694
695 2007-07-15  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
696             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
697
698         PR fortran/32611
699         * gfortran.h (gfc_option_t): Add flag_sign_zero field.
700         * lang.opt (-fsign-zero): New option.
701         * trans.h: Rename gfor_fndecl_set_std into gfor_fndecl_set_options.
702         * trans-decl.c (gfc_build_builtin_function_decls): Build the function
703         declaration to pass an array containing the options to be used by the
704         runtime library. (gfc_generate_function_code): Build an array that
705         contains option values to be passed to the runtime library and the call
706         to the function. 
707         * options.c (gfc_init_options): Initialize the flag_sign_zero field.
708         (gfc_handle_option): Handle the -fsign-zero option.
709
710 2007-07-15  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
711
712         PR fortran/32036
713         * trans-array.c (gfc_conv_array_ref): Only evaluate index once.
714
715 2007-07-15  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
716
717         PR fortran/32357
718         * iresolve.c (gfc_resolve_mvbits): Convert FROMPOS, LEN and TOPOS
719         to C int.
720
721 2007-07-14  Thomas Koenig  <tkoenig@gcc.gnu.org>
722
723         PR libfortran/32731
724         * iresolve.c(gfc_resolve_pack):  A scalar mask has
725         to be kind=4, an array mask with kind<4 is converted
726         to gfc_default_logical_kind automatically.
727         (gfc_resolve_unpack):  Convert mask to gfc_default_lotical_kind
728         if it has a kind<4.
729
730 2007-07-14  Paul Thomas  <pault@gcc.gnu.org>
731
732         PR fortran/32724
733         * parse.c (parse_spec): Emit error on unexpected statement
734         function.
735
736 2007-07-13  Daniel Franke  <franke.daniel@gmail.com>
737
738         * invoke.texi: Unified upper- and lower-case in menus.
739         (-w, -W): Removed, documented by gcc.
740         * intrinsic.texi: Unified Class-section entries, added
741         subroutine/function warning where appropiate.
742
743 2007-07-12  Daniel Franke  <franke.daniel@gmail.com>
744
745         PR fortran/31639
746         * decl.c (gfc_match_suffix): Removed surplus general error that hides
747         a more specific message.
748         * resolve.c (resolve_fl_variable): Reject illegal initializiers only
749         if not already done.
750         (resolve_fl_procedure): Added check for initializers of functions.
751
752 2007-07-12  Daniel Franke  <franke.daniel@gmail.com>
753
754         PR fortran/32704
755         * invoke.texi (-static-libgfortran): Document new option.
756
757 2007-07-12  Paul Thomas  <pault@gcc.gnu.org>
758
759         PR fortran/32634
760         PR fortran/32727
761         * module.c (write_generic): Restore patch of 2007-07-10 and use
762         symbol name if there are no use names. 
763
764 2007-07-12  Christopher D. Rickett  <crickett@lanl.gov>
765
766         PR fortran/32599
767         * decl.c (verify_c_interop_param): Require character string dummy
768         args to BIND(C) procedures to have length 1.
769         * resolve.c (resolve_fl_procedure): Modify parameter checking for
770         BIND(C) procedures.
771
772         PR fortran/32601
773         * resolve.c (gfc_iso_c_func_interface): Verify that a valid
774         expression is given as an argument to C_LOC and C_ASSOCIATED.
775         * trans-io.c (transfer_expr): Add argument for code block.  Add
776         standards check to determine if an error message should be
777         reported for printing C_PTR or C_FUNPTR.
778         (transfer_array_component): Update arguments to transfer_expr.
779         (gfc_trans_transfer): Ditto.
780
781         * symbol.c (gen_cptr_param): Fix whitespace.
782
783 2007-07-12  Jakub Jelinek  <jakub@redhat.com>
784
785         PR fortran/32550
786         * trans.h (GFC_POINTER_TYPE_P): Define.
787         * trans-types.c (gfc_sym_type): Set it for types on attr->sym.pointer.
788         * trans-openmp.c (gfc_omp_privatize_by_reference): Return false
789         if GFC_POINTER_TYPE_P is set on the type.
790
791 2007-07-12  Richard Guenther  <rguenther@suse.de>
792
793         * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Convert
794         arguments to gfc_charlen_type_node.
795         * trans-io.c (gfc_convert_array_to_string): Convert type
796         size to gfc_array_index_type.
797
798 2007-07-12  Daniel Franke  <franke.daniel@gmail.com>
799
800         PR fortran/32634
801         PR fortran/32727
802         * module.c: Reverted Paul's patch from 2007-07-10.
803
804 2007-07-11  Richard Guenther  <rguenther@suse.de>
805
806         * trans-array.c (gfc_conv_array_parameter): Use correct
807         types for comparison.
808         * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Use
809         correct types for POINTER_PLUS_EXPR.
810         * trans-stmt.c (gfc_trans_forall_loop): Use correct type
811         for integer one constant.
812
813 2007-07-10  Paul Thomas  <pault@gcc.gnu.org>
814
815         PR fortran/32157
816         * resolve.c (is_external_proc): New function.  Adds test that
817         the symbol is not an intrinsic procedure.
818         * (resolve_function, resolve_call): Replace logical statements
819         with call to is_external_proc.
820
821         PR fortran/32689
822         * simplify.c (gfc_simplify_transfer): If mold has rank, the
823         result is an array.
824
825         PR fortran/32634
826         * module.c (write_generic): Write the local name of the
827         interface. 
828
829 2007-07-09  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
830
831         PR fortran/29459
832         * trans-array.c (gfc_trans_array_constructor): Mark offset field
833         with TREE_NO_WARNING.
834         * trans-decl.c (gfc_build_qualified_array): Mark lbound, ubound,
835         stride and size variables with TREE_NO_WARNING.
836
837 2007-07-09  Steven G. Kargl  <kargl@gcc.gnu.org>
838
839         * trans-decl.c (set_tree_decl_type_code): Remove function.
840         (generate_local_decl): Remove reference to set_tree_decl_type_code.
841
842 2007-07-09  Daniel Franke  <franke.daniel@gmail.com>
843
844         PR fortran/31129
845         * trans-decl.c (generate_local_decl) Emit a warning if an unused
846         parameter is found.
847
848 2007-07-08  Daniel Franke  <franke.daniel@gmail.com>
849
850         PR fortran/29876
851         * module.c (gfc_match_use): Do not set an non-existant 
852         intrinsic operator if a user-defined operator is found.
853
854 2007-07-08  Daniel Franke  <franke.daniel@gmail.com>
855
856         PR fortran/24784
857         PR fortran/28004
858         * trans-decl.c (generate_local_decl): Adjusted warning on unused 
859         dummy arguments, tell middle-end not to emit additional warnings.
860
861 2007-07-08  Daniel Franke  <franke.daniel@gmail.com>
862             Tobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
863
864         PR fortran/17711
865         * gfortran.h (gfc_intrinsic_op): Added INTRINSIC_EQ_OS,
866         INTRINSIC_NE_OS, INTRINSIC_GT_OS, INTRINSIC_GE_OS, 
867         INTRINSIC_LT_OS and INTRINSIC_LE_OS.
868         * arith.c (eval_intrinsic, eval_type_intrinsic0): Likewise.
869         * arith.h (gfc_eq, gfc_ne, gfc_gt, gfc_ge, gfc_lt, gfc_le):
870         Added gfc_intrinsic_op as third argument type.
871         * dump-parse-tree.c (gfc_show_expr): Account for new enum values.
872         * expr.c (simplify_intrinsic_op, check_intrinsic_op): Likewise.
873         * interface.c (check_operator_interface): Likewise.
874         (gfc_check_interfaces): Added cross-checks for FORTRAN 77 and 
875         Fortran 90 style operators using new enum values.
876         (gfc_extend_expr): Likewise.
877         (gfc_add_interface): Likewise.
878         * match.c (intrinsic_operators): Distinguish FORTRAN 77 style
879         operators from Fortran 90 style operators using new enum values.
880         * matchexp.c (match_level_4): Account for new enum values.
881         * module.c (mio_expr): Likewise.
882         * resolve.c (resolve_operator): Deal with new enum values, fix
883         inconsistent error messages.
884         * trans-expr.c (gfc_conv_expr_op): Account for new enum values.
885
886 2007-07-08  Tobias Burnus  <burnus@net-b.de>
887
888         PR fortran/32669
889         * interface.c (get_expr_storage_size): Properly obtain lower bound.
890         (compare_actual_formal): Add space before parenthesis.
891
892 2007-07-08  Daniel Franke  <franke.daniel@gmail.com>
893
894         PR fortran/25094
895         * resolve.c (resolve_fl_procedure): Added check for PRIVATE types 
896         in PUBLIC interfaces.
897
898 2007-07-07  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
899
900         PR fortran/32644
901         * decl.c (match_attr_spec): Don't return MATCH_ERROR if comma found and
902         gfc_match_bind_c does not return MATCH_YES.
903
904 2007-07-07  Kazu Hirata  <kazu@codesourcery.com>
905
906         * decl.c, gfortran.h, interface.c, module.c, resolve.c,
907         trans-array.c, trans-decl.c: Fix comment typos.  Follow
908         spelling conventions.
909         * intrinsic.texi: Fix typos.  Follow spelling conventions.
910
911 2007-05-06  Daniel Franke  <franke.daniel@gmail.com>
912
913         PR fortran/32633
914         * symbol.c (save_status): New.
915         * gfortran.h (save_status): Added external declaration.
916         (check_conflict): Check for conflicting explicite SAVE statements
917         only.
918         (gen_special_c_interop_ptr): Use SAVE_EXPLICIT constant.
919         * module.c (ab_attribute, attr_bits): Removed enumerator value 
920         AB_SAVE for save attribute.
921         (mio_symbol_attribute): Import/export the full SAVE status, 
922         removed usage of AB_SAVE.
923         * dump-parse-tree.c (gfc_show_attr): Dump full SAVE status.
924         * decl.c (add_init_expr_to_sym): Set SAVE_IMPLICIT only if not
925         already explicit.
926
927 2007-07-05  Daniel Franke  <franke.daniel@gmail.com>
928             Tobias Burnus  <burnus@net-b.de>
929
930         PR fortran/32359
931         * gfortran.h (symbol_attribute): Change save attribute into an enum.
932         * decl.c (add_init_expr_to_sym): Set it to SAVE_IMPLICIT.
933         * symbol.c (gfc_add_save): Check for SAVE_EXPLICIT.
934         * resolve.c (resolve_fl_variable): Check for SAVE_EXPLICIT.
935         (resolve_symbol): Allow OMP threadprivate with
936         initialization SAVEd and save_all variable.
937         * trans-decl.c (gfc_finish_var_decl): Remove obsolete sym->value check.
938
939 2007-07-05  Paul Thomas  <pault@gcc.gnu.org>
940
941         PR fortran/32526
942         * match.c (gfc_match_call): Check, in all cases, that a symbol
943         is neither generic nor a subroutine before trying to add it as
944         a subroutine.
945
946         PR fortran/32613
947         * match.c (gfc_match_do): Reset the implied_index attribute.
948
949 2007-07-04  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
950
951         PR fortran/31198
952         * trans-intrinsic.c (trans-intrinsic.c): Handle optional
953         arguments correctly for MIN and MAX intrinsics.
954
955 2007-07-03  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
956
957         PR fortran/32545
958         * io.c (check_format): Always call gfc_error for errors.
959         (check_format_string): Change type of this function to try and
960         return the result of check_format.
961         (check_io_constraints): Return MATCH_ERROR if check_format_string
962         returns FAILURE.
963
964 2007-07-03  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
965
966         PR fortran/32612
967         * decl.c (get_proc_name): Include attr->mod_proc in check for error.
968
969 2007-07-03  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
970
971         PR fortran/32432
972         * gfortran.h: Change type of gfc_assign_data_value from void to try.
973         * data.c (gfc_assign_data_value): Return FAILURE if error found.
974         * resolve.c (check_data_variable): If gfc_assign_data_value returns
975         failure, break out of loop and return failure.
976
977 2007-07-03  Christopher D. Rickett  <crickett@lanl.gov>
978
979         PR fortran/32579
980         * symbol.c (gen_cptr_param): Generate C_PTR and C_FUNPTR if necessary.
981         (build_formal_args): Pass intrinsic module symbol id to
982         gen_cptr_param.
983
984 2007-07-03  Tobias Burnus  <burnus@net-b.de>
985
986         PR fortran/25062
987         * resolve.c (resolve_common_blocks): New check function.
988         (resolve_types): Use it.
989
990 2007-07-03  Tobias Burnus  <burnus@net-b.de>
991
992         PR fortran/30940
993         * interface.c (get_sym_storage_size): New function.
994         (get_sym_storage_size): New function.
995         (compare_actual_formal): Enhance sequence association
996         support and improve checking.
997
998 2007-07-03  Janne Blomqvist  <jb@gcc.gnu.org>
999
1000         * trans-decl.c (gfc_build_builtin_function_decls): Mark
1001         internal_realloc as a malloc function.
1002
1003 2007-07-03  Tobias Burnus  <burnus@net-b.de>
1004
1005         PR fortran/20888
1006         * resolve.c (resolve_operator): Check for NULL as operand.
1007
1008 2007-07-02  Tobias Burnus  <burnus@net-b.de>
1009
1010         * gfortran.texi (Fortran 2003): Add ISO Bind C.
1011         * intrinsic.texi (C_ASSOCIATED,C_F_POINTER,C_F_PROCPOINTER,
1012         C_FUNLOC,C_LOC): Document new ISO Bind C intrinsics.
1013
1014 2007-07-01  Christopher D. Rickett  <crickett@lanl.gov>
1015
1016         * interface.c (gfc_compare_derived_types): Special case for comparing
1017         derived types across namespaces.
1018         (gfc_compare_types): Deal with BT_VOID.
1019         (compare_parameter): Use BT_VOID to accept ISO C Binding pointers.
1020         * trans-expr.c (gfc_conv_function_call): Remove setting parm_kind
1021         to SCALAR
1022         (gfc_conv_initializer): Deal with ISO C Binding NULL_PTR and 
1023         NULL_FUNPTR.
1024         (gfc_conv_expr): Convert expressions for ISO C Binding derived types.
1025         * symbol.c (gfc_set_default_type): BIND(C) variables should not be
1026         Implicitly declared.
1027         (check_conflict): Add BIND(C) and check for conflicts.
1028         (gfc_add_explicit_interface): Whitespace.       
1029         (gfc_add_is_bind_c): New function.  
1030         (gfc_copy_attr): Use it.
1031         (gfc_new_symbol): Initialize ISO C Binding objects.
1032         (get_iso_c_binding_dt):  New function.
1033         (verify_bind_c_derived_type): Ditto.
1034         (gen_special_c_interop_ptr): Ditto.
1035         (add_formal_arg): Ditto.
1036         (gen_cptr_param): Ditto.
1037         (gen_fptr_param): Ditto.
1038         (gen_shape_param): Ditto.
1039         (add_proc_interface): Ditto.
1040         (build_formal_args): Ditto.
1041         (generate_isocbinding_symbol):  Ditto.
1042         (get_iso_c_sym):  Ditto.
1043         * decl.c (num_idents_on_line, has_name_equals): New variables.
1044         (verify_c_interop_param): New function.
1045         (build_sym): Finish binding labels and deal with COMMON blocks.
1046         (add_init_expr_to_sym): Check if the initialized expression is
1047         an iso_c_binding named constants
1048         (variable_decl): Set ISO C Binding type_spec components.
1049         (gfc_match_kind_spec): Check match for C interoperable kind.
1050         (match_char_spec): Fix comment. Chnage gfc_match_small_int
1051         to gfc_match_small_int_expr.  Check for C interoperable kind.
1052         (match_type_spec): Clear the current binding label.
1053         (match_attr_spec): Add DECL_IS_BIND_C.  If BIND(C) is found, use it
1054         to set attributes.
1055         (set_binding_label): New function.
1056         (set_com_block_bind_c): Ditto.
1057         (verify_c_interop): Ditto.
1058         (verify_com_block_vars_c_interop): Ditto.
1059         (verify_bind_c_sym): Ditto.
1060         (set_verify_bind_c_sym): Ditto.
1061         (set_verify_bind_c_com_block): Ditto.
1062         (get_bind_c_idents): Ditto.
1063         (gfc_match_bind_c_stmt): Ditto.
1064         (gfc_match_data_decl): Use num_idents_on_line.
1065         (match_result): Deal with right paren in BIND(C).
1066         (gfc_match_suffix): New function.
1067         (gfc_match_function_decl): Use it.  Code is re-arranged to deal with
1068         ISO C Binding result clauses.
1069         (gfc_match_subroutine):  Deal with BIND(C).
1070         (gfc_match_bind_c): New function.
1071         (gfc_get_type_attr_spec): New function.  Code is re-arranged in and
1072         taken from gfc_match_derived_decl.
1073         (gfc_match_derived_decl): Add check for BIND(C).
1074         * trans-common.c: Forward declare gfc_get_common.
1075         (gfc_sym_mangled_common_id): Change arg from 'const char *name' to
1076         'gfc_common_head *com'.  Check for ISO C Binding of the common block.
1077         (build_common_decl): 'com->name' to 'com in SET_DECL_ASSEMBLER_NAME.
1078         * gfortran.h: Add GFC_MAX_BINDING_LABEL_LEN
1079         (bt): Add BT_VOID
1080         (sym_flavor): Add FL_VOID.
1081         (iso_fortran_env_symbol, iso_c_binding_symbol, intmod_id): New enum
1082         (CInteropKind_t): New struct.
1083         (c_interop_kinds_table): Use it.  Declare an array of structs.
1084         (symbol_attribute): Add is_bind_c, is_c_interop, and is_iso_c
1085         bitfields.
1086         (gfc_typespec): Add is_c_interop; is_iso_c, and f90_type members.
1087         (gfc_symbol): Add from_intmod, intmod_sym_id, binding_label, and
1088         common_block members.
1089         (gfc_common_head): Add binding_label and is_bind_c members.
1090         (gfc_gsymbol): Add sym_name, mod_name, and binding_label members.
1091         Add prototypes for get_c_kind, gfc_validate_c_kind, 
1092         gfc_check_any_c_kind, gfc_add_is_bind_c, gfc_add_value,
1093         verify_c_interop, verify_c_interop_param, verify_bind_c_sym,
1094         verify_bind_c_derived_type, verify_com_block_vars_c_interop,
1095         generate_isocbinding_symbol, get_iso_c_sym, gfc_iso_c_sub_interface
1096         * iso-c-binding.def: New file. This file contains the definitions
1097         of the types provided by the Fortran 2003 ISO_C_BINDING intrinsic
1098         module.
1099         * trans-const.c (gfc_conv_constant_to_tree): Deal with C_NULL_PTR
1100          or C_NULL_FUNPTR expressions.
1101         * expr.c (gfc_copy_expr): Add BT_VOID case.  For BT_CHARACTER, the
1102         ISO C Binding requires a minimum string length of 1 for '\0'.  
1103         * module.c (intmod_sym): New struct.
1104         (pointer_info): Add binding_label member.
1105         (write_atom): Set len to 0 for NULL pointers. Check for NULL p and *p.
1106         (ab_attribute): Add AB_IS_BIND_C, AB_IS_C_INTEROP and AB_IS_ISO_C.
1107         (attr_bits): Add "IS_BIND_C", "IS_C_INTEROP", and "IS_ISO_C".
1108         (mio_symbol_attribute): Deal with ISO C Binding attributes.
1109         (bt_types): Add "VOID".
1110         (mio_typespec): Deal with ISO C Binding components.
1111         (mio_namespace_ref): Add intmod variable. 
1112         (mio_symbol): Check for symbols from an intrinsic module.
1113         (load_commons): Check for BIND(C) common block.
1114         (read_module): Read binding_label and use it.
1115         (write_common): Add label.  Write BIND(C) info.
1116         (write_blank_common): Blank commons are not BIND(C).  Explicitly
1117         set is_bind_c=0.
1118         (write_symbol): Deal with binding_label.
1119         (sort_iso_c_rename_list): New function.
1120         (import_iso_c_binding_module): Ditto.
1121         (create_int_parameter): Add to args.
1122         (use_iso_fortran_env_module): Adjust to deal with iso_c_binding
1123         intrinsic module.
1124         * trans-types.c (c_interop_kinds_table): new array of structs. 
1125         (gfc_validate_c_kind): New function.
1126         (gfc_check_any_c_kind): Ditto.
1127         (get_real_kind_from_node): Ditto.
1128         (get_int_kind_from_node): Ditto.
1129         (get_int_kind_from_width): Ditto.
1130         (get_int_kind_from_minimal_width): Ditto.
1131         (init_c_interop_kinds): Ditto.
1132         (gfc_init_kinds): call init_c_interop_kinds.
1133         (gfc_typenode_for_spec): Adjust for BT_VOID and ISO C Binding pointers.
1134         Adjust handling of BT_DERIVED.
1135         (gfc_sym_type): Whitespace.
1136         (gfc_get_derived_type):  Account for iso_c_binding derived types
1137         * resolve.c (is_scalar_expr_ptr): New function.
1138         (gfc_iso_c_func_interface): Ditto.
1139         (resolve_function): Use gfc_iso_c_func_interface. 
1140         (set_name_and_label): New function.
1141         (gfc_iso_c_sub_interface): Ditto.
1142         (resolve_specific_s0): Use gfc_iso_c_sub_interface.
1143         (resolve_bind_c_comms): New function.
1144         (resolve_bind_c_derived_types): Ditto.
1145         (gfc_verify_binding_labels): Ditto.
1146         (resolve_fl_procedure): Check for ISO C interoperability.
1147         (resolve_symbol): Check C interoperability.
1148         (resolve_types): Walk the namespace.  Check COMMON blocks.
1149         * trans-decl.c (gfc_sym_mangled_identifier):  Prevent the mangling
1150         of identifiers that have an assigned binding label.
1151         (gfc_sym_mangled_function_id): Use the binding label rather than
1152         the mangled name.
1153         (gfc_finish_var_decl): Put variables that are BIND(C) into a common
1154         segment of the object file, because this is what C would do.
1155         (gfc_create_module_variable): Conver to proper types
1156         (set_tree_decl_type_code): New function.
1157         (generate_local_decl): Check dummy variables and derived types for
1158         ISO C Binding attributes.
1159         * match.c (gfc_match_small_int_expr): New function.
1160         (gfc_match_name_C): Ditto.
1161         (match_common_name): Deal with ISO C Binding in COMMON blocks
1162         * trans-io.c (transfer_expr):  Deal with C_NULL_PTR or C_NULL_FUNPTR
1163         expressions
1164         * match.h: Add prototypes for gfc_match_small_int_expr,
1165         gfc_match_name_C, match_common_name, set_com_block_bind_c,
1166         set_binding_label, set_verify_bind_c_sym,
1167         set_verify_bind_c_com_block, get_bind_c_idents,
1168         gfc_match_bind_c_stmt, gfc_match_suffix, gfc_match_bind_c,
1169         gfc_get_type_attr_spec
1170         * parse.c (decode_statement): Use gfc_match_bind_c_stmt
1171         (parse_derived): Init *derived_sym = NULL, and gfc_current_block
1172         later for valiadation.
1173         * primary.c (got_delim): Set ISO C Binding components of ts.
1174         (match_logical_constant): Ditto.
1175         (match_complex_constant): Ditto.
1176         (match_complex_constant): Ditto.
1177         (gfc_match_rvalue): Check for existence of at least one arg for
1178         C_LOC, C_FUNLOC, and C_ASSOCIATED.
1179         * misc.c (gfc_clear_ts): Clear ISO C Bindoing components in ts.
1180         (get_c_kind): New function.
1181
1182 2007-07-01  Janne Blomqvist  <jb@gcc.gnu.org>
1183
1184         PR fortran/32239
1185         * trans-expr.c (gfc_conv_power_op): Use builtin_powi for
1186         real**int4 powers.
1187         * f95-lang.c (gfc_init_builtin_functions): Add builtin_powi to the
1188         builtins table.
1189
1190 2007-07-01  Janne Blomqvist  <jb@gcc.gnu.org>
1191
1192         * trans.h: Remove decls for 64-bit allocation functions.
1193         * trans-array.c (gfc_grow_array): Always pick the standard realloc
1194         function decl.
1195         (gfc_array_allocate): Likewise.
1196         * trans-decl.c: Remove trees for 64-bit allocation functions.
1197         (gfc_build_builtin_function_decls): Don't build fndecls for 64-bit
1198         allocations functions, use index_int_type for normal allocation
1199         functions.
1200
1201 2007-06-30  Daniel Franke  <franke.daniel@gmail.com>
1202
1203         PR fortran/20373
1204         * intrinsic.c (add_functions): Additional function types.
1205         (gfc_convert_type_warn): Remove intrinsic-flag from
1206         conversion functions.
1207         * resolve.c (resolve_symbol): Added type checks to 
1208         explicitly defined intrinsics.
1209
1210 2007-06-30  Tobias Burnus  <burnus@net-b.de>
1211
1212         PR fortran/32555
1213         * io.c (check_format): Allow zero to precede the
1214         P edit descriptor.
1215
1216 2007-06-30  Paul Thomas  <pault@gcc.gnu.org>
1217
1218         PR fortran/32472
1219         * simplify.c (gfc_simplify_repeat): Add handling of character
1220         literal for first argument.
1221
1222 2007-06-29  Daniel Franke  <franke.daniel@gmail.com>
1223
1224         * resolve.c (resolve_operator): Added check whether a user
1225         defined operator is available.
1226
1227 2007-06-29  Daniel Franke <franke.daniel@gmail.com>
1228
1229         * openmp.c (resolve_omp_clauses): Adjust error message to
1230         better reflect the actual requirement.
1231
1232 2007-06-29  Tobias Burnus  <burnus@net-b.de>
1233
1234         PR fortran/32483
1235         * io.c (format_lex): Fix FMT_ZERO.
1236         (check_format,check_format_string,gfc_match_format,
1237         check_io_constraints) Additional checking for READ.
1238
1239 2007-06-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1240
1241         PR other/31400
1242         * lang.opt (static-libgfortran): New option.
1243         * gfortranspec.c (ADD_ARG_LIBGFORTRAN): New macro.
1244         (Option): Add OPTION_static and OPTION_static_libgfortran.
1245         (lookup_option): Handle the new -static-libgfortran option.
1246         (lang_specific_driver): Check whether -static is passed.
1247         Handle the new -static-libgfortran option.
1248         * options.c (gfc_handle_option): If -static-libgfortran is
1249         passed and isn't supported on this configuration, error out.
1250
1251 2007-06-27  Daniel Franke  <franke.daniel@gmail.com>
1252
1253         PR fortran/32467
1254         * openmp.c (resolve_omp_clauses): Emit error on allocatable
1255         components in COPYIN, COPYPRIVATE, FIRSTPRIVATE and LASTPRIVATE
1256         clauses.
1257
1258 2007-06-25  Paul Thomas  <pault@gcc.gnu.org>
1259
1260         PR fortran/32464
1261         * resolve.c (check_host_association): Return if the old symbol
1262         is use associated.  Introduce retval to reduce the number of
1263         evaluations of the first-order return value.
1264
1265         PR fortran/31494
1266         * match.c (gfc_match_call): If a host associated symbol is not
1267         a subroutine, build a new symtree/symbol in the current name
1268         space.
1269
1270 2007-06-24  Tobias Burnus  <burnus@net-de>
1271
1272         PR fortran/32460
1273         * interface.c (gfc_compare_derived_types): Add access check.
1274         * symbol.c (gfc_find_component): Ditto.
1275         (gfc_set_component_attr,gfc_get_component_attr) Copy access state.
1276         * dump-parse-tree.c (gfc_show_components): Dump access state.
1277         * gfortran.h (struct gfc_component): Add gfc_access.
1278         * module.c (mio_component): Add access state.
1279         * (gfc_match_structure_constructor): Check for private access state.
1280
1281 2007-06-24  Paul Thomas  <pault@gcc.gnu.org>
1282
1283         PR fortran/32298
1284         PR fortran/31726
1285         * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Calculate
1286         the offset between the loop counter and the position as
1287         defined. Add the offset within the loop so that the mask acts
1288         correctly.  Do not advance the location on the basis that it
1289         is zero.
1290
1291 2007-06-22  Daniel Franke  <franke.daniel@gmail.com>
1292
1293         PR fortran/31473
1294         * symbol.c (gfc_copy_attr): Emit errors for duplicate 
1295         EXTERNAL/INTRINSIC statements.
1296
1297 2007-06-22  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1298
1299         PR fortran/32360
1300         * expr.c (gfc_check_assign): If the rvalue expression type is NULL_EXPR,
1301         check to see if the lvalue has attribute pointer and data.  
1302
1303 2007-06-21  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1304
1305         PR fortran/31162
1306         * resolve.c (gfc_resolve_iterator_expr): Add check for REAL using
1307         gfc_notify_standard. (gfc_resolve_iterator): Remove check.
1308         (resolve_branch): Change "Obsolete" to "Deleted feature".
1309         * io.c (resolve_tag): Ditto.
1310         * match.c (gfc_match_pause, gfc_match_assign, gfc_match_goto): Ditto.
1311
1312 2007-06-20  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1313
1314         PR fortran/32361
1315         * match.c (gfc_match_common): If the symbol value expression type is
1316         NULL_EXPR, don't error if previously initialized.
1317
1318 2007-06-20  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1319
1320         PR fortran/25061
1321         * decl.c (get_proc_name) Check symbol for generic interface
1322         and issue an error.
1323
1324 2007-06-20  Andrew Pinski  <andrew_pinski@playstation.sony.com>
1325         Richard Guenther  <rguenther@suse.de>
1326
1327         PR fortran/32140
1328         * trans.c (gfc_build_addr_expr): Use the correct types.
1329
1330 2007-06-19  Paul Thomas  <pault@gcc.gnu.org>
1331
1332         PR fortran/20863
1333         PR fortran/20882
1334         * resolve.c (resolve_code): Use gfc_impure_variable as a
1335         condition for rejecting derived types with pointers, in pure
1336         procedures.
1337         (gfc_impure_variable): Add test for dummy arguments of pure
1338         procedures; any for functions and INTENT_IN for subroutines.
1339
1340         PR fortran/32236
1341         * data.c (gfc_assign_data_value): Change the ICE on an array
1342         reference initializer not being an array into an error and
1343         clear init to prevent a repetition of the error.
1344
1345 2007-06-17  Janne Blomqvist  <jb@gcc.gnu.org>
1346
1347         * gfortran.texi: Add documentation for GFORTRAN_UNBUFFERED_n
1348         environment variables. Fix documentation for
1349         GFORTRAN_UNBUFFERED_ALL environment variable.
1350
1351 2007-06-15  Andrew Pinski  <andrew_pinski@playstation.sony.com>
1352
1353         * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Use
1354         POINTER_PLUS_EXPR instead of PLUS_EXPR for pointer addition.
1355         * trans-expr.c (gfc_trans_string_copy): Create
1356         POINTER_PLUS_EXPR instead of a PLUS_EXPR
1357         for pointer types.
1358
1359 2007-06-14  Paul Thomas  <pault@gcc.gnu.org>
1360
1361         PR fortran/32302
1362         * trans-common.c (build_common_decl): If resizing of common
1363         decl is needed, update the TREE_TYPE.
1364
1365 2007-06-13  Tobias Burnus  <burnus@net-b.de>
1366
1367         PR fortran/32323
1368         * interface.c (has_vector_section): New.
1369         (compare_actual_formal): Check for array sections with vector subscript.
1370
1371 2007-06-12  Dirk Mueller  <dmueller@suse.de>
1372
1373         * trans-stmt.c (gfc_trans_call): fix gcc_assert to
1374         a comparison, not an assignment.
1375
1376 2007-06-12  Paul Thomas  <pault@gcc.gnu.org>
1377
1378         * trans-common.c (create_common): Initialize 'field_init'.
1379
1380 2007-06-12  Paul Thomas  <pault@gcc.gnu.org>
1381
1382         PR fortran/29786
1383         PR fortran/30875
1384         * trans-common.c (get_init_field): New function.
1385         (create_common): Call get_init_field for overlapping
1386         initializers in equivalence blocks.
1387         * resolve.c (resolve_equivalence_derived, resolve_equivalence):
1388         Remove constraints on initializers in equivalence blocks.
1389         * target-memory.c (expr_to_char, gfc_merge_initializers):
1390         New functions.
1391         (encode_derived): Add the bit offset to the byte offset to get
1392         the total offset to the field.
1393         * target-memory.h : Add prototype for gfc_merge_initializers.
1394
1395 2007-06-11  Rafael Avila de Espindola  <espindola@google.com>
1396
1397         * trans-types.c (gfc_signed_type): Remove.
1398         * trans-types.h (gfc_signed_type): Remove.
1399         * f95-lang.c (LANG_HOOKS_SIGNED_TYPE): Remove.
1400
1401 2007-06-08 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1402
1403         * trans-intrinsic.c: Revert Lee's 2007-06-04 patch.
1404
1405 2007-06-07  Steven G. Kargl  <kargl@gcc.gnu.org>
1406             Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1407
1408         PR fortran/32223
1409         * match.c (gfc_match_special_char): New function.  Match special char.
1410         Add handling '\0'.
1411         * match.h: Add prototype.
1412         * io.c (next_char): Use it.
1413         * primary.c (next_string_char): Ditto.
1414
1415 2007-06-06  Steven G. Kargl  <kargl@gcc.gnu.org>
1416
1417         * decl.c: Miscellaneous whitespace fixes.
1418         * expr.c: Likewise.
1419         * gfortran.h: Likewise.
1420         * interface.c : Likewise.
1421         * io.c: Likewise.
1422         * match.c: Likewise.
1423         * match.h: Likewise.
1424         * module.c: Likewise.
1425         * parse.c: Likewise.
1426         * resolve.c: Likewise.
1427         * symbol.c: Likewise.
1428         * trans-array.c: Likewise.
1429         * trans-common.c: Likewise.
1430         * trans-decl.c: Likewise.
1431         * trans-intrinsic.c: Likewise.
1432         * trans-io.c: Likewise.
1433         * trans-stmt.c: Likewise.
1434         * trans-types.c: Likewise.
1435
1436 2007-06-05  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1437
1438         PR fortran/18923
1439         * parse.c (decode_statement): Don't call gfc_undo_symbols on MATCH_ERROR
1440         for ST_FUNCTION since it is called in reject_statement.
1441         (parse_contained): If error, loop back after reject_statement and try
1442         again.  Free the namespace if an error occured.
1443
1444 2007-06-04 Lee Millward <lee.millward@codesourcery.com>
1445
1446         * trans-intrinsic.c (gfc_conv_intrinsic_function_args): Adjust
1447         to operate on a stack allocated array for the intrinsic arguments
1448         instead of creating a TREE_LIST. Add two new parameters for the
1449         array and the number of elements. Update all callers to allocate
1450         an array of the correct length to pass in. Update comment.
1451         (gfc_intrinsic_argument_list_length): New function.
1452         (gfc_conv_intrinsic_mnimax): Call it.
1453         (gfc_conv_intrinsic_merge): Likewise.
1454         (gfc_conv_intrinsic_lib_function): Call it. Use new CALL_EXPR
1455         constructors.
1456         (gfc_conv_intrinsic_cmplx): Likewise.
1457         (gfc_conv_intrinsic_ctime): Likewise.
1458         (gfc_covn_intrinsic_fdate): Likewise.
1459         (gfc_conv_intrinsic_ttynam): Likewise.
1460         (gfc_conv_intrinsic_ishftc): Likewise.
1461         (gfc_conv_intrinsic_index): Likewise.
1462         (gfc_conv_intrinsic_scan): Likewise.
1463         (gfc_conv_intrinsic_verify): Likewise.
1464         (gfc_conv_intrinsic_trim): Likewise.
1465         (gfc_conv_intrinsic_aint): Use new CALL_EXPR constructors.
1466         (gfc_conv_intrinsic_exponent): Likewise.
1467         (gfc_conv_intrinsic_bound): Likewise.
1468         (gfc_conv_intrinsic_abs): Likewise.
1469         (gfc_conv_intrinsic_mod): Likewise.
1470         (gfc_conv_intrinsic_sign): Likewise.
1471         (gfc_conv_intrinsic_len): Likewise.
1472         (gfc_conv_intrinsic_adjust): Likewise.
1473         (gfc_conv_intrinsic_si_kind): Likewise.
1474
1475 2007-06-04  Steve Ellcey  <sje@cup.hp.com>
1476
1477         * trans-array.c (gfc_conv_array_parameter): Initialize tmp.
1478
1479 2007-05-31  Richard Guenther  <rguenther@suse.de>
1480
1481         * trans-expr.c (gfc_conv_expr_op): Use zero constant
1482         that matches the lse type.
1483         (gfc_trans_string_copy): Use sizetype zero constant.
1484         * intrinsic.c (add_functions): The sizeof intrinsic has
1485         index type result.
1486         * trans-types.c (gfc_get_dtype): Convert size to index
1487         type before shifting.
1488         * trans-array.c (gfc_trans_array_constructor_value): Use
1489         index type for offset computation.
1490         * trans-intrinsic.c (gfc_conv_associated): Use correct type
1491         for zero constant.
1492
1493 2007-05-31  Paul Thomas  <pault@gcc.gnu.org>
1494
1495         PR fortran/32156
1496         * trans-array.c (gfc_trans_array_constructor): Treat the case
1497         where the ss expression charlen is missing.
1498
1499 22007-05-31  Paul Thomas  <pault@gcc.gnu.org>
1500
1501         PR fortran/32103
1502         * module.c (mio_symtree_ref): If an equivalence group member
1503         is not used, give it a hidden symbol and set the pointer_info.
1504         (load_equiv): Only free the equivalence if none of the members
1505         are used.
1506
1507 2007-05-29  Daniel Franke  <franke.daniel@gmail.com>
1508
1509         * gfortran.h: Renamed 'enum gfc_generic_isym_id' to 'enum gfc_isym_id',
1510         added missing GFC_ISYM_* enumerators, ordered alphabetically.
1511         (struct gfc_intrinsic_sym): Renamed 'generic_id' to 'id'.
1512         (gfc_find_subroutine): New prototype.
1513         * intrinsic.c (add_sym, add_sym_*): Added argument 'id' and changed all callers.
1514         (find_subroutine): Renamed to 'gfc_find_subroutine', removed static.  
1515         * dependency.c: Changed usage of isym->generic_id to isym->id.  
1516         * openmp.c: Likewise.  
1517         * resolve.c: Likewise.  
1518         * trans-array.c: Likewise.  
1519         * trans-expr.c: Likewise.  
1520         * trans-intrinsic.c: Likewise.  
1521         * trans-openmp.c: Likewise.
1522
1523 2007-05-28  Tobias Schlüter  <tobi@gcc.gnu.org>
1524
1525         * gfortran.h (gfc_generic_isym_id): Add GFC_ISYM_SIZEOF.
1526         * intrinsic.c (add_functions): Add stuff for SIZEOF intrinsic.
1527         * intrinsic.h (gfc_check_sizeof): Add prototype of ...
1528         * check.c (gfc_check_sizeof): .. new function.
1529         * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): New function.
1530         (gfc_conv_intrinsic_strcmp): Whitespace fix.
1531         (gfc_conv_intrinsic_array_transfer): Remove double initialization,
1532         use fold_build. where appropriate.
1533         (gfc_conv_intrinsic_function): Add case for SIZEOF.
1534         * intrinsic.texi: Add documentation for SIZEOF.
1535
1536 2007-05-28  Brooks Moses  <brooks.moses@codesourcery.com>
1537
1538         * trans-array.c (gfc_conv_expr_descriptor): Edit comment.
1539
1540 2007-05-28  Brooks Moses  <brooks.moses@codesourcery.com>
1541
1542         PR fortran/31972
1543         * target-memory.c (gfc_target_expr_size): Add handling
1544         for size of BT_HOLLERITH variables.
1545         * check.c (gfc_check_transfer): Reject BT_HOLLERITH
1546         variables in MOLD argument of TRANSFER.
1547
1548 2007-05-28  Brooks Moses  <brooks.moses@codesourcery.com>
1549
1550         * gfortran.h (gfc_expr): Remove from_H, add "representation"
1551         struct.
1552         * primary.c (match_hollerith_constant): Store the representation
1553         of the Hollerith in representation, not in value.character.
1554         * arith.c: Add dependency on target-memory.h.
1555         (eval_intrinsic): Remove check for from_H.
1556         (hollerith2representation): New function.
1557         (gfc_hollerith2int): Determine value of the new constant.
1558         (gfc_hollerith2real): Likewise.
1559         (gfc_hollerith2complex): Likewise.
1560         (gfc_hollerith2logical): Likewise.
1561         (gfc_hollerith2character): Point both representation.string and
1562         value.character.string at the value string.
1563         * data.c (create_character_initializer): For BT_HOLLERITH
1564         rvalues, get the value from the representation rather than
1565         value.character.
1566         * expr.c (free_expr0): Update handling of BT_HOLLERITH values
1567         and values with representation.string.
1568         (gfc_copy_expr): Likewise.
1569         * intrinsic.c (do_simplify): Remove special treatement of
1570         variables resulting from Hollerith constants.
1571         * dump-parse-trees.c (gfc_show_expr): Update handling of
1572         Holleriths.
1573         * trans-const.c (gfc_conv_constant_to_tree): Replace from_H
1574         check with check for representation.string; get Hollerith
1575         representation from representation.string, not value.character.
1576         * trans-expr.c (is_zero_initializer_p): Replace from_H check
1577         with check for representation.string.
1578         * trans-stmt.c (gfc_trans_integer_select): Use
1579         gfc_conv_mpz_to_tree for case values, so as to avoid picking up
1580         the memory representation if the case is given by a transfer
1581         expression.
1582         * target-memory.c (gfc_target_encode_expr): Use the known memory
1583         representation rather than the value, if it exists.
1584         (gfc_target_interpret_expr): Store the memory representation of
1585         the interpreted expression as well as its value.
1586         (interpret_integer): Move to gfc_interpret_integer, make
1587         non-static.
1588         (interpret_float): Move to gfc_interpret_float, make non-static.
1589         (interpret_complex): Move to gfc_interpret_complex, make
1590         non-static.
1591         (interpret_logical): Move to gfc_interpret_logical, make
1592         non-static.
1593         (interpret_character): Move to gfc_interpret_character, make
1594         non-static.
1595         (interpret_derived): Move to gfc_interpret_derived, make
1596         non-static.
1597         * target-memory.h: Add prototypes for newly-exported
1598         gfc_interpret_* functions.
1599
1600 2007-05-27  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1601
1602         PR fortran/31812
1603         * parse.c (next_statement): Warn for truncated lines if source is free
1604         form.
1605
1606 2007-05-27 Paul Thomas  <pault@gcc.gnu.org>
1607            Tobias Burnus  <burnus@net-b.de>
1608
1609         PR fortran/32088
1610         * symbol.c (gfc_check_function_type): Copy dimensions of
1611           result variable.
1612         * resolve.c (resolve_contained_fntype): Improve symbol output in
1613           the error message.
1614
1615 2007-05-26  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1616
1617         PR fortran/31813
1618         * io.c (check_format): Add warning for H specifier in format.
1619         
1620 2007-05-26  Tobias Burnus  <burnus@net-b.de>
1621
1622         * gfortran.texi: Document the GFORTRAN_ERROR_DUMPCORE and
1623         GFORTRAN_ERROR_BACKTRACE environment variables.
1624
1625 2007-05-26  Paul Thomas  <pault@gcc.gnu.org>
1626
1627         PR fortran/31219
1628         * trans.h : Add no_function_call bitfield to gfc_se structure.
1629         Add stmtblock_t argument to prototype of get_array_ctor_strlen.
1630         * trans-array.c (get_array_ctor_all_strlen): New function.
1631         (get_array_ctor_strlen): Add new stmtblock_t argument and call
1632         new function for character elements that are not constants,
1633         arrays or variables.
1634         (gfc_conv_array_parameter): Call get_array_ctor_strlen to get
1635         good string length.
1636         * trans-intrinsic (gfc_conv_intrinsic_len): Add new argument
1637         to call of get_array_ctor_strlen.
1638
1639 2007-05-25  Kazu Hirata  <kazu@codesourcery.com>
1640
1641         * intrinsic.texi: Fix typos.
1642
1643 2007-05-25  Paul Thomas  <pault@gcc.gnu.org>
1644
1645         PR fortran/32047
1646         * trans-expr.c (gfc_apply_interface_mapping_to_expr): Change
1647         order in logic under EXPR_FUNCTION to handle functions with
1648         no arguments.
1649
1650 2007-05-23  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1651
1652         PR fortran/31716
1653         * array.c (spec_dimen_size): Test for correct BT_INTEGER type. 
1654
1655 2007-05-23  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1656
1657         PR fortran/32046
1658         * trans-expr.c (gfc_trans_zero_assign): Convert the result of
1659         TYPE_SIZE_UNIT into a signed type.
1660         (gfc_trans_array_copy):  Likewise.
1661         (gfc_trans_array_constructor_copy): Likewise.
1662         * trans-array.c (gfc_trans_create_temp_array): Likewise.
1663         (gfc_grow_array): Likewise.
1664         (gfc_array_init_size): Likewise.
1665         (gfc_duplicate_allocatable): Likewise.
1666         * trans-stmt.c (allocate_temp_for_forall_nest_1): Likewise.
1667
1668 2007-05-22  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1669
1670         PR fortran/18923
1671         * resolve.c (resolve_function): Don't call resolve_global_procedure if
1672         there is no name. Delete duplicated statement in ELSE clause.
1673
1674 2007-05-22 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1675
1676         PR fortran/31627
1677         * trans-array.c (gfc_trans_array_bound_check): Take extra argument to
1678         indicate whether we should check the upper bound in that dimension.
1679         (gfc_conv_array_index_offset): Check only the lower bound of the
1680         last dimension for assumed-size arrays.
1681         (gfc_conv_array_ref): Likewise.
1682         (gfc_conv_ss_startstride): Likewise.
1683
1684 2007-05-21  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1685             Daniel Franke  <franke.daniel@gmail.com>
1686
1687         PR fortran/32002
1688         * resolve.c (resolve_actual_arglist): Resolve actual argument after
1689         being identified as variable.
1690
1691 2007-05-21  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1692
1693         PR fortran/32027
1694         * trans-stmt.c (gfc_trans_do): Fix the value of loop variable
1695         when the loop ends.
1696
1697 2007-05-21  H.J. Lu  <hongjiu.lu@intel.com>
1698
1699         * trans-stmt.c (gfc_trans_do): Fix a typo in comment.
1700
1701 2007-05-21  Paul Thomas  <pault@gcc.gnu.org>
1702
1703         PR fortran/31867
1704         PR fortran/31994
1705         * trans-array.c (gfc_conv_expr_descriptor): Obtain the stored
1706         offset for non-descriptor, source arrays and correct for stride
1707         not equal to one before writing to field of output descriptor.
1708
1709 2007-05-20  Daniel Franke  <franke.daniel@gmail.com>
1710
1711         PR fortran/32001
1712         * check.c (check_rest): Improved argument conformance check and 
1713         fixed error message generation.
1714
1715 2007-05-19  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1716
1717         PR fortran/30820
1718         * Make-lang.in: Remove use of -Wno-error for expr.o, resolve.o,
1719         simplify.o and trans-common.o.
1720
1721 2007-05-19  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1722
1723         PR fortran/31974
1724         * trans-array.c (gfc_trans_auto_array_allocation): Avoid
1725         multiplication of mismatched types.
1726
1727 2007-05-18  Daniel Franke  <franke.daniel@gmail.com>
1728
1729         PR fortran/24633
1730         * symbol.c (gfc_add_flavor): Add the NAME to error message if
1731         available.
1732
1733 2007-05-15  Daniel Franke  <franke.daniel@gmail.com>
1734
1735         PR fortran/31919
1736         PR fortran/31929
1737         PR fortran/31930
1738         * intrinsic.c (check_specific): Check elemental intrinsics for
1739         rank and shape.
1740         (add_functions): Fixed dummy argument names of BESJN and BESYN.
1741         Fixed elemental status of MCLOCK and MCLOCK8.
1742         * check.c (check_rest): Added check for array conformance.
1743         (gfc_check_merge): Removed check for array conformance.
1744         (gfc_check_besn): Removed check for scalarity.
1745         * intrinsic.texi (CSHIFT, EOSHIFT): Fixed typos.
1746         (BESJN, BESYN): Clarified documentation.
1747
1748 2007-05-17  Tobias Burnus  <burnus@net-b.de>
1749
1750         * gfortran.texi (GFORTRAN_CONVERT_UNIT): Improve documentation.
1751
1752 2007-05-16  Brooks Moses  <brooks.moses@codesourcery.com>
1753
1754         PR fortran/18769
1755         PR fortran/30881
1756         PR fortran/31194
1757         PR fortran/31216
1758         PR fortran/31427
1759         * target-memory.c: New file.
1760         * target-memory.h: New file.
1761         * simplify.c: Add #include "target-memory.h".
1762         (gfc_simplify_transfer): Implement constant-
1763         folding for TRANSFER intrinsic.
1764         * Make-lang.in: Add dependencies on new target-memory.* files.
1765
1766 2007-05-15  Paul Brook  <paul@codesourcery.com>
1767
1768         * trans-types.c (gfc_type_for_size): Handle signed TImode.
1769
1770 2007-05-14  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1771
1772         PR fortran/30723
1773         * trans.h (gfor_fndecl_internal_malloc, gfor_fndecl_internal_malloc64,
1774         gfor_fndecl_internal_free): Remove prototypes.
1775         (gfor_fndecl_os_error, gfc_call_free, gfc_call_malloc): Add prototypes.
1776         * trans.c (gfc_call_malloc, gfc_call_free): New functions.
1777         * f95-lang.c (gfc_init_builtin_functions): Add __builtin_free
1778         and __builtin_malloc builtins.
1779         * trans-decl.c (gfor_fndecl_internal_malloc,
1780         gfor_fndecl_internal_malloc64, gfor_fndecl_internal_free): Remove.
1781         (gfor_fndecl_os_error): Add.
1782         (gfc_build_builtin_function_decls): Don't create internal_malloc,
1783         internal_malloc64 and internal_free library function declaration.
1784         Create os_error library call function declaration.
1785         * trans-array.c (gfc_trans_allocate_array_storage,
1786         gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
1787         gfc_conv_array_parameter, gfc_duplicate_allocatable): Use
1788         gfc_call_malloc and gfc_call_free instead of building calls to
1789         internal_malloc and internal_free.
1790         * trans-expr.c (gfc_conv_string_tmp): Likewise.
1791         * trans-stmt.c (gfc_do_allocate, gfc_trans_assign_need_temp,
1792         gfc_trans_pointer_assign_need_temp, gfc_trans_forall_1,
1793         gfc_trans_where_2: Likewise.
1794         * trans-intrinsic.c (gfc_conv_intrinsic_ctime,
1795         gfc_conv_intrinsic_fdate, gfc_conv_intrinsic_ttynam,
1796         gfc_conv_intrinsic_array_transfer, gfc_conv_intrinsic_trim): Likewise.
1797
1798 2007-05-14  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1799
1800         PR fortran/31725
1801         * trans-expr.c (gfc_conv_substring): Evaluate substring bounds
1802         only once.
1803
1804 2007-05-14  Rafael Avila de Espindola  <espindola@google.com>
1805
1806         * f95-lang.c (LANG_HOOKS_UNSIGNED_TYPE): Remove.
1807         * trans-intrinsic.c (gfc_conv_intrinsic_ishft): Use unsigned_type_for
1808         instead of gfc_unsigned_type.
1809         * trans-stmt.c (gfc_trans_do): Use unsigned_type_for instead of
1810         gfc_unsigned_type.
1811         * trans-types.c (gfc_unsigned_type): Remove.
1812         * trans-types.h (gfc_unsigned_type): Remove.
1813
1814 2007-05-12  Paul Thomas  <pault@gcc.gnu.org>
1815
1816         PR fortran/30746
1817         * resolve.c (check_host_association): New function that detects
1818         incorrect host association and corrects it.
1819         (gfc_resolve_expr): Call the new function for variables and
1820         functions.
1821         * match.h : Remove prototype for gfc_match_rvalue.
1822         * gfortran.h : Add prototype for gfc_match_rvalue.
1823
1824 2007-05-11 Paul Thomas <pault@gcc.gnu.org>
1825
1826         PR fortran/30876
1827         * trans-expr.c (gfc_conv_function_call): Reduce indirection for
1828         direct assignments of recursive array valued functions.
1829         * primary.c (gfc_match_rvalue): Correct error for recursive
1830         function calls such that directly recursive calls of scalar
1831         function without an explicit result are disallowed.
1832
1833 2007-05-11 Paul Thomas <pault@gcc.gnu.org>
1834
1835         PR fortran/30878
1836         * resolve.c (resolve_fl_namelist): It is not an error if the
1837         namelist element is the result variable of the enclosing
1838         function.  Search for the symbol in current and all parent
1839         namespaces for a potential conflict.
1840         * symbol.c (check_conflict): Remove the conflict between
1841         'in_namelist' and 'FL_PROCEDURE' because the symbol info
1842         is not available to exclude function result variables.
1843         * trans-io.c (nml_get_addr_expr): Use the fake result decl
1844         if the symbol is an implicit result variable.
1845
1846 2007-05-11  Paul Thomas  <pault@gcc.gnu.org>
1847
1848         PR fortran/31474
1849         * decl.c (get_proc_name): If an entry has already been declared
1850         as a module procedure, pick up the symbol and the symtree and
1851         use them for the entry.
1852
1853 2007-05-08  Paul Thomas  <pault@gcc.gnu.org>
1854
1855         PR fortran/31630
1856         * resolve.c (resolve_symbol): Remove the flagging mechanism from the
1857         formal namespace resolution and instead check that the formal
1858         namespace is not the current namespace.
1859
1860 2007-05-08  Paul Thomas  <pault@gcc.gnu.org>
1861
1862         PR fortran/31692
1863         * trans-array.c (gfc_conv_array_parameter): Convert full array
1864         references to the result of the procedure enclusing the call.
1865
1866 2007-05-08  Paul Thomas  <pault@gcc.gnu.org>
1867
1868         PR fortran/29397
1869         PR fortran/29400
1870         * decl.c (add_init_expr_to_sym): Expand a scalar initializer
1871         for a parameter array into an array expression with the right
1872         shape.
1873         * array.c (spec_dimen_size): Remove static attribute.
1874         * gfortran.h : Prototype for spec_dimen_size.
1875
1876 2007-05-07  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1877
1878         PR fortran/31399
1879         * trans-stmt.c (gfc_trans_do): Handle large loop counts.
1880
1881 2007-05-07  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1882
1883         PR fortran/31764
1884         * simplify.c (gfc_simplify_new_line): NEW_LINE can be simplified
1885         even for non constant arguments.
1886
1887 2007-05-06  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1888             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1889
1890         PR fortran/31201
1891         * gfortran.h: Add runtime error codes from libgfortran.h. Define
1892         MAX_UNIT_NUMBER.
1893         * trans.c (gfc_trans_runtime_check): Update the format of runtime error
1894         messages to match library runtime errors.  Use call to new library
1895         function runtime_error_at().
1896         * trans.h: Add prototype for new function gfc_trans_io_runtime_check.
1897         Add declaration for library functions runtime_error_at and
1898         generate_error.
1899         * trans_io.c (gfc_trans_io_runtime_check): New function.
1900         (set_parameter_value): Add error checking for UNIT numbers.
1901         (set_parameter_ref): Initialize the users variable to zero. 
1902         (gfc_trans_open): Move setting of unit number to after setting of common
1903         flags so that runtime error trapping can be detected.
1904         (gfc_trans_close): Likewise. (build_filepos): Likewise.
1905         (gfc_trans_inquire): Likewise. (build_dt): Likewise.
1906         * trans-decl.c: Add declarations for runtime_error_at and
1907         generate_error. (gfc_build_builtin_function_decls): Build function
1908         declarations for runtime_error_at and generate_error.
1909
1910 2007-05-06  Paul Thomas  <pault@gcc.gnu.org>
1911
1912         PR fortran/31540
1913         * resolve.c (resolve_fl_procedure): Resolve constant character
1914         lengths.
1915
1916 2007-05-05  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1917
1918         PR fortran/31251
1919         * decl.c (match_char_spec): Add check for invalid character lengths.
1920
1921 2007-05-04  Brooks Moses  <brooks.moses@codesourcery.com>
1922
1923         * intrinsic.texi (CMPLX): Document result kind.
1924         (COMPLEX): Add documentation.
1925
1926 2007-05-04  Daniel Franke  <franke.daniel@gmail.com>
1927
1928         PR fortran/31760
1929         * intrinsic.c (add_functions): Replaced calls to gfc_check_g77_math1
1930         by gfc_check_fn_r to avoid checks for scalarity.
1931         * check.c (gfc_check_besn): Removed check for scalarity.
1932         (gfc_check_g77_math1): Removed.
1933         * intrinsic.h (gfc_check_g77_math1): Removed.
1934
1935 2007-05-04  Daniel Franke  <franke.daniel@gmail.com>
1936
1937         * check.c (gfc_check_fseek_sub): Fixed typo.
1938
1939 2007-05-04  Daniel Franke  <franke.daniel@gmail.com>
1940
1941         PR fortran/22359
1942         * intrinsic.c (add_subroutines): Added FSEEK.
1943         * intrinsic.h (gfc_resolve_fseek_sub, gfc_check_fseek_sub): New.
1944         * iresolve.c (gfc_resolve_fseek_sub): New.
1945         * check.c (gfc_check_fseek_sub): New.
1946         * intrinsic.texi (FSEEK): Updated.
1947
1948 2007-05-04  Tobias Burnus  <burnus@net-b.de>
1949
1950         PR fortran/31803
1951         * expr.c (gfc_check_pointer_assign): Check for NULL pointer.
1952
1953 2007-05-04  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1954
1955         PR fortran/31251
1956         * simplify.c (gfc_simplify_len): Only simplify integer lengths.
1957
1958 2007-05-04  Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1959
1960         PR fortran/31781
1961         * simplify.c (gfc_simplify_repeat): Don't put function call with
1962         side effect in a gcc_assert().
1963
1964 2007-05-04  Tobias Burnus  <burnus@net-b.de>
1965
1966         PR fortran/25071
1967         * interface.c (compare_actual_formal): Check character length.
1968
1969 2007-05-01  Thomas Koenig  <tkoenig@gcc.gnu.org>
1970
1971         PR fortran/31732
1972         * dependency.c (gfc_full_array_ref_p):  If the reference is
1973         to a single element, check that the array has a single
1974         element and that the correct element is referenced.
1975
1976 2007-05-01  Daniel Franke  <franke.daniel@gmail.com>
1977
1978         * intrinsic.c (add_functions): Fixed ELEMENTAL specifications.
1979         (add_subroutines): Replaced magic numbers in function calls by
1980         ELEMENTAL and NOT_ELEMENTAL respectively.
1981         * intrinsic.texi (MVBITS): Changed class to elemental subroutine.
1982         (RANDOM_NUMBER): Changed class to subroutine.
1983         (HUGE, TINY): Changed class to inquiry function.
1984
1985 2007-04-30  Brooks Moses  <brooks.moses@codesourcery.com>
1986
1987         * trans-const.c (gfc_conv_mpz_to_tree): Use mpz_get_double_int.
1988         (gfc_conv_tree_to_mpz): New function.
1989         (gfc_conv_mpfr_to_tree): Use real_from_mpfr.
1990         (gfc_conv_tree_to_mpfr): New function.
1991         * trans-const.h: (gfc_conv_tree_to_mpz): New prototype.
1992         (gfc_conv_tree_to_mpfr): New prototype.
1993
1994 2007-04-30  Daniel Franke  <franke.daniel@gmail.com>
1995
1996         * intrinsic.texi (IERRNO): Changed class to non-elemental function.
1997         (LOG10): Removed COMPLEX as accepted argument type.
1998         (NEW_LINE): Changed class from elemental to inquiry function.
1999         (SIGN): Removed requirement of scalar arguments.
2000         (SNGL): Changed class to elemental function.
2001
2002 2007-04-29  Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2003
2004         PR fortran/31591
2005         * simplify.c (simplify_bound_dim): New function.
2006         (simplify_bound): Use the above. Perform simplification of LBOUND
2007         and UBOUND when DIM argument is not present.
2008
2009 2007-04-29  Daniel Franke  <franke.daniel@gmail.com>
2010
2011         * gfortran.texi: Cleaned up keyword index.
2012         * invoke.texi: Likewise.
2013         * intrinsic.texi: Likewise.
2014                         
2015 2007-04-29  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2016
2017         PR fortran/31645
2018         * scanner.c (load_file): Discard the byte order mark if one is
2019         found on the first non-preprocessor line of a file.
2020
2021 2007-04-29  Paul Thomas  <pault@gcc.gnu.org>
2022
2023         PR fortran/31711
2024         * trans-array.c (gfc_conv_resolve_dependencies): Create a temp
2025         whenever a dependency is found.
2026
2027 2007-04-28  Tobias Schlüter  <tobi@gcc.gnu.org>
2028
2029         * options.c (gfc_handle_option): Ensure requested free form line
2030         length is not too small.
2031
2032 2007-04-27  Brooks Moses  <brooks.moses@codesourcery.com>
2033
2034         * intrinsic.texi (Transfer): Improve documentation.
2035
2036 2007-04-27  Brooks Moses  <brooks.moses@codesourcery.com>
2037
2038         * gfortran.texi (Option Index): Add @samp as needed.
2039
2040 2007-04-27  Daniel Franke  <franke.daniel@gmail.com>
2041
2042         * gfortran.texi: Added node and menu entry for an option index.
2043         * invoke.texi: Moved command line option related entries of the concept 
2044         index to the option index.
2045
2046 2007-04-27  Daniel Franke  <franke.daniel@gmail.com>
2047
2048         * intrinsic.texi (AND, FPUT, FPUTC, MODULO, OR, SET_EXPONENT,
2049         XOR): Fixed examples.
2050
2051 2007-04-27  Daniel Franke  <franke.daniel@gmail.com>
2052
2053         * intrinsic.texi (PRODUCT, RESHAPE, SPACING, SPREAD, SUM, 
2054         SYSTEM_CLOCK, TRANSFER, UNPACK): New.
2055         (DATE_AND_TIME, CPU_TIME, RRSPACING): Added cross references.
2056
2057 2007-04-26  Daniel Franke  <franke.daniel@gmail.com>
2058
2059         * intrinsic.texi (NULL, PACK, PRESENT, REPEAT, SCAN, SHAPE, 
2060         SIZE, TRANSPOSE, TRIM, VERIFY): New.
2061         (ADJUSTL, ADJUSTR, INDEX): Added cross references.
2062         (INT, INT2, INT8, LONG): Enabled section header.
2063
2064 2007-04-25  Janne Blomqvist  <jb@gcc.gnu.org>
2065
2066         * module.c (module_char): Replace fgetc() with
2067         getc(). 
2068         (write_char): Replace fputc() with putc().
2069         * scanner.c (load_line): Replace fgetc() with getc().
2070         (gfc_read_orig_filename): Likewise.
2071
2072 2007-04-25  Tobias Burnus  <burnus@net-b.de>
2073
2074         PR fortran/31668
2075         * error.c (error_print): Fix %% support.
2076         * intrinsic.c (sort_actual): Improve error message.
2077         * resolve.c (resolve_actual_arglist): Allow %VAL for
2078         interfaces defined in the module declaration part.
2079
2080 2007-04-25  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2081
2082         PR libfortran/31299
2083         * intrinsic.texi (GETLOG): Update documentation to reflect
2084         library changes.
2085
2086 2007-04-24  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2087
2088         PR fortran/31587
2089         * module.c (write_char): Add character to the MD5 buffer.
2090         (read_md5_from_module_file): New function.
2091         (gfc_dump_module): Compute MD5 for new module file. Call
2092         read_md5_from_module_file. Only overwrite old module file
2093         if the new MD5 is different.
2094
2095 2007-04-23  Paul Thomas  <pault@gcc.gnu.org>
2096
2097         PR fortran/31630
2098         * resolve.c (resolve_symbol): Allow resolution of formal
2099         namespaces nested within formal namespaces coming from modules.
2100
2101         PR fortran/31620
2102         * trans-expr.c (gfc_trans_assignment): Make the call to
2103         gfc_trans_zero_assign conditional on the lhs array ref being
2104         the only reference.
2105
2106 2007-04-23  Tobias Burnus  <burnus@net-b.de>
2107
2108         * primary.c (match_integer_constant): Mention -fno-range-check
2109         in the error message.
2110
2111 2007-04-21  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2112
2113         PR fortran/31495
2114         * scanner.c (load_line):  Remove check for comment after ampersand and
2115         adjust tracking of ampersand.
2116
2117 2007-04-21  Andrew Pinski  <andrew_pinski@playstation.sony.com>
2118
2119         * f95-lang.c (lang_tree_node): Use GENERIC_NEXT
2120         instead of checking GIMPLE_STMT_P in chain_next.
2121
2122 2007-04-17  Tobias Schlüter  <tobi@gcc.gnu.org>
2123
2124         * trans-types.h (gfc_packed): New enum.
2125         (gfc_get_nodesc_array_type): Change prototype to use new enum.
2126         * trans-types.c (gfc_get_nodesc_array): Use gfc_packed for
2127         argument packed.  Adapt all references to values accordingly.
2128         (gfc_sym_type): Use enum values in call to gfc_get_nodesc_array.
2129         (gfc_get_derived_type): Likewise.
2130         * trans-array.c (gfc_build_constant_array_constructor): Likewise.
2131         * trans-expr.c (gfc_get_interface_mapping_charlen): Changed packed
2132         argument to type gfc_packed.
2133         (gfc_add_interface_mapping): Use enum values in call to
2134         gfc_get_interface_mapping.
2135         * trans-decl.c (gfc_build_dummy_array_decl): Adapt to use enum
2136         values when determining packing.
2137
2138         * trans-decl.c (gfc_finish_decl): Remove unused second argument
2139         'init'.  Simplify code accordingly.  Remove calls to
2140         gfc_fatal_error in favor of gcc_assert.
2141         (create_function_arglist): Remove second argument from calls to
2142         gfc_finish-decl.
2143         (gfc_trans_dummy_character): Likewise.
2144
2145         * arith.h: Update copyright years.
2146         * dependency.h: Likewise.
2147         * gfortran.h: Likewise.
2148         * lang-specs.h: Likewise.
2149         * parse.h: Likewise.
2150         * symbol.c: Likewise.
2151         * trans.h: Likewise.
2152         * trans.c: Likewise.
2153         * trans-array.c: Likewise.
2154         * trans-common.c: Likewise.
2155         * trans-const.h: Likewise.
2156         * trans-const.c: Likewise.
2157         * trans-decl.c: Likewise.
2158         * trans-expr.c: Likewise.
2159         * trans-io.c: Likewise.
2160         * trans-openmp.c: Likewise.
2161         * trans-types.h: Likewise.
2162         * types.def: Likewise.
2163
2164 2007-04-17  Tobias Schlüter  <tobi@gcc.gnu.org>
2165
2166         PR fortran/31144
2167         * decl.c (gfc_sym_mangled_identifier): Use capital letters in name
2168         mangling.
2169         (gfc_sym_mangled_function_id): Likewise.
2170
2171 2007-04-15  Paul Thomas  <pault@gcc.gnu.org>
2172
2173         PR fortran/31204
2174         * primary.c (check_for_implicit_index): New function to check
2175         that a host associated variable is not an undeclared implied
2176         do loop index.
2177         (gfc_match_rvalue, match_variable): Use it and reset the
2178         implied_index attribute.
2179         * gfortran.h : Add the implied_index field to symbol_attribute.
2180         * match.c (gfc_match_iterator): Mark the iterator variable
2181         with the new attribute.
2182         * decl.c (build_sym): Reset the new attribute.
2183
2184 2007-04-15  Kazu Hirata  <kazu@codesourcery.com>
2185
2186         * gfc-internals.texi: Fix typos.
2187         * simplify.c: Fix a comment typo.
2188
2189 2007-04-14  Bernhard Fischer  <aldot@gcc.gnu.org>
2190
2191         * primary.c: Commentary typo fix; Add question about redundant (?)
2192         set.
2193
2194 2007-04-14  Paul Thomas  <pault@gcc.gnu.org>
2195
2196         PR fortran/29507
2197         PR fortran/31404
2198         * expr.c (scalarize_intrinsic_call): New function to
2199         scalarize elemental intrinsic functions in initialization
2200         expressions.
2201         (check_init_expr): Detect elemental intrinsic functions
2202         in initalization expressions and call previous.
2203
2204 2007-04-13  Tobias Burnus  <burnus@net-b.de>
2205
2206         PR fortran/31559
2207         * primary.c (match_variable): External functions
2208         are no variables.
2209
2210 2007-04-13  Paul Thomas  <pault@gcc.gnu.org>
2211
2212         PR fortran/31550
2213         * trans-types.c (copy_dt_decls_ifequal): Do not get pointer
2214         derived type components.
2215
2216 2007-04-13  Tobias Schlüter  <tobi@gcc.gnu.org>
2217
2218         PR fortran/18937
2219         * resolve.c: Include obstack.h and bitmap.h.  New variable
2220         labels_obstack.
2221         (code_stack): Add tail and reachable_labels fields.
2222         (reachable_labels): New function.
2223         (resolve_branch): Rework to use new fields in code_stack.
2224         (resolve_code): Call reachable_labels.
2225         (resolve_codes): Allocate and free labels_obstack.
2226
2227 2007-04-12  Tobias Schlüter  <tobi@gcc.gnu.org>
2228
2229         PR fortran/31250
2230         * decl.c (match_char_spec): Move check for negative CHARACTER
2231         length ...
2232         * resolve.c (resolve_charlen): ... here.
2233         (resolve_types): Resolve CHARACTER lengths earlier.
2234
2235 2007-04-12  Daniel Franke  <franke.daniel@gmail.com>
2236
2237         PR fortran/31234
2238         * intrinsic.texi (RANDOM_SEED, RANDOM_NUMBER): New.
2239
2240 2007-04-12  Tobias Schlüter  <tobi@gcc.gnu.org>
2241
2242         PR fortran/31266
2243         * primary.c (gfc_variable_attr): Don't copy string length if it
2244         doesn't make sense.
2245         * resolve.c (resolve_code): Clarify error message.
2246
2247         PR fortran/31471
2248         * decl.c (gfc_match_end): Also check for construct name in END
2249         FORALL and END WERE statements.
2250         * match.c (match_case_eos): Use uppercase for statement name in
2251         error message.
2252         (match_elsewhere): Construct name may appear iff construct has a
2253         name.
2254
2255         * trans-types.c: Update copyright years.  Reformat long comment
2256         explaining array descriptor format.  Remove obsolete mention of
2257         TYPE_SET.
2258
2259         * arith.c (gfc_arith_uplus): Rename to ...
2260         (gfc_arith_identity): ... this.
2261         (gfc_parentheses): New function.
2262         (gfc_uplus): Adapt to renamed function.
2263         * arith.h (gfc_parentheses): Add prototype.
2264         * expr.c (gfc_copy_expr): Deal with INTRINSIC_PARENTHESES.
2265         (simplifiy_intrinsic_op): Treat INTRINSIC_UPLUS separately from
2266         INTRINSIC_PARENTHESES.
2267
2268 2007-04-12  Tobias Burnus  <burnus@net-b.de>
2269
2270         PR fortran/31472
2271         * decl.c (match_attr_spec): Allow PRIVATE/PUBLIC
2272         attribute in type definitions.
2273         (gfc_match_private): Allow PRIVATE statement only
2274         in specification part of modules.
2275         (gfc_match_public): Ditto for PUBLIC.
2276         (gfc_match_derived_decl): Allow PRIVATE/PUBLIC attribute only in
2277         specificification part of modules.
2278
2279 2007-04-07  Paul Thomas  <pault@gcc.gnu.org>
2280
2281         PR fortran/31257
2282         * intrinsic.c (add_functions): Add ref. to gfc_resolve_achar.
2283         * intrinsic.h : Add prototype for gfc_resolve_achar.
2284         * iresolve.c (gfc_resolve_achar): New function.
2285
2286 2007-04-07  Paul Thomas  <pault@gcc.gnu.org>
2287
2288         PR fortran/30880
2289         * resolve.c (resolve_fl_variable): Set flag to 2 for automatic
2290         arrays.  Make condition for automatic array error explicit.
2291         If a dummy, no error on an INTENT(OUT) derived type.
2292
2293 2007-04-07  Paul Thomas  <pault@gcc.gnu.org>
2294
2295         PR fortran/30872
2296         * expr.c (find_array_element): Correct arithmetic for rank > 1.
2297
2298 2007-04-07  Paul Thomas  <pault@gcc.gnu.org>
2299
2300         PR fortran/31222
2301         * check.c (numeric_check): If an expresson has not got a type,
2302         see if it is a symbol for which a default type applies.
2303
2304 2007-04-07  Paul Thomas  <pault@gcc.gnu.org>
2305
2306         PR fortran/31214
2307         * trans-decl.c (gfc_get_symbol_decl): Allow unreferenced use
2308         associated symbols.
2309
2310 2007-04-07  Paul Thomas  <pault@gcc.gnu.org>
2311
2312         PR fortran/31293
2313         * symbol.c (gfc_check_function_type): New function.
2314         * gfortran.h : Add prototype for previous.
2315         * parse.c (parse_progunit): Call it after parsing specification
2316         statements.
2317
2318 2007-04-05  Paul Thomas  <pault@gcc.gnu.org>
2319
2320         PR fortran/31483
2321         * trans-expr.c (gfc_conv_function_call): Give a dummy
2322         procedure the correct type if it has alternate returns.
2323
2324 2007-04-05  Paul Thomas  <pault@gcc.gnu.org>
2325
2326         PR fortran/31292
2327         * decl.c (gfc_match_modproc): Go up to the top of the namespace
2328         tree to find the module namespace for gfc_get_symbol.
2329
2330 2007-04-03  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2331
2332         PR fortran/31304
2333         * fortran/gfortran.h (gfc_charlen_int_kind): New prototype.
2334         * fortran/trans-types.c (gfc_charlen_int_kind): New variable.
2335         (gfc_init_types): Define gfc_charlen_int_kind. 
2336         * fortran/trans.h (gfor_fndecl_string_repeat): Remove prototype.
2337         * fortran/trans-decl.c (gfor_fndecl_string_repeat): Delete.
2338         (gfc_build_intrinsic_function_decls): Don't set
2339         gfor_fndecl_string_repeat.
2340         * fortran/trans-intrinsic.c (gfc_conv_intrinsic_repeat): Rewrite
2341         so that we don't have to call a library function.
2342         * fortran/simplify.c (gfc_simplify_repeat): Perform the necessary
2343         checks on the NCOPIES argument, and work with arbitrary size
2344         arguments.
2345
2346 2007-03-31  Tobias Burnus  <burnus@net-b.de>
2347
2348         * intrinsic.c (add_functions): Fix name of dummy argument
2349           for new_line and exit intrinsic.
2350
2351 2007-03-31  Paul Thomas  <pault@gcc.gnu.org>
2352
2353         PR fortran/31160
2354         * gfortran.texi: Add a section for the %VAL, %REF and %LOC
2355         extensions.
2356
2357 2007-03-30  Rafael Avila de Espindola  <espindola@google.com>
2358
2359         * trans-types.c (gfc_signed_or_unsigned_type): Remove.
2360         (gfc_unsigned_type): Use get_signed_or_unsigned_type instead of
2361         gfc_signed_or_unsigned_type.
2362         (gfc_signed_type): Ditto.
2363         * trans-types.h (gfc_signed_or_unsigned_type): Remove.
2364         * f95-lang.c (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove.
2365
2366 2007-03-30  Tobias Schlüter  <tobi@gcc.gnu.org>
2367
2368         * symbol.c (gfc_find_gsymbol): Simplify, don't unconditionally
2369         descend into all branches.
2370
2371 2007-03-29  Tobias Schlüter  <tobi@gcc.gnu.org>
2372
2373         * intrinsic.c (conv_name): Let gfc_get_string handle the format.
2374         (find_conv): Compare pointers instead of calling strcmp.
2375         (find_sym): Likewise, but ensure that the compared pointer is in
2376         the global string table.
2377
2378 2007-03-28  Tobias Schlüter  <tobi@gcc.gnu.org>
2379
2380         * gfc-internals.texi: Fix output filename.  Merge type index into
2381         concept index.  Start documentation of gfc_code structure.
2382
2383 2007-03-26  Brooks Moses  <brooks.moses@codesourcery.com>
2384
2385         * gfc-internals.texi: New file,
2386         * Make-lang.in: Add rules to convert it to dvi, pdf, and info.
2387
2388 2007-03-26  Brooks Moses  <brooks.moses@codesourcery.com>
2389  
2390         * error.c (show_locus): Remove always-false test.
2391
2392 2007-03-26  Brooks Moses  <brooks.moses@codesourcery.com>
2393
2394         * lang.opt: Minor edits to descriptions.
2395
2396 2007-03-25  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2397
2398         PR fortran/30877
2399         * fortran/interface.c (check_operator_interface): Implement
2400         the standard checks on user operators extending intrinsic operators.
2401         * fortran/resolve.c (resolve_operator): If the ranks of operators
2402         don't match, don't error out but try the user-defined ones first.
2403
2404 2007-03-24  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2405
2406         PR fortran/30655
2407         * expr.c (check_dimension): Fix logic of comparisons.
2408
2409 2007-03-24  Paul Thomas  <pault@gcc.gnu.org>
2410
2411         PR fortran/31215
2412         * trans-expr.c (gfc_apply_interface_mapping_to_expr): Return
2413         int result that is non-zero if the expression is the function
2414         result.  Only the characteristics of the result expression
2415         can be used in a procedure interface, so simplify LEN in situ
2416         using its character length.
2417
2418         PR fortran/31209
2419         PR fortran/31200
2420         * trans-expr.c (gfc_conv_function_call): Do not use
2421         gfc_conv_expr_reference for actual pointer function with formal
2422         target because a temporary is created that does not transfer
2423         the reference correctly.  Do not indirect formal pointer
2424         functions since it is the function reference that is needed.
2425
2426 2007-03-24  Brooks Moses  <brooks.moses@codesourcery.com>
2427
2428         * gfortran.h: Edit comments on GFC_STD_*.
2429
2430 2007-03-23  Brooks Moses  <brooks.moses@codesourcery.com>
2431
2432         * invoke.texi: Misc. small typo fixes.
2433         (-Wcharacter-truncation): Add.
2434         (-Wnonstd-intrinsics): Correct spelling.
2435         (-std=): Edit.
2436         (-fintrinsic-modules-path): Add.
2437
2438 2007-03-23  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2439
2440         PR fortran/30834
2441         * arith.c (complex_pow): Rewrite to handle large power.
2442         (gfc_arith_power): Handle large power in the real and integer
2443         cases.
2444
2445 2007-03-22  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
2446
2447         PR fortran/31262
2448         * trans-const.c (gfc_conv_mpz_to_tree): Allow integer constants
2449         larger than twice the width of a HOST_WIDE_INT.
2450
2451 2006-03-22  Paul Thomas  <pault@gcc.gnu.org>
2452
2453         PR fortran/31193
2454         * trans-intrinsic.c (gfc_size_in_bytes): Remove function.
2455         (gfc_conv_intrinsic_array_transfer): Remove calls to previous.
2456         Explicitly extract TREE_TYPEs for source and mold.  Use these
2457         to calculate length of source and mold, except for characters,
2458         where the se string_length is used.  For mold, the TREE_TYPE is
2459         recalculated using gfc_get_character_type_len so that the
2460         result is correctly cast for character literals and substrings.
2461         Do not use gfc_typenode_for_spec for the final cast.
2462
2463 2007-03-22  Tobias Schlüter  <tobi@gcc.gnu.org>
2464
2465         PR fortran/20897
2466         * decl.c (gfc_match_derived_decl): Reliably reject
2467         'doubleprecision' and 'doublecomplex' as type names.
2468
2469 2007-03-19  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
2470
2471         PR fortran/31203
2472         * trans-expr.c (gfc_trans_init_string_length): Length should
2473         never be negative.
2474         (gfc_conv_function_call): Likewise.
2475
2476 2007-03-18  Paul Thomas  <pault@gcc.gnu.org>
2477
2478         PR fortran/30531
2479         PR fortran/31086
2480         * symbo.c : Add gfc_derived_types.
2481         (gfc_free_dt_list): Free derived type list gfc_derived_types.
2482         (gfc_free_namespace): Remove call to gfc_free_dt_list.
2483         (gfc_symbol_done_2): Call  gfc_free_dt_list.
2484         * gfortran.h : Declare gfc_derived_types to be external. Remove
2485         derived types field from gfc_namespace.
2486         * resolve.c (resolve_fl_derived): Refer to gfc_derived types
2487         rather than namespace derived_types.
2488         (resolve_fntype): Remove special treatment for module
2489         derived type functions.
2490         * trans-types.c (gfc_get_derived_type): Remove search for like
2491         derived types.  Finish by copying back end declaration to like
2492         derived types in the derived type list gfc_derived_types.
2493
2494         2007-03-17  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
2495
2496         PR fortran/31120
2497         * trans-expr.c (gfc_conv_powi): Make n argument unsigned hwi.
2498         (gfc_conv_cst_int_power): Handle integer exponent with care,
2499         since it might be too large for us.
2500
2501 2007-03-17  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
2502
2503         PR fortran/31184
2504         * invoke.texi: Fix typo.
2505
2506 2007-03-16  Tobias Burnus  <burnus@net-b.de>
2507
2508         * trans-decl.c (gfc_generate_function_code): Use all arguments of
2509           set_std.
2510
2511 2007-03-15  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
2512
2513         * gfortran.h (gfc_option_t): Add flag_backtrace field.
2514         * lang.opt: Add -fbacktrace option.
2515         * invoke.texi: Document the new option.
2516         * trans-decl.c (gfc_build_builtin_function_decls): Add new
2517         option to the call to set_std.
2518         * options.c (gfc_init_options, gfc_handle_option): Handle the
2519         new option.
2520
2521 2007-03-15  Tobias Burnus  <burnus@gcc.gnu.org>
2522             Paul Thomas  <pault@gcc.gnu.org>
2523
2524         PR fortran/30922
2525         * decl.c (gfc_match_import): If the parent of the current name-
2526         space is null, try looking for an imported symbol in the parent
2527         of the proc_name interface.
2528         * resolve.c (resolve_fl_variable): Do not check for blocking of
2529         host association by a same symbol, if the symbol is in an
2530         interface body.
2531
2532 2007-03-15  Paul Thomas  <pault@gcc.gnu.org>
2533
2534         PR fortran/30879
2535         * decl.c (match_data_constant): Before going on to try to match
2536         a name, try to match a structure component.
2537
2538
2539         PR fortran/30870
2540         * resolve.c (resolve_actual_arglist): Do not reject a generic
2541         actual argument if it has a same name specific interface.
2542
2543         PR fortran/31163
2544         * trans-array.c (parse_interface): Do not nullify allocatable
2545         components if the symbol has the saved attribute.
2546
2547 2007-03-14  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
2548
2549         * trans-array.c (gfc_trans_auto_array_allocation): Replace
2550         fold(convert()) by fold_convert().
2551         (gfc_duplicate_allocatable): Likewise.
2552         * trans-intrinsic.c (gfc_conv_intrinsic_dot_product): Use
2553         build_int_cst instead of converting an integer_zero_node
2554         to the final type.
2555
2556 2007-03-14  Jakub Jelinek  <jakub@redhat.com>
2557
2558         * module.c (mio_typespec): Don't look at ts->cl if not BT_CHARACTER.
2559
2560 2007-03-13  Brooks Moses  <brooks.moses@codesourcery.com>
2561
2562         PR fortran/30933
2563         PR fortran/30948
2564         PR fortran/30953
2565         * intrinsics.texi (CHDIR): Fix argument names, note
2566         that STATUS must be a default integer.
2567         (CTIME): Fix argument names, note that RESULT must
2568         be a default integer.
2569         (EXIT): Note that STATUS must be a default integer.
2570
2571 2007-03-13  Brooks Moses  <brooks.moses@codesourcery.com>
2572
2573         PR fortran/28068
2574         * intrinsic.texi: General whitespace cleanup, remove
2575         comment about missing intrinsics.
2576         (menu): Add lines for new entries listed below.
2577         (ACOSH): Mention specific function DACOSH, correct
2578         description phrasing.
2579         (ASINH): Mention specific function DASINH, correct
2580         description phrasing.
2581         (ATANH): Mention specific function DATANH, correct
2582         description phrasing.
2583         (COS): Add index entry for CCOS.
2584         (CPU_TIME): Correct "REAL" to "REAL(*)".
2585         (EXP): Add index entry for CEXP.
2586         (INT): Correct argument name to "A".
2587         (INT2): New entry.
2588         (INT8): New entry.
2589         (LONG): New entry.
2590         (MAX): Add index entries for specific variants.
2591         (MCLOCK): New entry.
2592         (MCLOCK8): New entry.
2593         (SECNDS): Adjust to a more standard form.
2594         (SECOND): New entry.
2595         (TIME): Add cross-reference to MCLOCK.
2596         (TIME8): Add cross-reference to MCLOCK8.
2597
2598 2007-03-11  Paul Thomas  <pault@gcc.gnu.org>
2599
2600         PR fortran/30883
2601         * parse.c (parse_interface): Use the default types from the
2602         formal namespace if a function or its result do not have a type
2603         after parsing the specification statements.
2604
2605 2007-03-08  Brooks Moses  <brooks.moses@codesourcery.com>
2606
2607         * intrinsic.texi: (ICHAR) Improve internal I/O note.
2608         (ACHAR): Reference it.
2609         (CHAR): Reference it.
2610         (IACHAR): Reference it.
2611
2612 2007-03-08  Brooks Moses  <brooks.moses@codesourcery.com>
2613
2614         * intrinsic.texi: (LINK) Document function form.
2615         (RENAME): Likewise.
2616         (SYMLNK): Likewise.
2617         (SYSTEM): Likewise.
2618         (UNLINK): Likewise.
2619
2620 2007-03-08  Brooks Moses  <brooks.moses@codesourcery.com>
2621
2622         * intrinsic.texi: minor typo fixes, removed prologue.
2623         (FSEEK): moved to correct place in alphabetical order.
2624
2625 2007-03-08  Daniel Franke  <franke.daniel@gmail.com>
2626
2627         PR fortran/30947
2628         * check.c (gfc_check_alarm_sub): Added check for default integer 
2629         kind of status argument.
2630         * iresolve.c (gfc_resolve_alarm_sub): Removed conversion of 
2631         status argument.
2632         * intrinsic.texi (ALARM): Extended documentation.
2633
2634 2007-03-08  Daniel Franke  <franke.daniel@gmail.com>
2635
2636         * intrinsic.texi (GERROR, ISATTY, TTYNAM): New.
2637         (ABORT, FLUSH, FNUM, IRAND, MALLOC, SIGNAL, SRAND): Fixed typo.
2638         * intrinsic.c (add_subroutines): Adjusted dummy argument names 
2639         of GERROR and TTYNAM.
2640
2641 2007-07-08  Tobias Burnus  <burnus@net-b.de>
2642
2643         * module.c (gfc_match_use): Support renaming of operators
2644         in USE statements.
2645         * gfortran.texi (Fortran 2003 Status): Document support of
2646         renaming of operators.
2647
2648 2007-07-08  Tobias Burnus  <burnus@net-b.de>
2649
2650         PR fortran/30973
2651         * module.c (read_module): Always import module name as symbol.
2652         (gfc_match_use): Disallow module name in the only clause of
2653         a use statement.
2654
2655 2007-03-08  Paul Thomas  <pault@gcc.gnu.org>
2656
2657         PR fortran/31011
2658         * expr.c (find_array_section): Correct arithmetic for section
2659         size.
2660
2661 2007-03-07  Brooks Moses  <brooks.moses@codesourcery.com>
2662
2663         * iresolve.c (gfc_resolve_ishftc): Correct s_kind value.
2664
2665 2007-03-06  Daniel Franke  <franke.daniel@gmail.com>
2666
2667         PR documentation/30950
2668         * intrinsic.texi (AND, CPU_TIME): Fix dummy argument names.
2669         (FREE): Fix call syntax.
2670
2671 2007-03-06  Brooks Moses  <brooks.moses@codesourcery.com>
2672
2673         * intrinsic.texi: Limit column widths to a total of .85.
2674
2675 2007-03-05  Brooks Moses  <brooks.moses@codesourcery.com>
2676
2677         * gfortran.texi (GFortran and G77): Rewrite completely.
2678
2679 2007-03-05  Brooks Moses  <brooks.moses@codesourcery.com>
2680
2681         * match.c (gfc_match_name): Expanded comment.
2682
2683 2007-03-05  Brooks Moses  <brooks.moses@codesourcery.com>
2684
2685         * gfortran.texi (Old-style kind specifications): Document
2686         special handling of old-style kind specifiers for COMPLEX.
2687         * decl.c (gfc_match_old_kind_spec): Document kind/bytesize
2688         assumptions for COMPLEX in comment.
2689
2690 2007-03-05  Brooks Moses  <brooks.moses@codesourcery.com>
2691
2692         PR 31050
2693         * gfortranspec.c (lang_specific_driver): Update program
2694         name and copyright date.
2695
2696 2007-03-03  Paul Thomas  <pault@gcc.gnu.org>
2697
2698         PR fortran/30882
2699         * check.c (dim_rank_check): The shape of subsections of
2700         assumed-size arrays is known.
2701
2702 2007-03-02  Paul Thomas  <pault@gcc.gnu.org>
2703             Tobias Burnus  <burnus@net-b.de>
2704
2705         PR fortran/30873
2706         * decl.c (gfc_match_entry): Remove erroneous entry result check.
2707
2708 2007-03-01  Brooks Moses  <brooks.moses@codesourcery.com>
2709
2710         * Make-lang.in: Add install-pdf target as copied from
2711         automake v1.10 rules.
2712
2713 2007-03-01  Tobias Burnus  <burnus@net-b.de>
2714
2715         PR fortran/30865
2716         * trans-intrinsic.c (gfc_conv_intrinsic_size): Compare pointers.
2717
2718 2007-02-28  Tobias Burnus  <burnus@net-b.de>
2719             Paul Thomas  <pault@gcc.gnu.org>
2720
2721         PR fortran/30888
2722         PR fortran/30887
2723         * resolve.c (resolve_actual_arglist): Allow by-value
2724         arguments and non-default-kind for %VAL().
2725         * trans-expr.c (conv_arglist_function): Allow
2726         non-default-kind for %VAL().
2727
2728 2007-02-28  Tobias Burnus  <burnus@net-b.de>
2729
2730         PR fortran/30968
2731         * primary.c (next_string_char): Correct reading a character
2732         after the delimiter.
2733         (match_string_constant): Print warning message only once.
2734
2735 2007-02-27  Richard Guenther  <rguenther@suse.de>
2736
2737         * trans-array.c (structure_alloc_comps): Use correct type
2738         for null pointer constant.
2739
2740 2007-02-26  Brooks Moses  <brooks.moses@codesourcery.com>
2741
2742         * gfortran.texi: Standardize title page, remove version number
2743         from copyright page.
2744
2745 2007-02-26  Thomas Koenig  <Thomas.Koenig@online.de>
2746             Paul Thomas  <pault@gcc.gnu.org>
2747
2748         PR fortran/30865
2749         * trans-intrinsic.c (gfc_conv_intrinsic_size):
2750         If dim is an optional argument, check for its
2751         presence and call size0 or size1, respectively.
2752
2753 2007-02-23  Paul Thomas <pault@gcc.gnu.org>
2754
2755         PR fortran/30660
2756         * resolve.c (has_default_initializer): New function.
2757         (resolve_fl_variable): Call has_default_initializer to determine if
2758         the derived type has a default initializer to its ultimate
2759         components.
2760
2761
2762 2007-02-22  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2763
2764         * options.c (set_default_std_flags): New function to consolidate
2765         setting the flags.
2766         (gfc_init_options): Use new function.
2767         (gfc_handle_option): Use new function.
2768
2769 2007-02-22  Brooks Moses  <brooks.moses@codesourcery.com>
2770
2771         * gfortran.texi (Old-style kind specifications): Document
2772         special handling of old-style kind specifiers for COMPLEX.
2773         * decl.c (gfc_match_old_kind_spec): Documented kind/bytesize
2774         assumptions in comment.
2775
2776 2007-02-21  Bernhard Fischer  <aldot@gcc.gnu.org>
2777
2778         * parse.c (next_free): Gooble spaces after OpenMP sentinel.
2779
2780 2007-02-20  Thomas Koenig  <Thomas.Koenig@online.de>
2781
2782         PR fortran/30869
2783         * match.c (gfc_match_iterator): Remove conflict between
2784         loop variable and pointer.
2785
2786 2007-02-20  Tobias Burnus  <burnus@net-b.de>
2787
2788         PR fortran/30522
2789         * symbol.c (gfc_add_volatile): Allow to set VOLATILE
2790           attribute for host-associated variables.
2791         * gfortran.h (symbol_attribute): Save namespace
2792           where VOLATILE has been set.
2793         * trans-decl.c (gfc_finish_var_decl): Move variable
2794           declaration to the top.
2795
2796 2007-02-20  Tobias Burnus  <burnus@net-b.de>
2797
2798         PR fortran/30783
2799         * resolve.c (resolve_symbol): Add character dummy VALUE check.
2800
2801 2007-02-19  Thomas Koenig  <Thomas.Koenig@online.de>
2802
2803         PR libfortran/30533
2804         * fortran/iresolve.c (gfc_resolve_maxloc): Remove coercion of
2805         argument to default integer.
2806         (gfc_resolve_minloc): Likewise.
2807
2808 2007-02-18  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2809
2810         PR fortran/30681
2811         * options.c (gfc_init_options): Relax warning level for obsolescent.
2812         * match.c (match_arithmetic_if): Change to obsolescent from deleted.
2813         (gfc_match_if): Same.
2814
2815 2007-02-18  Roger Sayle  <roger@eyesopen.com>
2816
2817         * trans-array.c (gfc_build_constant_array_constructor): When the
2818         shape of the constructor is known, use that to construct the
2819         gfc_array_spec.
2820         (gfc_trans_constant_array_constructor): Initialize the "info"
2821         information for all of the dimensions of the array constructor.
2822         (constant_array_constructor_loop_size): New function.
2823         (gfc_trans_array_constructor): Use it to determine whether a
2824         loop is suitable for "constant array constructor" optimization.
2825
2826         * trans-intrinsic.c (gfc_conv_intrinsic_anyall): Use fold_build2
2827         instead of build2, to avoid conditions like "(a != b) != 0".
2828
2829 2007-02-18  Roger Sayle  <roger@eyesopen.com>
2830             Paul Thomas <pault@gcc.gnu.org>
2831
2832         PR fortran/30400
2833         * match.c (match_forall_iterator): Use gfc_match_expr instead
2834         of gfc_match_variable to match the iterator variable.  Return
2835         MATCH_NO if not a variable.  Remove the reset of the symbol's
2836         flavor in cleanup.
2837
2838 2007-02-16  Tobias Burnus  <burnus@net-b.de>
2839
2840         PR fortran/30793
2841         * trans-decl.c (gfc_generate_function_code): Do not initialize
2842         pointers to derived components.
2843
2844 2007-02-15  Sandra Loosemore  <sandra@codesourcery.com>
2845             Brooks Moses  <brooks.moses@codesourcery.com>
2846             Lee Millward  <lee.millward@codesourcery.com>
2847
2848         * trans-expr.c (gfc_conv_power_op): Use build_call_expr.
2849         (gfc_conv_string_tmp): Likewise.
2850         (gfc_conv_concat_op): Likewise.
2851         (gfc_build_compare_string): Likewise.
2852         (gfc_conv_function_call): Use build_call_list instead of build3.
2853
2854         * trans-array.c (gfc_trans_allocate_array_storage): Use
2855         build_call_expr.
2856         (gfc_grow_array): Likewise.
2857         (gfc_trans_array_ctor_element): Likewise.
2858         (gfc_trans_array_constructor_value): Likewise.
2859         (gfc_array_allocate): Likewise.
2860         (gfc_array_deallocate): Likewise.
2861         (gfc_trans_auto_array_allocation): Likewise.
2862         (gfc_trans_dummy_array_bias): Likewise.
2863         (gfc_conv_array_parameter): Likewise.
2864         (gfc_trans_dealloc_allocated): Likewise.
2865         (gfc_duplicate_allocatable): Likewise.
2866
2867         * trans-openmp.c (gfc_trans_omp_barrier): Use build_call_expr.
2868         (gfc_trans_omp_flush): Likewise.
2869
2870         * trans-stmt.c (gfc_conv_elementel_dependencies): Use build_call_expr.
2871         (gfc_trans_pause): Likewise.
2872         (gfc_trans_stop): Likewise.
2873         (gfc_trans_character_select): Likewise.
2874         (gfc_do_allocate): Likewise.
2875         (gfc_trans_assign_need_temp): Likewise.
2876         (gfc_trans_pointer_assign_need_temp): Likewise.
2877         (gfc_trans_forall_1): Likewise.
2878         (gfc_trans_where_2): Likewise.
2879         (gfc_trans_allocate): Likewise.
2880         (gfc_trans_deallocate): Likewise.
2881
2882         * trans.c (gfc_trans_runtime_check): Use build_call_expr.
2883
2884         * trans-io.c (gfc_trans_open): Use build_call_expr.
2885         (gfc_trans_close): Likewise.
2886         (build_filepos): Likewise.
2887         (gfc_trans_inquire): Likewise.
2888         (NML_FIRST_ARG): Delete.
2889         (NML_ADD_ARG): Delete.
2890         (transfer_namelist_element): Use build_call_expr.
2891         (build_dt): Likewise.
2892         (gfc_trans_dt_end): Likewise.
2893         (transfer_expr): Likewise.
2894         (transfer_array-desc): Likewise.
2895
2896         * trans-decl.c (gfc_generate_function_code): Use build_call_expr.
2897         (gfc_generate_constructors): Likewise.
2898
2899         * trans-intrinsic.c (gfc_conv_intrinsic_ctime): Use build_call_expr.
2900         (gfc_conv_intrinsic_fdate): Likewise.
2901         (gfc_conv_intrinsic_ttynam): Likewise.
2902         (gfc_conv_intrinsic_array_transfer): Likewise.
2903         (gfc_conv_associated): Likewise.
2904         (gfc_conv_intrinsic_si_kind): Likewise.
2905         (gfc_conv_intrinsic_trim): Likewise.
2906         (gfc_conv_intrinsic_repeat: Likewise.
2907         (gfc_conv_intrinsic_iargc): Likewise.
2908
2909 2007-02-14  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2910
2911         PR fortran/30779
2912         * scanner.c (gfc_next_char_literal): Add check for end of file after
2913         call to advance_line.
2914
2915 2007-02-14  Steven G. Kargl  <kargl@gcc.gnu.org>
2916
2917         PR fortran/30799
2918         * primary.c (match_logical_constant): Return MATCH_ERROR on invalid
2919         kind.
2920
2921 2007-02-14  Steven G. Kargl  <kargl@gcc.gnu.org>
2922
2923         * misc.c (gfc_typename): Fix potential buffer overflow.
2924
2925 2007-02-13  Paul Thomas  <pault@gcc.gnu.org>
2926
2927         PR fortran/30554
2928         * module.c (read_module): Set pointer_info to referenced if the
2929         symbol has no namespace.
2930
2931 2007-02-12  Nick Clifton  <nickc@redhat.com>
2932
2933         * lang.opt: Add Warning attribute to warning options.
2934
2935 2007-02-11  Daniel Franke  <franke.daniel@gmail.com>
2936
2937         * intrinsic.texi (HOSTNM): Fix typographical error in syntax.
2938         (SLEEP): Added section and documentation.
2939
2940 2007-02-11  Tobias Schlüter  <tobi@gcc.gnu.org>
2941
2942         PR fortran/30478
2943         * decl.c (add_init_expr_to_sym): Remove ENUM specific code.
2944         (variable_decl): Likewise.  Rewrap comment.
2945         (match_attr_spec): Remove ENUM specific code.
2946         (gfc_match_enum): Fix typo in error message.
2947         (enumerator_decl): New function.
2948         (gfc_match_enumerator_def): Use enumerator_decl instead of
2949         variable_decl.  Adapt code accordingly.
2950
2951 2007-02-11  Paul Thomas  <pault@gcc.gnu.org>
2952
2953         PR fortran/30554
2954         * module.c (find_symtree_for_symbol): New function to return
2955         a symtree that is not a "unique symtree" given a symbol.
2956         (read_module): Do not automatically set pointer_info to
2957         referenced because this inhibits the generation of a unique
2958         symtree.  Recycle the existing symtree if possible by calling
2959         find_symtree_for_symbol.
2960
2961         PR fortran/30319
2962         * decl.c (add_init_expr_to_sym): Make new charlen for an array
2963         constructor initializer.
2964
2965 2007-02-10  Richard Henderson  <rth@redhat.com>, Jakub Jelinek  <jakub@redhat.com>
2966
2967         * f95-lang.c (gfc_init_builtin_functions): Add __emutls_get_address
2968         and __emutls_register_common.
2969         * openmp.c (gfc_match_omp_threadprivate): Don't error if !have_tls.
2970         * trans-common.c (build_common_decl): Don't check have_tls.
2971         * trans-decl.c (gfc_finish_var_decl): Likewise.
2972         * types.def (BT_WORD, BT_FN_PTR_PTR): New.
2973         (BT_FN_VOID_PTR_WORD_WORD_PTR): New.
2974
2975 2007-02-09  Tobias Burnus  <burnus@net-b.de>
2976
2977         PR fortran/30512
2978         * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc,
2979           gfc_conv_intrinsic_minmaxval): Use HUGE-1 for most negative integer.
2980
2981 2007-02-09  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
2982
2983         PR fortran/30720
2984         * trans-array.c (gfc_trans_create_temp_array): Remove use of the
2985         function argument. Always generate code for negative extent.
2986         Simplify said code.
2987         * trans-array.h (gfc_trans_create_temp_array): Change prototype.
2988         * trans-expr.c (gfc_conv_function_call): Remove use of last argument
2989         of gfc_trans_create_temp_array.
2990         * trans-intrinsic.c (gfc_conv_intrinsic_array_transfer): Likewise.
2991         * trans-stmt.c (gfc_conv_elemental_dependencies): Likewise.
2992
2993 2007-02-08  Roger Sayle  <roger@eyesopen.com>
2994
2995         * trans-stmt.c (gfc_trans_forall_1): Optimize the cases where the
2996         mask expression is a compile-time constant (".true." or ".false.").
2997
2998 2007-02-04  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
2999
3000         PR fortran/30611
3001         * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Evaluate
3002         arguments only once. Generate check that NCOPIES argument is not
3003         negative.
3004
3005 2007-02-04  Steven G. Kargl <kargl@gcc.gnu.org>
3006
3007         PR fortran/30605
3008         * fortran/invoke.texi: Update documentation.
3009         * fortran/options.c (gfc_post_options): Deal with tabs with -std=f2003
3010         and -pedantic.
3011
3012 2007-02-03  Kazu Hirata  <kazu@codesourcery.com>
3013
3014         * trans-array.c: Fix a comment typo.
3015
3016 2007-02-03  Paul Thomas  <pault@gcc.gnu.org>
3017
3018         PR fortran/30514
3019         * array.c (match_array_element_spec): If the length of an array is
3020         negative, adjust the upper limit to make it zero length.
3021
3022         PR fortran/30660
3023         * resolve.c (pure_function, resolve_function): Initialize name to
3024         null to clear up build warnings.
3025         (resolve_fl_variable): Look at components explicitly to check for
3026         default initializer, rather than using gfc_default_initializer.
3027
3028 2007-02-02  Steven G. Kargl <kargl@gcc.gnu.org>
3029
3030         PR fortran/30683
3031         * resolve.c (resolve_generic_f): Check for non-NULL sym.
3032
3033 2007-02-02  Roger Sayle  <roger@eyesopen.com>
3034
3035         * trans.c (gfc_build_array_ref): Use STRIP_TYPE_NOPS to eliminate
3036         NON_LVALUE_EXPR nodes and useless type conversions.
3037
3038 2007-02-02  Paul Thomas  <pault@gcc.gnu.org>
3039
3040         PR fortran/30284
3041         PR fortran/30626
3042         * trans-expr.c (gfc_conv_aliased_arg): Remove static attribute
3043         from function and make sure that substring lengths are
3044         translated.
3045         (is_aliased_array): Remove static attribute.
3046         * trans.c : Add prototypes for gfc_conv_aliased_arg and
3047         is_aliased_array.
3048         * trans-io.c (set_internal_unit): Add the post block to the
3049         arguments of the function.  Use is_aliased_array to check if
3050         temporary is needed; if so call gfc_conv_aliased_arg.
3051         (build_dt): Pass the post block to set_internal_unit and
3052         add to the block after all io activiy is done.
3053
3054 2007-02-01  Roger Sayle  <roger@eyesopen.com>
3055
3056         * trans-array.c (gfc_conv_expr_descriptor): We don't need to use
3057         a temporary array to pass a constant non-character array constructor.
3058         Generalize the descriptor generation code to handle scalarizer
3059         "info" without an array reference.
3060
3061 2007-02-01  Roger Sayle  <roger@eyesopen.com>
3062
3063         * dependency.c (gfc_check_dependency) <EXPR_ARRAY>: Implement
3064         dependency checking for array constructors.
3065
3066 2007-02-01  Roger Sayle  <roger@eyesopen.com>
3067
3068         * trans-stmt.c (compute_overall_iter_number): Document function
3069         arguments.  Generalize "unconditional forall nest with constant
3070         bounds" optimization to eliminate unconditional inner loops with
3071         constant bounds.
3072
3073 2007-01-31  Tobias Burnus  <burnus@net-b.de>
3074
3075         PR fortran/30520
3076         * interface.c (compare_actual_formal): Check conformance between
3077           actual and VOLATILE dummy arguments.
3078         * symbol.c (gfc_add_volatile): Allow setting of VOLATILE
3079           multiple times in different scopes.
3080         * decl.c (gfc_match_volatile): Search symbol in host association.
3081
3082 2007-01-31  Kazu Hirata  <kazu@codesourcery.com>
3083
3084         * simplify.c, trans-array.c: Fix comment typos.
3085
3086 2007-01-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3087
3088         * invoke.texi (Code Gen Options): Fix abbreviation typo.
3089         * intrinsic.texi (ACCESS, LSHIFT, RSHIFT): Fix typos.
3090
3091 2007-01-30  Steve Ellcey  <sje@cup.hp.com>
3092
3093         PR fortran/30432
3094         * trans-types.c (gfc_get_function_type): Do not add void_type_node
3095         to empty arg list.
3096         * trans-decl.c (create_function_arglist): Change assert.
3097
3098 2007-01-29  Paul Thomas  <pault@gcc.gnu.org>
3099
3100         PR fortran/30554
3101         * module.c (read_module): If a symbol is excluded by an ONLY
3102         clause, check to see if there is a symtree already loaded. If
3103         so, attach the symtree to the pointer_info.
3104
3105 2007-01-28  Thomas Koenig  <Thomas.Koenig@online.de>
3106
3107         PR libfortran/30389
3108         * gfortran.h: Remove gfc_simplify_init_1.
3109         * arith.h: Remove third argument from gfc_compare_string.
3110         * arith.c (gfc_compare_expression): Remove third argument
3111         from call to gfc_compare_string.
3112         (gfc_compare_string): Remove third argument xcoll_table.
3113         Remove use of xcoll_table.
3114         * misc.c (gfc_init_1): Remove call to gfc_simplify_init_1.
3115         * simplify.c (ascii_table): Remove.
3116         (xascii_table): Likewise.
3117         (gfc_simplify_achar): ICE if extract_int fails.  Remove use of
3118         ascii_table.  Warn if -Wsurprising and value < 0 or > 127.
3119         (gfc_simplify_char): ICE if extract_int fails. Error if
3120         value < 0 or value > 255.
3121         (gfc_simplify_iachar): Remove use of xascii_table.
3122         Char values outside of 0..255 are an ICE.
3123         (gfc_simplify_lge): Remove use of xascii_table.
3124         (gfc_simplify_lgt): Likewise.
3125         (gfc_simplify_lle): Likewise.
3126         (gfc_simplify_llt): Likewise.
3127         (invert_table): Remove.
3128         (gfc_simplify_init_1): Remove.
3129
3130 2007-01-27  Roger Sayle  <roger@eyesopen.com>
3131
3132         * trans-stmt.c (forall_info): Replace the next_nest and outer
3133         fields that previously implemented a doubly-linked list with a
3134         single prev_nest field (singly-linked list).
3135         (gfc_trans_nested_forall_loop): The nested_forall_info argument
3136         now denotes the innermost FORALL in the loop nest.
3137         (compute_overall_iter_number): Use prev_nest instead of next_nest.
3138         (gfc_trans_forall_1): Link/cons the new "info" to the head of the
3139         nested_forall_info linked list.  Free the current "info" when done.
3140
3141 2007-01-27  Paul Thomas  <pault@gcc.gnu.org>
3142
3143         PR fortran/30407
3144         * trans-expr.c (gfc_conv_operator_assign): New function.
3145         * trans.h : Add prototype for gfc_conv_operator_assign.
3146         * trans-stmt.c (gfc_trans_where_assign): Add a gfc_symbol for
3147         a potential operator assignment subroutine.  If it is non-NULL
3148         call gfc_conv_operator_assign instead of the first assignment.
3149         ( gfc_trans_where_2): In the case of an operator assignment,
3150         extract the argument expressions from the code for the
3151         subroutine call and pass the symbol to gfc_trans_where_assign.
3152         resolve.c (resolve_where, gfc_resolve_where_code_in_forall,
3153         gfc_resolve_forall_body): Resolve the subroutine call for
3154         operator assignments.
3155
3156 2007-01-26  Steven Bosscher  <stevenb.gcc@gmail.com>
3157             Steven G. Kargl <kargl@gcc.gnu.org>
3158
3159         PR fortran/30278
3160         * fortran/io.c (next_char): Deal with backslash escaped characters.
3161         Issue warnings in non -std=gnu cases.
3162         * fortran/primary.c (next_string_char): Issue warnings in non
3163
3164 2007-01-26  Tobias Burnus  <burnus@net-b.de>
3165
3166         * lang-specs.h: Add support for .f03 and .F03 extensions.
3167         * gfortran.texi: Document .f03 extension.
3168         * options.c (form_from_filename): Recognize .f03.
3169
3170 2007-01-25  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3171
3172         PR fortran/30437
3173         * lang.opt (Wall): Remove RejectNegative.
3174         * options.c (gfc_handle_option): Wall can be disabled.
3175         (set_Wall): Add a parameter for disabling Wall.
3176         
3177 2007-01-23  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
3178
3179         PR fortran/30532
3180         * scanner.c (load_line): Remove check fot ctrl-z and don't gobble.
3181         
3182 2007-01-23  Paul Thomas  <pault@gcc.gnu.org>
3183
3184         PR fortran/30481
3185         * match.c (gfc_match_namelist): Add check for assumed size character
3186         in namelist and provide error if found.
3187
3188 2007-01-21  Brooks Moses  <brooks.moses@codesourcery.com>
3189
3190         * intrinsic.texi (ACHAR): Added cross-references.
3191         (CHAR): Put cross-references in alphabetical order.
3192         (IACHAR): Added cross-references.
3193         (ICHAR): Added cross-references.
3194
3195 2007-01-20  Brooks Moses  <brooks.moses@codesourcery.com>
3196
3197         * intrinsic.texi: Edited all "Syntax" examples to a consistent form.
3198         (MAXVAL): Corrected description of result characteristics.
3199         (MINVAL): Same.
3200         (UMASK): Added documentation.
3201
3202 2007-01-20  Steven G. Kargl  <kargl@gcc.gnu.org>
3203
3204         * openmp.c, matchexp.c, module.c, scanner.c, resolve.c, st.c,
3205         parse.c, primary.c, options.c, misc.c, simplify.c: Next installment
3206         in the massive whitespace patch.
3207
3208 2007-01-20  Roger Sayle  <roger@eyesopen.com>
3209
3210         * module.c (mio_array_ref): The dimen_type fields of an array ref
3211         are an enumerated type and can't be read/written directly with a
3212         call to mio_integer.  Instead loop over and cast each element.
3213
3214 2007-01-20  Roger Sayle  <roger@eyesopen.com>
3215
3216         * dependency.c (gfc_full_array_ref_p): Check that ref->next is NULL,
3217         i.e. that the ARRAY_REF doesn't mention components.
3218         * trans-array.c (gfc_constant_array_constructor_p): Export external
3219         function renamed from constant_array_constructor_p.
3220         (gfc_build_constant_array_constructor): Export.
3221         (gfc_trans_array_constructor): Update call to the renamed function
3222         constant_array_constructor_p.
3223         * trans-array.h (gfc_constant_array_constructor_p): Prototype here.
3224         (gfc_build_constant_array_constructor): Likewise.
3225         * trans-expr.c (gfc_build_memcpy_call): New helper function split
3226         out from gfc_trans_array_copy.
3227         (gfc_trans_array_copy): Use gfc_build_memcpy_call.
3228         (gfc_trans_array_constructor_copy): New function to optimize
3229         assigning an entire array from a constant array constructor.
3230         (gfc_trans_assignment): Call gfc_trans_array_constructor_copy
3231         when appropriate.
3232
3233 2007-01-20  Roger Sayle  <roger@eyesopen.com>
3234
3235         * trans-intrinsic.c (gfc_conv_intrinsic_sign): New branchless
3236         implementation for the SIGN intrinsic with integral operands.
3237         (gfc_conv_intrinsic_minmax): Fix whitespace.
3238
3239 2007-01-20  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
3240
3241         * gfortran.h (gfc_options_t): Add flag_allow_leading_underscore.
3242         * lang.opt: Add -fallow-leading-underscore.
3243         * match.c (gfc_match_name): Allow leading underscore in symbol
3244         name if -fallow-leading-underscore is used.
3245         * symbol.c (gfc_get_default_type): Add special case for symbol
3246         names beginning with an underscore.
3247         * trans-decl.c (gfc_get_extern_function_decl,
3248         gfc_build_intrinsic_function_decls): Add _gfortran prefix to
3249         library symbols selected_int_kind, selected_real_kind and 
3250         all specifics.
3251         * options.c (gfc_init_options, gfc_handle_option): Handle the
3252         new -fallow-leading-underscore option.
3253
3254 2007-01-20  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
3255
3256         PR fortran/30446
3257         * options.c (gfc_handle_module_path_options): Path used in -J
3258         option is now added to the module search path.
3259
3260 2007-01-20  Richard Guenther  <rguenther@suse.de>
3261
3262         PR fortran/30223
3263         * f95-lang.c (gfc_init_builtin_functions): Provide cbrt and
3264         cexpi builtins if we have TARGET_C99_FUNCTIONS.  Provide
3265         sincos builtins if the target has sincos.
3266
3267 2007-01-19  Brooks Moses  <brooks.moses@codesourcery.com>
3268
3269         * intrinsic.texi (MATMUL): Corrected a typo.
3270         (MAX): Separated @var arguments.
3271         (MIN): Separated @var arguments.
3272
3273 2007-01-19  Brooks Moses  <brooks.moses@codesourcery.com>
3274
3275         * intrinsic.texi: general whitespace cleanup.
3276         (menu): Added TIME8, removed UNMASK.
3277         (AINT): Clarified argument requirement.
3278         (ANINT): Clarified argument requirement.
3279         (CEILING): Clarified argument requirement.
3280         (CHAR): Clarified argument requirement.
3281         (CMPLX): Clarified argument requirement.
3282         (DCMPLX): Clarified argument requirement.
3283         (FGET): Line rewrapping.
3284         (FLOOR): Clarified argument requirement.
3285         (GMTIME): Added documentation.
3286         (IAND): Added cross-reference.
3287         (IBCLR): Added cross-reference.
3288         (IBSET): Added cross-reference.
3289         (IEOR): Added cross-reference.
3290         (INT): Collapsed examples, clarified argument requirement.
3291         (IOR): Added cross-references.
3292         (LEN_TRIM): Corrected result kind.
3293         (LINK): Added cross-reference.
3294         (LLT): Removed "documentation pending".
3295         (LOGICAL): Added documentation.
3296         (LSHIFT): Added documentation.
3297         (LTIME): Added documentation.
3298         (MATMUL): Added documentation.
3299         (MAX): Added documentation.
3300         (MAXLOC): Added documentation.
3301         (MAXVAL): Added documentation.
3302         (MERGE): Added documentation.
3303         (MIN): Added documentation.
3304         (MINLOC): Added documentation.
3305         (MINVAL): Added documentation.
3306         (MVBITS): Moved to correct place, added documentation.
3307         (NOT): Added documentation.
3308         (PERROR): Added documentation.
3309         (RAN): Moved to correct place, added documentation.
3310         (REAL): Clarified argument requirement.
3311         (RENAME): Added documentation.
3312         (RSHIFT): Clarified argument requirement.
3313         (SIGN): Corrected table specification.
3314         (SYMLNK): Added documentation.
3315         (SYSTEM): Added documentation.
3316         (TIME): Added documentation.
3317         (TIME8): Added section and documentation.
3318         (UNMASK): Removed erroneous section.
3319
3320 2007-01-18  H.J. Lu  <hongjiu.lu@intel.com>
3321
3322         * trans-stmt.c (compute_overall_iter_number): Fix a typo.
3323
3324 2007-01-18  Roger Sayle  <roger@eyesopen.com>
3325
3326         * trans-expr.c (copyable_array_p): Consider user derived types without
3327         allocatable components to be copyable.
3328
3329 2007-01-18  Roger Sayle  <roger@eyesopen.com>
3330
3331         * trans-stmt.c (compute_overall_iter_number): Enhance to precompute
3332         the number of interations in unconditional FORALL nests with constant
3333         bounds.
3334
3335 2007-01-18  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
3336             Tobias Burnus  <burnus@net-b.de>
3337
3338         PR libfortran/29649
3339         * gfortran.h (gfc_option_t): Add flag_dump_core.
3340         * lang.opt: Add -fdump-core option.
3341         * invoke.texi: Document the new options.
3342         * trans-decl.c (gfc_build_builtin_function_decls): Add new
3343           options to the call to set_std.
3344         * options.c (gfc_init_options, gfc_handle_option): Set the
3345           new options.
3346
3347 2007-01-17  Paul Thomas  <pault@gcc.gnu.org>
3348
3349         PR fortran/30476
3350         * module.c (load_generic_interfaces): Make the marking of the
3351         symbol as ambiguous conditional on the module names being
3352         different.
3353         (write_generic): Ensure that the generic interface has a
3354         non-NULL module field.
3355
3356 2007-01-16  Roger Sayle  <roger@eyesopen.com>
3357
3358         PR fortran/30404
3359         * trans-stmt.c (forall_info): Remove pmask field.
3360         (gfc_trans_forall_loop): Remove NVAR argument, instead assume that
3361         NVAR covers all the interation variables in the current forall_info.
3362         Add an extra OUTER parameter, which specified the loop header in
3363         which to place mask index initializations.
3364         (gfc_trans_nested_forall_loop): Remove NEST_FLAG argument.
3365         Change the semantics of MASK_FLAG to only control the mask in the
3366         innermost loop.
3367         (compute_overall_iter_number): Optimize the trivial case of a
3368         top-level loop having a constant number of iterations.  Update
3369         call to gfc_trans_nested_forall_loop.  Calculate the number of
3370         times the inner loop will be executed, not to size of the 
3371         iteration space.
3372         (allocate_temp_for_forall_nest_1): Reuse SIZE as BYTESIZE when
3373         sizeof(type) == 1.  Tidy up.
3374         (gfc_trans_assign_need_temp): Remove NEST_FLAG argument from calls
3375         to gfc_trans_nested_forall_loop.
3376         (gfc_trans_pointer_assign_need_temp): Likewise.
3377         (gfc_trans_forall_1): Remove unused BYTESIZE, TMPVAR, SIZEVAR and
3378         LENVAR local variables.  Split mask allocation into a separate
3379         hunk/pass from mask population.  Use allocate_temp_for_forall_nest
3380         to allocate the FORALL mask with the correct size.  Update calls
3381         to gfc_trans_nested_forall_loop.
3382         (gfc_evaluate_where_mask): Update call to
3383         gfc_trans_nested_forall_loop.
3384         (gfc_trans_where_2): Likewise.
3385
3386 2007-01-15  Paul Thomas  <pault@gcc.gnu.org>
3387
3388         PR fortran/28172
3389         * trans-stmt.c (gfc_trans_call): If it does not have one, get
3390         a backend_decl for an alternate return.
3391
3392         PR fortran/29389
3393         * resolve.c (pure_function): Statement functions are pure. Note
3394         that this will have to recurse to comply fully with F95.
3395
3396         PR fortran/29712
3397         * resolve.c (resolve_function): Only a reference to the final
3398         dimension of an assumed size array is an error in an inquiry
3399         function.
3400
3401         PR fortran/30283
3402         * resolve.c (resolve_function): Make sure that the function
3403         expression has a type.
3404
3405 2007-01-14  Paul Thomas  <pault@gcc.gnu.org>
3406
3407         PR fortran/30410
3408         * trans-decl.c (gfc_sym_mangled_function_id): Module, external
3409         symbols must not have the module name prepended.
3410
3411 2007-01-11  Thomas Koenig  <Thomas.Koenig@online.de>
3412
3413         PR libfortran/30415
3414         * iresolve.c (gfc_resolve_maxloc): If the rank
3415         of the return array is nonzero and we process an
3416         integer array smaller than default kind, coerce
3417         the array to default integer.
3418         * iresolve.c (gfc_resolve_minloc): Likewise.
3419
3420 2007-01-11  Brooks Moses  <brooks.moses@codesourcery.com>
3421
3422         * simplify.c: Update copyright to 2007.
3423         * scanner.c: Same.
3424
3425 2007-01-11  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
3426
3427         PR fortran/30430
3428         * scanner.c (gfc_release_include_path): Free gfc_option.module_dir
3429         only once!
3430
3431 2007-01-09  Brooks Moses  <brooks.moses@codesourcery.com>
3432
3433         * simplify.c (gfc_simplify_ibclr): Fix POS comparison.
3434         (gfc_simplify_ibset): Same.
3435
3436 2007-01-09  Brooks Moses  <brooks.moses@codesourcery.com>
3437
3438         PR 30381
3439         PR 30420
3440         * simplify.c (convert_mpz_to_unsigned): New function.
3441         (convert_mpz_to_signed): New function, largely based on
3442         twos_complement().
3443         (twos_complement): Removed.
3444         (gfc_simplify_ibclr): Add conversions to and from an
3445         unsigned representation before bit-twiddling.
3446         (gfc_simplify_ibset): Same.
3447         (gfc_simplify_ishftc): Add checks for overly large
3448         constant arguments, only check the third argument if
3449         it's present, carry over high bits into the result as
3450         appropriate, and perform the final conversion back to
3451         a signed representation using the correct sign bit.
3452         (gfc_simplify_not): Removed unnecessary masking.
3453
3454 2007-01-09  Paul Thomas  <pault@gcc.gnu.org>
3455
3456         PR fortran/30408
3457         * resolve.c (resolve_code): Use the code->expr character length
3458         directly to set length of llen.
3459
3460 2007-01-09  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
3461
3462         PR fortran/30408
3463         * lang.opt: Add Wcharacter_truncation option.
3464         * options.c (gfc_init_options): Initialize
3465         gfc_option.warn_character_truncation to zero.
3466         (gfc_handle_option): Add case for OPT_Wcharacter_truncation.
3467
3468 2007-01-08  Steven G. Kargl  <kargl@gcc.gnu.org>
3469
3470         * interface.c, intrinsic.c, gfortranspec.c, io.c, f95-lang.c,
3471         iresolve.c, match.c: Update Copyright years.  Whitespace.
3472
3473 2007-01-08  Richard Guenther  <rguenther@suse.de>
3474
3475         * trans-io.c (transfer_array_desc): Use build_int_cst instead
3476         of build_int_cstu.
3477
3478 2007-01-08  Roger Sayle  <roger@eyesopen.com>
3479
3480         * trans-array.c (constant_array_constructor_p): New function to
3481         determine whether an array constructor consists only of constant
3482         elements, and if so return it's size.
3483         (gfc_build_constant_array_constructor): Construct a statically
3484         initialized gfortran array for a given EXPR_ARRAY.
3485         (gfc_trans_constant_array_constructor): Efficiently scalarize
3486         a constant array constructor.
3487         (gfc_trans_array_constructor): Tidy up use of CONST_STRING.
3488         Special case scalarization of constant array constructors, all of
3489         whose elements are specified, using constant_array_constructor_p 
3490         and gfc_trans_constant_array_constructor.
3491         (gfc_conv_scalarized_array_ref): Check whetger info->offset is zero
3492         before adding it to index, to avoid creating a NON_LVALUE_EXPR.
3493
3494 2007-01-08  Kazu Hirata  <kazu@codesourcery.com>
3495
3496         gfortran.texi: Fix typos.
3497
3498 2007-01-07  Steven G. Kargl  <kargl@gcc.gnu.org>
3499
3500         * decl.c, dump-parse-tree.c, error.c, data.c, expr.c, dependency.c,
3501         convert.c: Update Copyright dates.  Fix whitespace.
3502
3503 2007-01-07  Bernhard Fischer  <aldot@gcc.gnu.org>
3504
3505         * data.c (gfc_assign_data_value): Fix whitespace.
3506
3507 2007-01-07  Bernhard Fischer  <aldot@gcc.gnu.org>
3508
3509         * trans-array.c (gfc_trans_create_temp_array, gfc_array_init_size):
3510         Commentary typo fix.
3511
3512 2007-01-07  Bernhard Fischer  <aldot@gcc.gnu.org>
3513
3514         PR fortran/27698
3515         * match.c (gfc_match_name): Print diagnostics for invalid
3516         character in names.
3517
3518 2007-01-06  Steven G. Kargl  <kargl@gcc.gnu.org>
3519
3520         * array.c: Fix whitespace in comment table.
3521
3522 2007-01-06  Steven G. Kargl  <kargl@gcc.gnu.org>
3523
3524         * array.c, bbt.c, check.c: Update copyright years.  Whitespace.
3525
3526 2007-01-06  Steven G. Kargl  <kargl@gcc.gnu.org>
3527
3528         * arith.c: Update copyright years.  Whitespace.
3529
3530 2007-01-05  Roger Sayle  <roger@eyesopen.com>
3531
3532         * trans-expr.c (gfc_trans_assignment_1): New subroutine to scalarize
3533         array assignments split out from gfc_trans_assignment.
3534         (gfc_trans_array_copy): New function to implement array to array
3535         copies via calls to __builtin_memcpy.
3536         (copyable_array_p): New helper function to identify an array of
3537         simple/POD types, that may be copied/assigned using memcpy.
3538         (gfc_trans_assignment): Use gfc_trans_array_copy to handle simple
3539         whole array assignments considered suitable by copyable_array_p.
3540         Invoke gfc_trans_assignment_1 to perform the fallback scalarization.
3541
3542 2007-01-05  Roger Sayle  <roger@eyesopen.com>
3543
3544         * trans-array.c (gfc_trans_array_constructor_value): Make the
3545         static const "data" array as TREE_READONLY.
3546         * trans-stmt.c (gfc_trans_character_select): Likewise.
3547
3548 2007-01-05  Roger Sayle  <roger@eyesopen.com>
3549
3550         * trans-array.c (gfc_conv_loop_setup): Test whether the loop
3551         stride is one, to avoid fold_build2 introducing a useless
3552         NON_LVALUE_EXPR node.
3553
3554 2007-01-05  Tobias Burnus  <burnus@net-b.de>
3555
3556         * symbol.c (check_conflict): Fix error message.
3557
3558 2007-01-05  Paul Thomas  <pault@gcc.gnu.org>
3559
3560         PR fortran/23232
3561         * decl.c (gfc_in_match_data, gfc_set_in_match_data): New
3562         functions to signal that a DATA statement is being matched.
3563         (gfc_match_data): Call gfc_set_in_match_data on entry and on
3564         exit.
3565         * gfortran.h : Add prototypes for above.
3566         * expr.c (check_init_expr): Avoid check on parameter or
3567         variable if gfc_in_match_data is true.
3568         (gfc_match_init_expr): Do not call error on non-reduction of
3569         expression if gfc_in_match_data is true.
3570
3571         PR fortran/27996
3572         PR fortran/27998
3573         * decl.c (gfc_set_constant_character_len): Add boolean arg to
3574         flag array constructor resolution.  Warn if string is being
3575         truncated.  Standard dependent error if string is padded. Set
3576         new arg to false for all three calls to
3577         gfc_set_constant_character_len.
3578         * match.h : Add boolean arg to prototype for
3579         gfc_set_constant_character_len.
3580         * gfortran.h : Add warn_character_truncation to gfc_options.
3581         * options.c (set_Wall): Set warn_character_truncation if -Wall
3582         is set.
3583         * resolve.c (resolve_code): Warn if rhs string in character
3584         assignment has to be truncated.
3585         * array.c (gfc_resolve_character_array_constructor): Set new
3586         argument to true for call to gfc_set_constant_character_len.
3587
3588 2007-01-05  Tobias Burnus  <burnus@net-b.de>
3589
3590         PR fortran/29624
3591         * interface.c (compare_parameter_intent): New function.
3592           (check_intents): Support pointer intents.
3593         * symbol.c (check_conflict): Support pointer intents,
3594           better conflict_std message.
3595         * expr.c (gfc_check_assign,gfc_check_pointer_assign):
3596           Support pointer intents.
3597         * resolve.c (resolve_deallocate_expr,resolve_allocate_expr):
3598           Support pointer intents.
3599
3600 2007-01-03  Brooks Moses  <brooks.moses@codesourcery.com>
3601
3602         PR 30371
3603         * check.c (gfc_check_kill_sub): Add checks for non-scalar
3604         arguments.
3605
3606 2007-01-04  Brooks Moses  <brooks.moses@codesourcery.com>
3607
3608         * intrinsic.texi: Minor cleanup, reflowing overlong
3609         paragraphs, and correcting whitespace.
3610
3611 2007-01-04  Brooks Moses  <brooks.moses@codesourcery.com>
3612
3613         * intrinsic.texi (LBOUND): Add documentation.
3614         (LGE): Add documentation.
3615         (LGT): Add documentation.
3616         (LINK): Add documentation.
3617         (LLE): Add documentation.
3618         (LLT): Add documentation.
3619         (LNBLNK): Add documentation.
3620         (UBOUND): Add documentation.
3621         (UNLINK): Add documentation.
3622
3623 2007-01-04  Brooks Moses  <brooks.moses@codesourcery.com>
3624
3625         * intrinsic.texi (IAND): Clarify argument specifications.
3626         (IBCLR): Add documentation.
3627         (IBITS): Add documentation.
3628         (IBSET): Add documentation.
3629         (IEOR): Add documentation.
3630         (IERRNO): Add documentation.
3631         (INDEX): Add documentation.
3632         (IOR): Add documentation.
3633         (ISHFT): Add documentation.
3634         (ISHFTC): Add documentation.
3635         (KILL): Add documentation.
3636         (LEN_TRIM): Add documentation.
3637
3638 2007-01-04  Brooks Moses  <brooks.moses@codesourcery.com>
3639
3640         PR 30235
3641         * interface.c (compare_actual_formal): check for
3642         alternate returns when iterating over non-present
3643         arguments.
3644
3645 2007-01-04  Brooks Moses  <brooks.moses@codesourcery.com>
3646
3647         * invoke.texi: Update manpage copyright to include 2007.
3648
3649 2007-01-04  Brooks Moses  <brooks.moses@codesourcery.com>
3650
3651         * gfortran.texi: Update copyright to include 2007.
3652         * intrinsic.texi: Update copyright to include 2007.
3653         * invoke.texi: Update copyright to include 2007.
3654
3655 2007-01-02  Tobias Burnus  <burnus@net-b.de>
3656             Jakub Jelinek  <jakub@redhat.com>
3657
3658         PR fortran/30276
3659         * scanner.c (open_included_file): Revert patch.
3660           (gfc_open_included_file): Support absolute pathnames.
3661           (gfc_open_intrinsic_module): Support absolute pathnames.
3662
3663 2007-01-03  Brooks Moses  <brooks.moses@codesourcery.com>
3664
3665         * gfortran.texi (GNU Fortran and GCC): Rewrite
3666
3667 2007-01-03  Brooks Moses  <brooks.moses@codesourcery.com>
3668
3669         * gfortran.texi (Introduction): Lower "Part I:
3670         Introduction" to a chapter, renumber Parts II and III to
3671         Parts I and II.
3672         * intrinsic.texi (Introduction): Rename to "Introduction
3673         to Intrinsics" to avoid conflict with the new chapter.
3674
3675 2007-01-03  Brooks Moses  <brooks.moses@codesourcery.com>
3676
3677         * intrinsic.texi (Introduction): Rewrite first paragraph.
3678
3679 2007-01-03  Brooks Moses  <brooks.moses@codesourcery.com>
3680
3681         * invoke.texi (OpenMP): Added index entry.
3682         * gfortran.texi (title page): Removed erroneous '*'.
3683
3684 2007-01-03  Brooks Moses  <brooks.moses@codesourcery.com>
3685
3686         * gfortran.texi (GFORTRAN_DEFAULT_RECL): Added units
3687         to description.
3688         (Extensions): Miscellaneous minor rewriting and copyediting.
3689         (BOZ-literal constants): Renamed from Hexadecimal constants.
3690         (Hollerith constants support): Added explanation and 
3691         suggestions for standard-conforming modern equivalents.
3692
3693 2007-01-03  Brooks Moses  <brooks.moses@codesourcery.com>
3694
3695         * intrinsic.texi: Improvements to index entries; change
3696         @findex entries to @cindex entries.
3697         * invoke.texi: Standardize and improve index entries.
3698         * gfortran.texi: Fix @code in one index entry.
3699
3700 2007-01-03  Brooks Moses  <brooks.moses@codesourcery.com>
3701
3702         * invoke.texi: Change @code-type macros to appropriate
3703         variants (@command, @option, etc.)
3704         * gfortran.texi: Same.
3705
3706 2007-01-03  Brooks Moses  <brooks.moses@codesourcery.com>
3707
3708         * intrinsic.texi: Various minor cleanups.
3709
3710 2007-01-02  Steven G. Kargl  <kargls@comcast.net>
3711
3712         * trans-intrinsic.c (gfc_conv_intrinsic_ibits): Fix call to
3713         build_int_cst.
3714
3715 2007-01-02  Tobias Burnus  <burnus@net-b.de>
3716
3717         PR fortran/30276
3718         * scanner.c (open_included_file): Support full-path filenames.
3719
3720 2007-01-02  Paul Thomas  <pault@gcc.gnu.org>
3721
3722         PR fortran/20896
3723         * interface.c (check_sym_interfaces): Remove call to
3724         resolve_global_procedure.
3725         gfortran.h : Remove prototype for resolve_global_procedure.
3726         resolve.c (resolve_global_procedure): Add static attribute
3727         to function declaration.
3728
3729 2007-01-01  Steven G. Kargl  <kargls@comcast.net>
3730
3731         * ChangeLog: Copy to ...
3732         * ChangeLog-2006: here.