OSDN Git Service

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