OSDN Git Service

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