OSDN Git Service

PR bootstrap/45700
[pf3gnuchains/gcc-fork.git] / gcc / fortran / ChangeLog
1 2010-11-26  Jakub Jelinek  <jakub@redhat.com>
2
3         PR bootstrap/45700
4         * trans.h (build1_stat_loc, build2_stat_loc, build3_stat_loc,
5         build4_stat_loc): Removed.
6         (build1_loc, build2_loc, build3_loc, build4_loc): Removed.
7
8 2010-11-25  Janus Weil  <janus@gcc.gnu.org>
9
10         PR fortran/46581
11         * trans.h (gfc_process_block_locals): Removed second argument.
12         * trans-decl.c (trans_associate_var): Moved to trans-stmt.c.
13         (gfc_trans_deferred_vars): Skip ASSOCIATE variables.
14         (gfc_process_block_locals): Don't mark associate names to be
15         initialized.
16         * trans-stmt.c (trans_associate_var): Moved here from trans-decl.c.
17         (gfc_trans_block_construct): Call 'trans_associate_var' from here
18         to make sure SELECT TYPE with associate-name is treated correctly.
19
20 2010-11-24  Tobias Burnus  <burnus@net-b.de>
21
22         PR fortran/46638
23         * target-memory.c (gfc_interpret_derived): Correctly handle
24         component offset.
25
26 2010-11-23  Tobias Burnus  <burnus@net-b.de>
27
28         PR fortran/46545
29         * gfortran.texi (KIND Type Parameters): Quadmath and F2008 changes.
30
31 2010-11-22  Michael Matz  <matz@suse.de>
32
33         * gfortranspec.c (library): New global, moved from ...
34         (lang_specific_driver): ... here.
35         (lang_specific_pre_link): Test it here before including
36         libgfortran.spec.
37
38 2010-11-21  Michael Matz  <matz@suse.de>
39             Tobias Burnus  <burnus@net-b.de>
40
41         PR driver/46516
42         * gfortranspec.c (lang_specific_driver,
43         lang_specific_pre_link): Load libgfortran.spec in
44         lang_specific_pre_link unless found in the -L path.
45
46 2010-11-20  Janne Blomqvist  <jb@gcc.gnu.org>
47
48         * f95-lang.c (gfc_init_decl_processing): Set size_type_node as
49         unsigned int of pointer size and set sizetype based on that.
50         * trans-types.c (gfc_init_types): Don't set size_type_node to an
51         unsigned type.
52
53 2010-11-17  Joseph Myers  <joseph@codesourcery.com>
54
55         * f95-lang.c (gfc_be_parse_file): Take no arguments.
56
57 2010-11-16  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
58             Tobias Burnus  <burnus@net-b.de>
59
60         PR fortran/32049
61         * gfortranspec.c (find_spec_file): New function.
62         (lang_specific_driver): Try to find .spec file and use it.
63         * trans-io.c (iocall): Define IOCALL_X_REAL128/COMPLEX128(,write).
64         (gfc_build_io_library_fndecls): Build decl for __float128 I/O.
65         (transfer_expr): Call __float128 I/O functions.
66         * trans-types.c (gfc_init_kinds): Allow kind-16 belonging
67         to __float128.
68
69 2010-11-15  Tobias Burnus  <burnus@net.b.de>
70
71         PR fortran/46484
72         * check.c (variable_check): Don't treat functions calls as variables;
73         optionally accept function themselves.
74         (gfc_check_all_any, gfc_check_loc, gfc_check_move_alloc,
75         gfc_check_null, gfc_check_present, gfc_check_cpu_time,
76         gfc_check_date_and_time, gfc_check_mvbits, gfc_check_random_number,
77         gfc_check_random_seed, gfc_check_system_clock,
78         gfc_check_dtime_etime, gfc_check_dtime_etime_sub,
79         gfc_check_itime_idate,gfc_check_ltime_gmtime): Update call.
80
81 2010-11-13  Tobias Burnus  <burnus@net-b.de>
82
83         PR fortran/45742
84         * trans-common.c (build_field): Add TREE_SIDE_EFFECTS for volatile.
85         * trans-decl.c (gfc_finish_var_decl): Ditto.
86         (create_function_arglist): Handle volatile dummy arguments.
87
88 2010-11-12  Joseph Myers  <joseph@codesourcery.com>
89
90         * Make-lang.in (gfortranspec.o): Use $(OPTS_H).
91         * gfortran.h (gfc_handle_option): Take location_t parameter.
92         * options.c (gfc_handle_option): Take location_t parameter.
93
94 2010-11-12  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
95
96         PR fortran/45794
97         trans-expr.c (gfc_conv_procedure_call): Avoid NULL array spec.
98         
99 2010-11-11  Nathan Froyd  <froydnj@codesourcery.com>
100
101         PR c/44782
102         * options.c (gfc_post_options): Initialize gfc_option.max_errors.
103         (gfc_handle_option) [OPT_fmax_errors_]: Remove.
104         * lang.opt (fmax-errors=): Remove.
105
106 2010-11-11  Steven G. Kargl <kargl@gcc.gnu.org>
107
108         * symbol.c (verify_bind_c_derived_type):  Accept BIND(C) on an empty
109         derived type.
110
111 2010-11-11  Jan Hubicka  <jh@suse.cz>
112
113         * options.c (gfc_post_options): Remove flag_whopr.
114
115 2010-11-11  Tobias Burnus  <burnus@net-b.de>
116
117         PR fortran/46413
118         * resolve.c (resolve_transfer): Reject I/O transfer of
119         polymorphic type.
120
121         PR fortran/46205
122         * resolve.c (resolve_code): Reject nonscalar FORALL masks.
123
124 2010-11-11  Janus Weil  <janus@gcc.gnu.org>
125
126         * resolve.c (resolve_procedure_interface): Copy 'is_bind_c' attribute.
127
128 2010-11-10  Joseph Myers  <joseph@codesourcery.com>
129
130         * trans-array.c (gfc_trans_deferred_array): Use "front-end"
131         spelling in diagnostic.
132         * trans.c (gfc_allocate_array_with_status): Add missing space in
133         diagnostic.
134
135 2010-11-10  Joseph Myers  <joseph@codesourcery.com>
136
137         * cpp.c (asm_file_name): Don't declare here.
138
139 2010-11-10  Tobias Burnus  <burnus@net-b.de>
140
141         PR fortran/46411
142         * intrinsic.c (gfc_intrinsic_sub_interface): Check for attr.pure
143         and not for attr.elemental.
144         * intrinsic.texi (move_alloc): Document as being pure.
145
146 2010-11-10  Tobias Burnus <burnus@net-b.de>
147
148         PR fortran/46244
149         * resolve.c (resolve_fl_derived): Don't allow CLASS in
150         sequence/BIND(C) types.
151
152 2010-11-09  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
153             Mikael Morin   <mikael@gcc.gnu.org>
154
155         PR fortran/46331
156         * intrinsic.c: Correctly set the pure attributes for intrinsic
157         functions.
158         * expr.c (check_specification_function): Remove this function and move
159         its code into gfc_is_constant_expr. (gfc_is_constant_expr): Change the
160         order of checks by checking for non-constant arguments first.  Then,
161         check for initialization functions, followed by intrinsics.
162
163 2010-11-09  Janus Weil  <janus@gcc.gnu.org>
164
165         PR fortran/46313
166         * gfortran.h (gfc_add_data_component,gfc_add_vptr_component,
167         gfc_add_hash_component,gfc_add_size_component,
168         gfc_add_def_init_component): New macros.
169         * class.c (gfc_add_component_ref): Renamed data component.
170         (get_unique_type_string): New function.
171         (gfc_build_class_symbol): Use 'get_unique_type_string' to construct
172         uniques names for the class containers. Rename components.
173         (gfc_find_derived_vtab): Use 'get_unique_type_string' to construct
174         uniques names for the vtab symbols. Rename components.
175         * decl.c (attr_decl1): Renamed class container components.
176         * iresolve.c (gfc_resolve_extends_type_of): Ditto.
177         * match.c (select_type_set_tmp): Renamed temporaries.
178         * module.c (read_module): Renamed vtab and vtype symbols.
179         * resolve.c (resolve_structure_cons,resolve_typebound_function,
180         resolve_typebound_subroutine,resolve_deallocate_expr,
181         resolve_select_type,resolve_fl_derived): Renamed class container and
182         vtab components.
183         * trans-array.c (structure_alloc_comps): Ditto.
184         * trans-decl.c (gfc_trans_deferred_vars): Ditto.
185         * trans-expr.c (gfc_conv_derived_to_class,gfc_conv_structure,
186         gfc_trans_class_init_assign,gfc_trans_class_assign): Ditto.
187         * trans-intrinsic.c (gfc_conv_intrinsic_sizeof,
188         gfc_conv_intrinsic_storage_size,gfc_conv_allocated,gfc_conv_associated,
189         gfc_conv_same_type_as): Ditto.
190         * trans-stmt.c (gfc_trans_allocate): Ditto.
191
192 2010-11-08  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
193
194         PR fortran/43899
195         * trans-decl.c (generate_local_decl): Do not generate unused warning
196         for variables in namelists.
197
198 2010-11-08  Janus Weil  <janus@gcc.gnu.org>
199
200         PR fortran/46344
201         * decl.c (build_struct): Build vtab immediately if derived type
202         has already been declared.
203
204 2010-11-08  Janus Weil  <janus@gcc.gnu.org>
205
206         PR fortran/46344
207         * trans-types.c (gfc_copy_dt_decls_ifequal): Handle CLASS components.
208
209 2010-11-06  Janus Weil  <janus@gcc.gnu.org>
210
211         PR fortran/46330
212         * trans-expr.c (gfc_trans_class_assign): Find 'vtab' symbol in correct
213         namespace.
214
215 2010-11-05  Janus Weil  <janus@gcc.gnu.org>
216
217         PR fortran/45451
218         PR fortran/46174
219         * class.c (gfc_find_derived_vtab): Improved search for existing vtab.
220         Add component '$copy' to vtype symbol for polymorphic deep copying.
221         * expr.c (gfc_check_pointer_assign): Make sure the vtab is generated
222         during resolution stage.
223         * resolve.c (resolve_codes): Don't resolve code if namespace is already
224         resolved.
225         * trans-stmt.c (gfc_trans_allocate): Call '$copy' procedure for
226         polymorphic ALLOCATE statements with SOURCE.
227
228 2010-11-03  Thomas Koenig  <tkoenig@gcc.gnu.org>
229             Paul Thomas  <pault@gcc.gnu.org>
230
231         * dump-parse-tree.c (code_indent):  Take label into acount
232         when calculating indent.
233         (show_typespec):  Also display class.
234         (show_attr):  Add module name to argument.
235         Don't show UNKNOWN for flavor, access and save. Don't show
236         SAVE_NONE.  Don't show INTENT_UNKNOWN.  Show module for use
237         association.  Show intent only for dummy arguments.
238         Set length of shown symbol names to minimum of 12.
239         Show attributes header.
240         (show_symbol):  Adjust show_level.
241         (show_symtree):  Clear up display for ambiguous.  Show if symbol
242         was imported from namespace.
243         (show_code_node):  Clear up indenting.  Traverse symtree and
244         show code directly instead of calling show_namespace.
245
246 2010-11-02  Nathan Froyd  <froydnj@codesourcery.com>
247
248         * trans-decl.c (add_argument_checking): Use build_zero_cst instead of
249         fold_convert.
250         * trans-expr.c (gfc_conv_missing_dummy, fill_with_spaces): Likewise.
251         * trans-stmt.c (gfc_trans_do): Likewise.
252
253 2010-11-02  Steven G. Kargl  < kargl@gcc.gnu.org>
254             Tobias Burnus  <burnus@net-b.de>
255
256         PR fortran/45170
257         * array.c (gfc_match_array_constructor): Reject deferred type
258         parameter (DTP) in type-spec.
259         * decl.c (char_len_param_value, match_char_length,
260         gfc_match_char_spec, build_sym, variable_decl,
261         enumerator_decl): Support DTP.
262         * expr.c (check_inquiry): Fix check due to support for DTP.
263         * gfortran.h (gfc_typespec): Add Boolean 'deferred'.
264         * misc.c (gfc_clear_ts): Set it to false.
265         * match.c (gfc_match_allocate): Support DTP.
266         * resolve.c (resolve_allocate_expr): Not-implemented error for DTP.
267         (resolve_fl_variable): Add DTP constraint check.
268         * trans-decl.c (gfc_trans_deferred_vars): Add not-implemented
269         error for DTP.
270
271 2010-11-01  Steven G. Kargl  <kargl@gcc.gnu.org>
272
273         PR fortran/46152
274         * fortran/match.c (match_derived_type_spec): Reoplace gfc_match_symbol
275         with a gfc_find_symbol to prevent namespace pollution.  Remove dead
276         code.
277         (match_type_spec): Remove parsing of '::'.  Collapse character
278         kind checking to one location.
279         (gfc_match_allocate): Use correct locus in error message.
280
281 2010-10-30  Thomas Koenig  <tkoenig@gcc.gnu.org>
282
283         * gfortran.h (gfc_option_t):  Replace dump_parse_tree by
284         dump_fortran_original and add dump_fortran_optimized.
285         * lang.opt: Add fdump-fortran-original and
286         fdump-fortran-optimized.  Document that fdump-parse-tree is
287         deprecated.
288         * gfortran.texi: Add -fdump-fortran-original and
289         -fdump-fortran-optimized.  -fdump-parse-tree is deprecated.
290         * frontend-passes.c (gfc_run_passes):  If optimizing and
291         if gfc_option.dump_fortran_optimized is set, dump the parse tree
292         after optimization.
293         * parse.c:  Rename gfc_option.dump_parse_tree to
294         gfc_option.dump_fortran_original.
295         * options.c (gfc_init_options):  Rename gfc_option.dump_parse_tree
296         to gfc_option.dump_fortran_original and handle
297         gfc_option.dump_fortran_optimize.
298         (gfc_post_options): Rename gfc_option.dump_parse_tree
299         to gfc_option.dump_fortran_original.
300         (gfc_handle_option):  Rename OPT_fdump_parse_tree to
301         OPT_fdump_fortran_original and gfc_option.dump_parse_tree
302         to gfc_option.dump_fortran_original.  Handle
303         OPT_fdump_fortran_optimized.
304
305 2010-10-30  Janus Weil  <janus@gcc.gnu.org>
306
307         PR fortran/44917
308         PR fortran/44926
309         PR fortran/46196
310         * interface.c (count_types_test): Symmetrize type check.
311         (generic_correspondence): Ditto.
312
313 2010-10-27  Janus Weil  <janus@gcc.gnu.org>
314
315         PR fortran/46161
316         * interface.c (compare_allocatable): Handle polymorphic allocatables.
317         (compare_parameter): Add two error messages for polymorphic dummies.
318
319 2010-10-26  Janus Weil  <janus@gcc.gnu.org>
320
321         PR fortran/42647
322         * trans.h (gfc_deallocate_scalar_with_status): New prototype.
323         * trans.c (gfc_deallocate_scalar_with_status): New function for
324         deallocation of allocatable scalars.
325         * trans-array.c (structure_alloc_comps): Call it here ...
326         * trans-decl.c (gfc_trans_deferred_vars): ... here ...
327         * trans-stmt.c (gfc_trans_deallocate): ... and here.
328
329 2010-10-26  Tobias Burnus  <burnus@net-b.de>
330
331         PR fortran/45451
332         * trans-stmt.c (gfc_trans_allocate): Do a deep-copy for SOURCE=.
333
334         PR fortran/43018
335         * trans-array.c (duplicate_allocatable): Use size of type and not
336         the size of the pointer to the type.
337
338 2010-10-25  Steven G. Kargl  <kargl@gcc.gnu.org>
339
340         PR fortran/46140
341         * fortran/scanner.c (include_line): Check return value of load_file.
342
343 2010-10-23  Tobias Burnus  <burnus@net-b.de>
344
345         PR fortran/46122
346         * expr.c (gfc_check_vardef_context): Fix PROTECTED check.
347
348 2010-10-21  Janus Weil  <janus@gcc.gnu.org>
349
350         PR fortran/46060
351         * match.h (gfc_matching_ptr_assignment): New global variable to indicate
352         we're currently matching a (non-proc-)pointer assignment.
353         * decl.c (match_pointer_init): Set it.
354         * match.c (gfc_match_pointer_assignment): Ditto.
355         * primary.c (matching_actual_arglist): New global variable to indicate
356         we're currently matching an actual argument list.
357         (gfc_match_actual_arglist): Set it.
358         (gfc_match_varspec): Reject procedure pointer component calls with
359         missing argument list.
360
361 2010-10-21  Janus Weil  <janus@gcc.gnu.org>
362
363         PR fortran/46067
364         * interface.c (gfc_compare_interfaces): Switch arguments of type
365         comparison (important for polymorphic variables).
366
367 2010-10-21  Tobias Burnus  <burnus@net-b.de>
368
369         PR fortran/46100
370         * expr.c (gfc_check_vardef_context): Treat pointer functions
371         as variables.
372
373 2010-10-20  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
374
375         PR fortran/46079
376         * trans_stmt.c (gfc_trans_stop): Fix whitespace.  Build a call to new
377         F08 numeric stop function.
378         * trans.h: Add declaration for gfor_fndecl_stop_numeric_f08.
379         * trans-decl.c (gfc_build_builtin_function_decls): Build declaration
380         for stop_numeric_f08.
381
382 2010-10-18  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
383
384         * gfortran.h: Remove definition of bt enumerator.
385         * libgfortran.h: Add bt enumerator type alighned with defintion.
386         Remove the dtype enumerator, no longer used.
387         previously given in libgfortran/io.h
388         * trans-types.c: Use new bt enumerator.
389         * trans-io.c: Likewise.
390
391 2010-10-16  Thomas Koenig  <tkoenig@gcc.gnu.org>
392
393         * trans-io.c (gfc_build_io_library_fndecls):
394         Array descriptor arguments to transfer_array can be
395         dereferenced recursively.
396
397 2010-10-16  Thomas Koenig  <tkoenig@gcc.gnu.org>
398
399         PR fortran/20165
400         PR fortran/31593
401         PR fortran/43665
402         * trans-io.c (enum iocall): Add IOCALL_X_INTEGER_WRITE,
403         IOCALL_X_LOGICAL_WRITE, IOCALL_X_CHARACTER_WRITE,
404         IOCALL_X_CHARACTER_WIDE_WRIE, IOCALL_X_REAL_WRITE,
405         IOCALL_X_COMPLEX_WRITE and IOCALL_X_ARRAY_WRITE.
406         (gfc_build_io_library_fndecls):  Add corresponding function
407         decls.
408         (transfer_expr):  If the current transfer is a READ, use
409         the iocall with the original version, otherwise the version
410         with _WRITE.
411         (transfer_array_desc):  Likewise.
412
413 2010-10-15  Tobias Burnus  <burnus@net-b.de>
414
415         PR fortran/45186
416         * trans.h (gfc_add_modify_loc, gfc_evaluate_now_loc): New prototypes.
417         (gfc_trans_runtime_error_vararg): Remove prototype.
418         * trans.c (gfc_add_modify_loc, gfc_evaluate_now_loc): New functions.
419         (gfc_add_modify, gfc_evaluate_now): Use them.
420         (trans_runtime_error_vararg): Renamed from
421         gfc_trans_runtime_error_vararg, made static and use locus.
422         (gfc_trans_runtime_error): Use it.
423         (gfc_trans_runtime_check): Ditto and make use of locus.
424         * trans-stmt.c (gfc_trans_if_1, gfc_trans_simple_do,
425         gfc_trans_do, gfc_trans_do_while): Improve line number
426         associated with generated expressions.
427
428 2010-10-12  Daniel Kraft  <d@domob.eu>
429
430         PR fortran/38936
431         * parse.c (parse_associate): Set typespec of associate-name if that of
432         the target is already available.
433
434 2010-10-10  Janus Weil  <janus@gcc.gnu.org>
435
436         PR fortran/45961
437         * resolve.c (resolve_typebound_function): Bugfix for type-bound
438         operators.
439
440 2010-10-09  Thomas Koenig  <tkoenig@gcc.gnu.org>
441
442         * frontend-passes.c:  Include opts.h.
443         (optimize_comparison):  Renamed from optimize_equality.
444         Change second argument to operation to be compared.
445         Use flag_finite_math_only to avoid comparing REAL and
446         COMPLEX only when NANs are honored.  Simplify comparing
447         of string concatenations where left or right operands are
448         equal.  Simplify all comparison operations, based on the result
449         of gfc_dep_compare_expr.
450         * dependency.c:  Include arith.h.
451         (gfc_are_identical_variables):  Volatile variables should not
452         compare equal to themselves.
453         (gfc_dep_compare_expr):  Handle string constants and string
454         concatenations.
455
456 2010-10-08  Joseph Myers  <joseph@codesourcery.com>
457
458         * f95-lang.c (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
459         * gfortran.h (gfc_init_options_struct): Declare.
460         * options.c (gfc_init_options_struct): New.  Split out from
461         gfc_init_options.
462
463 2010-10-07  Janus Weil  <janus@gcc.gnu.org>
464
465         PR fortran/45933
466         * resolve.c (resolve_typebound_function): Use correct declared type
467         for type-bound operators.
468
469 2010-10-07  Mikael Morin  <mikael@gcc.gnu.org>
470
471         PR fortran/45916
472         Revert revision 165026:
473         2010-10-06  Mikael Morin  <mikael@gcc.gnu.org>
474
475         * decl.c (match_procedure_in_type): Assertify if conditions.
476
477 2010-10-06  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
478
479         PR fortran/45889
480         * resolve.c (resolve_transfer): Use expression inside parenthesis to
481         find acutal component to be transgferred.
482
483 2010-10-06  Mikael Morin  <mikael@gcc.gnu.org>
484
485         * trans-stmt.c (gfc_trans_allocate): free lhs expr.
486
487 2010-10-06  Mikael Morin  <mikael@gcc.gnu.org>
488
489         * trans-array.c (gfc_free_ss_chain): Made non-static.
490         * trans-array.h (gfc_free_ss_chain): New prototype.
491         * trans-stmt.c (gfc_trans_where_2): Free ss chains.
492
493 2010-10-06  Mikael Morin  <mikael@gcc.gnu.org>
494
495         * trans-intrinsic.c (gfc_conv_intrinsic_funcall): Also free symbol's
496         subcomponents.
497
498 2010-10-06  Mikael Morin  <mikael@gcc.gnu.org>
499
500         * trans-stmt.c (gfc_trans_forall_1): Free forall struct at the end.
501
502 2010-10-06  Mikael Morin  <mikael@gcc.gnu.org>
503
504         * trans-expr.c (get_proc_ptr_comp): Restore initial expression type
505         before calling gfc_free_expr.
506
507 2010-10-06  Mikael Morin  <mikael@gcc.gnu.org>
508
509         * trans-array.c (gfc_conv_tmp_array_ref): Add factorized call to
510         gfc_advance_se_ss_chain.
511         * trans-expr.c (gfc_conv_subref_array_ref, gfc_conv_procedure_call,
512         gfc_conv_array_constructor_expr, gfc_trans_assignment_1): Remove
513         calls to gfc_advance_se_ss_chain after gfc_conv_tmp_array_ref.
514         * trans-intrinsic.c (gfc_conv_intrinsic_function): Ditto.
515         * trans-stmt.c (gfc_trans_where_assign, gfc_trans_where_3): Ditto.
516
517 2010-10-06  Mikael Morin  <mikael@gcc.gnu.org>
518
519         * trans.c (gfc_restore_backend_locus): New function.
520         (gfc_get_backend_locus): Renamed to ...
521         (gfc_save_backend_locus): ... this.
522         * trans.h (gfc_restore_backend_locus, gfc_get_backend_locus,
523         gfc_save_backend_locus): Same.
524         * trans-array.c (gfc_trans_g77_array, gfc_trans_dummy_array_bias,
525         gfc_trans_deferred_array): Rename gfc_get_backend_locus to
526         gfc_save_backend_locus.
527         (gfc_trans_dummy_array_bias): Call gfc_restore_backend_locus at the
528         end.
529         (gfc_trans_g77_array, gfc_trans_deferred_array): Use
530         gfc_restore_backend_locus instead of gfc_set_backend_locus.
531         (gfc_trans_deferred_array): Call gfc_restore_backend_locus on early
532         return.
533         * trans-decl.c (gfc_get_extern_function_decl, build_entry_thunks,
534         gfc_trans_deferred_vars):
535         Rename gfc_get_backend_locus to gfc_save_backend_locus.
536         Use gfc_restore_backend_locus insted of gfc_set_backend_locus.
537
538 2010-10-06  Mikael Morin  <mikael@gcc.gnu.org>
539
540         * trans-array.c (gfc_build_constant_array_constructor): Free array
541         spec when done.
542
543 2010-10-06  Mikael Morin  <mikael@gcc.gnu.org>
544
545         * symbol.c (gfc_copy_formal_args_ppc): Free previous formal arg list
546         before overwriting it.
547
548 2010-10-06  Mikael Morin  <mikael@gcc.gnu.org>
549
550         * array.c (gfc_match_array_spec): Don't re-initialize cleared struct.
551         * symbol.c (gen_shape_param): Ditto.
552
553 2010-10-06  Mikael Morin  <mikael@gcc.gnu.org>
554
555         * symbol.c (free_entry_list): New function.
556         (gfc_free_namespace): Free list of entries.
557
558 2010-10-06  Mikael Morin  <mikael@gcc.gnu.org>
559
560         * symbol.c (free_components): Free list of formal args and formal
561         namespace.
562
563 2010-10-06  Mikael Morin  <mikael@gcc.gnu.org>
564
565         * simplify.c (gfc_simplify_size): Clear temporary mpz int before
566         returning.
567
568 2010-10-06  Mikael Morin  <mikael@gcc.gnu.org>
569
570         * resolve.c (add_dt_to_dt_list): Remove unneeded if.
571
572 2010-10-06  Mikael Morin  <mikael@gcc.gnu.org>
573
574         * resolve.c (check_typebound_baseobject): Free local expr before
575         returning.
576
577 2010-10-06  Mikael Morin  <mikael@gcc.gnu.org>
578
579         * primary.c (gfc_match_structure_constructor): Invert the assert logic.
580
581 2010-10-06  Mikael Morin  <mikael@gcc.gnu.org>
582
583         * primary.c (gfc_free_structure_ctor_component): Also free the
584         component structure itself.
585
586 2010-10-06  Mikael Morin  <mikael@gcc.gnu.org>
587
588         * module.c (gfc_use_module): Free atom_string when done with it.
589
590 2010-10-06  Mikael Morin  <mikael@gcc.gnu.org>
591
592         * module.c (read_module): Remove useless string duplication.
593
594 2010-10-06  Mikael Morin  <mikael@gcc.gnu.org>
595
596         * gfortranspec.c (append_arg): Remove commented code.
597
598 2010-10-06  Mikael Morin  <mikael@gcc.gnu.org>
599
600         * decl.c (match_procedure_in_type): Assertify if conditions.
601
602 2010-10-06  Mikael Morin  <mikael@gcc.gnu.org>
603
604         * cpp.c (gfc_cpp_post_options): Don't create a cpp reader if
605         preprocessing is disabled.
606
607 2010-10-06  Jakub Jelinek  <jakub@redhat.com>
608
609         PR middle-end/45838
610         * f95-lang.c (ATTR_NOTHROW_LEAF_LIST, ATTR_CONST_NOTHROW_LEAF_LIST,
611         ATTR_NOTHROW_LIST, ATTR_CONST_NOTHROW_LIST): Define.
612         (gfc_define_builtin): Change last argument to int bitmask from bool,
613         control addition of TREE_NOTHROW and leaf attribute as well.
614         (DO_DEFINE_MATH_BUILTIN): Adjust callers.
615         (gfc_init_builtin_functions): Likewise.  Remove
616         ATTR_{,CONST_}NOTHROW_LIST enum.
617
618 2010-10-04  Andi Kleen <ak@linux.intel.com>
619
620         * Make-lang.in (gfortran, f951): Add + to build rule.
621
622 2010-10-04  Richard Guenther  <rguenther@suse.de>
623
624         * f95-lang.c (current_translation_unit): New global variable.
625         (gfc_create_decls): Build a translation-unit decl.
626         (pushdecl): In the global binding-level use the
627         translation-unit decl as DECL_CONTEXT.
628         * trans-decl.c (gfc_get_symbol_decl): Use DECL_FILE_SCOPE_P.
629         (build_function_decl): Likewise.  Delay setting the assembler
630         name, leave setting of DECL_CONTEXT to pushdecl.
631         (trans_function_start): Use DECL_FILE_SCOPE_P.
632         (gfc_create_module_variable): Likewise.  Remove questionable
633         asserts.
634         * trans.c (gfc_generate_module_code): Likewise.
635
636 2010-10-03  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
637
638         * cpp.c (cpp_define_builtins): Call functions from cppbuiltin.c
639         instead of duplicating code.
640         * Make-lang.in: Add dependency on cppbuiltin.h. Don't define
641         BASEVER.
642
643 2010-10-02  Janus Weil  <janus@gcc.gnu.org>
644
645         PR fortran/45748
646         * resolve.c (resolve_formal_arglist): Avoid setting default type for
647         formal arguments of intrinsic procedures.
648
649 2010-09-30  Janus Weil  <janus@gcc.gnu.org>
650
651         PR fortran/45828
652         * resolve.c (resolve_allocate_expr): Do not use
653         'gfc_has_default_initializer'.
654
655 2010-09-30  Tobias Burnus  <burnus@net-b.de>
656
657         * gfortran.tex (Fortran 2008 status): Update list of
658         implemented features.
659
660 2010-09-29  Joseph Myers  <joseph@codesourcery.com>
661
662         * lang.opt: Don't use VarExists.
663
664 2010-09-29  Joseph Myers  <joseph@codesourcery.com>
665
666         * cpp.c (cpp_define_builtins): Update names of gfc_option_t
667         members.
668         (gfc_cpp_post_options): Update names of cpp_options members.
669         (cb_cpp_error): Update names of diagnostic_context members.
670         * f95-lang.c (gfc_init_builtin_functions): Update names of
671         gfc_option_t members.
672         * gfortran.h (gfc_option_t): Rename warn_conversion and
673         flag_openmp.
674         * intrinsic.c (gfc_convert_type_warn): Update names of
675         gfc_option_t members.
676         * options.c (gfc_init_options, gfc_post_options, set_Wall,
677         gfc_handle_option): Update names of gfc_option_t members.
678         * parse.c (next_free, next_fixed): Update names of gfc_option_t
679         members.
680         * scanner.c (pedantic): Remove extern declaration.
681         (skip_free_comments, skip_fixed_comments, include_line): Update
682         names of gfc_option_t members.
683         * trans-decl.c (gfc_generate_function_code): Update names of
684         gfc_option_t members.
685
686 2010-09-28  Tobias Burnus  <burnus@net-b.de>
687
688         PR fortran/40569
689         PR fortran/40568
690         * intrinsic.c (add_functions): Make compiler_version and
691         compiler_options CLASS_INQUIRY.
692         * gfortran.h (gfc_get_option_string): New prototype.
693         * intrinsic.texi (COMPILER_VERSION, COMPILER_OPTIONS):
694         Add documentation.
695         (C_SIZEOF): Mark as inquiry function of ISO_C_BINDING.
696         (ISO_FORTRAN_ENV): Refer to COMPILER_VERSION and COMPILER_OPTIONS.
697         (ISO_C_BINDING): Refer to C_SIZEOF.
698         * options.c (gfc_get_option_string): New function.
699         * simplify.c (gfc_simplify_compiler_options): Use it.
700         (gfc_simplify_compiler_version): Include compiler name.
701
702 2010-09-28  Jan Hubicka  <jh@suse.cz>
703
704         * f95-lang.c (gfc_define_builtin): Make leaf.
705         (gfc_init_builtin_functions): Handle only ATTR_CONST_NOTHROW_LEAF_LIST
706         and ATTR_NOTHROW_LEAF_LIST.
707         (DEF_SYNC_BUILTIN): Check ATTR_CONST_NOTHROW_LEAF_LIST.
708         (DEF_GOMP_BUILTIN): Likewise.
709
710 2010-09-28  Tobias Burnus  <burnus@net-b.de>
711
712         PR fortran/45756
713         * trans-decl.c (gfc_get_symbol_decl): Use gsym for decl of
714         module parameters.
715
716 2010-09-27  Tobias Burnus  <burnus@net-b.de>
717
718         PR fortran/40569
719         PR fortran/40568
720         * intrinsic.h (gfc_simplify_compiler_options,
721         gfc_simplify_compiler_version): New prototypes.
722         * intrinsic.c (gfc_intrinsic_function_by_id,
723         make_from_module): New functions.
724         (gfc_find_function, gfc_find_subroutine, gfc_generic_intrinsic,
725         gfc_specific_intrinsic): Don't return module intrinsics.
726         (add_functions): Add compiler_options, compiler_version.
727         (gfc_intrinsic_func_interface): Also lookup symbol by ISYM ID.
728         * symbol.c (std_for_isocbinding_symbol): Add version check for
729         NAMED_FUNCTIONS.
730         * iso-fortran-env.def: Add compiler_options, compiler_version.
731         * iso-c-binding.def: Add c_sizeof.
732         * gfortran.h (gfc_intrinsic_sym): Add from_module:1.
733         (iso_c_binding_symbol, iso_fortran_env_symbol): Add NAMED_FUNCTIONS.
734         (gfc_intrinsic_function_by_id): New prototype.
735         * module.c (create_intrinsic_function): New function.
736         (import_iso_c_binding_module, use_iso_fortran_env_module): Use it.
737         * trans-types.c (init_c_interop_kinds): Add NAMED_FUNCTIONS.
738         * resolve.c (resolve_intrinsic): Try also to resolve intrinsics
739         by ISYM ID.
740         * simplify.c (gfc_simplify_compiler_options,
741         gfc_simplify_compiler_version): New functions.
742
743 2010-09-26  Daniel Kraft  <d@domob.eu>
744
745         PR fortran/45783
746         PR fortran/45795
747         * resolve.c (resolve_select_type): Clarify code.
748         (resolve_assoc_var): Only set typespec if it is currently unknown.
749
750 2010-09-26  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
751
752         PR fortran/45793
753         * module.c (create_int_parameter_array): Set the array value shape.
754
755 2010-09-25  Tobias Burnus  <burnus@net-b.de>
756
757         * gfortran.texi: Re-add accidently removed \input line.
758
759 2010-09-25  Daniel Kraft  <d@domob.eu>
760
761         PR fortran/45776
762         * gfortran.h (struct gfc_dt): New member `dt_io_kind'.
763         * io.c (resolve_tag): F2008 check for NEWUNIT and variable
764         definition checks for NEWUNIT, IOSTAT, SIZE and IOMSG.
765         (gfc_free_dt): Correctly handle freeing of `dt_io_kind' and
766         `extra_comma' with changed semantics.
767         (gfc_resolve_dt): Check variable definitions.
768         (match_io_element): Remove INTENT and PURE checks here and
769         initialize code->ext.dt member.
770         (match_io): Set dt->dt_io_kind.
771         (gfc_resolve_inquire): Check variable definition for all tags
772         except UNIT, FILE and ID.
773         * resolve.c (resolve_transfer): Variable definition check.
774
775 2010-09-25  Tobias Burnus  <burnus@net-b.de>
776
777         * interface.c (gfc_match_end_interface): Constify char pointer
778         to fix warning.
779
780 2010-09-24  Steven G. Kargl  < kargl@gcc.gnu.org>
781
782         * interface.c (gfc_match_end_interface): Deal with user defined
783         operators that overload rational operators and C1202.
784
785 2010-09-24  Tobias Burnus  <burnus@net-b.de>
786
787         * gfortran.texi: Add second space after end-of-sentence period;
788         change / to /@/ to allow hyphenation of URLs.
789         (Standards): Remove duplicated OpenMP, update wording given that
790         Fortran 2008 now released.
791         (Fortran 2008 status): Update and add list of implemented features.
792
793 2010-09-24  Tobias Burnus  <burnus@net-b.de>
794
795         PR fortran/40571
796         * iso-fortran-env.def: Add NAMED_KINDARRAY with
797         character_kinds, integer_kinds, logical_kinds and
798         real_kinds.
799         * gfortran.h: Add them to iso_fortran_env_symbol.
800         * libgfortran.h: Rename GFC_INQUIRE_INTERNAL_UNIT to
801         LIBERROR_INQUIRE_INTERNAL_UNIT and move it from
802         libgfortran_stat_codes to libgfortran_error_codes.
803         * module.c (create_int_parameter_array): New function.
804         (use_iso_fortran_env_module): Use it for
805         NAMED_KINDARRAY of iso-fortran-env.def.
806         * trans-decl.c (gfc_get_symbol_decl): Parameter
807         arrays of intrinsics modules become local static variables.
808         * intrinsic.texi (ISO_FORTRAN_ENV): Add character_kinds,
809         integer_kinds, logical_kinds and real_kinds.
810
811 2010-09-23  Thomas Koenig  <tkoenig@gcc.gnu.org>
812
813         PR fortran/45744
814         * frontend-passes.c (optimize_binop_array_assignment):
815         Only re-use lhs as intermediate storage if kind and type
816         parameters match.
817
818 2010-09-23  Mikael Morin  <mikael@gcc.gnu.org>
819
820         PR fortran/45745
821         PR fortran/45648
822         * trans-array.c (gfc_conv_expr_descriptor): Handle
823         ss->type == GFC_SS_INTRINSIC (for {l,u}bound intrinsics) case.
824
825 2010-09-23  Tobias Burnus  <burnus@net-b.de>
826
827         * intrinsic.texi (OpenMP modules): Add named constants of
828         OMP_LIB.
829
830 2010-09-23  Daniel Kraft  <d@domob.eu>
831
832         PR fortran/38936
833         PR fortran/44044
834         PR fortran/45474
835         * gfortran.h (gfc_check_vardef_context): New method.
836         (struct symbol_attribute): New flag `select_type_temporary'.
837         * primary.c (gfc_variable_attr): Clarify initialization of ref.
838         (match_variable): Remove PROTECTED check and assignment check
839         for PARAMETERs (this is now done later).
840         * match.c (gfc_match_iterator): Remove INTENT(IN) check.
841         (gfc_match_associate): Defer initialization of newAssoc->variable.
842         (gfc_match_nullify): Remove PURE definability check.
843         (select_type_set_tmp): Set new `select_type_temporary' flag.
844         * expr.c (gfc_check_assign): Remove INTENT(IN) check here.
845         (gfc_check_pointer_assign): Ditto (and other checks removed).
846         (gfc_check_vardef_context): New method.
847         * interface.c (compare_parameter_protected): Removed.
848         (compare_actual_formal): Use `gfc_check_vardef_context' for checks
849         related to INTENT([IN]OUT) arguments.
850         * intrinsic.c (check_arglist): Check INTENT for intrinsics.
851         * resolve.c (gfc_resolve_iterator): Use `gfc_check_vardef_context'.
852         (remove_last_array_ref): New method.
853         (resolve_deallocate_expr), (resolve_allocate_expr): Ditto.
854         (resolve_allocate_deallocate): Ditto (for STAT and ERRMSG).
855         (resolve_assoc_var): Remove checks for definability here.
856         (resolve_select_type): Handle resolving of code->block here.
857         (resolve_ordinary_assign): Remove PURE check.
858         (resolve_code): Do not resolve code->blocks for SELECT TYPE here.
859         Use `gfc_check_vardef_context' for assignments and pointer-assignments.
860
861 2010-08-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
862
863         * gfortran.texi (Argument list functions): Allow URL to wrap.
864         * intrinsic.texi (GETGID, GETPID, GETUID, IMAGE_INDEX)
865         (IS_IOSTAT_END, IS_IOSTAT_EOR, NUM_IMAGES, THIS_IMAGE)
866         (ISO_FORTRAN_ENV): Fix markup in index entries, and a couple of
867         code markups in the text.
868         * invoke.texi (Fortran Dialect Options)
869         (Error and Warning Options, Directory Options, Code Gen Options):
870         Likewise.  Remove @code inside @smallexample.
871
872 2010-09-22  Joseph Myers  <joseph@codesourcery.com>
873
874         * gfortranspec.c (lang_specific_driver): Handle OPT__version and
875         OPT__help instead of OPT_fversion and OPT_fhelp.
876         * lang.opt (-all-warnings, -assert, -assert=, -comments,
877         -comments-in-macros, -define-macro, -define-macro=, -dependencies,
878         -dump, -dump=, -include-barrier, -include-directory,
879         -include-directory=, -include-directory-after,
880         -include-directory-after=, -include-prefix, -include-prefix=,
881         -no-line-commands, -no-standard-includes, -output, -output=,
882         -preprocess, -print-missing-file-dependencies, -trace-includes,
883         -undefine-macro, -undefine-macro=, -user-dependencies, -verbose,
884         -write-dependencies, -write-user-dependencies): New.
885
886 2010-09-21  Jason Blevins  <jrblevin@sdf.org>
887
888         * intrinsics.texi (HYPOT, IMAGE_INDEX, BESSEL_JN, BESSEL_YN,
889         execute_command_line, IEOR, IOR, NORM2, NOT, NULL, PARITY):
890         Correct spelling.
891
892 2010-09-21  Mikael Morin  <mikael@gcc.gnu.org>
893
894         PR fortran/45648
895         * trans-array.c (gfc_conv_expr_descriptor): Calculate dim out of n and
896         info->dim.
897
898         PR fortran/45648
899         * trans-array.c (gfc_conv_expr_descriptor): Unset full if we are
900         accessing dimensions in reversed order. 
901
902         PR fortran/45648
903         * trans-array.c (gfc_conv_expr_descriptor): Special case noncopying
904         intrinsic function call. 
905
906         * trans-array.c (gfc_conv_expr_descriptor): Remove ss lookup.
907         Update asserts accordingly.
908
909         PR fortran/45648
910         * trans.h (gfc_se): New field force_tmp. 
911         * trans-expr.c (gfc_conv_procedure_call): Check for argument alias
912         and set parmse.force_tmp if some alias is found. 
913         * trans-array.c (gfc_conv_expr_descriptor): Force a temporary creation
914         if se->force_tmp is set. 
915
916 2010-09-20  Janus Weil  <janus@gcc.gnu.org>
917
918         PR fortran/45438
919         * trans-expr.c (gfc_conv_procedure_call): Fix pointer checking for
920         TBPs, PPCs and pointer/allocatable components.
921
922 2010-09-20  Paul Thomas  <pault@gcc.gnu.org>
923
924         PR fortran/45081
925         * simplify.c (is_constant_array_expr): Allow structure array
926         elements as well as constants.
927         (gfc_simplify_pack, gfc_simplify_reshape, gfc_simplify_spread,
928         gfc_simplify_transpose, gfc_simplify_unpack): Copy the derived
929         type of source to the result.
930
931 2010-09-19  Thomas Koenig  <tkoenig@gcc.gnu.org>
932
933         * frontend-passes.c (gfc_expr_walker):  Also
934         handle EXPR_SUBSTRING.
935
936 2010-09-19  Thomas Koenig  <tkoenig@gcc.gnu.org>
937
938         * frontend-passes.c (gfc_expr_walker):  Handle
939         constructors and references.
940
941 2010-09-16  Tobias Burnus  <burnus@net-b.de>
942
943         PR fortran/43665
944         * trans-types.c (create_fn_spec): New function.
945         (gfc_get_function_type): Call it.
946
947 2010-09-16  Jakub Jelinek  <jakub@redhat.com>
948
949         * gfortran.h (walk_code_fn_t, walk_expr_fn_t): New types.
950         (gfc_expr_walker, gfc_code_walker): New prototypes.
951         * frontend-passes.c (gfc_expr_walker, gfc_code_walker): New functions.
952         (WALK_SUBEXPR, WALK_SUBEXPR_TAIL, WALK_SUBCODE): Define.
953         (optimize_namespace): Use gfc_code_walker.
954         (optimize_code, optimize_expr): Rewritten as gfc_code_walker hooks.
955         (optimize_expr_0, optimize_code_node,
956         optimize_actual_arglist): Removed.
957         (optimize_assignment): Don't call optimize_expr_0.
958
959 2010-09-16  Janus Weil  <janus@gcc.gnu.org>
960
961         PR fortran/45674
962         * interface.c (compare_parameter): Create vtab for actual argument,
963         instead of formal (if needed).
964
965 2010-09-15  Janus Weil  <janus@gcc.gnu.org>
966
967         PR fortran/45577
968         * resolve.c (resolve_allocate_expr): Do default initialization via
969         EXEC_INIT_ASSIGN.
970
971 2010-09-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
972
973         * mathbuiltins.def: Do not defined huge_val built-in.
974         * trans-const.c (gfc_build_inf_or_huge): New function.
975         * trans-const.h (gfc_build_inf_or_huge): New prototype.
976         * f95-lang.c (gfc_init_builtin_functions): Don't defined
977         huge_val built-ins.
978         * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): We don't
979         have functions of type (*) (void) anymore.
980         (gfc_conv_intrinsic_minmaxloc): Call gfc_build_inf_or_huge.
981         (gfc_conv_intrinsic_nearest): Call gfc_build_inf_or_huge instead
982         of generating a call to huge_val().
983
984 2010-09-11  Mikael Morin  <mikael@gcc.gnu.org>
985
986         * gfortran.h (gfc_expr): Remove inline_noncopying_intrinsic attribute.
987         * dependency.c (gfc_check_dependency): Don't depend on
988         expr's inline_noncopying_intrinsic_attribute.
989         * dependency.c (gfc_check_argument_var_dependency,
990         gfc_check_argument_dependency): Ditto. Recursively check dependency
991         as NOT_ELEMENTAL in the non-copying (=transpose) case.
992         * trans-intrinsic.c (gfc_conv_intrinsic_function): Ditto.
993         * resolve.c (find_noncopying_intrinsics): Remove.
994         (resolve_function, resolve_call): Remove call to
995         find_noncopying_intrinsics.
996
997         * trans-array.c (gfc_conv_array_transpose): Remove.
998         (gfc_walk_subexpr): Make non-static. Move prototype...
999         * trans-array.h (gfc_walk_subexpr): ... here.
1000         * trans-intrinsic.c (gfc_conv_intrinsic_function): Update transpose
1001         handling.
1002         (walk_inline_intrinsic_transpose, walk_inline_intrinsic_function,
1003         gfc_inline_intrinsic_function_p): New.
1004         (gfc_is_intrinsic_libcall): Return early in inline intrinsic case.
1005         Remove transpose from the libcall list.
1006         (gfc_walk_intrinsic_function): Special case inline intrinsic.
1007         * trans.h (gfc_inline_intrinsic_function_p): New prototype.
1008
1009 2010-09-10  Mikael Morin  <mikael@gcc.gnu.org>
1010
1011         * trans-expr.c (expr_is_variable): New function taking non-copying
1012         intrinsic functions into account.
1013         (gfc_trans_assignment_1): Use expr_is_variable.
1014
1015 2010-09-10  Mikael Morin  <mikael@gcc.gnu.org>
1016
1017         * trans-array.c (gfc_conv_loop_setup): Access the shape along the
1018         real array dimension instead of the scalarizer (loop) dimension.
1019
1020 2010-09-10  Mikael Morin  <mikael@gcc.gnu.org>
1021
1022         * trans-array.c (gfc_conv_resolve_dependencies): Handle same-array
1023         transposed references.
1024
1025 2010-09-10  Tobias Burnus  <burnus@net-b.de>
1026
1027         PR fortran/45186
1028         * trans.h (build1_stat_loc, build2_stat_loc, build3_stat_loc,
1029         build4_stat_loc): New inline functions.
1030         (build1_loc, build2_loc, build3_loc, build4_loc): New macros.
1031         (build1_v, build2_v, build3_v, build4_v): Use input_location
1032         as locus.
1033         * trans-array.c (gfc_trans_scalarized_loop_end,
1034         gfc_conv_array_parameter): Replace build[1-4] by build[1-4]_loc.
1035         * trans.c (gfc_build_addr_expr, gfc_build_array_ref,
1036         gfc_finish_wrapped_block): Ditto.
1037         * trans-decl.c (gfc_init_default_dt, init_intent_out_dt): Ditto.
1038         * trans-expr.c (gfc_conv_missing_dummy,
1039         gfc_trans_alloc_subarray_assign, gfc_trans_zero_assign): Ditto.
1040         * trans-openmp.c (gfc_omp_clause_default_ctor,
1041         gfc_trans_omp_critical, gfc_trans_omp_parallel,
1042         gfc_trans_omp_parallel_do, gfc_trans_omp_parallel_sections,
1043         gfc_trans_omp_parallel_workshare, gfc_trans_omp_sections
1044         gfc_trans_omp_single, gfc_trans_omp_task,
1045         gfc_trans_omp_workshare): Ditto.
1046
1047 2010-09-09  Steven G. Kargl  <kargl@gcc.gnu.org>
1048
1049         * fortran/expr.c (check_inquiry): OPTIONAL attribute is not allowed
1050         for dummy argument that appears in a specification statement.
1051
1052 2010-09-09  Mikael Morin  <mikael@gcc.gnu.org>
1053
1054         * trans-array.c (gfc_get_array_ref_dim): New function.
1055         (gfc_trans_create_temp_array): Reconstruct array
1056         bounds from loop bounds. Use array bounds instead of loop bounds.
1057
1058 2010-09-09  Mikael Morin  <mikael@gcc.gnu.org>
1059
1060         * trans-array.c (gfc_set_loop_bounds_from_array_spec):
1061         Get the array dimension from the dim array.
1062
1063 2010-09-09  Mikael Morin  <mikael@gcc.gnu.org>
1064
1065         * trans-array.c (gfc_trans_preloop_setup): Unconditionally use the
1066         dim array to get the stride in the innermost loop.
1067
1068 2010-09-09  Mikael Morin  <mikael@gcc.gnu.org>
1069
1070         * trans-array.c (gfc_trans_create_temp_array): Don't set dim array.
1071         (gfc_conv_loop_setup, gfc_walk_function_expr): Set dim array.
1072         * trans-intrinsic.c (gfc_walk_intrinsic_libfunc): Ditto.
1073
1074 2010-09-09  Mikael Morin  <mikael@gcc.gnu.org>
1075
1076         * trans-array.c (gfc_trans_create_temp_array): Assert loop dimension
1077         and info dimension are the same. Loop over loop dimension.
1078         * trans-stmt.c (gfc_conv_elemental_dependencies): Set loop dimension
1079
1080 2010-09-09  Mikael Morin  <mikael@gcc.gnu.org>
1081
1082         * trans-array.c (gfc_conv_array_transpose): Change generated descriptor
1083         name
1084
1085 2010-09-09  Tobias Burnus  <burnus@net-b.de>
1086
1087         PR fortran/43665
1088         * intrincic.texi (FGET, FGETC, FPUT, FPUTC, FSTAT, GETCWD, KILL,
1089         STAT): Show also syntax for the function version.
1090         * intrinsic.c (add_sym_1s_intent, add_sym_2s_intent,
1091          add_sym_3s_intent): Remove function.
1092         (add_sym_1s, add_sym_2s, add_sym_3s): Take always the intent
1093         as argument.
1094         (add_sym_2_intent): New function.
1095         (add_functions): Set intent for functions which modify
1096         the argument: fstat, fgetc, fget, hostnm, lstat, stat. Change
1097         argument name of hostnm from "a" to "c"
1098         (add_subroutines): Change add_sym_*s_intent to
1099         add_sym_*s and add intent to the add_sym_*s calls.
1100
1101 2010-09-08  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1102
1103         PR fortran/38282
1104         * intrinsic.c (add_functions): Add B{G,L}{E,T}, DSHIFT{L,R},
1105         MASK{L,R}, MERGE_BITS and SHIFT{A,L,R}.
1106         * gfortran.h: Define ISYM values for above intrinsics.
1107         * intrinsic.h (gfc_check_bge_bgt_ble_blt, gfc_check_dshift,
1108         gfc_check_mask, gfc_check_merge_bits, gfc_check_shift,
1109         gfc_simplify_bge, gfc_simplify_bgt, gfc_simplify_ble,
1110         gfc_simplify_blt, gfc_simplify_dshiftl, gfc_simplify_dshiftr,
1111         gfc_simplify_lshift, gfc_simplify_maskl, gfc_simplify_maskr,
1112         gfc_simplify_merge_bits, gfc_simplify_rshift,
1113         gfc_simplify_shifta, gfc_simplify_shiftl, gfc_simplify_shiftr,
1114         gfc_resolve_dshift, gfc_resolve_mask, gfc_resolve_merge_bits,
1115         gfc_resolve_shift): New prototypes.
1116         * iresolve.c (gfc_resolve_dshift, gfc_resolve_mask,
1117         gfc_resolve_merge_bits, gfc_resolve_shift): New functions.
1118         * check.c (gfc_check_bge_bgt_ble_blt, gfc_check_dshift,
1119         gfc_check_mask, gfc_check_merge_bits, gfc_check_shift): New
1120         functions.
1121         * trans-intrinsic.c (gfc_conv_intrinsic_dshift,
1122         gfc_conv_intrinsic_bitcomp, gfc_conv_intrinsic_shift,
1123         gfc_conv_intrinsic_merge_bits, gfc_conv_intrinsic_mask): New
1124         functions.
1125         (gfc_conv_intrinsic_function): Call above static functions.
1126         * intrinsic.texi: Document new intrinsics.
1127         * simplify.c (gfc_simplify_bge, gfc_simplify_bgt, gfc_simplify_ble,
1128         gfc_simplify_blt, gfc_simplify_dshiftl, gfc_simplify_dshiftr,
1129         gfc_simplify_lshift, gfc_simplify_maskl, gfc_simplify_maskr,
1130         gfc_simplify_merge_bits, gfc_simplify_rshift, 
1131         gfc_simplify_shifta, gfc_simplify_shiftl, gfc_simplify_shiftr):
1132         New functions.
1133
1134 2010-09-08  Jakub Jelinek  <jakub@redhat.com>
1135
1136         * frontend-passes.c (optimize_code_node): Walk block chain by default.
1137
1138         PR fortran/45597
1139         * trans-openmp.c (gfc_trans_omp_do): Store exit/cycle labels on code
1140         instead of code->block.
1141
1142         PR fortran/45595
1143         * openmp.c (resolve_omp_do): Report not enough do loops for
1144         collapse even if block->next is NULL.
1145
1146 2010-09-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
1147
1148         PR fortran/45576
1149         * dependency.c (gfc_deb_compare_expr):  Take missing optional
1150         arguments into account.
1151
1152 2010-09-08  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1153
1154         * trans.h (gfor_fndecl_clz128, gfor_fndecl_ctz128): Remove.
1155         * trans-decl.c (gfor_fndecl_clz128, gfor_fndecl_ctz128): Remove.
1156         (gfc_build_intrinsic_function_decls): Don't build the
1157         gfor_fndecl_clz128 and gfor_fndecl_ctz128.
1158         * trans-intrinsic.c (gfc_conv_intrinsic_leadz,
1159         gfc_conv_intrinsic_trailz): Generate inline arithmetic instead
1160         of calling clz128/ctz128 library functions.
1161
1162 2010-09-07  Jan Hubicka  <jh@suse.cz>
1163
1164         * trans-expr.c (gfc_conv_initializer): Set STATIC flags for
1165         initializers.
1166
1167 2010-09-07  Tobias Burnus <burnus@net-b.de>
1168         
1169         PR fortran/45583
1170         * intrinsic.texi (COS): Remove superfluous "n".
1171
1172 2010-09-07  Tobias Burnus <burnus@net-b.de>
1173
1174         PR fortran/45186
1175         * trans-array.c (gfc_conv_descriptor_data_get,
1176         gfc_conv_descriptor_data_set, gfc_conv_descriptor_data_addr,
1177         gfc_conv_descriptor_offset, gfc_conv_descriptor_dtype,
1178         gfc_conv_descriptor_dimension, gfc_conv_descriptor_stride,
1179         gfc_conv_descriptor_lbound, gfc_conv_descriptor_ubound,
1180         gfc_conv_shift_descriptor_lbound,
1181         gfc_set_loop_bounds_from_array_spec,
1182         gfc_trans_allocate_array_storage, gfc_trans_create_temp_array,
1183         gfc_conv_array_transpose, gfc_get_iteration_count,
1184         gfc_grow_array, gfc_trans_array_ctor_element,
1185         gfc_trans_array_constructor_subarray,
1186         gfc_trans_array_constructor_value,
1187         constant_array_constructor_loop_size, gfc_trans_array_constructor,
1188         gfc_set_vector_loop_bounds, gfc_trans_array_bound_check,
1189         gfc_conv_array_index_offset, gfc_conv_scalarized_array_ref,
1190         gfc_conv_array_ref, gfc_trans_preloop_setup,
1191         gfc_trans_scalarized_loop_end, gfc_conv_ss_startstride,
1192         gfc_conv_loop_setup, gfc_conv_array_extent_dim,
1193         gfc_conv_descriptor_size, gfc_array_init_size,
1194         gfc_array_allocate, gfc_array_deallocate,
1195         gfc_trans_array_bounds, gfc_trans_auto_array_allocation,
1196         gfc_trans_dummy_array_bias, gfc_get_dataptr_offset,
1197         get_array_charlen, gfc_conv_expr_descriptor,
1198         array_parameter_size, gfc_conv_array_parameter,
1199         gfc_trans_dealloc_allocated, get_full_array_size,
1200         duplicate_allocatable,
1201         structure_alloc_comps): Change fold_build[0-9] to
1202         fold_build[0-9]_loc.
1203         (duplicate_allocatable, structure_alloc_comps,
1204         gfc_duplicate_allocatable): Add space after function name.
1205
1206 2010-09-07  Mikael Morin  <mikael@gcc.gnu.org>
1207
1208         * trans-stmt.c (gfc_trans_character_select): Be conversion-safe while
1209         checking string length value.
1210         * trans-intrinsic.c (gfc_conv_intrinsic_char): Build integer using
1211         gfc_charlen_type_node type.
1212
1213         PR fortran/45564
1214         * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Convert string
1215         length to gfc_charlen_type_node.
1216
1217 2010-09-06  Thomas Koenig  <tkoenig@gcc.gnu.org>
1218
1219         PR fortran/36931
1220         * frontend-passes.c (optimize_binop_array_assignment):  New
1221         function.
1222         (optimize_assignment):  Call it.
1223
1224 2010-09-06  Thomas Koenig  <tkoenig@gcc.gnu.org>
1225
1226         PR fortran/34145
1227         * trans-expr.c (gfc_conv_substring):  If start and end
1228         of the string reference are equal, set the length to one.
1229
1230 2010-09-06  Tobias Burnus  <burnus@net-b.de>
1231
1232         PR fortran/45560
1233         * dump-parse-tree.c (gfc_debug_expr): Use stderr instead of stdout.
1234
1235 2010-09-06  Tobias Burnus  <burnus@net-b.de>
1236
1237         PR fortran/45560
1238         * dump-parse-tree.c (gfc_debug_expr): New function.
1239
1240 2010-09-06  Tobias Burnus  <burnus@net-b.de>
1241
1242         PR fortran/38282
1243         * intrinsic.c (add_functions): Support IALL, IANY, IPARITY.
1244         (check_specific): Special case for those intrinsics.
1245         * gfortran.h (gfc_isym_id): Add new intrinsics
1246         * intrinsic.h (gfc_check_transf_bit_intrins,
1247         gfc_simplify_iall, gfc_simplify_iany, gfc_simplify_iparity,
1248         gfc_resolve_iall, gfc_resolve_iany, gfc_resolve_iparity):
1249         New prototypes.
1250         * iresolve.c (gfc_resolve_iall, gfc_resolve_iany,
1251         gfc_resolve_iparity, resolve_transformational): New functions.
1252         (gfc_resolve_product, gfc_resolve_sum,
1253         gfc_resolve_parity): Use resolve_transformational.
1254         * check.c (gfc_check_transf_bit_intrins): New function.
1255         * simplify.c (gfc_simplify_iall, gfc_simplify_iany,
1256         gfc_simplify_iparity, do_bit_any, do_bit_ior,
1257         do_bit_xor, simplify_transformation): New functions.
1258         (gfc_simplify_all, gfc_simplify_any, gfc_simplify_parity,
1259         gfc_simplify_sum, gfc_simplify_product): Use simplify_transformation.
1260         * trans-intrinsic.c (gfc_conv_intrinsic_arith,
1261         gfc_conv_intrinsic_function, gfc_is_intrinsic_libcall):
1262         Handle IALL, IANY and IPARITY intrinsics.       
1263         * intrinsic.texi (IMAGE_INDEX): Move up to fix alphabetic
1264         order.
1265         (IALL, IANY, IPARITY): Document new intrinsics.
1266
1267 2010-09-05  Tobias Burnus <burnus@net-b.de>
1268
1269         PR fortran/45186
1270         * f95-lang.c (gfc_truthvalue_conversion): Use
1271         fold_build[0-9]_loc instead of fold_build[0-9].
1272         * convert.c (convert): Ditto.
1273         * trans-intrinsic.c (gfc_conv_intrinsic_conversion,
1274         build_fixbound_expr, build_fix_expr, gfc_conv_intrinsic_aint,
1275         gfc_conv_intrinsic_int, gfc_conv_intrinsic_imagpart,
1276         gfc_conv_intrinsic_conjg, gfc_trans_same_strlen_check,
1277         gfc_conv_intrinsic_bound, gfc_conv_intrinsic_abs,
1278         gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_mod,
1279         gfc_conv_intrinsic_dim, gfc_conv_intrinsic_sign,
1280         gfc_conv_intrinsic_dprod, gfc_conv_intrinsic_char,
1281         gfc_conv_intrinsic_ctime, gfc_conv_intrinsic_fdate,
1282         gfc_conv_intrinsic_ttynam, gfc_conv_intrinsic_minmax,
1283         gfc_conv_intrinsic_minmax_char, gfc_conv_intrinsic_anyall,
1284         gfc_conv_intrinsic_count, gfc_conv_intrinsic_arith,
1285         gfc_conv_intrinsic_dot_product, gfc_conv_intrinsic_minmaxloc,
1286         gfc_conv_intrinsic_minmaxval, gfc_conv_intrinsic_btest,
1287         gfc_conv_intrinsic_bitop, gfc_conv_intrinsic_not,
1288         gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ibits,
1289         gfc_conv_intrinsic_rlshift, gfc_conv_intrinsic_ishft,
1290         gfc_conv_intrinsic_ishftc, gfc_conv_intrinsic_leadz,
1291         gfc_conv_intrinsic_trailz, gfc_conv_intrinsic_popcnt_poppar,
1292         gfc_conv_intrinsic_ichar, gfc_conv_has_intvalue,
1293         gfc_conv_intrinsic_merge, gfc_conv_intrinsic_spacing,
1294         gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_size,
1295         size_of_string_in_bytes, gfc_conv_intrinsic_sizeof,
1296         gfc_conv_intrinsic_storage_size, gfc_conv_intrinsic_strcmp,
1297         gfc_conv_intrinsic_transfer, gfc_conv_allocated,
1298         gfc_conv_associated, gfc_conv_same_type_as,
1299         gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat): Ditto.
1300
1301 2010-09-04  Tobias Burnus  <burnus@net-b.de>
1302
1303         PR fortran/45530
1304         * resolve.c (resolve_fl_namelist): Change constraint checking
1305         order to prevent endless loop.
1306
1307 2010-09-04  Janus Weil  <janus@gcc.gnu.org>
1308
1309         PR fortran/45507
1310         * resolve.c (resolve_allocate_expr): Generate default initializers
1311         already at this point, resolve them and put them into expr3, ...
1312         * trans-stmt.c (gfc_trans_allocate): ... instead of waiting until
1313         translation stage.
1314
1315 2010-09-03  Tobias Burnus  <burnus@net-b.de>
1316
1317         PR fortran/45186
1318         * trans-intrinsic.c (gfc_conv_intrinsic_sign,
1319         gfc_conv_intrinsic_leadz): Use build_call_expr_loc instead
1320         of build_call_expr.
1321         * trans-expr.c (gfc_conv_expr_present, gfc_conv_missing_dummy,
1322         gfc_conv_string_length, gfc_conv_substring,
1323         gfc_conv_component_ref, gfc_conv_unary_op, gfc_conv_powi,
1324         gfc_conv_cst_int_power, gfc_conv_string_tmp, gfc_conv_concat_op,
1325         gfc_conv_expr_op, gfc_build_compare_string,
1326         gfc_set_interface_mapping_bounds, gfc_conv_subref_array_arg,
1327         gfc_conv_derived_to_class, conv_isocbinding_procedure,
1328         gfc_conv_procedure_call, fill_with_spaces,
1329         gfc_trans_string_copy, gfc_trans_alloc_subarray_assign,
1330         gfc_trans_structure_assign, gfc_trans_pointer_assignment,
1331         gfc_trans_scalar_assign, gfc_trans_zero_assign,
1332         gfc_trans_array_copy, gfc_trans_array_constructor_copy): Change
1333         fold_build[0-9] to fold_build[0-9]_loc.
1334         * trans-io.c (set_parameter_const, set_parameter_value,
1335         set_parameter_ref, gfc_convert_array_to_string, set_string,
1336         set_internal_unit, io_result, set_error_locus,
1337         nml_get_addr_expr, build_dt): Ditto.
1338         * trans-openmp.c (gfc_omp_clause_default_ctor,
1339         gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op,
1340         gfc_trans_omp_array_reduction, gfc_trans_omp_atomic,
1341         gfc_trans_omp_do): Ditto.
1342         * trans.c (gfc_add_modify, gfc_build_addr_expr,
1343         gfc_build_array_ref, gfc_trans_runtime_error_vararg,
1344         gfc_trans_runtime_check, gfc_call_malloc,
1345         gfc_allocate_with_status, gfc_allocate_array_with_status,
1346         gfc_call_free, gfc_deallocate_with_status,
1347         gfc_call_realloc): Ditto.
1348
1349 2010-09-03  Thomas Koenig  <tkoenig@gcc.gnu.org>
1350
1351         PR fortran/45159
1352         * dependency.c (gfc_deb_compare_expr):  Compare equal for equal
1353         arglists for pure user functions, or for those intrinsic
1354         functions which are also pure.
1355         * intrinsics.c (add_conv):  Mark conversion functions as pure.
1356         (add_char_conversions):  Likewise.
1357
1358 2010-09-03  Daniel Kraft  <d@domob.eu>
1359
1360         PR fortran/34162
1361         * resolve.c (resolve_actual_arglist): Allow internal procedure
1362         as actual argument with Fortran 2008.
1363
1364 2010-09-03  Daniel Kraft  <d@domob.eu>
1365
1366         PR fortran/44602
1367         * gfortran.h (struct gfc_code): Renamed `whichloop' to
1368         `which_construct' as this is no longer restricted to loops.
1369         * parse.h (struct gfc_state_data): New field `construct'.
1370         * match.c (match_exit_cycle): Handle EXIT from non-loops.
1371         * parse.c (push_state): Set `construct' field.
1372         * resolve.c (resolve_select_type): Extend comment.
1373         * trans-stmt.c (gfc_trans_if): Add exit label.
1374         (gfc_trans_block_construct), (gfc_trans_select): Ditto.
1375         (gfc_trans_simple_do): Store exit/cycle labels on the gfc_code itself.
1376         (gfc_trans_do), (gfc_trans_do_while): Ditto.
1377         (gfc_trans_exit): Use new name `which_construct' instead of `whichloop'.
1378         (gfc_trans_cycle): Ditto.
1379         (gfc_trans_if_1): Use fold_build3_loc instead of fold_build3.
1380
1381 2010-09-03  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1382
1383         * trans-intrinsic.c (gfc_conv_intrinsic_aint): Fix whitespace.
1384         (gfc_conv_intrinsic_ishft): Only evaluate arguments once.
1385         (gfc_conv_intrinsic_ishftc): Only evaluate arguments once.
1386         * intrinsic.texi (RSHIFT): Fix documentation.
1387
1388 2010-09-02  Tobias Burnus  <burnus@net-b.de>
1389
1390         PR fortran/45186
1391         * trans-common.c (create_common): Change build[0-9] to
1392         build[0-9]_loc.
1393         * trans-const.c (gfc_conv_constant_to_tree,
1394         gfc_conv_constant_to_tree): Ditto.
1395         * trans-decl.c (gfc_build_qualified_array, build_entry_thunks,
1396         gfc_get_fake_result_decl, gfc_trans_auto_character_variable,
1397         add_argument_checking, create_main_function,
1398         gfc_generate_return): Ditto.
1399         * trans-types.c (gfc_get_dtype, gfc_get_array_type_bounds): Ditto.
1400         * trans-stmt.c (allocate_temp_for_forall_nest_1,
1401         compute_inner_temp_size, compute_overall_iter_number,
1402         generate_loop_for_rhs_to_temp, generate_loop_for_temp_to_lhs,
1403         gfc_conv_elemental_dependencies, gfc_do_allocate,
1404         gfc_evaluate_where_mask, gfc_trans_allocate,
1405         gfc_trans_arithmetic_if, gfc_trans_call,
1406         gfc_trans_character_select, gfc_trans_deallocate,
1407         gfc_trans_do, gfc_trans_do_while, gfc_trans_forall_1,
1408         gfc_trans_forall_loop, gfc_trans_goto, gfc_trans_if_1,
1409         gfc_trans_integer_select, gfc_trans_logical_select,
1410         gfc_trans_pointer_assign_need_temp, gfc_trans_return,
1411         gfc_trans_simple_do, gfc_trans_sync, gfc_trans_where_2,
1412         gfc_trans_where_assign) Ditto.
1413
1414 2010-09-02  Janus Weil  <janus@gcc.gnu.org>
1415
1416         PR fortran/44541
1417         * resolve.c (resolve_symbol): Correct check for attributes of CLASS
1418         variable.
1419
1420 2010-09-02  Tobias Burnus  <burnus@net-b.de>
1421
1422         PR fortran/45489
1423         * resolve.c (apply_default_init): Mark symbol as referenced,
1424         if it is initialized.
1425         (resolve_symbol): Change intialized check for BT_DERIVED such
1426         that also function results get initialized; remove now obsolete
1427         gfc_set_sym_referenced for BT_CLASS.
1428
1429 2010-09-01  Janus Weil  <janus@gcc.gnu.org>
1430
1431         PR fortran/44541
1432         * class.c (gfc_find_derived_vtab): Add component '$def_init'.
1433         * resolve.c (resolve_allocate_expr): Defer handling of default
1434         initialization to 'gfc_trans_allocate'.
1435         (apply_default_init,resolve_symbol): Handle polymorphic dummies.
1436         (resolve_fl_derived): Suppress error messages for vtypes.
1437         * trans-stmt.c (gfc_trans_allocate): Handle initialization via
1438         polymorphic MOLD expression.
1439         * trans-expr.c (gfc_trans_class_init_assign): Now only used for
1440         dummy initialization.
1441
1442 2010-09-01  Tobias Burnus  <burnus@net-b.de>
1443
1444         * gfortran.texi (preprocessing): Update URL to COCO.
1445
1446 2010-09-01  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1447
1448         * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Resize
1449         array quad_decls. Remove unnecessary assignment.
1450
1451 2010-09-01  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1452
1453         * trans-expr.c (gfc_conv_power_op): Handle floating-point types
1454         other than long double.
1455         * mathbuiltins.def: Add builtins from the POW and CPOW family.
1456         * trans.h (gfc_builtin_decl_for_float_kind): New prototype.
1457         * trans-intrinsic.c (gfc_builtin_decl_for_float_kind): Add gfc_
1458         prefix to function name.
1459         (gfc_build_intrinsic_lib_fndecls): Add cpow prototype.
1460         (gfc_conv_intrinsic_aint): Use gfc_builtin_decl_for_float_kind
1461         function name.
1462         (gfc_conv_intrinsic_exponent): Likewise.
1463         (gfc_conv_intrinsic_abs): Likewise.
1464         (gfc_conv_intrinsic_mod): Likewise.
1465         (gfc_conv_intrinsic_sign): Likewise.
1466         (gfc_conv_intrinsic_arith): Likewise.
1467         (gfc_conv_intrinsic_fraction): Likewise.
1468         (gfc_conv_intrinsic_nearest): Likewise.
1469         (gfc_conv_intrinsic_spacing): Likewise.
1470         (gfc_conv_intrinsic_rrspacing): Likewise.
1471         (gfc_conv_intrinsic_scale): Likewise.
1472         (gfc_conv_intrinsic_set_exponent): Likewise.
1473
1474 2010-09-01  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1475
1476         * intrinsic.c: Add EXECUTE_COMMAND_LINE intrinsic.
1477         * intrinsic.h (gfc_resolve_execute_command_line): New function.
1478         * iresolve.c (gfc_resolve_execute_command_line): New function.
1479         * gfortran.h (GFC_ISYM_EXECUTE_COMMAND_LINE): New value.
1480         * intrinsic.texi: Document EXECUTE_COMMAND_LINE.
1481
1482 2010-08-31  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1483
1484         PR fortran/38282
1485         * f95-lang.c (gfc_init_builtin_functions): Define popcount{,l,ll}
1486         and parity{,l,ll} builtins.
1487         * trans-intrinsic.c (gfc_conv_intrinsic_popcnt_poppar): New function.
1488         (gfc_conv_intrinsic_function): Call above new functions.
1489         * simplify.c (gfc_simplify_popcnt, gfc_simplify_poppar): New
1490         functions.
1491         * intrinsic.texi: Document POPCNT and POPPAR.
1492
1493 2010-08-30  Janus Weil  <janus@gcc.gnu.org>
1494
1495         PR fortran/45456
1496         * resolve.c (resolve_structure_cons): Handle pointer-valued PPCs.
1497
1498 2010-08-30  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1499
1500         * Make-lang.in: Add frontend-passes.o dependencies.
1501
1502 2010-08-29  Janus Weil  <janus@gcc.gnu.org>
1503
1504         PR fortran/42769
1505         * resolve.c (resolve_structure_cons): For derived types, make sure the
1506         type has been resolved.
1507         (resolve_typebound_procedures): Make sure the vtab has been generated.
1508
1509 2010-08-29  Janus Weil  <janus@gcc.gnu.org>
1510
1511         PR fortran/45439
1512         * match.c (gfc_match_select_type): Give the associate-name the
1513         FL_VARIABLE attribute.
1514
1515 2010-08-28  Steven G. Kargl  <kargl@gcc.gnu.org>
1516
1517         * simplify.c (gfc_simplify_bessel_n2): Fix indention
1518         and argument type.
1519
1520 2010-08-28  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1521
1522         PR fortran/45436
1523         * trans-types.c (gfc_init_kinds): Disable TFmode.
1524
1525 2010-08-27  Janus Weil  <janus@gcc.gnu.org>
1526
1527         PR fortran/45432
1528         * match.c (gfc_match_allocate): Avoid double free on error.
1529
1530 2010-08-27  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1531
1532         PR fortran/32049
1533         * gfortran.h (gfc_real_info): Add c_float128 field.
1534         * mathbuiltins.def: Indicate which builtins are const.
1535         * trans-types.h (float128_type_node, complex_float128_type_node,
1536         gfc_real16_is_float128): New variables.
1537         * trans-types.c (float128_type_node, complex_float128_type_node,
1538         gfc_real16_is_float128): New variables.
1539         (gfc_init_kinds): Allow TFmode.
1540         (gfc_build_real_type): Mark __float128 types as such.
1541         (gfc_init_types): Initialize float128_type_node and
1542         complex_float128_type_node
1543         * f95-lang.c (gfc_init_builtin_functions): Adjust for new
1544         argument of OTHER_BUILTIN macro.
1545         * trans-intrinsic.c (gfc_intrinsic_map_t): Likewise.
1546         (builtin_decl_for_precision): Special case for __float128.
1547         (builtin_decl_for_float_kind): Likewise.
1548         (define_quad_builtin): New function.
1549         (gfc_build_intrinsic_lib_fndecls): Create all __float128
1550         library decls if necessary. Store them in the real16_decl and
1551         complex16_decl builtin map fields.
1552         (gfc_get_intrinsic_lib_fndecl): Handle q-suffixed __float128
1553         library function names.
1554
1555 2010-08-27  Tobias Burnus  <burnus@net-b.de>
1556
1557         PR fortran/33197
1558         * gcc/fortran/intrinsic.c (add_functions): Add norm2 and parity.
1559         * gcc/fortran/intrinsic.h (gfc_check_norm2, gfc_check_parity):
1560         gfc_simplify_norm2, gfc_simplify_parity, gfc_resolve_norm2,
1561         gfc_resolve_parity): New prototypes.
1562         * gcc/fortran/gfortran.h (gfc_isym_id): New enum items
1563         GFC_ISYM_NORM2 and GFC_ISYM_PARITY.
1564         * gcc/fortran/iresolve.c (gfc_resolve_norm2,
1565         gfc_resolve_parity): New functions.
1566         * gcc/fortran/check.c (gfc_check_norm2, gfc_check_parity):
1567         New functions.
1568         * gcc/fortran/trans-intrinsic.c (gfc_conv_intrinsic_arith,
1569         gfc_conv_intrinsic_function): Handle NORM2 and PARITY.
1570         * gcc/fortran/intrinsic.texi (NORM2, PARITY): Add.
1571         * gcc/fortran/simplify.c (simplify_transformation_to_array):
1572         Add post-processing opterator.
1573         (gfc_simplify_all, gfc_simplify_any, gfc_simplify_count,
1574         gfc_simplify_product, gfc_simplify_sum): Update call.
1575         (add_squared, do_sqrt, gfc_simplify_norm2, do_xor,
1576         gfc_simplify_parity): New functions.
1577
1578 2010-08-27  Janus Weil  <janus@gcc.gnu.org>
1579
1580         PR fortran/45420
1581         * match.c (select_type_set_tmp): Add the possibility to reset the
1582         temporary to NULL.
1583         (gfc_match_class_is): Reset the temporary in CLASS DEFAULT clauses.
1584
1585 2010-08-27  Thomas Koenig  <tkoenig@gcc.gnu.org>
1586
1587         PR fortran/45159
1588         * dependency.c (check_section_vs_section):  Single test for
1589         identical strides which takes into account that only one
1590         of the strides may be NULL.
1591
1592 2010-08-27  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1593
1594         PR fortran/43217
1595         * primary.c (match_hollerith_constant): Calculate padding needed to
1596         fill default integer and allocate string for that size.  Set pad bytes
1597         to ' '.
1598         * gfortran.h: Add hollerith pad value to type spec union.
1599         * data.c (create_character_initializer): Fix spelling of function name.
1600         Use hollerith pad value to calculate length.
1601         * arith.c (hollerith2representation); Use hollerith pad value to
1602         calculate length.
1603
1604 2010-08-26  Daniel Kraft  <d@domob.eu>
1605
1606         PR fortran/38936
1607         PR fortran/44047
1608         PR fortran/45384
1609         * gfortran.h (struct gfc_association_list): New flag `dangling'.
1610         (gfc_build_block_ns): Declared here...
1611         * parse.h (gfc_build_block_ns): ...instead of here.
1612         * trans.h (gfc_process_block_locals): Expect additionally the
1613         gfc_association_list of BLOCK (if present).
1614         * match.c (select_type_set_tmp): Create sym->assoc for temporary.
1615         * resolve.c (resolve_variable): Only check for invalid *array*
1616         references on associate-names.
1617         (resolve_assoc_var): New method with code previously in resolve_symbol.
1618         (resolve_select_type): Use association to give the selector and
1619         temporaries their values instead of ordinary assignment.
1620         (resolve_fl_var_and_proc): Allow CLASS associate-names.
1621         (resolve_symbol): Use new `resolve_assoc_var' instead of inlining here.
1622         * trans-stmt.c (gfc_trans_block_construct): Pass association-list
1623         to `gfc_process_block_locals' to match new interface.
1624         * trans-decl.c (gfc_get_symbol_decl): Don't defer associate-names
1625         here automatically.
1626         (gfc_process_block_locals): Defer them rather here when linked to
1627         from the BLOCK's association list.
1628
1629 2010-08-25  Jakub Jelinek  <jakub@redhat.com>
1630
1631         * trans-decl.c (gfc_build_intrinsic_function_decls): Set
1632         TREE_NOTHROW on fndecls that can't throw.  Set
1633         TREE_READONLY on gfor_fndecl_math_ishftc{4,8,16}.
1634         (gfc_build_builtin_function_decls): Set TREE_NOTHROW on
1635         gfor_fndecl_associated.
1636
1637 2010-08-23  Mikael Morin  <mikael@gcc.gnu.org>
1638
1639         PR fortran/45380
1640         * frontend-passes.c (optimize_equality): Don't optimize array equality
1641
1642 2010-08-23  Janus Weil  <janus@gcc.gnu.org>
1643
1644         PR fortran/45366
1645         * resolve.c (resolve_procedure_interface): New function split off from
1646         'resolve_symbol'.
1647         (resolve_formal_arglist): Call it here ...
1648         (resolve_symbol): ... and here.
1649
1650 2010-08-22  Joseph Myers  <joseph@codesourcery.com>
1651
1652         * Make-lang.in (gfortranspec.o): Update dependencies.
1653         * gfortranspec.c: Include coretypes.h before gcc.h.  Include
1654         opts.h.
1655         (MATH_LIBRARY, FORTRAN_LIBRARY): Remove initial "-l".
1656         (ADD_ARG_LIBGFORTRAN, Option, lookup_option): Remove.
1657         (g77_xargc): Make unsigned.
1658         (g77_xargv): Change to g77_x_decoded_options.
1659         (g77_newargc): Make unsigned.
1660         (g77_newargv): Change to g77_new_decoded_options.
1661         (strings_same, options_same): New.
1662         (append_arg): Use cl_decoded_option structures.
1663         (append_option): New.
1664         (add_arg_libgfortran): New.
1665         (lang_specific_driver): Use cl_decoded_option structures.
1666
1667 2010-08-21  Janus Weil  <janus@gcc.gnu.org>
1668
1669         PR fortran/45271
1670         PR fortran/45290
1671         * class.c (add_proc_comp): Add static initializer for PPCs.
1672         (add_procs_to_declared_vtab): Modified comment.
1673         * module.c (mio_component): Add argument 'vtype'. Don't read/write the
1674         initializer if the component is part of a vtype.
1675         (mio_component_list): Add argument 'vtype', pass it on to
1676         'mio_component'.
1677         (mio_symbol): Modified call to 'mio_component_list'.
1678         * trans.h (gfc_conv_initializer): Modified prototype.
1679         (gfc_trans_assign_vtab_procs): Removed.
1680         * trans-common.c (create_common): Modified call to
1681         'gfc_conv_initializer'.
1682         * trans-decl.c (gfc_get_symbol_decl,get_proc_pointer_decl,
1683         gfc_emit_parameter_debug_info): Modified call to
1684         'gfc_conv_initializer'.
1685         (build_function_decl): Remove assertion.
1686         * trans-expr.c (gfc_conv_derived_to_class,gfc_trans_class_assign):
1687         Removed call to 'gfc_trans_assign_vtab_procs'.
1688         (gfc_conv_initializer): Add argument 'procptr'.
1689         (gfc_conv_structure): Modified call to 'gfc_conv_initializer'.
1690         (gfc_trans_assign_vtab_procs): Removed.
1691         * trans-stmt.c (gfc_trans_allocate): Removed call to
1692         'gfc_trans_assign_vtab_procs'.
1693
1694 2010-08-21  Tobias Burnus  <burnus@net-b.de>
1695
1696         PR fortran/36158
1697         PR fortran/33197
1698         * intrinsic.c (add_sym): Init value attribute.
1699         (set_attr_value): New function.
1700         (add_functions) Use it and add JN/YN resolvers.
1701         * symbol.c (gfc_copy_formal_args_intr): Copy value attr.
1702         * intrinsic.h (gfc_resolve_bessel_n2): New prototype.
1703         * gfortran.h (gfc_intrinsic_arg): Add value attribute.
1704         * iresolve.c (gfc_resolve_bessel_n2): New function.
1705         * trans-intrinsic.c (gfc_get_symbol_for_expr): Create
1706         formal arg list.
1707         (gfc_conv_intrinsic_function,gfc_is_intrinsic_libcall):
1708         Add GFC_ISYM_JN2/GFC_ISYM_YN2 as case value.
1709         * simplify.c (): For YN set to -INF if previous values
1710         was -INF.
1711         * trans-expr.c (gfc_conv_procedure_call): Don't crash
1712         if sym->as is NULL.
1713         * iresolve.c (gfc_resolve_extends_type_of): Set the
1714         type of the dummy argument to the one of the actual.
1715
1716 2010-08-20  Joseph Myers  <joseph@codesourcery.com>
1717
1718         * lang.opt (MD, MMD): Use NoDriverArg instead of NoArgDriver.
1719
1720 2010-08-20  Joseph Myers  <joseph@codesourcery.com>
1721
1722         * gfortranspec.c (lang_specific_driver): Refer to -lgfortran in
1723         comment, not -lg2c.
1724
1725 2010-08-20  Nathan Froyd  <froydnj@codesourcery.com>
1726
1727         * trans-openmp.c: Use FOR_EACH_VEC_ELT.
1728
1729 2010-08-19  Daniel Kraft  <d@domob.eu>
1730
1731         PR fortran/29785
1732         PR fortran/45016
1733         * trans.h (struct gfc_se): New flag `byref_noassign'.
1734         * trans-array.h (gfc_conv_shift_descriptor_lbound): New method.
1735         (gfc_conv_array_extent_dim), (gfc_conv_descriptor_size): New methods.
1736         * expr.c (gfc_check_pointer_assign): Allow bounds and rank remapping
1737         and check for compile-time errors with those.
1738         * trans-decl.c (trans_associate_var): Use new routine
1739         `gfc_conv_shift_descriptor_lbound' instead of doing it manually.
1740         * trans-array.c (gfc_conv_shift_descriptor_lbound): New method.
1741         (gfc_conv_array_extent_dim), (gfc_conv_descriptor_size): New methods.
1742         (gfc_array_init_size): Use new `gfc_conv_array_extent_dim'.
1743         (gfc_conv_expr_descriptor): Handle new flag `byref_noassign'.
1744         * trans-expr.c (gfc_trans_pointer_assignment): Handle bounds and
1745         rank remapping for assignment.
1746
1747 2010-08-19  Tobias Burnus  <burnus@net-b.de>
1748
1749         * intrinsic.texi (Bessel_jn, Bessel_yn): Fix typo.
1750         * * simplify.c (gfc_simplify_bessel_yn): Change recursive
1751         into recurrence.
1752
1753 2010-08-19  Tobias Burnus  <burnus@net-b.de>
1754
1755         PR fortran/36158
1756         PR fortran/33197
1757         * check.c (gfc_check_bessel_n2): New function.
1758         * gfortran.h (gfc_isym_id): Add GFC_ISYM_JN2 and GFC_ISYM_YN2.
1759         * intrinsic.c (add_functions): Add transformational version
1760         of the Bessel_jn/yn intrinsics.
1761         * intrinsic.h (gfc_check_bessel_n2,gfc_simplify_bessel_jn2,
1762         gfc_simplify_bessel_yn2): New prototypes.
1763         * intrinsic.texi (Bessel_jn, Bessel_yn): Document
1764         transformational variant.
1765         * simplify.c (gfc_simplify_bessel_jn, gfc_simplify_bessel_yn):
1766         Check for negative order.
1767         (gfc_simplify_bessel_n2,gfc_simplify_bessel_jn2,
1768         gfc_simplify_bessel_yn2): New functions.
1769
1770 2010-08-19  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1771
1772         PR fortran/41859
1773         * resolve.c (resolve_transfer): Traverse operands and set expression
1774         to be checked to a non EXPR_OP type.
1775
1776 2010-08-19  Janus Weil  <janus@gcc.gnu.org>
1777
1778         PR fortran/45290
1779         * gfortran.h (gfc_add_save): Modified prototype.
1780         * decl.c (add_init_expr_to_sym): Defer checking of proc pointer init.
1781         (match_pointer_init): New function to match F08 pointer initialization.
1782         (variable_decl,match_procedure_decl,match_ppc_decl): Use
1783         'match_pointer_init'.
1784         (match_attr_spec): Module variables are implicitly SAVE.
1785         (gfc_match_save): Modified call to 'gfc_add_save'.
1786         * expr.c (gfc_check_assign_symbol): Extra checks for pointer
1787         initialization.
1788         * primary.c (gfc_variable_attr): Handle SAVE attribute.
1789         * resolve.c (resolve_structure_cons): Add new argument and do pointer
1790         initialization checks.
1791         (gfc_resolve_expr): Modified call to 'resolve_structure_cons'.
1792         (resolve_values): Call 'resolve_structure_cons' directly with init arg.
1793         (resolve_fl_variable): Handle SAVE_IMPLICIT.
1794         * symbol.c (gfc_add_save,gfc_copy_attr,save_symbol): Handle
1795         SAVE_IMPLICIT.
1796         * trans-decl.c (gfc_create_module_variable): Module variables with
1797         TARGET can already exist.
1798         * trans-expr.c (gfc_conv_variable): Check for 'current_function_decl'.
1799         (gfc_conv_initializer): Implement non-NULL pointer
1800         initialization.
1801
1802 2010-08-18  Tobias Burnus  <burnus@net-b.de>
1803
1804         PR fortran/45295
1805         * intrinsic.texi (selected_char_kind): Document ISO_10646
1806         support.
1807
1808 2010-08-17  Jakub Jelinek  <jakub@redhat.com>
1809
1810         PR fortran/45304
1811         * trans-decl.c (build_library_function_decl_1): Chain on
1812         void_list_node instead of creating a new TREE_LIST.
1813         * trans-intrinsic.c (gfc_get_intrinsic_lib_fndecl): Likewise.
1814         * trans-types.c (gfc_get_function_type): Likewise.  Set
1815         typelist to void_list_node for the main program.
1816
1817 2010-08-17  Daniel Kraft  <d@domob.eu>
1818
1819         PR fortran/38936
1820         * gfortran.h (struct gfc_association_list): New member `where'.
1821         (gfc_is_associate_pointer) New method.
1822         * match.c (gfc_match_associate): Remember locus for each associate
1823         name matched and do not try to set variable flag.
1824         * parse.c (parse_associate): Use remembered locus for symbols.
1825         * primary.c (match_variable): Instead of variable-flag check for
1826         associate names set it for all such names used.
1827         * symbol.c (gfc_is_associate_pointer): New method.
1828         * resolve.c (resolve_block_construct): Don't generate assignments
1829         to give associate-names their values.
1830         (resolve_fl_var_and_proc): Allow associate-names to be deferred-shape.
1831         (resolve_symbol): Set some more attributes for associate variables,
1832         set variable flag here and check it and don't try to build an
1833         explicitely shaped array-spec for array associate variables.
1834         * trans-expr.c (gfc_conv_variable): Dereference in case of association
1835         to scalar variable.
1836         * trans-types.c (gfc_is_nodesc_array): Handle array association symbols.
1837         (gfc_sym_type): Return pointer type for association to scalar vars.
1838         * trans-decl.c (gfc_get_symbol_decl): Defer association symbols.
1839         (trans_associate_var): New method.
1840         (gfc_trans_deferred_vars): Handle association symbols.
1841
1842 2010-08-16  Joseph Myers  <joseph@codesourcery.com>
1843
1844         * lang.opt (MDX): Change back to MD.  Mark NoDriverArg instead of
1845         RejectDriver.
1846         (MMDX): Change back to MMD.  Mark NoDriverArg instead of
1847         RejectDriver.
1848         * cpp.c (gfc_cpp_handle_option): Use OPT_MD and OPT_MMD instead of
1849         OPT_MDX and OPT_MMDX.
1850
1851 2010-08-16  Joseph Myers  <joseph@codesourcery.com>
1852
1853         * lang.opt (MDX, MMDX): Mark RejectDriver.
1854
1855 2010-08-15  Janus Weil  <janus@gcc.gnu.org>
1856
1857         * trans-expr.c (gfc_trans_assign_vtab_procs): Clean up (we don't have
1858         vtabs for generics any more).
1859
1860 2010-08-15  Daniel Kraft  <d@domob.eu>
1861
1862         PR fortran/38936
1863         * gfortran.h (gfc_find_proc_namespace): New method.
1864         * expr.c (gfc_build_intrinsic_call): No need to build symtree messing
1865         around with namespace.
1866         * symbol.c (gfc_find_proc_namespace): New method.
1867         * trans-decl.c (gfc_build_qualified_array): Use it for correct
1868         value of nest.
1869         * primary.c (gfc_match_varspec): Handle associate-names as arrays.
1870         * parse.c (parse_associate): Removed assignment-generation here...
1871         * resolve.c (resolve_block_construct): ...and added it here.
1872         (resolve_variable): Handle names that are arrays but were not parsed
1873         as such because of association.
1874         (resolve_code): Fix BLOCK resolution.
1875         (resolve_symbol): Generate array-spec for associate-names.
1876
1877 2010-08-15  Tobias Burnus  <burnus@net-b.de>
1878
1879         PR fortran/45211
1880         * decl.c (verify_c_interop_param): Remove superfluous space (" ").
1881         (verify_c_interop): Handle unresolved DT with bind(C).
1882
1883 2010-08-15  Tobias Burnus  <burnus@net-b.de>
1884
1885         * trans-expr.c (gfc_conv_expr_present): Regard nullified
1886         pointer arrays as absent.
1887         (gfc_conv_procedure_call): Handle EXPR_NULL for non-pointer
1888         dummys as absent argument.
1889         * interface.c (compare_actual_formal,compare_parameter):
1890         Ditto.
1891
1892 2010-08-15  Tobias Burnus  <burnus@net-b.de>
1893
1894         * interface.c (compare_pointer, ): Allow passing TARGETs to pointers
1895         dummies with intent(in).
1896
1897 2010-08-15  Daniel Kraft  <d@domob.eu>
1898
1899         PR fortran/45197
1900         * decl.c (gfc_match_prefix): Match IMPURE prefix and mark ELEMENTAL
1901         routines not IMPURE also as PURE.
1902         * intrinsic.c (enum klass): New class `CLASS_PURE' and renamed
1903         `NO_CLASS' in `CLASS_IMPURE'.
1904         (add_sym): Set symbol-attributes `pure' and `elemental' correctly.
1905         (add_sym_0s): Renamed `NO_CLASS' in `CLASS_IMPURE'.
1906         (add_functions): Ditto.
1907         (add_subroutines): Ditto and mark `MOVE_ALLOC' as CLASS_PURE.
1908         * resolve.c (gfc_pure): Do not treat ELEMENTAL as automatically PURE.
1909         (resolve_formal_arglist): Check that arguments to ELEMENTAL procedures
1910         are not ALLOCATABLE and have their INTENT specified.
1911
1912 2010-08-13  Daniel Kraft  <d@domob.eu>
1913
1914         * gfortran.h (array_type): New type `AS_IMPLIED_SHAPE'.
1915         * array.c (gfc_match_array_spec): Match implied-shape specification and
1916         handle AS_IMPLIED_SHAPE correctly otherwise.
1917         * decl.c (add_init_expr_to_sym): Set upper bounds for implied-shape.
1918         (variable_decl): Some checks for implied-shape declaration.
1919         * resolve.c (resolve_symbol): Assert that array-spec is no longer
1920         AS_IMPLIED_SHAPE in any case.
1921
1922 2010-08-12  Joseph Myers  <joseph@codesourcery.com>
1923
1924         * lang.opt (MD, MMD): Change to MDX and MMDX.
1925         * cpp.c (gfc_cpp_handle_option): Use OPT_MMD and OPT_MMDX.
1926
1927 2010-08-11  Janus Weil  <janus@gcc.gnu.org>
1928
1929         PR fortran/44595
1930         * intrinsic.c (gfc_current_intrinsic_arg): Change type from 'char' to
1931         'gfc_intrinsic_arg'.
1932         (check_arglist,check_specific): Add reference to 'name' field.
1933         (init_arglist): Remove reference to 'name' field.
1934         * intrinsic.h (gfc_current_intrinsic_arg): Modify prototype.
1935         * check.c (variable_check): Reverse order of checks. Respect intent of
1936         formal arg.
1937         (int_or_proc_check): New function.
1938         (coarray_check): New function.
1939         (allocatable_check): New function.
1940         (gfc_check_allocated,gfc_check_move_alloc): Use 'allocatable_check'.
1941         (gfc_check_complex): Use 'int_or_real_check'.
1942         (gfc_check_lcobound,gfc_check_image_index,gfc_check_this_image,
1943         gfc_check_ucobound): Use 'coarray_check'.
1944         (gfc_check_pack): Use 'real_or_complex_check'.
1945         (gfc_check_alarm_sub,gfc_check_signal,gfc_check_signal_sub): Use
1946         'int_or_proc_check'.
1947         (scalar_check,type_check,numeric_check,int_or_real_check,
1948         real_or_complex_check,kind_check,double_check,logical_array_check,
1949         array_check,same_type_check,rank_check,nonoptional_check,
1950         kind_value_check,gfc_check_a_p,gfc_check_associated,gfc_check_cmplx,
1951         gfc_check_cshift,gfc_check_dcmplx,gfc_check_dot_product,gfc_check_dprod,
1952         gfc_check_eoshift,gfc_check_fn_rc2008,gfc_check_index,gfc_check_kind,
1953         gfc_check_matmul,gfc_check_minloc_maxloc,check_reduction,gfc_check_null,
1954         gfc_check_present,gfc_check_reshape,gfc_check_same_type_as,
1955         gfc_check_spread,gfc_check_unpack,gfc_check_random_seed,
1956         gfc_check_getarg,gfc_check_and,gfc_check_storage_size): Add reference
1957         to 'name' field.
1958
1959 2010-08-10  Daniel Kraft  <d@domob.eu>
1960
1961         * gfortran.texi (Interoperability with C): Fix ordering in menu
1962         and add new subsection about pointers.
1963         (Interoperable Subroutines and Functions): Split off the pointer part.
1964         (working with Pointers): New subsection with extended discussion
1965         of pointers (especially procedure pointers).
1966
1967 2010-08-09  Thomas Koenig  <tkoenig@gcc.gnu.org>
1968
1969         PR fortran/44235
1970         * array.c (gfc_ref_dimen_size):  Add end argument.
1971         If end is non-NULL, calculate it.
1972         (ref_size):  Adjust call to gfc_ref_dimen_size.
1973         (gfc_array_dimen_size):  Likewise.
1974         (gfc_array_res_shape):  Likewise.
1975         * gfortran.h:  Adjust prototype for gfc_ref_dimen_size.
1976         * resolve.c (resolve_array_ref):  For stride not equal to -1,
1977         fill in the lowest possible end.
1978
1979 2010-08-09  Janus Weil  <janus@gcc.gnu.org>
1980
1981         * intrinsic.texi: Correct documentation of ASINH, ACOSH and ATANH.
1982
1983 2010-08-07  Nathan Froyd  <froydnj@codesourcery.com>
1984
1985         * interface.c (compare_actual_formal): Use XALLOCAVEC instead of
1986         alloca.
1987         (check_some_aliasing): Likewise.
1988         * trans-intrinsic.c (gfc_conv_intrinsic_conversion): Likewise.
1989         (gfc_conv_intrinsic_int): Likewise.
1990         (gfc_conv_intrinsic_lib_function): Likewise.
1991         (gfc_conv_intrinsic_cmplx): Likewise.
1992         (gfc_conv_intrinsic_ctime): Likewise.
1993         (gfc_conv_intrinsic_fdate): Likewise.
1994         (gfc_conv_intrinsic_ttynam): Likewise.
1995         (gfc_conv_intrinsic_minmax): Likewise.
1996         (gfc_conv_intrinsic_minmax_char): Likewise.
1997         (gfc_conv_intrinsic_ishftc): Likewise.
1998         (gfc_conv_intrinsic_index_scan_verify): Likewise.
1999         (gfc_conv_intrinsic_merge): Likewise.
2000         (gfc_conv_intrinsic_trim): Likewise.
2001         * trans.c (gfc_trans_runtime_error_vararg): Likewise.
2002
2003 2010-08-06  Thomas Koenig  <tkoenig@gcc.gnu.org>
2004
2005         PR fortran/45159
2006         * dependency.c (check_section_vs_section):  Handle cases where
2007         the start expression coincides with the lower or upper
2008         bound of the array.
2009
2010 2010-08-04  Janus Weil  <janus@gcc.gnu.org>
2011
2012         PR fortran/42207
2013         PR fortran/44064
2014         PR fortran/44065
2015         * class.c (gfc_find_derived_vtab): Do not generate vtabs for class
2016         container types. Do not artificially increase refs. Commit symbols one
2017         by one.
2018         * interface.c (compare_parameter): Make sure vtabs are present before
2019         generating module variables.
2020         * resolve.c (resolve_allocate_expr): Ditto.
2021
2022 2010-08-04  Tobias Burnus  <burnus@net-b.de>
2023
2024         PR fortran/45183
2025         PR fortran/44857
2026         * resolve.c (resolve_structure_cons): Fix
2027         freeing of charlen.
2028
2029 2010-08-04  Mikael Morin  <mikael@gcc.gnu.org>
2030
2031         PR fortran/42051
2032         PR fortran/44064
2033         * symbol.c (changed_syms): Made static again.
2034         (gfc_symbol_state): Don't conditionalize on GFC_DEBUG.
2035         Changed conditional internal error into assert.
2036         Rename function to ...
2037         (gfc_enforce_clean_symbol_state): ... this.
2038         * gfortran.h (gfc_symbol_state, gfc_enforce_clean_symbol_state):
2039         Rename the former to the latter.
2040         * parse.c (decode_statement, decode_omp_directive,
2041         decode_gcc_attribute): Update callers accordingly. Don't conditionalize
2042         on GFC_DEBUG.
2043         (changed_syms): Remove declaration.
2044         (next_statement): Use gfc_enforce_clean_symbol_state.
2045
2046 2010-08-04  Tobias Burnus  <burnus@net-b.de>
2047
2048         PR fortran/44857
2049         * resolve.c (resolve_structure_cons): Fix handling of
2050         initialization structure constructors with character
2051         elements of the wrong length.
2052         * array.c (gfc_check_iter_variable): Add NULL check.
2053         (gfc_resolve_character_array_constructor): Also truncate
2054         character length.
2055
2056 2010-08-04  Tobias Burnus  <burnus@net-b.de>
2057
2058         * trans-io.c (gfc_build_io_library_fndecls): Fix return
2059         value of some libgfortran functions.
2060
2061 2010-08-03  Thomas Koenig  <tkoenig@gcc.gnu.org>
2062
2063         PR fortran/45159
2064         * dependency.c (gfc_deb_compare_expr):  Remove any integer
2065         conversion functions to larger types from both arguments.
2066         Remove handling these functions futher down.
2067
2068 2010-08-03  Janus Weil  <janus@gcc.gnu.org>
2069
2070         PR fortran/44584
2071         PR fortran/45161
2072         * class.c (add_procs_to_declared_vtab1): Don't add erroneous procedures.
2073         * resolve.c (resolve_tb_generic_targets): Check for errors.
2074
2075 2010-08-02  Thomas Koenig  <tkoenig@gcc.gnu.org>
2076
2077         PR fortran/45159
2078         * depencency.c (gfc_dep_resolver):  Fix logic for when a loop
2079         can be reversed.
2080
2081 2010-08-02  Thomas Koenig  <tkoenig@gcc.gnu.org>
2082
2083         PR fortran/36854
2084         * dependency.h:  Add prototype for gfc_are_identical_variables.
2085         * frontend-passes.c:  Include depencency.h.
2086         (optimimize_equality):  Use gfc_are_identical_variables.
2087         * dependency.c (identical_array_ref): New function.
2088         (gfc_are_identical_variables):  New function.
2089         (gfc_deb_compare_expr):  Use gfc_are_identical_variables.
2090         * dependency.c (gfc_check_section_vs_section).  Rename gfc_
2091         prefix from statc function.
2092         (check_section_vs_section): Change arguments to gfc_array_ref,
2093         adjust function body accordingly.
2094
2095 2010-08-02  Mikael Morin  <mikael@gcc.gnu.org>
2096             Janus Weil  <janus@gcc.gnu.org>
2097
2098         PR fortran/42051
2099         PR fortran/44064
2100         PR fortran/45151
2101         * intrinsic.c (gfc_get_intrinsic_sub_symbol): Commit changed symbol.
2102         * symbol.c (gen_cptr_param, gen_fptr_param, gen_shape_param,
2103         gfc_copy_formal_args, gfc_copy_formal_args_intr,
2104         gfc_copy_formal_args_ppc, generate_isocbinding_symbol): Ditto.
2105         * parse.c (parse_derived_contains, parse_spec, parse_progunit):
2106         Call reject_statement in case of error.
2107         (match_deferred_characteritics): Call gfc_undo_symbols in case match
2108         fails.
2109
2110 2010-08-01  Janus Weil  <janus@gcc.gnu.org>
2111
2112         PR fortran/44912
2113         * class.c (gfc_build_class_symbol): Make '$vptr' component private.
2114         (gfc_find_derived_vtab): Make vtabs and vtypes public.
2115         * module.c (read_module): When reading module files, always import
2116         vtab and vtype symbols.
2117
2118 2010-07-31  Mikael Morin  <mikael@gcc.gnu.org>
2119
2120         PR fortran/42051
2121         PR fortran/44064
2122         * symbol.c (changed_syms): Made non-static.
2123         * parse.c (changed_syms): Declare new external.
2124         (next_statement): Assert changed_syms is NULL at the beginning.
2125
2126 2010-07-30  Janus Weil  <janus@gcc.gnu.org>
2127             Steven G. Kargl  <kargl@gcc.gnu.org>
2128
2129         PR fortran/44929
2130         * match.c (match_type_spec): Try to parse derived types before
2131         intrinsic types.
2132
2133 2010-07-30  Mikael Morin  <mikael@gcc.gnu.org>
2134
2135         * gfortran.h (gfc_release_symbol): New prototype.
2136         * symbol.c (gfc_release_symbol): New. Code taken from free_sym_tree.
2137         (gfc_undo_symbols, free_sym_tree, gfc_free_finalizer):
2138         Use gfc_release_symbol.
2139         * parse.c (gfc_fixup_sibling_symbols): Ditto.
2140         * resolve.c (resolve_symbol): Ditto.
2141
2142 2010-07-29  Tobias Burnus  <burnus@net-b.de>
2143
2144         PR fortran/45087
2145         PR fortran/45125
2146         * trans-decl.c (gfc_get_extern_function_decl): Correctly handle
2147         external procedure declarations in modules.
2148         (gfc_get_symbol_decl): Modify assert.
2149
2150 2010-07-29  Janus Weil  <janus@gcc.gnu.org>
2151
2152         PR fortran/44962
2153         * resolve.c (resolve_fl_derived): Call gfc_resolve_array_spec.
2154
2155 2010-07-29  Janus Weil  <janus@gcc.gnu.org>
2156
2157         PR fortran/45004
2158         * trans-stmt.h (gfc_trans_class_init_assign): New prototype.
2159         (gfc_trans_class_assign): Modified prototype.
2160         * trans.h (gfc_conv_intrinsic_move_alloc): New prototype.
2161         * trans-expr.c (gfc_trans_class_init_assign): Split off from ...
2162         (gfc_trans_class_assign): ... here. Modified actual arguments.
2163         * trans-intrinsic.c (gfc_conv_intrinsic_move_alloc): New function to
2164         handle the MOVE_ALLOC intrinsic with scalar and class arguments.
2165         * trans.c (trans_code): Call 'gfc_conv_intrinsic_move_alloc'.
2166
2167 2010-07-29  Mikael Morin  <mikael@gcc.gnu.org>
2168
2169         PR fortran/42051
2170         PR fortran/44064
2171         * class.c (gfc_find_derived_vtab): Accept or discard newly created
2172         symbols before returning.
2173
2174 2010-07-29  Joseph Myers  <joseph@codesourcery.com>
2175
2176         * lang.opt (cpp): Remove Joined and Separate markers.
2177         (cpp=): New internal option.
2178         * lang-specs.h (F951_CPP_OPTIONS): Generate -cpp= option.
2179         * cpp.c (gfc_cpp_handle_option): Handle OPT_cpp_ instead of
2180         OPT_cpp.
2181
2182 2010-07-29  Daniel Kraft  <d@domob.eu>
2183
2184         PR fortran/45117
2185         * array.c (resolve_array_bound): Fix error message to properly handle
2186         non-variable expressions.
2187
2188 2010-07-28  Mikael Morin  <mikael@gcc.gnu.org>
2189
2190         * decl.c (free_value): Also free repeat field.
2191         * data.c (gfc_assign_data_value): Always free offset before returning.
2192
2193 2010-07-28  Daniel Kraft  <d@domob.eu>
2194
2195         * gfortran.h (gfc_build_intrinsic_call): New method.
2196         * expr.c (gfc_build_intrinsic_call): New method.
2197         * simplify.c (range_check): Ignore non-constant value.
2198         (simplify_bound_dim): Handle non-variable expressions and
2199         fix memory leak with non-free'ed expression.
2200         (simplify_bound): Handle non-variable expressions.
2201         (gfc_simplify_shape): Ditto.
2202         (gfc_simplify_size): Ditto, but only in certain cases possible.
2203
2204 2010-07-28  Joseph Myers  <joseph@codesourcery.com>
2205
2206         * gfortranspec.c (SWITCH_TAKES_ARG, WORD_SWITCH_TAKES_ARG):
2207         Remove.
2208
2209 2010-07-28  Tobias Burnus  <burnus@net-b.de>
2210
2211         PR fortran/45077
2212         * trans-types.c (gfc_get_derived_type): Fix DT declaration
2213         from modules for whole-file mode.
2214
2215 2010-07-27  Joseph Myers  <joseph@codesourcery.com>
2216
2217         * gfortran.h (gfc_handle_option): Update prototype and return
2218         value type.
2219         * options.c (gfc_handle_option): Update prototype and return value
2220         type.
2221
2222 2010-07-27  Joseph Myers  <joseph@codesourcery.com>
2223
2224         * cpp.c (gfc_cpp_init_options): Update prototype.  Use number of
2225         decoded options in allocating deferred_opt.
2226         * cpp.h (gfc_cpp_init_options): Update prototype.
2227         * f95-lang.c (LANG_HOOKS_OPTION_LANG_MASK): Define.
2228         * gfortran.h (gfc_option_lang_mask): New.
2229         (gfc_init_options): Update prototype.
2230         * options.c (gfc_option_lang_mask): New.
2231         (gfc_init_options): Update prototype.  Pass new arguments to
2232         gfc_cpp_init_options.
2233
2234 2010-07-26  Tobias Burnus  <burnus@net-b.de>
2235
2236         PR fortran/40873
2237         * trans-decl.c (gfc_get_extern_function_decl): Fix generation
2238         for functions which are later in the same file.
2239         (gfc_create_function_decl, build_function_decl,
2240         build_entry_thunks): Add global argument.
2241         * trans.c (gfc_generate_module_code): Update
2242         gfc_create_function_decl call.
2243         * trans.h (gfc_create_function_decl): Update prototype.
2244         * resolve.c (resolve_global_procedure): Also resolve for
2245         IFSRC_IFBODY.
2246
2247 2010-07-26  Richard Henderson  <rth@redhat.com>
2248
2249         PR target/44132
2250         * f95-lang.c (LANG_HOOKS_WRITE_GLOBALS): New.
2251         (gfc_write_global_declarations): New.
2252
2253 2010-07-26  Tobias Burnus  <burnus@net-b.de>
2254
2255         PR fortran/45066
2256         * trans-io.c (build_dt): Use NULL_TREE rather than NULL
2257         for call to transfer_namelist_element.
2258         * trans-decl.c (gfc_get_symbol_decl): Also set sym->backend_decl
2259         for -fwhole-file.
2260
2261 2010-07-25  Thomas Koenig  <tkoenig@gcc.gnu.org>
2262
2263         PR fortran/40628
2264         * Make-lang.in:  Add fortran/frontend-passes.o.
2265         * gfortran.h:  Add prototype for gfc_run_passes.
2266         * resolve.c (gfc_resolve):  Call gfc_run_passes.
2267         * frontend-passes.c:  New file.
2268
2269 2010-07-25  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2270
2271         PR fortran/42852
2272         * scanner.c (gfc_next_char_literal): Enable truncation warning for
2273         free-form '&'.
2274
2275 2010-07-25  Mikael Morin  <mikael@gcc.gnu.org>
2276
2277         PR fortran/44660
2278         * gfortran.h (gfc_namespace): New field old_equiv.
2279         (gfc_free_equiv_until): New prototype.
2280         * match.c (gfc_free_equiv_until): New, renamed from gfc_free_equiv with
2281         a parameterized stop condition.
2282         (gfc_free_equiv): Use gfc_free_equiv_until.
2283         * parse.c (next_statement): Save equivalence list.
2284         (reject_statement): Restore equivalence list.
2285
2286 2010-07-25  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2287
2288         PR fortran/42852
2289         * scanner.c (gfc_next_char_literal): Move check for truncation earlier
2290         in the function so that it does not get missed by early exits.
2291         (load_line): Add checks for quoted strings and free form comments to
2292         disable warnings on comments. Add check for ampersand as first
2293         character after truncation and don't warn for this case, but warn if
2294         there are subsequent non-whitespace characters.
2295
2296 2010-07-24  Tobias Burnus  <burnus@net-b.de>
2297
2298         PR fortran/40011
2299         * parse.c (gfc_parse_file): Do not override
2300         gfc_global_ns_list items.
2301
2302 2010-07-24  Tobias Burnus  <burnus@net-b.de>
2303
2304         * options.c (gfc_init_options): Enable -fwhole-file by default.
2305         * interface.c (compare_parameter): Assume a Hollerith constant is
2306         compatible with all other argument types.
2307
2308 2010-07-23  Tobias Burnus  <burnus@net-b.de>
2309
2310         PR fortran/44945
2311         * trans-decl.c (gfc_get_symbol_decl): Use module decl with
2312         -fwhole-file also for derived types.
2313         * trans-types.c (copy_dt_decls_ifequal): Remove static and
2314         rename to gfc_copy_dt_decls_ifequal.
2315         (gfc_get_derived_type): Update call.
2316         * trans-types.h (gfc_copy_dt_decls_ifequal): Add prototype.
2317
2318 2010-07-23  Tobias Burnus  <burnus@net-b.de>
2319
2320         PR fortran/45030
2321         * resolve.c (resolve_global_procedure): Properly handle ENTRY.
2322
2323 2010-07-23  Jakub Jelinek  <jakub@redhat.com>
2324
2325         * trans-types.c (gfc_get_array_descriptor_base,
2326         gfc_get_array_type_bounds): Set TYPE_NAMELESS.
2327         * trans-decl.c (gfc_build_qualified_array): Set DECL_NAMELESS
2328         instead of clearing DECL_NAME.
2329         (gfc_build_dummy_array_decl): Set DECL_NAMELESS.
2330
2331 2009-07-23  Paul Thomas  <pault@gcc.gnu.org>
2332
2333         PR fortran/24524
2334         * trans-array.c (gfc_init_loopinfo): Initialize the reverse
2335         field.
2336         gfc_trans_scalarized_loop_end: If reverse set in dimension n,
2337         reverse the scalarization loop.
2338         gfc_conv_resolve_dependencies: Pass the reverse field of the
2339         loopinfo to gfc_dep_resolver.
2340         trans-expr.c (gfc_trans_assignment_1): Enable loop reversal for
2341         assignment by resetting loop.reverse.
2342         gfortran.h : Add the gfc_reverse enum.
2343         trans.h : Add the reverse field to gfc_loopinfo.
2344         dependency.c (gfc_check_dependency): Pass null to the new arg
2345         of gfc_dep_resolver.
2346         (gfc_check_section_vs_section): Check for reverse dependencies.
2347         (gfc_dep_resolver): Add reverse argument and deal with the loop
2348         reversal logic.
2349         dependency.h : Modify prototype for gfc_dep_resolver to include
2350         gfc_reverse *.
2351
2352 2010-07-23  Daniel Kraft  <d@domob.eu>
2353
2354         PR fortran/44709
2355         * gfortran.h (gfc_find_symtree_in_proc): New method.
2356         * symbol.c (gfc_find_symtree_in_proc): New method.
2357         * match.c (match_exit_cycle): Look for loop name also in parent
2358         namespaces within current procedure.
2359
2360 2010-07-22  Tobias Burnus  <burnus@net-b.de>
2361
2362         PR fortran/45019
2363         * dependency.c (gfc_check_dependency): Add argument alising check.
2364         * symbol.c (gfc_symbols_could_alias): Add argument alising check.
2365
2366 2010-07-22  Daniel Kraft  <d@domob.eu>
2367
2368         * trans-stmt.c (gfc_trans_return): Put back in the handling of se.post,
2369         now in the correct place.
2370
2371 2010-07-21  Steven G. Kargl  <kargl@gcc.gnu.org>
2372
2373         PR fortran/44929
2374         * Revert my commit r162325.
2375
2376 2010-07-21  Daniel Kraft  <d@domob.eu>
2377
2378         * trans.h (gfc_get_return_label): Removed.
2379         (gfc_generate_return): New method.
2380         (gfc_trans_deferred_vars): Update gfc_wrapped_block rather than
2381         returning a tree directly.
2382         * trans-stmt.c (gfc_trans_return): Use `gfc_generate_return'.
2383         (gfc_trans_block_construct): Update for new interface to
2384         `gfc_trans_deferred_vars'.
2385         * trans-decl.c (current_function_return_label): Removed.
2386         (current_procedure_symbol): New variable.
2387         (gfc_get_return_label): Removed.
2388         (gfc_trans_deferred_vars): Update gfc_wrapped_block rather than
2389         returning a tree directly.
2390         (get_proc_result), (gfc_generate_return): New methods.
2391         (gfc_generate_function_code): Clean up and do init/cleanup here
2392         also with gfc_wrapped_block.  Remove return-label but rather
2393         return directly.
2394
2395 2010-07-19  Steven G. Kargl  <kargl@gcc.gnu.org>
2396
2397         PR fortran/44929
2398         * fortran/match.c (match_type_spec): Check for derived type before
2399         intrinsic types.
2400
2401 2010-07-19  Paul Thomas  <pault@gcc.gnu.org>
2402
2403         PR fortran/42385
2404         * interface.c (matching_typebound_op): Add argument for the
2405         return of the generic name for the procedure.
2406         (build_compcall_for_operator): Add an argument for the generic
2407         name of an operator procedure and supply it to the expression.
2408         (gfc_extend_expr, gfc_extend_assign): Use the generic name in
2409         calls to the above procedures.
2410         * resolve.c (resolve_typebound_function): Catch procedure
2411         component calls for CLASS objects, check that the vtable is
2412         complete and insert the $vptr and procedure components, to make
2413         the call.
2414         (resolve_typebound_function): The same.
2415         * trans-decl.c (gfc_trans_deferred_vars): Do not deallocate
2416         an allocatable scalar if it is a result.
2417
2418 2010-07-19  Paul Thomas  <pault@gcc.gnu.org>
2419
2420         PR fortran/44353
2421         * match.c (gfc_match_iterator): Reverted.
2422
2423 2010-07-18  Paul Thomas  <pault@gcc.gnu.org>
2424
2425         PR fortran/44353
2426         * match.c (gfc_match_iterator): Remove error that iterator
2427         cannot be INTENT(IN).
2428
2429 2010-07-17  Mikael Morin  <mikael@gcc.gnu.org>
2430
2431         * trans-array.c (gfc_free_ss): Don't free beyond ss rank.
2432         Access subscript through the "dim" field index.
2433         (gfc_trans_create_temp_array): Access ss info through the "dim" field
2434         index.
2435         (gfc_conv_array_index_offset): Ditto.
2436         (gfc_conv_loop_setup): Ditto.
2437         (gfc_conv_expr_descriptor): Ditto.
2438         (gfc_conv_ss_startstride): Ditto.  Update call to
2439         gfc_conv_section_startstride.
2440         (gfc_conv_section_startstride): Set values along the array dimension.
2441         Get array dimension directly from the argument.
2442
2443 2010-07-15  Jakub Jelinek  <jakub@redhat.com>
2444
2445         * trans.h (gfc_string_to_single_character): New prototype.
2446         * trans-expr.c (string_to_single_character): Renamed to ...
2447         (gfc_string_to_single_character): ... this.  No longer static.
2448         (gfc_conv_scalar_char_value, gfc_build_compare_string,
2449         gfc_trans_string_copy): Adjust callers.
2450         * config-lang.in (gtfiles): Add fortran/trans-stmt.c.
2451         * trans-stmt.c: Include ggc.h and gt-fortran-trans-stmt.h.
2452         (select_struct): Move to toplevel, add GTY(()).
2453         (gfc_trans_character_select): Optimize SELECT CASE
2454         with character length 1.
2455
2456 2010-07-15  Nathan Froyd  <froydnj@codesourcery.com>
2457
2458         * f95-lang.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
2459         * trans-common.c: Likewise.
2460         * trans-decl.c: Likewise.
2461         * trans-types.c: Likewise.
2462         * trans.c: Likewise.
2463
2464 2010-07-15  Janus Weil  <janus@gcc.gnu.org>
2465
2466         PR fortran/44936
2467         * resolve.c (resolve_typebound_generic_call): Resolve generic
2468         non-polymorphic type-bound procedure calls to the correct specific
2469         procedure.
2470         (resolve_typebound_subroutine): Remove superfluous code.
2471
2472 2010-07-15  Daniel Kraft  <d@domob.eu>
2473
2474         PR fortran/44709
2475         * trans.h (struct gfc_wrapped_block): New struct.
2476         (gfc_start_wrapped_block), (gfc_add_init_cleanup): New methods.
2477         (gfc_finish_wrapped_block): New method.
2478         (gfc_init_default_dt): Add new init code to block rather than
2479         returning it.
2480         * trans-array.h (gfc_trans_auto_array_allocation): Use gfc_wrapped_block
2481         (gfc_trans_dummy_array_bias): Ditto.
2482         (gfc_trans_g77_array): Ditto.
2483         (gfc_trans_deferred_array): Ditto.
2484         * trans.c (gfc_add_expr_to_block): Call add_expr_to_chain.
2485         (add_expr_to_chain): New method based on old gfc_add_expr_to_block.
2486         (gfc_start_wrapped_block), (gfc_add_init_cleanup): New methods.
2487         (gfc_finish_wrapped_block): New method.
2488         * trans-array.c (gfc_trans_auto_array_allocation): use gfc_wrapped_block
2489         (gfc_trans_g77_array), (gfc_trans_dummy_array_bias): Ditto.
2490         (gfc_trans_deferred_array): Ditto.
2491         * trans-decl.c (gfc_trans_dummy_character): Ditto.
2492         (gfc_trans_auto_character_variable), (gfc_trans_assign_aux_var): Ditto.
2493         (init_intent_out_dt): Ditto.
2494         (gfc_init_default_dt): Add new init code to block rather than
2495         returning it.
2496         (gfc_trans_deferred_vars): Use gfc_wrapped_block to collect all init
2497         and cleanup code and put it all together.
2498
2499 2010-07-15  Jakub Jelinek  <jakub@redhat.com>
2500
2501         * trans.h (gfc_build_compare_string): Add CODE argument.
2502         * trans-intrinsic.c (gfc_conv_intrinsic_strcmp): Pass OP to
2503         gfc_build_compare_string.
2504         * trans-expr.c (gfc_conv_expr_op): Pass CODE to
2505         gfc_build_compare_string.
2506         (string_to_single_character): Rename len variable to length.
2507         (gfc_optimize_len_trim): New function.
2508         (gfc_build_compare_string): Add CODE argument.  If it is EQ_EXPR
2509         or NE_EXPR and one of the strings is string literal with LEN_TRIM
2510         bigger than the length of the other string, they compare unequal.
2511
2512         PR fortran/40206
2513         * trans-stmt.c (gfc_trans_character_select): Always use NULL for high
2514         in CASE_LABEL_EXPR and use NULL for low for the default case.
2515
2516 2010-07-14  Mikael Morin  <mikael@gcc.gnu.org>
2517
2518         * trans-array.c (gfc_conv_section_upper_bound): Remove
2519         (gfc_conv_section_startstride): Don't set the upper bound in the
2520         vector subscript case.
2521         (gfc_conv_loop_setup): Don't use gfc_conv_section_upper_bound
2522
2523 2010-07-14  Janus Weil  <janus@gcc.gnu.org>
2524
2525         PR fortran/44925
2526         * gfortran.h (gfc_is_data_pointer): Remove prototype.
2527         * dependency.c (gfc_is_data_pointer): Make it static.
2528         * intrinsic.texi: Update documentation on C_LOC.
2529         * resolve.c (gfc_iso_c_func_interface): Fix pointer and target checks
2530         and add a check for polymorphic variables.
2531
2532 2010-07-14  Jakub Jelinek  <jakub@redhat.com>
2533
2534         * trans-expr.c (string_to_single_character): Also optimize
2535         string literals containing a single char followed only by spaces.
2536         (gfc_trans_string_copy): Remove redundant string_to_single_character
2537         calls.
2538
2539         * trans-decl.c (gfc_build_intrinsic_function_decls,
2540         gfc_build_builtin_function_decls): Mark functions as
2541         DECL_PURE_P or TREE_READONLY.
2542
2543 2010-07-13  Nathan Froyd  <froydnj@codesourcery.com>
2544
2545         * trans-decl.c (build_entry_thunks): Call build_call_expr_loc_vec
2546         instead of build_function_call_expr.
2547         * trans-intrinsic.c (gfc_conv_intrinsic_sr_kind): Likewise.
2548
2549 2010-07-13  Tobias Burnus  <burnus@net-b.de>
2550             Daniel Franke  <franke.daniel@gmail.com>
2551
2552         PR fortran/43665
2553         * trans.h (gfc_build_library_function_decl_with_spec): New prototype.
2554         * trans-decl.c (gfc_build_library_function_decl_with_spec): Removed
2555         static.
2556         * trans-io (gfc_build_io_library_fndecls): Add "fn spec" annotations.
2557
2558 2010-07-13  Daniel Franke  <franke.daniel@gmail.com>
2559             Tobias Burnus  <burnus@net-b.de>
2560
2561         PR fortran/43665
2562         * trans-decl.c (gfc_build_intrinsic_function_decls): Add
2563         noclobber/noescape annotations to function calls.
2564         (gfc_build_builtin_function_decls): Likewise.
2565
2566 2010-07-13  Janus Weil  <janus@gcc.gnu.org>
2567
2568         PR fortran/44434
2569         PR fortran/44565
2570         PR fortran/43945
2571         PR fortran/44869
2572         * gfortran.h (gfc_find_derived_vtab): Modified prototype.
2573         * class.c (gfc_build_class_symbol): Modified call to
2574         'gfc_find_derived_vtab'.
2575         (add_proc_component): Removed, moved code into 'add_proc_comp'.
2576         (add_proc_comps): Renamed to 'add_proc_comp', removed treatment of
2577         generics.
2578         (add_procs_to_declared_vtab1): Removed unnecessary argument 'resolved'.
2579         Removed treatment of generics.
2580         (copy_vtab_proc_comps): Removed unnecessary argument 'resolved'.
2581         Call 'add_proc_comp' instead of duplicating code.
2582         (add_procs_to_declared_vtab): Removed unnecessary arguments 'resolved'
2583         and 'declared'.
2584         (add_generic_specifics,add_generics_to_declared_vtab): Removed.
2585         (gfc_find_derived_vtab): Removed unnecessary argument 'resolved'.
2586         Removed treatment of generics.
2587         * iresolve.c (gfc_resolve_extends_type_of): Modified call to
2588         'gfc_find_derived_vtab'.
2589         * resolve.c (resolve_typebound_function,resolve_typebound_subroutine):
2590         Removed treatment of generics.
2591         (resolve_select_type,resolve_fl_derived): Modified call to
2592         'gfc_find_derived_vtab'.
2593         * trans-decl.c (gfc_get_symbol_decl): Ditto.
2594         * trans-expr.c (gfc_conv_derived_to_class,gfc_trans_class_assign):
2595         Ditto.
2596         * trans-stmt.c (gfc_trans_allocate): Ditto.
2597
2598 2010-07-12  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2599
2600         PR fortran/37077
2601         * trans-io.c (build_dt): Set common.unit to flag chracter(kind=4)
2602         internal unit.
2603
2604 2010-07-12  Mikael Morin  <mikael@gcc.gnu.org>
2605
2606         * expr.c (gfc_get_int_expr): Don't initialize mpfr data twice.
2607         * resolve.c (build_default_init_expr): Ditto.
2608
2609 2010-07-11  Tobias Burnus  <burnus@net-b.de>
2610
2611         PR fortran/44702
2612         * module.c (sort_iso_c_rename_list): Remove.
2613         (import_iso_c_binding_module,use_iso_fortran_env_module):
2614         Allow multiple imports of the same symbol.
2615
2616 2010-07-11  Mikael Morin  <mikael@gcc.gnu.org>
2617
2618         * arith.c (gfc_arith_done_1): Release mpfr internal caches.
2619
2620 2010-07-11  Janus Weil  <janus@gcc.gnu.org>
2621
2622         PR fortran/44869
2623         * decl.c (build_sym,attr_decl1): Only build the class container if the
2624         symbol has sufficient attributes.
2625         * expr.c (gfc_check_pointer_assign): Use class_pointer instead of
2626         pointer attribute for classes.
2627         * match.c (gfc_match_allocate,gfc_match_deallocate): Ditto.
2628         * module.c (MOD_VERSION): Bump.
2629         (enum ab_attribute,attr_bits): Add AB_CLASS_POINTER.
2630         (mio_symbol_attribute): Handle class_pointer attribute.
2631         * parse.c (parse_derived): Use class_pointer instead of pointer
2632         attribute for classes.
2633         * primary.c (gfc_variable_attr,gfc_expr_attr): Ditto.
2634         * resolve.c (resolve_structure_cons,resolve_deallocate_expr,
2635         resolve_allocate_expr,resolve_fl_derived): Ditto.
2636         (resolve_fl_var_and_proc): Check for class_ok attribute.
2637
2638 2010-07-10  Mikael Morin  <mikael@gcc.gnu.org>
2639
2640         * trans-io.c (gfc_build_st_parameter): Update calls to
2641         gfc_add_field_to_struct.
2642         * trans-stmt.c (ADD_FIELD): Ditto.
2643         * trans-types.c
2644         (gfc_get_derived_type): Ditto. Don't create backend_decl for C_PTR's
2645         C_ADDRESS field.
2646         (gfc_add_field_to_struct_1): Set TYPE_FIELDS(context) instead of
2647         fieldlist, remove fieldlist from argument list.
2648         (gfc_add_field_to_struct): Update call to gfc_add_field_to_struct_1
2649         and remove fieldlist from argument list.
2650         (gfc_get_desc_dim_type, gfc_get_array_descriptor_base,
2651         gfc_get_mixed_entry_union): Move setting
2652         TYPE_FIELDS to gfc_add_field_to_struct_1 and update calls to it.
2653         * trans-types.h (gfc_add_field_to_struct): Update prototype.
2654
2655 2010-07-10  Paul Thomas  <pault@gcc.gnu.org>
2656
2657         PR fortran/44773
2658         * trans-expr.c (arrayfunc_assign_needs_temporary): No temporary
2659         if the lhs has never been host associated, as well as not being
2660         use associated, a pointer or a target.
2661         * resolve.c (resolve_variable): Mark variables that are host
2662         associated.
2663         * gfortran.h: Add the host_assoc bit to the symbol_attribute
2664         structure.
2665
2666 2010-07-09  Janus Weil  <janus@gcc.gnu.org>
2667
2668         * intrinsic.texi: Add documentation for SAME_TYPE_AS, EXTENDS_TYPE_OF,
2669         STORAGE_SIZE, C_NULL_PTR and C_NULL_FUNPTR. Modify documentation of
2670         SIZEOF and C_SIZEOF.
2671
2672 2010-07-08  Janus Weil  <janus@gcc.gnu.org>
2673
2674         PR fortran/44649
2675         * gfortran.h (gfc_isym_id): Add GFC_ISYM_C_SIZEOF,GFC_ISYM_STORAGE_SIZE.
2676         * intrinsic.h (gfc_check_c_sizeof,gfc_check_storage_size,
2677         gfc_resolve_storage_size): New prototypes.
2678         * check.c (gfc_check_c_sizeof,gfc_check_storage_size): New functions.
2679         * intrinsic.c (add_functions): Add STORAGE_SIZE.
2680         * iresolve.c (gfc_resolve_storage_size): New function.
2681         * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): Handle polymorphic
2682         arguments.
2683         (gfc_conv_intrinsic_storage_size): New function.
2684         (gfc_conv_intrinsic_function): Handle STORAGE_SIZE.
2685
2686 2010-07-08  Jakub Jelinek  <jakub@redhat.com>
2687
2688         PR fortran/44847
2689         * match.c (match_exit_cycle): Error on EXIT also from collapsed
2690         !$omp do loops.  Error on CYCLE to non-innermost collapsed
2691         !$omp do loops.
2692
2693 2010-07-08  Tobias Burnus  <burnus@net-b.de>
2694
2695         PR fortran/18918
2696         * array.c (gfc_match_array_ref): Better error message for
2697         coarrays with too few ranks.
2698         (match_subscript): Move one diagnostic to caller.
2699         * gfortran.h (gfc_get_corank): Add prottype.
2700         * expr.c (gfc_get_corank): New function.
2701         * iresolve.c (resolve_bound): Fix rank for cobounds.
2702         (gfc_resolve_lbound,gfc_resolve_lcobound, gfc_resolve_ubound,
2703         gfc_resolve_ucobound, gfc_resolve_this_image): Update
2704         resolve_bound call.
2705
2706 2010-07-06  Tobias Burnus  <burnus@net-b.de>
2707
2708         PR fortran/44742
2709         * array.c (gfc_expand_constructor): Add optional diagnostic.
2710         * gfortran.h (gfc_expand_constructor): Update prototype.
2711         * expr.c (gfc_simplify_expr, check_init_expr,
2712         gfc_reduce_init_expr): Update gfc_expand_constructor call.
2713         * resolve.c (gfc_resolve_expr): Ditto.
2714
2715 2010-07-06  Tobias Burnus  <burnus@net-b.de>
2716
2717         * trans-decl.c: Include diagnostic-core.h besides toplev.h.
2718         * trans-intrinsic.c: Ditto.
2719         * trans-types.c: Ditto.
2720         * convert.c: Include diagnostic-core.h instead of toplev.h.
2721         * options.c: Ditto.
2722         * trans-array.c: Ditto.
2723         * trans-const.c: Ditto.
2724         * trans-expr.c: Ditto.
2725         * trans-io.c: Ditto.
2726         * trans-openmp.c: Ditto.
2727         * trans.c: Ditto.
2728
2729 2010-07-06  Thomas Koenig  <tkoenig@gcc.gnu.org>
2730
2731         PR fortran/PR44693
2732         * check.c (dim_rank_check):  Also check intrinsic functions.
2733         Adjust permissible rank for functions which reduce the rank of
2734         their argument.  Spread is an exception, where DIM can
2735         be one larger than the rank of array.
2736
2737 2010-07-05  Steven G. Kargl  <kargl@gcc.gnu.org>
2738
2739         PR fortran/44797
2740         * fortran/io.c (resolve_tag): Check EXIST tag is a default logical.
2741
2742 2010-07-05  Paul Thomas  <pault@gcc.gnu.org>
2743
2744         PR fortran/44596
2745         * trans-types.c (gfc_get_derived_type): Derived type fields
2746         with the vtype attribute must have TYPE_REF_CAN_ALIAS_ALL set
2747         but build_pointer_type_for_mode must be used for this.
2748
2749 2010-07-05  Nathan Froyd  <froydnj@codesourcery.com>
2750
2751         * trans.h (gfc_conv_procedure_call): Take a VEC instead of a tree.
2752         * trans-intrinsic.c (gfc_conv_intrinsic_funcall): Adjust for new
2753         type of gfc_conv_procedure_call.
2754         (conv_generic_with_optional_char_arg): Likewise.
2755         * trans-stmt.c (gfc_trans_call): Likewise.
2756         * trans-expr.c (gfc_conv_function_expr): Likewise.
2757         (gfc_conv_procedure_call): Use build_call_vec instead of
2758         build_call_list.
2759
2760 2010-07-04  Daniel Kraft  <d@domob.eu>
2761
2762         * gfc-internals.texi (gfc_code): Document BLOCK and ASSOCIATE.
2763
2764 2010-07-04  Paul Thomas  <pault@gcc.gnu.org>
2765
2766         PR fortran/44596
2767         PR fortran/44745
2768         * trans-types.c (gfc_get_derived_type): Derived type fields
2769         with the vtype attribute must have TYPE_REF_CAN_ALIAS_ALL set.
2770
2771 2010-07-02  Mikael Morin  <mikael@gcc.gnu.org>
2772
2773         PR fortran/44662
2774         * decl.c (match_procedure_in_type): Clear structure before using.
2775         (gfc_match_generic): Ditto.
2776
2777 2010-07-02  Nathan Froyd  <froydnj@codesourcery.com>
2778
2779         * trans-types.h (gfc_add_field_to_struct): Add tree ** parameter.
2780         * trans-types.c (gfc_add_field_to_struct_1): New function, most
2781         of which comes from...
2782         (gfc_add_field_to_struct): ...here.  Call it.  Add new parameter.
2783         (gfc_get_desc_dim_type): Call gfc_add_field_to_struct_1 for
2784         building fields.
2785         (gfc_get_array_descriptor_base): Likewise.
2786         (gfc_get_mixed_entry_union): Likewise.
2787         (gfc_get_derived_type): Add extra chain parameter for
2788         gfc_add_field_to_struct.
2789         * trans-stmt.c (gfc_trans_character_select): Likewise.
2790         * trans-io.c (gfc_build_st_parameter): Likewise.
2791
2792 2010-06-29  Janus Weil  <janus@gcc.gnu.org>
2793
2794         PR fortran/44718
2795         * resolve.c (is_external_proc): Prevent procedure pointers from being
2796         regarded as external procedures.
2797
2798 2010-06-29  Janus Weil  <janus@gcc.gnu.org>
2799
2800         PR fortran/44696
2801         * trans-intrinsic.c (gfc_conv_associated): Handle polymorphic variables
2802         passed as second argument of ASSOCIATED.
2803
2804 2010-06-29  Paul Thomas  <pault@gcc.gnu.org>
2805
2806         PR fortran/44582
2807         * trans-expr.c (arrayfunc_assign_needs_temporary): New function
2808         to determine if a function assignment can be made without a
2809         temporary.
2810         (gfc_trans_arrayfunc_assign): Move all the conditions that
2811         suppress the direct function call to the above new functon and
2812         call it.
2813
2814 2010-06-28  Paul Thomas  <pault@gcc.gnu.org>
2815
2816         PR fortran/40158
2817         * interface.c (argument_rank_mismatch): New function.
2818         (compare_parameter): Call new function instead of generating
2819         the error directly.
2820
2821 2010-06-28  Nathan Froyd  <froydnj@codesourcery.com>
2822
2823         * trans-openmp.c (dovar_init): Define.  Define VECs containing it.
2824         (gfc_trans_omp_do): Use a VEC to accumulate variables and their
2825         initializers.
2826
2827 2010-06-28  Steven Bosscher  <steven@gcc.gnu.org>
2828
2829         * Make-lang.in: Update dependencies.
2830
2831 2010-06-27  Nathan Froyd  <froydnj@codesourcery.com>
2832
2833         * gfortran.h (gfc_code): Split backend_decl field into cycle_label
2834         and exit_label fields.
2835         * trans-openmp.c (gfc_trans_omp_do): Assign to new fields
2836         individually.
2837         * trans-stmt.c (gfc_trans_simple_do): Likewise.
2838         (gfc_trans_do): Likewise.
2839         (gfc_trans_do_while): Likewise.
2840         (gfc_trans_cycle): Use cycle_label directly.
2841         (gfc_trans_exit): Use exit_label directly.
2842
2843 2010-06-27  Daniel Kraft  <d@domob.eu>
2844
2845         * dump-parse-tree.c (show_symbol): Dump target-expression for
2846         associate names.
2847         (show_code_node): Make distinction between BLOCK and ASSOCIATE.
2848         (show_namespace): Use show_level for correct indentation of
2849         "inner namespaces" (contained procedures or BLOCK).
2850
2851 2010-06-27  Thomas Koenig  <tkoenig@gcc.gnu.org>
2852
2853         PR fortran/44678
2854         * dump-parse-tree.c (show_code_node):  Show namespace for
2855         EXEC_BLOCK.
2856
2857 2010-06-26  Tobias Burnus  <burnus@net-b.de>
2858
2859         * decl.c (gfc_match_decl_type_spec): Support
2860         TYPE(intrinsic-type-spec).
2861
2862 2010-06-25  Tobias Burnus  <burnus@net-b.de>
2863
2864         * intrinsic.h (gfc_check_selected_real_kind,
2865         gfc_simplify_selected_real_kind): Update prototypes.
2866         * intrinsic.c (add_functions): Add radix support to
2867         selected_real_kind.
2868         * check.c (gfc_check_selected_real_kind): Ditto.
2869         * simplify.c (gfc_simplify_selected_real_kind): Ditto.
2870         * trans-decl.c (gfc_build_intrinsic_function_decls):
2871         Change call from selected_real_kind to selected_real_kind2008.
2872         * intrinsic.texi (SELECTED_REAL_KIND): Update for radix.
2873         (PRECISION, RANGE, RADIX): Add cross @refs.
2874
2875 2010-06-25  Tobias Burnus  <burnus@net-b.de>
2876
2877         * decl.c (gfc_match_entry): Mark ENTRY as GFC_STD_F2008_OBS.
2878         * gfortran.texi (_gfortran_set_options): Update for
2879         GFC_STD_F2008_OBS addition.
2880         * libgfortran.h: Add GFC_STD_F2008_OBS.
2881         * options.c (set_default_std_flags, gfc_handle_option): Handle
2882         GFC_STD_F2008_OBS.
2883         io.c (check_format): Fix allow_std check.
2884
2885 2010-06-25  Tobias Burnus  <burnus@net-b.de>
2886
2887         * decl.c (gfc_match_entry): Allow END besides
2888         END SUBROUTINE/END FUNCTION for contained procedures.
2889
2890 2010-06-25  Tobias Burnus  <burnus@net-b.de>
2891
2892         * parse.c (next_free, next_fixed): Allow ";" as first character.
2893
2894 2010-06-24  Tobias Burnus  <burnus@net-b.de>
2895
2896         PR fortran/44614
2897         * decl.c (variable_decl): Fix IMPORT diagnostic for CLASS.
2898
2899 2010-06-22  Janus Weil  <janus@gcc.gnu.org>
2900
2901         PR fortran/44616
2902         * resolve.c (resolve_fl_derived): Avoid checking for abstract on class
2903         containers.
2904
2905 2010-06-21  Tobias Burnus  <burnus@net-b.de>
2906
2907         PR fortran/40632
2908         * interface.c (compare_parameter): Add gfc_is_simply_contiguous
2909         checks.
2910         * symbol.c (gfc_add_contiguous): New function.
2911         (gfc_copy_attr, check_conflict): Handle contiguous attribute.
2912         * decl.c (match_attr_spec): Ditto.
2913         (gfc_match_contiguous): New function.
2914         * resolve.c (resolve_fl_derived, resolve_symbol): Handle
2915         contiguous.
2916         * gfortran.h (symbol_attribute): Add contiguous.
2917         (gfc_is_simply_contiguous): Add prototype.
2918         (gfc_add_contiguous): Add prototype.
2919         * match.h (gfc_match_contiguous): Add prototype.
2920         * parse.c (decode_specification_statement,
2921         decode_statement): Handle contiguous attribute.
2922         * expr.c (gfc_is_simply_contiguous): New function.
2923         * dump-parse-tree.c (show_attr): Handle contiguous.
2924         * module.c (ab_attribute, attr_bits, mio_symbol_attribute):
2925         Ditto.
2926         * trans-expr.c (gfc_add_interface_mapping): Copy
2927         attr.contiguous.
2928         * trans-array.c (gfc_conv_descriptor_stride_get,
2929         gfc_conv_array_parameter): Handle contiguous arrays.
2930         * trans-types.c (gfc_build_array_type, gfc_build_array_type,
2931         gfc_sym_type, gfc_get_derived_type, gfc_get_array_descr_info):
2932         Ditto.
2933         * trans.h (gfc_array_kind): Ditto.
2934         * trans-decl.c (gfc_get_symbol_decl): Ditto.
2935
2936 2010-06-20  Joseph Myers  <joseph@codesourcery.com>
2937
2938         * options.c (gfc_handle_option): Don't handle N_OPTS.
2939
2940 2010-06-19  Janus Weil  <janus@gcc.gnu.org>
2941
2942         PR fortran/44584
2943         * resolve.c (resolve_fl_derived): Reverse ordering of conditions
2944         to avoid ICE.
2945
2946 2010-06-18  Tobias Burnus  <burnus@net-b.de>
2947
2948         PR fortran/44556
2949         * resolve.c (resolve_allocate_deallocate): Properly check
2950         part-refs in stat=/errmsg= for invalid use.
2951
2952 2010-06-17  Janus Weil  <janus@gcc.gnu.org>
2953
2954         PR fortran/44558
2955         * resolve.c (resolve_typebound_function,resolve_typebound_subroutine):
2956         Return directly in case of an error.
2957
2958 2010-06-16  Janus Weil  <janus@gcc.gnu.org>
2959
2960         PR fortran/44549
2961         * gfortran.h (gfc_get_typebound_proc): Modified Prototype.
2962         * decl.c (match_procedure_in_type): Give a unique gfc_typebound_proc
2963         structure to each procedure in a procedure list.
2964         * module.c (mio_typebound_proc): Add NULL argument to
2965         'gfc_get_typebound_proc'.
2966         * symbol.c (gfc_get_typebound_proc): Add a new argument, which is used
2967         to initialize the new structure.
2968
2969 2010-06-15  Janus Weil  <janus@gcc.gnu.org>
2970
2971         PR fortran/43388
2972         * gfortran.h (gfc_expr): Add new member 'mold'.
2973         * match.c (gfc_match_allocate): Implement the MOLD tag.
2974         * resolve.c (resolve_allocate_expr): Ditto.
2975         * trans-stmt.c (gfc_trans_allocate): Ditto.
2976
2977 2010-06-15  Jakub Jelinek  <jakub@redhat.com>
2978
2979         PR fortran/44536
2980         * trans-openmp.c (gfc_omp_predetermined_sharing): Don't return
2981         OMP_CLAUSE_DEFAULT_SHARED for artificial vars with
2982         GFC_DECL_SAVED_DESCRIPTOR set.
2983         (gfc_omp_report_decl): New function.
2984         * trans.h (gfc_omp_report_decl): New prototype.
2985         * f95-lang.c (LANG_HOOKS_OMP_REPORT_DECL): Redefine.
2986
2987 2010-06-13  Daniel Franke  <franke.daniel@gmail.com>
2988
2989         PR fortran/31588
2990         PR fortran/43954
2991         * gfortranspec.c (lang_specific_driver): Removed deprecation
2992         warning for -M.
2993         * lang.opt: Add options -M, -MM, -MD, -MMD, -MF, -MG, -MP, -MT, -MQ.
2994         * lang-specs.h (CPP_FORWARD_OPTIONS): Add -M* options.
2995         * cpp.h (gfc_cpp_makedep): New.
2996         (gfc_cpp_add_dep): New.
2997         (gfc_cpp_add_target): New.
2998         * cpp.c (gfc_cpp_option): Add deps* members.
2999         (gfc_cpp_makedep): New.
3000         (gfc_cpp_add_dep): New.
3001         (gfc_cpp_add_target): New.
3002         (gfc_cpp_init_options): Initialize new options.
3003         (gfc_cpp_handle_option): Handle new options.
3004         (gfc_cpp_post_options): Map new options to libcpp-options.
3005         (gfc_cpp_init): Handle deferred -MQ and -MT options.
3006         (gfc_cpp_done): If requested, write dependencies to file.
3007         * module.c (gfc_dump_module): Add a module filename as target.
3008         * scanner.c (open_included_file): New parameter system; add the
3009         included file as dependency.
3010         (gfc_open_included_file): Add the included file as dependency.
3011         (gfc_open_intrinsic_module): Likewise.
3012         * invoke.texi: Removed deprecation warning for -M.
3013         * gfortran.texi: Removed Makefile-dependencies project.
3014
3015 2010-06-12  Daniel Franke  <franke.daniel@gmail.com>
3016
3017         * resolve.c (resolve_global_procedure): Improved checking if an
3018         explicit interface is required.
3019
3020 2010-06-12  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
3021
3022         * trans-decl.c (gfc_build_intrinsic_function_decls): Fix
3023         return type.
3024         * trans-intrinsic.c (gfc_conv_intrinsic_fdate): Fix argument type.
3025         (gfc_conv_intrinsic_ttynam): Likewise.
3026         (gfc_conv_intrinsic_trim): Likewise.
3027
3028 2010-06-12  Janus Weil  <janus@gcc.gnu.org>
3029
3030         PR fortran/40117
3031         * decl.c (match_procedure_in_type): Allow procedure lists (F08).
3032
3033 2010-06-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
3034
3035         * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Fix comment.
3036
3037 2010-06-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
3038
3039         * mathbuiltins.def: Add builtins that do not directly correspond
3040         to a Fortran intrinsic, with new macro OTHER_BUILTIN.
3041         * f95-lang.c (gfc_init_builtin_functions): Define OTHER_BUILTIN.
3042         * trans-intrinsic.c (gfc_intrinsic_map_t): Remove
3043         code_{r,c}{4,8,10,16} fields. Add
3044         {,complex}{float,double,long_double}_built_in fields.
3045         (gfc_intrinsic_map): Adjust definitions of DEFINE_MATH_BUILTIN,
3046         DEFINE_MATH_BUILTIN_C and LIB_FUNCTION accordingly. Add
3047         definition of OTHER_BUILTIN.
3048         (real_compnt_info): Remove unused struct.
3049         (builtin_decl_for_precision, builtin_decl_for_float_kind): New
3050         functions.
3051         (build_round_expr): Call builtin_decl_for_precision instead of
3052         series of if-else.
3053         (gfc_conv_intrinsic_aint): Call builtin_decl_for_float_kind
3054         instead of a switch.
3055         (gfc_build_intrinsic_lib_fndecls): Match
3056         {real,complex}{4,8,10,16}decl into the C-style built_in_decls.
3057         (gfc_get_intrinsic_lib_fndecl): Do not hardcode floating-point
3058         kinds.
3059         (gfc_conv_intrinsic_lib_function): Go through all the extended
3060         gfc_intrinsic_map.
3061         (gfc_trans_same_strlen_check): Call builtin_decl_for_float_kind
3062         instead of a switch.
3063         (gfc_conv_intrinsic_abs): Likewise.
3064         (gfc_conv_intrinsic_mod): Likewise.
3065         (gfc_conv_intrinsic_sign): Likewise.
3066         (gfc_conv_intrinsic_fraction): Likewise.
3067         (gfc_conv_intrinsic_nearest): Likewise.
3068         (gfc_conv_intrinsic_spacing): Likewise.
3069         (gfc_conv_intrinsic_rrspacing): Likewise.
3070         (gfc_conv_intrinsic_scale): Likewise.
3071         (gfc_conv_intrinsic_set_exponent): Likewise.
3072
3073 2010-06-11  Paul Thomas  <pault@gcc.gnu.org>
3074
3075         PR fortran/42051
3076         PR fortran/43896
3077         * trans-expr.c (gfc_conv_derived_to_class): Handle array-valued
3078         functions with CLASS formal arguments.
3079
3080 2010-06-10  Janus Weil  <janus@gcc.gnu.org>
3081
3082         PR fortran/44207
3083         * resolve.c (conformable_arrays): Handle allocatable components.
3084
3085 2010-06-10  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
3086
3087         PR fortran/38273
3088         * gfortran.texi: Document that Cray pointers cannot be function
3089         results.
3090
3091 2010-06-10  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
3092
3093         PR fortran/36234
3094         * gfortran.texi: Document lack of support for syntax
3095         "complex FUNCTION name*16()", and existence of alternative
3096         legacy syntax "complex*16 FUNCTION name()".
3097
3098 2010-06-10  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
3099
3100         PR fortran/43032
3101         * intrinsic.texi (FLUSH): Note the difference between FLUSH and
3102         POSIX's fsync(), and how to call the latter from Fortran code.
3103
3104 2010-06-10  Daniel Franke  <franke.daniel@gmail.com>
3105
3106         PR fortran/44457
3107         * interface.c (compare_actual_formal): Reject actual arguments with
3108         array subscript passed to ASYNCHRONOUS dummys.
3109
3110 2010-06-10  Daniel Kraft  <d@domob.eu>
3111
3112         PR fortran/38936
3113         * gfortran.h (enum gfc_statement): Add ST_ASSOCIATE, ST_END_ASSOCIATE.
3114         (struct gfc_symbol): New field `assoc'.
3115         (struct gfc_association_list): New struct.
3116         (struct gfc_code): New struct `block' in union, move `ns' there
3117         and add association list.
3118         (gfc_free_association_list): New method.
3119         (gfc_has_vector_subscript): Made public;
3120         * match.h (gfc_match_associate): New method.
3121         * parse.h (enum gfc_compile_state): Add COMP_ASSOCIATE.
3122         * decl.c (gfc_match_end): Handle ST_END_ASSOCIATE.
3123         * interface.c (gfc_has_vector_subscript): Made public.
3124         (compare_actual_formal): Rename `has_vector_subscript' accordingly.
3125         * match.c (gfc_match_associate): New method.
3126         (gfc_match_select_type): Change reference to gfc_code's `ns' field.
3127         * primary.c (match_variable): Don't allow names associated to expr here.
3128         * parse.c (decode_statement): Try matching ASSOCIATE statement.
3129         (case_exec_markers, case_end): Add ASSOCIATE statement.
3130         (gfc_ascii_statement): Hande ST_ASSOCIATE and ST_END_ASSOCIATE.
3131         (parse_associate): New method.
3132         (parse_executable): Handle ST_ASSOCIATE.
3133         (parse_block_construct): Change reference to gfc_code's `ns' field.
3134         * resolve.c (resolve_select_type): Ditto.
3135         (resolve_code): Ditto.
3136         (resolve_block_construct): Ditto and add comment.
3137         (resolve_select_type): Set association list in generated BLOCK to NULL.
3138         (resolve_symbol): Resolve associate names.
3139         * st.c (gfc_free_statement): Change reference to gfc_code's `ns' field
3140         and free association list.
3141         (gfc_free_association_list): New method.
3142         * symbol.c (gfc_new_symbol): NULL new field `assoc'.
3143         * trans-stmt.c (gfc_trans_block_construct): Change reference to
3144         gfc_code's `ns' field.
3145
3146 2010-06-10  Kai Tietz  <kai.tietz@onevision.com>
3147
3148         * error.c (error_print): Pre-initialize loc by NULL.
3149         * openmp.c (resolve_omp_clauses): Add explicit
3150         braces to avoid ambigous else.
3151         * array.c (match_subscript): Pre-initialize m to MATCH_ERROR.
3152
3153 2010-06-10  Gerald Pfeifer  <gerald@pfeifer.com>
3154
3155         * gfc-internals.texi: Move to GFDL 1.3.
3156         * gfortran.texi: Ditto.
3157         * intrinsic.texi: Ditto.
3158         * invoke.texi: Ditto.
3159
3160 2010-06-09  Daniel Franke  <franke.daniel@gmail.com>
3161
3162         PR fortran/44347
3163         * check.c (gfc_check_selected_real_kind): Verify that the
3164         actual arguments are scalar.
3165
3166 2010-06-09  Daniel Franke  <franke.daniel@gmail.com>
3167
3168         PR fortran/44359
3169         * intrinsic.c (gfc_convert_type_warn): Further improve -Wconversion.
3170
3171 2010-06-09  Janus Weil  <janus@gcc.gnu.org>
3172
3173         PR fortran/44430
3174         * dump-parse-tree.c (show_symbol): Avoid infinite loop.
3175
3176 2010-06-09  Steven G. Kargl  <kargl@gcc.gnu.org>
3177
3178         * fortran/symbol.c (check_conflict):  Remove an invalid conflict check.
3179
3180 2010-06-09  Steven G. Kargl  <kargl@gcc.gnu.org>
3181
3182         * fortran/intrinsic.c (add_functions): Change gfc_check_btest,
3183         gfc_check_ibclr, and gfc_check_ibset to gfc_check_bitfcn.
3184         * fortran/intrinsic.h: Remove prototypes for gfc_check_btest,
3185         gfc_check_ibclr, and gfc_check_ibset.  Add prototype for
3186         gfc_check_bitfcn.
3187         * fortran/check.c (nonnegative_check, less_than_bitsize1, 
3188         less_than_bitsize2): New functions.
3189         (gfc_check_btest): Renamed to gfc_check_bitfcn.  Use
3190         nonnegative_check and less_than_bitsize1.
3191         (gfc_check_ibclr, gfc_check_ibset): Removed.
3192         (gfc_check_ibits,gfc_check_mvbits): Use nonnegative_check and
3193         less_than_bitsize1.
3194
3195 2010-06-09  Janus Weil  <janus@gcc.gnu.org>
3196
3197         PR fortran/44211
3198         * resolve.c (resolve_typebound_function,resolve_typebound_subroutine):
3199         Resolve references.
3200
3201 2010-06-09  Kai Tietz  <kai.tietz@onevision.com>
3202
3203         * resolve.c (resolve_deallocate_expr): Avoid warning
3204         about possible use of iunitialized sym.
3205         (resolve_allocate_expr): Pre-initialize sym by NULL.
3206
3207 2010-06-09  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
3208
3209         PR fortran/43040
3210         * f95-lang.c (gfc_init_builtin_functions): Remove comment.
3211
3212 2010-06-08  Laurynas Biveinis  <laurynas.biveinis@gmail.com>
3213
3214         * trans-types.c (gfc_get_nodesc_array_type): Use typed GC
3215         allocation.
3216         (gfc_get_array_type_bounds): Likewise.
3217
3218         * trans-decl.c (gfc_allocate_lang_decl): Likewise.
3219         (gfc_find_module): Likewise.
3220
3221         * f95-lang.c (pushlevel): Likewise.
3222
3223         * trans.h (struct lang_type): Add variable_size GTY option.
3224         (struct lang_decl): Likewise.
3225
3226 2010-06-08  Tobias Burnus  <burnus@net-b.de>
3227
3228         PR fortran/44446
3229         * symbol.c (check_conflict): Move protected--external/procedure check ...
3230         * resolve.c (resolve_select_type): ... to the resolution stage.
3231
3232 2010-06-07  Tobias Burnus  <burnus@net-b.de>
3233
3234         * options.c (gfc_handle_option): Fix -fno-recursive.
3235
3236 2010-06-07  Tobias Burnus  <burnus@net-b.de>
3237
3238         * gfc-internals.texi (copyrights-gfortran): Fix copyright year format.
3239         * gfortran.texi (copyrights-gfortran): Ditto.
3240
3241 2010-06-07  Joseph Myers  <joseph@codesourcery.com>
3242
3243         * lang.opt (fshort-enums): Define using Var and VarExists.
3244         * options.c (gfc_handle_option): Don't set flag_short_enums here.
3245
3246 2010-06-05  Paul Thomas  <pault@gcc.gnu.org>
3247             Janus Weil  <janus@gcc.gnu.org>
3248
3249         PR fortran/43945
3250         * resolve.c (get_declared_from_expr): Move to before
3251         resolve_typebound_generic_call.  Make new_ref and class_ref
3252         ignorable if set to NULL.
3253         (resolve_typebound_generic_call): Once we have resolved the
3254         generic call, check that the specific instance is that which
3255         is bound to the declared type.
3256         (resolve_typebound_function,resolve_typebound_subroutine): Avoid
3257         freeing 'class_ref->next' twice.
3258
3259 2010-06-05  Paul Thomas  <pault@gcc.gnu.org>
3260
3261         PR fortran/43895
3262         * trans-array.c (structure_alloc_comps): Dereference scalar
3263         'decl' if it is a REFERENCE_TYPE. Tidy expressions containing
3264         TREE_TYPE (decl).
3265
3266 2010-06-04  Joseph Myers  <joseph@codesourcery.com>
3267
3268         * gfortranspec.c (append_arg, lang_specific_driver): Use
3269         GCC-specific formats in diagnostics.
3270
3271 2010-06-02  Tobias Burnus  <burnus@net-b.de>
3272
3273         PR fortran/44360
3274         * parse.c (gfc_fixup_sibling_symbols): Do not "fix" use-associated
3275         symbols.
3276
3277 2010-06-01  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
3278
3279         PR fortran/44371
3280         * match.c (gfc_match_stopcode): Move gfc_match_eos call inside 
3281         condition block.
3282
3283 2010-05-31  Steven G. Kargl  <kargl@gcc.gnu.org>
3284
3285         * fortran/gfortran.texi:  Fix typos in description of variable-format-
3286         expressions.
3287
3288 2010-05-31  Thomas Koenig  <tkoenig@gcc.gnu.org>
3289
3290         PR fortran/36928
3291         * dependency.c (gfc_check_section_vs_section):  Check
3292         for interleaving array assignments without conflicts.
3293
3294 2010-05-30  Janus Weil  <janus@gcc.gnu.org>
3295
3296         * gcc/fortran/gfortran.h (CLASS_DATA): New macro for accessing the
3297         $data component of a class container.
3298         * gcc/fortran/decl.c (attr_decl1): Use macro CLASS_DATA.
3299         * gcc/fortran/expr.c (gfc_check_pointer_assign,gfc_check_assign_symbol,
3300         gfc_has_ultimate_allocatable,gfc_has_ultimate_pointer): Ditto.
3301         * gcc/fortran/interface.c (matching_typebound_op): Ditto.
3302         * gcc/fortran/match.c (gfc_match_allocate, gfc_match_deallocate): Ditto.
3303         * gcc/fortran/parse.c (parse_derived): Ditto.
3304         * gcc/fortran/primary.c (gfc_match_varspec, gfc_variable_attr,
3305         gfc_expr_attr): Ditto.
3306         * gcc/fortran/resolve.c (resolve_structure_cons, find_array_spec,
3307         resolve_deallocate_expr, resolve_allocate_expr, resolve_select_type,
3308         resolve_fl_var_and_proc, resolve_typebound_procedure,
3309         resolve_fl_derived): Ditto.
3310         * gcc/fortran/symbol.c (gfc_type_compatible): Restructured.
3311         * gcc/fortran/trans-array.c (structure_alloc_comps): Use macro
3312         CLASS_DATA.
3313         * gcc/fortran/trans-decl.c (gfc_get_symbol_decl,
3314         gfc_trans_deferred_vars): Ditto.
3315         * gcc/fortran/trans-stmt.c (gfc_trans_allocate): Ditto.
3316
3317 2010-05-28  Tobias Burnus  <burnus@net-b.de>
3318
3319         * options.c (gfc_handle_option): Fix handling of -fno-whole-file.
3320
3321 2010-05-28  Joseph Myers  <joseph@codesourcery.com>
3322
3323         * gfortranspec.c (append_arg, lang_specific_driver): Use
3324         fatal_error instead of fatal.  Use warning instead of fprintf for
3325         warnings.
3326
3327 2010-05-28  Joseph Myers  <joseph@codesourcery.com>
3328
3329         * cpp.c (gfc_cpp_init_0): Use xstrerror instead of strerror.
3330         * module.c (write_char, gfc_dump_module, gfc_use_module): Use
3331         xstrerror instead of strerror.
3332
3333 2010-05-26  Joseph Myers  <joseph@codesourcery.com>
3334
3335         * cpp.c (cb_cpp_error): Save and restore
3336         global_dc->warn_system_headers, not variable warn_system_headers.
3337
3338 2010-05-26  Steven Bosscher  <steven@gcc.gnu.org>
3339
3340         * fortran/f95-lang.c: Do not include libfuncs.h, expr.h, and except.h.
3341
3342 2010-05-26  Steven Bosscher  <steven@gcc.gnu.org>
3343
3344         * trans-common.c: Do not include rtl.h, include output.h instead.
3345         * trans-decl.c: Likewise.
3346
3347 2010-05-26  Paul Thomas  <pault@gcc.gnu.org>
3348
3349         PR fortran/40011
3350         * resolve.c (resolve_global_procedure): Resolve the gsymbol's
3351         namespace before trying to reorder the gsymbols.
3352
3353 2010-05-25  Daniel Franke  <franke.daniel@gmail.com>
3354
3355         PR fortran/30668
3356         PR fortran/31346
3357         PR fortran/34260
3358         * resolve.c (resolve_global_procedure): Add check for global
3359         procedures with implicit interfaces and assumed-shape or optional
3360         dummy arguments. Verify that function return type, kind and string
3361         lengths match.
3362
3363 2010-05-21  Tobias Burnus  <burnus@net-b.de>
3364
3365         * gfortran.h: Do not include system.h.
3366         * bbt.c: Include system.h.
3367         * data.c: Ditto.
3368         * dependency.c: Ditto.
3369         * dump-parse-tree.c: Ditto.
3370         * arith.h: Do not include gfortran.h.
3371         * constructor.h: Do not include gfortran.h and splay-tree.h.
3372         * match.h: Do not include gfortran.h.
3373         * parse.h: Ditto.
3374         * target-memory.h: Ditto.
3375         * openmp.c: Do not include toplev.h and target.h.
3376         * trans-stmt.c: Ditto not include toplev.h.
3377         * primary.c: Ditto.
3378         * trans-common.c: Tell why toplev.h is needed. And
3379         do not include target.h.
3380         * trans-expr.c: Tell why toplev.h is needed.
3381         * trans-array.c: Ditto.
3382         * trans-openmp.c: Ditto.
3383         * trans-const.c: Ditto.
3384         * trans.c: Ditto.
3385         * trans-types.c: Ditto.
3386         * trans-io.c: Ditto.
3387         * trans-decl.c: Ditto.
3388         * scanner.c: Ditto.
3389         * convert.c: Ditto.
3390         * trans-intrinsic.c: Ditto.
3391         * options.c: Ditto.
3392
3393 2010-05-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3394
3395         PR fortran/43851
3396         * match.c (gfc_match_stopcode): Use gfc_match_init_expr. Go to cleanup
3397         before returning MATCH_ERROR. Add check for scalar. Add check for
3398         default integer kind.
3399
3400 2010-05-22  Janus Weil  <janus@gcc.gnu.org>
3401
3402         PR fortran/44212
3403         * match.c (gfc_match_select_type): On error jump back out of the local
3404         namespace.
3405         * parse.c (parse_derived): Defer creation of vtab symbols to resolution
3406         stage, more precisely to ...
3407         * resolve.c (resolve_fl_derived): ... this place.
3408
3409 2010-05-22  Janus Weil  <janus@gcc.gnu.org>
3410
3411         PR fortran/44213
3412         * resolve.c (ensure_not_abstract): Allow abstract types with
3413         non-abstract ancestors.
3414
3415 2010-05-21  Steven Bosscher  <steven@gcc.gnu.org>
3416
3417         * trans-const.c: Include realmpfr.h.
3418         * Make-lang.in: Update dependencies.
3419
3420 2010-05-21  Steven Bosscher  <steven@gcc.gnu.org>
3421
3422         * trans-const.c, trans-types.c, trans-intrinsic.c:
3423         Clean up redundant includes.
3424
3425 2010-05-20  Daniel Franke  <franke.daniel@gmail.com>
3426
3427         PR fortran/38407
3428         * lang.opt (Wunused-dummy-argument): New option.
3429         * gfortran.h (gfc_option_t): Add warn_unused_dummy_argument.
3430         * options.c (gfc_init_options): Disable warn_unused_dummy_argument.
3431         (set_Wall): Enable warn_unused_dummy_argument.
3432         (gfc_handle_option): Set warn_unused_dummy_argument according to
3433         command line.
3434         * trans-decl.c (generate_local_decl): Separate warnings about
3435         unused variables and unused dummy arguments.
3436         * invoke.texi: Documented new option.
3437
3438 2010-05-20  Steven Bosscher  <steven@gcc.gnu.org>
3439
3440         * trans-expr.c: Do not include convert.h, ggc.h, real.h, and gimple.h.
3441         (gfc_conv_string_tmp): Do not assert type comparibilty.
3442         *  trans-array.c: Do not include gimple.h, ggc.h, and real.h.
3443         (gfc_conv_expr_descriptor): Remove assert.
3444         * trans-common.c: Clarify why rtl.h and tm.h are included.
3445         * trans-openmp.c: Do not include ggc.h and real.h.
3446         Explain why gimple.h is included.
3447         * trans-const.c: Do not include ggc.h.
3448         * trans-stmt.c: Do not include gimple.h, ggc.h, and real.h.
3449         * trans.c: Do not include ggc.h and real.h.
3450         Explain why gimple.h is included.
3451         * trans-types.c: Do not include tm.h.  Explain why langhooks.h
3452         and dwarf2out.h are included.
3453         * trans-io.c: Do not include gimple.h and real.h.
3454         * trans-decl.c: Explain why gimple.h, tm.h, and rtl.h are included.
3455         * trans-intrinsic.c: Do not include gimple.h.  Explain why tm.h
3456         is included.
3457
3458 2010-05-20  Tobias Burnus  <burnus@net-b.de>
3459
3460         * options.c (gfc_init_options,gfc_post_options): Enable
3461         flag_associative_math by default.
3462
3463 2010-05-19 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3464
3465         PR fortran/43851
3466         * trans-stmt.c (gfc_trans_stop): Add generation of call to
3467         gfortran_error_stop_numeric. Fix up some whitespace. Use stop_string for
3468         blank STOP, handling a null expression. (gfc_trans_pause): Use
3469         pause_string for blank PAUSE.
3470         * trans.h: Add external function declaration for error_stop_numeric.
3471         * trans-decl.c (gfc_build_builtin_function_decls): Add the building of
3472         the declaration for the library call. Adjust whitespaces.
3473         * match.c (gfc_match_stopcode): Remove use of the actual stop code to
3474         signal no stop code. Match the expression following the stop and pass
3475         that to the translators. Remove the old use of digit matching.  Add
3476         checks that the stop_code expression is INTEGER or CHARACTER, constant,
3477         and if CHARACTER, default character KIND.
3478
3479 2010-05-19  Daniel Franke  <franke.daniel@gmail.com>
3480
3481         PR fortran/44055
3482         * lang.opt (Wconversion-extra): New option.
3483         * gfortran.h (gfc_option_t): Add warn_conversion_extra.
3484         * options.c (gfc_init_options): Disable -Wconversion-extra by default.
3485         (set_Wall): Enable -Wconversion.
3486         (gfc_handle_option): Set warn_conversion_extra.
3487         * intrinsic.c (gfc_convert_type_warn): Ignore kind conditions
3488         introduced for -Wconversion if -Wconversion-extra is present.
3489         * invoke.texi: Add -Wconversion to -Wall; document new behaviour of
3490         -Wconversion; document -Wconversion-extra.
3491
3492 2010-05-19  Daniel Franke  <franke.daniel@gmail.com>
3493
3494         PR fortran/42360
3495         * gfortran.h (gfc_has_default_initializer): New.
3496         * expr.c (gfc_has_default_initializer): New.
3497         * resolve.c (has_default_initializer): Removed, use
3498         gfc_has_default_initializer() instead. Updated all callers.
3499         * trans-array.c (has_default_initializer): Removed, use
3500         gfc_has_default_initializer() instead. Updated all callers.
3501         * trans-decl.c (generate_local_decl): Do not check the
3502         first component only to check for initializers, but use
3503         gfc_has_default_initializer() instead.
3504
3505 2010-05-19  Daniel Franke  <franke.daniel@gmail.com>
3506
3507         PR fortran/38404
3508         * primary.c (match_string_constant): Move start_locus just inside 
3509         the string.
3510         * data.c (create_character_intializer): Clarified truncation warning.
3511
3512 2010-05-19  Daniel Franke  <franke.daniel@gmail.com>
3513
3514         PR fortran/34505
3515         * intrinsic.h (gfc_check_float): New prototype.
3516         (gfc_check_sngl): New prototype.
3517         * check.c (gfc_check_float): New.
3518         (gfc_check_sngl): New.
3519         * intrinsic.c (add_functions): Moved DFLOAT from aliasing DBLE
3520         to be a specific for REAL. Added check routines for FLOAT, DFLOAT
3521         and SNGL.
3522         * intrinsic.texi: Removed individual nodes of FLOAT, DFLOAT and SNGL,
3523         added them to the list of specifics of REAL instead.
3524
3525 2010-05-17  Janus Weil  <janus@gcc.gnu.org>
3526
3527         PR fortran/43990
3528         * trans-expr.c (gfc_conv_structure): Remove unneeded and buggy code.
3529         This is now handled via 'gfc_class_null_initializer'.
3530
3531 2010-05-17  Janus Weil  <janus@gcc.gnu.org>
3532
3533         * class.c (gfc_add_component_ref,gfc_class_null_initializer,
3534         gfc_build_class_symbol,add_proc_component,add_proc_comps, 
3535         add_procs_to_declared_vtab1,copy_vtab_proc_comps,
3536         add_procs_to_declared_vtab,add_generic_specifics, 
3537         add_generics_to_declared_vtab,gfc_find_derived_vtab,
3538         find_typebound_proc_uop,gfc_find_typebound_proc,
3539         gfc_find_typebound_user_op,gfc_find_typebound_intrinsic_op, 
3540         gfc_get_tbp_symtree): Moved here from other places.
3541         * expr.c (gfc_add_component_ref,gfc_class_null_initializer): Move to
3542         class.c.
3543         * gfortran.h (gfc_build_class_symbol,gfc_find_derived_vtab,
3544         gfc_find_typebound_proc,gfc_find_typebound_user_op,
3545         gfc_find_typebound_intrinsic_op,gfc_get_tbp_symtree,
3546         gfc_add_component_ref, gfc_class_null_initializer): Moved to class.c.
3547         * Make-lang.in: Add class.o.
3548         * symbol.c (gfc_build_class_symbol,add_proc_component,add_proc_comps,
3549         add_procs_to_declared_vtab1,copy_vtab_proc_comps,
3550         add_procs_to_declared_vtab,add_generic_specifics,
3551         add_generics_to_declared_vtab,gfc_find_derived_vtab,
3552         find_typebound_proc_uop,gfc_find_typebound_proc,
3553         gfc_find_typebound_user_op,gfc_find_typebound_intrinsic_op,
3554         gfc_get_tbp_symtree): Move to class.c.
3555
3556 2010-05-17  Nathan Froyd  <froydnj@codesourcery.com>
3557
3558         * trans-types.c (gfc_init_types): Use build_function_type_list.
3559         (gfc_get_ppc_type): Likewise.
3560         * trans-decl.c (gfc_generate_constructors): Likewise.
3561         * f95-lang.c (build_builtin_fntypes): Likewise.
3562         (gfc_init_builtin_functions): Likewise.
3563         (DEF_FUNCTION_TYPE_0): Likewise.
3564         (DEF_FUNCTION_TYPE_1): Likewise.
3565         (DEF_FUNCTION_TYPE_2): Likewise.
3566         (DEF_FUNCTION_TYPE_3): Likewise.
3567         (DEF_FUNCTION_TYPE_4): Likewise.
3568         (DEF_FUNCTION_TYPE_5): Likewise.
3569         (DEF_FUNCTION_TYPE_6): Likewise.
3570         (DEF_FUNCTION_TYPE_7): Likewise.  Use ARG7.
3571         (DEF_FUNCTION_TYPE_VAR_0): Use build_varags_function_type_list.
3572  
3573 2010-05-17  Nathan Froyd  <froydnj@codesourcery.com>
3574
3575         * trans-array.c (gfc_trans_array_constructor_value): Use
3576         build_constructor instead of build_constructor_from_list.
3577         (gfc_build_constant_array_constructor): Likewise.
3578         * trans-decl.c (create_main_function): Likewise.
3579         * trans-stmt.c (gfc_trans_character_select): Likewise.
3580
3581 2010-05-17  Janus Weil  <janus@gcc.gnu.org>
3582
3583         PR fortran/44044
3584         * resolve.c (resolve_fl_var_and_proc): Move error messages here from ...
3585         (resolve_fl_variable_derived): ... this place.
3586         (resolve_symbol): Make sure function symbols (and their result
3587         variables) are not resolved twice.
3588
3589 2010-05-16  Daniel Franke  <franke.daniel@gmail.com>
3590
3591         PR fortran/35779
3592         * array.c (match_array_list): Revert change from 2010-05-13.
3593
3594 2010-05-16  Richard Guenther  <rguenther@suse.de>
3595
3596         * trans-decl.c (module_htab_decls_hash): Revert last change.
3597
3598 2010-05-16  Richard Guenther  <rguenther@suse.de>
3599
3600         * trans-decl.c (module_htab_decls_hash): Use IDENTIFIER_HASH_VALUE.
3601
3602 2010-05-16  Manuel López-Ibáñez  <manu@gcc.gnu.org>
3603
3604         * options.c (set_Wall): Remove special logic for Wuninitialized
3605         without -O.
3606
3607 2010-05-15  Janus Weil  <janus@gcc.gnu.org>
3608
3609         PR fortran/44154
3610         PR fortran/42647
3611         * trans-decl.c (gfc_trans_deferred_vars): Modify ordering of
3612         if branches.
3613
3614 2010-05-15  Janus Weil  <janus@gcc.gnu.org>
3615
3616         PR fortran/43207
3617         PR fortran/43969
3618         * gfortran.h (gfc_class_null_initializer): New prototype.
3619         * expr.c (gfc_class_null_initializer): New function to build a NULL
3620         initializer for CLASS pointers.
3621         * symbol.c (gfc_build_class_symbol): Modify internal naming of class
3622         containers. Remove default NULL initialization of $data component.
3623         * trans.c (gfc_allocate_array_with_status): Fix wording of an error 
3624         message.
3625         * trans-expr.c (gfc_conv_initializer,gfc_trans_subcomponent_assign):
3626         Use new function 'gfc_class_null_initializer'.
3627         * trans-intrinsic.c (gfc_conv_allocated): Handle allocatable scalar
3628         class variables.
3629
3630 2010-05-14  Steven G. Kargl  <kargl@gcc.gnu.org>
3631
3632         PR fortran/44135
3633         * fortran/interface.c (get_sym_storage_size): Use signed instead of
3634         unsigned mpz_get_?i routines.
3635
3636 2010-05-14  Jakub Jelinek  <jakub@redhat.com>
3637
3638         * trans.c (trans_code): Set backend locus early.
3639         * trans-decl.c (gfc_get_fake_result_decl): Use source location
3640         of the function instead of current input_location.
3641
3642 2010-05-13  Daniel Franke  <franke.daniel@gmail.com>
3643
3644         PR fortran/35779
3645         * intrinsic.c (gfc_init_expr): Renamed to gfc_init_expr_flag.
3646         Updated all usages.
3647         * expr.c (init_flag): Removed; use gfc_init_expr_flag everywhere.
3648         * array.c (match_array_list): Pass on gfc_init_expr_flag when matching
3649         iterators.
3650
3651 2010-05-13  Jakub Jelinek  <jakub@redhat.com>
3652
3653         PR fortran/44036
3654         * openmp.c (resolve_omp_clauses): Allow procedure pointers in clause
3655         variable lists.
3656         * trans-openmp.c (gfc_omp_privatize_by_reference): Don't privatize
3657         by reference dummy procedures or non-dummy procedure pointers.
3658         (gfc_omp_predetermined_sharing): Return
3659         OMP_CLAUSE_DEFAULT_FIRSTPRIVATE for dummy procedures.
3660
3661 2010-05-11  Daniel Franke  <franke.daniel@gmail.com>
3662
3663         PR fortran/43711
3664         * openmp.c (gfc_match_omp_taskwait): Report unexpected characters
3665         after OMP statement.
3666         (gfc_match_omp_critical): Likewise.
3667         (gfc_match_omp_flush): Likewise.
3668         (gfc_match_omp_workshare): Likewise.
3669         (gfc_match_omp_master): Likewise.
3670         (gfc_match_omp_ordered): Likewise.
3671         (gfc_match_omp_atomic): Likewise.
3672         (gfc_match_omp_barrier): Likewise.
3673         (gfc_match_omp_end_nowait): Likewise.
3674
3675 2010-05-11  Daniel Franke  <franke.daniel@gmail.com>
3676
3677         PR fortran/31820
3678         * resolve.c (validate_case_label_expr): Removed FIXME.
3679         (resolve_select): Raise default warning on case labels out of range
3680         of the case expression.
3681
3682 2010-05-10  Daniel Franke  <franke.daniel@gmail.com>
3683
3684         PR fortran/27866
3685         PR fortran/35003
3686         PR fortran/42809
3687         * intrinsic.c (gfc_convert_type_warn): Be more discriminative
3688         about conversion warnings.
3689
3690 2010-05-10  Janus Weil  <janus@gcc.gnu.org>
3691
3692         PR fortran/44044
3693         * match.c (gfc_match_select_type): Move error message to
3694         resolve_select_type.
3695         * resolve.c (resolve_select_type): Error message moved here from
3696         gfc_match_select_type. Correctly set type of temporary.
3697
3698 2010-05-10  Richard Guenther  <rguenther@suse.de>
3699
3700         * trans-decl.c (gfc_build_library_function_decl): Split out
3701         worker to ...
3702         (build_library_function_decl_1): ... this new function.
3703         Set a fnspec attribute if a specification was provided.
3704         (gfc_build_library_function_decl_with_spec): New function.
3705         (gfc_build_intrinsic_function_decls): Annotate internal_pack
3706         and internal_unpack.
3707
3708 2010-05-07  Daniel Franke  <franke.daniel@gmail.com>
3709
3710         PR fortran/40728
3711         * intrinc.c (gfc_is_intrinsic): Do not prematurely mark symbol
3712         as external.
3713
3714 2010-05-07  Jason Merrill  <jason@redhat.com>
3715
3716         * trans-expr.c (gfc_conv_procedure_call): Rename nullptr to null_ptr
3717         to avoid -Wc++-compat warning.
3718
3719 2010-05-06  Manuel López-Ibáñez  <manu@gcc.gnu.org>
3720
3721         PR 40989
3722         * options.c (gfc_handle_option): Add argument kind.
3723         * gfortran.h (gfc_handle_option): Update declaration.
3724
3725 2010-05-06  Tobias Burnus  <burnus@net-b.de>
3726
3727         PR fortran/43985
3728         * trans-types.c (gfc_sym_type): Mark Cray pointees as
3729         GFC_POINTER_TYPE_P.
3730
3731 2010-05-05  Daniel Franke  <franke.daniel@gmail.com>
3732
3733         PR fortran/32331
3734         * resolve.c (traverse_data_list): Rephrase error message for
3735         non-constant bounds in data-implied-do.
3736
3737 2010-05-05  Daniel Franke  <franke.daniel@gmail.com>
3738
3739         PR fortran/24978
3740         * gfortran.h: Removed repeat count from constructor, removed
3741         all usages.
3742         * data.h (gfc_assign_data_value_range): Changed return value from
3743         void to gfc_try.
3744         * data.c (gfc_assign_data_value): Add location to constructor element.
3745         (gfc_assign_data_value_range): Call gfc_assign_data_value()
3746         for each element in range. Return early if an error was generated.
3747         * resolve.c (check_data_variable): Stop early if range assignment
3748         generated an error.
3749
3750 2010-05-05  Janus Weil  <janus@gcc.gnu.org>
3751
3752         PR fortran/43696
3753         * resolve.c (resolve_fl_derived): Some fixes for class variables.
3754         * symbol.c (gfc_build_class_symbol): Add separate class container for
3755         class pointers.
3756
3757 2010-05-03  Steven G. Kargl  <kargl@gcc.gnu.org>
3758
3759         PR fortran/43592
3760         * fortran/parse.c (parse_interface): Do not dereference a NULL pointer.
3761
3762 2010-05-02  Tobias Burnus  <burnus@net-b.de>
3763
3764         PR fortran/18918
3765         * intrinsic.c (add_functions): Fix GFC_STD and add gfc_resolve_ calls
3766         for lcobound, ucobound, image_index and this_image.
3767         * intrinsic.h (gfc_resolve_lcobound, gfc_resolve_this_image,
3768         gfc_resolve_image_index, gfc_resolve_ucobound): New prototypes.
3769         * iresolve.c (gfc_resolve_lcobound, gfc_resolve_this_image,
3770         gfc_resolve_image_index, gfc_resolve_ucobound, resolve_bound): New
3771         functions.
3772         (gfc_resolve_lbound, gfc_resolve_ubound): Use resolve_bound.
3773
3774 2010-04-30  Tobias Burnus  <burnus@net-b.de>
3775
3776         PR fortran/18918
3777         PR fortran/43931
3778         *  trans-types.c (gfc_get_array_descriptor_base): Fix index
3779         calculation for array descriptor types.
3780
3781 2010-04-29  Janus Weil  <janus@gcc.gnu.org>
3782
3783         PR fortran/43896
3784         * symbol.c (add_proc_component,copy_vtab_proc_comps): Remove
3785         initializers for PPC members of the vtabs.
3786
3787 2010-04-29  Janus Weil  <janus@gcc.gnu.org>
3788
3789         PR fortran/42274
3790         * symbol.c (add_proc_component,add_proc_comps): Correctly set the 'ppc'
3791         attribute for all PPC members of the vtypes.
3792         (copy_vtab_proc_comps): Copy the correct interface.
3793         * trans.h (gfc_trans_assign_vtab_procs): Modified prototype.
3794         * trans-expr.c (gfc_trans_assign_vtab_procs): Pass the derived type as
3795         a dummy argument and make sure all PPC members of the vtab are
3796         initialized correctly.
3797         (gfc_conv_derived_to_class,gfc_trans_class_assign): Additional argument
3798         in call to gfc_trans_assign_vtab_procs.
3799         * trans-stmt.c (gfc_trans_allocate): Ditto.
3800
3801 2010-04-29  Paul Thomas  <pault@gcc.gnu.org>
3802
3803         PR fortran/43326
3804         * resolve.c (resolve_typebound_function): Renamed
3805         resolve_class_compcall.Do all the detection of class references
3806         here.
3807         (resolve_typebound_subroutine): resolve_class_typebound_call
3808         renamed. Otherwise same as resolve_typebound_function.
3809         (gfc_resolve_expr): Call resolve_typebound_function.
3810         (resolve_code): Call resolve_typebound_subroutine.
3811
3812 2010-04-29  Janus Weil  <janus@gcc.gnu.org>
3813
3814         PR fortran/43492
3815         * resolve.c (resolve_typebound_generic_call): For CLASS methods
3816         pass back the specific symtree name, rather than the target
3817         name.
3818
3819 2010-04-29  Paul Thomas  <pault@gcc.gnu.org>
3820
3821         PR fortran/42353
3822         * resolve.c (resolve_structure_cons): Make the initializer of
3823         the vtab component 'extends' the same type as the component.
3824
3825 2010-04-29  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
3826
3827         PR fortran/42680
3828         * interface.c (check_interface1): Pass symbol name rather than NULL to
3829         gfc_compare_interfaces.(gfc_compare_interfaces): Add assert to
3830         trap MULL. (gfc_compare_derived_types): Revert previous change
3831         incorporated incorrectly during merge from trunk, r155778.
3832         * resolve.c (check_generic_tbp_ambiguity): Pass symbol name rather
3833         than NULL to gfc_compare_interfaces.
3834         * symbol.c (add_generic_specifics): Likewise.
3835
3836 2010-02-29  Janus Weil  <janus@gcc.gnu.org>
3837
3838         PR fortran/42353
3839         * interface.c (gfc_compare_derived_types): Add condition for vtype.
3840         * symbol.c (gfc_find_derived_vtab): Sey access to private.
3841         (gfc_find_derived_vtab): Likewise.
3842         * module.c (ab_attribute): Add enumerator AB_VTAB.
3843         (mio_symbol_attribute): Use new attribute, AB_VTAB.
3844         (check_for_ambiguous): Likewise.
3845
3846 2010-04-29  Paul Thomas  <pault@gcc.gnu.org>
3847             Janus Weil  <janus@gcc.gnu.org>
3848
3849         PR fortran/41829
3850         * trans-expr.c (select_class_proc): Remove function.
3851         (conv_function_val): Delete reference to previous.
3852         (gfc_conv_derived_to_class): Add second argument to the call to
3853         gfc_find_derived_vtab.
3854         (gfc_conv_structure): Exclude proc_pointer components when
3855         accessing $data field of class objects.
3856         (gfc_trans_assign_vtab_procs): New function.
3857         (gfc_trans_class_assign): Add second argument to the call to
3858         gfc_find_derived_vtab.
3859         * symbol.c (gfc_build_class_symbol): Add delayed_vtab arg and
3860         implement holding off searching for the vptr derived type.
3861         (add_proc_component): New function.
3862         (add_proc_comps): New function.
3863         (add_procs_to_declared_vtab1): New function.
3864         (copy_vtab_proc_comps): New function.
3865         (add_procs_to_declared_vtab): New function.
3866         (void add_generic_specifics): New function.
3867         (add_generics_to_declared_vtab): New function.
3868         (gfc_find_derived_vtab): Add second argument to the call to
3869         gfc_find_derived_vtab. Add the calls to
3870         add_procs_to_declared_vtab and add_generics_to_declared_vtab.
3871         * decl.c (build_sym, build_struct): Use new arg in calls to
3872         gfc_build_class_symbol.
3873         * gfortran.h : Add vtype bitfield to symbol_attr. Remove the
3874         definition of struct gfc_class_esym_list. Modify prototypes
3875         of gfc_build_class_symbol and gfc_find_derived_vtab.
3876         * trans-stmt.c (gfc_trans_allocate): Add second argument to the
3877         call to gfc_find_derived_vtab.
3878         * module.c : Add the vtype attribute.
3879         * trans.h : Add prototype for gfc_trans_assign_vtab_procs.
3880         * resolve.c (resolve_typebound_generic_call): Add second arg
3881         to pass along the generic name for class methods.
3882         (resolve_typebound_call): The same.
3883         (resolve_compcall): Use the second arg to carry the generic
3884         name from the above. Remove the reference to class_esym.
3885         (check_members, check_class_members, resolve_class_esym,
3886         hash_value_expr): Remove functions.
3887         (resolve_class_compcall, resolve_class_typebound_call): Modify
3888         to use vtable rather than member by member calls.
3889         (gfc_resolve_expr): Modify second arg in call to
3890         resolve_compcall.
3891         (resolve_select_type): Add second arg in call to
3892         gfc_find_derived_vtab.
3893         (resolve_code): Add second arg in call resolve_typebound_call.
3894         (resolve_fl_derived): Exclude vtypes from check for late
3895         procedure definitions. Likewise for checking of explicit
3896         interface and checking of pass arg.
3897         * iresolve.c (gfc_resolve_extends_type_of): Add second arg in
3898         calls to gfc_find_derived_vtab.
3899         * match.c (select_type_set_tmp): Use new arg in call to
3900         gfc_build_class_symbol.
3901         * trans-decl.c (gfc_get_symbol_decl): Complete vtable if
3902         necessary.
3903         * parse.c (endType): Finish incomplete classes.
3904
3905 2010-04-28  Tobias Burnus  <burnus@net-b.de>
3906
3907         PR fortran/18918
3908         PR fortran/43919
3909         * simplify.c (simplify_cobound): Handle scalar coarrays.
3910
3911 2010-04-27  Tobias Burnus  <burnus@net-b.de>
3912
3913         * gfc-internals.texi: Update copyright year.
3914         * gfortran.texi: Ditto.
3915         * invoke.texi: Ditto.
3916
3917 2010-04-27  Tobias Burnus  <burnus@net-b.de>
3918
3919         PR fortran/18918
3920         * resolve.c (resolve_allocate_expr): Allow array coarrays.
3921         * trans-types.h (gfc_get_array_type_bounds): Update prototype.
3922         * trans-types.c (gfc_get_array_type_bounds,
3923         gfc_get_array_descriptor_base): Add corank argument.
3924         * trans-array.c (gfc_array_init_size): Handle corank.
3925         (gfc_trans_create_temp_array, gfc_array_allocate,
3926         gfc_conv_expr_descriptor): Add corank argument to call.
3927         * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Ditto.
3928
3929 2010-04-24  Steven G. Kargl  <kargl@gcc.gnu.org>
3930
3931         PR fortran/30073
3932         PR fortran/43793
3933         * trans-array.c (gfc_trans_array_bound_check): Use TREE_CODE instead
3934         of mucking with a tree directly.
3935
3936 2010-04-24  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
3937
3938         PR fortran/43832
3939         * io.c (gfc_match_open): Remove branch to syntax error. Add call to
3940         gfc_error with new error message.
3941
3942 2010-04-24  Paul Thomas  <pault@gcc.gnu.org>
3943
3944         PR fortran/43841
3945         PR fortran/43843
3946         * trans-expr.c (gfc_conv_expr): Supply an address expression for
3947         GFC_SS_REFERENCE.
3948         (gfc_conv_expr_reference): Call gfc_conv_expr and return for
3949         GFC_SS_REFERENCE.
3950         * trans-array.c (gfc_add_loop_ss_code): Store the value rather
3951         than the address of a GFC_SS_REFERENCE.
3952         * trans.h : Change comment on GFC_SS_REFERENCE. 
3953
3954 2010-04-22  Richard Guenther  <rguenther@suse.de>
3955
3956         PR fortran/43829
3957         * resolve.c (gfc_resolve_index): Wrap around ...
3958         (gfc_resolve_index_1): ... this.  Add parameter to allow
3959         any integer kind index type.
3960         (resolve_array_ref): Allow any integer kind for the start
3961         index of an array ref.
3962
3963 2010-04-21  Jakub Jelinek  <jakub@redhat.com>
3964
3965         PR fortran/43836
3966         * f95-lang.c (gfc_define_builtin): Set TREE_NOTHROW on
3967         the decl.
3968
3969 2010-04-20  Harald Anlauf  <anlauf@gmx.de>
3970
3971         * intrinsic.c (sort_actual): Remove 'is' in error message.
3972
3973 2010-04-20  Paul Thomas  <pault@gcc.gnu.org>
3974
3975         PR fortran/43227
3976         * resolve.c (resolve_fl_derived): If a component character
3977         length has not been resolved, do so now.
3978         (resolve_symbol): The same as above for a symbol character
3979         length.
3980         * trans-decl.c (gfc_create_module_variable): A 'length' decl is
3981         not needed for a character valued, procedure pointer.
3982
3983         PR fortran/43266
3984         * resolve.c (ensure_not_abstract_walker): If 'overriding' is
3985         not found, return FAILURE rather than ICEing.
3986
3987 2010-04-19  Jakub Jelinek  <jakub@redhat.com>
3988
3989         PR fortran/43339
3990         * openmp.c (gfc_resolve_do_iterator): Only make iteration vars for
3991         sequential loops private in the innermost containing task region.
3992
3993 2010-04-18  Eric Botcazou  <ebotcazou@adacore.com>
3994
3995         * f95-lang.c (gfc_init_decl_processing): Remove second argument in call
3996         to build_common_tree_nodes.
3997
3998 2010-04-17  Steven G. Kargl  <kargl@gcc.gnu.org>
3999
4000         PR fortran/31538
4001         * fortran/trans-array.c (gfc_conv_ss_startstride): Remove the use of
4002         gfc_msg_bounds by using 'Array bound mismatch' directly.
4003         (gfc_trans_dummy_array_bias):  Remove the use of gfc_msg_bounds.  Reword
4004         error message to include the mismatch in the extent of array bound.
4005         * fortran/trans.c: Remove gfc_msg_bounds.  It is only used in one place.
4006         * fortran/trans.h: Remove extern definition of gfc_msg_bounds.
4007
4008 2010-04-17  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
4009
4010         * gfortran.texi: Update information on temporary file locations.
4011
4012 2010-04-16  Jakub Jelinek  <jakub@redhat.com>
4013
4014         * trans-decl.c (gfc_build_qualified_array): Ensure
4015         ubound.N and lbound.N artificial variable names don't appear
4016         in debug info.
4017
4018 2010-04-15  Steven G. Kargl  <kargl@gcc.gnu.org>
4019
4020         PR fortran/30073
4021         * trans-array.c (gfc_trans_array_bound_check): Eliminate a redundant
4022         block of code.  Set name to the variable associated with the descriptor.
4023
4024 2010-04-15  Jakub Jelinek  <jakub@redhat.com>
4025
4026         * trans-decl.c (gfc_build_qualified_array): Clear DECL_IGNORED_P
4027         on VAR_DECL LBOUND and/or UBOUND, even for -O1.
4028
4029 2010-04-14  Steven G. Kargl  <kargl@gcc.gnu.org>
4030
4031         * intrinsic.texi: Add the missing specific name of intrinsic
4032         procedure where the specific name is identical to the generic name.
4033         Fix inconsistent or mismatch in the argument names in intrinsic
4034         procedure descriptions.  Add the SCALAR allocatable description to
4035         ALLOCATED.
4036
4037 2010-04-14  Tobias Burnus  <burnus@net-b.de>
4038
4039         PR fortran/18918
4040         * array.c (gfc_find_array_ref): Handle codimensions.
4041         (gfc_match_array_spec,gfc_match_array_ref): Use gfc_fatal_error.
4042         * check.c (is_coarray, dim_corank_check, gfc_check_lcobound,
4043         gfc_check_image_index, gfc_check_this_image, gfc_check_ucobound):
4044         New functions.
4045         * gfortran.h (gfc_isym_id): Add GFC_ISYM_IMAGE_INDEX,
4046         GFC_ISYM_LCOBOUND, GFC_ISYM_THIS_IMAGE,
4047         GFC_ISYM_UCOBOUND.
4048         * intrinsic.h (add_functions): Add this_image, image_index,
4049         lcobound and ucobound intrinsics.
4050         * intrinsic.c (gfc_check_lcobound,gfc_check_ucobound,
4051         gfc_check_image_index, gfc_check_this_image,
4052         gfc_simplify_image_index, gfc_simplify_lcobound,
4053         gfc_simplify_this_image, gfc_simplify_ucobound):
4054         New function prototypes.
4055         * intrinsic.texi (IMAGE_INDEX, LCOBOUND, THIS_IMAGE
4056         IMAGE_INDEX): Document new intrinsic functions.
4057         * match.c (gfc_match_critical, sync_statement): Make -fcoarray=none
4058         error fatal.
4059         * simplify.c (simplify_bound_dim): Handle coarrays.
4060         (simplify_bound): Update simplify_bound_dim call.
4061         (gfc_simplify_num_images): Add -fcoarray=none check.
4062         (simplify_cobound, gfc_simplify_lcobound, gfc_simplify_ucobound,
4063         gfc_simplify_ucobound, gfc_simplify_ucobound): New functions.
4064
4065 2010-04-14  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
4066
4067         PR fortran/43747
4068         * constructor.c: Fix typo in comment.
4069         * expr.c (find_array_section): Add check for max array limit.
4070
4071 2010-04-13  Iain Sandoe  <iains@gcc.gnu.org>
4072
4073         PR bootstrap/31400
4074         * gfortranspec.c (lookup_option): Check for -static and return
4075         OPTION_static.
4076         (lang_specific_driver): Break when OPTION_static is discovered.
4077
4078 2010-04-12  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
4079
4080         * array.c (extract_element): Restore function from trunk.
4081         (gfc_get_array_element): Restore function from trunk.
4082         (gfc_expand_constructor): Restore check against
4083         flag_max_array_constructor.
4084         * constructor.c (node_copy_and_append): Delete unused.
4085         * gfortran.h: Delete comment and extra include.
4086         * constructor.h: Bump copyright and clean up TODO comments.
4087         * resolve.c: Whitespace.
4088
4089 2010-04-12  Daniel Franke  <franke.daniel@gmail.com>
4090
4091         * simplify.c (compute_dot_product): Replaced usage of ADVANCE macro
4092         with direct access access to elements. Adjusted prototype, fixed all
4093         callers.
4094         (gfc_simplify_dot_product): Removed duplicate check for zero-sized
4095         array.
4096         (gfc_simplify_matmul): Removed usage of ADVANCE macro.
4097         (gfc_simplify_spread): Removed workaround, directly insert elements
4098         at a given array position.
4099         (gfc_simplify_transpose): Likewise.
4100         (gfc_simplify_pack): Replaced usage of ADVANCE macro with corresponding
4101         function calls.
4102         (gfc_simplify_unpack): Likewise.
4103
4104 2010-04-12  Daniel Franke  <franke.daniel@gmail.com>
4105
4106         * simplify.c (only_convert_cmplx_boz): Renamed to ...
4107         (convert_boz): ... this and moved to start of file.
4108         (gfc_simplify_abs): Whitespace fix.
4109         (gfc_simplify_acos): Whitespace fix.
4110         (gfc_simplify_acosh): Whitespace fix.
4111         (gfc_simplify_aint): Whitespace fix.
4112         (gfc_simplify_dint): Whitespace fix.
4113         (gfc_simplify_anint): Whitespace fix.
4114         (gfc_simplify_and): Replaced if-gate by more common switch-over-type.
4115         (gfc_simplify_dnint): Whitespace fix.
4116         (gfc_simplify_asin): Whitespace fix.
4117         (gfc_simplify_asinh): Moved creation of result-expr out of switch.
4118         (gfc_simplify_atan): Likewise.
4119         (gfc_simplify_atanh): Whitespace fix.
4120         (gfc_simplify_atan2): Whitespace fix.
4121         (gfc_simplify_bessel_j0): Removed ATTRIBUTE_UNUSED.
4122         (gfc_simplify_bessel_j1): Likewise.
4123         (gfc_simplify_bessel_jn): Likewise.
4124         (gfc_simplify_bessel_y0): Likewise.
4125         (gfc_simplify_bessel_y1): Likewise.
4126         (gfc_simplify_bessel_yn): Likewise.
4127         (gfc_simplify_ceiling): Reorderd statements.
4128         (simplify_cmplx): Use convert_boz(), check for constant arguments.
4129         Whitespace fix.
4130         (gfc_simplify_cmplx): Use correct default kind. Removed check for
4131         constant arguments.
4132         (gfc_simplify_complex): Replaced if-gate. Removed check for
4133         constant arguments.
4134         (gfc_simplify_conjg): Whitespace fix.
4135         (gfc_simplify_cos): Whitespace fix.
4136         (gfc_simplify_cosh): Replaced if-gate by more common switch-over-type.
4137         (gfc_simplify_dcmplx): Removed check for constant arguments.
4138         (gfc_simplify_dble): Use convert_boz() and gfc_convert_constant().
4139         (gfc_simplify_digits): Whitespace fix.
4140         (gfc_simplify_dim): Whitespace fix.
4141         (gfc_simplify_dprod): Reordered statements.
4142         (gfc_simplify_erf): Whitespace fix.
4143         (gfc_simplify_erfc): Whitespace fix.
4144         (gfc_simplify_epsilon): Whitespace fix.
4145         (gfc_simplify_exp): Whitespace fix.
4146         (gfc_simplify_exponent): Use convert_boz().
4147         (gfc_simplify_floor): Reorderd statements.
4148         (gfc_simplify_gamma): Whitespace fix.
4149         (gfc_simplify_huge): Whitespace fix.
4150         (gfc_simplify_iand): Whitespace fix.
4151         (gfc_simplify_ieor): Whitespace fix.
4152         (simplify_intconv): Use gfc_convert_constant().
4153         (gfc_simplify_int): Use simplify_intconv().
4154         (gfc_simplify_int2): Reorderd statements.
4155         (gfc_simplify_idint): Reorderd statements.
4156         (gfc_simplify_ior): Whitespace fix.
4157         (gfc_simplify_ishftc): Removed duplicate type check.
4158         (gfc_simplify_len): Use range_check() instead of manual range check.
4159         (gfc_simplify_lgamma): Removed ATTRIBUTE_UNUSED. Whitespace fix.
4160         (gfc_simplify_log): Whitespace fix.
4161         (gfc_simplify_log10): Whitespace fix.
4162         (gfc_simplify_minval): Whitespace fix.
4163         (gfc_simplify_maxval): Whitespace fix.
4164         (gfc_simplify_mod): Whitespace fix.
4165         (gfc_simplify_modulo): Whitespace fix.
4166         (simplify_nint): Reorderd statements.
4167         (gfc_simplify_not): Whitespace fix.
4168         (gfc_simplify_or): Replaced if-gate by more common switch-over-type.
4169         (gfc_simplify_radix): Removed unused result-variable. Whitespace fix.
4170         (gfc_simplify_range): Removed unused result-variable. Whitespace fix.
4171         (gfc_simplify_real): Use convert_boz() and gfc_convert_constant().
4172         (gfc_simplify_realpart): Whitespace fix.
4173         (gfc_simplify_selected_char_kind): Removed unused result-variable.
4174         (gfc_simplify_selected_int_kind): Removed unused result-variable.
4175         (gfc_simplify_selected_real_kind): Removed unused result-variable.
4176         (gfc_simplify_sign): Whitespace fix.
4177         (gfc_simplify_sin): Whitespace fix.
4178         (gfc_simplify_sinh): Replaced if-gate by more common switch-over-type.
4179         (gfc_simplify_sqrt): Avoided goto by inlining check. Whitespace fix.
4180         (gfc_simplify_tan): Replaced if-gate by more common switch-over-type.
4181         (gfc_simplify_tanh): Replaced if-gate by more common switch-over-type.
4182         (gfc_simplify_xor): Replaced if-gate by more common switch-over-type.
4183
4184 2010-04-12  Daniel Franke  <franke.daniel@gmail.com>
4185
4186         * gfortran.h (gfc_start_constructor): Removed.
4187         (gfc_get_array_element): Removed.
4188         * array.c (gfc_start_constructor): Removed, use gfc_get_array_expr 
4189         instead. Fixed all callers.
4190         (extract_element): Removed.
4191         (gfc_expand_constructor): Temporarily removed check for
4192         max-array-constructor. Will be re-introduced later if still required.
4193         (gfc_get_array_element): Removed, use gfc_constructor_lookup_expr
4194         instead. Fixed all callers.
4195         * expr.c (find_array_section): Replaced manual lookup of elements
4196         by gfc_constructor_lookup.
4197
4198 2010-04-12  Daniel Franke  <franke.daniel@gmail.com>
4199
4200         * gfortran.h (gfc_get_null_expr): New prototype.
4201         (gfc_get_operator_expr): New prototype.
4202         (gfc_get_character_expr): New prototype.
4203         (gfc_get_iokind_expr): New prototype.
4204         * expr.c (gfc_get_null_expr): New.
4205         (gfc_get_character_expr): New.
4206         (gfc_get_iokind_expr): New.
4207         (gfc_get_operator_expr): Moved here from matchexp.c (build_node).
4208         * matchexp.c (build_node): Renamed and moved to
4209         expr.c (gfc_get_operator_expr). Reordered arguments to match 
4210         other functions. Fixed all callers.
4211         (gfc_get_parentheses): Use specific function to build expr.
4212         * array.c (gfc_match_array_constructor): Likewise.
4213         * arith.c (eval_intrinsic): Likewise.
4214         (gfc_hollerith2int): Likewise.
4215         (gfc_hollerith2real): Likewise.
4216         (gfc_hollerith2complex): Likewise.
4217         (gfc_hollerith2logical): Likewise.
4218         * data.c (create_character_intializer): Likewise.
4219         * decl.c (gfc_match_null): Likewise.
4220         (enum_initializer): Likewise.
4221         * io.c (gfc_match_format): Likewise.
4222         (match_io): Likewise.
4223         * match.c (gfc_match_nullify): Likewise.
4224         * primary.c (match_string_constant): Likewise.
4225         (match_logical_constant): Likewise.
4226         (build_actual_constructor): Likewise.
4227         * resolve.c (build_default_init_expr): Likewise.
4228         * symbol.c (generate_isocbinding_symbol): Likewise.
4229         (gfc_build_class_symbol): Likewise.
4230         (gfc_find_derived_vtab): Likewise.
4231         * simplify.c (simplify_achar_char): Likewise.
4232         (gfc_simplify_adjustl): Likewise.
4233         (gfc_simplify_adjustr): Likewise.
4234         (gfc_simplify_and): Likewise.
4235         (gfc_simplify_bit_size): Likewise.
4236         (gfc_simplify_is_iostat_end): Likewise.
4237         (gfc_simplify_is_iostat_eor): Likewise.
4238         (gfc_simplify_isnan): Likewise.
4239         (simplify_bound): Likewise.
4240         (gfc_simplify_leadz): Likewise.
4241         (gfc_simplify_len_trim): Likewise.
4242         (gfc_simplify_logical): Likewise.
4243         (gfc_simplify_maxexponent): Likewise.
4244         (gfc_simplify_minexponent): Likewise.
4245         (gfc_simplify_new_line): Likewise.
4246         (gfc_simplify_null): Likewise.
4247         (gfc_simplify_or): Likewise.
4248         (gfc_simplify_precision): Likewise.
4249         (gfc_simplify_repeat): Likewise.
4250         (gfc_simplify_scan): Likewise.
4251         (gfc_simplify_size): Likewise.
4252         (gfc_simplify_trailz): Likewise.
4253         (gfc_simplify_trim): Likewise.
4254         (gfc_simplify_verify): Likewise.
4255         (gfc_simplify_xor): Likewise.
4256         * trans-io.c (build_dt): Likewise.
4257         (gfc_new_nml_name_expr): Removed.
4258
4259 2010-04-12  Daniel Franke  <franke.daniel@gmail.com>
4260
4261         * arith.h (gfc_constant_result): Removed prototype.
4262         * constructor.h (gfc_build_array_expr): Removed prototype.
4263         (gfc_build_structure_constructor_expr): Removed prototype.
4264         * gfortran.h (gfc_int_expr): Removed prototype.
4265         (gfc_logical_expr): Removed prototype.
4266         (gfc_get_array_expr): New prototype.
4267         (gfc_get_structure_constructor_expr): New prototype.
4268         (gfc_get_constant_expr): New prototype.
4269         (gfc_get_int_expr): New prototype.
4270         (gfc_get_logical_expr): New prototype.
4271         * arith.c (gfc_constant_result): Moved and renamed to
4272         expr.c (gfc_get_constant_expr). Fixed all callers.
4273         * constructor.c (gfc_build_array_expr): Moved and renamed to
4274         expr.c (gfc_get_array_expr). Split gfc_typespec argument to type
4275         and kind. Fixed all callers.
4276         (gfc_build_structure_constructor_expr): Moved and renamed to
4277         expr.c (gfc_get_structure_constructor_expr). Split gfc_typespec argument
4278         to type and kind. Fixed all callers.
4279         * expr.c (gfc_logical_expr): Renamed to ...
4280         (gfc_get_logical_expr): ... this. Added kind argument. Fixed all callers.
4281         (gfc_int_expr): Renamed to ...
4282         (gfc_get_int_expr): ... this. Added kind and where arguments. Fixed all
4283         callers.
4284         (gfc_get_constant_expr): New.
4285         (gfc_get_array_expr): New.
4286         (gfc_get_structure_constructor_expr): New.
4287         * simplify.c (int_expr_with_kind): Removed, callers use gfc_get_int_expr
4288         instead.
4289
4290 2010-04-12  Daniel Franke  <franke.daniel@gmail.com>
4291
4292         * constructor.h: New.
4293         * constructor.c: New.
4294         * Make-lang.in: Add new files to F95_PARSER_OBJS.
4295         * arith.c (reducy_unary): Use constructor API.
4296         (reduce_binary_ac): Likewise.
4297         (reduce_binary_ca): Likewise.
4298         (reduce_binary_aa): Likewise.
4299         * check.c (gfc_check_pack): Likewise.
4300         (gfc_check_reshape): Likewise.
4301         (gfc_check_unpack): Likewise.
4302         * decl.c (add_init_expr_to_sym): Likewise.
4303         (build_struct): Likewise.
4304         * dependency.c (gfc_check_dependency): Likewise.
4305         (contains_forall_index_p): Likewise.
4306         * dump-parse-tree.c (show_constructor): Likewise.
4307         * expr.c (free_expr0): Likewise.
4308         (gfc_copy_expr): Likewise.
4309         (gfc_is_constant_expr): Likewise.
4310         (simplify_constructor): Likewise.
4311         (find_array_element): Likewise.
4312         (find_component_ref): Likewise.
4313         (find_array_section): Likewise.
4314         (find_substring_ref): Likewise.
4315         (simplify_const_ref): Likewise.
4316         (scalarize_intrinsic_call): Likewise.
4317         (check_alloc_comp_init): Likewise.
4318         (gfc_default_initializer): Likewise.
4319         (gfc_traverse_expr): Likewise.
4320         * iresolve.c (check_charlen_present): Likewise.
4321         (gfc_resolve_reshape): Likewise.
4322         (gfc_resolve_transfer): Likewise.
4323         * module.c (mio_constructor): Likewise.
4324         * primary.c (build_actual_constructor): Likewise.
4325         (gfc_match_structure_constructor): Likewise.
4326         * resolve.c (resolve_structure_cons): Likewise.
4327         * simplify.c (is_constant_array_expr): Likewise.
4328         (init_result_expr): Likewise.
4329         (transformational_result): Likewise.
4330         (simplify_transformation_to_scalar): Likewise.
4331         (simplify_transformation_to_array): Likewise.
4332         (gfc_simplify_dot_product): Likewise.
4333         (simplify_bound): Likewise.
4334         (simplify_matmul): Likewise.
4335         (simplify_minval_maxval): Likewise.
4336         (gfc_simplify_pack): Likewise.
4337         (gfc_simplify_reshape): Likewise.
4338         (gfc_simplify_shape): Likewise.
4339         (gfc_simplify_spread): Likewise.
4340         (gfc_simplify_transpose): Likewise.
4341         (gfc_simplify_unpack): Likewise.q
4342         (gfc_convert_constant): Likewise.
4343         (gfc_convert_char_constant): Likewise.
4344         * target-memory.c (size_array): Likewise.
4345         (encode_array): Likewise.
4346         (encode_derived): Likewise.
4347         (interpret_array): Likewise.
4348         (gfc_interpret_derived): Likewise.
4349         (expr_to_char): Likewise.
4350         (gfc_merge_initializers): Likewise.
4351         * trans-array.c (gfc_get_array_constructor_size): Likewise.
4352         (gfc_trans_array_constructor_value): Likewise.
4353         (get_array_ctor_strlen): Likewise.
4354         (gfc_constant_array_constructor_p): Likewise.
4355         (gfc_build_constant_array_constructor): Likewise.
4356         (gfc_trans_array_constructor): Likewise.
4357         (gfc_conv_array_initializer): Likewise.
4358         * trans-decl.c (check_constant_initializer): Likewise.
4359         * trans-expr.c (flatten_array_ctors_without_strlen): Likewise.
4360         (gfc_apply_interface_mapping_to_cons): Likewise.
4361         (gfc_trans_structure_assign): Likewise.
4362         (gfc_conv_structure): Likewise.
4363         * array.c (check_duplicate_iterator): Likewise.
4364         (match_array_list): Likewise.
4365         (match_array_cons_element): Likewise.
4366         (gfc_match_array_constructor): Likewise.
4367         (check_constructor_type): Likewise.
4368         (check_constructor): Likewise.
4369         (expand): Likewise.
4370         (expand_constructor): Likewise.
4371         (extract_element): Likewise.
4372         (gfc_expanded_ac): Likewise.
4373         (resolve_array_list): Likewise.
4374         (gfc_resolve_character_array_constructor): Likewise.
4375         (copy_iterator): Renamed to ...
4376         (gfc_copy_iterator): ... this.
4377         (gfc_append_constructor): Removed.
4378         (gfc_insert_constructor): Removed unused function.
4379         (gfc_get_constructor): Removed.
4380         (gfc_free_constructor): Removed.
4381         (qgfc_copy_constructor): Removed.
4382         * gfortran.h (struct gfc_expr): Removed member 'con_by_offset'.
4383         Removed all references. Replaced constructor list by splay-tree.
4384         (struct gfc_constructor): Removed member 'next', moved 'offset' from
4385         the inner struct, added member 'base'.
4386         (gfc_append_constructor): Removed prototype.
4387         (gfc_insert_constructor): Removed prototype.
4388         (gfc_get_constructor): Removed prototype.
4389         (gfc_free_constructor): Removed prototype.
4390         (qgfc_copy_constructor): Removed prototype.
4391         (gfc_copy_iterator): New prototype.
4392         * trans-array.h (gfc_constant_array_constructor_p): Adjusted prototype.
4393
4394 2010-04-10  Tobias Burnus  <burnus@net-b.de>
4395
4396         PR fortran/43591
4397         * expr.c (gfc_is_constant_expr, gfc_traverse_expr): Handle
4398         proc-pointers and type-bound procedures.
4399         (gfc_specification_expr): Check proc-pointers for pureness.
4400
4401 2010-04-09  Iain Sandoe  <iains@gcc.gnu.org>
4402
4403         PR bootstrap/43684
4404         * gfortranspec.c (lang_specific_driver): Do not expose vars 
4405         only used by HAVE_LD_STATIC_DYNAMIC targets unless compiling
4406         for such.
4407
4408 2010-04-09  Tobias Burnus  <burnus@net-b.de>
4409
4410         PR fortran/18918
4411         * decl.c (variable_decl, match_attr_spec): Fix setting the array
4412         spec.
4413         * array.c (match_subscript,gfc_match_array_ref): Add coarray support.
4414         * data.c (gfc_assign_data_value): Ditto.
4415         * expr.c (gfc_check_pointer_assign): Add check for coarray constraint.
4416         (gfc_traverse_expr): Traverse also through codimension expressions.
4417         (gfc_is_coindexed, gfc_has_ultimate_allocatable,
4418         gfc_has_ultimate_pointer): New functions.
4419         * gfortran.h (gfc_array_ref_dimen_type): Add DIMEN_STAR for coarrays.
4420         (gfc_array_ref): Add codimen.
4421         (gfc_array_ref): Add in_allocate.
4422         (gfc_is_coindexed, gfc_has_ultimate_allocatable,
4423         gfc_has_ultimate_pointer): Add prototypes.
4424         * interface.c (compare_parameter, compare_actual_formal,
4425         check_intents): Add coarray constraints.
4426         * match.c (gfc_match_iterator): Add coarray constraint.
4427         * match.h (gfc_match_array_ref): Update interface.
4428         * primary.c (gfc_match_varspec): Handle codimensions.
4429         * resolve.c (coarray_alloc, inquiry_argument): New static variables.
4430         (check_class_members): Return gfc_try instead for error recovery.
4431         (resolve_typebound_function,resolve_typebound_subroutine,
4432         check_members): Handle return value of check_class_members.
4433         (resolve_structure_cons, resolve_actual_arglist, resolve_function,
4434         check_dimension, compare_spec_to_ref, resolve_array_ref,
4435         resolve_ref, resolve_variable, gfc_resolve_expr, conformable_arrays,
4436         resolve_allocate_expr, resolve_ordinary_assign): Add coarray
4437         support.
4438         * trans-array.c (gfc_conv_array_ref, gfc_walk_variable_expr):
4439         Skip over coarray refs.
4440         (gfc_array_allocate) Add support for references containing coindexes.
4441         * trans-expr.c (gfc_add_interface_mapping): Copy coarray attribute.
4442         (gfc_map_intrinsic_function): Ignore codimensions.
4443
4444 2010-04-08  Bud Davis  <bdavis9659@sbcglobal.net>
4445
4446         PR fortran/28039
4447         * io.c (check_format_string):  Added check for additional non 
4448         blank characters after the format string was successfully 
4449         parsed.
4450         * io.c (check_format): Changed the error messages for positive
4451         int required and period required to drop through the error logic
4452         and report with gfc_error instead of gfc_error_now.  Corrected
4453         format postion for hollerith strings.
4454
4455 2010-04-08  Tobias Burnus  <burnus@net-b.de>
4456
4457         * module.c (use_iso_fortran_env_module): Fix standard check.
4458
4459 2010-04-07  Jakub Jelinek  <jakub@redhat.com>
4460
4461         * parse.c (parse_derived, parse_enum): Avoid set but not used
4462         warning.
4463
4464 2010-04-07  Janne Blomqvist  <jb@gcc.gnu.org>
4465
4466         PR fortran/40539
4467         * gfortran.texi: Add section about representation of
4468         LOGICAL variables.
4469
4470 2010-04-07  Simon Baldwin  <simonb@google.com>
4471
4472         * cpp.c (cb_cpp_error): Add warning reason argument, set a value
4473         for diagnostic_override_option_index if CPP_W_WARNING_DIRECTIVE.
4474
4475 2010-04-07  Richard Guenther  <rguenther@suse.de>
4476
4477         * options.c (gfc_init_options): Do not set.
4478
4479 2010-04-06  Tobias Burnus  <burnus@net-b.de>
4480
4481         PR fortran/18918
4482         * array.c (gfc_match_array_spec): Add error for -fcoarray=none.
4483         * match.c (gfc_match_critical, sync_statement): Ditto.
4484         * gfortran.h (gfc_fcoarray): New enum.
4485         (gfc_option_t): Use it.
4486         * lang.opt (fcoarray): Add new flag.
4487         * invoke.texi (fcoarray): Document it.
4488         * options.c (gfc_init_options,gfc_handle_option): Handle -fcoarray=.
4489         (gfc_handle_coarray_option): New function.
4490
4491 2010-04-06  Tobias Burnus  <burnus@net-b.de>
4492
4493         PR fortran/18918
4494         * gfortran.h (gfc_array_spec): Add cotype.
4495         * array.c (gfc_match_array_spec,gfc_set_array_spec): Use it
4496         and defer error diagnostic.
4497         * resolve.c (resolve_fl_derived): Add missing check.
4498         (resolve_symbol): Add cotype/type check.
4499         * parse.c (parse_derived): Fix setting of coarray_comp.
4500
4501 2010-04-06  Tobias Burnus  <burnus@net-b.de>
4502
4503         PR fortran/18918
4504         * array.c (gfc_free_array_spec,gfc_resolve_array_spec,
4505         match_array_element_spec,gfc_copy_array_spec,
4506         gfc_compare_array_spec): Include corank.
4507         (match_array_element_spec,gfc_set_array_spec): Support codimension.
4508         * decl.c (build_sym,build_struct,variable_decl,
4509         match_attr_spec,attr_decl1,cray_pointer_decl,
4510         gfc_match_volatile): Add codimension.
4511         (gfc_match_codimension): New function.
4512         * dump-parse-tree.c (show_array_spec,show_attr): Support codimension.
4513         * gfortran.h (symbol_attribute,gfc_array_spec): Ditto.
4514         (gfc_add_codimension): New function prototype.
4515         * match.h (gfc_match_codimension): New function prototype.
4516         (gfc_match_array_spec): Update prototype
4517         * match.c (gfc_match_common): Update gfc_match_array_spec call.
4518         * module.c (MOD_VERSION): Bump.
4519         (mio_symbol_attribute): Support coarray attributes.
4520         (mio_array_spec): Add corank support.
4521         * parse.c (decode_specification_statement,decode_statement,
4522         parse_derived): Add coarray support.
4523         * resolve.c (resolve_formal_arglist, was_declared,
4524         is_non_constant_shape_array, resolve_fl_variable,
4525         resolve_fl_derived, resolve_symbol): Add coarray support.
4526         * symbol.c (check_conflict, gfc_add_volatile, gfc_copy_attr,
4527         gfc_build_class_symbol): Add coarray support.
4528         (gfc_add_codimension): New function.
4529
4530 2010-04-06  Tobias Burnus  <burnus@net-b.de>
4531
4532         PR fortran/18918
4533         * iso-fortran-env.def: Add the integer parameters atomic_int_kind,
4534         atomic_logical_kind, iostat_inquire_internal_unit, stat_locked,
4535         stat_locked_other_image, stat_stopped_image and stat_unlocked of
4536         Fortran 2008.
4537         * intrinsic.texi (iso_fortran_env): Ditto.
4538         * libgfortran.h (libgfortran_stat_codes): New enum.
4539         * module.c (use_iso_fortran_env_module): Honour -std= when loading
4540         constants from the intrinsic module.
4541
4542 2010-04-06  Tobias Burnus  <burnus@net-b.de>
4543
4544         PR fortran/39997
4545         * intrinsic.c (add_functions): Add num_images.
4546         * decl.c (gfc_match_end): Handle END CRITICAL.
4547         * intrinsic.h (gfc_simplify_num_images): Add prototype.
4548         * dump-parse-tree.c (show_code_node): Dump CRITICAL, ERROR STOP,
4549         and SYNC.
4550         * gfortran.h (gfc_statement): Add enum items for those.
4551         (gfc_exec_op) Ditto.
4552         (gfc_isym_id): Add num_images.
4553         * trans-stmt.c (gfc_trans_stop): Handle ERROR STOP.
4554         (gfc_trans_sync,gfc_trans_critical): New functions.
4555         * trans-stmt.h (gfc_trans_stop,gfc_trans_sync,
4556         gfc_trans_critical): Add/update prototypes.
4557         * trans.c (gfc_trans_code): Handle CRITICAL, ERROR STOP,
4558         and SYNC statements.
4559         * trans.h (gfor_fndecl_error_stop_string) Add variable.
4560         * resolve.c (resolve_sync): Add function.
4561         (gfc_resolve_blocks): Handle CRITICAL.
4562         (resolve_code): Handle CRITICAL, ERROR STOP,
4563         (resolve_branch): Add CRITICAL constraint check.
4564         and SYNC statements.
4565         * st.c (gfc_free_statement): Add new statements.
4566         * trans-decl.c (gfor_fndecl_error_stop_string): Global variable.
4567         (gfc_build_builtin_function_decls): Initialize it.
4568         * match.c (gfc_match_if): Handle ERROR STOP and SYNC.
4569         (gfc_match_critical, gfc_match_error_stop, sync_statement,
4570         gfc_match_sync_all, gfc_match_sync_images, gfc_match_sync_memory):
4571         New functions.
4572         (match_exit_cycle): Handle CRITICAL constraint.
4573         (gfc_match_stopcode): Handle ERROR STOP.
4574         * match.h (gfc_match_critical, gfc_match_error_stop,
4575         gfc_match_sync_all, gfc_match_sync_images,
4576         gfc_match_sync_memory): Add prototype.
4577         * parse.c (decode_statement, gfc_ascii_statement,
4578         parse_executable): Handle new statements.
4579         (parse_critical_block): New function.
4580         * parse.h (gfc_compile_state): Add COMP_CRITICAL.
4581         * intrinsic.texi (num_images): Document new function.
4582         * simplify.c (gfc_simplify_num_images): Add function.
4583
4584 2010-04-06  Tobias Burnus  <burnus@net-b.de>
4585
4586         PR fortran/43178
4587         * trans-array.c (gfc_conv_expr_descriptor): Update
4588         gfc_trans_scalar_assign call.
4589         (has_default_initializer): New function.
4590         (gfc_trans_deferred_array): Nullify less often.
4591         * trans-expr.c (gfc_conv_subref_array_arg,
4592         gfc_trans_subcomponent_assign): Update call to
4593         gfc_trans_scalar_assign.
4594         (gfc_trans_scalar_assign): Add parameter and pass it on.
4595         (gfc_trans_assignment_1): Optionally, do not dealloc before
4596         assignment.
4597         * trans-openmp.c (gfc_trans_omp_array_reduction): Update
4598         call to gfc_trans_scalar_assign.
4599         * trans-decl.c (gfc_get_symbol_decl): Do not always apply
4600         initializer to static variables.
4601         (gfc_init_default_dt): Add dealloc parameter and pass it on.
4602         * trans-stmt.c (forall_make_variable_temp,
4603         generate_loop_for_temp_to_lhs, generate_loop_for_rhs_to_temp,
4604         gfc_trans_forall_1, gfc_trans_where_assign, gfc_trans_where_3
4605         gfc_trans_allocate): Update gfc_trans_assignment call.
4606         * trans.h (gfc_trans_scalar_assign, gfc_init_default_dt,
4607         gfc_init_default_dt, gfc_trans_assignment): Add bool dealloc
4608         parameter to prototype.
4609
4610 2010-03-31  Paul Thomas  <pault@gcc.gnu.org>
4611
4612         * ioparm.def : Update copyright.
4613         * lang.opt : ditto
4614         * trans-array.c : ditto
4615         * trans-array.h : ditto
4616         * expr.c: ditto
4617         * trans-types.c: ditto
4618         * dependency.c : ditto
4619         * gfortran.h : ditto
4620         * options.c : ditto
4621         * trans-io.c : ditto
4622         * trans-intrinsic.c : ditto
4623         * libgfortran.h : ditto
4624         * invoke.texi : ditto
4625         * intrinsic.texi : ditto
4626         * trans.c : ditto
4627         * trans.h : ditto
4628         * intrinsic.c : ditto
4629         * interface.c : ditto
4630         * iresolve.c : ditto
4631         * trans-stmt.c : ditto
4632         * trans-stmt.h : ditto
4633         * parse,c : ditto
4634         * match.h : ditto
4635         * error.c : ditto
4636
4637 2010-03-20  Paul Thomas  <pault@gcc.gnu.org>
4638
4639         PR fortran/43450
4640         * trans-decl.c (gfc_create_module_variable): With -fwhole-file
4641         do not assert the context of derived types.
4642
4643 2010-03-20  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
4644
4645         PR fortran/43409
4646         * ioparm.def: Change inquire size variable to type pointer to
4647         GFC_IO_INT type.
4648
4649 2010-03-18  Paul Thomas  <pault@gcc.gnu.org>
4650
4651         PR fortran/43039
4652         * trans-expr.c (conv_parent_component_references): Ensure that
4653         'dt' has a backend_decl.
4654
4655         PR fortran/43043
4656         * trans-expr.c (gfc_conv_structure): Ensure that the derived
4657         type has a backend_decl.
4658
4659         PR fortran/43044
4660         * resolve.c (resolve_global_procedure): Check that the 'cl'
4661         structure is not NULL.
4662
4663 2010-03-18  Shujing Zhao  <pearly.zhao@oracle.com>
4664
4665         * lang.opt (-ffixed-line-length-, ffree-line-length-): Remove
4666         redundant tab.
4667
4668 2010-03-17  Tobias Burnus  <burnus@net-b.de>
4669
4670         PR fortran/43331
4671         * trans-array.c (gfc_conv_array_index_offset,gfc_conv_array_ref,
4672         gfc_conv_ss_startstride): Remove no-longer-needed cp_was_assumed
4673         check.
4674         * decl.c (gfc_match_derived_decl): Don't mark assumed-size Cray
4675         pointees as having explizit size.
4676         * expr.c (gfc_check_assign): Remove now unreachable Cray pointee
4677         check.
4678         * trans-types.c (gfc_is_nodesc_array): Add cp_was_assumed to assert.
4679         (gfc_sym_type): Don't mark Cray pointees as restricted pointers.
4680         * resolve.c (resolve_symbol): Handle cp_was_assumed.
4681         * trans-decl.c (gfc_trans_deferred_vars): Ditto.
4682         (gfc_finish_var_decl): Don't mark Cray pointees as restricted
4683         pointers.
4684
4685 2010-03-14  Tobias Burnus  <burnus@net-b.de>
4686
4687         PR fortran/43362
4688         * resolve.c (resolve_structure_cons): Add missing PURE constraint.
4689         (resolve_ordinary_assign): Add check to avoid segfault.
4690
4691 2010-03-12  Paul Thomas  <pault@gcc.gnu.org>
4692
4693         PR fortran/43291
4694         PR fortran/43326
4695         * resolve.c (resolve_compcall): Add new boolean dummy argument
4696         'class_members'. Only resolve expression at end if false.
4697         Remove redundant, static variable 'class_object'.
4698         (check_class_members): Add extra argument to call of
4699         resolve_compcall.
4700         (resolve_typebound_function): Renamed resolve_class_compcall.
4701         Do all the detection of class references here. Correct calls to
4702         resolve_compcall for extra argument.
4703         (resolve_typebound_subroutine): resolve_class_typebound_call
4704         renamed. Otherwise same as resolve_typebound_function.
4705         (gfc_resolve_expr): Call resolve_typebound_function.
4706         (resolve_code): Call resolve_typebound_subroutine.
4707
4708 2010-03-10  Tobias Burnus  <burnus@net-b.de
4709
4710         PR fortran/43303
4711         * symbol.c (get_iso_c_sym): Set sym->result.
4712
4713 2010-03-08  Janus Weil  <janus@gcc.gnu.org>
4714
4715         PR fortran/43256
4716         * resolve.c (resolve_compcall): Don't set 'value.function.name' here
4717         for TBPs, otherwise they will not be resolved properly.
4718         (resolve_function): Use 'value.function.esym' instead of
4719         'value.function.name' to check if we're dealing with a TBP.
4720         (check_class_members): Set correct type of passed object for all TBPs,
4721         not only generic ones, except if the type is abstract.
4722
4723 2010-03-04  Janus Weil  <janus@gcc.gnu.org>
4724
4725         PR fortran/43244
4726         * decl.c (gfc_match_final_decl): Make sure variable names starting with
4727         'final...' are not misinterpreted as FINAL statements.
4728
4729 2010-03-03  Paul Thomas  <pault@gcc.gnu.org>
4730
4731         PR fortran/43243
4732         * trans-array.c (gfc_conv_array_parameter): Contiguous refs to
4733         allocatable ultimate components do not need temporaries, whilst
4734         ultimate pointer components do.
4735
4736 2010-03-03  Janus Weil  <janus@gcc.gnu.org>
4737
4738         PR fortran/43169
4739         * resolve.c (resolve_code): Correctly set gfc_current_ns for
4740         EXEC_SELECT_TYPE.
4741         (gfc_impure_variable): Make it work with sub-namespaces (BLOCK etc).
4742         (gfc_pure): Ditto.
4743
4744 2010-03-02  Paul Thomas  <pault@gcc.gnu.org>
4745
4746         PR fortran/43180
4747         * trans-array.c (gfc_conv_array_parameter): A full array of
4748         derived type need not be restricted to a symbol without an
4749         array spec to use the call to gfc_conv_expr_descriptor.
4750
4751         PR fortran/43173
4752         * trans-array.c (gfc_conv_array_parameter): Contiguous refs to
4753         allocatable arrays do not need temporaries.
4754
4755 2010-03-01  Tobias Burnus  <burnus@net-b.de>
4756
4757         PR fortran/43199
4758         * resolve.c (find_array_spec): Handle REF_COMPONENT with
4759         CLASS components.
4760
4761 2010-02-28  Tobias Burnus  <burnus@net-b.de>
4762
4763         PR fortran/43205
4764         * trans-expr.c (is_zero_initializer_p): Move up in the file.
4765         (gfc_conv_initializer): Handle zero initializer as special case.
4766
4767 2010-02-27  Tobias Burnus  <burnus@net-b.de>
4768
4769         PR fortran/43185
4770         * resolve.c (resolve_fl_variable_derived): Imply SAVE
4771         for module variables for Fortran 2008.
4772
4773 2010-02-25  Jakub Jelinek  <jakub@redhat.com>
4774
4775         PR debug/43166
4776         * trans-common.c (build_common_decl): Also update DECL_MODE,
4777         and DECL_SIZE when encountering a larger common block and call
4778         layout_decl.
4779
4780 2010-02-24  Tobias Burnus  <burnus@net-b.de>
4781
4782         PR fortran/43042
4783         * trans-expr.c (gfc_conv_initializer): Call directly
4784         gfc_conv_constant for C_NULL_(FUN)PTR.
4785
4786 2010-02-22  Paul Thomas  <pault@gcc.gnu.org>
4787
4788         PR fortran/43072
4789         * dependency.c (gfc_full_array_ref_p): Check for contiguous by
4790         checking the rest of the dimensions for elements.
4791
4792 2010-02-21  Tobias Burnus  <burnus@net-b.de>
4793
4794         PR fortran/35259
4795         * gfortran.h (gfc_option_t): New flag -fprotect-parens.
4796         * lang.opt: Ditto.
4797         * option.c (gfc_init_options,gfc_handle_option): Ditto.
4798         * trans-expr.c (gfc_conv_expr_op): Use the flag.
4799         * invoke.texi: Document new -fno-protect-parens flag.
4800
4801 2010-02-20  Paul Thomas  <pault@gcc.gnu.org>
4802
4803         PR fortran/36932
4804         PR fortran/36933
4805         PR fortran/43072
4806         PR fortran/43111
4807         * dependency.c (gfc_check_argument_var_dependency): Use enum
4808         value instead of arithmetic vaue for 'elemental'.
4809         (check_data_pointer_types): New function.
4810         (gfc_check_dependency): Call check_data_pointer_types.
4811         * trans-array.h : Change fourth argument of
4812         gfc_conv_array_parameter to boolean.
4813         * trans-array.c (gfc_conv_array_parameter): A contiguous array
4814         can be a dummy but it must not be assumed shape or deferred.
4815         Change fourth argument to boolean. Array constructor exprs will
4816         always be contiguous and do not need packing and unpacking.
4817         * trans-expr.c (gfc_conv_procedure_call): Clean up some white
4818         space and change fourth argument of gfc_conv_array_parameter
4819         to boolean.
4820         (gfc_trans_arrayfunc_assign): Change fourth argument of
4821         gfc_conv_array_parameter to boolean.
4822         * trans-io.c (gfc_convert_array_to_string): The same.
4823         * trans-intrinsic.c (gfc_conv_intrinsic_loc): The same.
4824
4825 2010-02-20  Tobias Burnus  <burnus@net-b.de>
4826
4827         PR fortran/42958
4828         * libgfortran.h: Add GFC_RTCHECK_MEM.
4829         * invoke.texi (-fcheck=): Document -fcheck=mem.
4830         * tranc.c (gfc_call_malloc): Remove negative-size run-time error
4831         and enable malloc-success check only with -fcheck=mem.
4832         * option.c (gfc_handle_runtime_check_option): Add -fcheck=mem.
4833
4834 2010-02-16  Tobias Burnus  <burnus@net-b.de>
4835
4836         PR fortran/43040
4837         * gfortran.h (gfc_isym_id): Rename GFS_ISYM_GAMMA to GFS_ISYM_TGAMMA.
4838         * intrinsic.c (add_functions): Ditto.
4839         * iresolve.c (gfc_resolve_gamma): Call tgamma instead of gamma.
4840         * mathbuiltins.def: Use TGAMMA instead of GAMMA with "tgamma".
4841
4842 2010-02-14  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
4843
4844         PR fortran/32382
4845         * trans-stmt.h: Add prototype for gfc_trans_code_cond. Add tree cond to
4846         gfc_trans_do prototype.
4847         * trans-stmt.c (gfc_trans_simple_do): Add optional argument to pass in
4848         a loop exit condition.  If exit condition is given, build the loop exit
4849         code, checking IO results of implied do loops in READ and WRITE.
4850         (gfc_trans_do): Likewise.
4851         * trans.c (trans_code): New static work function, previously
4852         gfc_trans_code. Passes exit condition to gfc_trans_do.
4853         (gfc_trans_code): Calls trans_code with NULL_TREE condition.
4854         (gfc_trans_code_cond): Calls trans_code with loop exit condition.
4855         * trans-io.c (build_dt): Build an exit condition to allow checking IO
4856         result status bits in the dtparm structure. Use this condition in call
4857         to gfc_trans_code_cond.
4858
4859 2010-02-13  Paul Thomas  <pault@gcc.gnu.org>
4860
4861         PR fortran/41113
4862         PR fortran/41117
4863         * trans-array.c (gfc_conv_array_parameter): Use
4864         gfc_full_array_ref_p to detect full and contiguous variable
4865         arrays. Full array components and contiguous arrays do not need
4866         internal_pack and internal_unpack.
4867
4868 2010-02-11  Jakub Jelinek  <jakub@redhat.com>
4869
4870         PR fortran/43030
4871         * resolve.c (gfc_resolve_dim_arg): Call gfc_clear_ts.
4872
4873         PR fortran/43029
4874         * decl.c (enumerator_decl): Don't call gfc_free_enum_history
4875         here.
4876         (gfc_match_enumerator_def): But here whenever enumerator_decl returns
4877         MATCH_ERROR.
4878
4879 2010-02-10  Joost VandeVondele <jv244@cam.ac.uk>
4880             Tobias Burnus <burnus@net-b.de>
4881
4882         PR fortran/40823
4883         * decl.c (gfc_match_subroutine): Explicitly set sym->declared_at.
4884
4885 2010-02-10  Tobias Burnus  <burnus@net-b.de>
4886
4887         PR fortran/43015
4888         * trans-decl.c (gfc_generate_function_code): Only check
4889         actual-vs.-dummy character bounds if not bind(C).
4890
4891 2010-02-10  Jakub Jelinek  <jakub@redhat.com>
4892
4893         PR fortran/42309
4894         * trans-expr.c (gfc_conv_subref_array_arg): Avoid accessing
4895         info->dimen after info has been freed.
4896
4897 2010-02-09  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
4898
4899         PR fortran/42999
4900         * array.c (gfc_constant_ac): Do not prevent expansion of constructors
4901         with iterators.
4902
4903 2010-02-09  Jakub Jelinek  <jakub@redhat.com>
4904
4905         * module.c (fix_mio_expr): Declare sym.
4906
4907 2010-02-09  Paul Thomas  <pault@gcc.gnu.org>
4908
4909         PR fortran/41869
4910         * module.c (fix_mio_expr): Fix for private generic procedures.
4911
4912 2010-02-09  Daniel Kraft  <d@domob.eu>
4913
4914         PR fortran/39171
4915         * resolve.c (resolve_charlen): Change warning about negative CHARACTER
4916         length to be correct and issue only with -Wsurprising.
4917         * invoke.texi (Wsurprising): Mention this new warning that is
4918         turned on by -Wsurprising.
4919
4920 2010-02-09  Daniel Kraft  <d@domob.eu>
4921
4922         PR fortran/41507
4923         * intrinsic.texi (MAXVAL): Remove wrong claim that array argument
4924         can be CHARACTER type.
4925         (MINVAL), (MAXLOC), (MINLOC): Ditto.
4926
4927 2010-02-05  Paul Thomas  <pault@gcc.gnu.org>
4928
4929         PR fortran/42309
4930         * trans-expr.c (gfc_conv_subref_array_arg): Add new argument
4931         'formal_ptr'. If this is true, give returned descriptor unity
4932         lbounds, in all dimensions, and the appropriate offset.
4933         (gfc_conv_procedure_call); If formal is a pointer, set the last
4934         argument of gfc_conv_subref_array_arg to true.
4935         * trans.h : Add last argument for gfc_conv_subref_array_arg.
4936         * trans-io.c (set_internal_unit, gfc_trans_transfer): Set the
4937         new arg of gfc_conv_subref_array_arg to false.
4938         * trans-stmt.c (forall_make_variable_temp): The same.
4939
4940 2010-02-03  Tobias Burnus  <burnus@net-b.de>
4941
4942         PR fortran/42936
4943         * interface.c (compare_parameter): Disable rank-checking
4944         for NULL().
4945
4946 2010-02-02  Tobias Burnus  <burnus@net-b.de>
4947
4948         PR fortran/42650
4949         * parse.c (decode_specification_statement): Use sym->result not sym.
4950
4951 2010-02-01  Tobias Burnus  <burnus@net-b.de>
4952
4953         PR fortran/42922
4954         * decl.c (variable_decl): Allow default initializer in
4955         TYPE declarations in PURE functions.
4956
4957 2010-01-31  Janus Weil  <janus@gcc.gnu.org>
4958
4959         PR fortran/42888
4960         * resolve.c (resolve_allocate_expr): Move default initialization code
4961         here from gfc_trans_allocate.
4962         * trans.c (gfc_trans_code): Call gfc_trans_class_assign also for
4963         EXEC_INIT_ASSIGN.
4964         * trans-expr.c (gfc_trans_class_assign): Handle default initialization
4965         of CLASS variables via memcpy.
4966         * trans-stmt.c (gfc_trans_allocate): Move default initialization code
4967         to resolve_allocate_expr.
4968
4969 2010-01-31  Paul Thomas  <pault@gcc.gnu.org>
4970
4971         PR fortran/38324
4972         * expr.c (gfc_get_full_arrayspec_from_expr): New function.
4973         * gfortran.h : Add prototype for above.
4974         * trans-expr.c (gfc_trans_alloc_subarray_assign): New function.
4975         (gfc_trans_subcomponent_assign): Call new function to replace
4976         the code to deal with allocatable components.
4977         * trans-intrinsic.c (gfc_conv_intrinsic_bound): Call
4978         gfc_get_full_arrayspec_from_expr to replace existing code.
4979
4980 2010-01-25  Tobias Burnus  <burnus@net-b.de>
4981
4982         PR fortran/42858
4983         * array.c (gfc_array_dimen_size): Fix intrinsic procedure
4984         check.
4985
4986 2010-01-24  Paul Thomas  <pault@gcc.gnu.org>
4987
4988         PR fortran/41044
4989         PR fortran/41167
4990         * expr.c (remove_subobject_ref): If the constructor is NULL use
4991         the expression as the source.
4992         (simplify_const_ref): Change the type of expression if
4993         there are component references.  Allow for substring to be at
4994         the end of an arbitrarily long chain of references.  If an
4995         element is found that is not in an EXPR_ARRAY, assume that this
4996         is scalar initialization of array. Call remove_subobject_ref in
4997         this case with NULL second argument.
4998
4999 2010-01-24  Tobias Burnus  <burnus@net-b.de>
5000
5001         PR fortran/39304
5002         * array.c (gfc_array_dimen_size): Use correct specific
5003         function in the check.
5004
5005 2010-01-21  Paul Thomas  <pault@gcc.gnu.org>
5006
5007         PR fortran/42736
5008         * trans-stmt.c (gfc_conv_elemental_dependencies): If temporary
5009         is required, turn any trailing array elements after a range
5010         into ranges so that offsets can be calculated.
5011
5012 2010-01-20  Joern Rennecke  <amylaar@spamcop.net>
5013
5014         * module.c (mio_f2k_derived): Use enumerator as initializer of
5015         enum variable.
5016
5017         PR bootstrap/42812
5018         * gfortran.h  (struct gfc_namespace) <resolved>: Change to signed
5019         bitfield of width 2.
5020
5021 2010-01-19  Janus Weil  <janus@gcc.gnu.org>
5022
5023         PR fortran/42804
5024         * resolve.c (extract_compcall_passed_object): Set locus for
5025         passed-object argument.
5026         (extract_ppc_passed_object): Set locus and correctly remove PPC
5027         reference.
5028
5029 2010-01-19  Paul Thomas  <pault@gcc.gnu.org>
5030
5031         PR fortran/42783
5032         * trans-decl.c (add_argument_checking): Do not use the backend
5033         decl directly to test for the presence of an optional dummy
5034         argument.  Use gfc_conv_expr_present, remembering to set the
5035         symbol referenced.
5036
5037         PR fortran/42772
5038         * trans-decl.c (gfc_generate_function_code): Small white space
5039         changes. If 'recurcheckvar' is NULL do not try to reset it.
5040
5041 2010-01-19  Janus Weil  <janus@gcc.gnu.org>
5042
5043         PR fortran/42545
5044         * resolve.c (resolve_fl_derived): Set the accessibility of the parent
5045         component for extended types.
5046         * symbol.c (gfc_find_component): Remove a wrongly-worded error message
5047         and take care of parent component accessibility.
5048
5049 2010-01-17  Janus Weil  <janus@gcc.gnu.org>
5050
5051         PR fortran/42677
5052         * gfortran.h (symbol_attribute): Remove 'ambiguous_interfaces'.
5053         * interface.c (check_interface1): Move a warning message here from
5054         resolve_fl_procedure.
5055         (check_sym_interfaces): Removed 'attr.ambiguous_interfaces'.
5056         * module.c (read_module): Remove call to gfc_check_interfaces, since
5057         this comes too early here.
5058         * resolve.c (resolve_fl_procedure): Move warning message to
5059         check_interface1.
5060
5061 2010-01-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
5062
5063         PR fortran/42684
5064         * interface.c (check_interface1): Pass symbol name rather than NULL to
5065         gfc_compare_interfaces. (gfc_compare_interfaces): Add assert to
5066         trap MULL.
5067         * resolve.c (check_generic_tbp_ambiguity): Pass symbol name rather
5068         than NULL to gfc_compare_interfaces.
5069
5070 2010-01-14  Paul Thomas  <pault@gcc.gnu.org>
5071
5072         PR fortran/41478
5073         * trans-array.c (duplicate_allocatable):  Static version of
5074         gfc_duplicate_allocatable with provision to handle scalar
5075         components. New boolean argument to switch off call to malloc
5076         if true.
5077         (gfc_duplicate_allocatable): New function to call above with
5078         new argument false.
5079         (gfc_copy_allocatable_data): New function to call above with
5080         new argument true.
5081         (structure_alloc_comps): Do not apply indirect reference to
5082         scalar pointers. Add new section to copy allocatable components
5083         of arrays. Extend copying of allocatable components to include
5084         scalars.
5085         (gfc_copy_only_alloc_comp): New function to copy allocatable
5086         component derived types, without allocating the base structure.
5087         * trans-array.h : Add primitive for gfc_copy_allocatable_data.
5088         Add primitive for gfc_copy_only_alloc_comp.
5089         * trans-expr.c (gfc_conv_procedure_call): After calls to
5090         transformational functions with results that are derived types
5091         with allocatable components, copy the components in the result.
5092         (gfc_trans_arrayfunc_assign): Deallocate allocatable components
5093         of lhs derived types before allocation.
5094         
5095 2010-01-14  Paul Thomas  <pault@gcc.gnu.org>
5096
5097         PR fortran/42481
5098         * module.c (load_generic_interfaces): If a procedure that is
5099         use associated but not generic is given an interface that
5100         includes itself, then make it generic.
5101
5102 2010-01-11  Joseph Myers  <joseph@codesourcery.com>
5103             Shujing Zhao  <pearly.zhao@oracle.com>
5104
5105         PR translation/42469
5106         * lang.opt (fblas-matmul-limit=, finit-character=, finit-integer=,
5107         finit-logical=, finit-real=, fmax-array-constructor=): Use tab
5108         character between option name and help text.
5109
5110 2010-01-09 Jerry DeLisle <jvdelisle@gcc.gnu.org>
5111
5112         PR fortran/20923
5113         PR fortran/32489
5114         * trans-array.c (gfc_conv_array_initializer): Change call to
5115         gfc_error_now to call to gfc_fatal_error.
5116         * array.c (count_elements): Whitespace. (extract_element): Whitespace.
5117         (is_constant_element): Changed name from constant_element.
5118         (gfc_constant_ac): Only use expand_construuctor for expression
5119         types of EXPR_ARRAY.  If expression type is EXPR_CONSTANT, no need to
5120         call gfc_is_constant_expr.
5121         * expr.c (gfc_reduce_init_expr): Adjust conditionals and delete error
5122         message.
5123         * resolve.c (gfc_is_expandable_expr): New function that determiners if
5124         array expressions should have their constructors expanded.
5125         (gfc_resolve_expr): Use new function to determine whether or not to call
5126         gfc_expand_constructor.
5127
5128 2010-01-09  Tobias Burnus  <burnus@net-b.de>
5129
5130         PR fortran/41298
5131         * trans-expr.c (gfc_trans_structure_assign): Handle
5132         c_null_(fun)ptr.
5133         * symbol.c (gen_special_c_interop_ptr): Add NULL_EXPR
5134         to the constructor for c_null_(fun)ptr.
5135         * resolve.c (resolve_structure_cons): Add special case
5136         for c_null_(fun)ptr.
5137
5138 2010-01-09  Jakub Jelinek  <jakub@redhat.com>
5139
5140         * gfortranspec.c (lang_specific_driver): Update copyright notice
5141         dates.
5142
5143 2010-01-08  Tobias Burnus  <burnus@net-b.de>
5144
5145         PR/fortran 25829
5146         * symbol.c (check_conflict, gfc_copy_attr): Add
5147         ASYNCHRONOUS support.
5148         (gfc_add_asynchronous): New function.
5149         * decl.c (match_attr_spec): Add ASYNCHRONOUS support.
5150         (gfc_match_asynchronous): New function.
5151         * dump-parse-tree.c (show_attr): Add ASYNCHRONOUS support.
5152         * gfortran.h (symbol_attribute): New ASYNCHRONOUS bit.
5153         (gfc_add_asynchronous): New Prototype.
5154         * module.c (ab_attribute, mio_symbol_attribute): Add
5155         ASYNCHRONOUS support.
5156         * resolve.c (was_declared): Ditto.
5157         * match.h (gfc_match_asynchronous): New prototype.
5158         * parse.c (decode_specification_statement,decode_statement):
5159         Add ASYNCHRONOUS support.
5160
5161 2010-01-07  Tobias Burnus  <burnus@net-b.de>
5162
5163         PR fortran/42597
5164         * trans-decl.c (get_proc_pointer_decl): Fix call to
5165         gfc_conv_initializer for array-valued proc-pointer funcs.
5166
5167 2010-01-07  Tobias Burnus  <burnus@net-b.de>
5168
5169         PR fortran/41872
5170         * trans-decl.c (gfc_trans_deferred_vars): Don't initialize
5171         allocatable scalars with SAVE attribute.
5172
5173 2010-01-05  Tobias Burnus  <burnus@net-b.de>
5174
5175         PR fortran/42517
5176         * options.c (gfc_post_options): Set -frecursion
5177         when -fopenmp is used.
5178
5179 2010-01-05  Tobias Burnus  <burnus@net-b.de>
5180
5181         PR fortran/41872
5182         * trans-expr.c (gfc_conv_procedure_call): Nullify
5183         return value for allocatable-scalar character functions.
5184
5185 2010-01-04  Tobias Burnus  <burnus@net-b.de>
5186
5187         PR fortran/36161
5188         * error.c (error_printf, gfc_warning, gfc_notify_std,
5189         gfc_warning_now, gfc_error, gfc_error_now,
5190         gfc_fatal_error): Change argument name from nocmsgid to
5191         gmsgid to enable (x)gettext's % checking.
5192
5193 2010-01-04  Tobias Burnus  <burnus@net-b.de>
5194         
5195         * trans-decl.c (gfc_trans_deferred_vars): Fix spelling.
5196
5197 2010-01-04  Tobias Burnus  <burnus@net-b.de>
5198
5199         PR fortran/41872
5200         * trans-expr.c (gfc_conv_procedure_call): Add indirect ref
5201         for functions returning allocatable scalars.
5202         * trans-stmt.c (gfc_trans_allocate): Emmit error when
5203         reallocating an allocatable scalar.
5204         * trans.c (gfc_allocate_with_status): Fix pseudocode syntax
5205         in comment.
5206         * trans-decl.c (gfc_trans_deferred_vars): Nullify local
5207         allocatable scalars.
5208         (gfc_generate_function_code): Nullify result variable for
5209         allocatable scalars.
5210         
5211         PR fortran/40849
5212         * module.c (gfc_use_module): Fix warning string to allow
5213         for translation.
5214
5215         PR fortran/42517
5216         * invoke.texi (-fcheck=recursion): Mention that the checking
5217         is also disabled for -frecursive.
5218         * trans-decl.c (gfc_generate_function_code): Disable
5219         -fcheck=recursion when -frecursive is used.
5220
5221         * intrinsic.texi (iso_c_binding): Improve wording.
5222
5223 \f
5224 Copyright (C) 2010 Free Software Foundation, Inc.
5225
5226 Copying and distribution of this file, with or without modification,
5227 are permitted in any medium without royalty provided the copyright
5228 notice and this notice are preserved.