OSDN Git Service

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