OSDN Git Service

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