OSDN Git Service

PR libfortran/37839
[pf3gnuchains/gcc-fork.git] / gcc / fortran / ChangeLog
1 2008-11-22  Jakub Jelinek  <jakub@redhat.com>
2
3         PR libfortran/37839
4         * trans-io.c (gfc_build_io_library_fndecls): Decrease pad size back
5         to 16 pointers plus 32 integers.  Don't use max integer kind
6         alignment, only gfc_intio_kind's alignment.
7         (gfc_trans_inquire): Only set flags2 if mask2 is non-zero.
8         * ioparm.def: Fix order, bitmasks and types of inquire round, sign
9         and pending fields.  Move u in dt before id.
10         * io.c (gfc_free_inquire): Free decimal and size exprs.
11         (match_inquire_element): Match size instead of matching blank twice.
12         (gfc_resolve_inquire): Resolve size.
13
14 2008-11-20  Jakub Jelinek  <jakub@redhat.com>
15
16         PR middle-end/29215
17         * trans-array.c (trans_array_constructor_value,
18         gfc_build_constant_array_constructor): Fill in TREE_PURPOSE.
19
20         * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Use
21         gfc_index_one_node.
22         (gfc_conv_intrinsic_size): Use gfc_index_{zero,one}_node.
23
24         PR fortran/38181
25         * trans-intrinsic.c (gfc_conv_intrinsic_size): Inline 2 argument
26         size if the second argument is not optional and one argument size
27         for rank 1 arrays.
28
29 2008-11-19  Paul Thomas  <pault@gcc.gnu.org>
30
31         PR fortran/38171
32         * module.c (load_equiv): Regression fix; check that equivalence
33         members come from the same module only.
34
35 2008-11-16  Mikael Morin <mikael.morin@tele2.fr>
36
37         PR fortran/35681
38         * dependency.c (gfc_check_argument_var_dependency): Add
39         elemental check flag. Issue a warning if we find a dependency
40         but don't generate a temporary. Add the case of an elemental
41         function call as actual argument to an elemental procedure.
42         Add the case of an operator expression as actual argument
43         to an elemental procedure.
44         (gfc_check_argument_dependency): Add elemental check flag.
45         Update calls to gfc_check_argument_var_dependency.
46         (gfc_check_fncall_dependency): Add elemental check flag.
47         Update call to gfc_check_argument_dependency.
48         * trans-stmt.c (gfc_trans_call): Make call to
49         gfc_conv_elemental_dependency unconditional, but with a flag
50         whether we should check dependencies between variables.
51         (gfc_conv_elemental_dependency): Add elemental check flag.
52         Update call to gfc_check_fncall_dependency.
53         * trans-expr.c (gfc_trans_arrayfunc_assign): Update call to
54         gfc_check_fncall_dependency.
55         * resolve.c (find_noncopying_intrinsics): Update call to
56         gfc_check_fncall_dependency.
57         * dependency.h (enum gfc_dep_check): New enum.
58         (gfc_check_fncall_dependency): Update prototype.
59
60 2008-11-16  Mikael Morin  <mikael.morin@tele2.fr>
61
62         PR fortran/37992
63         * gfortran.h (gfc_namespace): Added member old_cl_list, 
64         backup of cl_list.
65         (gfc_free_charlen): Added prototype.
66         * symbol.c (gfc_free_charlen): New function.
67         (gfc_free_namespace): Use gfc_free_charlen.
68         * parse.c (next_statement): Backup gfc_current_ns->cl_list.
69         (reject_statement): Restore gfc_current_ns->cl_list.
70         Free cl_list's elements before dropping them.
71
72 2008-11-16  Tobias Burnus  <burnus@net-b.de>
73
74         PR fortran/38095
75         * trans-expr.c (gfc_map_intrinsic_function): Fix pointer access.
76
77 2008-11-16  Paul Thomas  <pault@gcc.gnu.org>
78
79         PR fortran/38119
80         * trans-array.c (gfc_trans_create_temp_array): Set the
81         loop->from to zero and the renormalisation of loop->to for all
82         dimensions.
83
84 2008-11-16  Paul Thomas  <pault@gcc.gnu.org>
85
86         PR fortran/37926
87         * trans-expr.c (gfc_free_interface_mapping): Null sym->formal
88         (gfc_add_interface_mapping): Copy the pointer to the formal
89         arglist, rather than using copy_formal_args - fixes regression.
90
91 2008-11-15  Paul Thomas  <pault@gcc.gnu.org>
92
93         PR fortran/37926
94         * trans-expr.c (gfc_add_interface_mapping): Transfer the formal
95         arglist and the always_explicit attribute if the dummy arg is a
96         procedure.
97
98 2008-11-14  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
99
100         PR fortran/37988
101         * io.c (enum format_token): For readability replace FMT_POS with FMT_T,
102         FMT_TL, and FMT_TR.  (format_lex): Use new enumerators. (check_format):
103         Add check for missing positive integer.
104
105 2008-10-14  Paul Thomas  <pault@gcc.gnu.org>
106
107         PR fortran/38033
108         * trans-array.c (gfc_trans_create_temp_array): Stabilize the
109         'to' expression.
110         (gfc_conv_loop_setup): Use the end expression for the loop 'to'
111         if it is available.
112
113 2008-11-12  Jakub Jelinek  <jakub@redhat.com>
114
115         PR target/35366
116         PR fortran/33759
117         * trans-const.c (gfc_conv_constant_to_tree): Warn when
118         converting an integer outside of LOGICAL's range to
119         LOGICAL.
120         * trans-intrinsic.c (gfc_conv_intrinsic_function,
121         gfc_conv_intrinsic_array_transfer, gfc_conv_intrinsic_transfer):
122         Use INTEGER_TYPE instead of BOOLEAN_TYPE for TRANSFER as
123         argument of another TRANSFER.
124
125 2008-11-12  Tobias Burnus  <burnus@net-b.de>
126
127         PR fortran/38065
128         * resolve.c (resolve_fntype): Fix private derived type checking.
129
130 2008-11-09  Paul Thomas  <pault@gcc.gnu.org>
131
132         PR fortran/37836
133         * intrinsic.c (add_functions): Reference gfc_simplify._minval
134         and gfc_simplify_maxval.
135         * intrinsic.h : Add prototypes for gfc_simplify._minval and
136         gfc_simplify_maxval.
137         * simplify.c (min_max_choose): New function extracted from
138         simplify_min_max.
139         (simplify_min_max): Call it.
140         (simplify_minval_maxval, gfc_simplify_minval,
141         gfc_simplify_maxval): New functions.
142
143 2008-11-04  Paul Thomas  <pault@gcc.gnu.org>
144
145         PR fortran/37597
146         * parse.c (gfc_fixup_sibling_symbols ): Fixup contained, even
147         when symbol not found.
148
149 2008-11-03  Tobias Burnus  <burnus@net-b.de>
150
151         PR fortran/37821
152         * cpp.c (gfc_cpp_add_include_path): Use BRACKET.
153         * scanner.c (add_path_to_list): Argument to add at head.
154         (gfc_add_include_path): Add new argument.
155         (gfc_add_intrinsic_modules_path) Update call.
156         (load_file): Print filename/line in the error message.
157         * gfortran.h (gfc_add_include_path): Update prototype.
158         * options.c (gfc_post_options,gfc_handle_module_path_options,
159         gfc_handle_option): Update call.
160         * lang-spec.h (F951_OPTIONS): Don't insert include path twice.
161
162         * arith.c (arith_error): Add -fno-range-error to the message.
163
164 2008-11-03  Paul Thomas  <pault@gcc.gnu.org>
165
166         PR fortran/37445
167         * resolve.c (resolve_actual_arglist ): Correct comparison of
168         FL_VARIABLE with e->expr_type.
169         (resolve_call): Check that host association is correct.
170         (resolve_actual_arglist ): Remove return is old_sym is use
171         associated.  Only reparse expression if old and new symbols
172         have different types.
173
174         PR fortran/PR35769
175         * resolve.c (gfc_resolve_assign_in_forall): Change error to a
176         warning.
177
178 2008-11-01  Janus Weil  <janus@gcc.gnu.org>
179
180         PR fortran/36426
181         * expr.c (replace_symbol): Replace all symbols which lie in the
182         formal namespace of the interface and copy their attributes.
183         * resolve.c (resolve_symbol): Add charlen to namespace.
184
185 2008-11-01  Steven G. Kargl  <kargls@comcast.net>
186
187         PR fortran/19925
188         * trans-array.c (gfc_trans_array_constructor_value): Fix comment.
189         (gfc_conv_array_initializer): Convert internal_error() to gfc_error_now.
190         * array.c: Remove GFC_MAX_AC_EXPAND macro.
191         (gfc_expand_constructor): Use gfc_option.flag_max_array_constructor.
192         * gfortran.h (gfc_option): Add flag_max_array_constructor member.
193         * lang.opt: Add -fmax-array-constructor option.
194         * expr.c (gfc_match_init_expr): Fix error message to mention new option.
195         * invoke.texi: Document new option.
196         * options.c (gfc_init_options): Set default value for new option.
197         (gfc_handle_option): Deal with commandline.
198
199 2008-11-01  Daniel Kraft  <d@domob.eu>
200
201         PR fortran/35681
202         * gfortran.h (struct gfc_code): New field `resolved_isym'.
203         * trans.h (gfc_build_memcpy_call): Made public.
204         * trans-array.h (gfc_trans_create_temp_array): New argument `initial'.
205         * intrinsic.c (gfc_intrinsic_sub_interface): Set resolved_isym.
206         * iresolve.c (create_formal_for_intents): New helper method.
207         (gfc_resolve_mvbits): Put dummy formal arglist on resolved_sym.
208         * resolve.c (resolve_call): Initialize resolved_isym to NULL.
209         * trans-array.c (gfc_trans_allocate_array_storage): New argument
210         `initial' to allow initializing the allocated storage to some initial
211         value copied from another array.
212         (gfc_trans_create_temp_array): Allow initialization of the temporary
213         with a copy of some other array by using the new extension.
214         (gfc_trans_array_constructor): Pass NULL_TREE for initial argument.
215         (gfc_conv_loop_setup): Ditto.
216         * trans-intrinsic.c (gfc_conv_intrinsic_array_transfer): Ditto.
217         * trans-expr.c (gfc_conv_function_call): Ditto.
218         (gfc_build_memcpy_call): Made public.
219         * trans-stmt.c (gfc_conv_elemental_dependencies): Initialize created
220         temporary for INTENT(INOUT) arguments to the value of the mirrored
221         array and clean up the temporary as very last intructions in the created
222         block.
223         * trans.c (gfc_trans_code): For EXEC_CALL, see if we have a MVBITS call
224         and enable elemental dependency checking if we have.
225
226 2008-11-01  Janus Weil  <janus@gcc.gnu.org>
227
228         PR fortran/36322
229         PR fortran/36463
230         * gfortran.h: New function gfc_expr_replace_symbols.
231         * decl.c (match_procedure_decl): Increase reference count for interface.
232         * expr.c: New functions replace_symbol and gfc_expr_replace_symbols.
233         * resolve.c (resolve_symbol): Correctly copy array spec and char len
234         of PROCEDURE declarations from their interface.
235         * symbol.c (gfc_get_default_type): Enhanced error message.
236         (copy_formal_args): Call copy_formal_args recursively for arguments.
237         * trans-expr.c (gfc_conv_function_call): Bugfix.
238
239 2008-11-01  Dennis Wassel  <dennis.wassel@gmail.com>
240
241         PR fortran/37159
242         * fortran/check.c (gfc_check_random_seed): Check PUT size
243         at compile time.
244
245 2008-10-31  Mikael Morin  <mikael.morin@tele2.fr>
246
247         PR fortran/35840
248         * expr.c (gfc_reduce_init_expr): New function, containing checking code
249         from gfc_match_init_expr, so that checking can be deferred. 
250         (gfc_match_init_expr): Use gfc_reduce_init_expr.
251         * io.c (check_io_constraints): Use gfc_reduce_init_expr instead of 
252         checking that the expression is a constant. 
253         * match.h (gfc_reduce_init_expr): Prototype added. 
254
255 2008-10-31  Mikael Morin  <mikael.morin@tele2.fr>
256
257         PR fortran/35820
258         * resolve.c (gfc_count_forall_iterators): New function.
259         (gfc_resolve_forall): Use gfc_count_forall_iterators to evaluate 
260         the needed memory amount to allocate. Don't forget to free allocated 
261         memory.  Add an assertion to check for memory leaks. 
262
263 2008-10-30  Steven G. Kargl  <kargls@comcast.net>
264
265         PR fortran/37930
266         * fortran/arith.c (gfc_mpfr_to_mpz):  Test for NaN and Inf values.
267         Remove stale comment and kludge code for MPFR 2.0.1 and older.
268         (gfc_real2int): Error on conversion of NaN or Inf.
269         (gfc_complex2int): Ditto.
270         * fortran/arith.h: Update mpfr_to_mpz prototype.
271         * fortran/simplify.c (gfc_simplify_ceiling, gfc_simplify_floor,
272         gfc_simplify_ifix, gfc_simplify_idint, simplify_nint): Update function
273         calls to include locus.
274
275 2008-10-30  Mikael Morin  <mikael.morin@tele2.fr>
276
277         PR fortran/37903
278         * trans-array.c (gfc_trans_create_temp_array): If n is less
279         than the temporary dimension, assert that loop->from is
280         zero (reverts to earlier versions). If there is at least one
281         null loop->to[n], it is a callee allocated array so set the
282         size to NULL and break.
283         (gfc_trans_constant_array_constructor): Set the offset to zero.
284         (gfc_trans_array_constructor): Remove loop shifting around the
285         temporary creation.
286         (gfc_conv_loop_setup): Prefer zero-based descriptors if
287         possible.  Calculate the translation from loop variables to
288         array indices if an array constructor.
289
290 2008-10-30  Mikael Morin  <mikael.morin@tele2.fr>
291
292         PR fortran/37749
293         * trans-array.c (gfc_trans_create_temp_array): If size is NULL
294         use the array bounds for loop->to.
295
296 2008-10-28  Tobias Burnus  <burnus@net-b.de>
297
298         * intrinsic.texi: Update OpenMP section for OMPv3.
299
300 2008-10-24  Jakub Jelinek  <jakub@redhat.com>
301
302         * Make-lang.in (check-f95-subtargets, check-fortran-subtargets): New
303         aliases for check-gfortran-subtargets.
304         (lang_checks_parallelized): Add check-gfortran.
305         (check_gfortran_parallelize): New variable.
306
307 2008-10-19  Paul Thomas  <pault@gcc.gnu.org>
308
309         PR fortran/37723
310         * dependency.c (gfc_dep_resolver ): If we find equal array
311         element references, go on to the next reference.
312
313 2008-10-16  Daniel Kraft  <d@domob.eu>
314
315         * resolve.c (resolve_elemental_actual): Handle calls to intrinsic
316         subroutines correctly.
317
318 2008-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
319
320         * simplify.c: Remove MPFR_VERSION_NUM(2,3,0) conditionals.
321
322 2008-10-12  Daniel Kraft  <d@domob.eu>
323
324         PR fortran/37688
325         * expr.c (gfc_expr_check_typed): Extend permission of untyped
326         expressions to both top-level variable and basic arithmetic expressions.
327
328 2008-10-12  Paul Thomas  <pault@gcc.gnu.org>
329
330         PR fortran/37787
331         * dependency.c (gfc_are_equivalenced_arrays): Look in symbol
332         namespace rather than current namespace, if it is available.
333
334 2008-10-12  Steven G. Kargl  <kargls@comcast.net>
335
336         PR fortran/37792
337         * fortran/resolve.c (resolve_fl_variable): Simplify the
338         initializer if there is one.
339
340 2008-10-11  Paul Thomas  <pault@gcc.gnu.org>
341
342         PR fortran/37794
343         * module.c (check_for_ambiguous): Remove redundant code.
344
345 2008-10-09  Daniel Kraft  <d@domob.eu>
346
347         PR fortran/35723
348         * gfortran.h (gfc_suppress_error): Removed from header.
349         (gfc_push_suppress_errors), (gfc_pop_suppress_errors): New methods.
350         * array.c (gfc_array_size): Use new gfc_push/pop_suppress_errors
351         instead of directly changing gfc_suppress_error.
352         * intrinsic.c (gfc_intrinsic_func_interface): Ditto.
353         (gfc_intrinsic_sub_interface): Ditto.
354         * error.c (suppress_errors): Made static from `gfc_suppress_error'.
355         (gfc_push_suppress_errors), (gfc_pop_suppress_errors): New methods.
356         (gfc_notify_std), (gfc_error): Use new static name of global.
357         * expr.c (check_arglist), (check_references): New methods.
358         (check_restricted): Check arglists and references of EXPR_FUNCTIONs
359         and EXPR_VARAIBALEs, respectively.  Allow PARAMETER symbols.
360
361 2008-10-07  Jakub Jelinek  <jakub@redhat.com>
362
363         * f95-lang.c (poplevel): Don't clear BLOCK_VARS if functionbody.
364         * trans-decl.c (gfc_build_qualified_array): Build accurate debug type
365         even if nest.
366         (build_entry_thunks, gfc_generate_function_code,
367         gfc_generate_constructors): Ensure DECL_SAVED_TREE is a BIND_EXPR
368         with DECL_INITIAL as its BLOCK.
369
370 2008-10-05  Paul Thomas  <pault@gcc.gnu.org>
371
372         PR fortran/35680
373         * gfortran.h : Add 'error' bit field to gfc_expr structure.
374         * expr.c (check_inquiry): When checking a restricted expression
375         check that arguments are either variables or restricted.
376         (check_restricted): Do not emit error if the expression has
377         'error' set.  Clean up detection of host-associated variable.
378
379 2008-10-05  Daniel Kraft  <d@domob.eu>
380
381         PR fortran/37638
382         * gfortran.h (struct gfc_typebound_proc): New flag `error'.
383         * resolve.c (update_arglist_pass): Added assertion.
384         (update_compcall_arglist): Fail early for erraneous procedures to avoid
385         confusion later.
386         (resolve_typebound_generic_call): Ignore erraneous specific targets
387         and added assertions.
388         (resolve_typebound_procedure): Set new `error' flag.
389
390 2008-10-04  Paul Thomas  <pault@gcc.gnu.org>
391
392         PR fortran/37706
393         * module.c (load_equiv): Check the module before negating the
394         unused flag.
395
396 2008-10-02  Steven Bosscher  <steven@gcc.gnu.org>
397
398         PR fortran/37635
399         * intrinsic.c (add_functions): Add LEADZ and TRAILZ as generics.
400         * intrinsic.h (gfc_simplify_leadz, gfc_simplify_trailz): New protos.
401         * gfortran.h <enum gfc_isym_id>: (GFC_ISYM_LEADZ, GFC_ISYM_TRAILZ): New.
402         * f95-lang (gfc_init_builtin_functions): Add BUILT_IN_CLZ,
403         BUILT_IN_CLZL, BUILT_IN_CLZLL, BUILT_IN_CTZ, BUILT_IN_CTZL, and
404         BUILT_IN_CTZLL.
405         * trans-intrinsic.c (gfc_conv_intrinsic_leadz,
406         gfc_conv_intrinsic_trails): New code-generation functions for LEADZ
407         and TRAILZ intrinsics.
408         (gfc_conv_intrinsic_function): Use them
409         * intrinsic.texi: Add documentation for LEADZ and TRAILZ.
410         * simplify.c (gfc_simplify_leadz, gfc_simplify_trailz): New functions.
411
412 2008-09-30  Janus Weil  <janus@gcc.gnu.org>
413
414         PR fortran/36592
415         * symbol.c (check_conflict): If a symbol in a COMMON block is a
416         procedure, it must be a procedure pointer.
417         (gfc_add_in_common): Symbols in COMMON blocks may be variables or
418         procedure pointers.
419         * trans-types.c (gfc_sym_type): Make procedure pointers in COMMON
420         blocks work.
421
422 2008-09-25  Jerry DeLisle  <jvdelisle@gcc.gnu.org
423
424         PR fortran/37498
425         * trans-io.c (build_dt): Revert previous patch..
426         * ioparm.def: Delete IOPARM_dt_f2003.
427
428 2008-09-25  Tobias Burnus  <burnus@net-b.de>
429
430         PR fortran/37504
431         * expr.c (gfc_check_pointer_assign): Allow assignment of
432         protected pointers.
433         * match.c (gfc_match_assignment,gfc_match_pointer_assignment):
434         Remove unreachable code.
435
436 2008-09-24  Tobias Burnus  <burnus@net-b.de>
437
438         * options.c (set_default_std_flags,gfc_init_options):
439         Add comment: keep in sync with libgfortran.
440
441 2008-09-24  Tobias Burnus  <burnus@net-b.de>
442
443         PR fortran/37626
444         * trans-array.c (gfc_trans_deferred_array): Don't auto-deallocate
445         result variables.
446
447 2008-09-23  Daniel Kraft  <d@domob.eu>
448
449         PR fortran/37588
450         * gfortran.h (gfc_compare_actual_formal): Removed, made private.
451         (gfc_arglist_matches_symbol): New method.
452         * interface.c (compare_actual_formal): Made static.
453         (gfc_procedure_use): Use new name of compare_actual_formal.
454         (gfc_arglist_matches_symbol): New method.
455         (gfc_search_interface): Moved code partially to new
456         gfc_arglist_matches_symbol.
457         * resolve.c (resolve_typebound_generic_call): Resolve actual arglist
458         before checking against formal and use new gfc_arglist_matches_symbol
459         for checking.
460         (resolve_compcall): Set type-spec of generated expression.
461
462 2008-09-23  Tobias Burnus  <burnus@net-b.de>
463
464         PR fortran/37580
465         * expr.c (gfc_check_pointer_assign): Add checks for pointer
466         remapping.
467
468 2008-09-22  Jerry DeLisle  <jvdelisle@gcc.gnu.org
469
470         PR fortran/37498
471         * trans-io.c (gfc_build_io_library_fndecls): Bump pad size.
472         (build_dt): Set mask bit for IOPARM_dt_f2003.
473         * ioparm.def: Add IOPARM_dt_f2003.
474
475 2008-09-22  Janus Weil  <janus@gcc.gnu.org>
476
477         PR fortran/37486
478         * gfortran.h (gfc_option_t): New members flag_align_commons and
479         warn_align_commons. 
480         * lang.opt: New options falign-commons and Walign-commons.
481         * invoke.texi: Documentation for new options.
482         * options.c (gfc_init_options): Initialize new options.
483         (gfc_handle_options): Handle new options.
484         * trans-common.c (translate_common): Implement new options.
485         (gfc_trans_common): Set correct locus.
486
487 2008-09-21  Paul Thomas  <pault@gcc.gnu.org>
488
489         PR fortran/37583
490         * decl.c (scalarize_intrinsic_call): Both subroutines and
491         functions can give a true for get_proc_mame's last argument so
492         remove the &&gfc_current_ns->proc_name->attr.function.
493         resolve.c (resolve_actual_arglist): Add check for recursion by
494         reference to procedure as actual argument.
495
496 2008-09-21  Daniel Kraft  <d@domob.eu>
497
498         PR fortran/35846
499         * trans.h (gfc_conv_string_length): New argument `expr'.
500         * trans-expr.c (flatten_array_ctors_without_strlen): New method.
501         (gfc_conv_string_length): New argument `expr' that is used in a new
502         special case handling if cl->length is NULL.
503         (gfc_conv_subref_array_arg): Pass expr to gfc_conv_string_length.
504         * trans-array.c (gfc_conv_expr_descriptor): Ditto.
505         (gfc_trans_auto_array_allocation): Pass NULL as new expr.
506         (gfc_trans_g77_array), (gfc_trans_dummy_array_bias): Ditto.
507         (gfc_trans_deferred_array): Ditto.
508         (gfc_trans_array_constructor): Save and restore old values of globals
509         used for bounds checking.
510         * trans-decl.c (gfc_trans_dummy_character): Ditto.
511         (gfc_trans_auto_character_variable): Ditto.
512
513 2008-09-21  Daniel Kraft  <d@domob.eu>
514
515         * decl.c (match_procedure_in_type): Changed misleading error message
516         for not yet implemented PROCEDURE(interface) syntax.
517
518 2008-09-18  Paul Thomas  <pault@gcc.gnu.org>
519
520        PR fortran/35945
521        * resolve.c (resolve_fl_variable_derived):  Remove derived type
522        comparison for use associated derived types.  Host association
523        of a derived type will not arise if there is a local derived type
524        whose use name is the same.
525
526        PR fortran/36700
527        * match.c (gfc_match_call):  Use the existing symbol even if
528        it is a function.
529
530 2008-09-18  Daniel Kraft  <d@domob.eu>
531
532         PR fortran/37507
533         * trans.h (gfc_trans_runtime_error): New method.
534         (gfc_trans_runtime_error_vararg): New method.
535         (gfc_allocate_array_with_status): New argument `expr' for locus/varname.
536         (gfc_deallocate_array_with_status): Ditto.
537         * trans-array.h (gfc_array_deallocate): Ditto.
538         * trans.c (gfc_trans_runtime_error): New method.
539         (gfc_trans_runtime_error_vararg): New method, moved parts of the code
540         from gfc_trans_runtime_check here.
541         (gfc_trans_runtime_error_check): Moved code partly to new method.
542         (gfc_call_malloc): Fix tab-indentation.
543         (gfc_allocate_array_with_status): New argument `expr' and call
544         gfc_trans_runtime_error for error reporting to include locus.
545         (gfc_deallocate_with_status): Ditto.
546         * trans-stmt.c (gfc_trans_deallocate): Pass expr as new argument.
547         * trans-array.c (gfc_array_allocate): Ditto.
548         (gfc_array_deallocate): New argument `expr', passed on.
549         (gfc_trans_dealloc_allocated): Pass NULL for expr.
550         * trans-openmp.c (gfc_omp_clause_default): Ditto.
551
552 2008-09-18  Paul Thomas  <pault@gcc.gnu.org>
553
554         PR fortran/37274
555         PR fortran/36374
556         * module.c (check_for_ambiguous): New function to test loaded
557         symbol for ambiguity with fixup symbol.
558         (read_module): Call check_for_ambiguous.
559         (write_symtree): Do not write the symtree for symbols coming
560         from an interface body.
561
562         PR fortran/36374
563         * resolve.c (count_specific_procs ): New function to count the
564         number of specific procedures with the same name as the generic
565         and emit appropriate errors for and actual argument reference.
566         (resolve_assumed_size_actual): Add new argument no_formal_args.
567         Correct logic around passing generic procedures as arguments.
568         Call count_specific_procs from two locations.
569         (resolve_function): Evaluate and pass no_formal_args.
570         (resolve call): The same and clean up a bit by using csym more
571         widely.
572
573         PR fortran/36454
574         * symbol.c (gfc_add_access): Access can be updated if use
575         associated and not private.
576
577 2008-09-17  Jakub Jelinek  <jakub@redhat.com>
578
579         PR fortran/37536
580         * trans-stmt.c (gfc_trans_do): Optimize integer type non-simple
581         do loop initialization.
582
583 2008-09-14  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
584             Tobias Burnus  <burnus@net.b.de>
585
586         PR fortran/35840
587         * io.c (match_vtag): Add tag name to error message.
588         (match_out_tag): Cleanup whitespace.
589         (gfc_resolve_dt): Resolve id and async tags. 
590
591 2008-09-13  Daniel Kraft  <d@domob.eu>
592
593         PR fortran/35770
594         * primary.c (gfc_match_varspec): Added missing type-spec clearing
595         after wrong implicit character typing.
596
597 2008-09-12  Richard Guenther  <rguenther@suse.de>
598
599         * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Use
600         build_fold_addr_expr to properly mark the argument
601         addressable.
602
603 2008-09-11  Daniel Kraft  <d@domob.eu>
604
605         PR fortran/36214
606         * simplify.c (simplify_cmplx): Added linebreak to long line.
607         * target-memory.c (gfc_convert_boz): Fix indentation.
608         (gfc_interpret_float): Set mpfr precision to right value before
609         calling mpfr_init.
610
611 2008-09-10  H.J. Lu  <hongjiu.lu@intel.com>
612
613         * expr.c (find_array_element): Reformat comment.
614
615 2008-09-10  H.J. Lu  <hongjiu.lu@intel.com>
616
617         * expr.c (find_array_element): Reformat.
618
619 2008-09-10  Tobias Burnus  <burnus@net-b.de>
620
621         PR fortran/37420
622         * trans-decl.c (get_proc_pointer_decl): Fix -Wunused-variable.
623
624 2008-09-09  Daniel Kraft  <d@domob.eu>
625
626         PR fortran/37429
627         * resolve.c (expression_rank): Added assertion to guard against
628         EXPR_COMPCALL expressions.
629         (resolve_compcall): Set expression's rank from the target procedure's.
630
631 2008-09-09  Daniel Kraft  <d@domob.eu>
632
633         PR fortran/37411
634         * trans-array.c (gfc_conv_array_parameter): Added assertion that the
635         symbol has an array spec.
636
637 2008-09-08  Daniel Kraft  <d@domob.eu>
638
639         PR fortran/37199
640         * trans-expr.c (gfc_add_interface_mapping): Set new_sym->as.
641         (gfc_map_intrinsic_function): Added checks against NULL bounds in
642         array specs.
643
644 2008-09-08  Tobias Burnus  <burnus@net.b.de>
645
646         PR fortran/37400
647         * symbol.c (gfc_set_default_type): Copy char len.
648
649 2008-09-06  Steven G. Kargl  <kargls@comcast.net>
650
651         PR fortran/36153
652         * fortran/resolve.c (resolve_function): Shortcircuit for SIZE and
653         UBOUND if 2nd argument is KIND.
654
655 2008-09-06  Steven G. Kargl  <kargls@comcast.net>
656
657         PR fortran/33229
658         * resolve.c (resolve_function): An intrinsic subroutine should not be
659         called as a function.
660
661 2008-09-05  Daniel Kraft  <d@domob.eu>
662
663         PR fortran/35837
664         * resolve.c (resolve_types): Restore gfc_current_ns on exit.
665         * symbol.c (gfc_save_all): Removed blank line.
666
667 2008-09-05  Daniel Kraft  <d@domob.eu>
668
669         PR fortran/36746
670         * primary.c (gfc_match_rvalue): Removed logic to handle implicit
671         typing to a derived-type if a component reference is found.
672         (gfc_match_varspec): Moved it here.
673
674 2008-09-04  Richard Guenther  <rguenther@suse.de>
675
676         * trans-array.c (gfc_conv_array_parameter): Use correct types
677         in building COND_EXPRs.
678         * trans-expr.c (gfc_conv_missing_dummy): Likewise.
679         * trans-intrinsics.c (gfc_conv_intrinsic_merge): Likewise.
680
681 2008-09-04  Daniel Kraft  <d@domob.eu>
682
683         * PR fortran/37099
684         * expr.c (simplify_const_ref): Update expression's character length
685         when pulling out a substring reference.
686
687 2008-09-04  Ian Lance Taylor  <iant@google.com>
688
689         * symbol.c (generate_isocbinding_symbol): Compare
690         gfc_notification_std with ERROR rather than FAILURE.
691         * resolve.c (check_assumed_size_reference): Compare array type
692         with AR_FULL rather than DIMEN_ELEMENT.
693         (resolve_actual_arglist): Compare with EXPR_VARIABLE rather than
694         FL_VARIABLE.
695
696 2008-09-01  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
697
698         PR fortran/37228
699         * io.c (check_format): Allow specifying precision with g0 format.
700
701 2008-09-02  Daniel Kraft  <d@domob.eu>
702
703         * gfortran.h (struct gfc_namespace): New member `implicit_loc'.
704         (gfc_add_abstract): New method.
705         * decl.c (gfc_get_type_attr_spec): Match ABSTRACT attribute.
706         (gfc_match_derived_decl): Copy abstract attribute in derived symbol.
707         * dump-parse-tree.c (show_attr): Show ABSTRACT attribute as `ABSTRACT'
708         only to allow for ABSTRACT types.
709         * parse.c (parse_interface): Use new gfc_add_abstract.
710         * primary.c (gfc_match_structure_constructor): Check that no ABSTRACT
711         type is constructed.
712         * resolve.c (resolve_typespec_used): New method.
713         (resolve_fl_derived): Check type in respect to ABSTRACT attribute and
714         check that no component is of an ABSTRACT type.
715         (resolve_symbol): Check that no symbol is of an ABSTRACT type.
716         (resolve_types): Check IMPLICIT declarations for ABSTRACT types.
717         * symbol.c (gfc_merge_new_implicit): Remember loci of IMPLICIT's.
718         (gfc_add_abstract): New method.
719
720 2008-09-01  Daniel Kraft  <d@domob.eu>
721
722         PR fortran/37193
723         * module.c (read_module): Initialize use_only flag on used symbols.
724
725 2008-09-01  Daniel Kraft  <d@domob.eu>
726
727         * gfc-internals.texi (F2003 OOP), (Type-bound Procedures): New chapter
728         and section to document the internals of type-bound procedures.
729         (gfc_expr): Document EXPR_COMPCALL.
730         * gfortran.h (struct gfc_expr): Remove unused `derived' from compcall.
731         * dump-parse-tree.c (show_compcall): New method.
732         (show_expr): Call it for EXPR_COMPCALL.
733         (show_typebound), (show_f2k_derived): New methods.
734         (show_symbol): Call show_f2k_derived.
735         (show_code_node): Handle EXEC_COMPCALL.
736         * primary.c (gfc_match_varspec): Don't initialize removed `derived' in
737         primary->value.compcall.
738
739 2008-08-31  Richard Guenther  <rguenther@suse.de>
740
741         * trans-expr.c (gfc_trans_string_copy): Use the correct types
742         to compute slen and dlen.
743
744 2008-08-31  Daniel Kraft  <d@domob.eu>
745
746         * gfortran.h (enum gfc_statement): New entry `ST_GENERIC'.
747         (struct gfc_tbp_generic): New type.
748         (struct gfc_typebound_proc): Removed `target' and added union with
749         `specific' and `generic' members; new members `overridden',
750         `subroutine', `function' and `is_generic'.
751         (struct gfc_expr): New members `derived' and `name' in compcall union
752         member and changed type of `tbp' to gfc_typebound_proc.
753         (gfc_compare_interfaces), (gfc_compare_actual_formal): Made public.
754         * match.h (gfc_typebound_default_access): New global.
755         (gfc_match_generic): New method.
756         * decl.c (gfc_match_generic): New method.
757         (match_binding_attributes): New argument `generic' and handle it.
758         (match_procedure_in_type): Mark matched binding as non-generic.
759         * interface.c (gfc_compare_interfaces): Made public.
760         (gfc_compare_actual_formal): Ditto.
761         (check_interface_1), (compare_parameter): Use new public names.
762         (gfc_procedure_use), (gfc_search_interface): Ditto.
763         * match.c (match_typebound_call): Set base-symbol referenced.
764         * module.c (binding_generic): New global array.
765         (current_f2k_derived): New global.
766         (mio_typebound_proc): Handle IO of GENERIC bindings.
767         (mio_f2k_derived): Record current f2k-namespace in current_f2k_derived.
768         * parse.c (decode_statement): Handle GENERIC statement.
769         (gfc_ascii_statement): Ditto.
770         (typebound_default_access), (set_typebound_default_access): Removed.
771         (gfc_typebound_default_access): New global.
772         (parse_derived_contains): New default-access implementation and handle
773         GENERIC statements encountered.
774         * primary.c (gfc_match_varspec): Adapted to new gfc_typebound_proc
775         structure and removed check for SUBROUTINE/FUNCTION from here.
776         * resolve.c (extract_compcall_passed_object): New method.
777         (update_compcall_arglist): Use it.
778         (resolve_typebound_static): Adapted to new gfc_typebound_proc structure.
779         (resolve_typebound_generic_call): New method.
780         (resolve_typebound_call): Check target is a SUBROUTINE and handle calls
781         to GENERIC bindings.
782         (resolve_compcall): Ditto (check for target being FUNCTION).
783         (check_typebound_override): Handle GENERIC bindings.
784         (check_generic_tbp_ambiguity), (resolve_typebound_generic): New methods.
785         (resolve_typebound_procedure): Handle GENERIC bindings and set new
786         attributes subroutine, function and overridden in gfc_typebound_proc.
787         (resolve_fl_derived): Ensure extended type is resolved before the
788         extending one is.
789         * st.c (gfc_free_statement): Fix bug with free'ing EXEC_COMPCALL's.
790         * symbol.c (gfc_find_typebound_proc): Adapt for GENERIC changes.
791
792 2008-08-29  Jan Hubicka  <jh@suse.cz>
793         
794         * parse.c (parse_interface): Silence uninitialized var warning.
795
796 2008-08-29  Jakub Jelinek  <jakub@redhat.com>
797
798         * trans.h (struct lang_type): Add span.
799         (GFC_TYPE_ARRAY_SPAN): Define.
800         * trans-decl.c (gfc_get_symbol_decl): For subref array pointers,
801         copy TREE_STATIC from decl to span instead of setting it
802         unconditionally, set DECL_ARTIFICIAL, fix type of initializer
803         and set GFC_TYPE_ARRAY_SPAN on decl's type.
804         * trans-types.c (gfc_get_array_descr_info): If
805         GFC_TYPE_ARRAY_SPAN is non-NULL, use it as element size.
806
807         * trans-decl.c (check_constant_initializer,
808         gfc_emit_parameter_debug_info): New functions.
809         (gfc_generate_module_vars, gfc_generate_function_code): Emit
810         PARAMETERs and unreferenced variables with initializers into
811         debug info.
812
813         * gfortran.h (gfc_use_list): Add where field.
814         * module.c (use_locus): New static variable.
815         (gfc_match_use): Set it.
816         (gfc_use_module): Copy it to gfc_use_list's where field.
817         * trans-decl.c (gfc_generate_module_vars): Call gfc_trans_use_stmts.
818         (gfc_trans_use_stmts): Set backend locus before calling the debug
819         hook.  Allow non-VAR_DECLs to be created even for non-external
820         module.  Don't emit anything so far for renames from different
821         modules.
822
823         PR fortran/24790
824         * trans-decl.c (create_function_arglist): Set DECL_BY_REFERENCE on
825         PARM_DECLs with pointer or reference type.
826
827         * trans-decl.c (gfc_build_qualified_array): Build non-flat
828         array type for debug info purposes.
829
830         PR fortran/29635
831         PR fortran/23057
832         * f95-lang.c (gfc_init_ts): New function.
833         (LANG_HOOKS_INIT_TS): Define.
834         * gfortran.h (gfc_use_rename): New type, moved from module.c.
835         (gfc_get_use_rename): New macro, moved from module.c.
836         (gfc_use_list): New type.
837         (gfc_get_use_list): New macro.
838         (gfc_namespace): Add use_stmts field.
839         (gfc_free_use_stmts): New prototype.
840         * Make-lang.in (fortran/trans-decl.o): Depend on debug.h.
841         * module.c (gfc_use_rename, gfc_get_use_rename): Moved to
842         gfortran.h.
843         (gfc_use_module): Chain the USE statement info to
844         ns->use_stmts.
845         (gfc_free_use_stmts): New function.
846         * symbol.c (gfc_free_namespace): Call gfc_free_use_stmts.
847         * trans.h (struct module_htab_entry): New type.
848         (gfc_find_module, gfc_module_add_decl): New functions.
849         * trans.c (gfc_generate_module_code): Create NAMESPACE_DECL for
850         the module, adjust DECL_CONTEXTs of module procedures and
851         call gfc_module_add_decl for them.
852         * trans-common.c (build_common_decl): Set DECL_IGNORED_P
853         on the common variable.
854         (create_common): Set DECL_IGNORED_P for use associated vars.
855         * trans-decl.c: Include debug.h.
856         (gfc_get_symbol_decl): Set DECL_IGNORED_P on use_assoc vars from
857         modules.
858         (build_function_decl): Allow current_function_decl's context
859         to be a NAMESPACE_DECL.
860         (module_htab, cur_module): New variables.
861         (module_htab_do_hash, module_htab_eq, module_htab_decls_hash,
862         module_htab_decls_eq, gfc_find_module, gfc_module_add_decl): New
863         functions.
864         (gfc_create_module_variable): Adjust DECL_CONTEXTs of module
865         variables and types and call gfc_module_add_decl for them.
866         (gfc_generate_module_vars): Temporarily set cur_module.
867         (gfc_trans_use_stmts): New function.
868         (gfc_generate_function_code): Call it.
869         (gfc_generate_block_data): Set DECL_IGNORED_P on decl.
870         * trans-types.c (gfc_get_derived_type): Adjust DECL_CONTEXT
871         and TYPE_CONTEXT of module derived types.
872
873 2008-08-28  Daniel Kraft  <d@domob.eu>
874
875         * gfortran.h (enum expr_t): New value `EXPR_COMPCALL'.
876         (gfc_get_typebound_proc): New macro.
877         (struct gfc_expr): New union-member `compcall' for EXPR_COMPCALL.
878         (enum gfc_exec_op): New value `EXEC_COMPCALL'.
879         (gfc_find_typebound_proc): New argument.
880         (gfc_copy_ref), (gfc_match_varspec): Made public.
881         * decl.c (match_procedure_in_type): Use gfc_get_typebound_proc.
882         * expr.c (free_expr0), (gfc_copy_expr): Handle EXPR_COMPCALL.
883         (gfc_copy_ref): Made public and use new name.
884         (simplify_const_ref): Use new name of gfc_copy_ref.
885         (simplify_parameter_variable): Ditto.
886         (gfc_simplify_expr): gcc_unreachable for EXPR_COMPCALL.
887         * match.c (match_typebound_call): New method.
888         (gfc_match_call): Allow for CALL's to typebound procedures.
889         * module.c (binding_passing), (binding_overriding): New variables.
890         (expr_types): Add EXPR_COMPCALL.
891         (mio_expr): gcc_unreachable for EXPR_COMPCALL.
892         (mio_typebound_proc), (mio_typebound_symtree): New methods.
893         (mio_f2k_derived): Handle type-bound procedures.
894         * primary.c (gfc_match_varspec): Made public and parse trailing
895         references to type-bound procedures; new argument `sub_flag'.
896         (gfc_match_rvalue): New name and argument of gfc_match_varspec.
897         (match_variable): Ditto.
898         * resolve.c (update_arglist_pass): New method.
899         (update_compcall_arglist), (resolve_typebound_static): New methods.
900         (resolve_typebound_call), (resolve_compcall): New methods.
901         (gfc_resolve_expr): Handle EXPR_COMPCALL.
902         (resolve_code): Handle EXEC_COMPCALL.
903         (resolve_fl_derived): New argument to gfc_find_typebound_proc.
904         (resolve_typebound_procedure): Ditto and removed not-implemented error.
905         * st.c (gfc_free_statement): Handle EXEC_COMPCALL.
906         * symbol.c (gfc_find_typebound_proc): New argument `noaccess' and
907         implement access-checking.
908         * trans-expr.c (gfc_apply_interface_mapping_to_expr): gcc_unreachable
909         on EXPR_COMPCALL.
910         * trans-intrinsic.c (gfc_conv_intrinsic_bound): Add missing break.
911         * trans-openmp.c (gfc_trans_omp_array_reduction): Add missing
912         intialization of ref->type.
913
914 2008-08-28  Janus Weil  <janus@gcc.gnu.org>
915
916         PR fortran/37253
917         * module.c (ab_attribute,attr_bits,mio_symbol_attribute): Take care of
918         saving attr.procedure and attr.proc_ptr to the module file.
919
920 2008-08-25  Daniel Kraft  <d@domob.eu>
921
922         * gfortran.h (gfc_find_component): Add new arguments.
923         * parse.c (parse_derived_contains): Check if the derived-type containing
924         the CONTAINS section is SEQUENCE/BIND(C).
925         * resolve.c (resolve_typebound_procedure): Check for name collision with
926         components.
927         (resolve_fl_derived): Check for name collision with inherited
928         type-bound procedures.
929         * symbol.c (gfc_find_component): New arguments `noaccess' and `silent'.
930         (gfc_add_component): Adapt for new arguments.
931         * primary.c (match_varspec), (gfc_match_structure_constructor): Ditto.
932
933 2008-08-24  Tobias Burnus  <burnus@net-b.de>
934
935         PR fortran/37201
936         * decl.c (verify_bind_c_sym): Reject array/string returning
937         functions.
938
939 2008-08-24  Tobias Burnus  <burnus@net-b.de>
940
941         PR fortran/37201
942         * trans-expr.c (gfc_conv_function_call): Add string_length
943         for character-returning bind(C) functions.
944
945 2008-08-24  Daniel Kraft  <d@domob.eu>
946
947         * gfortran.h (gfc_typebound_proc):  New struct.
948         (gfc_symtree):  New member typebound.
949         (gfc_find_typebound_proc):  Prototype for new method.
950         (gfc_get_derived_super_type):  Prototype for new method.
951         * parse.h (gfc_compile_state):  New state COMP_DERIVED_CONTAINS.
952         * decl.c (gfc_match_procedure):  Handle PROCEDURE inside derived-type
953         CONTAINS section.
954         (gfc_match_end):  Handle new context COMP_DERIVED_CONTAINS.
955         (gfc_match_private):  Ditto.
956         (match_binding_attributes), (match_procedure_in_type):  New methods.
957         (gfc_match_final_decl):  Rewrote to make use of new
958         COMP_DERIVED_CONTAINS parser state.
959         * parse.c (typebound_default_access):  New global helper variable.
960         (set_typebound_default_access):  New callback method.
961         (parse_derived_contains):  New method.
962         (parse_derived):  Extracted handling of CONTAINS to new parser state
963         and parse_derived_contains.
964         * resolve.c (resolve_bindings_derived), (resolve_bindings_result):  New.
965         (check_typebound_override), (resolve_typebound_procedure):  New methods.
966         (resolve_typebound_procedures):  New method.
967         (resolve_fl_derived):  Call new resolving method for typebound procs.
968         * symbol.c (gfc_new_symtree):  Initialize new member typebound to NULL.
969         (gfc_find_typebound_proc):  New method.
970         (gfc_get_derived_super_type):  New method.
971
972 2008-08-23  Janus Weil  <janus@gcc.gnu.org>
973
974         * gfortran.h (gfc_component): Add field "symbol_attribute attr", remove
975         fields "pointer", "allocatable", "dimension", "access".
976         Remove functions "gfc_set_component_attr" and "gfc_get_component_attr".
977         * interface.c (gfc_compare_derived_types): Ditto.
978         * trans-array.c (gfc_array_allocate,structure_alloc_comps): Ditto.
979         * trans-expr.c (gfc_conv_component_ref,gfc_trans_subcomponent_assign,
980         gfc_conv_structure): Ditto.
981         * symbol.c (gfc_find_component,free_components,gfc_set_component_attr,
982         gfc_get_component_attr,verify_bind_c_derived_type,
983         generate_isocbinding_symbol): Ditto.
984         * decl.c (build_struct): Ditto.
985         * dump-parse-tree.c (show_components): Ditto.
986         * trans-stmt.c (gfc_trans_deallocate): Ditto.
987         * expr.c (gfc_check_assign,gfc_check_pointer_assign,
988         gfc_default_initializer): Ditto.
989         * module.c (mio_component): Ditto.
990         * trans-types.c (copy_dt_decls_ifequal,gfc_get_derived_type): Ditto.
991         * resolve.c (has_default_initializer,resolve_structure_cons,
992         gfc_iso_c_func_interface,find_array_spec,resolve_ref,
993         resolve_deallocate_expr,resolve_allocate_expr,resolve_fl_derived,
994         resolve_equivalence_derived): Ditto.
995         * trans-io.c (transfer_expr): Ditto.
996         * parse.c (parse_derived): Ditto.
997         * dependency.c (gfc_check_dependency): Ditto.
998         * primary.c (gfc_variable_attr): Ditto.
999
1000 2008-08-23  Tobias Burnus  <burnus@net-b.de>
1001
1002         PR fortran/37076
1003         * arith.c (gfc_arith_concat): Fix concat of kind=4 strings.
1004
1005 2008-08-23  Tobias Burnus  <burnus@net-b.de>
1006
1007         PR fortran/37025
1008         * target-memory.c (gfc_interpret_character): Support
1009         kind=4 characters.
1010
1011 2008-08-22  Daniel Kraft  <d@domob.eu>
1012
1013         PR fortran/30239
1014         * symbol.c (gfc_add_type): Warn on -Wsurprising if a function-result
1015         type is re-declared but neither -pedantic nor -std=f* is given and so
1016         this is no error.
1017         * invoke.texi (-Wsurprising): Document this new behaviour.
1018
1019 2008-08-22  Daniel Kraft  <d@domob.eu>
1020
1021         * gfortran.h (in_prefix): Removed from this header.
1022         * match.h (gfc_matching_prefix): Moved and renamed from `in_prefix'.
1023         * decl.c (in_prefix): Removed from here.
1024         (gfc_match_prefix): Use new name of `gfc_matching_prefix'.
1025         * symbol.c (gfc_check_symbol_typed): Ditto.
1026         * expr.c (check_typed_ns): New helper variable.
1027         (expr_check_typed_help): New helper method.
1028         (gfc_expr_check_typed): Rewrote to use gfc_traverse_expr to do the
1029         work, fixing a minor problem.
1030         * match.c (gfc_matching_prefix): New variable.
1031
1032 2008-08-22  Daniel Kraft  <d@domob.eu>
1033
1034         PR fortran/32095
1035         PR fortran/34228
1036         * gfortran.h (in_prefix): New global.
1037         (gfc_check_symbol_typed), (gfc_check_expr_typed): New methods.
1038         * array.c (match_array_element_spec): Check that bounds-expressions
1039         don't have symbols not-yet-typed in them.
1040         * decl.c (var_element): Check that variable used is already typed.
1041         (char_len_param_value): Check that expression does not contain
1042         not-yet-typed symbols.
1043         (in_prefix): New global.
1044         (gfc_match_prefix): Record using `in_prefix' if we're at the moment
1045         parsing a prefix or not.
1046         * expr.c (gfc_expr_check_typed): New method.
1047         * parse.c (verify_st_order): New argument to disable error output.
1048         (check_function_result_typed): New helper method.
1049         (parse_spec): Check that the function-result declaration, if given in
1050         a prefix, contains no not-yet-typed symbols when the IMPLICIT rules are
1051         parsed.
1052         * symbol.c (gfc_check_symbol_typed): Check that a symbol already has
1053         a type associated to it, otherwise use the IMPLICIT rules or signal
1054         an error.
1055
1056 2008-08-21  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1057
1058         * f95-lang.c: Update all calls to pedwarn.
1059
1060 2008-08-18  Daniel Franke  <franke.daniel@gmail.com>
1061
1062         PR fortran/37032
1063         * gfortran.texi: Document decision on include file handling in
1064         preprocessed files.
1065
1066 2008-08-16  Tobias Burnus  <burnus@net-b.de>
1067
1068         PR fortran/36825
1069         * libgfortran.h: Reduce GFC_MAX_DIMENSIONS to 7.
1070
1071 2008-08-15  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1072
1073         PR fortran/35863
1074         * io.c (gfc_match_open): Enable UTF-8 in checks.
1075         * simplify.c (gfc_simplify_selected_char_kind): Enable iso_10646.
1076
1077 2008-08-14  Janus Weil  <janus@gcc.gnu.org>
1078
1079         PR fortran/36705
1080         * symbol.c (check_conflict): Move conflict checks for (procedure,save)
1081         and (procedure,intent) to resolve_fl_procedure.
1082         * resolve.c (resolve_fl_procedure): Ditto.
1083
1084 2008-08-09  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1085
1086         PR 36901
1087         * f95-lang.c (gfc_mark_addressable): Use "pedwarn (0," instead of
1088         'pedwarn0'.
1089
1090 2008-08-09  Paul Thomas  <pault@gcc.gnu.org>
1091
1092         PR fortran/37011
1093         * symbol.c (gfc_add_extension): New function.
1094         * decl.c (gfc_get_type_attr_spec): Call it.
1095         (gfc_match_derived_decl): Set symbol extension attribute from
1096         attr.extension.
1097         * gfortran.h : Add prototype for gfc_add_extension.
1098
1099 2008-08-08  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1100
1101         PR 28875
1102         * options.c (set_Wall): Replace set_Wunused by warn_unused.
1103
1104 2008-08-08  Daniel Kraft  <d@domob.eu>
1105
1106         * gfortran.h (gfc_finalizer):  Replaced member `procedure' by two
1107         new members `proc_sym' and `proc_tree' to store the symtree after
1108         resolution.
1109         (gfc_find_sym_in_symtree):  Made public.
1110         * decl.c (gfc_match_final_decl):  Adapted for new member name.
1111         * interface.c (gfc_find_sym_in_symtree):  Made public.
1112         (gfc_extend_expr), (gfc_extend_assign):  Changed call accordingly.
1113         * module.c (mio_finalizer), (mio_f2k_derived), (mio_full_f2k_derived):
1114         New methods for module-file IO of f2k_derived.
1115         (mio_symbol):  Do IO of f2k_derived namespace.
1116         * resolve.c (gfc_resolve_finalizers):  Adapted for new member name and
1117         finding the symtree for the symbol here.
1118         * symbol.c (gfc_free_finalizer):  Adapted for new members.
1119
1120 2008-07-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1121
1122         * gfc-internals.texi: Update to GFDL 1.2.  Do not list GPL as
1123         Invariant Section.
1124         * gfortran.texi: Likewise.
1125         * intrinsic.texi: Do not list GPL as Invariant Section.
1126         * invoke.texi: Likewise.  Update copyright years.
1127
1128 2008-07-29  Paul Thomas  <pault@gcc.gnu.org>
1129
1130         * trans-expr.c (conv_parent_component_references): New function
1131         to build missing parent references.
1132         (gfc_conv_variable): Call it
1133         * symbol.c (gfc_add_component): Check that component name in a
1134         derived type extension does not appear in parent.
1135         (gfc_find_component): For a derived type extension, check if
1136         the component appears in the parent derived type by calling
1137         self. Separate errors for private components and private types.
1138         * decl.c (match_data_constant): Add extra arg to call to
1139         gfc_match_structure_constructor.
1140         (check_extended_derived_type): New function to check that a
1141         parent derived type exists and that it is OK for exension.
1142         (gfc_get_type_attr_spec): Add extra argument 'name' and return
1143         it if extends is specified.
1144         (gfc_match_derived_decl): Match derived type extension and
1145         build a first component of the parent derived type if OK. Add
1146         the f2k namespace if not present.
1147         * gfortran.h : Add the extension attribute.
1148         * module.c : Handle attribute 'extension'.
1149         * match.h : Modify prototypes for gfc_get_type_attr_spec and
1150         gfc_match_structure_constructor.
1151         * primary.c (build_actual_constructor): New function extracted
1152         from gfc_match_structure_constructor and modified to call self
1153         iteratively to build derived type extensions, when f2k named
1154         components are used.
1155         (gfc_match_structure_constructor): Do not throw error for too
1156         many components if a parent type is being handled. Use
1157         gfc_find_component to generate errors for non-existent or
1158         private components.  Iteratively call self for derived type
1159         extensions so that parent constructor is built.  If extension
1160         and components left over, throw error.
1161         (gfc_match_rvalue): Add extra arg to call to
1162         gfc_match_structure_constructor.
1163
1164         * trans-array.c (gfc_conv_resolve_dependencies): If lhs and rhs
1165         are the same symbol, aliassing does not matter.
1166
1167 2008-07-29  Jan Hubicka  <jh@suse.cz>
1168
1169         * options.c (gfc_post_options): Do not set flag_no_inline.
1170
1171 2008-07-29  Daniel Kraft  <d@domob.eu>
1172
1173         PR fortran/36403
1174         * trans-intrinsic.c (conv_generic_with_optional_char_arg):  New method
1175         to append a string-length even if the string argument is missing, e.g.
1176         for EOSHIFT.
1177         (gfc_conv_intrinsic_function):  Call the new method for EOSHIFT, PACK
1178         and RESHAPE.
1179
1180 2008-07-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1181
1182         * gfortran.h (try): Remove macro.  Replace try with gfc_try
1183         throughout.
1184         * array.c: Likewise.
1185         * check.c: Likewise.
1186         * cpp.c: Likewise.
1187         * cpp.h: Likewise.
1188         * data.c: Likewise.
1189         * data.h: Likewise.
1190         * decl.c: Likewise.
1191         * error.c: Likewise.
1192         * expr.c: Likewise.
1193         * interface.c: Likewise.
1194         * intrinsic.c: Likewise.
1195         * intrinsic.h: Likewise.
1196         * io.c: Likewise.
1197         * match.h: Likewise.
1198         * parse.c: Likewise.
1199         * parse.h: Likewise.
1200         * resolve.c: Likewise.
1201         * scanner.c: Likewise.
1202         * simplify.c: Likewise.
1203         * symbol.c: Likewise.
1204         * trans-openmp.c: Likewise.
1205         * trans-types.c: Likewise.
1206
1207 2008-07-28  Tobias Burnus  <burnus@net-b.de>
1208
1209         * Make-lang.in: Remove -Wno-* from fortran-warn.
1210
1211 2008-07-28  Richard Guenther  <rguenther@suse.de>
1212
1213         Merge from gimple-tuples-branch.
1214
1215         2008-07-18  Aldy Hernandez  <aldyh@redhat.com>
1216
1217         * trans-expr.c: Include gimple.h instead of tree-gimple.h.
1218         * trans-array.c: Same.
1219         * trans-openmp.c: Same.
1220         * trans-stmt.c: Same.
1221         * f95-lang.c: Same.
1222         * trans-io.c: Same.
1223         * trans-decl.c: Same.
1224         * trans-intrinsic.c: Same.
1225         * trans.c: Same.  Include tree-iterator.h.
1226         * Make-lang.in (trans.o): Depend on tree-iterator.h
1227
1228         2008-07-14  Aldy Hernandez  <aldyh@redhat.com>
1229
1230         * trans-array.h (gfc_conv_descriptor_data_set_internal):
1231         Rename to gfc_conv_descriptor_data_set.
1232         (gfc_conv_descriptor_data_set_tuples): Remove.
1233         * trans-array.c (gfc_conv_descriptor_data_get): Rename
1234         from gfc_conv_descriptor_data_set_internal.
1235         Remove last argument to gfc_add_modify.
1236         (gfc_trans_allocate_array_storage): Rename gfc_add_modify_expr to
1237         gfc_add_modify.
1238         (gfc_trans_create_temp_array): Same.
1239         (gfc_conv_array_transpose): Same.
1240         (gfc_grow_array): Same.
1241         (gfc_put_offset_into_var): Same.
1242         (gfc_trans_array_ctor_element): Same.
1243         (gfc_trans_array_constructor_subarray): Same.
1244         (gfc_trans_array_constructor_value): Same.
1245         (gfc_trans_scalarized_loop_end): Same.
1246         (gfc_array_init_size): Same.
1247         (gfc_array_allocate): Same.
1248         (gfc_trans_array_bounds): Same.
1249         (gfc_trans_auto_array_allocation): Same.
1250         (gfc_trans_g77_array): Same.
1251         (gfc_trans_dummy_array_bias): Same.
1252         (gfc_conv_expr_descriptor): Same.
1253         (structure_alloc_comps): Same.
1254         * trans-expr.c: Same.
1255         * trans-openmp.c (gfc_omp_clause_default_ctor): Same.
1256         Rename gfc_conv_descriptor_data_set_tuples to
1257         gfc_conv_descriptor_data_set.
1258         (gfc_omp_clause_copy_ctor): Change build_gimple_modify_stmt to
1259         build2_v.
1260         (gfc_omp_clause_assign_op): Same.
1261         (gfc_trans_omp_array_reduction): Rename gfc_add_modify_expr to
1262         gfc_add_modify.
1263         (gfc_trans_omp_atomic): Same.
1264         (gfc_trans_omp_do): Same.  Change GIMPLE_MODIFY_STMT to MODIFY_EXPR.
1265         Rename gfc_add_modify_stmt to gfc_add_modify.
1266         * trans-stmt.c: Rename gfc_add_modify_expr to
1267         gfc_add_modify.
1268         * trans.c: Rename gfc_add_modify_expr to
1269         gfc_add_modify.
1270         (gfc_add_modify): Remove last argument.
1271         Rename GIMPLE_MODIFY_STMT to MODIFY_EXPR.
1272         * trans.h: Remove gfc_add_modify_expr, gfc_add_modify_stmt.
1273         Add prototype for gfc_add_modify.
1274         * f95-lang.c (union lang_tree_node): Rename GENERIC_NEXT to TREE_CHAIN.
1275         * trans-decl.c: Rename gfc_add_modify_stmt to gfc_add_modify.
1276         * trans-io.c: Same.
1277         * trans-intrinsic.c: Same.
1278
1279         2008-02-25  Aldy Hernandez  <aldyh@redhat.com>
1280
1281         * Make-lang.in (fortran-warn): Add -Wno-format.
1282
1283         2008-02-19  Diego Novillo  <dnovillo@google.com>
1284
1285         http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00804.html
1286
1287         * fortran/Make-lang.in (fortran-warn): Remove.
1288
1289         2007-11-22  Aldy Hernandez  <aldyh@redhat.com>
1290
1291         * trans-expr.c (gfc_trans_string_copy): Use "void *" when building a
1292         memset.
1293
1294         2007-11-10  Aldy Hernandez  <aldyh@redhat.com>
1295
1296         * Make-lang.in (fortran-warn): Set to -Wno-format.
1297         * trans.c (gfc_trans_code): Update comment to say GENERIC.
1298         Call tree_annotate_all_with_locus instead of annotate_all_with_locus.
1299
1300 2008-07-27  Tobias Burnus  <burnus@net-b.de>
1301
1302         PR fortran/36132
1303         PR fortran/29952
1304         PR fortran/36909
1305         * trans.c (gfc_trans_runtime_check): Allow run-time warning besides
1306         run-time error.
1307         * trans.h (gfc_trans_runtime_check): Update declaration.
1308         * trans-array.c (gfc_trans_array_ctor_element,gfc_trans_array_bound_check,
1309         gfc_conv_array_ref,gfc_conv_ss_startstride,gfc_trans_dummy_array_bias):
1310         Updated gfc_trans_runtime_check calls.
1311         (gfc_conv_array_parameter): Implement flag_check_array_temporaries,
1312         fix packing/unpacking for nonpresent optional actuals to optional
1313         formals.
1314         * trans-array.h (gfc_conv_array_parameter): Update declaration.
1315         * trans-expr.c (gfc_conv_substring,gfc_trans_arrayfunc_assign,
1316         gfc_conv_function_call): Updated gfc_trans_runtime_check calls.
1317         (gfc_conv_function_call): Update gfc_conv_array_parameter calls.
1318         * trans-expr.c (gfc_trans_goto): Updated gfc_trans_runtime_check
1319         calls.
1320         * trans-io.c (set_string,gfc_conv_intrinsic_repeat): Ditto.
1321         (gfc_conv_intrinsic_transfer,gfc_conv_intrinsic_loc): Same for
1322         gfc_conv_array_parameter.
1323         * trans-intrinsics.c (gfc_conv_intrinsic_bound): Ditto.
1324         * trans-decl.c (gfc_build_builtin_function_decls): Add
1325         gfor_fndecl_runtime_warning_at.
1326         * lang.opt: New option fcheck-array-temporaries.
1327         * gfortran.h (gfc_options): New flag_check_array_temporaries.
1328         * options.c (gfc_init_options, gfc_handle_option): Handle flag.
1329         * invoke.texi: New option fcheck-array-temporaries.
1330
1331 2008-07-24  Jan Hubicka  <jh@suse.cz>
1332
1333         * fortran/options.c (gfc_post_options): Remove flag_unline_trees code.
1334
1335 2008-07-24  Daniel Kraft  <d@domob.eu>
1336
1337         PR fortran/33141
1338         * lang.opt (Wnonstd-intrinsics):  Removed option.
1339         (Wintrinsics-std), (Wintrinsic-shadow):  New options.
1340         * invoke.texi (Option Summary):  Removed -Wnonstd-intrinsics
1341         from the list and added -Wintrinsics-std and -Wintrinsic-shadow.
1342         (Error and Warning Options):  Documented the new options and removed
1343         the documentation for -Wnonstd-intrinsics.
1344         * gfortran.h (gfc_option_t):  New members warn_intrinsic_shadow and
1345         warn_intrinsics_std, removed warn_nonstd_intrinsics.
1346         (gfc_is_intrinsic):  Renamed from gfc_intrinsic_name.
1347         (gfc_warn_intrinsic_shadow), (gfc_check_intrinsic_standard):  New.
1348         * decl.c (match_procedure_decl):  Replaced gfc_intrinsic_name by
1349         the new name gfc_is_intrinsic.
1350         (warn_intrinsic_shadow):  New helper method.
1351         (gfc_match_function_decl), (gfc_match_subroutine):  Call the new method
1352         warn_intrinsic_shadow to check the just-parsed procedure.
1353         * expr.c (check_init_expr):  Call new gfc_is_intrinsic to check whether
1354         the function called is really an intrinsic in the selected standard.
1355         * intrinsic.c (gfc_is_intrinsic):  Renamed from gfc_intrinsic_name and
1356         extended to take into account the selected standard settings when trying
1357         to find out whether a symbol is an intrinsic or not.
1358         (gfc_check_intrinsic_standard):  Made public and extended.
1359         (gfc_intrinsic_func_interface), (gfc_intrinsic_sub_interface):  Removed
1360         the calls to check_intrinsic_standard, this check now happens inside
1361         gfc_is_intrinsic.
1362         (gfc_warn_intrinsic_shadow):  New method defined.
1363         * options.c (gfc_init_options):  Initialize new warning flags to false
1364         and removed intialization of Wnonstd-intrinsics flag.
1365         (gfc_post_options):  Removed logic for Wnonstd-intrinsics flag.
1366         (set_Wall):  Set new warning flags and removed Wnonstd-intrinsics flag.
1367         (gfc_handle_option):  Handle the new flags and removed handling of the
1368         old Wnonstd-intrinsics flag.
1369         * primary.c (gfc_match_rvalue):  Replaced call to gfc_intrinsic_name by
1370         the new name gfc_is_intrinsic.
1371         * resolve.c (resolve_actual_arglist):  Ditto.
1372         (resolve_generic_f), (resolve_unknown_f):  Ditto.
1373         (is_external_proc):  Ditto.
1374         (resolve_generic_s), (resolve_unknown_s):  Ditto.
1375         (resolve_symbol):  Ditto and ensure for symbols declared INTRINSIC that
1376         they are really available in the selected standard setting.
1377
1378 2008-07-24  Daniel Kraft  <d@domob.eu>
1379
1380         * match.c (gfc_match):  Add assertion to catch wrong calls trying to
1381         match upper-case characters.
1382
1383 2008-07-24  Thomas Koenig  <tkoenig@gcc.gnu.org>
1384
1385         PR fortran/29952
1386         * gfortran.h:  Add "warn_array_temp" to gfc_option_t.
1387         * lang.opt:  Add -Warray-temporaries.
1388         * invoke.texi:  Document -Warray-temporaries
1389         * trans-array.h (gfc_trans_create_temp_array):  Add argument of
1390         type *locus.
1391         (gfc_conv_loop_setup):  Likewise.
1392         * trans-array.c (gfc_trans_create_temp_array):  If
1393         -Warray-temporaries is given and locus is present, warn about
1394         creation of array temporaries.
1395         (gfc_trans_array_constructor_subarray):  Add locus to call
1396         of gfc_conv_loop_setup.
1397         (gfc_trans_array_constructor):  Add where argument.  Pass where
1398         argument to call of gfc_trans_create_temp_array.
1399         (gfc_add_loop_ss_code):  Add where argument.  Pass where argument
1400         to recursive call of gfc_add_loop_ss_code and to call of
1401         gfc_trans_array_constructor.
1402         (gfc_conv_loop_setup):  Add where argument.  Pass where argument
1403         to calls to gfc_add_loop_ss_code and to gfc_trans_create_temp_array.
1404         (gfc_conv_expr_descriptor):  Pass location to call of
1405         gfc_conv_loop_setup.
1406         (gfc_conv_array_parameter):  If -Warray-temporaries is given,
1407         warn about creation of temporary arrays.
1408         * trans-expr.c (gfc_conv_subref_array_arg):  Add where argument
1409         to call to gfc_conv_loop_setup.
1410         (gfc_conv_function_call):  Add where argument to call to
1411         gfc_trans_creat_temp_array.
1412         (gfc_trans_subarray_assign):  Likewise.
1413         (gfc_trans_assignment_1):  Add where argument to call to
1414         gfc_conv_loop_setup.
1415         * trans-stmt.c (gfc_conv_elemental_dependencies):  Add where
1416         argument to call to gfc_trans_create_temp_array.
1417         (gfc_trans_call):  Add where argument to call to gfc_conv_loop_setup.
1418         (generate_loop_for_temp_to_lhs):  Likewise.
1419         (generate_loop_for_rhs_to_temp):  Likewise.
1420         (compute_inner_temp_size):  Likewise.
1421         (gfc_trans-pointer_assign_need_temp):  Likewise.
1422         (gfc_evaluate_where_mask):  Likewise.
1423         (gfc_trans_where_assign):  Likewise.
1424         (gfc_trans_where_3):  Likewise.
1425         * trans-io.c (transfer_srray_component):  Add where argument
1426         to function. Add where argument to call to gfc_conv_loop_setup.
1427         (transfer_expr):  Add where argument to call to
1428         transfer_array_component.
1429         (gfc_trans_transfer):  Add where expression to call to
1430         gfc_conv_loop_setup.
1431         * trans-intrinsic.c (gfc_conv_intrinsic_anyall):  Add
1432         where argument to call to gfc_conv_loop_setup.
1433         (gfc_conv_intrinsic_count):  Likewise.
1434         (gfc_conv_intrinsic_arith):  Likewise.
1435         (gfc_conv_intrinsic_dot_product):  Likewise.
1436         (gfc_conv_intrinsic_minmaxloc):  Likewise.
1437         (gfc_conv_intrinsic_minmaxval):  Likewise.
1438         (gfc_conv_intrinsic_array_transfer):  Warn about
1439         creation of temporary array.
1440         Add where argument to call to gfc_trans_create_temp_array.
1441         * options.c (gfc_init_options):  Initialize gfc_option.warn_array_temp.
1442         (gfc_handle_option):  Set gfc_option.warn_array_temp.
1443
1444 2008-07-23  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1445
1446         PR 35058
1447         * f95-lang.c (gfc_mark_addressable): All calls to pedwarn changed.
1448
1449 2008-07-22  Daniel Kraft  <d@domob.eu>
1450
1451         PR fortran/29835
1452         * io.c (error_element), (format_locus):  New static globals.
1453         (unexpected_element):  Spelled out this message fully.
1454         (next_char):  Keep track of locus when not MODE_STRING.
1455         (next_char_not_space):  Remember last parsed element in error_element.
1456         (format_lex):  Fix two indentation errors.
1457         (check_format):  Use format_locus and possibly error_element for a
1458         slightly better error message on invalid format.
1459         (check_format_string):  Set format_locus to start of the string
1460         expression used as format.
1461
1462 2008-07-21  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1463
1464         * expr.c (gfc_check_pointer_assign): Fix typo in string.
1465         * io.c (check_format): Fix typo in string.  Fix comment typos.
1466         * parse.c (gfc_global_used): Likewise.
1467         * resolve.c (resolve_allocate_expr): Likewise.
1468         * symbol.c (gfc_set_default_type): Likewise.
1469         * arith.c: Fix typos in comments.
1470         * array.c: Likewise.
1471         * data.c: Likewise.
1472         * decl.c: Likewise.
1473         * dependency.c: Likewise.
1474         * f95-lang.c: Likewise.
1475         * gfortran.h: Likewise.
1476         * matchexp.c: Likewise.
1477         * module.c: Likewise.
1478         * primary.c: Likewise.
1479         * scanner.c: Likewise.
1480         * trans-array.c: Likewise.
1481         * trans-common.c: Likewise.
1482         * trans-decl.c: Likewise.
1483         * trans-expr.c: Likewise.
1484         * trans-intrinsic.c: Likewise.
1485         * trans-types.c: Likewise.
1486         * trans.c: Likewise.
1487         * trans.h: Likewise.
1488
1489 2008-07-19  Tobias Burnus  <burnus@net-b.de>
1490
1491         PR fortran/36795
1492         * matchexp.c (gfc_get_parentheses): Remove obsolete workaround,
1493         which caused the generation of wrong code.
1494
1495 2008-07-19  Tobias Burnus  <burnus@net-b.de>
1496
1497         PR fortran/36342
1498         * scanner.c (load_file): Add argument to destinguish between
1499         true filename and displayed filename.
1500         (include_line,gfc_new_file): Adapt accordingly.
1501
1502 2008-07-19  Tobias Burnus  <burnus@net-b.de>
1503
1504         * check.c (gfc_check_cshift,gfc_check_eoshift,gfc_check_unpack): Add rank
1505         checks for cshift's shift and eoshift's shift and boundary args.
1506         (gfc_check_unpack): Add rank and shape tests for unpack.
1507
1508 2008-07-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1509
1510         * gfortran.h (new): Remove macro.
1511         * array.c (gfc_append_constructor, match_array_list,
1512         gfc_match_array_constructor): Likewise.
1513         * bbt.c (insert, gfc_insert_bbt): Likewise.
1514         * decl.c (var_element, top_var_list, top_val_list, gfc_match_data,
1515         get_proc_name): Likewise.
1516         * expr.c (gfc_copy_actual_arglist): Likewise.
1517         * interface.c (compare_actual_formal, check_new_interface,
1518         gfc_add_interface): Likewise.
1519         * intrinsic.c gfc_convert_type_warn, gfc_convert_chartype):
1520         Likewise.
1521         * io.c (match_io_iterator, match_io_list): Likewise.
1522         * match.c (match_forall_header): Likewise.
1523         * matchexp.c (build_node): Likewise.
1524         * module.c (gfc_match_use): Likewise.
1525         * scanner.c (load_file): Likewise.
1526         * st.c (gfc_append_code): Likewise.
1527         * symbol.c (save_symbol_data, gfc_get_sym_tree, gfc_undo_symbols,
1528         gfc_commit_symbols): Likewise.
1529         * trans-common.c (build_field): Likewise.
1530         * trans-decl.c (gfc_finish_var_decl): Likewise.
1531         * trans-expr.c (gfc_free_interface_mapping,
1532         gfc_get_interface_mapping_charlen, gfc_add_interface_mapping,
1533         gfc_finish_interface_mapping,
1534         gfc_apply_interface_mapping_to_expr): Likewise.
1535         * trans.h (gfc_interface_sym_mapping): Likewise.
1536
1537 2008-07-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1538
1539         * gfortran.h (operator): Remove macro.
1540         (gfc_namespace, gfc_expr): Avoid C++ keywords.
1541         * arith.c (eval_intrinsic, eval_intrinsic_f2, eval_intrinsic_f3):
1542         Likewise.
1543         * decl.c (access_attr_decl): Likewise.
1544         * dependency.c (gfc_dep_compare_expr): Likewise.
1545         * dump-parse-tree.c (show_expr, show_uop, show_namespace):
1546         Likewise.
1547         * expr.c (gfc_copy_expr, gfc_type_convert_binary,
1548         simplify_intrinsic_op, check_intrinsic_op): Likewise.
1549         * interface.c (fold_unary, gfc_match_generic_spec,
1550         gfc_match_interface, gfc_match_end_interface,
1551         check_operator_interface, check_uop_interfaces,
1552         gfc_check_interfaces, gfc_extend_expr, gfc_extend_assign,
1553         gfc_add_interface, gfc_current_interface_head,
1554         gfc_set_current_interface_head): Likewise.
1555         * iresolve.c (gfc_resolve_dot_product, gfc_resolve_matmul):
1556         Likewise.
1557         * matchexp.c (gfc_get_parentheses, build_node): Likewise.
1558         * module.c (gfc_use_rename, gfc_match_use, find_use_name_n,
1559         number_use_names, mio_expr, load_operator_interfaces, read_module,
1560         write_operator, write_module): Likewise.
1561         * openmp.c (resolve_omp_atomic): Likewise.
1562         * resolve.c (resolve_operator, gfc_resolve_character_operator,
1563         gfc_resolve_uops): Likewise.
1564         * symbol.c (free_uop_tree, gfc_free_namespace): Likewise.
1565         * trans-expr.c (gfc_conv_expr_op): Likewise.
1566         * trans-openmp.c (gfc_trans_omp_atomic): Likewise.
1567
1568 2008-07-19  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1569
1570         * gfortran.h (protected): Remove macro.
1571         * dump-parse-tree.c (show_attr): Avoid C++ keywords.
1572         * expr.c (gfc_check_pointer_assign): Likewise.
1573         * interface.c (compare_parameter_protected): Likewise.
1574         * intrinsic.c (enum class, add_sym, add_sym_0, add_sym_1,
1575         add_sym_1s, add_sym_1m, add_sym_2, add_sym_2s, add_sym_3,
1576         add_sym_3ml, add_sym_3red, add_sym_3s, add_sym_4, add_sym_4s,
1577         add_sym_5s): Likewise.
1578         * match.c (gfc_match_assignment, gfc_match_pointer_assignment):
1579         Likewise.
1580         * module.c (mio_symbol_attribute): Likewise.
1581         * primary.c (match_variable): Likewise.
1582         * resolve.c (resolve_equivalence): Likewise.
1583         * symbol.c (check_conflict, gfc_add_protected, gfc_copy_attr):
1584         Likewise.
1585         * trans-types.c (gfc_get_array_type_bounds): Likewise.
1586
1587 2008-07-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1588
1589         * arith.c (eval_type_intrinsic0): Avoid C++ keywords.
1590         * gfortran.h (try, protected, operator, new): Likewise.
1591
1592 2008-07-17  Tobias Burnus  <burnus@net-b.de>
1593
1594         PR fortran/36825
1595         PR fortran/36824
1596         * array.c (gfc_match_array_spec): Fix array-rank check.
1597         * resolve.c (resolve_fl_derived): Fix constentness check
1598         for the array dimensions.
1599
1600 2008-07-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1601
1602         * Make-lang.in (gfortranspec.o): Fix dependencies.
1603
1604 2008-07-13  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1605
1606         PR fortran/36725
1607         * io.c: Add error check for g0 edit descriptor followed by '.'.
1608
1609 2008-07-12  Daniel Kraft  <d@domob.eu>
1610
1611         * resolve.c (resolve_fl_derived):  Allow pointer components to empty
1612         derived types fixing a missing part of PR fortran/33221.
1613
1614 2008-07-10  Daniel Kraft  <d@domob.eu>
1615
1616         * gfc-internals.texi (section gfc_expr):  Created documentation about
1617         the gfc_expr internal data structure.
1618
1619 2008-07-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
1620
1621         PR fortran/36670
1622         * iresolve.c (gfc_resolve_product):  Set shape of return
1623         value from array.
1624         (gfc_resolve_sum):  Likewise.
1625
1626 2008-07-07  Jakub Jelinek  <jakub@redhat.com>
1627
1628         PR middle-end/36726
1629         * f95-lang.c (poplevel): Don't ever add subblocks to
1630         global_binding_level.
1631
1632 2008-07-02  Janus Weil  <janus@gcc.gnu.org>
1633             Tobias Burnus  <burnus@net-b.de>
1634             Paul Thomas  <pault@gcc.gnu.org>
1635
1636         PR fortran/32580
1637         * gfortran.h (struct gfc_symbol): New member "proc_pointer".
1638         * check.c (gfc_check_associated,gfc_check_null): Implement
1639         procedure pointers.
1640         * decl.c (match_procedure_decl): Ditto.
1641         * expr.c (gfc_check_pointer_assign,gfc_check_assign_symbol): Ditto.
1642         * interface.c (compare_actual_formal): Ditto.
1643         * match.h: Ditto.
1644         * match.c (gfc_match_pointer_assignment): Ditto.
1645         * parse.c (parse_interface): Ditto.
1646         * primary.c (gfc_match_rvalue,match_variable): Ditto.
1647         * resolve.c (resolve_fl_procedure): Ditto.
1648         * symbol.c (check_conflict,gfc_add_external,gfc_add_pointer,
1649         gfc_copy_attr,gen_fptr_param,build_formal_args): Ditto.
1650         * trans-decl.c (get_proc_pointer_decl,gfc_get_extern_function_decl,
1651         create_function_arglist): Ditto.
1652         * trans-expr.c (gfc_conv_variable,gfc_conv_function_val,
1653         gfc_conv_function_call,gfc_trans_pointer_assignment): Ditto.
1654
1655 2008-07-02  Thomas Koenig  <tkoenig@gcc.gnu.org>
1656
1657         PR fortran/36590
1658         PR fortran/36681
1659         * iresolve.c (resolve_mask_arg):  Don't convert mask to
1660         kind=1 logical if it is of that type already.
1661
1662 2008-06-29  Thomas Koenig  <tkoenig@gcc.gnu.org>
1663
1664         PR fortran/36341
1665         * iresolve.c (gfc_resolve_matmul): Copy shapes
1666         from arguments.
1667
1668 2008-06-29  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1669
1670         * invoke.texi: Add documentation for runtime behavior of
1671         -fno-range-check.
1672
1673 2008-06-28  Daniel Kraft  <d@domob.eu>
1674
1675         * gfc-internals.texi (section gfc_code):  Extended documentation about
1676         gfc_code in the internal datastructures chapter including details about
1677         how IF, DO and SELECT blocks look like and an example for how the
1678         block-chaining works.
1679
1680 2008-06-25  Paul Thomas  <pault@gcc.gnu.org>
1681
1682         PR fortran/36526
1683         * interface.c (check_intents):  Correct error where the actual
1684         arg was checked for a pointer argument, rather than the formal.
1685
1686 2008-06-24  Paul Thomas  <pault@gcc.gnu.org>
1687
1688         PR fortran/34371
1689         * expr.c (gfc_check_assign):  Change message and locus for
1690         error when conform == 0.
1691
1692 2008-06-23  Jakub Jelinek  <jakub@redhat.com>
1693
1694         PR fortran/36597
1695         * cpp.c (cpp_define_builtins): Change _OPENMP value to 200805.
1696
1697 2008-06-20  Laurynas Biveinis  <laurynas.biveinis@gmail.com>
1698             Tobias Burnus  <burnus@net-b.de>
1699
1700         PR fortran/34908
1701         PR fortran/36276
1702         * scanner.c (preprocessor_line): do not call gfc_free for
1703         current_file->filename if it differs from filename.
1704
1705 2008-06-20  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1706
1707         * arith.c (hollerith2representation): Fix for -Wc++-compat.
1708         * array.c (gfc_get_constructor): Likewise.
1709         * decl.c (gfc_get_data_variable, gfc_get_data_value, gfc_get_data,
1710         create_enum_history, gfc_match_final_decl): Likewise.
1711         * error.c (error_char): Likewise.
1712         * expr.c (gfc_get_expr, gfc_copy_expr): Likewise.
1713         * gfortran.h (gfc_get_charlen, gfc_get_array_spec,
1714         gfc_get_component, gfc_get_formal_arglist, gfc_get_actual_arglist,
1715         gfc_get_namelist, gfc_get_omp_clauses, gfc_get_interface,
1716         gfc_get_common_head, gfc_get_dt_list, gfc_get_array_ref,
1717         gfc_get_ref, gfc_get_equiv, gfc_get_case, gfc_get_iterator,
1718         gfc_get_alloc, gfc_get_wide_string): Likewise.
1719         * interface.c (count_types_test): Likewise.
1720         * intrinsic.c (add_char_conversions, gfc_intrinsic_init_1):
1721         Likewise.
1722         * io.c (gfc_match_open, gfc_match_close, match_filepos, match_io,
1723         gfc_match_inquire, gfc_match_wait): Likewise.
1724         * match.c (gfc_match, match_forall_iterator): Likewise.
1725         * module.c (gfc_get_pointer_info, gfc_get_use_rename, add_fixup,
1726         add_true_name, parse_string, write_atom, quote_string,
1727         mio_symtree_ref, mio_gmp_real, write_common_0): Likewise.
1728         * options.c (gfc_post_options): Likewise.
1729         * primary.c (match_integer_constant, match_hollerith_constant,
1730         match_boz_constant, match_real_constant,
1731         gfc_get_structure_ctor_component, gfc_match_structure_constructor): Likewise.
1732         * scanner.c (gfc_widechar_to_char, add_path_to_list,
1733         add_file_change, load_line, get_file, preprocessor_line,
1734         load_file, unescape_filename, gfc_read_orig_filename): Likewise.
1735         * simplify.c (gfc_simplify_ibits, gfc_simplify_ishft,
1736         gfc_simplify_ishftc): Likewise.
1737         * symbol.c (gfc_get_st_label, gfc_get_namespace, gfc_new_symtree,
1738         gfc_get_uop, gfc_new_symbol, save_symbol_data, gfc_get_gsymbol):
1739         Likewise.
1740         * target-memory.c (gfc_target_interpret_expr): Likewise.
1741         * trans-const.c (gfc_build_wide_string_const): Likewise.
1742         * trans-expr.c (gfc_add_interface_mapping): Likewise.
1743         * trans-intrinsic.c (gfc_conv_intrinsic_conversion,
1744         gfc_conv_intrinsic_int, gfc_conv_intrinsic_lib_function,
1745         gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_ctime,
1746         gfc_conv_intrinsic_fdate, gfc_conv_intrinsic_ttynam,
1747         gfc_conv_intrinsic_minmax, gfc_conv_intrinsic_minmax_char,
1748         gfc_conv_intrinsic_ishftc, gfc_conv_intrinsic_index_scan_verify,
1749         gfc_conv_intrinsic_merge, gfc_conv_intrinsic_trim): Likewise.
1750         * trans.c (gfc_get_backend_locus): Likewise.
1751         * trans.h (gfc_get_ss): Likewise.
1752
1753 2008-06-18  Daniel Kraft  <d@domob.eu>
1754
1755         PR fortran/36517, fortran/36492
1756         * array.c (gfc_resolve_character_array_constructor):  Call
1757         gfc_set_constant_character_len with changed length-chec argument.
1758         * decl.c (gfc_set_constant_character_len):  Changed array argument to
1759         be a generic length-checking argument that can be used for correct
1760         checking with typespec and in special cases where the should-be length
1761         is different from the target length.
1762         (build_struct):  Call gfc_set_constant_character_len with changed length
1763         checking argument and introduced additional checks for exceptional
1764         conditions on invalid code.
1765         (add_init_expr_to_sym), (do_parm):  Call gfc_set_constant_character_len
1766         with changed argument.
1767         * match.h (gfc_set_constant_character_len):  Changed third argument to
1768         int for the should-be length rather than bool.
1769
1770 2008-06-17  Daniel Kraft  <d@domob.eu>
1771
1772         PR fortran/36112
1773         * array.c (gfc_resolve_character_array_constructor):  Check that all
1774         elements with constant character length have the same one rather than
1775         fixing it if no typespec is given, emit an error if they don't.  Changed
1776         return type to "try" and return FAILURE for the case above.
1777         (gfc_resolve_array_constructor):  Removed unneeded call to
1778         gfc_resolve_character_array_constructor in this function.
1779         * gfortran.h (gfc_resolve_character_array_constructor):  Returns try.
1780         * trans-array.c (get_array_ctor_strlen):  Return length of first element
1781         rather than last element.
1782         * resolve.c (gfc_resolve_expr):  Handle FAILURE return from
1783         gfc_resolve_character_array_constructor.
1784
1785 2008-06-17  Paul Thomas  <pault@gcc.gnu.org>
1786
1787         PR fortran/34396
1788         * resolve.c (add_dt_to_dt_list):  New function.
1789         (resolve_fl_derived): Call new function for pointer components
1790         and when derived type resolved.
1791
1792 2008-06-15  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1793
1794         PR fortran/36515
1795         * trans-decl.c (gfc_generate_function_code): Add range_check to options
1796         array.
1797
1798 2008-06-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1799
1800         * gfc-internals.texi: Expand TABs, drop indentation outside examples.
1801         * gfortran.texi: Likewise.
1802         * intrinsic.texi: Likewise.
1803         * invoke.texi: Likewise.
1804
1805 2008-06-13  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1806
1807         PR fortran/35863
1808         * trans-io.c (gfc_build_io_library_fndecls): Build declaration for
1809         transfer_character_wide which includes passing in the character kind to
1810         support wide character IO. (transfer_expr): If the kind == 4, create the
1811         argument and build the call.
1812         * gfortran.texi: Fix typo.
1813
1814 2008-06-13  Tobias Burnus  <burnus@net-b.de>
1815
1816         PR fortran/36476
1817         * decl.c (do_parm): Handle init expression for len=*.
1818
1819 2008-06-12  Tobias Burnus  <burnus@net-b.de>
1820
1821         PR fortran/36462
1822         * trans-intrinsic.c (gfc_conv_intrinsic_index_scan_verify):
1823         Fix passing of the BACK= argument.
1824
1825 2008-06-10  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1826
1827         * cpp.c: Add copyright notice.
1828         * cpp.h: Add copyright notice.
1829
1830 2008-06-08  Janus Weil  <janus@gcc.gnu.org>
1831
1832         PR fortran/36459
1833         * decl.c (match_procedure_decl): Correctly recognize if the interface
1834         is an intrinsic procedure.
1835
1836 2008-06-08  Tobias Burnus  <burnus@net-b.de>
1837
1838         PR fortran/35830
1839         * resolve.c (resolve_symbol): Copy more attributes for
1840         PROCEDUREs with interfaces.
1841
1842 2008-06-07  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1843
1844         PR fortran/36420
1845         PR fortran/36422
1846         * io.c (check_format): Add new error message for zero width.
1847         Use new error message for FMT_A and with READ, FMT_G.  Allow
1848         FMT_G with WRITE except when -std=F95 and -std=F2003.
1849
1850 2008-06-07  Tobias Burnus  <burnus@net-b.de>
1851
1852         PR fortran/36437
1853         * intrinsic.c (add_functions): Implement c_sizeof.
1854         * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): Do not
1855         create unneeded variable in the scalar case.
1856         * intrinsic.texi: Add C_SIZEOF documentation.
1857
1858 2008-06-06  Tobias Burnus  <burnus@net-b.de>
1859
1860         * intrinsic.texi (BESSEL_J1): Fix BES(S)EL_J1 typo.
1861
1862 2008-06-06  Jakub Jelinek  <jakub@redhat.com>
1863
1864         * scanner.c (skip_free_comments, skip_fixed_comments): Handle tabs.
1865         * parse.c (next_free): Allow tab after !$omp.
1866         (decode_omp_directive): Handle !$omp task, !$omp taskwait
1867         and !$omp end task.
1868         (case_executable): Add ST_OMP_TASKWAIT.
1869         (case_exec_markers): Add ST_OMP_TASK.
1870         (gfc_ascii_statement): Handle ST_OMP_TASK, ST_OMP_END_TASK and
1871         ST_OMP_TASKWAIT.
1872         (parse_omp_structured_block, parse_executable): Handle ST_OMP_TASK.
1873         * gfortran.h (gfc_find_sym_in_expr): New prototype.
1874         (gfc_statement): Add ST_OMP_TASK, ST_OMP_END_TASK and ST_OMP_TASKWAIT.
1875         (gfc_omp_clauses): Add OMP_SCHED_AUTO to sched_kind,
1876         OMP_DEFAULT_FIRSTPRIVATE to default_sharing.  Add collapse and
1877         untied fields.
1878         (gfc_exec_op): Add EXEC_OMP_TASK and EXEC_OMP_TASKWAIT.
1879         * f95-lang.c (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
1880         LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP, LANG_HOOKS_OMP_CLAUSE_DTOR,
1881         LANG_HOOKS_OMP_PRIVATE_OUTER_REF): Define.
1882         * trans.h (gfc_omp_clause_default_ctor): Add another argument.
1883         (gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op,
1884         gfc_omp_clause_dtor, gfc_omp_private_outer_ref): New prototypes.
1885         * types.def (BT_ULONGLONG, BT_PTR_ULONGLONG,
1886         BT_FN_BOOL_ULONGLONGPTR_ULONGLONGPTR,
1887         BT_FN_BOOL_BOOL_ULL_ULL_ULL_ULLPTR_ULLPTR,
1888         BT_FN_BOOL_BOOL_ULL_ULL_ULL_ULL_ULLPTR_ULLPTR,
1889         BT_FN_VOID_PTR_PTR, BT_PTR_FN_VOID_PTR_PTR,
1890         BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT): New.
1891         (BT_BOOL): Use integer type with BOOL_TYPE_SIZE rather
1892         than boolean_type_node.
1893         * dump-parse-tree.c (gfc_show_omp_node): Handle EXEC_OMP_TASK,
1894         EXEC_OMP_TASKWAIT, OMP_SCHED_AUTO, OMP_DEFAULT_FIRSTPRIVATE,
1895         untied and collapse clauses.
1896         (gfc_show_code_node): Handle EXEC_OMP_TASK and EXEC_OMP_TASKWAIT.
1897         * trans.c (gfc_trans_code): Handle EXEC_OMP_TASK and
1898         EXEC_OMP_TASKWAIT.
1899         * st.c (gfc_free_statement): Likewise.
1900         * resolve.c (gfc_resolve_blocks, resolve_code): Likewise.
1901         (find_sym_in_expr): Rename to...
1902         (gfc_find_sym_in_expr): ... this.  No longer static.
1903         (resolve_allocate_expr, resolve_ordinary_assign): Adjust caller.
1904         * match.h (gfc_match_omp_task, gfc_match_omp_taskwait): New
1905         prototypes.
1906         * openmp.c (resolve_omp_clauses): Allow allocatable arrays in
1907         firstprivate, lastprivate, reduction, copyprivate and copyin
1908         clauses.
1909         (omp_current_do_code): Made static.
1910         (omp_current_do_collapse): New variable.
1911         (gfc_resolve_omp_do_blocks): Compute omp_current_do_collapse,
1912         clear omp_current_do_code and omp_current_do_collapse on return.
1913         (gfc_resolve_do_iterator): Handle collapsed do loops.
1914         (resolve_omp_do): Likewise, diagnose errorneous collapsed do loops.
1915         (OMP_CLAUSE_COLLAPSE, OMP_CLAUSE_UNTIED): Define.
1916         (gfc_match_omp_clauses): Handle default (firstprivate),
1917         schedule (auto), untied and collapse (n) clauses.
1918         (OMP_DO_CLAUSES): Add OMP_CLAUSE_COLLAPSE.
1919         (OMP_TASK_CLAUSES): Define.
1920         (gfc_match_omp_task, gfc_match_omp_taskwait): New functions.
1921         * trans-openmp.c (gfc_omp_private_outer_ref): New function.
1922         (gfc_omp_clause_default_ctor): Add outer argument.  For allocatable
1923         arrays allocate them with the bounds of the outer var if outer
1924         var is allocated.
1925         (gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op,
1926         gfc_omp_clause_dtor): New functions.
1927         (gfc_trans_omp_array_reduction): If decl is allocatable array,
1928         allocate it with outer var's bounds in OMP_CLAUSE_REDUCTION_INIT
1929         and deallocate it in OMP_CLAUSE_REDUCTION_MERGE.
1930         (gfc_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
1931         for assumed-size arrays.
1932         (gfc_trans_omp_do): Add par_clauses argument.  If dovar is
1933         present in lastprivate clause and do loop isn't simple,
1934         set OMP_CLAUSE_LASTPRIVATE_STMT.  If dovar is present in
1935         parallel's lastprivate clause, change it to shared and add
1936         lastprivate clause to OMP_FOR_CLAUSES.  Handle collapsed do loops.
1937         (gfc_trans_omp_directive): Adjust gfc_trans_omp_do callers.
1938         (gfc_trans_omp_parallel_do): Likewise.  Move collapse clause to
1939         OMP_FOR from OMP_PARALLEL.
1940         (gfc_trans_omp_clauses): Handle OMP_SCHED_AUTO,
1941         OMP_DEFAULT_FIRSTPRIVATE, untied and collapse clauses.
1942         (gfc_trans_omp_task, gfc_trans_omp_taskwait): New functions.
1943         (gfc_trans_omp_directive): Handle EXEC_OMP_TASK and
1944         EXEC_OMP_TASKWAIT.
1945
1946 2008-06-04  Janus Weil  <janus@gcc.gnu.org>
1947
1948         PR fortran/36322
1949         PR fortran/36275
1950         * resolve.c (resolve_symbol): Correctly copy the interface for a
1951         PROCEDURE declaration.
1952
1953 2008-06-02  Janus Weil  <janus@gcc.gnu.org>
1954
1955         PR fortran/36361
1956         * symbol.c (gfc_add_allocatable,gfc_add_dimension,
1957         gfc_add_explicit_interface): Added checks.
1958         * decl.c (attr_decl1): Added missing "var_locus".
1959         * parse.c (parse_interface): Checking for errors.
1960
1961 2008-06-02  Daniel Kraft  <d@domob.eu>
1962
1963         * gfortran.h:  New statement-type ST_FINAL for FINAL declarations.
1964         (struct gfc_symbol):  New member f2k_derived.
1965         (struct gfc_namespace):  New member finalizers, for use in the above
1966         mentioned f2k_derived namespace.
1967         (struct gfc_finalizer):  New type defined for finalizers linked list.
1968         * match.h (gfc_match_final_decl):  New function header.
1969         * decl.c (gfc_match_derived_decl):  Create f2k_derived namespace on
1970         constructed symbol node.
1971         (gfc_match_final_decl):  New function to match a FINAL declaration line.
1972         * parse.c (decode_statement):  match-call for keyword FINAL.
1973         (parse_derived):  Parse CONTAINS section and accept FINAL statements.
1974         * resolve.c (gfc_resolve_finalizers):  New function to resolve (that is
1975         in this case, check) a list of finalizer procedures.
1976         (resolve_fl_derived):  Call gfc_resolve_finalizers here.
1977         * symbol.c (gfc_get_namespace):  Initialize new finalizers to NULL.
1978         (gfc_free_namespace):  Free finalizers list.
1979         (gfc_new_symbol):  Initialize new f2k_derived to NULL.
1980         (gfc_free_symbol):  Free f2k_derived namespace.
1981         (gfc_free_finalizer):  New function to free a single gfc_finalizer node.
1982         (gfc_free_finalizer_list):  New function to free a linked list of
1983         gfc_finalizer nodes.
1984
1985 2008-06-02  Daniel Franke  <franke.daniel@gmail.com>
1986
1987         PR fortran/36375
1988         PR fortran/36377
1989         * cpp.c (gfc_cpp_init): Do not initialize builtins if
1990         processing already preprocessed input.
1991         (gfc_cpp_preprocess): Finalize output with newline.
1992
1993 2008-05-31  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1994
1995         * intrinsic.texi: Revert wrong commit.
1996
1997 2008-05-31  Steven G. Kargl  <kargls@comcast.net>
1998
1999         * arith.c (gfc_arith_init_1): Remove now unused r and c variables.
2000         Cleanup numerical inquiry function initialization.
2001         (gfc_arith_done_1): Replace multiple mpfr_clear() invocations with
2002         a single mpfr_clears().
2003         (gfc_check_real_range): Re-arrange logic to eliminate multiple
2004         unnecessary branching and assignments.
2005         (gfc_arith_times): Use mpfr_clears() in preference to multiple
2006         mpfr_clear().
2007         (gfc_arith_divide): Ditto.
2008         (complex_reciprocal): Eliminate now unused variables a, re, im.
2009         Cleanup the mpfr abuse.  Use mpfr_clears() in preference to
2010         multiple mpfr_clear().
2011         (complex_pow): Fix comment whitespace.  Use mpfr_clears() in
2012         preference to multiple mpfr_clear().
2013         * simplify.c (gfc_simplify_and): Remove blank line.
2014         (gfc_simplify_atan2): Move error checking earlier to eliminate
2015         a now unnecessay gfc_free_expr().
2016         (gfc_simplify_bessel_j0): Remove unnecessary gfc_set_model_kind().
2017         (gfc_simplify_bessel_j1): Ditto.
2018         (gfc_simplify_bessel_jn): Ditto.
2019         (gfc_simplify_bessel_y0): Ditto.
2020         (gfc_simplify_bessel_y1): Ditto.
2021         (gfc_simplify_bessel_yn): Ditto. 
2022         (only_convert_cmplx_boz): Eliminate unnecessary duplicate code, and
2023         combine nested if statement rational expressions.
2024         (gfc_simplify_cos): Use mpfr_clears() in preference to multiple
2025         mpfr_clear().
2026         (gfc_simplify_exp): Ditto.
2027         (gfc_simplify_fraction): Move gfc_set_model_kind() to after the
2028         special case of 0.  Use mpfr_clears() in preference to multiple
2029         mpfr_clear().
2030         (gfc_simplify_gamma): Eliminate unnecessary gfc_set_model_kind().
2031         (gfc_simplify_lgamma): Ditto.
2032         (gfc_simplify_log10): Ditto.
2033         (gfc_simplify_log): Move gfc_set_model_kind () inside switch
2034         statement. Use mpfr_clears() in preference to multiple mpfr_clear().
2035         (gfc_simplify_mod):  Eliminate now unused variables quot, iquot,
2036         and term.  Simplify the mpfr magic.
2037         (gfc_simplify_modulo): Ditto.
2038         (gfc_simplify_nearest): Eliminate unnecessary gfc_set_model_kind().
2039         (gfc_simplify_scale): Use mpfr_clears() in preference to multiple
2040         mpfr_clear().
2041         (gfc_simplify_sin): Ditto
2042         (gfc_simplify_sqrt): Ditto
2043         (gfc_simplify_set_exponent):  Move gfc_set_model_kind() to after the
2044         special case of 0.  Use mpfr_clears() in preference to multiple
2045         mpfr_clear().
2046
2047 2008-05-29  Daniel Franke  <franke.daniel@gmail.com>
2048
2049         PR target/36348
2050         * Make-lang.in (F95_OBJS): Added dependency on FORTRAN_TARGET_OBJS.
2051
2052 2008-05-29  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2053
2054         * scanner.c (load_line): Add first_char argument. Don't call ungetc.
2055         (gfc_read_orig_filename): Adjust call to load_line. Don't call
2056         ungetc.
2057         (load_file): Adjust call to load_line.
2058
2059 2008-05-28  Janus Weil  <janus@gcc.gnu.org>
2060
2061         PR fortran/36325
2062         PR fortran/35830
2063         * interface.c (gfc_procedure_use): Enable argument checking for
2064         external procedures with explicit interface.
2065         * symbol.c (check_conflict): Fix conflict checking for externals.
2066         (copy_formal_args): Fix handling of arrays.
2067         * resolve.c (resolve_specific_f0, resolve_specific_s0): Fix handling
2068         of intrinsics.
2069         * parse.c (parse_interface): Non-abstract INTERFACE statement implies
2070         EXTERNAL attribute.
2071
2072 2008-05-28  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2073
2074         PR fortran/36319
2075         * intrinsic.c (gfc_convert_chartype): Don't mark conversion
2076         function as pure.
2077         * trans-array.c (gfc_trans_array_ctor_element): Divide element
2078         size by the size of one character to obtain length.
2079         * iresolve.c (gfc_resolve_cshift): Call the _char4 variant when
2080         appropriate.
2081         (gfc_resolve_eoshift): Likewise.
2082         * trans-intrinsic.c (gfc_conv_intrinsic_ctime): Minor beautification.
2083         (gfc_conv_intrinsic_fdate): Minor beautification.
2084         (gfc_conv_intrinsic_ttynam): Minor beautification.
2085         (gfc_conv_intrinsic_minmax_char): Allow all character kinds.
2086         (size_of_string_in_bytes): New function.
2087         (gfc_conv_intrinsic_size): Call size_of_string_in_bytes for
2088         character expressions.
2089         (gfc_conv_intrinsic_sizeof): Likewise.
2090         (gfc_conv_intrinsic_array_transfer): Likewise.
2091         (gfc_conv_intrinsic_trim): Allow all character kinds. Minor
2092         beautification.
2093         (gfc_conv_intrinsic_repeat): Fix comment typo.
2094         * simplify.c (gfc_convert_char_constant): Take care of conversion
2095         of array constructors.
2096
2097 2008-05-27  Tobias Burnus  <burnus@net-b.de>
2098
2099         PR fortran/36316
2100         * trans-array.c (gfc_set_loop_bounds_from_array_spec):
2101         Add missing fold_convert.
2102
2103 2008-05-26  Daniel Franke  <franke.daniel@gmail.com>
2104
2105         * fortran/cpp.c (cpp_define_builtins): Remove usage of TARGET_* macros,
2106         added FIXME instead.
2107
2108 2008-05-26  Daniel Franke  <franke.daniel@gmail.com>
2109
2110         PR fortran/18428
2111         * lang.opt (A, C, CC, D, E, H, P, U, cpp, d, fworking-directory,
2112         imultilib, iprefix, iquote, isysroot, isystem, nocpp, nostdinc,
2113         o, undef, v): New options.
2114         * options.c (gfc_init_options): Also initialize preprocessor
2115         options.
2116         (gfc_post_options): Also handle post-initialization of preprocessor
2117         options.
2118         (gfc_handle_option): Check if option is a preprocessor option.
2119         If yes, let gfc_cpp_handle_option() handle the option.
2120         * lang-specs.h: Reorganized to handle new options.
2121         * scanner.c (gfc_new_file): Read temporary file instead of
2122         input source if preprocessing is enabled.
2123         * f95-lang.c (gfc_init): Initialize preprocessor.
2124         (gfc_finish): Clean up preprocessor.
2125         * cpp.c: New.
2126         * cpp.h: New.
2127         * Make-lang.in: Added new objects and dependencies.
2128         * gfortran.texi: Updated section "Preprocessing and
2129         conditional compilation".
2130         * invoke.texi: Added new section "Preprocessing Options",
2131         listed and documented the preprocessing options handled
2132         by gfortran.
2133
2134 2008-05-25  Tobias Burnus  <burnus@net-b.de>
2135
2136         PR fortran/32600
2137         * trans-expr.c (gfc_conv_function_call): Remove library
2138         call for c_f_pointer with scalar Fortran pointers and for
2139         c_f_procpointer.
2140
2141 2008-05-21  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2142
2143         PR fortran/36257
2144         * iresolve.c (check_charlen_present): Don't force the rank to 1.
2145
2146 2008-05-19  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2147
2148         PR fortran/36265
2149         * trans-expr.c (gfc_conv_string_tmp): Pick the correct type for
2150         the temporary variable.
2151
2152 2008-05-19  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2153
2154         * simplify.c (gfc_simplify_dble, gfc_simplify_real): Initialize
2155         result variable to avoid warnings.
2156
2157 2008-05-18  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2158
2159         * intrinsic.c (char_conversions, ncharconv): New static variables.
2160         (find_char_conv): New function.
2161         (add_functions): Add simplification functions for ADJUSTL and
2162         ADJUSTR. Don't check the kind of their argument. Add checking for
2163         LGE, LLE, LGT and LLT.
2164         (add_subroutines): Fix argument type for SLEEP. Fix argument name
2165         for SYSTEM.
2166         (add_char_conversions): New function.
2167         (gfc_intrinsic_init_1): Call add_char_conversions.
2168         (gfc_intrinsic_done_1): Free char_conversions.
2169         (check_arglist): Use kind == 0 as a signal that we don't want
2170         the kind value to be checked.
2171         (do_simplify): Also simplify character functions.
2172         (gfc_convert_chartype): New function
2173         * trans-array.c (gfc_trans_array_ctor_element): Don't force the
2174         use of default character type.
2175         (gfc_trans_array_constructor_value): Likewise.
2176         (get_array_ctor_var_strlen): Use integer kind to build an integer
2177         instead of a character kind!
2178         (gfc_build_constant_array_constructor): Don't force the use of
2179         default character type.
2180         (gfc_conv_loop_setup): Likewise.
2181         * trans-expr.c (gfc_conv_string_tmp): Don't force the use of
2182         default character type. Allocate enough memory for wide strings.
2183         (gfc_conv_concat_op): Make sure operand kind are the same.
2184         (string_to_single_character): Remove gfc_ prefix. Reindent.
2185         Don't force the use of default character type.
2186         (gfc_conv_scalar_char_value): Likewise.
2187         (gfc_build_compare_string): Call string_to_single_character.
2188         (fill_with_spaces): New function
2189         (gfc_trans_string_copy): Add kind arguments. Use them to deal
2190         with wide character kinds.
2191         (gfc_conv_statement_function): Whitespace fix. Call
2192         gfc_trans_string_copy with new kind arguments.
2193         (gfc_conv_substring_expr): Call gfc_build_wide_string_const
2194         instead of using gfc_widechar_to_char.
2195         (gfc_conv_string_parameter): Don't force the use of default
2196         character type.
2197         (gfc_trans_scalar_assign): Pass kind args to gfc_trans_string_copy.
2198         * intrinsic.h (gfc_check_lge_lgt_lle_llt, gfc_convert_char_constant,
2199         gfc_resolve_adjustl, gfc_resolve_adjustr): New prototypes.
2200         * decl.c (gfc_set_constant_character_len): Don't assert the
2201         existence of a single character kind.
2202         * trans-array.h (gfc_trans_string_copy): New prototype.
2203         * gfortran.h (gfc_check_character_range, gfc_convert_chartype):
2204         New prototypes.
2205         * error.c (print_wide_char_into_buffer): New function lifting
2206         code from gfc_print_wide_char. Fix order to output '\x??' instead
2207         of 'x\??'.
2208         (gfc_print_wide_char): Call print_wide_char_into_buffer.
2209         (show_locus): Call print_wide_char_into_buffer with buffer local
2210         to this function.
2211         * trans-const.c (gfc_build_wide_string_const): New function.
2212         (gfc_conv_string_init): Deal with wide characters strings
2213         constructors.
2214         (gfc_conv_constant_to_tree): Call gfc_build_wide_string_const.
2215         * trans-stmt.c (gfc_trans_label_assign): Likewise.
2216         (gfc_trans_character_select): Deal with wide strings.
2217         * expr.c (gfc_check_assign): Allow conversion between character
2218         kinds on assignment.
2219         * trans-const.h (gfc_build_wide_string_const): New prototype.
2220         * trans-types.c (gfc_get_character_type_len_for_eltype,
2221         gfc_get_character_type_len): Create too variants of the old
2222         gfc_get_character_type_len, one getting kind argument and the
2223         other one directly taking a type tree.
2224         * trans.h (gfor_fndecl_select_string_char4,
2225         gfor_fndecl_convert_char1_to_char4,
2226         gfor_fndecl_convert_char4_to_char1): New prototypes.
2227         * trans-types.h (gfc_get_character_type_len_for_eltype): New
2228         prototype.
2229         * resolve.c (resolve_operator): Exit early when kind mismatches
2230         are detected, because that makes us issue an error message later.
2231         (validate_case_label_expr): Fix wording of error message.
2232         * iresolve.c (gfc_resolve_adjustl, gfc_resolve_adjustr): New
2233         functions.
2234         (gfc_resolve_pack): Call _char4 variants of library function
2235         when dealing with wide characters.
2236         (gfc_resolve_reshape): Likewise.
2237         (gfc_resolve_spread): Likewise.
2238         (gfc_resolve_transpose): Likewise.
2239         (gfc_resolve_unpack): Likewise.
2240         * target-memory.c (size_character): Take character kind bit size
2241         correctly into account (not that it changes anything for now, but
2242         it's more generic).
2243         (gfc_encode_character): Added gfc_ prefix. Encoding each
2244         character of a string by calling native_encode_expr for the
2245         corresponding unsigned integer.
2246         (gfc_target_encode_expr): Add gfc_ prefix to encode_character.
2247         * trans-decl.c (gfc_build_intrinsic_function_decls): Build
2248         gfor_fndecl_select_string_char4, gfor_fndecl_convert_char1_to_char4
2249         and gfor_fndecl_convert_char4_to_char1.
2250         * target-memory.h (gfc_encode_character): New prototype.
2251         * arith.c (gfc_check_character_range): New function.
2252         (eval_intrinsic): Allow non-default character kinds.
2253         * check.c (gfc_check_access_func): Only allow default
2254         character kind arguments.
2255         (gfc_check_chdir): Likewise.
2256         (gfc_check_chdir_sub): Likewise.
2257         (gfc_check_chmod): Likewise.
2258         (gfc_check_chmod_sub): Likewise.
2259         (gfc_check_lge_lgt_lle_llt): New function.
2260         (gfc_check_link): Likewise.
2261         (gfc_check_link_sub): Likewise.
2262         (gfc_check_symlnk): Likewise.
2263         (gfc_check_symlnk_sub): Likewise.
2264         (gfc_check_rename): Likewise.
2265         (gfc_check_rename_sub): Likewise.
2266         (gfc_check_fgetputc_sub): Likewise.
2267         (gfc_check_fgetput_sub): Likewise.
2268         (gfc_check_stat): Likewise.
2269         (gfc_check_stat_sub): Likewise.
2270         (gfc_check_date_and_time): Likewise.
2271         (gfc_check_ctime_sub): Likewise.
2272         (gfc_check_fdate_sub): Likewise.
2273         (gfc_check_gerror): Likewise.
2274         (gfc_check_getcwd_sub): Likewise.
2275         (gfc_check_getarg): Likewise.
2276         (gfc_check_getlog): Likewise.
2277         (gfc_check_hostnm): Likewise.
2278         (gfc_check_hostnm_sub): Likewise.
2279         (gfc_check_ttynam_sub): Likewise.
2280         (gfc_check_perror): Likewise.
2281         (gfc_check_unlink): Likewise.
2282         (gfc_check_unlink_sub): Likewise.
2283         (gfc_check_system_sub): Likewise.
2284         * primary.c (got_delim): Perform correct character range checking
2285         for all kinds.
2286         * trans-intrinsic.c (gfc_conv_intrinsic_conversion): Generate
2287         calls to library functions convert_char4_to_char1 and
2288         convert_char1_to_char4 for character conversions.
2289         (gfc_conv_intrinsic_char): Allow all character kings.
2290         (gfc_conv_intrinsic_strcmp): Fix whitespace.
2291         (gfc_conv_intrinsic_repeat): Take care of all character kinds.
2292         * intrinsic.texi: For all GNU intrinsics accepting character
2293         arguments, mention that they're restricted to the default kind.
2294         * simplify.c (simplify_achar_char): New function.
2295         (gfc_simplify_achar, gfc_simplify_char): Call simplify_achar_char.
2296         gfc_simplify_ichar): Don't error out for wide characters.
2297         (gfc_convert_char_constant): New function.
2298
2299 2008-05-18  Steven G. Kargl  <kargls@comcast.net>
2300
2301         PR fortran/36251
2302         * symbol.c (check_conflict): Issue errors for abuse of PUBLIC, PRIVATE,
2303         and BIND(C).
2304         * resolve.c (gfc_verify_binding_labels): Fix NULL pointer dereference.
2305
2306 2008-05-17  Tobias Burnus  <burnus@net-b.de>
2307
2308         * intrinsic.texi: Correct description of GET_COMMAND_ARGUMENT
2309         and GET_ENVIRONMENT_VARIABLE; fix keyword= name for GETENV,
2310         GETLOG, GMTIME, HOSTNM, IRAND, ITIME, KILL.
2311         Move LOG_GAMMA after LOG10.
2312
2313 2008-05-17  Tobias Burnus  <burnus@net-b.de>
2314
2315         * intrinsic.c (add_functions): Change FLUSH(C) to FLUSH(UNIT).
2316         * intrinsic.texi: Change INTEGER(*) to INTEGER; fix keyword= name for
2317         ABS, ADJUSTL, AINT, ALLOCATED, ANINT, ASSOCIATED, C_ASSOCIATED,
2318         CEILING, DBLE, DFLOAT, DOT_PRODUCT, DREAL, FLOAT, FLOOR, GET_COMMAND.
2319
2320 2008-05-16  Paul Thomas  <pault@gcc.gnu.org>
2321
2322         PR fortran/35756
2323         PR fortran/35759
2324         * trans-stmt.c (gfc_trans_where): Tighten up the dependency
2325         check for calling gfc_trans_where_3.
2326
2327         PR fortran/35743
2328         * trans-stmt.c (gfc_trans_where_2): Set the mask size to zero
2329         if it is calculated to be negative.
2330
2331         PR fortran/35745
2332         * trans-stmt.c (gfc_trans_where_3, gfc_trans_where_assign): Set
2333         ss->where for scalar right hand sides.
2334         * trans-array.c (gfc_add_loop_ss_code): If ss->where is set do
2335         not evaluate scalars outside the loop.  Clean up whitespace.
2336         * trans.h : Add a bitfield 'where' to gfc_ss.
2337
2338 2008-05-16  Tobias Burnus  <burnus@net-b.de>
2339
2340         * libgfortran.h: Increase GFC_MAX_DIMENSIONS to 15.
2341         * array.c (gfc_match_array_spec): Error with -std=f2003 if rank > 7.
2342
2343 2008-04-16  Daniel Kraft  <d@domob.eu>
2344
2345         PR fortran/27997
2346         * gfortran.h:  Added field "length_from_typespec" to gfc_charlength.
2347         * aray.c (gfc_match_array_constructor):  Added code to parse typespec.
2348         (check_element_type, check_constructor_type, gfc_check_constructor_type):
2349         Extended to support explicit typespec on constructor.
2350         (gfc_resolve_character_array_constructor):  Pad strings correctly for
2351         explicit, constant character length.
2352         * trans-array.c:  New static global variable "typespec_chararray_ctor"
2353         (gfc_trans_array_constructor):  New code to support explicit but dynamic
2354         character lengths.
2355
2356 2008-05-16  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2357
2358         PR fortran/34325
2359         * decl.c (match_attr_spec): Check for matching pairs of parenthesis.
2360         * expr.c (gfc_specification_expr): Supplement the error message with the
2361         type that was found.
2362         * resolve.c (gfc_resolve_index): Likewise.
2363         * match.c (gfc_match_parens): Clarify error message with "at or before".
2364         (gfc_match_do): Check for matching pairs of parenthesis.
2365
2366 2008-05-16  Tobias Burnus  <burnus@net-b.de
2367
2368         * intrinsic.texi: Write Fortran 77/90/95 instead of F77/90/95;
2369         add missing KIND argument to ACHAR and NINT; and state that
2370         the KIND argument is a F2003 extension for ACHAR, COUNT, IACHAR,
2371         ICHAR, INDEX, LBOUND, LEN, LEN_TRIM, SCAN, SIZE, UBOUND, VERIFY.
2372
2373 2008-05-16  Daniel Kraft  <d@domob.eu>
2374
2375         * primary.c:  New private structure "gfc_structure_ctor_component".
2376         (gfc_free_structure_ctor_component):  New helper function.
2377         (gfc_match_structure_constructor):  Extended largely to support named
2378         arguments and default initialization for structure constructors.
2379
2380 2008-05-15  Steven G. Kargl  <kargls@comcast.net>
2381
2382         * simplify.c (gfc_simplify_dble, gfc_simplify_float,
2383         simplify_bound, gfc_simplify_nearest, gfc_simplify_real): Plug
2384         possible memory leaks.
2385         (gfc_simplify_reshape): Plug possible memory leaks and dereferencing
2386         of NULL pointers.
2387
2388 2008-05-15  Steven G. Kargl  <kargls@comcast.net>
2389
2390         PR fortran/36239
2391         * simplify.c (gfc_simplify_int, gfc_simplify_intconv): Replaced hand
2392         rolled integer conversion with gfc_int2int, gfc_real2int, and
2393         gfc_complex2int.
2394         (gfc_simplify_intconv): Renamed to simplify_intconv.
2395         
2396 2008-05-15  Steven G. Kargl,   <kargl@comcast.net>
2397         * gfortran.dg/and_or_xor.f90: New test
2398
2399         * fortran/simplify.c (gfc_simplify_and, gfc_simplify_or,
2400         gfc_simplify_xor): Don't range check logical results.
2401
2402 2008-05-15  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2403
2404         * trans-expr.c (gfc_conv_concat_op): Take care of nondefault
2405         character kinds.
2406         (gfc_build_compare_string): Add kind argument and use it.
2407         (gfc_conv_statement_function): Fix indentation.
2408         * gfortran.h (gfc_character_info): New structure.
2409         (gfc_character_kinds): New array.
2410         * trans-types.c (gfc_character_kinds, gfc_character_types,
2411         gfc_pcharacter_types): New array.
2412         (gfc_init_kinds): Fill character kinds array.
2413         (validate_character): Take care of nondefault character kinds.
2414         (gfc_build_uint_type): New function.
2415         (gfc_init_types): Take care of nondefault character kinds.
2416         (gfc_get_char_type, gfc_get_pchar_type): New functions.
2417         (gfc_get_character_type_len): Use gfc_get_char_type.
2418         * trans.h (gfc_build_compare_string): Adjust prototype.
2419         (gfor_fndecl_compare_string_char4, gfor_fndecl_concat_string_char4,
2420         gfor_fndecl_string_len_trim_char4, gfor_fndecl_string_index_char4,
2421         gfor_fndecl_string_scan_char4, gfor_fndecl_string_verify_char4,
2422         gfor_fndecl_string_trim_char4, gfor_fndecl_string_minmax_char4,
2423         gfor_fndecl_adjustl_char4, gfor_fndecl_adjustr_char4): New
2424         prototypes.
2425         * trans-types.h (gfc_get_char_type, gfc_get_pchar_type): New
2426         prototypes.
2427         * trans-decl.c (gfor_fndecl_compare_string_char4,
2428         gfor_fndecl_string_len_trim_char4, gfor_fndecl_string_index_char4,
2429         gfor_fndecl_string_scan_char4, gfor_fndecl_string_verify_char4,
2430         gfor_fndecl_string_trim_char4, gfor_fndecl_string_minmax_char4,
2431         gfor_fndecl_adjustl_char4, gfor_fndecl_adjustr_char4,
2432         gfor_fndecl_concat_string_char4): New function decls.
2433         (gfc_build_intrinsic_function_decls): Define new *_char4 function
2434         decls.
2435         * trans-intrinsic.c (gfc_conv_intrinsic_minmax_char,
2436         gfc_conv_intrinsic_len_trim, gfc_conv_intrinsic_ichar,
2437         gfc_conv_intrinsic_strcmp, gfc_conv_intrinsic_trim,
2438         gfc_conv_intrinsic_function): Deal with nondefault character kinds.
2439
2440 2008-05-15  Sa Liu  <saliu@de.ibm.com>
2441
2442         * iso-c-binding.def: Add standard parameter to macro NAMED_INTCST.
2443         All existing NAMED_INTCST definitions has standard GFC_STD_F2003,
2444         c_int128_t, c_int_least128_t and c_int_fast128_t are added as
2445         GNU extensions.
2446         * iso-fortran-evn.def: Add standard parameter GFC_STD_F2003
2447         to macro NAMED_INTCST.
2448         * symbol.c (std_for_isocbinding_symbol): New helper function to 
2449         return the standard that supports this isocbinding symbol.
2450         (generate_isocbinding_symbol): Do not generate GNU extension symbols
2451         if std=f2003. Add new parameter to NAMED_INTCST.
2452         * module.c (use_iso_fortran_env_module): Add new parameter to
2453         NAMED_INTCST and new field standard to struct intmod_sym.
2454         * gfortran.h: Add new parameter to NAMED_INTCST.
2455         * trans-types.c (init_c_interop_kinds): Add new parameter to 
2456         NAMED_INTCST.
2457         * intrinsic.texi: Documented new types C_INT128_T, C_INT_LEASE128_T
2458         and C_INT_FAST128_T.
2459
2460 2008-05-14  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2461
2462         PR fortran/36059
2463         * trans-decl.c (gfc_build_dummy_array_decl): Don't repack
2464         arrays that have the TARGET attribute.
2465
2466 2008-05-14  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2467
2468         PR fortran/36186
2469         * simplify.c (only_convert_cmplx_boz): New function.
2470         (gfc_simplify_cmplx, gfc_simplify_complex, gfc_simplify_dcmplx):
2471         Call only_convert_cmplx_boz.
2472
2473 2008-05-14  Paul Thomas  <pault@gcc.gnu.org>
2474
2475         PR fortran/36233
2476         * interface.c (compare_actual_formal): Do not check sizes if the
2477         actual is BT_PROCEDURE.
2478
2479 2008-05-14  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2480
2481         PR fortran/35682
2482         * trans-array.c (gfc_conv_ss_startstride): Any negative size is
2483         the same as zero size.
2484         (gfc_conv_loop_setup): Fix size calculation.
2485
2486 2008-05-14  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2487
2488         PR fortran/35685
2489         * trans-intrinsic.c (gfc_conv_intrinsic_bound): Correctly
2490         handle zero-size sections.
2491
2492 2008-05-14  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2493
2494         PR fortran/36215
2495         * scanner.c (preprocessor_line): Allocate enough memory for a
2496         wide string.
2497
2498 2008-05-12  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2499
2500         PR fortran/36176
2501         * target-memory.c (gfc_target_expr_size): Correctly treat
2502         substrings.
2503         (gfc_target_encode_expr): Likewise.
2504         (gfc_interpret_complex): Whitespace change.
2505
2506 2008-05-11  Thomas Koenig  <tkoenig@gcc.gnu.org>
2507
2508         PR fortran/35719
2509         * trans.c (gfc_call_malloc): If size equals zero, allocate one
2510         byte; don't return a null pointer.
2511
2512 2008-05-10  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2513
2514         PR fortran/36197
2515         * module.c (quote_string): Fix sprintf format.
2516
2517 2008-05-09  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2518
2519         PR fortran/36162
2520         * module.c (quote_string, unquote_string,
2521         mio_allocated_wide_string): New functions.
2522         (mio_expr): Call mio_allocated_wide_string where needed.
2523
2524 2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>
2525
2526          * trans-decl.c (gfc_get_extern_function_decl, build_function_decl):
2527          Rename DECL_IS_PURE to DECL_PURE_P.
2528
2529 2008-05-06  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2530
2531         * arith.c: (gfc_arith_concat, gfc_compare_string,
2532         gfc_compare_with_Cstring, hollerith2representation,
2533         gfc_hollerith2int, gfc_hollerith2real, gfc_hollerith2complex,
2534         gfc_hollerith2character, gfc_hollerith2logical): Use wide
2535         characters for character constants.
2536         * data.c (create_character_intializer): Likewise.
2537         * decl.c (gfc_set_constant_character_len): Likewise.
2538         * dump-parse-tree.c (show_char_const): Correctly dump wide
2539         character strings.
2540         error.c (print_wide_char): Rename into gfc_print_wide_char.
2541         (show_locus): Adapt to new prototype of gfc_print_wide_char.
2542         expr.c (free_expr0): Representation is now disjunct from
2543         character string value, so we always free it.
2544         (gfc_copy_expr, find_substring_ref, gfc_simplify_expr): Adapt
2545         to wide character strings.
2546         * gfortran.h (gfc_expr): Make value.character.string a wide string.
2547         (gfc_wide_toupper, gfc_wide_strncasecmp, gfc_wide_memset,
2548         gfc_widechar_to_char, gfc_char_to_widechar): New prototypes.
2549         (gfc_get_wide_string): New macro.
2550         (gfc_print_wide_char): New prototype.
2551         * io.c (format_string): Make a wide string.
2552         (next_char, gfc_match_format, compare_to_allowed_values, 
2553         gfc_match_open): Deal with wide strings.
2554         * module.c (mio_expr): Convert between wide strings and ASCII ones.
2555         * primary.c (match_hollerith_constant, match_charkind_name): 
2556         Handle wide strings.
2557         * resolve.c (build_default_init_expr): Likewise.
2558         * scanner.c (gfc_wide_toupper, gfc_wide_memset,
2559         gfc_char_to_widechar): New functions.
2560         (wide_strchr, gfc_widechar_to_char, gfc_wide_strncasecmp):
2561         Changes in prototypes.
2562         (gfc_define_undef_line, load_line, preprocessor_line,
2563         include_line, load_file, gfc_read_orig_filename): Handle wide
2564         strings.
2565         * simplify.c (gfc_simplify_achar, gfc_simplify_adjustl,
2566         gfc_simplify_adjustr, gfc_simplify_char, gfc_simplify_iachar,
2567         gfc_simplify_ichar, simplify_min_max, gfc_simplify_new_line,
2568         gfc_simplify_repeat): Handle wide strings.
2569         (wide_strspn, wide_strcspn): New helper functions.
2570         (gfc_simplify_scan, gfc_simplify_trim, gfc_simplify_verify):
2571         Handle wide strings.
2572         * symbol.c (generate_isocbinding_symbol): Likewise.
2573         * target-memory.c (size_character, gfc_target_expr_size,
2574         encode_character, gfc_target_encode_expr, gfc_interpret_character,
2575         gfc_target_interpret_expr): Handle wide strings.
2576         * trans-const.c (gfc_conv_string_init): Lower wide strings to
2577         narrow ones.
2578         (gfc_conv_constant_to_tree): Likewise.
2579         * trans-expr.c (gfc_conv_substring_expr): Handle wide strings.
2580         * trans-io.c (gfc_new_nml_name_expr): Likewise.
2581         * trans-stmt.c (gfc_trans_label_assign): Likewise.
2582
2583 2008-05-06  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2584
2585         * simplify.c (gfc_simplify_bessel_j0,gfc_simplify_bessel_j1,
2586         gfc_simplify_bessel_jn,gfc_simplify_bessel_y0,
2587         gfc_simplify_bessel_y1,gfc_simplify_bessel_yn): Mark arguments
2588         with ATTRIBUTE_UNUSED.
2589
2590 2008-05-06  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2591
2592         * check.c (gfc_check_sizeof): Switch to ATTRIBUTE_UNUSED.
2593         * simplify.c (gfc_simplify_lgamma): Likewise.
2594
2595 2008-05-06  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2596
2597         * openmp.c (gfc_match_omp_eos): Use gfc_next_ascii_char and
2598         gfc_peek_ascii_char.
2599         * decl.c (gfc_match_kind_spec, gfc_match_type_spec,
2600         gfc_match_implicit_none, match_implicit_range, gfc_match_implicit,
2601         match_string_p, match_attr_spec, gfc_match_suffix,
2602         match_procedure_decl, gfc_match_entry, gfc_match_subroutine):
2603         Likewise.
2604         * gfortran.h (gfc_char_t): New type.
2605         (gfc_linebuf): Make line member a gfc_char_t.
2606         (locus): Make nextc member a gfc_char_t.
2607         (gfc_wide_is_printable, gfc_wide_is_digit, gfc_wide_fits_in_byte,
2608         gfc_wide_tolower, gfc_wide_strlen, gfc_next_ascii_char,
2609         gfc_peek_ascii_char, gfc_check_digit): New prototypes.
2610         * error.c (print_wide_char): New function.
2611         (show_locus): Use print_wide_char and gfc_wide_strlen.
2612         * io.c (next_char): Use gfc_char_t type.
2613         (match_io): Use gfc_peek_ascii_char and gfc_next_ascii_char.
2614         * match.c (gfc_match_parens, gfc_match_eos,
2615         gfc_match_small_literal_int, gfc_match_name, gfc_match_name_C,
2616         gfc_match_intrinsic_op, gfc_match_char,  gfc_match_return,
2617         gfc_match_common): Likewise.
2618         * match.h (gfc_match_special_char): Change prototype.
2619         * parse.c (decode_specification_statement, decode_statement,
2620         decode_omp_directive, next_free, next_fixed): Use
2621         gfc_peek_ascii_char and gfc_next_ascii_char.
2622         * primary.c (gfc_check_digit): Change name.
2623         (match_digits, match_hollerith_constant, match_boz_constant,
2624         match_real_constant, next_string_char, match_charkind_name,
2625         match_string_constant, match_logical_constant_string,
2626         match_complex_constant, match_actual_arg, match_varspec,
2627         gfc_match_rvalue, match_variable): Use gfc_peek_ascii_char and
2628         gfc_next_ascii_char.
2629         * scanner.c (gfc_wide_fits_in_byte, wide_is_ascii,
2630         gfc_wide_is_printable, gfc_wide_tolower, gfc_wide_is_digit,
2631         gfc_wide_is_digit, wide_atoi, gfc_wide_strlen, wide_strcpy,
2632         wide_strchr, widechar_to_char, wide_strncmp, wide_strncasecmp,
2633         gfc_next_ascii_char, gfc_peek_ascii_char):
2634         New functions.
2635         (next_char, gfc_define_undef_line, skip_free_comments,
2636         gfc_next_char_literal, gfc_next_char, gfc_peek_char,
2637         gfc_error_recovery, load_line, preprocessor_line, include_line,
2638         load_file, gfc_read_orig_filename): Use gfc_char_t for source
2639         characters and the {gfc_,}wide_* functions to manipulate wide
2640         strings.
2641
2642 2008-05-06  Tobias Burnus  <burnus@net-b.de>
2643
2644         PR fortran/36117
2645         * intrinsic.c (add_functions): Call gfc_simplify_bessel_*.
2646         * intrinsic.h: Add prototypes for gfc_simplify_bessel_*.
2647         * simplify.c (gfc_simplify_bessel_j0,gfc_simplify_bessel_j1,
2648         gfc_simplify_bessel_jn,gfc_simplify_bessel_y0,
2649         gfc_simplify_bessel_y1,gfc_simplify_bessel_yn): New.
2650
2651 2008-05-03  Janus Weil  <jaydub66@gmail.com>
2652
2653         * misc.c (gfc_clear_ts): Set interface to NULL.
2654
2655 2008-05-03  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2656
2657         PR fortran/33268
2658         * gfortran.h: Add extra_comma pointer to gfc_dt structure. Add iokind to
2659         gfc_expr value union. Add io_kind enum to here from io.c.
2660         * io.c (gfc_free_dt): Free extra_comma.
2661         (gfc_resolve_dt): If an extra comma was encountered and io_unit is type
2662         BT_CHARACTER, resolve to format_expr and set default unit.  Error if
2663         io_kind is M_WRITE. (match_io):  Match the extra comma and set new
2664         pointer, extra_comma.
2665
2666 2008-05-01  Bud Davis  <bdavis9659@sbcglobal.net>
2667
2668         PR35940/Fortran
2669         * simplify.c (gfc_simplify_index): Check for direction argument 
2670         being a constant.
2671
2672 2008-05-01  Janus Weil  <jaydub66@gmail.com>
2673
2674         * gfortran.h (struct gfc_symbol): Moving "interface" member to
2675         gfc_typespec (plus fixing a small docu error).
2676         * interface.c (gfc_procedure_use): Ditto.
2677         * decl.c (match_procedure_decl): Ditto.
2678         * resolve.c (resolve_specific_f0,
2679         resolve_specific_f0, resolve_symbol): Ditto.
2680
2681 2008-04-30  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2682
2683         * intrinsic.c (add_functions): Add SELECTED_CHAR_KIND intrinsic.
2684         * intrinsic.h (gfc_check_selected_char_kind,
2685         gfc_simplify_selected_char_kind): New prototypes.
2686         * gfortran.h (gfc_isym_id): Add GFC_ISYM_SC_KIND.
2687         * trans.h (gfor_fndecl_sc_kind): New function decl.
2688         * trans-decl.c (gfor_fndecl_sc_kind): Build new decl.
2689         * arith.c (gfc_compare_with_Cstring): New function.
2690         * arith.h (gfc_compare_with_Cstring): New prototype.
2691         * check.c (gfc_check_selected_char_kind): New function.
2692         * primary.c (match_string_constant, match_kind_param): Mark
2693         symbols used as literal constant kind param as referenced.
2694         * trans-intrinsic.c (gfc_conv_intrinsic_sc_kind): New function.
2695         (gfc_conv_intrinsic_function): Call gfc_conv_intrinsic_sc_kind.
2696         * intrinsic.texi (SELECTED_CHAR_KIND): Document new intrinsic.
2697         * simplify.c (gfc_simplify_selected_char_kind): New function.
2698
2699 2008-04-28  Paul Thomas  <pault@gcc.gnu.org>
2700
2701         PR fortran/35997
2702         * module.c (find_symbol): Do not return a result for a symbol
2703         that has been renamed in another module.
2704
2705 2008-04-26  George Helffrich <george@gcc.gnu.org>
2706
2707         PR fortran/35892
2708         PR fortran/35154
2709         * trans-common.c (create_common):  Add decl to function
2710         chain (if inside one) to preserve identifier scope in debug output.
2711
2712 2008-04-25  Jan Hubicka  <jh@suse.cz>
2713
2714         * trans-decl.c (trans_function_start): Update.
2715
2716 2008-04-25  Tobias Burnus  <burnus@net-b.de>
2717             Daniel Franke <franke.daniel@gmail.com>
2718
2719         PR fortran/35156
2720         * gfortranspec.c (lang_specific_driver): Deprecate
2721         -M option; fix ICE when "-M" is last argument and
2722         make "-M<dir>" work.
2723         * options.c (gfc_handle_module_path_options): 
2724         Use -J instead of -M in error messages.
2725         * invoke.texi: Mark -M as depecated.
2726
2727 2008-04-23  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2728             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2729
2730         PR fortran/35994
2731         * trans-instrinsic.c (gfc_conv_intrinsic_minmaxloc): Correctly adjust
2732         loop counter offset.
2733
2734 2008-04-23  Paolo Bonzini  <bonzini@gnu.org>
2735
2736         * trans-expr.c (gfc_conv_structure): Don't set TREE_INVARIANT.
2737         * trans-array.c (gfc_build_null_descriptor): Don't set TREE_INVARIANT.
2738         (gfc_trans_array_constructor_value): Don't set TREE_INVARIANT.
2739         (gfc_build_constant_array_constructor): Don't set TREE_INVARIANT.
2740         (gfc_conv_array_initializer): Don't set TREE_INVARIANT.
2741         * trans-common.c (get_init_field): Don't set TREE_INVARIANT.
2742         (create_common): Don't set TREE_INVARIANT.
2743         * trans-stmt.c (gfc_trans_character_select): Don't set TREE_INVARIANT.
2744         * trans-decl.c (gfc_generate_function_code): Don't set TREE_INVARIANT.
2745
2746 2008-04-21  Steve Ellcey  <sje@cup.hp.com>
2747
2748         * f95-lang.c (gfc_init_decl_processing): use ptr_mode instead of Pmode.
2749
2750 2008-04-21  Daniel Franke  <franke.daniel@gmail.com>
2751
2752         PR fortran/35019
2753         * gfortranspec.c (lookup_option): Properly handle separated arguments
2754         in -J option, print missing argument message when necessary.
2755
2756 2008-04-20  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2757
2758         PR fortran/35882
2759         * scanner.c (skip_fixed_comments): Update continue_line when comment is
2760         detected. (gfc_next_char_literal): Likewise.
2761
2762 2008-04-19  Paul Thomas  <pault@gcc.gnu.org>
2763
2764         PR fortran/35944
2765         PR fortran/35946
2766         PR fortran/35947
2767         * trans_array.c (gfc_trans_array_constructor): Temporarily
2768         realign loop, if loop->from is not zero, before creating
2769         the temporary array and provide an offset.
2770
2771         PR fortran/35959
2772         * trans-decl.c (gfc_init_default_dt): Add gfc_ prefix to name
2773         and allow for NULL body.  Change all references from
2774         init_default_dt to gfc_init_default_dt.
2775         * trans.h : Add prototype for gfc_init_default_dt.
2776         * trans-array.c (gfc_trans_deferred_vars): After nullification
2777         call gfc_init_default_dt for derived types with allocatable
2778         components.
2779
2780 2008-04-18  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2781
2782         PR fortran/35892
2783         * trans-common.c (create_common): Revert patch causing regression.
2784
2785 2008-04-16  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2786
2787         PR fortran/35724
2788         * iresolve.c (gfc_resolve_eoshift): Check for NULL symtree in test for
2789         optional argument attribute.
2790         
2791 2008-04-16  Paul Thomas  <pault@gcc.gnu.org>
2792
2793         PR fortran/35932
2794         * trans-intrinsic.c (gfc_conv_intrinsic_char): Even though KIND
2795         is not used, the argument must be converted.
2796
2797 2008-04-16  Jakub Jelinek  <jakub@redhat.com>
2798
2799         PR target/35662
2800         * f95-lang.c (gfc_init_builtin_functions): Make sure
2801         BUILT_IN_SINCOS{,F,L} types aren't varargs.
2802
2803 2008-04-15  Paul Thomas  <pault@gcc.gnu.org>
2804
2805         PR fortran/35864
2806         * expr.c (scalarize_intrinsic_call): Reorder identification of
2807         array argument so that if one is not found a segfault does not
2808         occur.  Return FAILURE if all scalar arguments.
2809
2810 2008-04-13  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2811             Tobias Burnus  <burnus@net-b.de>
2812
2813         PR fortran/35882
2814         * options.c (gfc_init_options): Set the default maximum continuation
2815         lines to 255 for both free and fixed form source for warnings.
2816         (gfc_handle_option): Set -std=f95 fixed form max continuations to 19 and
2817         the -std=f95 free form max continuations to 39 for warnings.
2818         * scanner.c (gfc_next_char_literal): Adjust the current_line number only
2819         if it is less than the current locus.
2820
2821 2008-04-07  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2822
2823         PR fortran/25829 28655
2824         * io.c (io_tag): Add new tags for decimal, encoding, asynchronous,
2825         round, sign, and id. (match_open_element): Match new tags.
2826         (gfc_resolve_open): Resolve new tags. (gfc_match_open): Enable encoding
2827         for DEFAULT only. Update error messages. (match_dt_element): Fix match
2828         tag for asynchronous. Update error messages. (gfc_free_inquire): Free
2829         new expressions. (match_inquire_element): Match new tags.
2830         (gfc_match_inquire): Add constraint for ID and PENDING.
2831         (gfc_resolve_inquire): Resolve new tags.
2832         * trans-io.c (gfc_trans_inquire): Clean up whitespace and fix setting of
2833         mask for ID parameter.
2834         * ioparm.def: Fix order of parameters for pending, round, and sign.
2835         NOTE: These must line up with the definitions in libgfortran/io/io.h. or
2836         things don't work.
2837
2838 2008-04-06  Paul Thomas  <pault@gcc.gnu.org>
2839
2840         PR fortran/35780
2841         * expr.c (scalarize_intrinsic_call): Identify which argument is
2842         an array and use that as the template.
2843         (check_init_expr): Remove tests that first argument is an array
2844         in the call to scalarize_intrinsic_call.
2845
2846 2008-04-06  Tobias Schlüter  <tobi@gcc.gnu.org>
2847
2848         PR fortran/35832
2849         * io.c (io_tag): Add field 'value'.  Split 'spec' field in
2850         existing io_tags.
2851         (match_etag, match_vtag, match_ltag): Split parsing in two steps
2852         to give better error messages.
2853
2854 2008-04-06  Tobias Burnus  <burnus@net-b.de>
2855
2856         * io.c (check_io_constraints): Add constrains. ID= requires
2857         asynchronous= and asynchronous= must be init expression.
2858
2859 2008-04-06  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2860
2861         * f95-lang.c: Set LANG_HOOKS_NAME to "GNU Fortran".
2862
2863 2008-04-06  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2864
2865         * dump-parse-tree.c: Use fprintf, fputs and fputc instead of
2866         gfc_status and gfc_status_char. Remove gfc_ prefix of the gfc_show_*
2867         functions and make them static. Add new gfc_dump_parse_tree
2868         function.
2869         * gfortran.h (gfc_option_t): Rename verbose into dump_parse_tree.
2870         (gfc_status, gfc_status_char): Delete prototypes.
2871         * error.c (gfc_status, gfc_status_char): Remove functions.
2872         * scanner.c (gfc_new_file): Use printf instead of gfc_status.
2873         * options.c (gfc_init_options): Rename verbose into dump_parse_tree.
2874         (gfc_handle_module_path_options): Use gfc_fatal_error instead of
2875         gfc_status and exit.
2876         (gfc_handle_option): Rename verbose into dump_parse_tree.
2877         * parse.c (gfc_parse_file): Use gfc_dump_parse_tree.
2878
2879 2008-04-05  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2880             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2881
2882         PR fortran/25829 28655
2883         * dump-parse-tree.c (gfc_show_code_node): Show new I/O parameters.
2884         * gfortran.h (gfc_statement): Add ST_WAIT enumerator.
2885         (gfc_open): Add pointers for decimal, encoding, round, sign,
2886         asynchronous. (gfc_inquire): Add pointers for asynchronous, decimal,
2887         encoding, pending, round, sign, size, id.
2888         (gfc_wait): New typedef struct. (gfc_dt): Add pointers for id, pos,
2889         asynchronous, blank, decimal, delim, pad, round, sign.
2890         (gfc_exec_op): Add EXEC_WAIT enumerator. (gfc_code): Add pointer for
2891         wait. (gfc_free_wait), (gfc_resolve_wait): New function prototypes.
2892         * trans-stmt.h (gfc_trans_wait): New function prototype.
2893         * trans.c (gfc_trans_code): Add case for EXEC_WAIT.
2894         * io.c (io_tag): Add new tags for DECIMAL, ENCODING, ROUND, SIGN,
2895         ASYCHRONOUS, ID. (match_open_element): Add matchers for new tags.
2896         (gfc_free_open): Free new pointers. (gfc_resolve_open): Resolve new
2897         tags. (gfc_resolve_open): Remove comment around check for allowed
2898         values and ASYNCHRONOUS, update it.  Likewise for DECIMAL, ENCODING,
2899         ROUND, and SIGN. (match_dt_element): Add matching for new tags.
2900         (gfc_free_wait): New function. (gfc_resolve_wait): New function.
2901         (match_wait_element): New function. (gfc_match_wait): New function.
2902         * resolve.c (gfc_resolve_blocks): Add case for EXEC_WAIT.
2903         (resolve_code): Add case for EXEC_WAIT. 
2904         * st.c (gfc_free_statement): Add case for EXEC_WAIT.
2905         * trans-io.c (ioparam_type): Add IOPARM_ptype_wait. (gfc_st_parameter):
2906         Add "wait" entry. (iocall): Add IOCALL_WAIT enumerator.
2907         (gfc_build_io_library_fndecls): Add function declaration for st_wait.
2908         (gfc_trans_open): Add mask bits for new I/O tags.
2909         (gfc_trans_inquire): Add mask bits for new I/O tags.
2910         (gfc_trans_wait): New translation function.
2911         (build_dt): Add mask bits for new I/O tags.
2912         * match.c (gfc_match_if) Add matcher for "wait".
2913         * match.h (gfc_match_wait): Prototype for new function.
2914         * ioparm.def: Add new I/O parameter definitions.
2915         * parse.c (decode_statement): Add match for "wait" statement.
2916         (next_statement): Add case for ST_WAIT. (gfc_ascii_statement): Same.
2917
2918 2008-04-03  Jakub Jelinek  <jakub@redhat.com>
2919
2920         PR fortran/35786
2921         * openmp.c (resolve_omp_clauses): Diagnose if a clause symbol
2922         isn't a variable.
2923
2924 2008-04-03  Tom Tromey  <tromey@redhat.com>
2925
2926         * Make-lang.in (fortran_OBJS): New variable.
2927
2928 2008-04-03  Paolo Bonzini  <bonzini@gnu.org>
2929
2930         * f95-lang.c (insert_block): Kill.
2931
2932 2008-04-01  George Helffrich <george@gcc.gnu.org>
2933
2934         PR fortran/35154, fortran/23057
2935         * trans-common.c (create_common):  Add decl to function
2936         chain to preserve identifier scope in debug output.
2937
2938 2008-04-01  Joseph Myers  <joseph@codesourcery.com>
2939
2940         * gfortran.texi: Include gpl_v3.texi instead of gpl.texi
2941         * Make-lang.in (GFORTRAN_TEXI): Include gpl_v3.texi instead of
2942         gpl.texi.
2943
2944 2008-03-30  Paul Thomas  <pault@gcc.gnu.org>
2945
2946         PR fortran/35740
2947         * resolve.c (resolve_function, resolve_call): If the procedure
2948         is elemental do not look for noncopying intrinsics.
2949
2950 2008-03-29  Paul Thomas  <pault@gcc.gnu.org>
2951
2952         PR fortran/35698
2953         * trans-array.c (gfc_array_init_size): Set 'size' zero if
2954         negative in one dimension.
2955
2956         PR fortran/35702
2957         * trans-expr.c (gfc_trans_string_copy): Only assign a char
2958         directly if the lhs and rhs types are the same.
2959
2960 2008-03-28  Daniel Franke  <franke.daniel@gmail.com>
2961             Paul Richard Thomas <paul.richard.thomas@gmail.com>
2962
2963         PR fortran/34714
2964         * primary.c (match_variable): Improved matching of function 
2965         result variables.
2966         * resolve.c (resolve_allocate_deallocate): Removed checks if
2967         the actual argument for STAT is a variable.
2968
2969 2008-03-28  Tobias Burnus  <burnus@net-b.de>
2970
2971         * symbol.c (gfc_get_default_type): Fix error message; option
2972         -fallow_leading_underscore should be -fallow-leading-underscore
2973
2974 2008-03-27  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2975
2976         PR fortran/35724
2977         * iresolve.c (gfc_resolve_cshift): Check for NULL symtree in test for
2978         optional argument attribute.
2979
2980 2008-03-27  Tom Tromey  <tromey@redhat.com>
2981
2982         * Make-lang.in: Revert automatic dependency patch.
2983
2984 2008-03-25  Tom Tromey  <tromey@redhat.com>
2985
2986         * Make-lang.in: Remove .o targets.
2987         (fortran_OBJS): New variable.
2988         (fortran/gfortranspec.o): Move to fortran/.  Reduce to variable
2989         setting.
2990         (GFORTRAN_D_OBJS): Update.
2991         (GFORTRAN_TRANS_DEPS): Remove.
2992
2993 2008-03-24  Paul Thomas  <pault@gcc.gnu.org>
2994
2995         PR fortran/34813
2996         * resolve.c (resolve_structure_cons): It is an error to assign
2997         NULL to anything other than a pointer or allocatable component.
2998
2999         PR fortran/33295
3000         * resolve.c (resolve_symbol): If the symbol is a derived type,
3001         resolve the derived type.  If the symbol is a derived type
3002         function, ensure that the derived type is visible in the same
3003         namespace as the function.
3004
3005 2008-03-23  Tobias Schlüter  <tobi@gcc.gnu.org>
3006
3007         * trans.h: Use fold_build in build1_v, build2_v and build3_v
3008         macros.
3009         * trans-openmp.c (gfc_trans_omp_critical, gfc_trans_omp_single):
3010         Don't use build2_v macro.
3011
3012 2008-03-19  Daniel Franke  <franke.daniel@gmail.com>
3013
3014         PR fortran/35152
3015         * interface.c (gfc_procedure_use): Check for keyworded arguments in
3016         procedures without explicit interfaces.
3017
3018 2008-03-16  Paul Thomas  <pault@gcc.gnu.org>
3019
3020         PR fortran/35470
3021         * resolve.c (check_assumed_size_reference):  Only visit the
3022         first reference and look directly at the highest dimension.
3023
3024 2008-03-15  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
3025
3026         PR fortran/35184
3027         * trans-array.c (gfc_conv_array_index_offset): Remove unnecessary
3028         assert.
3029
3030 2008-03-15  Daniel Franke  <franke.daniel@gmail.com>
3031
3032         PR fortran/35584
3033         * resolve.c (resolve_branch): Less strict and pessimistic warning
3034         message.
3035
3036 2008-03-11  Paolo Bonzini  <bonzini@gnu.org>
3037
3038         * f95-lang.c (LANG_HOOKS_CLEAR_BINDING_STACK): Delete.
3039         (gfc_be_parse_file): Call clear_binding_stack from here.
3040         (gfc_clear_binding_stack): Rename to clear_binding_stack.
3041                 
3042 2008-03-09  Paul Thomas  <pault@gcc.gnu.org>
3043
3044         PR fortran/35474
3045         * module.c (mio_symtree_ref): After providing a symbol for a
3046         missing equivalence member, resolve and NULL the fixups.
3047
3048 2008-03-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3049
3050         * invoke.texi (Error and Warning Options): Document
3051         -Wline-truncation.
3052
3053 2008-03-08  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
3054
3055         PR fortran/34956
3056         * trans-array.c (gfc_conv_ss_startstride): Fix the logic to avoid
3057         checking bounds of absent optional arguments.
3058
3059 2008-03-06  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
3060
3061         PR fortran/33197
3062         * intrinsic.c (add_functions): Add simplification routines for
3063         ERF, DERF, ERFC and DERFC.
3064         * decl.c (gfc_match_suffix, gfc_match_subroutine): Change GNU
3065         extensions into Fortran 2008 features.
3066         * intrinsic.h (gfc_simplify_erf, gfc_simplify_erfc): New
3067         prototypes.
3068         * simplify.c (gfc_simplify_erf, gfc_simplify_erfc): New functions.
3069
3070 2008-03-03  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
3071
3072         PR fortran/33197
3073         * intrinsic.c (add_functions): Modify intrinsics ACOSH, ASINH,
3074         ATANH, ERF, ERFC and GAMMA. Add intrinsics BESSEL_{J,Y}{0,1,N},
3075         ERFC_SCALED, LOG_GAMMA and HYPOT.
3076         * intrinsic.h (gfc_check_hypot, gfc_simplify_hypot,
3077         gfc_resolve_hypot): New prototypes.
3078         * mathbuiltins.def: Add HYPOT builtin. Make complex versions of
3079         ACOSH, ASINH and ATANH available.
3080         * gfortran.h (GFC_ISYM_ERFC_SCALED, GFC_ISYM_HYPOT): New values.
3081         * lang.opt: Add -std=f2008 option.
3082         * libgfortran.h: Define GFC_STD_F2008.
3083         * lang-specs.h: Add .f08 and .F08 file suffixes.
3084         * iresolve.c (gfc_resolve_hypot): New function.
3085         * parse.c (parse_contained): Allow empty CONTAINS for Fortran 2008.
3086         * check.c (gfc_check_hypot): New function.
3087         * trans-intrinsic.c (gfc_intrinsic_map): Define ERFC_SCALE builtin.
3088         * options.c (set_default_std_flags): Allow Fortran 2008 by default.
3089         (form_from_filename): Add .f08 suffix.
3090         (gfc_handle_option): Handle -std=f2008 option.
3091         * simplify.c (gfc_simplify_hypot): New function.
3092         * gfortran.texi: Document Fortran 2008 status and file extensions.
3093         * intrinsic.texi: Document new BESSEL_{J,Y}{0,1,N} intrinsics,
3094         as well as HYPOT and ERFC_SCALED. Update documentation of ERF,
3095         ERFC, GAMMA, LGAMMA, ASINH, ACOSH and ATANH.
3096         * invoke.texi: Document the new -std=f2008 option.
3097
3098 2008-03-02  Jakub Jelinek  <jakub@redhat.com>
3099
3100         * gfortranspec.c (lang_specific_driver): Update copyright notice
3101         dates.
3102
3103 2008-02-29  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
3104
3105         PR fortran/35059
3106         * expr.c (find_array_element): Modify traversing the constructor to
3107         avoid trying to access NULL memory pointed to by next for the
3108         last element. (find_array_section): Exit while loop if cons->next is
3109         NULL.
3110         * trans-expr.c (gfc_conv_scalar_char_value): Initialize gfc_typespec.
3111         (gfc_conv_function_call): Same.
3112         * decl.c (gfc_match_implicit): Same.
3113         * trans-intrinsic.c (gfc_conv_intrinsic_sr_kind): Same.
3114
3115 2008-02-28  Daniel Franke  <franke.daniel@gmail.com>
3116
3117         PR fortran/31463
3118         PR fortran/33950
3119         PR fortran/34296
3120         * lang.opt: Added -Wreturn-type.
3121         * options.c (gfc_handle_option): Recognize -Wreturn-type.
3122         * trans-decl.c (gfc_trans_deferred_vars): Emit warnings for funtions
3123         where the result value is not set.
3124         (gfc_generate_function_code): Likewise.
3125         (generate_local_decl): Emit warnings for funtions whose RESULT
3126         variable is not set.
3127
3128 2008-02-28  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
3129
3130         PR fortran/34868
3131         * trans-expr.c (gfc_conv_variable): Don't build indirect
3132         references when explicit interface is mandated.
3133         * resolve.c (resolve_formal_arglist): Set attr.always_explicit
3134         on the result symbol as well as the procedure symbol.
3135
3136 2008-02-27  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
3137
3138         PR fortran/33387
3139         * trans.h: Remove prototypes for gfor_fndecl_math_exponent4,
3140         gfor_fndecl_math_exponent8, gfor_fndecl_math_exponent10 and
3141         gfor_fndecl_math_exponent16.
3142         * f95-lang.c (build_builtin_fntypes): Add new function types.
3143         (gfc_init_builtin_functions): Add new builtins for nextafter,
3144         frexp, ldexp, fabs, scalbn and inf.
3145         * iresolve.c (gfc_resolve_rrspacing): Don't add hidden arguments.
3146         (gfc_resolve_scale): Don't convert type of second argument.
3147         (gfc_resolve_set_exponent): Likewise.
3148         (gfc_resolve_size): Don't add hidden arguments.
3149         * trans-decl.c: Remove gfor_fndecl_math_exponent4,
3150         gfor_fndecl_math_exponent8, gfor_fndecl_math_exponent10 and
3151         gfor_fndecl_math_exponent16.
3152         * trans-intrinsic.c (gfc_intrinsic_map): Remove intrinsics
3153         for scalbn, fraction, nearest, rrspacing, set_exponent and
3154         spacing.
3155         (gfc_conv_intrinsic_exponent): Directly call frexp.
3156         (gfc_conv_intrinsic_fraction, gfc_conv_intrinsic_nearest,
3157         gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_rrspacing,
3158         gfc_conv_intrinsic_scale, gfc_conv_intrinsic_set_exponent): New
3159         functions.
3160         (gfc_conv_intrinsic_function): Use the new functions above.
3161
3162 2008-02-26  Tobias Burnus  <burnus@net-b.de>
3163
3164         PR fortran/35033
3165         * interface.c (check_operator_interface): Show better line for error
3166         messages; fix constrains for user-defined assignment operators.
3167         (gfc_extend_assign): Fix constrains for user-defined assignment
3168         operators.
3169
3170 2008-02-26  Tom Tromey  <tromey@redhat.com>
3171
3172         * trans-io.c (set_error_locus): Remove old location code.
3173         * trans-decl.c (gfc_set_decl_location): Remove old location code.
3174         * f95-lang.c (gfc_init): Remove test of USE_MAPPED_LOCATION.
3175         * scanner.c (gfc_gobble_whitespace): Remove old location code.
3176         (get_file): Likewise.
3177         (preprocessor_line): Likewise.
3178         (load_file): Likewise.
3179         (gfc_new_file): Likewise.
3180         * trans.c (gfc_trans_runtime_check): Remove old location code.
3181         (gfc_get_backend_locus): Likewise.
3182         (gfc_set_backend_locus): Likewise.
3183         * data.c (gfc_assign_data_value): Remove old location code.
3184         * error.c (show_locus): Remove old location code.
3185         * gfortran.h (gfc_linebuf): Remove old location code.
3186         (gfc_linebuf_linenum): Remove old-location variant.
3187
3188 2008-02-25  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
3189
3190         PR fortran/34729
3191         * trans-const.c (gfc_build_string_const): Don't call gettext.
3192         (gfc_build_localized_string_const): New function.
3193         * trans-const.h (gfc_build_localized_string_const): New prototype.
3194         * trans.c (gfc_trans_runtime_check): Use
3195         gfc_build_localized_string_const instead of gfc_build_string_const.
3196         (gfc_call_malloc): Likewise.
3197         (gfc_allocate_with_status): Likewise.
3198         (gfc_allocate_array_with_status): Likewise.
3199         (gfc_deallocate_with_status): Likewise.
3200         (gfc_call_realloc): Likewise.
3201         * trans-io.c (gfc_trans_io_runtime_check): Likewise.
3202
3203 2008-02-24  Tobias Schlüter  <tobi@gcc.gnu.org>
3204
3205         * arith.c: Update copyright years.
3206         * arith.h: Likewise.
3207         * array.c: Likewise.
3208         * bbt.c: Likewise.
3209         * check.c: Likewise.
3210         * data.c: Likewise.
3211         * data.h: Likewise.
3212         * decl.c: Likewise.
3213         * dependency.c: Likewise.
3214         * dependency.h: Likewise.
3215         * dump-parse-tree.c: Likewise.
3216         * error.c: Likewise.
3217         * expr.c: Likewise.
3218         * gfc-internals.texi: Likewise.
3219         * gfortran.h: Likewise.
3220         * gfortran.texi: Likewise.
3221         * gfortranspec.c: Likewise.
3222         * interface.c: Likewise.
3223         * intrinsic.c: Likewise.
3224         * intrinsic.h: Likewise.
3225         * intrinsic.texi: Likewise.
3226         * invoke.texi: Likewise.
3227         * io.c: Likewise.
3228         * iresolve.c: Likewise.
3229         * iso-c-binding.def: Likewise.
3230         * iso-fortran-env.def: Likewise.
3231         * lang-specs.h: Likewise.
3232         * lang.opt: Likewise.
3233         * libgfortran.h: Likewise.
3234         * match.c: Likewise.
3235         * match.h: Likewise.
3236         * matchexp.c: Likewise.
3237         * misc.c: Likewise.
3238         * module.c: Likewise.
3239         * openmp.c: Likewise.
3240         * options.c: Likewise.
3241         * parse.c: Likewise.
3242         * parse.h: Likewise.
3243         * primary.c: Likewise.
3244         * resolve.c: Likewise.
3245         * scanner.c: Likewise.
3246         * simplify.c: Likewise.
3247         * st.c: Likewise.
3248         * symbol.c: Likewise.
3249         * target-memory.c: Likewise.
3250         * target-memory.h: Likewise.
3251         * trans-array.h: Likewise.
3252         * trans-const.h: Likewise.
3253         * trans-stmt.h: Likewise.
3254         * trans-types.c: Likewise.
3255         * trans-types.h: Likewise.
3256         * types.def: Likewise.
3257
3258 2008-02-24  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
3259
3260         PR fortran/35223
3261         * simplify.c (gfc_simplify_ibclr), (gfc_simplify_ibits),
3262         (gfc_simplify_ibset): Remove call to range_check.
3263         (simplify_cmplx), (gfc_simplify_dble), (gfc_simplify_float)
3264         (gfc_simplify_real): Add call gfc_clear_ts to initialize the
3265         temporary gfc_typspec variable.
3266
3267 2008-02-24  Tobias Schlüter  <tobi@gcc.gnu.org>
3268
3269         * trans-array.c (gfc_conv_descriptor_data_get,
3270         gfc_conv_descriptor_data_set_internal,
3271         gfc_conv_descriptor_data_addr, gfc_conv_descriptor_offset,
3272         gfc_conv_descriptor_dtype, gfc_conv_descriptor_dimension,
3273         gfc_conv_descriptor_stride, gfc_conv_descriptor_lbound,
3274         gfc_conv_descriptor_ubound, gfc_trans_create_temp_array,
3275         gfc_conv_array_transpose, gfc_grow_array,
3276         gfc_trans_array_constructor_subarray,
3277         gfc_trans_array_constructor_value, gfc_trans_scalarized_loop_end,
3278         gfc_array_init_size, gfc_array_allocate, gfc_array_deallocate,
3279         gfc_conv_array_initializer, gfc_trans_array_bounds,
3280         gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
3281         gfc_get_dataptr_offset, gfc_conv_array_parameter,
3282         gfc_trans_dealloc_allocated, get_full_array_size,
3283         gfc_duplicate_allocatable, structure_alloc_comps): Use fold_buildN
3284         instead of buildN.
3285         * trans-expr.c (gfc_conv_expr_present, gfc_conv_missing_dummy,
3286         gfc_conv_component_ref, gfc_conv_cst_int_power,
3287         gfc_conv_function_call, gfc_trans_structur_assign): Likewise.
3288         * trans-common.c (create_common): Likewise.
3289         * trans-openmp.c (gfc_trans_omp_atomic, gfc_trans_omp_do):
3290         Likewise.
3291         * trans-const.c (gfc_conv_constant_to_tree): Likewise.
3292         * trans-stmt.c (gfc_trans_goto, gfc_trans_return, gfc_trans_do,
3293         gfc_trans_integer_select, gfc_trans_character_select,
3294         gfc_trans_forall_loop, compute_overall_iter_number,
3295         gfc_trans_forall_1, gfc_evaluate_where_mask, gfc_trans_allocate,
3296         gfc_trans_deallocate): Likewise.
3297         * trans.c (gfc_build_addr_expr, gfc_trans_runtime_check,
3298         gfc_allocate_with_status, gfc_allocate_array_with_status,
3299         gfc_deallocate_with_status): Likewise.
3300         * f95-lang.c (gfc_truthvalue_conversion): Likewise.
3301         * trans-io.c (set_parameter_const, set_parameter_value,
3302         set_parameter_ref, set_string, set_internal_unit, io_result,
3303         set_error_locus, nml_get_addr_expr, transfer_expr): Likewise.
3304         * trans-decl.c (gfc_build_qualified_array, build_entry_thunks,
3305         gfc_get_fake_result_decl, gfc_trans_auto_character_variable,
3306         gfc_generate_function_code): Likewise.
3307         * convert.c (convert): Likewise.
3308         * trans-intrinsic.c (gfc_conv_intrinsic_conversion,
3309         build_fixbound_expr, build_fix_expr, gfc_conv_intrinsic_aint,
3310         gfc_conv_intrinsic_int, gfc_conv_intrinsic_imagpart,
3311         gfc_conv_intrinsic_conjg, gfc_conv_intrinsic_abs,
3312         gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_mod,
3313         gfc_conv_intrinsic_dim, gfc_conv_intrinsic_dprod,
3314         gfc_conv_intrinsic_ctime, gfc_conv_intrinsic_fdate,
3315         gfc_conv_intrinsic_ttynam, gfc_conv_intrinsic_minmax,
3316         gfc_conv_intrinsic_minmax_char, gfc_conv_intrinsic_count,
3317         gfc_conv_intrinsic_arith, gfc_conv_intrinsic_dot_product,
3318         gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
3319         gfc_conv_intrinsic_btest, gfc_conv_intrinsic_not,
3320         gfc_conv_intrinsic_ibits, gfc_conv_intrinsic_ishft,
3321         gfc_conv_intrinsic_ichar, gfc_conv_intrinsic_size,
3322         gfc_conv_intrinsic_array_transfer, gfc_conv_intrinsic_transfer,
3323         gfc_conv_allocated, gfc_conv_associated, gfc_conv_intrinsic_trim,
3324         gfc_conv_intrinsic_repeat): Likewise.
3325
3326 2008-02-23  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
3327
3328         PR target/25477
3329         * trans-expr.c (gfc_conv_power_op): Use BUILT_IN_CPOW{F,,L}.
3330         * f95-lang.c (gfc_init_builtin_functions): Define BUILT_IN_CPOW{F,,L}.
3331         * trans.h (gfor_fndecl_math_cpow, gfor_fndecl_math_cpowf,
3332         gfor_fndecl_math_cpowl10, gfor_fndecl_math_cpowl16): Remove.
3333         * trans-decl.c: Likewise.
3334
3335 2008-02-22  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
3336
3337         PR fortran/35059
3338         * expr.c (find_array_element): Modify traversing the constructor to
3339         avoid trying to access NULL memory pointed to by next for the
3340         last element. (find_array_section): Exit while loop if cons->next is
3341         NULL.
3342
3343 2008-02-22  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
3344
3345         PR fortran/34907
3346         * iresolve.c (resolve_mask_arg): Add gfc_clear_ts to initialize
3347         structure.
3348         (gfc_resolve_aint): Likewise.
3349         (gfc_resolve_anint): Likewise.
3350         (gfc_resolve_besn): Likewise.
3351         (gfc_resolve_cshift): Likewise.
3352         (gfc_resolve_ctime): Likewise.
3353         (gfc_resolve_eoshift): Likewise.
3354         (gfc_resolve_index_func): Likewise.
3355         (gfc_resolve_isatty): Likewise.
3356         (gfc_resolve_malloc): Likewise.
3357         (gfc_resolve_rrspacing): Likewise.
3358         (gfc_resolve_scale): Likewise.
3359         (gfc_resolve_set_exponent): Likewise.
3360         (gfc_resolve_spacing): Likewise.
3361         (gfc_resolve_spacing): Likewise.
3362         (gfc_resolve_fgetc): Likewise.
3363         (gfc_resolve_fputc): Likewise.
3364         (gfc_resolve_ftell): Likewise.
3365         (gfc_resolve_ttynam): Likewise.
3366         (gfc_resolve_alarm_sub): Likewise.
3367         (gfc_resolve_mvbits): Likewise.
3368         (gfc_resolve_getarg): Likewise.
3369         (gfc_resolve_signal_sub): Likewise.
3370         (gfc_resolve_exit): Likewise.
3371         (gfc_resolve_flush): Likewise.
3372         (gfc_resolve_free): Likewise.
3373         (gfc_resolve_ctime_sub): Likewise.
3374         (gfc_resolve_fgetc_sub): Likewise.
3375         (gfc_resolve_fputc_sub): Likewise.
3376         (gfc_resolve_fseek_sub): Likewise.
3377         (gfc_resolve_ftell_sub): Likewise.
3378         (gfc_resolve_ttynam_sub): Likewise.
3379
3380 2008-02-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3381
3382         * gfc-internals.texi: Fix typos and markup nits.
3383         * gfortran.texi: Likewise.
3384         * intrinsic.texi: Likewise.
3385
3386 2008-02-21  Richard Guenther  <rguenther@suse.de>
3387
3388         * trans-expr.c (gfc_conv_expr_op): Expand INTRINSIC_PARENTHESES
3389         as unary PAREN_EXPR for real and complex typed expressions.
3390         (gfc_conv_unary_op): Fold the built tree.
3391
3392 2008-02-20  Tobias Burnus  <burnus@net-b.de>
3393
3394         PR fortran/34997
3395         * match.c (gfc_match_name): Improve error message for '$'.
3396
3397 2008-02-19  Daniel Franke  <franke.daniel@gmail.com>
3398
3399         PR fortran/35030
3400         * expr.c (gfc_check_pointer_assign): Add type and kind information
3401         to type-mismatch message.
3402         (gfc_check_assign): Unify error messages.
3403
3404 2008-02-16  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
3405
3406         PR fortran/34952
3407         * gfortran.texi: Create new section for unimplemented extensions.
3408         Add "STRUCTURE and RECORD" and "ENCODE and DECODE statements".
3409         Remove "smaller projects" list. Fix a few typos.
3410
3411 2008-02-15  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
3412
3413         * intrinsic.texi: Rename INDEX node to avoid clashing with
3414         index.html on case-insensitive systems.
3415
3416 2008-02-15  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
3417
3418         PR fortran/35150
3419         * trans-expr.c (gfc_conv_function_call): Force evaluation of
3420         se->expr.
3421
3422 2008-02-10  Daniel Franke  <franke.daniel@gmail.com>
3423
3424         PR fortran/35019
3425         * lang.opt: Allow '-J<dir>' next to '-J <dir>', 
3426         likewise '-I <dir>' and '-I<dir>'.
3427
3428 2008-02-06  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3429
3430         PR other/35107
3431         * Make-lang.in (f951): Add $(GMPLIBS).
3432
3433 2008-02-05  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
3434
3435         PR fortran/35037
3436         * trans-common.c (build_field): Mark fields as volatile when needed.
3437
3438 2008-02-05  Tobias Burnus  <burnus@net-b.de>
3439
3440         PR fortran/35093
3441         * data.c (gfc_assign_data_value): Only free "size" if
3442         it has not already been freed.
3443
3444 2008-02-05  Paul Thomas  <pault@gcc.gnu.org>
3445
3446         PR fortran/34945
3447         * array.c (match_array_element_spec): Remove check for negative
3448         array size.
3449         (gfc_resolve_array_spec): Add check for negative size.
3450
3451 2008-02-05  Paul Thomas  <pault@gcc.gnu.org>
3452
3453         PR fortran/32315
3454         * data.c (gfc_assign_data_value): Add bounds check for array
3455         references.
3456
3457 2008-02-04  Daniel Franke  <franke.daniel@gmail.com>
3458
3459         * resolve.c (resolve_where): Fix typo.
3460         (gfc_resolve_where_code_in_forall): Likewise.
3461
3462 2008-02-03  Paul Thomas  <pault@gcc.gnu.org>
3463
3464         PR fortran/32760
3465         * resolve.c (resolve_allocate_deallocate): New function.
3466         (resolve_code): Call it for allocate and deallocate.
3467         * match.c (gfc_match_allocate, gfc_match_deallocate) : Remove
3468         the checking of the STAT tag and put in above new function.
3469         * primary,c (match_variable): Do not fix flavor of host
3470         associated symbols yet if the type is not known.
3471
3472 2008-01-31  Paul Thomas  <pault@gcc.gnu.org>
3473
3474         PR fortran/34910
3475         * expr.c (gfc_check_assign): It is an error to assign
3476         to a sibling procedure.
3477
3478 2008-01-30  Paul Thomas  <pault@gcc.gnu.org>
3479
3480         PR fortran/34975
3481         * symbol.c (gfc_delete_symtree, gfc_undo_symbols): Rename
3482         delete_symtree to gfc_delete_symtree.
3483         * gfortran.h : Add prototype for gfc_delete_symtree.
3484         * module.c (load_generic_interfaces): Transfer symbol to a
3485         unique symtree and delete old symtree, instead of renaming.
3486         (read_module): The rsym and the found symbol are the same, so
3487         the found symtree can be deleted.
3488
3489         PR fortran/34429
3490         * decl.c (match_char_spec): Remove the constraint on deferred
3491         matching of functions and free the length expression.
3492         delete_symtree to gfc_delete_symtree.
3493         (gfc_match_type_spec): Whitespace.
3494         (gfc_match_function_decl): Defer characteristic association for
3495         all types except BT_UNKNOWN.
3496         * parse.c (decode_specification_statement): Only derived type
3497         function matching is delayed to the end of specification.
3498
3499 2008-01-28  Tobias Burnus  <burnus@net-b.de>
3500
3501         PR libfortran/34980
3502         * simplify.c (gfc_simplify_shape): Simplify rank zero arrays.
3503
3504 2008-01-27  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
3505
3506         PR fortran/34990
3507         * array.c (gfc_check_constructor_type): Revert clearing the expression.
3508
3509 2008-01-26  Tobias Burnus  <burnus@net-b.de>
3510
3511         PR fortran/34848
3512         * trans-expr.c (gfc_conv_function_call): Don't call
3513         gfc_add_interface_mapping if the expression is NULL.
3514
3515 2008-01-26  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
3516
3517         PR fortran/31610
3518         * trans-array.c (gfc_trans_create_temp_array): Remove call to
3519         gcc_assert (integer_zerop (loop->from[n])).
3520
3521 2008-01-25  Daniel Franke  <franke.daniel@gmail.com>
3522
3523         PR fortran/34661
3524         * resolve.c (resolve_where): Added check if user-defined assignment 
3525         operator is an elemental subroutine.
3526         (gfc_resolve_where_code_in_forall): Likewise.
3527
3528 2008-01-24  Daniel Franke  <franke.daniel@gmail.com>
3529
3530         PR fortran/33375
3531         PR fortran/34858
3532         * gfortran.h: Revert changes from 2008-01-17.
3533         * match.c: Likewise.
3534         * symbol.c: Likewise.
3535         (gfc_undo_symbols): Undo namespace changes related to common blocks.
3536
3537 2008-01-24  Daniel Franke  <franke.daniel@gmail.com>
3538
3539         PR fortran/34202
3540         * data.c (formalize_structure_cons): Skip formalization on
3541         empty structures.
3542
3543 2008-01-24  Daniel Franke  <franke.daniel@gmail.com>
3544
3545         * gfortran.texi (OpenMP): Extended existing documentation.
3546         (contributors): Added major contributors of 2008 that were
3547         not listed yet.
3548         (proposed extensions): Removed implemented items.
3549
3550 2008-01-24  Paul Thomas  <pault@gcc.gnu.org>
3551
3552         PR fortran/34872
3553         * parse.c (next_statement) : If ST_GET_FCN_CHARACTERISTICS  is
3554         seen, check for a statement label and, if present, delete it
3555         and set the locus to the start of the statement.
3556
3557 2008-01-22  Paul Thomas  <pault@gcc.gnu.org>
3558
3559         PR fortran/34875
3560         * trans-io.c (gfc_trans_transfer): If the array reference in a
3561         read has a vector subscript, use gfc_conv_subref_array_arg to
3562         copy back the temporary.
3563
3564 2008-01-22  Tobias Burnus  <burnus@net-b.de>
3565
3566         PR fortran/34848
3567         * interface.c (compare_actual_formal): Fix adding type
3568         to missing_arg_type for absent optional arguments.
3569
3570 2008-01-22  Tobias Burnus  <burnus@net-b.de>
3571
3572         PR fortran/34907
3573         * parse.c (parse_spec): Change = into ==.
3574
3575 2008-01-22  Daniel Franke  <franke.daniel@gmail.com>
3576
3577         PR fortran/34915
3578         * expr.c (check_elemental): Fix check for valid data types.
3579
3580 2008-01-22  Tobias Burnus  <burnus@net-b.de>
3581
3582         PR fortran/34899
3583         * scanner.c (load_line): Support <tab><digit> continuation lines.
3584         * invoke.texi (-Wtabs): Document this.
3585
3586 2008-01-22  Paul Thomas  <pault@gcc.gnu.org>
3587
3588         PR fortran/34896
3589         * module.c (read_module): Set use_rename attribute.
3590
3591 2007-01-21  Tobias Burnus  <burnus@net-b.de>
3592
3593         PR fortran/34901
3594         * interface.c (compare_parameter): Improved error message
3595         for arguments of same type and mismatched kinds.
3596
3597 2008-01-20  Paul Thomas  <pault@gcc.gnu.org>
3598
3599         PR fortran/34861
3600         * resolve.c (resolve_entries): Do not do an array bounds check
3601         if the result symbols are the same.
3602
3603         PR fortran/34854
3604         * module.c (read_module) : Hide the symtree of the previous
3605         version of the symbol if this symbol is renamed.
3606
3607 2008-01-20  Paul Thomas  <pault@gcc.gnu.org>
3608
3609         PR fortran/34784
3610         * array.c (gfc_check_constructor_type): Clear the expression ts
3611         so that the checking starts from the deepest level of array
3612         constructor.
3613         * primary.c (match_varspec): If an unknown type is changed to
3614         default character and the attempt to match a substring fails,
3615         change it back to unknown.
3616
3617         PR fortran/34785
3618         * trans-array.c (gfc_add_loop_ss_code) : If ss->string_length is
3619         NULL for an array constructor, use the cl.length expression to
3620         build it.
3621         (gfc_conv_array_parameter): Change call to gfc_evaluate_now to
3622         a tree assignment.
3623
3624 2008-01-19  Thomas Koenig  <tkoenig@gcc.gnu.org>
3625
3626         PR fortran/34817
3627         PR fortran/34838
3628         * iresolve.c (gfc_resolve_all):  Remove conversion of mask
3629         argument to kind=1 by removing call to resolve_mask_arg().
3630         (gfc_resolve_any):  Likewise.
3631
3632 2008-01-19  Tobias Burnus  <burnus@net-b.de>
3633
3634         PR fortran/34760
3635         * primary.c (match_variable): Handle FL_UNKNOWN without
3636         uneducated guessing.
3637         (match_variable): Improve error message.
3638
3639 2008-01-18  Tobias Burnus  <burnus@net-b.de>
3640
3641         PR fortran/32616
3642         * interface.c (get_expr_storage_size): Return storage size
3643         for array element designators.
3644         (compare_actual_formal): Reject unequal string sizes for
3645         assumed-shape dummy arguments. And fix error message for
3646         array-sections with vector subscripts.
3647
3648 2008-01-17  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
3649
3650         PR fortran/34556
3651         * simplify.c (is_constant_array_expr): New static function that returns
3652         true if the given expression is an array and is constant.
3653         (gfc_simplify_reshape): Use new function.
3654
3655 2008-01-17  H.J. Lu  <hongjiu.lu@intel.com>
3656
3657         PR fortran/33375
3658         * symbol.c (free_common_tree): Renamed to ...
3659         (gfc_free_common_tree): This.  Remove static.
3660         (gfc_free_namespace): Updated.
3661
3662         * gfortran.h (gfc_free_common_tree): New.
3663
3664         * match.c (gfc_match_common): Call gfc_free_common_tree () with
3665         gfc_current_ns->common_root and set gfc_current_ns->common_root
3666         to NULL on syntax error.
3667
3668 2008-01-18  Richard Sandiford  <rsandifo@nildram.co.uk>
3669
3670         PR fortran/34686
3671         * trans-expr.c (gfc_conv_function_call): Use proper
3672         type for returned character pointers.
3673
3674 2008-01-17  Paul Thomas  <pault@gcc.gnu.org>
3675
3676         PR fortran/34429
3677         PR fortran/34431
3678         PR fortran/34471
3679         * decl.c : Remove gfc_function_kind_locus and
3680         gfc_function_type_locus. Add gfc_matching_function.
3681         (match_char_length): If matching a function and the length
3682         does not match, return MATCH_YES and try again later.
3683         (gfc_match_kind_spec): The same.
3684         (match_char_kind): The same.
3685         (gfc_match_type_spec): The same for numeric and derived types.
3686         (match_prefix): Rename as gfc_match_prefix.
3687         (gfc_match_function_decl): Except for function valued character
3688         lengths, defer applying kind, type and charlen info until the
3689         end of specification block.
3690         gfortran.h (gfc_statement): Add ST_GET_FCN_CHARACTERISTICS.
3691         parse.c (decode_specification_statement): New function.
3692         (decode_statement): Call it when a function has kind = -1. Set
3693         and reset gfc_matching function, as function statement is being
3694         matched.
3695         (match_deferred_characteristics): Simplify with a single call
3696         to gfc_match_prefix. Do appropriate error handling. In any
3697         case, make sure that kind = -1 is reset or corrected.
3698         (parse_spec): Call above on seeing ST_GET_FCN_CHARACTERISTICS.
3699         Throw an error if kind = -1 after last specification statement.
3700         parse.h : Prototype for gfc_match_prefix.
3701
3702 2008-01-16  Tobias Burnus  <burnus@net-b.de>
3703
3704         PR fortran/34796
3705         * interface.c (compare_parameter): Allow AS_DEFERRED array
3706         elements and reject attr.pointer array elemenents.
3707         (get_expr_storage_size): Return storage size of elements of
3708         assumed-shape and pointer arrays.
3709
3710 2008-01-15  Sebastian Pop  <sebastian.pop@amd.com>
3711
3712         * f95-lang.c (gfc_init_builtin_functions): Initialize GOMP builtins
3713         for flag_tree_parallelize_loops.
3714
3715 2008-01-15  Thomas Koenig  <tkoenig@gcc.gnu.org>
3716
3717         PR libfortran/34671
3718         * iresolve.c (gfc_resolve_all):  Call resolve_mask_arg.
3719         (gfc_resolve_any):  Likewise.
3720         (gfc_resolve_count):  Likewise.  Don't append kind of
3721         argument to function name.
3722
3723 2008-01-13  Tobias Burnus  <burnus@net-b.de>
3724
3725         PR fortran/34665
3726         * resolve.c (resolve_actual_arglist): For expressions,
3727         also check for assume-sized arrays.
3728         * interface.c (compare_parameter): Move F2003 character checks
3729         here, print error messages here, reject elements of
3730         assumed-shape array as argument to dummy arrays.
3731         (compare_actual_formal): Update for the changes above.
3732
3733 2008-01-13  Tobias Burnus  <burnus@net-b.de>
3734
3735         PR fortran/34763
3736         * decl.c (contained_procedure): Only check directly preceeding state.
3737
3738 2008-01-13  Tobias Burnus  <burnus@net-b.de>
3739
3740         PR fortran/34759
3741         * check.c (gfc_check_shape): Accept array ranges of
3742         assumed-size arrays.
3743
3744 2008-01-12  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
3745
3746         PR fortran/34432
3747         * match.c (gfc_match_name): Don't error if leading character is a '(',
3748         just return MATCH_NO.
3749
3750 2008-01-11  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
3751
3752         PR fortran/34722
3753         * trans-io.c (create_dummy_iostat): Commit the symbol.
3754
3755 2008-01-11  Paul Thomas  <pault@gcc.gnu.org>
3756
3757         PR fortran/34537
3758         * simplify.c (gfc_simplify_transfer): Return NULL if the size
3759         of the element is unavailable and only assign character length
3760         to the result, if 'mold' is constant.
3761
3762 2008-01-10  Paul Thomas  <pault@gcc.gnu.org>
3763
3764         PR fortran/34396
3765         * trans-array.c (gfc_trans_array_ctor_element):  Use gfc_trans_string_copy
3766         to assign strings and perform bounds checks on the string length.
3767         (get_array_ctor_strlen): Remove bounds checking.
3768         (gfc_trans_array_constructor): Initialize string length checking.
3769         * trans-array.h : Add prototype for gfc_trans_string_copy.
3770
3771 2008-01-08  Richard Guenther  <rguenther@suse.de>
3772
3773         PR fortran/34706
3774         PR tree-optimization/34683
3775         * trans-types.c (gfc_get_array_type_bounds): Use an array type
3776         with known size for accesses if that is known.
3777
3778 2008-01-08  Paul Thomas  <pault@gcc.gnu.org>
3779
3780         PR fortran/34476
3781         * expr.c (find_array_element): Check that the array bounds are
3782         constant before using them.  Use lower, as well as upper bound.
3783         (check_restricted): Allow implied index variable.
3784
3785 2008-01-08  Paul Thomas  <pault@gcc.gnu.org>
3786
3787         PR fortran/34681
3788         * trans_array.c (gfc_trans_deferred_array): Do not null the
3789         data pointer on entering scope, nor deallocate it on leaving
3790         scope, if the symbol has the 'save' attribute.
3791
3792         PR fortran/34704
3793         * trans_decl.c (gfc_finish_var_decl): Derived types with
3794         allocatable components and an initializer must be TREE_STATIC.
3795
3796 2008-01-07  Paul Thomas  <pault@gcc.gnu.org>
3797
3798         PR fortran/34672
3799         * module.c (write_generic): Rewrite completely.
3800         (write_module): Change call to write_generic.
3801
3802 2008-01-06  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
3803
3804         PR fortran/34659
3805         * scanner.c (load_line): Do not count ' ' as printable when checking for
3806         continuations.
3807
3808 2008-01-06  Paul Thomas  <pault@gcc.gnu.org>
3809
3810         PR fortran/34545
3811         * module.c (load_needed): If the namespace has no proc_name
3812         give it the module symbol.
3813
3814 2008-01-06  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
3815
3816         PR fortran/34387
3817         * trans-expr.c (gfc_conv_missing_dummy): Use a temporary to type convert
3818         the dummy variable expression, test for NULL, and pass the variable
3819         address to the called function.
3820
3821 2007-01-06  Tobias Burnus  <burnus@net-b.de>
3822
3823         PR fortran/34658
3824         * match.c (gfc_match_common): Remove blank common in
3825         DATA BLOCK warning.
3826         * resolve.c (resolve_common_vars): New function.
3827         (resolve_common_blocks): Move checks to resolve_common_vars
3828         and invoke that function.
3829         (resolve_types): Call resolve_common_vars for blank commons.
3830
3831 2008-01-06  Tobias Burnus  <burnus@net-b.de>
3832
3833         PR fortran/34655
3834         * resolve.c (resolve_equivalence_derived): Reject derived types with
3835         default initialization if equivalenced with COMMON variable.
3836
3837 2008-01-06  Tobias Burnus  <burnus@net-b.de>
3838
3839         PR fortran/34654
3840         * io.c (check_io_constraints): Disallow unformatted I/O for
3841         internal units.
3842
3843 2008-01-06  Tobias Burnus  <burnus@net-b.de>
3844
3845         PR fortran/34660
3846         * resolve.c (resolve_formal_arglist): Reject dummy procedure in
3847         ELEMENTAL functions.
3848
3849 2008-01-06  Tobias Burnus  <burnus@net-b.de>
3850
3851         PR fortran/34662
3852         * interface.c (compare_actual_formal): Reject parameter
3853         actual to intent(out) dummy.
3854
3855 2008-01-04  Tobias Burnus  <burnus@net-b.de>
3856
3857         PR fortran/34557
3858         * primary.c (match_varspec): Gobble whitespace before
3859         checking for '('.