OSDN Git Service

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