OSDN Git Service

2010-12-11 Jerry DeLisle <jvdelisle@gcc.gnu.org>
[pf3gnuchains/gcc-fork.git] / gcc / fortran / ChangeLog
1 2010-12-11  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2
3         PR fortran/46705
4         * gfortran.h: New enum gfc_instring.
5         (gfc_next_char_literal): Update prototype.
6         * scanner.c (gfc_next_char_literal): Use new enum. Only give missing
7         '&' warning for INSTRING_WARN. (gfc_next_char): Use new enum.
8         (gfc_gobble_whitespace): Likewise.
9         * io.c (next_char): Use new enum. (next_char_not_space): Likewise.
10         (format_lex): Likewise.
11         * match.c (gfc_match_parens): Likewise.
12         (gfc_match_special_char): Likewise. (gfc_match_name_C): Likewise.
13         * parse.c (next_fixed): Likewise.
14         * primary.c (match_hollerith_constant): Likewise.
15         (next_string_char): Likewise.
16
17 2010-12-11  Tobias Burnus  <burnus@net-b.de>
18
19         PR fortran/46370
20         * primary.c (gfc_match_varspec): Pass information about codimension
21         to gfc_match_array_ref also for BT_CLASS.
22         * resolve.c (resolve_procedure): Correct check for C612.
23
24 2010-12-11  Mikael Morin   <mikael@gcc.gnu.org>
25             Jerry DeLisle  <jvdelisle@gcc.gnu.org>
26
27         PR fortran/46842
28         * trans-array.c (dim_ok): New helper function.
29         (gfc_conv_expr_descriptor): Use new helper function to check
30         function array is full.
31
32 2010-12-10  Tobias Burnus  <burnus@net-b.de>
33
34         PR fortran/46540
35         * trans-types.c (gfc_init_kinds): Handle
36         --disable-libquadmath-support.
37
38 2010-12-09  Steven G. Kargl  <kargl@gcc.gnu.org>
39
40         * check.c (gfc_check_sngl): Insert missing space in error message.
41
42 2010-12-09  Steven G. Kargl  <kargl@gcc.gnu.org>
43
44         * check.c (gfc_check_float): Insert missing space in error message.
45
46 2010-12-07  Tobias Burnus  <burnus@net-b.de>
47
48         PR fortran/44352
49         * trans-expr.c (gfc_string_to_single_character): Return if not
50         POINTER_TYPE_P.
51         (gfc_trans_string_copy): gfc_build_addr_expr if src or dest is
52         not a pointer.
53         (gfc_trans_string_copy): Make sure the argument string type
54         has a string length, fix indention, and remove not needed
55         gfc_build_addr_expr.
56
57 2010-12-04  Daniel Kraft  <d@domob.eu>
58
59         PR fortran/46794
60         * trans-expr.c (gfc_conv_power_op): Handle kind of result expression
61         correctly for integer kind 1 and 2 operands.
62
63 2010-12-03  Thomas Koenig  <tkoenig@gcc.gnu.org>
64
65         PR fortran/44352
66         * dump-parse-tree.c (show_symbol):  Don't show formal namespace
67         for statement functions in order to avoid infinite recursion.
68
69 2010-12-03  Thomas Koenig  <tkoenig@gcc.gnu.org>
70
71         PR fortran/45159
72         * dependency.c (check_section_vs_section):  Pre-calculate
73         the relationship between the strides and the relationship
74         between the start values.  Use an integer constant one for
75         that purpose.
76         Forward dependencies for positive strides apply for where
77         the lhs start <= rhs start and lhs stride <= rhs stride
78         and vice versa for negative stride.  No need to compare
79         end expressions in either case (assume no bounds violation).
80
81 2010-12-03  Thomas Koenig  <tkoenig@gcc.gnu.org>
82
83         * trans-array.c (gfc_could_be_alias):  Handle BT_CLASS
84         as well as BT_DERIVED.
85         (gfc_array_allocate):  Likewise.
86         (gfc_conv_array_parameter):  Likewise.
87         (structure_alloc_comps):  Likewise.
88         (gfc_is_reallocatable_lhs):  Likewise.
89         (gfc_trans_deferred_array):  Likewise.
90
91 2010-12-02  Jakub Jelinek  <jakub@redhat.com>
92
93         PR fortran/46753
94         * trans-openmp.c (gfc_trans_omp_do): Use build2_loc instead of
95         fold_build2_loc for OMP_FOR conditions.
96
97 2010-11-30  Janne Blomqvist  <jb@gcc.gnu.org>
98
99         PR fortran/28105
100         * trans-array.c (gfc_unlikely): Helper function to mark boolean
101         expr as unlikely.
102         (gfc_array_index_size): Check whether the size overflows.
103         (gfc_array_allocate): Check whether size overflows and generate
104         error.
105
106 2010-11-30  Joseph Myers  <joseph@codesourcery.com>
107
108         * trans-common.c: Don't include toplev.h.
109
110 2010-11-29  Joseph Myers  <joseph@codesourcery.com>
111
112         * gfortran.h (alloca): Don't include definitions.
113         (NULL): Don't define.
114
115 2010-11-28  Janus Weil  <janus@gcc.gnu.org>
116
117         PR fortran/46662
118         * resolve.c (update_ppc_arglist): Add check for abstract passed object.
119
120 2010-11-28  Paul Thomas  <pault@gcc.gnu.org>
121
122          PR fortran/35810
123         * trans-array.c (gfc_trans_array_constructor): If the loop->to
124         is a VAR_DECL, assume this is dynamic. In this case, use the
125         counter to obtain the value and set loop->to appropriately.
126         (gfc_conv_ss_descriptor): Always save the offset of a variable
127         in info.saved_offset.
128         (gfc_conv_ss_startstride): Do not attempt bound checking of the
129         lhs of an assignment, if allocatable and f2003 is allowed.
130         (gfc_conv_loop_setup): If possible, do not use an allocatable
131         lhs variable for the loopspec.
132         (gfc_is_reallocatable_lhs): New function.
133         (get_std_lbound): New function.
134         (gfc_alloc_allocatable_for_assignment): New function.
135         * gfortran.h : Add flag_realloc_lhs to the options structure.
136         * lang.opt : Add option f(no-)realloc-lhs.
137         * invoke.texi : Document option f(no-)realloc-lhs.
138         * options.c (gfc_init_options, gfc_post_options,
139         gfc_handle_option): Incorporate f(no-)realloc-lhs with default
140         to frealloc_lhs for -std > f95.
141         * trans-array.h : Add primitive for previous.
142         * trans-expr.c (gfc_conv_string_length): Return if character
143         length is a variable and the expression is NULL.
144         (gfc_conv_procedure_call): If the call is of the kind x = f(...)
145         and the lhs is allocatable and reallocation on assignment OK,
146         call gfc_alloc_allocatable_for_assignment. Do not generate the
147         function call unless direct by reference.
148         (realloc_lhs_loop_for_fcn_call): New function.
149         (realloc_lhs_bounds_for_intrinsic_call): New function.
150         (gfc_trans_arrayfunc_assign): Reallocation assignments need
151         a loopinfo and for the loop bounds to be set.  With intrinsic
152         functions, free the lhs data and let the library allocate the
153         data array. Done by the new functions above.
154         (gfc_trans_assignment_1): If the lhs is allocatable and
155         reallocation on assignment is allowed, mark the lhs and use
156         gfc_alloc_allocatable_for_assignment to make the reallocation.
157         * trans.h : Add is_alloc_lhs bitfield to gfc_ss structure.
158
159 2010-11-27  Tobias Burnus  <burnus@net-b.de>
160             Jerry DeLisle  <jvdelisle@gcc.gnu.org>
161
162         PR fortran/46678
163         trans-decl.c (gfc_trans_auto_character_variable): Use gfc_init_block
164         instead of gfc_start_block.
165
166 2010-11-27  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
167
168         PR fortran/46301
169         trans-expr.c (gfc_trans_assignment): Add error message for not
170         implemented assignment to deferred-length character variable.
171
172 2010-11-26  Jakub Jelinek  <jakub@redhat.com>
173
174         PR bootstrap/45700
175         * trans.h (build1_stat_loc, build2_stat_loc, build3_stat_loc,
176         build4_stat_loc): Removed.
177         (build1_loc, build2_loc, build3_loc, build4_loc): Removed.
178
179 2010-11-25  Janus Weil  <janus@gcc.gnu.org>
180
181         PR fortran/46581
182         * trans.h (gfc_process_block_locals): Removed second argument.
183         * trans-decl.c (trans_associate_var): Moved to trans-stmt.c.
184         (gfc_trans_deferred_vars): Skip ASSOCIATE variables.
185         (gfc_process_block_locals): Don't mark associate names to be
186         initialized.
187         * trans-stmt.c (trans_associate_var): Moved here from trans-decl.c.
188         (gfc_trans_block_construct): Call 'trans_associate_var' from here
189         to make sure SELECT TYPE with associate-name is treated correctly.
190
191 2010-11-24  Tobias Burnus  <burnus@net-b.de>
192
193         PR fortran/46638
194         * target-memory.c (gfc_interpret_derived): Correctly handle
195         component offset.
196
197 2010-11-23  Tobias Burnus  <burnus@net-b.de>
198
199         PR fortran/46545
200         * gfortran.texi (KIND Type Parameters): Quadmath and F2008 changes.
201
202 2010-11-22  Michael Matz  <matz@suse.de>
203
204         * gfortranspec.c (library): New global, moved from ...
205         (lang_specific_driver): ... here.
206         (lang_specific_pre_link): Test it here before including
207         libgfortran.spec.
208
209 2010-11-21  Michael Matz  <matz@suse.de>
210             Tobias Burnus  <burnus@net-b.de>
211
212         PR driver/46516
213         * gfortranspec.c (lang_specific_driver,
214         lang_specific_pre_link): Load libgfortran.spec in
215         lang_specific_pre_link unless found in the -L path.
216
217 2010-11-20  Janne Blomqvist  <jb@gcc.gnu.org>
218
219         * f95-lang.c (gfc_init_decl_processing): Set size_type_node as
220         unsigned int of pointer size and set sizetype based on that.
221         * trans-types.c (gfc_init_types): Don't set size_type_node to an
222         unsigned type.
223
224 2010-11-17  Joseph Myers  <joseph@codesourcery.com>
225
226         * f95-lang.c (gfc_be_parse_file): Take no arguments.
227
228 2010-11-16  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
229             Tobias Burnus  <burnus@net-b.de>
230
231         PR fortran/32049
232         * gfortranspec.c (find_spec_file): New function.
233         (lang_specific_driver): Try to find .spec file and use it.
234         * trans-io.c (iocall): Define IOCALL_X_REAL128/COMPLEX128(,write).
235         (gfc_build_io_library_fndecls): Build decl for __float128 I/O.
236         (transfer_expr): Call __float128 I/O functions.
237         * trans-types.c (gfc_init_kinds): Allow kind-16 belonging
238         to __float128.
239
240 2010-11-15  Tobias Burnus  <burnus@net.b.de>
241
242         PR fortran/46484
243         * check.c (variable_check): Don't treat functions calls as variables;
244         optionally accept function themselves.
245         (gfc_check_all_any, gfc_check_loc, gfc_check_move_alloc,
246         gfc_check_null, gfc_check_present, gfc_check_cpu_time,
247         gfc_check_date_and_time, gfc_check_mvbits, gfc_check_random_number,
248         gfc_check_random_seed, gfc_check_system_clock,
249         gfc_check_dtime_etime, gfc_check_dtime_etime_sub,
250         gfc_check_itime_idate,gfc_check_ltime_gmtime): Update call.
251
252 2010-11-13  Tobias Burnus  <burnus@net-b.de>
253
254         PR fortran/45742
255         * trans-common.c (build_field): Add TREE_SIDE_EFFECTS for volatile.
256         * trans-decl.c (gfc_finish_var_decl): Ditto.
257         (create_function_arglist): Handle volatile dummy arguments.
258
259 2010-11-12  Joseph Myers  <joseph@codesourcery.com>
260
261         * Make-lang.in (gfortranspec.o): Use $(OPTS_H).
262         * gfortran.h (gfc_handle_option): Take location_t parameter.
263         * options.c (gfc_handle_option): Take location_t parameter.
264
265 2010-11-12  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
266
267         PR fortran/45794
268         trans-expr.c (gfc_conv_procedure_call): Avoid NULL array spec.
269         
270 2010-11-11  Nathan Froyd  <froydnj@codesourcery.com>
271
272         PR c/44782
273         * options.c (gfc_post_options): Initialize gfc_option.max_errors.
274         (gfc_handle_option) [OPT_fmax_errors_]: Remove.
275         * lang.opt (fmax-errors=): Remove.
276
277 2010-11-11  Steven G. Kargl <kargl@gcc.gnu.org>
278
279         * symbol.c (verify_bind_c_derived_type):  Accept BIND(C) on an empty
280         derived type.
281
282 2010-11-11  Jan Hubicka  <jh@suse.cz>
283
284         * options.c (gfc_post_options): Remove flag_whopr.
285
286 2010-11-11  Tobias Burnus  <burnus@net-b.de>
287
288         PR fortran/46413
289         * resolve.c (resolve_transfer): Reject I/O transfer of
290         polymorphic type.
291
292         PR fortran/46205
293         * resolve.c (resolve_code): Reject nonscalar FORALL masks.
294
295 2010-11-11  Janus Weil  <janus@gcc.gnu.org>
296
297         * resolve.c (resolve_procedure_interface): Copy 'is_bind_c' attribute.
298
299 2010-11-10  Joseph Myers  <joseph@codesourcery.com>
300
301         * trans-array.c (gfc_trans_deferred_array): Use "front-end"
302         spelling in diagnostic.
303         * trans.c (gfc_allocate_array_with_status): Add missing space in
304         diagnostic.
305
306 2010-11-10  Joseph Myers  <joseph@codesourcery.com>
307
308         * cpp.c (asm_file_name): Don't declare here.
309
310 2010-11-10  Tobias Burnus  <burnus@net-b.de>
311
312         PR fortran/46411
313         * intrinsic.c (gfc_intrinsic_sub_interface): Check for attr.pure
314         and not for attr.elemental.
315         * intrinsic.texi (move_alloc): Document as being pure.
316
317 2010-11-10  Tobias Burnus <burnus@net-b.de>
318
319         PR fortran/46244
320         * resolve.c (resolve_fl_derived): Don't allow CLASS in
321         sequence/BIND(C) types.
322
323 2010-11-09  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
324             Mikael Morin   <mikael@gcc.gnu.org>
325
326         PR fortran/46331
327         * intrinsic.c: Correctly set the pure attributes for intrinsic
328         functions.
329         * expr.c (check_specification_function): Remove this function and move
330         its code into gfc_is_constant_expr. (gfc_is_constant_expr): Change the
331         order of checks by checking for non-constant arguments first.  Then,
332         check for initialization functions, followed by intrinsics.
333
334 2010-11-09  Janus Weil  <janus@gcc.gnu.org>
335
336         PR fortran/46313
337         * gfortran.h (gfc_add_data_component,gfc_add_vptr_component,
338         gfc_add_hash_component,gfc_add_size_component,
339         gfc_add_def_init_component): New macros.
340         * class.c (gfc_add_component_ref): Renamed data component.
341         (get_unique_type_string): New function.
342         (gfc_build_class_symbol): Use 'get_unique_type_string' to construct
343         uniques names for the class containers. Rename components.
344         (gfc_find_derived_vtab): Use 'get_unique_type_string' to construct
345         uniques names for the vtab symbols. Rename components.
346         * decl.c (attr_decl1): Renamed class container components.
347         * iresolve.c (gfc_resolve_extends_type_of): Ditto.
348         * match.c (select_type_set_tmp): Renamed temporaries.
349         * module.c (read_module): Renamed vtab and vtype symbols.
350         * resolve.c (resolve_structure_cons,resolve_typebound_function,
351         resolve_typebound_subroutine,resolve_deallocate_expr,
352         resolve_select_type,resolve_fl_derived): Renamed class container and
353         vtab components.
354         * trans-array.c (structure_alloc_comps): Ditto.
355         * trans-decl.c (gfc_trans_deferred_vars): Ditto.
356         * trans-expr.c (gfc_conv_derived_to_class,gfc_conv_structure,
357         gfc_trans_class_init_assign,gfc_trans_class_assign): Ditto.
358         * trans-intrinsic.c (gfc_conv_intrinsic_sizeof,
359         gfc_conv_intrinsic_storage_size,gfc_conv_allocated,gfc_conv_associated,
360         gfc_conv_same_type_as): Ditto.
361         * trans-stmt.c (gfc_trans_allocate): Ditto.
362
363 2010-11-08  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
364
365         PR fortran/43899
366         * trans-decl.c (generate_local_decl): Do not generate unused warning
367         for variables in namelists.
368
369 2010-11-08  Janus Weil  <janus@gcc.gnu.org>
370
371         PR fortran/46344
372         * decl.c (build_struct): Build vtab immediately if derived type
373         has already been declared.
374
375 2010-11-08  Janus Weil  <janus@gcc.gnu.org>
376
377         PR fortran/46344
378         * trans-types.c (gfc_copy_dt_decls_ifequal): Handle CLASS components.
379
380 2010-11-06  Janus Weil  <janus@gcc.gnu.org>
381
382         PR fortran/46330
383         * trans-expr.c (gfc_trans_class_assign): Find 'vtab' symbol in correct
384         namespace.
385
386 2010-11-05  Janus Weil  <janus@gcc.gnu.org>
387
388         PR fortran/45451
389         PR fortran/46174
390         * class.c (gfc_find_derived_vtab): Improved search for existing vtab.
391         Add component '$copy' to vtype symbol for polymorphic deep copying.
392         * expr.c (gfc_check_pointer_assign): Make sure the vtab is generated
393         during resolution stage.
394         * resolve.c (resolve_codes): Don't resolve code if namespace is already
395         resolved.
396         * trans-stmt.c (gfc_trans_allocate): Call '$copy' procedure for
397         polymorphic ALLOCATE statements with SOURCE.
398
399 2010-11-03  Thomas Koenig  <tkoenig@gcc.gnu.org>
400             Paul Thomas  <pault@gcc.gnu.org>
401
402         * dump-parse-tree.c (code_indent):  Take label into acount
403         when calculating indent.
404         (show_typespec):  Also display class.
405         (show_attr):  Add module name to argument.
406         Don't show UNKNOWN for flavor, access and save. Don't show
407         SAVE_NONE.  Don't show INTENT_UNKNOWN.  Show module for use
408         association.  Show intent only for dummy arguments.
409         Set length of shown symbol names to minimum of 12.
410         Show attributes header.
411         (show_symbol):  Adjust show_level.
412         (show_symtree):  Clear up display for ambiguous.  Show if symbol
413         was imported from namespace.
414         (show_code_node):  Clear up indenting.  Traverse symtree and
415         show code directly instead of calling show_namespace.
416
417 2010-11-02  Nathan Froyd  <froydnj@codesourcery.com>
418
419         * trans-decl.c (add_argument_checking): Use build_zero_cst instead of
420         fold_convert.
421         * trans-expr.c (gfc_conv_missing_dummy, fill_with_spaces): Likewise.
422         * trans-stmt.c (gfc_trans_do): Likewise.
423
424 2010-11-02  Steven G. Kargl  < kargl@gcc.gnu.org>
425             Tobias Burnus  <burnus@net-b.de>
426
427         PR fortran/45170
428         * array.c (gfc_match_array_constructor): Reject deferred type
429         parameter (DTP) in type-spec.
430         * decl.c (char_len_param_value, match_char_length,
431         gfc_match_char_spec, build_sym, variable_decl,
432         enumerator_decl): Support DTP.
433         * expr.c (check_inquiry): Fix check due to support for DTP.
434         * gfortran.h (gfc_typespec): Add Boolean 'deferred'.
435         * misc.c (gfc_clear_ts): Set it to false.
436         * match.c (gfc_match_allocate): Support DTP.
437         * resolve.c (resolve_allocate_expr): Not-implemented error for DTP.
438         (resolve_fl_variable): Add DTP constraint check.
439         * trans-decl.c (gfc_trans_deferred_vars): Add not-implemented
440         error for DTP.
441
442 2010-11-01  Steven G. Kargl  <kargl@gcc.gnu.org>
443
444         PR fortran/46152
445         * fortran/match.c (match_derived_type_spec): Reoplace gfc_match_symbol
446         with a gfc_find_symbol to prevent namespace pollution.  Remove dead
447         code.
448         (match_type_spec): Remove parsing of '::'.  Collapse character
449         kind checking to one location.
450         (gfc_match_allocate): Use correct locus in error message.
451
452 2010-10-30  Thomas Koenig  <tkoenig@gcc.gnu.org>
453
454         * gfortran.h (gfc_option_t):  Replace dump_parse_tree by
455         dump_fortran_original and add dump_fortran_optimized.
456         * lang.opt: Add fdump-fortran-original and
457         fdump-fortran-optimized.  Document that fdump-parse-tree is
458         deprecated.
459         * gfortran.texi: Add -fdump-fortran-original and
460         -fdump-fortran-optimized.  -fdump-parse-tree is deprecated.
461         * frontend-passes.c (gfc_run_passes):  If optimizing and
462         if gfc_option.dump_fortran_optimized is set, dump the parse tree
463         after optimization.
464         * parse.c:  Rename gfc_option.dump_parse_tree to
465         gfc_option.dump_fortran_original.
466         * options.c (gfc_init_options):  Rename gfc_option.dump_parse_tree
467         to gfc_option.dump_fortran_original and handle
468         gfc_option.dump_fortran_optimize.
469         (gfc_post_options): Rename gfc_option.dump_parse_tree
470         to gfc_option.dump_fortran_original.
471         (gfc_handle_option):  Rename OPT_fdump_parse_tree to
472         OPT_fdump_fortran_original and gfc_option.dump_parse_tree
473         to gfc_option.dump_fortran_original.  Handle
474         OPT_fdump_fortran_optimized.
475
476 2010-10-30  Janus Weil  <janus@gcc.gnu.org>
477
478         PR fortran/44917
479         PR fortran/44926
480         PR fortran/46196
481         * interface.c (count_types_test): Symmetrize type check.
482         (generic_correspondence): Ditto.
483
484 2010-10-27  Janus Weil  <janus@gcc.gnu.org>
485
486         PR fortran/46161
487         * interface.c (compare_allocatable): Handle polymorphic allocatables.
488         (compare_parameter): Add two error messages for polymorphic dummies.
489
490 2010-10-26  Janus Weil  <janus@gcc.gnu.org>
491
492         PR fortran/42647
493         * trans.h (gfc_deallocate_scalar_with_status): New prototype.
494         * trans.c (gfc_deallocate_scalar_with_status): New function for
495         deallocation of allocatable scalars.
496         * trans-array.c (structure_alloc_comps): Call it here ...
497         * trans-decl.c (gfc_trans_deferred_vars): ... here ...
498         * trans-stmt.c (gfc_trans_deallocate): ... and here.
499
500 2010-10-26  Tobias Burnus  <burnus@net-b.de>
501
502         PR fortran/45451
503         * trans-stmt.c (gfc_trans_allocate): Do a deep-copy for SOURCE=.
504
505         PR fortran/43018
506         * trans-array.c (duplicate_allocatable): Use size of type and not
507         the size of the pointer to the type.
508
509 2010-10-25  Steven G. Kargl  <kargl@gcc.gnu.org>
510
511         PR fortran/46140
512         * fortran/scanner.c (include_line): Check return value of load_file.
513
514 2010-10-23  Tobias Burnus  <burnus@net-b.de>
515
516         PR fortran/46122
517         * expr.c (gfc_check_vardef_context): Fix PROTECTED check.
518
519 2010-10-21  Janus Weil  <janus@gcc.gnu.org>
520
521         PR fortran/46060
522         * match.h (gfc_matching_ptr_assignment): New global variable to indicate
523         we're currently matching a (non-proc-)pointer assignment.
524         * decl.c (match_pointer_init): Set it.
525         * match.c (gfc_match_pointer_assignment): Ditto.
526         * primary.c (matching_actual_arglist): New global variable to indicate
527         we're currently matching an actual argument list.
528         (gfc_match_actual_arglist): Set it.
529         (gfc_match_varspec): Reject procedure pointer component calls with
530         missing argument list.
531
532 2010-10-21  Janus Weil  <janus@gcc.gnu.org>
533
534         PR fortran/46067
535         * interface.c (gfc_compare_interfaces): Switch arguments of type
536         comparison (important for polymorphic variables).
537
538 2010-10-21  Tobias Burnus  <burnus@net-b.de>
539
540         PR fortran/46100
541         * expr.c (gfc_check_vardef_context): Treat pointer functions
542         as variables.
543
544 2010-10-20  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
545
546         PR fortran/46079
547         * trans_stmt.c (gfc_trans_stop): Fix whitespace.  Build a call to new
548         F08 numeric stop function.
549         * trans.h: Add declaration for gfor_fndecl_stop_numeric_f08.
550         * trans-decl.c (gfc_build_builtin_function_decls): Build declaration
551         for stop_numeric_f08.
552
553 2010-10-18  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
554
555         * gfortran.h: Remove definition of bt enumerator.
556         * libgfortran.h: Add bt enumerator type alighned with defintion.
557         Remove the dtype enumerator, no longer used.
558         previously given in libgfortran/io.h
559         * trans-types.c: Use new bt enumerator.
560         * trans-io.c: Likewise.
561
562 2010-10-16  Thomas Koenig  <tkoenig@gcc.gnu.org>
563
564         * trans-io.c (gfc_build_io_library_fndecls):
565         Array descriptor arguments to transfer_array can be
566         dereferenced recursively.
567
568 2010-10-16  Thomas Koenig  <tkoenig@gcc.gnu.org>
569
570         PR fortran/20165
571         PR fortran/31593
572         PR fortran/43665
573         * trans-io.c (enum iocall): Add IOCALL_X_INTEGER_WRITE,
574         IOCALL_X_LOGICAL_WRITE, IOCALL_X_CHARACTER_WRITE,
575         IOCALL_X_CHARACTER_WIDE_WRIE, IOCALL_X_REAL_WRITE,
576         IOCALL_X_COMPLEX_WRITE and IOCALL_X_ARRAY_WRITE.
577         (gfc_build_io_library_fndecls):  Add corresponding function
578         decls.
579         (transfer_expr):  If the current transfer is a READ, use
580         the iocall with the original version, otherwise the version
581         with _WRITE.
582         (transfer_array_desc):  Likewise.
583
584 2010-10-15  Tobias Burnus  <burnus@net-b.de>
585
586         PR fortran/45186
587         * trans.h (gfc_add_modify_loc, gfc_evaluate_now_loc): New prototypes.
588         (gfc_trans_runtime_error_vararg): Remove prototype.
589         * trans.c (gfc_add_modify_loc, gfc_evaluate_now_loc): New functions.
590         (gfc_add_modify, gfc_evaluate_now): Use them.
591         (trans_runtime_error_vararg): Renamed from
592         gfc_trans_runtime_error_vararg, made static and use locus.
593         (gfc_trans_runtime_error): Use it.
594         (gfc_trans_runtime_check): Ditto and make use of locus.
595         * trans-stmt.c (gfc_trans_if_1, gfc_trans_simple_do,
596         gfc_trans_do, gfc_trans_do_while): Improve line number
597         associated with generated expressions.
598
599 2010-10-12  Daniel Kraft  <d@domob.eu>
600
601         PR fortran/38936
602         * parse.c (parse_associate): Set typespec of associate-name if that of
603         the target is already available.
604
605 2010-10-10  Janus Weil  <janus@gcc.gnu.org>
606
607         PR fortran/45961
608         * resolve.c (resolve_typebound_function): Bugfix for type-bound
609         operators.
610
611 2010-10-09  Thomas Koenig  <tkoenig@gcc.gnu.org>
612
613         * frontend-passes.c:  Include opts.h.
614         (optimize_comparison):  Renamed from optimize_equality.
615         Change second argument to operation to be compared.
616         Use flag_finite_math_only to avoid comparing REAL and
617         COMPLEX only when NANs are honored.  Simplify comparing
618         of string concatenations where left or right operands are
619         equal.  Simplify all comparison operations, based on the result
620         of gfc_dep_compare_expr.
621         * dependency.c:  Include arith.h.
622         (gfc_are_identical_variables):  Volatile variables should not
623         compare equal to themselves.
624         (gfc_dep_compare_expr):  Handle string constants and string
625         concatenations.
626
627 2010-10-08  Joseph Myers  <joseph@codesourcery.com>
628
629         * f95-lang.c (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
630         * gfortran.h (gfc_init_options_struct): Declare.
631         * options.c (gfc_init_options_struct): New.  Split out from
632         gfc_init_options.
633
634 2010-10-07  Janus Weil  <janus@gcc.gnu.org>
635
636         PR fortran/45933
637         * resolve.c (resolve_typebound_function): Use correct declared type
638         for type-bound operators.
639
640 2010-10-07  Mikael Morin  <mikael@gcc.gnu.org>
641
642         PR fortran/45916
643         Revert revision 165026:
644         2010-10-06  Mikael Morin  <mikael@gcc.gnu.org>
645
646         * decl.c (match_procedure_in_type): Assertify if conditions.
647
648 2010-10-06  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
649
650         PR fortran/45889
651         * resolve.c (resolve_transfer): Use expression inside parenthesis to
652         find acutal component to be transgferred.
653
654 2010-10-06  Mikael Morin  <mikael@gcc.gnu.org>
655
656         * trans-stmt.c (gfc_trans_allocate): free lhs expr.
657
658 2010-10-06  Mikael Morin  <mikael@gcc.gnu.org>
659
660         * trans-array.c (gfc_free_ss_chain): Made non-static.
661         * trans-array.h (gfc_free_ss_chain): New prototype.
662         * trans-stmt.c (gfc_trans_where_2): Free ss chains.
663
664 2010-10-06  Mikael Morin  <mikael@gcc.gnu.org>
665
666         * trans-intrinsic.c (gfc_conv_intrinsic_funcall): Also free symbol's
667         subcomponents.
668
669 2010-10-06  Mikael Morin  <mikael@gcc.gnu.org>
670
671         * trans-stmt.c (gfc_trans_forall_1): Free forall struct at the end.
672
673 2010-10-06  Mikael Morin  <mikael@gcc.gnu.org>
674
675         * trans-expr.c (get_proc_ptr_comp): Restore initial expression type
676         before calling gfc_free_expr.
677
678 2010-10-06  Mikael Morin  <mikael@gcc.gnu.org>
679
680         * trans-array.c (gfc_conv_tmp_array_ref): Add factorized call to
681         gfc_advance_se_ss_chain.
682         * trans-expr.c (gfc_conv_subref_array_ref, gfc_conv_procedure_call,
683         gfc_conv_array_constructor_expr, gfc_trans_assignment_1): Remove
684         calls to gfc_advance_se_ss_chain after gfc_conv_tmp_array_ref.
685         * trans-intrinsic.c (gfc_conv_intrinsic_function): Ditto.
686         * trans-stmt.c (gfc_trans_where_assign, gfc_trans_where_3): Ditto.
687
688 2010-10-06  Mikael Morin  <mikael@gcc.gnu.org>
689
690         * trans.c (gfc_restore_backend_locus): New function.
691         (gfc_get_backend_locus): Renamed to ...
692         (gfc_save_backend_locus): ... this.
693         * trans.h (gfc_restore_backend_locus, gfc_get_backend_locus,
694         gfc_save_backend_locus): Same.
695         * trans-array.c (gfc_trans_g77_array, gfc_trans_dummy_array_bias,
696         gfc_trans_deferred_array): Rename gfc_get_backend_locus to
697         gfc_save_backend_locus.
698         (gfc_trans_dummy_array_bias): Call gfc_restore_backend_locus at the
699         end.
700         (gfc_trans_g77_array, gfc_trans_deferred_array): Use
701         gfc_restore_backend_locus instead of gfc_set_backend_locus.
702         (gfc_trans_deferred_array): Call gfc_restore_backend_locus on early
703         return.
704         * trans-decl.c (gfc_get_extern_function_decl, build_entry_thunks,
705         gfc_trans_deferred_vars):
706         Rename gfc_get_backend_locus to gfc_save_backend_locus.
707         Use gfc_restore_backend_locus insted of gfc_set_backend_locus.
708
709 2010-10-06  Mikael Morin  <mikael@gcc.gnu.org>
710
711         * trans-array.c (gfc_build_constant_array_constructor): Free array
712         spec when done.
713
714 2010-10-06  Mikael Morin  <mikael@gcc.gnu.org>
715
716         * symbol.c (gfc_copy_formal_args_ppc): Free previous formal arg list
717         before overwriting it.
718
719 2010-10-06  Mikael Morin  <mikael@gcc.gnu.org>
720
721         * array.c (gfc_match_array_spec): Don't re-initialize cleared struct.
722         * symbol.c (gen_shape_param): Ditto.
723
724 2010-10-06  Mikael Morin  <mikael@gcc.gnu.org>
725
726         * symbol.c (free_entry_list): New function.
727         (gfc_free_namespace): Free list of entries.
728
729 2010-10-06  Mikael Morin  <mikael@gcc.gnu.org>
730
731         * symbol.c (free_components): Free list of formal args and formal
732         namespace.
733
734 2010-10-06  Mikael Morin  <mikael@gcc.gnu.org>
735
736         * simplify.c (gfc_simplify_size): Clear temporary mpz int before
737         returning.
738
739 2010-10-06  Mikael Morin  <mikael@gcc.gnu.org>
740
741         * resolve.c (add_dt_to_dt_list): Remove unneeded if.
742
743 2010-10-06  Mikael Morin  <mikael@gcc.gnu.org>
744
745         * resolve.c (check_typebound_baseobject): Free local expr before
746         returning.
747
748 2010-10-06  Mikael Morin  <mikael@gcc.gnu.org>
749
750         * primary.c (gfc_match_structure_constructor): Invert the assert logic.
751
752 2010-10-06  Mikael Morin  <mikael@gcc.gnu.org>
753
754         * primary.c (gfc_free_structure_ctor_component): Also free the
755         component structure itself.
756
757 2010-10-06  Mikael Morin  <mikael@gcc.gnu.org>
758
759         * module.c (gfc_use_module): Free atom_string when done with it.
760
761 2010-10-06  Mikael Morin  <mikael@gcc.gnu.org>
762
763         * module.c (read_module): Remove useless string duplication.
764
765 2010-10-06  Mikael Morin  <mikael@gcc.gnu.org>
766
767         * gfortranspec.c (append_arg): Remove commented code.
768
769 2010-10-06  Mikael Morin  <mikael@gcc.gnu.org>
770
771         * decl.c (match_procedure_in_type): Assertify if conditions.
772
773 2010-10-06  Mikael Morin  <mikael@gcc.gnu.org>
774
775         * cpp.c (gfc_cpp_post_options): Don't create a cpp reader if
776         preprocessing is disabled.
777
778 2010-10-06  Jakub Jelinek  <jakub@redhat.com>
779
780         PR middle-end/45838
781         * f95-lang.c (ATTR_NOTHROW_LEAF_LIST, ATTR_CONST_NOTHROW_LEAF_LIST,
782         ATTR_NOTHROW_LIST, ATTR_CONST_NOTHROW_LIST): Define.
783         (gfc_define_builtin): Change last argument to int bitmask from bool,
784         control addition of TREE_NOTHROW and leaf attribute as well.
785         (DO_DEFINE_MATH_BUILTIN): Adjust callers.
786         (gfc_init_builtin_functions): Likewise.  Remove
787         ATTR_{,CONST_}NOTHROW_LIST enum.
788
789 2010-10-04  Andi Kleen <ak@linux.intel.com>
790
791         * Make-lang.in (gfortran, f951): Add + to build rule.
792
793 2010-10-04  Richard Guenther  <rguenther@suse.de>
794
795         * f95-lang.c (current_translation_unit): New global variable.
796         (gfc_create_decls): Build a translation-unit decl.
797         (pushdecl): In the global binding-level use the
798         translation-unit decl as DECL_CONTEXT.
799         * trans-decl.c (gfc_get_symbol_decl): Use DECL_FILE_SCOPE_P.
800         (build_function_decl): Likewise.  Delay setting the assembler
801         name, leave setting of DECL_CONTEXT to pushdecl.
802         (trans_function_start): Use DECL_FILE_SCOPE_P.
803         (gfc_create_module_variable): Likewise.  Remove questionable
804         asserts.
805         * trans.c (gfc_generate_module_code): Likewise.
806
807 2010-10-03  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
808
809         * cpp.c (cpp_define_builtins): Call functions from cppbuiltin.c
810         instead of duplicating code.
811         * Make-lang.in: Add dependency on cppbuiltin.h. Don't define
812         BASEVER.
813
814 2010-10-02  Janus Weil  <janus@gcc.gnu.org>
815
816         PR fortran/45748
817         * resolve.c (resolve_formal_arglist): Avoid setting default type for
818         formal arguments of intrinsic procedures.
819
820 2010-09-30  Janus Weil  <janus@gcc.gnu.org>
821
822         PR fortran/45828
823         * resolve.c (resolve_allocate_expr): Do not use
824         'gfc_has_default_initializer'.
825
826 2010-09-30  Tobias Burnus  <burnus@net-b.de>
827
828         * gfortran.tex (Fortran 2008 status): Update list of
829         implemented features.
830
831 2010-09-29  Joseph Myers  <joseph@codesourcery.com>
832
833         * lang.opt: Don't use VarExists.
834
835 2010-09-29  Joseph Myers  <joseph@codesourcery.com>
836
837         * cpp.c (cpp_define_builtins): Update names of gfc_option_t
838         members.
839         (gfc_cpp_post_options): Update names of cpp_options members.
840         (cb_cpp_error): Update names of diagnostic_context members.
841         * f95-lang.c (gfc_init_builtin_functions): Update names of
842         gfc_option_t members.
843         * gfortran.h (gfc_option_t): Rename warn_conversion and
844         flag_openmp.
845         * intrinsic.c (gfc_convert_type_warn): Update names of
846         gfc_option_t members.
847         * options.c (gfc_init_options, gfc_post_options, set_Wall,
848         gfc_handle_option): Update names of gfc_option_t members.
849         * parse.c (next_free, next_fixed): Update names of gfc_option_t
850         members.
851         * scanner.c (pedantic): Remove extern declaration.
852         (skip_free_comments, skip_fixed_comments, include_line): Update
853         names of gfc_option_t members.
854         * trans-decl.c (gfc_generate_function_code): Update names of
855         gfc_option_t members.
856
857 2010-09-28  Tobias Burnus  <burnus@net-b.de>
858
859         PR fortran/40569
860         PR fortran/40568
861         * intrinsic.c (add_functions): Make compiler_version and
862         compiler_options CLASS_INQUIRY.
863         * gfortran.h (gfc_get_option_string): New prototype.
864         * intrinsic.texi (COMPILER_VERSION, COMPILER_OPTIONS):
865         Add documentation.
866         (C_SIZEOF): Mark as inquiry function of ISO_C_BINDING.
867         (ISO_FORTRAN_ENV): Refer to COMPILER_VERSION and COMPILER_OPTIONS.
868         (ISO_C_BINDING): Refer to C_SIZEOF.
869         * options.c (gfc_get_option_string): New function.
870         * simplify.c (gfc_simplify_compiler_options): Use it.
871         (gfc_simplify_compiler_version): Include compiler name.
872
873 2010-09-28  Jan Hubicka  <jh@suse.cz>
874
875         * f95-lang.c (gfc_define_builtin): Make leaf.
876         (gfc_init_builtin_functions): Handle only ATTR_CONST_NOTHROW_LEAF_LIST
877         and ATTR_NOTHROW_LEAF_LIST.
878         (DEF_SYNC_BUILTIN): Check ATTR_CONST_NOTHROW_LEAF_LIST.
879         (DEF_GOMP_BUILTIN): Likewise.
880
881 2010-09-28  Tobias Burnus  <burnus@net-b.de>
882
883         PR fortran/45756
884         * trans-decl.c (gfc_get_symbol_decl): Use gsym for decl of
885         module parameters.
886
887 2010-09-27  Tobias Burnus  <burnus@net-b.de>
888
889         PR fortran/40569
890         PR fortran/40568
891         * intrinsic.h (gfc_simplify_compiler_options,
892         gfc_simplify_compiler_version): New prototypes.
893         * intrinsic.c (gfc_intrinsic_function_by_id,
894         make_from_module): New functions.
895         (gfc_find_function, gfc_find_subroutine, gfc_generic_intrinsic,
896         gfc_specific_intrinsic): Don't return module intrinsics.
897         (add_functions): Add compiler_options, compiler_version.
898         (gfc_intrinsic_func_interface): Also lookup symbol by ISYM ID.
899         * symbol.c (std_for_isocbinding_symbol): Add version check for
900         NAMED_FUNCTIONS.
901         * iso-fortran-env.def: Add compiler_options, compiler_version.
902         * iso-c-binding.def: Add c_sizeof.
903         * gfortran.h (gfc_intrinsic_sym): Add from_module:1.
904         (iso_c_binding_symbol, iso_fortran_env_symbol): Add NAMED_FUNCTIONS.
905         (gfc_intrinsic_function_by_id): New prototype.
906         * module.c (create_intrinsic_function): New function.
907         (import_iso_c_binding_module, use_iso_fortran_env_module): Use it.
908         * trans-types.c (init_c_interop_kinds): Add NAMED_FUNCTIONS.
909         * resolve.c (resolve_intrinsic): Try also to resolve intrinsics
910         by ISYM ID.
911         * simplify.c (gfc_simplify_compiler_options,
912         gfc_simplify_compiler_version): New functions.
913
914 2010-09-26  Daniel Kraft  <d@domob.eu>
915
916         PR fortran/45783
917         PR fortran/45795
918         * resolve.c (resolve_select_type): Clarify code.
919         (resolve_assoc_var): Only set typespec if it is currently unknown.
920
921 2010-09-26  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
922
923         PR fortran/45793
924         * module.c (create_int_parameter_array): Set the array value shape.
925
926 2010-09-25  Tobias Burnus  <burnus@net-b.de>
927
928         * gfortran.texi: Re-add accidently removed \input line.
929
930 2010-09-25  Daniel Kraft  <d@domob.eu>
931
932         PR fortran/45776
933         * gfortran.h (struct gfc_dt): New member `dt_io_kind'.
934         * io.c (resolve_tag): F2008 check for NEWUNIT and variable
935         definition checks for NEWUNIT, IOSTAT, SIZE and IOMSG.
936         (gfc_free_dt): Correctly handle freeing of `dt_io_kind' and
937         `extra_comma' with changed semantics.
938         (gfc_resolve_dt): Check variable definitions.
939         (match_io_element): Remove INTENT and PURE checks here and
940         initialize code->ext.dt member.
941         (match_io): Set dt->dt_io_kind.
942         (gfc_resolve_inquire): Check variable definition for all tags
943         except UNIT, FILE and ID.
944         * resolve.c (resolve_transfer): Variable definition check.
945
946 2010-09-25  Tobias Burnus  <burnus@net-b.de>
947
948         * interface.c (gfc_match_end_interface): Constify char pointer
949         to fix warning.
950
951 2010-09-24  Steven G. Kargl  < kargl@gcc.gnu.org>
952
953         * interface.c (gfc_match_end_interface): Deal with user defined
954         operators that overload rational operators and C1202.
955
956 2010-09-24  Tobias Burnus  <burnus@net-b.de>
957
958         * gfortran.texi: Add second space after end-of-sentence period;
959         change / to /@/ to allow hyphenation of URLs.
960         (Standards): Remove duplicated OpenMP, update wording given that
961         Fortran 2008 now released.
962         (Fortran 2008 status): Update and add list of implemented features.
963
964 2010-09-24  Tobias Burnus  <burnus@net-b.de>
965
966         PR fortran/40571
967         * iso-fortran-env.def: Add NAMED_KINDARRAY with
968         character_kinds, integer_kinds, logical_kinds and
969         real_kinds.
970         * gfortran.h: Add them to iso_fortran_env_symbol.
971         * libgfortran.h: Rename GFC_INQUIRE_INTERNAL_UNIT to
972         LIBERROR_INQUIRE_INTERNAL_UNIT and move it from
973         libgfortran_stat_codes to libgfortran_error_codes.
974         * module.c (create_int_parameter_array): New function.
975         (use_iso_fortran_env_module): Use it for
976         NAMED_KINDARRAY of iso-fortran-env.def.
977         * trans-decl.c (gfc_get_symbol_decl): Parameter
978         arrays of intrinsics modules become local static variables.
979         * intrinsic.texi (ISO_FORTRAN_ENV): Add character_kinds,
980         integer_kinds, logical_kinds and real_kinds.
981
982 2010-09-23  Thomas Koenig  <tkoenig@gcc.gnu.org>
983
984         PR fortran/45744
985         * frontend-passes.c (optimize_binop_array_assignment):
986         Only re-use lhs as intermediate storage if kind and type
987         parameters match.
988
989 2010-09-23  Mikael Morin  <mikael@gcc.gnu.org>
990
991         PR fortran/45745
992         PR fortran/45648
993         * trans-array.c (gfc_conv_expr_descriptor): Handle
994         ss->type == GFC_SS_INTRINSIC (for {l,u}bound intrinsics) case.
995
996 2010-09-23  Tobias Burnus  <burnus@net-b.de>
997
998         * intrinsic.texi (OpenMP modules): Add named constants of
999         OMP_LIB.
1000
1001 2010-09-23  Daniel Kraft  <d@domob.eu>
1002
1003         PR fortran/38936
1004         PR fortran/44044
1005         PR fortran/45474
1006         * gfortran.h (gfc_check_vardef_context): New method.
1007         (struct symbol_attribute): New flag `select_type_temporary'.
1008         * primary.c (gfc_variable_attr): Clarify initialization of ref.
1009         (match_variable): Remove PROTECTED check and assignment check
1010         for PARAMETERs (this is now done later).
1011         * match.c (gfc_match_iterator): Remove INTENT(IN) check.
1012         (gfc_match_associate): Defer initialization of newAssoc->variable.
1013         (gfc_match_nullify): Remove PURE definability check.
1014         (select_type_set_tmp): Set new `select_type_temporary' flag.
1015         * expr.c (gfc_check_assign): Remove INTENT(IN) check here.
1016         (gfc_check_pointer_assign): Ditto (and other checks removed).
1017         (gfc_check_vardef_context): New method.
1018         * interface.c (compare_parameter_protected): Removed.
1019         (compare_actual_formal): Use `gfc_check_vardef_context' for checks
1020         related to INTENT([IN]OUT) arguments.
1021         * intrinsic.c (check_arglist): Check INTENT for intrinsics.
1022         * resolve.c (gfc_resolve_iterator): Use `gfc_check_vardef_context'.
1023         (remove_last_array_ref): New method.
1024         (resolve_deallocate_expr), (resolve_allocate_expr): Ditto.
1025         (resolve_allocate_deallocate): Ditto (for STAT and ERRMSG).
1026         (resolve_assoc_var): Remove checks for definability here.
1027         (resolve_select_type): Handle resolving of code->block here.
1028         (resolve_ordinary_assign): Remove PURE check.
1029         (resolve_code): Do not resolve code->blocks for SELECT TYPE here.
1030         Use `gfc_check_vardef_context' for assignments and pointer-assignments.
1031
1032 2010-08-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1033
1034         * gfortran.texi (Argument list functions): Allow URL to wrap.
1035         * intrinsic.texi (GETGID, GETPID, GETUID, IMAGE_INDEX)
1036         (IS_IOSTAT_END, IS_IOSTAT_EOR, NUM_IMAGES, THIS_IMAGE)
1037         (ISO_FORTRAN_ENV): Fix markup in index entries, and a couple of
1038         code markups in the text.
1039         * invoke.texi (Fortran Dialect Options)
1040         (Error and Warning Options, Directory Options, Code Gen Options):
1041         Likewise.  Remove @code inside @smallexample.
1042
1043 2010-09-22  Joseph Myers  <joseph@codesourcery.com>
1044
1045         * gfortranspec.c (lang_specific_driver): Handle OPT__version and
1046         OPT__help instead of OPT_fversion and OPT_fhelp.
1047         * lang.opt (-all-warnings, -assert, -assert=, -comments,
1048         -comments-in-macros, -define-macro, -define-macro=, -dependencies,
1049         -dump, -dump=, -include-barrier, -include-directory,
1050         -include-directory=, -include-directory-after,
1051         -include-directory-after=, -include-prefix, -include-prefix=,
1052         -no-line-commands, -no-standard-includes, -output, -output=,
1053         -preprocess, -print-missing-file-dependencies, -trace-includes,
1054         -undefine-macro, -undefine-macro=, -user-dependencies, -verbose,
1055         -write-dependencies, -write-user-dependencies): New.
1056
1057 2010-09-21  Jason Blevins  <jrblevin@sdf.org>
1058
1059         * intrinsics.texi (HYPOT, IMAGE_INDEX, BESSEL_JN, BESSEL_YN,
1060         execute_command_line, IEOR, IOR, NORM2, NOT, NULL, PARITY):
1061         Correct spelling.
1062
1063 2010-09-21  Mikael Morin  <mikael@gcc.gnu.org>
1064
1065         PR fortran/45648
1066         * trans-array.c (gfc_conv_expr_descriptor): Calculate dim out of n and
1067         info->dim.
1068
1069         PR fortran/45648
1070         * trans-array.c (gfc_conv_expr_descriptor): Unset full if we are
1071         accessing dimensions in reversed order. 
1072
1073         PR fortran/45648
1074         * trans-array.c (gfc_conv_expr_descriptor): Special case noncopying
1075         intrinsic function call. 
1076
1077         * trans-array.c (gfc_conv_expr_descriptor): Remove ss lookup.
1078         Update asserts accordingly.
1079
1080         PR fortran/45648
1081         * trans.h (gfc_se): New field force_tmp. 
1082         * trans-expr.c (gfc_conv_procedure_call): Check for argument alias
1083         and set parmse.force_tmp if some alias is found. 
1084         * trans-array.c (gfc_conv_expr_descriptor): Force a temporary creation
1085         if se->force_tmp is set. 
1086
1087 2010-09-20  Janus Weil  <janus@gcc.gnu.org>
1088
1089         PR fortran/45438
1090         * trans-expr.c (gfc_conv_procedure_call): Fix pointer checking for
1091         TBPs, PPCs and pointer/allocatable components.
1092
1093 2010-09-20  Paul Thomas  <pault@gcc.gnu.org>
1094
1095         PR fortran/45081
1096         * simplify.c (is_constant_array_expr): Allow structure array
1097         elements as well as constants.
1098         (gfc_simplify_pack, gfc_simplify_reshape, gfc_simplify_spread,
1099         gfc_simplify_transpose, gfc_simplify_unpack): Copy the derived
1100         type of source to the result.
1101
1102 2010-09-19  Thomas Koenig  <tkoenig@gcc.gnu.org>
1103
1104         * frontend-passes.c (gfc_expr_walker):  Also
1105         handle EXPR_SUBSTRING.
1106
1107 2010-09-19  Thomas Koenig  <tkoenig@gcc.gnu.org>
1108
1109         * frontend-passes.c (gfc_expr_walker):  Handle
1110         constructors and references.
1111
1112 2010-09-16  Tobias Burnus  <burnus@net-b.de>
1113
1114         PR fortran/43665
1115         * trans-types.c (create_fn_spec): New function.
1116         (gfc_get_function_type): Call it.
1117
1118 2010-09-16  Jakub Jelinek  <jakub@redhat.com>
1119
1120         * gfortran.h (walk_code_fn_t, walk_expr_fn_t): New types.
1121         (gfc_expr_walker, gfc_code_walker): New prototypes.
1122         * frontend-passes.c (gfc_expr_walker, gfc_code_walker): New functions.
1123         (WALK_SUBEXPR, WALK_SUBEXPR_TAIL, WALK_SUBCODE): Define.
1124         (optimize_namespace): Use gfc_code_walker.
1125         (optimize_code, optimize_expr): Rewritten as gfc_code_walker hooks.
1126         (optimize_expr_0, optimize_code_node,
1127         optimize_actual_arglist): Removed.
1128         (optimize_assignment): Don't call optimize_expr_0.
1129
1130 2010-09-16  Janus Weil  <janus@gcc.gnu.org>
1131
1132         PR fortran/45674
1133         * interface.c (compare_parameter): Create vtab for actual argument,
1134         instead of formal (if needed).
1135
1136 2010-09-15  Janus Weil  <janus@gcc.gnu.org>
1137
1138         PR fortran/45577
1139         * resolve.c (resolve_allocate_expr): Do default initialization via
1140         EXEC_INIT_ASSIGN.
1141
1142 2010-09-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1143
1144         * mathbuiltins.def: Do not defined huge_val built-in.
1145         * trans-const.c (gfc_build_inf_or_huge): New function.
1146         * trans-const.h (gfc_build_inf_or_huge): New prototype.
1147         * f95-lang.c (gfc_init_builtin_functions): Don't defined
1148         huge_val built-ins.
1149         * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): We don't
1150         have functions of type (*) (void) anymore.
1151         (gfc_conv_intrinsic_minmaxloc): Call gfc_build_inf_or_huge.
1152         (gfc_conv_intrinsic_nearest): Call gfc_build_inf_or_huge instead
1153         of generating a call to huge_val().
1154
1155 2010-09-11  Mikael Morin  <mikael@gcc.gnu.org>
1156
1157         * gfortran.h (gfc_expr): Remove inline_noncopying_intrinsic attribute.
1158         * dependency.c (gfc_check_dependency): Don't depend on
1159         expr's inline_noncopying_intrinsic_attribute.
1160         * dependency.c (gfc_check_argument_var_dependency,
1161         gfc_check_argument_dependency): Ditto. Recursively check dependency
1162         as NOT_ELEMENTAL in the non-copying (=transpose) case.
1163         * trans-intrinsic.c (gfc_conv_intrinsic_function): Ditto.
1164         * resolve.c (find_noncopying_intrinsics): Remove.
1165         (resolve_function, resolve_call): Remove call to
1166         find_noncopying_intrinsics.
1167
1168         * trans-array.c (gfc_conv_array_transpose): Remove.
1169         (gfc_walk_subexpr): Make non-static. Move prototype...
1170         * trans-array.h (gfc_walk_subexpr): ... here.
1171         * trans-intrinsic.c (gfc_conv_intrinsic_function): Update transpose
1172         handling.
1173         (walk_inline_intrinsic_transpose, walk_inline_intrinsic_function,
1174         gfc_inline_intrinsic_function_p): New.
1175         (gfc_is_intrinsic_libcall): Return early in inline intrinsic case.
1176         Remove transpose from the libcall list.
1177         (gfc_walk_intrinsic_function): Special case inline intrinsic.
1178         * trans.h (gfc_inline_intrinsic_function_p): New prototype.
1179
1180 2010-09-10  Mikael Morin  <mikael@gcc.gnu.org>
1181
1182         * trans-expr.c (expr_is_variable): New function taking non-copying
1183         intrinsic functions into account.
1184         (gfc_trans_assignment_1): Use expr_is_variable.
1185
1186 2010-09-10  Mikael Morin  <mikael@gcc.gnu.org>
1187
1188         * trans-array.c (gfc_conv_loop_setup): Access the shape along the
1189         real array dimension instead of the scalarizer (loop) dimension.
1190
1191 2010-09-10  Mikael Morin  <mikael@gcc.gnu.org>
1192
1193         * trans-array.c (gfc_conv_resolve_dependencies): Handle same-array
1194         transposed references.
1195
1196 2010-09-10  Tobias Burnus  <burnus@net-b.de>
1197
1198         PR fortran/45186
1199         * trans.h (build1_stat_loc, build2_stat_loc, build3_stat_loc,
1200         build4_stat_loc): New inline functions.
1201         (build1_loc, build2_loc, build3_loc, build4_loc): New macros.
1202         (build1_v, build2_v, build3_v, build4_v): Use input_location
1203         as locus.
1204         * trans-array.c (gfc_trans_scalarized_loop_end,
1205         gfc_conv_array_parameter): Replace build[1-4] by build[1-4]_loc.
1206         * trans.c (gfc_build_addr_expr, gfc_build_array_ref,
1207         gfc_finish_wrapped_block): Ditto.
1208         * trans-decl.c (gfc_init_default_dt, init_intent_out_dt): Ditto.
1209         * trans-expr.c (gfc_conv_missing_dummy,
1210         gfc_trans_alloc_subarray_assign, gfc_trans_zero_assign): Ditto.
1211         * trans-openmp.c (gfc_omp_clause_default_ctor,
1212         gfc_trans_omp_critical, gfc_trans_omp_parallel,
1213         gfc_trans_omp_parallel_do, gfc_trans_omp_parallel_sections,
1214         gfc_trans_omp_parallel_workshare, gfc_trans_omp_sections
1215         gfc_trans_omp_single, gfc_trans_omp_task,
1216         gfc_trans_omp_workshare): Ditto.
1217
1218 2010-09-09  Steven G. Kargl  <kargl@gcc.gnu.org>
1219
1220         * fortran/expr.c (check_inquiry): OPTIONAL attribute is not allowed
1221         for dummy argument that appears in a specification statement.
1222
1223 2010-09-09  Mikael Morin  <mikael@gcc.gnu.org>
1224
1225         * trans-array.c (gfc_get_array_ref_dim): New function.
1226         (gfc_trans_create_temp_array): Reconstruct array
1227         bounds from loop bounds. Use array bounds instead of loop bounds.
1228
1229 2010-09-09  Mikael Morin  <mikael@gcc.gnu.org>
1230
1231         * trans-array.c (gfc_set_loop_bounds_from_array_spec):
1232         Get the array dimension from the dim array.
1233
1234 2010-09-09  Mikael Morin  <mikael@gcc.gnu.org>
1235
1236         * trans-array.c (gfc_trans_preloop_setup): Unconditionally use the
1237         dim array to get the stride in the innermost loop.
1238
1239 2010-09-09  Mikael Morin  <mikael@gcc.gnu.org>
1240
1241         * trans-array.c (gfc_trans_create_temp_array): Don't set dim array.
1242         (gfc_conv_loop_setup, gfc_walk_function_expr): Set dim array.
1243         * trans-intrinsic.c (gfc_walk_intrinsic_libfunc): Ditto.
1244
1245 2010-09-09  Mikael Morin  <mikael@gcc.gnu.org>
1246
1247         * trans-array.c (gfc_trans_create_temp_array): Assert loop dimension
1248         and info dimension are the same. Loop over loop dimension.
1249         * trans-stmt.c (gfc_conv_elemental_dependencies): Set loop dimension
1250
1251 2010-09-09  Mikael Morin  <mikael@gcc.gnu.org>
1252
1253         * trans-array.c (gfc_conv_array_transpose): Change generated descriptor
1254         name
1255
1256 2010-09-09  Tobias Burnus  <burnus@net-b.de>
1257
1258         PR fortran/43665
1259         * intrincic.texi (FGET, FGETC, FPUT, FPUTC, FSTAT, GETCWD, KILL,
1260         STAT): Show also syntax for the function version.
1261         * intrinsic.c (add_sym_1s_intent, add_sym_2s_intent,
1262          add_sym_3s_intent): Remove function.
1263         (add_sym_1s, add_sym_2s, add_sym_3s): Take always the intent
1264         as argument.
1265         (add_sym_2_intent): New function.
1266         (add_functions): Set intent for functions which modify
1267         the argument: fstat, fgetc, fget, hostnm, lstat, stat. Change
1268         argument name of hostnm from "a" to "c"
1269         (add_subroutines): Change add_sym_*s_intent to
1270         add_sym_*s and add intent to the add_sym_*s calls.
1271
1272 2010-09-08  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1273
1274         PR fortran/38282
1275         * intrinsic.c (add_functions): Add B{G,L}{E,T}, DSHIFT{L,R},
1276         MASK{L,R}, MERGE_BITS and SHIFT{A,L,R}.
1277         * gfortran.h: Define ISYM values for above intrinsics.
1278         * intrinsic.h (gfc_check_bge_bgt_ble_blt, gfc_check_dshift,
1279         gfc_check_mask, gfc_check_merge_bits, gfc_check_shift,
1280         gfc_simplify_bge, gfc_simplify_bgt, gfc_simplify_ble,
1281         gfc_simplify_blt, gfc_simplify_dshiftl, gfc_simplify_dshiftr,
1282         gfc_simplify_lshift, gfc_simplify_maskl, gfc_simplify_maskr,
1283         gfc_simplify_merge_bits, gfc_simplify_rshift,
1284         gfc_simplify_shifta, gfc_simplify_shiftl, gfc_simplify_shiftr,
1285         gfc_resolve_dshift, gfc_resolve_mask, gfc_resolve_merge_bits,
1286         gfc_resolve_shift): New prototypes.
1287         * iresolve.c (gfc_resolve_dshift, gfc_resolve_mask,
1288         gfc_resolve_merge_bits, gfc_resolve_shift): New functions.
1289         * check.c (gfc_check_bge_bgt_ble_blt, gfc_check_dshift,
1290         gfc_check_mask, gfc_check_merge_bits, gfc_check_shift): New
1291         functions.
1292         * trans-intrinsic.c (gfc_conv_intrinsic_dshift,
1293         gfc_conv_intrinsic_bitcomp, gfc_conv_intrinsic_shift,
1294         gfc_conv_intrinsic_merge_bits, gfc_conv_intrinsic_mask): New
1295         functions.
1296         (gfc_conv_intrinsic_function): Call above static functions.
1297         * intrinsic.texi: Document new intrinsics.
1298         * simplify.c (gfc_simplify_bge, gfc_simplify_bgt, gfc_simplify_ble,
1299         gfc_simplify_blt, gfc_simplify_dshiftl, gfc_simplify_dshiftr,
1300         gfc_simplify_lshift, gfc_simplify_maskl, gfc_simplify_maskr,
1301         gfc_simplify_merge_bits, gfc_simplify_rshift, 
1302         gfc_simplify_shifta, gfc_simplify_shiftl, gfc_simplify_shiftr):
1303         New functions.
1304
1305 2010-09-08  Jakub Jelinek  <jakub@redhat.com>
1306
1307         * frontend-passes.c (optimize_code_node): Walk block chain by default.
1308
1309         PR fortran/45597
1310         * trans-openmp.c (gfc_trans_omp_do): Store exit/cycle labels on code
1311         instead of code->block.
1312
1313         PR fortran/45595
1314         * openmp.c (resolve_omp_do): Report not enough do loops for
1315         collapse even if block->next is NULL.
1316
1317 2010-09-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
1318
1319         PR fortran/45576
1320         * dependency.c (gfc_deb_compare_expr):  Take missing optional
1321         arguments into account.
1322
1323 2010-09-08  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1324
1325         * trans.h (gfor_fndecl_clz128, gfor_fndecl_ctz128): Remove.
1326         * trans-decl.c (gfor_fndecl_clz128, gfor_fndecl_ctz128): Remove.
1327         (gfc_build_intrinsic_function_decls): Don't build the
1328         gfor_fndecl_clz128 and gfor_fndecl_ctz128.
1329         * trans-intrinsic.c (gfc_conv_intrinsic_leadz,
1330         gfc_conv_intrinsic_trailz): Generate inline arithmetic instead
1331         of calling clz128/ctz128 library functions.
1332
1333 2010-09-07  Jan Hubicka  <jh@suse.cz>
1334
1335         * trans-expr.c (gfc_conv_initializer): Set STATIC flags for
1336         initializers.
1337
1338 2010-09-07  Tobias Burnus <burnus@net-b.de>
1339         
1340         PR fortran/45583
1341         * intrinsic.texi (COS): Remove superfluous "n".
1342
1343 2010-09-07  Tobias Burnus <burnus@net-b.de>
1344
1345         PR fortran/45186
1346         * trans-array.c (gfc_conv_descriptor_data_get,
1347         gfc_conv_descriptor_data_set, gfc_conv_descriptor_data_addr,
1348         gfc_conv_descriptor_offset, gfc_conv_descriptor_dtype,
1349         gfc_conv_descriptor_dimension, gfc_conv_descriptor_stride,
1350         gfc_conv_descriptor_lbound, gfc_conv_descriptor_ubound,
1351         gfc_conv_shift_descriptor_lbound,
1352         gfc_set_loop_bounds_from_array_spec,
1353         gfc_trans_allocate_array_storage, gfc_trans_create_temp_array,
1354         gfc_conv_array_transpose, gfc_get_iteration_count,
1355         gfc_grow_array, gfc_trans_array_ctor_element,
1356         gfc_trans_array_constructor_subarray,
1357         gfc_trans_array_constructor_value,
1358         constant_array_constructor_loop_size, gfc_trans_array_constructor,
1359         gfc_set_vector_loop_bounds, gfc_trans_array_bound_check,
1360         gfc_conv_array_index_offset, gfc_conv_scalarized_array_ref,
1361         gfc_conv_array_ref, gfc_trans_preloop_setup,
1362         gfc_trans_scalarized_loop_end, gfc_conv_ss_startstride,
1363         gfc_conv_loop_setup, gfc_conv_array_extent_dim,
1364         gfc_conv_descriptor_size, gfc_array_init_size,
1365         gfc_array_allocate, gfc_array_deallocate,
1366         gfc_trans_array_bounds, gfc_trans_auto_array_allocation,
1367         gfc_trans_dummy_array_bias, gfc_get_dataptr_offset,
1368         get_array_charlen, gfc_conv_expr_descriptor,
1369         array_parameter_size, gfc_conv_array_parameter,
1370         gfc_trans_dealloc_allocated, get_full_array_size,
1371         duplicate_allocatable,
1372         structure_alloc_comps): Change fold_build[0-9] to
1373         fold_build[0-9]_loc.
1374         (duplicate_allocatable, structure_alloc_comps,
1375         gfc_duplicate_allocatable): Add space after function name.
1376
1377 2010-09-07  Mikael Morin  <mikael@gcc.gnu.org>
1378
1379         * trans-stmt.c (gfc_trans_character_select): Be conversion-safe while
1380         checking string length value.
1381         * trans-intrinsic.c (gfc_conv_intrinsic_char): Build integer using
1382         gfc_charlen_type_node type.
1383
1384         PR fortran/45564
1385         * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Convert string
1386         length to gfc_charlen_type_node.
1387
1388 2010-09-06  Thomas Koenig  <tkoenig@gcc.gnu.org>
1389
1390         PR fortran/36931
1391         * frontend-passes.c (optimize_binop_array_assignment):  New
1392         function.
1393         (optimize_assignment):  Call it.
1394
1395 2010-09-06  Thomas Koenig  <tkoenig@gcc.gnu.org>
1396
1397         PR fortran/34145
1398         * trans-expr.c (gfc_conv_substring):  If start and end
1399         of the string reference are equal, set the length to one.
1400
1401 2010-09-06  Tobias Burnus  <burnus@net-b.de>
1402
1403         PR fortran/45560
1404         * dump-parse-tree.c (gfc_debug_expr): Use stderr instead of stdout.
1405
1406 2010-09-06  Tobias Burnus  <burnus@net-b.de>
1407
1408         PR fortran/45560
1409         * dump-parse-tree.c (gfc_debug_expr): New function.
1410
1411 2010-09-06  Tobias Burnus  <burnus@net-b.de>
1412
1413         PR fortran/38282
1414         * intrinsic.c (add_functions): Support IALL, IANY, IPARITY.
1415         (check_specific): Special case for those intrinsics.
1416         * gfortran.h (gfc_isym_id): Add new intrinsics
1417         * intrinsic.h (gfc_check_transf_bit_intrins,
1418         gfc_simplify_iall, gfc_simplify_iany, gfc_simplify_iparity,
1419         gfc_resolve_iall, gfc_resolve_iany, gfc_resolve_iparity):
1420         New prototypes.
1421         * iresolve.c (gfc_resolve_iall, gfc_resolve_iany,
1422         gfc_resolve_iparity, resolve_transformational): New functions.
1423         (gfc_resolve_product, gfc_resolve_sum,
1424         gfc_resolve_parity): Use resolve_transformational.
1425         * check.c (gfc_check_transf_bit_intrins): New function.
1426         * simplify.c (gfc_simplify_iall, gfc_simplify_iany,
1427         gfc_simplify_iparity, do_bit_any, do_bit_ior,
1428         do_bit_xor, simplify_transformation): New functions.
1429         (gfc_simplify_all, gfc_simplify_any, gfc_simplify_parity,
1430         gfc_simplify_sum, gfc_simplify_product): Use simplify_transformation.
1431         * trans-intrinsic.c (gfc_conv_intrinsic_arith,
1432         gfc_conv_intrinsic_function, gfc_is_intrinsic_libcall):
1433         Handle IALL, IANY and IPARITY intrinsics.       
1434         * intrinsic.texi (IMAGE_INDEX): Move up to fix alphabetic
1435         order.
1436         (IALL, IANY, IPARITY): Document new intrinsics.
1437
1438 2010-09-05  Tobias Burnus <burnus@net-b.de>
1439
1440         PR fortran/45186
1441         * f95-lang.c (gfc_truthvalue_conversion): Use
1442         fold_build[0-9]_loc instead of fold_build[0-9].
1443         * convert.c (convert): Ditto.
1444         * trans-intrinsic.c (gfc_conv_intrinsic_conversion,
1445         build_fixbound_expr, build_fix_expr, gfc_conv_intrinsic_aint,
1446         gfc_conv_intrinsic_int, gfc_conv_intrinsic_imagpart,
1447         gfc_conv_intrinsic_conjg, gfc_trans_same_strlen_check,
1448         gfc_conv_intrinsic_bound, gfc_conv_intrinsic_abs,
1449         gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_mod,
1450         gfc_conv_intrinsic_dim, gfc_conv_intrinsic_sign,
1451         gfc_conv_intrinsic_dprod, gfc_conv_intrinsic_char,
1452         gfc_conv_intrinsic_ctime, gfc_conv_intrinsic_fdate,
1453         gfc_conv_intrinsic_ttynam, gfc_conv_intrinsic_minmax,
1454         gfc_conv_intrinsic_minmax_char, gfc_conv_intrinsic_anyall,
1455         gfc_conv_intrinsic_count, gfc_conv_intrinsic_arith,
1456         gfc_conv_intrinsic_dot_product, gfc_conv_intrinsic_minmaxloc,
1457         gfc_conv_intrinsic_minmaxval, gfc_conv_intrinsic_btest,
1458         gfc_conv_intrinsic_bitop, gfc_conv_intrinsic_not,
1459         gfc_conv_intrinsic_singlebitop, gfc_conv_intrinsic_ibits,
1460         gfc_conv_intrinsic_rlshift, gfc_conv_intrinsic_ishft,
1461         gfc_conv_intrinsic_ishftc, gfc_conv_intrinsic_leadz,
1462         gfc_conv_intrinsic_trailz, gfc_conv_intrinsic_popcnt_poppar,
1463         gfc_conv_intrinsic_ichar, gfc_conv_has_intvalue,
1464         gfc_conv_intrinsic_merge, gfc_conv_intrinsic_spacing,
1465         gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_size,
1466         size_of_string_in_bytes, gfc_conv_intrinsic_sizeof,
1467         gfc_conv_intrinsic_storage_size, gfc_conv_intrinsic_strcmp,
1468         gfc_conv_intrinsic_transfer, gfc_conv_allocated,
1469         gfc_conv_associated, gfc_conv_same_type_as,
1470         gfc_conv_intrinsic_trim, gfc_conv_intrinsic_repeat): Ditto.
1471
1472 2010-09-04  Tobias Burnus  <burnus@net-b.de>
1473
1474         PR fortran/45530
1475         * resolve.c (resolve_fl_namelist): Change constraint checking
1476         order to prevent endless loop.
1477
1478 2010-09-04  Janus Weil  <janus@gcc.gnu.org>
1479
1480         PR fortran/45507
1481         * resolve.c (resolve_allocate_expr): Generate default initializers
1482         already at this point, resolve them and put them into expr3, ...
1483         * trans-stmt.c (gfc_trans_allocate): ... instead of waiting until
1484         translation stage.
1485
1486 2010-09-03  Tobias Burnus  <burnus@net-b.de>
1487
1488         PR fortran/45186
1489         * trans-intrinsic.c (gfc_conv_intrinsic_sign,
1490         gfc_conv_intrinsic_leadz): Use build_call_expr_loc instead
1491         of build_call_expr.
1492         * trans-expr.c (gfc_conv_expr_present, gfc_conv_missing_dummy,
1493         gfc_conv_string_length, gfc_conv_substring,
1494         gfc_conv_component_ref, gfc_conv_unary_op, gfc_conv_powi,
1495         gfc_conv_cst_int_power, gfc_conv_string_tmp, gfc_conv_concat_op,
1496         gfc_conv_expr_op, gfc_build_compare_string,
1497         gfc_set_interface_mapping_bounds, gfc_conv_subref_array_arg,
1498         gfc_conv_derived_to_class, conv_isocbinding_procedure,
1499         gfc_conv_procedure_call, fill_with_spaces,
1500         gfc_trans_string_copy, gfc_trans_alloc_subarray_assign,
1501         gfc_trans_structure_assign, gfc_trans_pointer_assignment,
1502         gfc_trans_scalar_assign, gfc_trans_zero_assign,
1503         gfc_trans_array_copy, gfc_trans_array_constructor_copy): Change
1504         fold_build[0-9] to fold_build[0-9]_loc.
1505         * trans-io.c (set_parameter_const, set_parameter_value,
1506         set_parameter_ref, gfc_convert_array_to_string, set_string,
1507         set_internal_unit, io_result, set_error_locus,
1508         nml_get_addr_expr, build_dt): Ditto.
1509         * trans-openmp.c (gfc_omp_clause_default_ctor,
1510         gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op,
1511         gfc_trans_omp_array_reduction, gfc_trans_omp_atomic,
1512         gfc_trans_omp_do): Ditto.
1513         * trans.c (gfc_add_modify, gfc_build_addr_expr,
1514         gfc_build_array_ref, gfc_trans_runtime_error_vararg,
1515         gfc_trans_runtime_check, gfc_call_malloc,
1516         gfc_allocate_with_status, gfc_allocate_array_with_status,
1517         gfc_call_free, gfc_deallocate_with_status,
1518         gfc_call_realloc): Ditto.
1519
1520 2010-09-03  Thomas Koenig  <tkoenig@gcc.gnu.org>
1521
1522         PR fortran/45159
1523         * dependency.c (gfc_deb_compare_expr):  Compare equal for equal
1524         arglists for pure user functions, or for those intrinsic
1525         functions which are also pure.
1526         * intrinsics.c (add_conv):  Mark conversion functions as pure.
1527         (add_char_conversions):  Likewise.
1528
1529 2010-09-03  Daniel Kraft  <d@domob.eu>
1530
1531         PR fortran/34162
1532         * resolve.c (resolve_actual_arglist): Allow internal procedure
1533         as actual argument with Fortran 2008.
1534
1535 2010-09-03  Daniel Kraft  <d@domob.eu>
1536
1537         PR fortran/44602
1538         * gfortran.h (struct gfc_code): Renamed `whichloop' to
1539         `which_construct' as this is no longer restricted to loops.
1540         * parse.h (struct gfc_state_data): New field `construct'.
1541         * match.c (match_exit_cycle): Handle EXIT from non-loops.
1542         * parse.c (push_state): Set `construct' field.
1543         * resolve.c (resolve_select_type): Extend comment.
1544         * trans-stmt.c (gfc_trans_if): Add exit label.
1545         (gfc_trans_block_construct), (gfc_trans_select): Ditto.
1546         (gfc_trans_simple_do): Store exit/cycle labels on the gfc_code itself.
1547         (gfc_trans_do), (gfc_trans_do_while): Ditto.
1548         (gfc_trans_exit): Use new name `which_construct' instead of `whichloop'.
1549         (gfc_trans_cycle): Ditto.
1550         (gfc_trans_if_1): Use fold_build3_loc instead of fold_build3.
1551
1552 2010-09-03  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1553
1554         * trans-intrinsic.c (gfc_conv_intrinsic_aint): Fix whitespace.
1555         (gfc_conv_intrinsic_ishft): Only evaluate arguments once.
1556         (gfc_conv_intrinsic_ishftc): Only evaluate arguments once.
1557         * intrinsic.texi (RSHIFT): Fix documentation.
1558
1559 2010-09-02  Tobias Burnus  <burnus@net-b.de>
1560
1561         PR fortran/45186
1562         * trans-common.c (create_common): Change build[0-9] to
1563         build[0-9]_loc.
1564         * trans-const.c (gfc_conv_constant_to_tree,
1565         gfc_conv_constant_to_tree): Ditto.
1566         * trans-decl.c (gfc_build_qualified_array, build_entry_thunks,
1567         gfc_get_fake_result_decl, gfc_trans_auto_character_variable,
1568         add_argument_checking, create_main_function,
1569         gfc_generate_return): Ditto.
1570         * trans-types.c (gfc_get_dtype, gfc_get_array_type_bounds): Ditto.
1571         * trans-stmt.c (allocate_temp_for_forall_nest_1,
1572         compute_inner_temp_size, compute_overall_iter_number,
1573         generate_loop_for_rhs_to_temp, generate_loop_for_temp_to_lhs,
1574         gfc_conv_elemental_dependencies, gfc_do_allocate,
1575         gfc_evaluate_where_mask, gfc_trans_allocate,
1576         gfc_trans_arithmetic_if, gfc_trans_call,
1577         gfc_trans_character_select, gfc_trans_deallocate,
1578         gfc_trans_do, gfc_trans_do_while, gfc_trans_forall_1,
1579         gfc_trans_forall_loop, gfc_trans_goto, gfc_trans_if_1,
1580         gfc_trans_integer_select, gfc_trans_logical_select,
1581         gfc_trans_pointer_assign_need_temp, gfc_trans_return,
1582         gfc_trans_simple_do, gfc_trans_sync, gfc_trans_where_2,
1583         gfc_trans_where_assign) Ditto.
1584
1585 2010-09-02  Janus Weil  <janus@gcc.gnu.org>
1586
1587         PR fortran/44541
1588         * resolve.c (resolve_symbol): Correct check for attributes of CLASS
1589         variable.
1590
1591 2010-09-02  Tobias Burnus  <burnus@net-b.de>
1592
1593         PR fortran/45489
1594         * resolve.c (apply_default_init): Mark symbol as referenced,
1595         if it is initialized.
1596         (resolve_symbol): Change intialized check for BT_DERIVED such
1597         that also function results get initialized; remove now obsolete
1598         gfc_set_sym_referenced for BT_CLASS.
1599
1600 2010-09-01  Janus Weil  <janus@gcc.gnu.org>
1601
1602         PR fortran/44541
1603         * class.c (gfc_find_derived_vtab): Add component '$def_init'.
1604         * resolve.c (resolve_allocate_expr): Defer handling of default
1605         initialization to 'gfc_trans_allocate'.
1606         (apply_default_init,resolve_symbol): Handle polymorphic dummies.
1607         (resolve_fl_derived): Suppress error messages for vtypes.
1608         * trans-stmt.c (gfc_trans_allocate): Handle initialization via
1609         polymorphic MOLD expression.
1610         * trans-expr.c (gfc_trans_class_init_assign): Now only used for
1611         dummy initialization.
1612
1613 2010-09-01  Tobias Burnus  <burnus@net-b.de>
1614
1615         * gfortran.texi (preprocessing): Update URL to COCO.
1616
1617 2010-09-01  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1618
1619         * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Resize
1620         array quad_decls. Remove unnecessary assignment.
1621
1622 2010-09-01  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1623
1624         * trans-expr.c (gfc_conv_power_op): Handle floating-point types
1625         other than long double.
1626         * mathbuiltins.def: Add builtins from the POW and CPOW family.
1627         * trans.h (gfc_builtin_decl_for_float_kind): New prototype.
1628         * trans-intrinsic.c (gfc_builtin_decl_for_float_kind): Add gfc_
1629         prefix to function name.
1630         (gfc_build_intrinsic_lib_fndecls): Add cpow prototype.
1631         (gfc_conv_intrinsic_aint): Use gfc_builtin_decl_for_float_kind
1632         function name.
1633         (gfc_conv_intrinsic_exponent): Likewise.
1634         (gfc_conv_intrinsic_abs): Likewise.
1635         (gfc_conv_intrinsic_mod): Likewise.
1636         (gfc_conv_intrinsic_sign): Likewise.
1637         (gfc_conv_intrinsic_arith): Likewise.
1638         (gfc_conv_intrinsic_fraction): Likewise.
1639         (gfc_conv_intrinsic_nearest): Likewise.
1640         (gfc_conv_intrinsic_spacing): Likewise.
1641         (gfc_conv_intrinsic_rrspacing): Likewise.
1642         (gfc_conv_intrinsic_scale): Likewise.
1643         (gfc_conv_intrinsic_set_exponent): Likewise.
1644
1645 2010-09-01  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1646
1647         * intrinsic.c: Add EXECUTE_COMMAND_LINE intrinsic.
1648         * intrinsic.h (gfc_resolve_execute_command_line): New function.
1649         * iresolve.c (gfc_resolve_execute_command_line): New function.
1650         * gfortran.h (GFC_ISYM_EXECUTE_COMMAND_LINE): New value.
1651         * intrinsic.texi: Document EXECUTE_COMMAND_LINE.
1652
1653 2010-08-31  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1654
1655         PR fortran/38282
1656         * f95-lang.c (gfc_init_builtin_functions): Define popcount{,l,ll}
1657         and parity{,l,ll} builtins.
1658         * trans-intrinsic.c (gfc_conv_intrinsic_popcnt_poppar): New function.
1659         (gfc_conv_intrinsic_function): Call above new functions.
1660         * simplify.c (gfc_simplify_popcnt, gfc_simplify_poppar): New
1661         functions.
1662         * intrinsic.texi: Document POPCNT and POPPAR.
1663
1664 2010-08-30  Janus Weil  <janus@gcc.gnu.org>
1665
1666         PR fortran/45456
1667         * resolve.c (resolve_structure_cons): Handle pointer-valued PPCs.
1668
1669 2010-08-30  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1670
1671         * Make-lang.in: Add frontend-passes.o dependencies.
1672
1673 2010-08-29  Janus Weil  <janus@gcc.gnu.org>
1674
1675         PR fortran/42769
1676         * resolve.c (resolve_structure_cons): For derived types, make sure the
1677         type has been resolved.
1678         (resolve_typebound_procedures): Make sure the vtab has been generated.
1679
1680 2010-08-29  Janus Weil  <janus@gcc.gnu.org>
1681
1682         PR fortran/45439
1683         * match.c (gfc_match_select_type): Give the associate-name the
1684         FL_VARIABLE attribute.
1685
1686 2010-08-28  Steven G. Kargl  <kargl@gcc.gnu.org>
1687
1688         * simplify.c (gfc_simplify_bessel_n2): Fix indention
1689         and argument type.
1690
1691 2010-08-28  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1692
1693         PR fortran/45436
1694         * trans-types.c (gfc_init_kinds): Disable TFmode.
1695
1696 2010-08-27  Janus Weil  <janus@gcc.gnu.org>
1697
1698         PR fortran/45432
1699         * match.c (gfc_match_allocate): Avoid double free on error.
1700
1701 2010-08-27  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1702
1703         PR fortran/32049
1704         * gfortran.h (gfc_real_info): Add c_float128 field.
1705         * mathbuiltins.def: Indicate which builtins are const.
1706         * trans-types.h (float128_type_node, complex_float128_type_node,
1707         gfc_real16_is_float128): New variables.
1708         * trans-types.c (float128_type_node, complex_float128_type_node,
1709         gfc_real16_is_float128): New variables.
1710         (gfc_init_kinds): Allow TFmode.
1711         (gfc_build_real_type): Mark __float128 types as such.
1712         (gfc_init_types): Initialize float128_type_node and
1713         complex_float128_type_node
1714         * f95-lang.c (gfc_init_builtin_functions): Adjust for new
1715         argument of OTHER_BUILTIN macro.
1716         * trans-intrinsic.c (gfc_intrinsic_map_t): Likewise.
1717         (builtin_decl_for_precision): Special case for __float128.
1718         (builtin_decl_for_float_kind): Likewise.
1719         (define_quad_builtin): New function.
1720         (gfc_build_intrinsic_lib_fndecls): Create all __float128
1721         library decls if necessary. Store them in the real16_decl and
1722         complex16_decl builtin map fields.
1723         (gfc_get_intrinsic_lib_fndecl): Handle q-suffixed __float128
1724         library function names.
1725
1726 2010-08-27  Tobias Burnus  <burnus@net-b.de>
1727
1728         PR fortran/33197
1729         * gcc/fortran/intrinsic.c (add_functions): Add norm2 and parity.
1730         * gcc/fortran/intrinsic.h (gfc_check_norm2, gfc_check_parity):
1731         gfc_simplify_norm2, gfc_simplify_parity, gfc_resolve_norm2,
1732         gfc_resolve_parity): New prototypes.
1733         * gcc/fortran/gfortran.h (gfc_isym_id): New enum items
1734         GFC_ISYM_NORM2 and GFC_ISYM_PARITY.
1735         * gcc/fortran/iresolve.c (gfc_resolve_norm2,
1736         gfc_resolve_parity): New functions.
1737         * gcc/fortran/check.c (gfc_check_norm2, gfc_check_parity):
1738         New functions.
1739         * gcc/fortran/trans-intrinsic.c (gfc_conv_intrinsic_arith,
1740         gfc_conv_intrinsic_function): Handle NORM2 and PARITY.
1741         * gcc/fortran/intrinsic.texi (NORM2, PARITY): Add.
1742         * gcc/fortran/simplify.c (simplify_transformation_to_array):
1743         Add post-processing opterator.
1744         (gfc_simplify_all, gfc_simplify_any, gfc_simplify_count,
1745         gfc_simplify_product, gfc_simplify_sum): Update call.
1746         (add_squared, do_sqrt, gfc_simplify_norm2, do_xor,
1747         gfc_simplify_parity): New functions.
1748
1749 2010-08-27  Janus Weil  <janus@gcc.gnu.org>
1750
1751         PR fortran/45420
1752         * match.c (select_type_set_tmp): Add the possibility to reset the
1753         temporary to NULL.
1754         (gfc_match_class_is): Reset the temporary in CLASS DEFAULT clauses.
1755
1756 2010-08-27  Thomas Koenig  <tkoenig@gcc.gnu.org>
1757
1758         PR fortran/45159
1759         * dependency.c (check_section_vs_section):  Single test for
1760         identical strides which takes into account that only one
1761         of the strides may be NULL.
1762
1763 2010-08-27  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1764
1765         PR fortran/43217
1766         * primary.c (match_hollerith_constant): Calculate padding needed to
1767         fill default integer and allocate string for that size.  Set pad bytes
1768         to ' '.
1769         * gfortran.h: Add hollerith pad value to type spec union.
1770         * data.c (create_character_initializer): Fix spelling of function name.
1771         Use hollerith pad value to calculate length.
1772         * arith.c (hollerith2representation); Use hollerith pad value to
1773         calculate length.
1774
1775 2010-08-26  Daniel Kraft  <d@domob.eu>
1776
1777         PR fortran/38936
1778         PR fortran/44047
1779         PR fortran/45384
1780         * gfortran.h (struct gfc_association_list): New flag `dangling'.
1781         (gfc_build_block_ns): Declared here...
1782         * parse.h (gfc_build_block_ns): ...instead of here.
1783         * trans.h (gfc_process_block_locals): Expect additionally the
1784         gfc_association_list of BLOCK (if present).
1785         * match.c (select_type_set_tmp): Create sym->assoc for temporary.
1786         * resolve.c (resolve_variable): Only check for invalid *array*
1787         references on associate-names.
1788         (resolve_assoc_var): New method with code previously in resolve_symbol.
1789         (resolve_select_type): Use association to give the selector and
1790         temporaries their values instead of ordinary assignment.
1791         (resolve_fl_var_and_proc): Allow CLASS associate-names.
1792         (resolve_symbol): Use new `resolve_assoc_var' instead of inlining here.
1793         * trans-stmt.c (gfc_trans_block_construct): Pass association-list
1794         to `gfc_process_block_locals' to match new interface.
1795         * trans-decl.c (gfc_get_symbol_decl): Don't defer associate-names
1796         here automatically.
1797         (gfc_process_block_locals): Defer them rather here when linked to
1798         from the BLOCK's association list.
1799
1800 2010-08-25  Jakub Jelinek  <jakub@redhat.com>
1801
1802         * trans-decl.c (gfc_build_intrinsic_function_decls): Set
1803         TREE_NOTHROW on fndecls that can't throw.  Set
1804         TREE_READONLY on gfor_fndecl_math_ishftc{4,8,16}.
1805         (gfc_build_builtin_function_decls): Set TREE_NOTHROW on
1806         gfor_fndecl_associated.
1807
1808 2010-08-23  Mikael Morin  <mikael@gcc.gnu.org>
1809
1810         PR fortran/45380
1811         * frontend-passes.c (optimize_equality): Don't optimize array equality
1812
1813 2010-08-23  Janus Weil  <janus@gcc.gnu.org>
1814
1815         PR fortran/45366
1816         * resolve.c (resolve_procedure_interface): New function split off from
1817         'resolve_symbol'.
1818         (resolve_formal_arglist): Call it here ...
1819         (resolve_symbol): ... and here.
1820
1821 2010-08-22  Joseph Myers  <joseph@codesourcery.com>
1822
1823         * Make-lang.in (gfortranspec.o): Update dependencies.
1824         * gfortranspec.c: Include coretypes.h before gcc.h.  Include
1825         opts.h.
1826         (MATH_LIBRARY, FORTRAN_LIBRARY): Remove initial "-l".
1827         (ADD_ARG_LIBGFORTRAN, Option, lookup_option): Remove.
1828         (g77_xargc): Make unsigned.
1829         (g77_xargv): Change to g77_x_decoded_options.
1830         (g77_newargc): Make unsigned.
1831         (g77_newargv): Change to g77_new_decoded_options.
1832         (strings_same, options_same): New.
1833         (append_arg): Use cl_decoded_option structures.
1834         (append_option): New.
1835         (add_arg_libgfortran): New.
1836         (lang_specific_driver): Use cl_decoded_option structures.
1837
1838 2010-08-21  Janus Weil  <janus@gcc.gnu.org>
1839
1840         PR fortran/45271
1841         PR fortran/45290
1842         * class.c (add_proc_comp): Add static initializer for PPCs.
1843         (add_procs_to_declared_vtab): Modified comment.
1844         * module.c (mio_component): Add argument 'vtype'. Don't read/write the
1845         initializer if the component is part of a vtype.
1846         (mio_component_list): Add argument 'vtype', pass it on to
1847         'mio_component'.
1848         (mio_symbol): Modified call to 'mio_component_list'.
1849         * trans.h (gfc_conv_initializer): Modified prototype.
1850         (gfc_trans_assign_vtab_procs): Removed.
1851         * trans-common.c (create_common): Modified call to
1852         'gfc_conv_initializer'.
1853         * trans-decl.c (gfc_get_symbol_decl,get_proc_pointer_decl,
1854         gfc_emit_parameter_debug_info): Modified call to
1855         'gfc_conv_initializer'.
1856         (build_function_decl): Remove assertion.
1857         * trans-expr.c (gfc_conv_derived_to_class,gfc_trans_class_assign):
1858         Removed call to 'gfc_trans_assign_vtab_procs'.
1859         (gfc_conv_initializer): Add argument 'procptr'.
1860         (gfc_conv_structure): Modified call to 'gfc_conv_initializer'.
1861         (gfc_trans_assign_vtab_procs): Removed.
1862         * trans-stmt.c (gfc_trans_allocate): Removed call to
1863         'gfc_trans_assign_vtab_procs'.
1864
1865 2010-08-21  Tobias Burnus  <burnus@net-b.de>
1866
1867         PR fortran/36158
1868         PR fortran/33197
1869         * intrinsic.c (add_sym): Init value attribute.
1870         (set_attr_value): New function.
1871         (add_functions) Use it and add JN/YN resolvers.
1872         * symbol.c (gfc_copy_formal_args_intr): Copy value attr.
1873         * intrinsic.h (gfc_resolve_bessel_n2): New prototype.
1874         * gfortran.h (gfc_intrinsic_arg): Add value attribute.
1875         * iresolve.c (gfc_resolve_bessel_n2): New function.
1876         * trans-intrinsic.c (gfc_get_symbol_for_expr): Create
1877         formal arg list.
1878         (gfc_conv_intrinsic_function,gfc_is_intrinsic_libcall):
1879         Add GFC_ISYM_JN2/GFC_ISYM_YN2 as case value.
1880         * simplify.c (): For YN set to -INF if previous values
1881         was -INF.
1882         * trans-expr.c (gfc_conv_procedure_call): Don't crash
1883         if sym->as is NULL.
1884         * iresolve.c (gfc_resolve_extends_type_of): Set the
1885         type of the dummy argument to the one of the actual.
1886
1887 2010-08-20  Joseph Myers  <joseph@codesourcery.com>
1888
1889         * lang.opt (MD, MMD): Use NoDriverArg instead of NoArgDriver.
1890
1891 2010-08-20  Joseph Myers  <joseph@codesourcery.com>
1892
1893         * gfortranspec.c (lang_specific_driver): Refer to -lgfortran in
1894         comment, not -lg2c.
1895
1896 2010-08-20  Nathan Froyd  <froydnj@codesourcery.com>
1897
1898         * trans-openmp.c: Use FOR_EACH_VEC_ELT.
1899
1900 2010-08-19  Daniel Kraft  <d@domob.eu>
1901
1902         PR fortran/29785
1903         PR fortran/45016
1904         * trans.h (struct gfc_se): New flag `byref_noassign'.
1905         * trans-array.h (gfc_conv_shift_descriptor_lbound): New method.
1906         (gfc_conv_array_extent_dim), (gfc_conv_descriptor_size): New methods.
1907         * expr.c (gfc_check_pointer_assign): Allow bounds and rank remapping
1908         and check for compile-time errors with those.
1909         * trans-decl.c (trans_associate_var): Use new routine
1910         `gfc_conv_shift_descriptor_lbound' instead of doing it manually.
1911         * trans-array.c (gfc_conv_shift_descriptor_lbound): New method.
1912         (gfc_conv_array_extent_dim), (gfc_conv_descriptor_size): New methods.
1913         (gfc_array_init_size): Use new `gfc_conv_array_extent_dim'.
1914         (gfc_conv_expr_descriptor): Handle new flag `byref_noassign'.
1915         * trans-expr.c (gfc_trans_pointer_assignment): Handle bounds and
1916         rank remapping for assignment.
1917
1918 2010-08-19  Tobias Burnus  <burnus@net-b.de>
1919
1920         * intrinsic.texi (Bessel_jn, Bessel_yn): Fix typo.
1921         * * simplify.c (gfc_simplify_bessel_yn): Change recursive
1922         into recurrence.
1923
1924 2010-08-19  Tobias Burnus  <burnus@net-b.de>
1925
1926         PR fortran/36158
1927         PR fortran/33197
1928         * check.c (gfc_check_bessel_n2): New function.
1929         * gfortran.h (gfc_isym_id): Add GFC_ISYM_JN2 and GFC_ISYM_YN2.
1930         * intrinsic.c (add_functions): Add transformational version
1931         of the Bessel_jn/yn intrinsics.
1932         * intrinsic.h (gfc_check_bessel_n2,gfc_simplify_bessel_jn2,
1933         gfc_simplify_bessel_yn2): New prototypes.
1934         * intrinsic.texi (Bessel_jn, Bessel_yn): Document
1935         transformational variant.
1936         * simplify.c (gfc_simplify_bessel_jn, gfc_simplify_bessel_yn):
1937         Check for negative order.
1938         (gfc_simplify_bessel_n2,gfc_simplify_bessel_jn2,
1939         gfc_simplify_bessel_yn2): New functions.
1940
1941 2010-08-19  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1942
1943         PR fortran/41859
1944         * resolve.c (resolve_transfer): Traverse operands and set expression
1945         to be checked to a non EXPR_OP type.
1946
1947 2010-08-19  Janus Weil  <janus@gcc.gnu.org>
1948
1949         PR fortran/45290
1950         * gfortran.h (gfc_add_save): Modified prototype.
1951         * decl.c (add_init_expr_to_sym): Defer checking of proc pointer init.
1952         (match_pointer_init): New function to match F08 pointer initialization.
1953         (variable_decl,match_procedure_decl,match_ppc_decl): Use
1954         'match_pointer_init'.
1955         (match_attr_spec): Module variables are implicitly SAVE.
1956         (gfc_match_save): Modified call to 'gfc_add_save'.
1957         * expr.c (gfc_check_assign_symbol): Extra checks for pointer
1958         initialization.
1959         * primary.c (gfc_variable_attr): Handle SAVE attribute.
1960         * resolve.c (resolve_structure_cons): Add new argument and do pointer
1961         initialization checks.
1962         (gfc_resolve_expr): Modified call to 'resolve_structure_cons'.
1963         (resolve_values): Call 'resolve_structure_cons' directly with init arg.
1964         (resolve_fl_variable): Handle SAVE_IMPLICIT.
1965         * symbol.c (gfc_add_save,gfc_copy_attr,save_symbol): Handle
1966         SAVE_IMPLICIT.
1967         * trans-decl.c (gfc_create_module_variable): Module variables with
1968         TARGET can already exist.
1969         * trans-expr.c (gfc_conv_variable): Check for 'current_function_decl'.
1970         (gfc_conv_initializer): Implement non-NULL pointer
1971         initialization.
1972
1973 2010-08-18  Tobias Burnus  <burnus@net-b.de>
1974
1975         PR fortran/45295
1976         * intrinsic.texi (selected_char_kind): Document ISO_10646
1977         support.
1978
1979 2010-08-17  Jakub Jelinek  <jakub@redhat.com>
1980
1981         PR fortran/45304
1982         * trans-decl.c (build_library_function_decl_1): Chain on
1983         void_list_node instead of creating a new TREE_LIST.
1984         * trans-intrinsic.c (gfc_get_intrinsic_lib_fndecl): Likewise.
1985         * trans-types.c (gfc_get_function_type): Likewise.  Set
1986         typelist to void_list_node for the main program.
1987
1988 2010-08-17  Daniel Kraft  <d@domob.eu>
1989
1990         PR fortran/38936
1991         * gfortran.h (struct gfc_association_list): New member `where'.
1992         (gfc_is_associate_pointer) New method.
1993         * match.c (gfc_match_associate): Remember locus for each associate
1994         name matched and do not try to set variable flag.
1995         * parse.c (parse_associate): Use remembered locus for symbols.
1996         * primary.c (match_variable): Instead of variable-flag check for
1997         associate names set it for all such names used.
1998         * symbol.c (gfc_is_associate_pointer): New method.
1999         * resolve.c (resolve_block_construct): Don't generate assignments
2000         to give associate-names their values.
2001         (resolve_fl_var_and_proc): Allow associate-names to be deferred-shape.
2002         (resolve_symbol): Set some more attributes for associate variables,
2003         set variable flag here and check it and don't try to build an
2004         explicitely shaped array-spec for array associate variables.
2005         * trans-expr.c (gfc_conv_variable): Dereference in case of association
2006         to scalar variable.
2007         * trans-types.c (gfc_is_nodesc_array): Handle array association symbols.
2008         (gfc_sym_type): Return pointer type for association to scalar vars.
2009         * trans-decl.c (gfc_get_symbol_decl): Defer association symbols.
2010         (trans_associate_var): New method.
2011         (gfc_trans_deferred_vars): Handle association symbols.
2012
2013 2010-08-16  Joseph Myers  <joseph@codesourcery.com>
2014
2015         * lang.opt (MDX): Change back to MD.  Mark NoDriverArg instead of
2016         RejectDriver.
2017         (MMDX): Change back to MMD.  Mark NoDriverArg instead of
2018         RejectDriver.
2019         * cpp.c (gfc_cpp_handle_option): Use OPT_MD and OPT_MMD instead of
2020         OPT_MDX and OPT_MMDX.
2021
2022 2010-08-16  Joseph Myers  <joseph@codesourcery.com>
2023
2024         * lang.opt (MDX, MMDX): Mark RejectDriver.
2025
2026 2010-08-15  Janus Weil  <janus@gcc.gnu.org>
2027
2028         * trans-expr.c (gfc_trans_assign_vtab_procs): Clean up (we don't have
2029         vtabs for generics any more).
2030
2031 2010-08-15  Daniel Kraft  <d@domob.eu>
2032
2033         PR fortran/38936
2034         * gfortran.h (gfc_find_proc_namespace): New method.
2035         * expr.c (gfc_build_intrinsic_call): No need to build symtree messing
2036         around with namespace.
2037         * symbol.c (gfc_find_proc_namespace): New method.
2038         * trans-decl.c (gfc_build_qualified_array): Use it for correct
2039         value of nest.
2040         * primary.c (gfc_match_varspec): Handle associate-names as arrays.
2041         * parse.c (parse_associate): Removed assignment-generation here...
2042         * resolve.c (resolve_block_construct): ...and added it here.
2043         (resolve_variable): Handle names that are arrays but were not parsed
2044         as such because of association.
2045         (resolve_code): Fix BLOCK resolution.
2046         (resolve_symbol): Generate array-spec for associate-names.
2047
2048 2010-08-15  Tobias Burnus  <burnus@net-b.de>
2049
2050         PR fortran/45211
2051         * decl.c (verify_c_interop_param): Remove superfluous space (" ").
2052         (verify_c_interop): Handle unresolved DT with bind(C).
2053
2054 2010-08-15  Tobias Burnus  <burnus@net-b.de>
2055
2056         * trans-expr.c (gfc_conv_expr_present): Regard nullified
2057         pointer arrays as absent.
2058         (gfc_conv_procedure_call): Handle EXPR_NULL for non-pointer
2059         dummys as absent argument.
2060         * interface.c (compare_actual_formal,compare_parameter):
2061         Ditto.
2062
2063 2010-08-15  Tobias Burnus  <burnus@net-b.de>
2064
2065         * interface.c (compare_pointer, ): Allow passing TARGETs to pointers
2066         dummies with intent(in).
2067
2068 2010-08-15  Daniel Kraft  <d@domob.eu>
2069
2070         PR fortran/45197
2071         * decl.c (gfc_match_prefix): Match IMPURE prefix and mark ELEMENTAL
2072         routines not IMPURE also as PURE.
2073         * intrinsic.c (enum klass): New class `CLASS_PURE' and renamed
2074         `NO_CLASS' in `CLASS_IMPURE'.
2075         (add_sym): Set symbol-attributes `pure' and `elemental' correctly.
2076         (add_sym_0s): Renamed `NO_CLASS' in `CLASS_IMPURE'.
2077         (add_functions): Ditto.
2078         (add_subroutines): Ditto and mark `MOVE_ALLOC' as CLASS_PURE.
2079         * resolve.c (gfc_pure): Do not treat ELEMENTAL as automatically PURE.
2080         (resolve_formal_arglist): Check that arguments to ELEMENTAL procedures
2081         are not ALLOCATABLE and have their INTENT specified.
2082
2083 2010-08-13  Daniel Kraft  <d@domob.eu>
2084
2085         * gfortran.h (array_type): New type `AS_IMPLIED_SHAPE'.
2086         * array.c (gfc_match_array_spec): Match implied-shape specification and
2087         handle AS_IMPLIED_SHAPE correctly otherwise.
2088         * decl.c (add_init_expr_to_sym): Set upper bounds for implied-shape.
2089         (variable_decl): Some checks for implied-shape declaration.
2090         * resolve.c (resolve_symbol): Assert that array-spec is no longer
2091         AS_IMPLIED_SHAPE in any case.
2092
2093 2010-08-12  Joseph Myers  <joseph@codesourcery.com>
2094
2095         * lang.opt (MD, MMD): Change to MDX and MMDX.
2096         * cpp.c (gfc_cpp_handle_option): Use OPT_MMD and OPT_MMDX.
2097
2098 2010-08-11  Janus Weil  <janus@gcc.gnu.org>
2099
2100         PR fortran/44595
2101         * intrinsic.c (gfc_current_intrinsic_arg): Change type from 'char' to
2102         'gfc_intrinsic_arg'.
2103         (check_arglist,check_specific): Add reference to 'name' field.
2104         (init_arglist): Remove reference to 'name' field.
2105         * intrinsic.h (gfc_current_intrinsic_arg): Modify prototype.
2106         * check.c (variable_check): Reverse order of checks. Respect intent of
2107         formal arg.
2108         (int_or_proc_check): New function.
2109         (coarray_check): New function.
2110         (allocatable_check): New function.
2111         (gfc_check_allocated,gfc_check_move_alloc): Use 'allocatable_check'.
2112         (gfc_check_complex): Use 'int_or_real_check'.
2113         (gfc_check_lcobound,gfc_check_image_index,gfc_check_this_image,
2114         gfc_check_ucobound): Use 'coarray_check'.
2115         (gfc_check_pack): Use 'real_or_complex_check'.
2116         (gfc_check_alarm_sub,gfc_check_signal,gfc_check_signal_sub): Use
2117         'int_or_proc_check'.
2118         (scalar_check,type_check,numeric_check,int_or_real_check,
2119         real_or_complex_check,kind_check,double_check,logical_array_check,
2120         array_check,same_type_check,rank_check,nonoptional_check,
2121         kind_value_check,gfc_check_a_p,gfc_check_associated,gfc_check_cmplx,
2122         gfc_check_cshift,gfc_check_dcmplx,gfc_check_dot_product,gfc_check_dprod,
2123         gfc_check_eoshift,gfc_check_fn_rc2008,gfc_check_index,gfc_check_kind,
2124         gfc_check_matmul,gfc_check_minloc_maxloc,check_reduction,gfc_check_null,
2125         gfc_check_present,gfc_check_reshape,gfc_check_same_type_as,
2126         gfc_check_spread,gfc_check_unpack,gfc_check_random_seed,
2127         gfc_check_getarg,gfc_check_and,gfc_check_storage_size): Add reference
2128         to 'name' field.
2129
2130 2010-08-10  Daniel Kraft  <d@domob.eu>
2131
2132         * gfortran.texi (Interoperability with C): Fix ordering in menu
2133         and add new subsection about pointers.
2134         (Interoperable Subroutines and Functions): Split off the pointer part.
2135         (working with Pointers): New subsection with extended discussion
2136         of pointers (especially procedure pointers).
2137
2138 2010-08-09  Thomas Koenig  <tkoenig@gcc.gnu.org>
2139
2140         PR fortran/44235
2141         * array.c (gfc_ref_dimen_size):  Add end argument.
2142         If end is non-NULL, calculate it.
2143         (ref_size):  Adjust call to gfc_ref_dimen_size.
2144         (gfc_array_dimen_size):  Likewise.
2145         (gfc_array_res_shape):  Likewise.
2146         * gfortran.h:  Adjust prototype for gfc_ref_dimen_size.
2147         * resolve.c (resolve_array_ref):  For stride not equal to -1,
2148         fill in the lowest possible end.
2149
2150 2010-08-09  Janus Weil  <janus@gcc.gnu.org>
2151
2152         * intrinsic.texi: Correct documentation of ASINH, ACOSH and ATANH.
2153
2154 2010-08-07  Nathan Froyd  <froydnj@codesourcery.com>
2155
2156         * interface.c (compare_actual_formal): Use XALLOCAVEC instead of
2157         alloca.
2158         (check_some_aliasing): Likewise.
2159         * trans-intrinsic.c (gfc_conv_intrinsic_conversion): Likewise.
2160         (gfc_conv_intrinsic_int): Likewise.
2161         (gfc_conv_intrinsic_lib_function): Likewise.
2162         (gfc_conv_intrinsic_cmplx): Likewise.
2163         (gfc_conv_intrinsic_ctime): Likewise.
2164         (gfc_conv_intrinsic_fdate): Likewise.
2165         (gfc_conv_intrinsic_ttynam): Likewise.
2166         (gfc_conv_intrinsic_minmax): Likewise.
2167         (gfc_conv_intrinsic_minmax_char): Likewise.
2168         (gfc_conv_intrinsic_ishftc): Likewise.
2169         (gfc_conv_intrinsic_index_scan_verify): Likewise.
2170         (gfc_conv_intrinsic_merge): Likewise.
2171         (gfc_conv_intrinsic_trim): Likewise.
2172         * trans.c (gfc_trans_runtime_error_vararg): Likewise.
2173
2174 2010-08-06  Thomas Koenig  <tkoenig@gcc.gnu.org>
2175
2176         PR fortran/45159
2177         * dependency.c (check_section_vs_section):  Handle cases where
2178         the start expression coincides with the lower or upper
2179         bound of the array.
2180
2181 2010-08-04  Janus Weil  <janus@gcc.gnu.org>
2182
2183         PR fortran/42207
2184         PR fortran/44064
2185         PR fortran/44065
2186         * class.c (gfc_find_derived_vtab): Do not generate vtabs for class
2187         container types. Do not artificially increase refs. Commit symbols one
2188         by one.
2189         * interface.c (compare_parameter): Make sure vtabs are present before
2190         generating module variables.
2191         * resolve.c (resolve_allocate_expr): Ditto.
2192
2193 2010-08-04  Tobias Burnus  <burnus@net-b.de>
2194
2195         PR fortran/45183
2196         PR fortran/44857
2197         * resolve.c (resolve_structure_cons): Fix
2198         freeing of charlen.
2199
2200 2010-08-04  Mikael Morin  <mikael@gcc.gnu.org>
2201
2202         PR fortran/42051
2203         PR fortran/44064
2204         * symbol.c (changed_syms): Made static again.
2205         (gfc_symbol_state): Don't conditionalize on GFC_DEBUG.
2206         Changed conditional internal error into assert.
2207         Rename function to ...
2208         (gfc_enforce_clean_symbol_state): ... this.
2209         * gfortran.h (gfc_symbol_state, gfc_enforce_clean_symbol_state):
2210         Rename the former to the latter.
2211         * parse.c (decode_statement, decode_omp_directive,
2212         decode_gcc_attribute): Update callers accordingly. Don't conditionalize
2213         on GFC_DEBUG.
2214         (changed_syms): Remove declaration.
2215         (next_statement): Use gfc_enforce_clean_symbol_state.
2216
2217 2010-08-04  Tobias Burnus  <burnus@net-b.de>
2218
2219         PR fortran/44857
2220         * resolve.c (resolve_structure_cons): Fix handling of
2221         initialization structure constructors with character
2222         elements of the wrong length.
2223         * array.c (gfc_check_iter_variable): Add NULL check.
2224         (gfc_resolve_character_array_constructor): Also truncate
2225         character length.
2226
2227 2010-08-04  Tobias Burnus  <burnus@net-b.de>
2228
2229         * trans-io.c (gfc_build_io_library_fndecls): Fix return
2230         value of some libgfortran functions.
2231
2232 2010-08-03  Thomas Koenig  <tkoenig@gcc.gnu.org>
2233
2234         PR fortran/45159
2235         * dependency.c (gfc_deb_compare_expr):  Remove any integer
2236         conversion functions to larger types from both arguments.
2237         Remove handling these functions futher down.
2238
2239 2010-08-03  Janus Weil  <janus@gcc.gnu.org>
2240
2241         PR fortran/44584
2242         PR fortran/45161
2243         * class.c (add_procs_to_declared_vtab1): Don't add erroneous procedures.
2244         * resolve.c (resolve_tb_generic_targets): Check for errors.
2245
2246 2010-08-02  Thomas Koenig  <tkoenig@gcc.gnu.org>
2247
2248         PR fortran/45159
2249         * depencency.c (gfc_dep_resolver):  Fix logic for when a loop
2250         can be reversed.
2251
2252 2010-08-02  Thomas Koenig  <tkoenig@gcc.gnu.org>
2253
2254         PR fortran/36854
2255         * dependency.h:  Add prototype for gfc_are_identical_variables.
2256         * frontend-passes.c:  Include depencency.h.
2257         (optimimize_equality):  Use gfc_are_identical_variables.
2258         * dependency.c (identical_array_ref): New function.
2259         (gfc_are_identical_variables):  New function.
2260         (gfc_deb_compare_expr):  Use gfc_are_identical_variables.
2261         * dependency.c (gfc_check_section_vs_section).  Rename gfc_
2262         prefix from statc function.
2263         (check_section_vs_section): Change arguments to gfc_array_ref,
2264         adjust function body accordingly.
2265
2266 2010-08-02  Mikael Morin  <mikael@gcc.gnu.org>
2267             Janus Weil  <janus@gcc.gnu.org>
2268
2269         PR fortran/42051
2270         PR fortran/44064
2271         PR fortran/45151
2272         * intrinsic.c (gfc_get_intrinsic_sub_symbol): Commit changed symbol.
2273         * symbol.c (gen_cptr_param, gen_fptr_param, gen_shape_param,
2274         gfc_copy_formal_args, gfc_copy_formal_args_intr,
2275         gfc_copy_formal_args_ppc, generate_isocbinding_symbol): Ditto.
2276         * parse.c (parse_derived_contains, parse_spec, parse_progunit):
2277         Call reject_statement in case of error.
2278         (match_deferred_characteritics): Call gfc_undo_symbols in case match
2279         fails.
2280
2281 2010-08-01  Janus Weil  <janus@gcc.gnu.org>
2282
2283         PR fortran/44912
2284         * class.c (gfc_build_class_symbol): Make '$vptr' component private.
2285         (gfc_find_derived_vtab): Make vtabs and vtypes public.
2286         * module.c (read_module): When reading module files, always import
2287         vtab and vtype symbols.
2288
2289 2010-07-31  Mikael Morin  <mikael@gcc.gnu.org>
2290
2291         PR fortran/42051
2292         PR fortran/44064
2293         * symbol.c (changed_syms): Made non-static.
2294         * parse.c (changed_syms): Declare new external.
2295         (next_statement): Assert changed_syms is NULL at the beginning.
2296
2297 2010-07-30  Janus Weil  <janus@gcc.gnu.org>
2298             Steven G. Kargl  <kargl@gcc.gnu.org>
2299
2300         PR fortran/44929
2301         * match.c (match_type_spec): Try to parse derived types before
2302         intrinsic types.
2303
2304 2010-07-30  Mikael Morin  <mikael@gcc.gnu.org>
2305
2306         * gfortran.h (gfc_release_symbol): New prototype.
2307         * symbol.c (gfc_release_symbol): New. Code taken from free_sym_tree.
2308         (gfc_undo_symbols, free_sym_tree, gfc_free_finalizer):
2309         Use gfc_release_symbol.
2310         * parse.c (gfc_fixup_sibling_symbols): Ditto.
2311         * resolve.c (resolve_symbol): Ditto.
2312
2313 2010-07-29  Tobias Burnus  <burnus@net-b.de>
2314
2315         PR fortran/45087
2316         PR fortran/45125
2317         * trans-decl.c (gfc_get_extern_function_decl): Correctly handle
2318         external procedure declarations in modules.
2319         (gfc_get_symbol_decl): Modify assert.
2320
2321 2010-07-29  Janus Weil  <janus@gcc.gnu.org>
2322
2323         PR fortran/44962
2324         * resolve.c (resolve_fl_derived): Call gfc_resolve_array_spec.
2325
2326 2010-07-29  Janus Weil  <janus@gcc.gnu.org>
2327
2328         PR fortran/45004
2329         * trans-stmt.h (gfc_trans_class_init_assign): New prototype.
2330         (gfc_trans_class_assign): Modified prototype.
2331         * trans.h (gfc_conv_intrinsic_move_alloc): New prototype.
2332         * trans-expr.c (gfc_trans_class_init_assign): Split off from ...
2333         (gfc_trans_class_assign): ... here. Modified actual arguments.
2334         * trans-intrinsic.c (gfc_conv_intrinsic_move_alloc): New function to
2335         handle the MOVE_ALLOC intrinsic with scalar and class arguments.
2336         * trans.c (trans_code): Call 'gfc_conv_intrinsic_move_alloc'.
2337
2338 2010-07-29  Mikael Morin  <mikael@gcc.gnu.org>
2339
2340         PR fortran/42051
2341         PR fortran/44064
2342         * class.c (gfc_find_derived_vtab): Accept or discard newly created
2343         symbols before returning.
2344
2345 2010-07-29  Joseph Myers  <joseph@codesourcery.com>
2346
2347         * lang.opt (cpp): Remove Joined and Separate markers.
2348         (cpp=): New internal option.
2349         * lang-specs.h (F951_CPP_OPTIONS): Generate -cpp= option.
2350         * cpp.c (gfc_cpp_handle_option): Handle OPT_cpp_ instead of
2351         OPT_cpp.
2352
2353 2010-07-29  Daniel Kraft  <d@domob.eu>
2354
2355         PR fortran/45117
2356         * array.c (resolve_array_bound): Fix error message to properly handle
2357         non-variable expressions.
2358
2359 2010-07-28  Mikael Morin  <mikael@gcc.gnu.org>
2360
2361         * decl.c (free_value): Also free repeat field.
2362         * data.c (gfc_assign_data_value): Always free offset before returning.
2363
2364 2010-07-28  Daniel Kraft  <d@domob.eu>
2365
2366         * gfortran.h (gfc_build_intrinsic_call): New method.
2367         * expr.c (gfc_build_intrinsic_call): New method.
2368         * simplify.c (range_check): Ignore non-constant value.
2369         (simplify_bound_dim): Handle non-variable expressions and
2370         fix memory leak with non-free'ed expression.
2371         (simplify_bound): Handle non-variable expressions.
2372         (gfc_simplify_shape): Ditto.
2373         (gfc_simplify_size): Ditto, but only in certain cases possible.
2374
2375 2010-07-28  Joseph Myers  <joseph@codesourcery.com>
2376
2377         * gfortranspec.c (SWITCH_TAKES_ARG, WORD_SWITCH_TAKES_ARG):
2378         Remove.
2379
2380 2010-07-28  Tobias Burnus  <burnus@net-b.de>
2381
2382         PR fortran/45077
2383         * trans-types.c (gfc_get_derived_type): Fix DT declaration
2384         from modules for whole-file mode.
2385
2386 2010-07-27  Joseph Myers  <joseph@codesourcery.com>
2387
2388         * gfortran.h (gfc_handle_option): Update prototype and return
2389         value type.
2390         * options.c (gfc_handle_option): Update prototype and return value
2391         type.
2392
2393 2010-07-27  Joseph Myers  <joseph@codesourcery.com>
2394
2395         * cpp.c (gfc_cpp_init_options): Update prototype.  Use number of
2396         decoded options in allocating deferred_opt.
2397         * cpp.h (gfc_cpp_init_options): Update prototype.
2398         * f95-lang.c (LANG_HOOKS_OPTION_LANG_MASK): Define.
2399         * gfortran.h (gfc_option_lang_mask): New.
2400         (gfc_init_options): Update prototype.
2401         * options.c (gfc_option_lang_mask): New.
2402         (gfc_init_options): Update prototype.  Pass new arguments to
2403         gfc_cpp_init_options.
2404
2405 2010-07-26  Tobias Burnus  <burnus@net-b.de>
2406
2407         PR fortran/40873
2408         * trans-decl.c (gfc_get_extern_function_decl): Fix generation
2409         for functions which are later in the same file.
2410         (gfc_create_function_decl, build_function_decl,
2411         build_entry_thunks): Add global argument.
2412         * trans.c (gfc_generate_module_code): Update
2413         gfc_create_function_decl call.
2414         * trans.h (gfc_create_function_decl): Update prototype.
2415         * resolve.c (resolve_global_procedure): Also resolve for
2416         IFSRC_IFBODY.
2417
2418 2010-07-26  Richard Henderson  <rth@redhat.com>
2419
2420         PR target/44132
2421         * f95-lang.c (LANG_HOOKS_WRITE_GLOBALS): New.
2422         (gfc_write_global_declarations): New.
2423
2424 2010-07-26  Tobias Burnus  <burnus@net-b.de>
2425
2426         PR fortran/45066
2427         * trans-io.c (build_dt): Use NULL_TREE rather than NULL
2428         for call to transfer_namelist_element.
2429         * trans-decl.c (gfc_get_symbol_decl): Also set sym->backend_decl
2430         for -fwhole-file.
2431
2432 2010-07-25  Thomas Koenig  <tkoenig@gcc.gnu.org>
2433
2434         PR fortran/40628
2435         * Make-lang.in:  Add fortran/frontend-passes.o.
2436         * gfortran.h:  Add prototype for gfc_run_passes.
2437         * resolve.c (gfc_resolve):  Call gfc_run_passes.
2438         * frontend-passes.c:  New file.
2439
2440 2010-07-25  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2441
2442         PR fortran/42852
2443         * scanner.c (gfc_next_char_literal): Enable truncation warning for
2444         free-form '&'.
2445
2446 2010-07-25  Mikael Morin  <mikael@gcc.gnu.org>
2447
2448         PR fortran/44660
2449         * gfortran.h (gfc_namespace): New field old_equiv.
2450         (gfc_free_equiv_until): New prototype.
2451         * match.c (gfc_free_equiv_until): New, renamed from gfc_free_equiv with
2452         a parameterized stop condition.
2453         (gfc_free_equiv): Use gfc_free_equiv_until.
2454         * parse.c (next_statement): Save equivalence list.
2455         (reject_statement): Restore equivalence list.
2456
2457 2010-07-25  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2458
2459         PR fortran/42852
2460         * scanner.c (gfc_next_char_literal): Move check for truncation earlier
2461         in the function so that it does not get missed by early exits.
2462         (load_line): Add checks for quoted strings and free form comments to
2463         disable warnings on comments. Add check for ampersand as first
2464         character after truncation and don't warn for this case, but warn if
2465         there are subsequent non-whitespace characters.
2466
2467 2010-07-24  Tobias Burnus  <burnus@net-b.de>
2468
2469         PR fortran/40011
2470         * parse.c (gfc_parse_file): Do not override
2471         gfc_global_ns_list items.
2472
2473 2010-07-24  Tobias Burnus  <burnus@net-b.de>
2474
2475         * options.c (gfc_init_options): Enable -fwhole-file by default.
2476         * interface.c (compare_parameter): Assume a Hollerith constant is
2477         compatible with all other argument types.
2478
2479 2010-07-23  Tobias Burnus  <burnus@net-b.de>
2480
2481         PR fortran/44945
2482         * trans-decl.c (gfc_get_symbol_decl): Use module decl with
2483         -fwhole-file also for derived types.
2484         * trans-types.c (copy_dt_decls_ifequal): Remove static and
2485         rename to gfc_copy_dt_decls_ifequal.
2486         (gfc_get_derived_type): Update call.
2487         * trans-types.h (gfc_copy_dt_decls_ifequal): Add prototype.
2488
2489 2010-07-23  Tobias Burnus  <burnus@net-b.de>
2490
2491         PR fortran/45030
2492         * resolve.c (resolve_global_procedure): Properly handle ENTRY.
2493
2494 2010-07-23  Jakub Jelinek  <jakub@redhat.com>
2495
2496         * trans-types.c (gfc_get_array_descriptor_base,
2497         gfc_get_array_type_bounds): Set TYPE_NAMELESS.
2498         * trans-decl.c (gfc_build_qualified_array): Set DECL_NAMELESS
2499         instead of clearing DECL_NAME.
2500         (gfc_build_dummy_array_decl): Set DECL_NAMELESS.
2501
2502 2009-07-23  Paul Thomas  <pault@gcc.gnu.org>
2503
2504         PR fortran/24524
2505         * trans-array.c (gfc_init_loopinfo): Initialize the reverse
2506         field.
2507         gfc_trans_scalarized_loop_end: If reverse set in dimension n,
2508         reverse the scalarization loop.
2509         gfc_conv_resolve_dependencies: Pass the reverse field of the
2510         loopinfo to gfc_dep_resolver.
2511         trans-expr.c (gfc_trans_assignment_1): Enable loop reversal for
2512         assignment by resetting loop.reverse.
2513         gfortran.h : Add the gfc_reverse enum.
2514         trans.h : Add the reverse field to gfc_loopinfo.
2515         dependency.c (gfc_check_dependency): Pass null to the new arg
2516         of gfc_dep_resolver.
2517         (gfc_check_section_vs_section): Check for reverse dependencies.
2518         (gfc_dep_resolver): Add reverse argument and deal with the loop
2519         reversal logic.
2520         dependency.h : Modify prototype for gfc_dep_resolver to include
2521         gfc_reverse *.
2522
2523 2010-07-23  Daniel Kraft  <d@domob.eu>
2524
2525         PR fortran/44709
2526         * gfortran.h (gfc_find_symtree_in_proc): New method.
2527         * symbol.c (gfc_find_symtree_in_proc): New method.
2528         * match.c (match_exit_cycle): Look for loop name also in parent
2529         namespaces within current procedure.
2530
2531 2010-07-22  Tobias Burnus  <burnus@net-b.de>
2532
2533         PR fortran/45019
2534         * dependency.c (gfc_check_dependency): Add argument alising check.
2535         * symbol.c (gfc_symbols_could_alias): Add argument alising check.
2536
2537 2010-07-22  Daniel Kraft  <d@domob.eu>
2538
2539         * trans-stmt.c (gfc_trans_return): Put back in the handling of se.post,
2540         now in the correct place.
2541
2542 2010-07-21  Steven G. Kargl  <kargl@gcc.gnu.org>
2543
2544         PR fortran/44929
2545         * Revert my commit r162325.
2546
2547 2010-07-21  Daniel Kraft  <d@domob.eu>
2548
2549         * trans.h (gfc_get_return_label): Removed.
2550         (gfc_generate_return): New method.
2551         (gfc_trans_deferred_vars): Update gfc_wrapped_block rather than
2552         returning a tree directly.
2553         * trans-stmt.c (gfc_trans_return): Use `gfc_generate_return'.
2554         (gfc_trans_block_construct): Update for new interface to
2555         `gfc_trans_deferred_vars'.
2556         * trans-decl.c (current_function_return_label): Removed.
2557         (current_procedure_symbol): New variable.
2558         (gfc_get_return_label): Removed.
2559         (gfc_trans_deferred_vars): Update gfc_wrapped_block rather than
2560         returning a tree directly.
2561         (get_proc_result), (gfc_generate_return): New methods.
2562         (gfc_generate_function_code): Clean up and do init/cleanup here
2563         also with gfc_wrapped_block.  Remove return-label but rather
2564         return directly.
2565
2566 2010-07-19  Steven G. Kargl  <kargl@gcc.gnu.org>
2567
2568         PR fortran/44929
2569         * fortran/match.c (match_type_spec): Check for derived type before
2570         intrinsic types.
2571
2572 2010-07-19  Paul Thomas  <pault@gcc.gnu.org>
2573
2574         PR fortran/42385
2575         * interface.c (matching_typebound_op): Add argument for the
2576         return of the generic name for the procedure.
2577         (build_compcall_for_operator): Add an argument for the generic
2578         name of an operator procedure and supply it to the expression.
2579         (gfc_extend_expr, gfc_extend_assign): Use the generic name in
2580         calls to the above procedures.
2581         * resolve.c (resolve_typebound_function): Catch procedure
2582         component calls for CLASS objects, check that the vtable is
2583         complete and insert the $vptr and procedure components, to make
2584         the call.
2585         (resolve_typebound_function): The same.
2586         * trans-decl.c (gfc_trans_deferred_vars): Do not deallocate
2587         an allocatable scalar if it is a result.
2588
2589 2010-07-19  Paul Thomas  <pault@gcc.gnu.org>
2590
2591         PR fortran/44353
2592         * match.c (gfc_match_iterator): Reverted.
2593
2594 2010-07-18  Paul Thomas  <pault@gcc.gnu.org>
2595
2596         PR fortran/44353
2597         * match.c (gfc_match_iterator): Remove error that iterator
2598         cannot be INTENT(IN).
2599
2600 2010-07-17  Mikael Morin  <mikael@gcc.gnu.org>
2601
2602         * trans-array.c (gfc_free_ss): Don't free beyond ss rank.
2603         Access subscript through the "dim" field index.
2604         (gfc_trans_create_temp_array): Access ss info through the "dim" field
2605         index.
2606         (gfc_conv_array_index_offset): Ditto.
2607         (gfc_conv_loop_setup): Ditto.
2608         (gfc_conv_expr_descriptor): Ditto.
2609         (gfc_conv_ss_startstride): Ditto.  Update call to
2610         gfc_conv_section_startstride.
2611         (gfc_conv_section_startstride): Set values along the array dimension.
2612         Get array dimension directly from the argument.
2613
2614 2010-07-15  Jakub Jelinek  <jakub@redhat.com>
2615
2616         * trans.h (gfc_string_to_single_character): New prototype.
2617         * trans-expr.c (string_to_single_character): Renamed to ...
2618         (gfc_string_to_single_character): ... this.  No longer static.
2619         (gfc_conv_scalar_char_value, gfc_build_compare_string,
2620         gfc_trans_string_copy): Adjust callers.
2621         * config-lang.in (gtfiles): Add fortran/trans-stmt.c.
2622         * trans-stmt.c: Include ggc.h and gt-fortran-trans-stmt.h.
2623         (select_struct): Move to toplevel, add GTY(()).
2624         (gfc_trans_character_select): Optimize SELECT CASE
2625         with character length 1.
2626
2627 2010-07-15  Nathan Froyd  <froydnj@codesourcery.com>
2628
2629         * f95-lang.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
2630         * trans-common.c: Likewise.
2631         * trans-decl.c: Likewise.
2632         * trans-types.c: Likewise.
2633         * trans.c: Likewise.
2634
2635 2010-07-15  Janus Weil  <janus@gcc.gnu.org>
2636
2637         PR fortran/44936
2638         * resolve.c (resolve_typebound_generic_call): Resolve generic
2639         non-polymorphic type-bound procedure calls to the correct specific
2640         procedure.
2641         (resolve_typebound_subroutine): Remove superfluous code.
2642
2643 2010-07-15  Daniel Kraft  <d@domob.eu>
2644
2645         PR fortran/44709
2646         * trans.h (struct gfc_wrapped_block): New struct.
2647         (gfc_start_wrapped_block), (gfc_add_init_cleanup): New methods.
2648         (gfc_finish_wrapped_block): New method.
2649         (gfc_init_default_dt): Add new init code to block rather than
2650         returning it.
2651         * trans-array.h (gfc_trans_auto_array_allocation): Use gfc_wrapped_block
2652         (gfc_trans_dummy_array_bias): Ditto.
2653         (gfc_trans_g77_array): Ditto.
2654         (gfc_trans_deferred_array): Ditto.
2655         * trans.c (gfc_add_expr_to_block): Call add_expr_to_chain.
2656         (add_expr_to_chain): New method based on old gfc_add_expr_to_block.
2657         (gfc_start_wrapped_block), (gfc_add_init_cleanup): New methods.
2658         (gfc_finish_wrapped_block): New method.
2659         * trans-array.c (gfc_trans_auto_array_allocation): use gfc_wrapped_block
2660         (gfc_trans_g77_array), (gfc_trans_dummy_array_bias): Ditto.
2661         (gfc_trans_deferred_array): Ditto.
2662         * trans-decl.c (gfc_trans_dummy_character): Ditto.
2663         (gfc_trans_auto_character_variable), (gfc_trans_assign_aux_var): Ditto.
2664         (init_intent_out_dt): Ditto.
2665         (gfc_init_default_dt): Add new init code to block rather than
2666         returning it.
2667         (gfc_trans_deferred_vars): Use gfc_wrapped_block to collect all init
2668         and cleanup code and put it all together.
2669
2670 2010-07-15  Jakub Jelinek  <jakub@redhat.com>
2671
2672         * trans.h (gfc_build_compare_string): Add CODE argument.
2673         * trans-intrinsic.c (gfc_conv_intrinsic_strcmp): Pass OP to
2674         gfc_build_compare_string.
2675         * trans-expr.c (gfc_conv_expr_op): Pass CODE to
2676         gfc_build_compare_string.
2677         (string_to_single_character): Rename len variable to length.
2678         (gfc_optimize_len_trim): New function.
2679         (gfc_build_compare_string): Add CODE argument.  If it is EQ_EXPR
2680         or NE_EXPR and one of the strings is string literal with LEN_TRIM
2681         bigger than the length of the other string, they compare unequal.
2682
2683         PR fortran/40206
2684         * trans-stmt.c (gfc_trans_character_select): Always use NULL for high
2685         in CASE_LABEL_EXPR and use NULL for low for the default case.
2686
2687 2010-07-14  Mikael Morin  <mikael@gcc.gnu.org>
2688
2689         * trans-array.c (gfc_conv_section_upper_bound): Remove
2690         (gfc_conv_section_startstride): Don't set the upper bound in the
2691         vector subscript case.
2692         (gfc_conv_loop_setup): Don't use gfc_conv_section_upper_bound
2693
2694 2010-07-14  Janus Weil  <janus@gcc.gnu.org>
2695
2696         PR fortran/44925
2697         * gfortran.h (gfc_is_data_pointer): Remove prototype.
2698         * dependency.c (gfc_is_data_pointer): Make it static.
2699         * intrinsic.texi: Update documentation on C_LOC.
2700         * resolve.c (gfc_iso_c_func_interface): Fix pointer and target checks
2701         and add a check for polymorphic variables.
2702
2703 2010-07-14  Jakub Jelinek  <jakub@redhat.com>
2704
2705         * trans-expr.c (string_to_single_character): Also optimize
2706         string literals containing a single char followed only by spaces.
2707         (gfc_trans_string_copy): Remove redundant string_to_single_character
2708         calls.
2709
2710         * trans-decl.c (gfc_build_intrinsic_function_decls,
2711         gfc_build_builtin_function_decls): Mark functions as
2712         DECL_PURE_P or TREE_READONLY.
2713
2714 2010-07-13  Nathan Froyd  <froydnj@codesourcery.com>
2715
2716         * trans-decl.c (build_entry_thunks): Call build_call_expr_loc_vec
2717         instead of build_function_call_expr.
2718         * trans-intrinsic.c (gfc_conv_intrinsic_sr_kind): Likewise.
2719
2720 2010-07-13  Tobias Burnus  <burnus@net-b.de>
2721             Daniel Franke  <franke.daniel@gmail.com>
2722
2723         PR fortran/43665
2724         * trans.h (gfc_build_library_function_decl_with_spec): New prototype.
2725         * trans-decl.c (gfc_build_library_function_decl_with_spec): Removed
2726         static.
2727         * trans-io (gfc_build_io_library_fndecls): Add "fn spec" annotations.
2728
2729 2010-07-13  Daniel Franke  <franke.daniel@gmail.com>
2730             Tobias Burnus  <burnus@net-b.de>
2731
2732         PR fortran/43665
2733         * trans-decl.c (gfc_build_intrinsic_function_decls): Add
2734         noclobber/noescape annotations to function calls.
2735         (gfc_build_builtin_function_decls): Likewise.
2736
2737 2010-07-13  Janus Weil  <janus@gcc.gnu.org>
2738
2739         PR fortran/44434
2740         PR fortran/44565
2741         PR fortran/43945
2742         PR fortran/44869
2743         * gfortran.h (gfc_find_derived_vtab): Modified prototype.
2744         * class.c (gfc_build_class_symbol): Modified call to
2745         'gfc_find_derived_vtab'.
2746         (add_proc_component): Removed, moved code into 'add_proc_comp'.
2747         (add_proc_comps): Renamed to 'add_proc_comp', removed treatment of
2748         generics.
2749         (add_procs_to_declared_vtab1): Removed unnecessary argument 'resolved'.
2750         Removed treatment of generics.
2751         (copy_vtab_proc_comps): Removed unnecessary argument 'resolved'.
2752         Call 'add_proc_comp' instead of duplicating code.
2753         (add_procs_to_declared_vtab): Removed unnecessary arguments 'resolved'
2754         and 'declared'.
2755         (add_generic_specifics,add_generics_to_declared_vtab): Removed.
2756         (gfc_find_derived_vtab): Removed unnecessary argument 'resolved'.
2757         Removed treatment of generics.
2758         * iresolve.c (gfc_resolve_extends_type_of): Modified call to
2759         'gfc_find_derived_vtab'.
2760         * resolve.c (resolve_typebound_function,resolve_typebound_subroutine):
2761         Removed treatment of generics.
2762         (resolve_select_type,resolve_fl_derived): Modified call to
2763         'gfc_find_derived_vtab'.
2764         * trans-decl.c (gfc_get_symbol_decl): Ditto.
2765         * trans-expr.c (gfc_conv_derived_to_class,gfc_trans_class_assign):
2766         Ditto.
2767         * trans-stmt.c (gfc_trans_allocate): Ditto.
2768
2769 2010-07-12  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2770
2771         PR fortran/37077
2772         * trans-io.c (build_dt): Set common.unit to flag chracter(kind=4)
2773         internal unit.
2774
2775 2010-07-12  Mikael Morin  <mikael@gcc.gnu.org>
2776
2777         * expr.c (gfc_get_int_expr): Don't initialize mpfr data twice.
2778         * resolve.c (build_default_init_expr): Ditto.
2779
2780 2010-07-11  Tobias Burnus  <burnus@net-b.de>
2781
2782         PR fortran/44702
2783         * module.c (sort_iso_c_rename_list): Remove.
2784         (import_iso_c_binding_module,use_iso_fortran_env_module):
2785         Allow multiple imports of the same symbol.
2786
2787 2010-07-11  Mikael Morin  <mikael@gcc.gnu.org>
2788
2789         * arith.c (gfc_arith_done_1): Release mpfr internal caches.
2790
2791 2010-07-11  Janus Weil  <janus@gcc.gnu.org>
2792
2793         PR fortran/44869
2794         * decl.c (build_sym,attr_decl1): Only build the class container if the
2795         symbol has sufficient attributes.
2796         * expr.c (gfc_check_pointer_assign): Use class_pointer instead of
2797         pointer attribute for classes.
2798         * match.c (gfc_match_allocate,gfc_match_deallocate): Ditto.
2799         * module.c (MOD_VERSION): Bump.
2800         (enum ab_attribute,attr_bits): Add AB_CLASS_POINTER.
2801         (mio_symbol_attribute): Handle class_pointer attribute.
2802         * parse.c (parse_derived): Use class_pointer instead of pointer
2803         attribute for classes.
2804         * primary.c (gfc_variable_attr,gfc_expr_attr): Ditto.
2805         * resolve.c (resolve_structure_cons,resolve_deallocate_expr,
2806         resolve_allocate_expr,resolve_fl_derived): Ditto.
2807         (resolve_fl_var_and_proc): Check for class_ok attribute.
2808
2809 2010-07-10  Mikael Morin  <mikael@gcc.gnu.org>
2810
2811         * trans-io.c (gfc_build_st_parameter): Update calls to
2812         gfc_add_field_to_struct.
2813         * trans-stmt.c (ADD_FIELD): Ditto.
2814         * trans-types.c
2815         (gfc_get_derived_type): Ditto. Don't create backend_decl for C_PTR's
2816         C_ADDRESS field.
2817         (gfc_add_field_to_struct_1): Set TYPE_FIELDS(context) instead of
2818         fieldlist, remove fieldlist from argument list.
2819         (gfc_add_field_to_struct): Update call to gfc_add_field_to_struct_1
2820         and remove fieldlist from argument list.
2821         (gfc_get_desc_dim_type, gfc_get_array_descriptor_base,
2822         gfc_get_mixed_entry_union): Move setting
2823         TYPE_FIELDS to gfc_add_field_to_struct_1 and update calls to it.
2824         * trans-types.h (gfc_add_field_to_struct): Update prototype.
2825
2826 2010-07-10  Paul Thomas  <pault@gcc.gnu.org>
2827
2828         PR fortran/44773
2829         * trans-expr.c (arrayfunc_assign_needs_temporary): No temporary
2830         if the lhs has never been host associated, as well as not being
2831         use associated, a pointer or a target.
2832         * resolve.c (resolve_variable): Mark variables that are host
2833         associated.
2834         * gfortran.h: Add the host_assoc bit to the symbol_attribute
2835         structure.
2836
2837 2010-07-09  Janus Weil  <janus@gcc.gnu.org>
2838
2839         * intrinsic.texi: Add documentation for SAME_TYPE_AS, EXTENDS_TYPE_OF,
2840         STORAGE_SIZE, C_NULL_PTR and C_NULL_FUNPTR. Modify documentation of
2841         SIZEOF and C_SIZEOF.
2842
2843 2010-07-08  Janus Weil  <janus@gcc.gnu.org>
2844
2845         PR fortran/44649
2846         * gfortran.h (gfc_isym_id): Add GFC_ISYM_C_SIZEOF,GFC_ISYM_STORAGE_SIZE.
2847         * intrinsic.h (gfc_check_c_sizeof,gfc_check_storage_size,
2848         gfc_resolve_storage_size): New prototypes.
2849         * check.c (gfc_check_c_sizeof,gfc_check_storage_size): New functions.
2850         * intrinsic.c (add_functions): Add STORAGE_SIZE.
2851         * iresolve.c (gfc_resolve_storage_size): New function.
2852         * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): Handle polymorphic
2853         arguments.
2854         (gfc_conv_intrinsic_storage_size): New function.
2855         (gfc_conv_intrinsic_function): Handle STORAGE_SIZE.
2856
2857 2010-07-08  Jakub Jelinek  <jakub@redhat.com>
2858
2859         PR fortran/44847
2860         * match.c (match_exit_cycle): Error on EXIT also from collapsed
2861         !$omp do loops.  Error on CYCLE to non-innermost collapsed
2862         !$omp do loops.
2863
2864 2010-07-08  Tobias Burnus  <burnus@net-b.de>
2865
2866         PR fortran/18918
2867         * array.c (gfc_match_array_ref): Better error message for
2868         coarrays with too few ranks.
2869         (match_subscript): Move one diagnostic to caller.
2870         * gfortran.h (gfc_get_corank): Add prottype.
2871         * expr.c (gfc_get_corank): New function.
2872         * iresolve.c (resolve_bound): Fix rank for cobounds.
2873         (gfc_resolve_lbound,gfc_resolve_lcobound, gfc_resolve_ubound,
2874         gfc_resolve_ucobound, gfc_resolve_this_image): Update
2875         resolve_bound call.
2876
2877 2010-07-06  Tobias Burnus  <burnus@net-b.de>
2878
2879         PR fortran/44742
2880         * array.c (gfc_expand_constructor): Add optional diagnostic.
2881         * gfortran.h (gfc_expand_constructor): Update prototype.
2882         * expr.c (gfc_simplify_expr, check_init_expr,
2883         gfc_reduce_init_expr): Update gfc_expand_constructor call.
2884         * resolve.c (gfc_resolve_expr): Ditto.
2885
2886 2010-07-06  Tobias Burnus  <burnus@net-b.de>
2887
2888         * trans-decl.c: Include diagnostic-core.h besides toplev.h.
2889         * trans-intrinsic.c: Ditto.
2890         * trans-types.c: Ditto.
2891         * convert.c: Include diagnostic-core.h instead of toplev.h.
2892         * options.c: Ditto.
2893         * trans-array.c: Ditto.
2894         * trans-const.c: Ditto.
2895         * trans-expr.c: Ditto.
2896         * trans-io.c: Ditto.
2897         * trans-openmp.c: Ditto.
2898         * trans.c: Ditto.
2899
2900 2010-07-06  Thomas Koenig  <tkoenig@gcc.gnu.org>
2901
2902         PR fortran/PR44693
2903         * check.c (dim_rank_check):  Also check intrinsic functions.
2904         Adjust permissible rank for functions which reduce the rank of
2905         their argument.  Spread is an exception, where DIM can
2906         be one larger than the rank of array.
2907
2908 2010-07-05  Steven G. Kargl  <kargl@gcc.gnu.org>
2909
2910         PR fortran/44797
2911         * fortran/io.c (resolve_tag): Check EXIST tag is a default logical.
2912
2913 2010-07-05  Paul Thomas  <pault@gcc.gnu.org>
2914
2915         PR fortran/44596
2916         * trans-types.c (gfc_get_derived_type): Derived type fields
2917         with the vtype attribute must have TYPE_REF_CAN_ALIAS_ALL set
2918         but build_pointer_type_for_mode must be used for this.
2919
2920 2010-07-05  Nathan Froyd  <froydnj@codesourcery.com>
2921
2922         * trans.h (gfc_conv_procedure_call): Take a VEC instead of a tree.
2923         * trans-intrinsic.c (gfc_conv_intrinsic_funcall): Adjust for new
2924         type of gfc_conv_procedure_call.
2925         (conv_generic_with_optional_char_arg): Likewise.
2926         * trans-stmt.c (gfc_trans_call): Likewise.
2927         * trans-expr.c (gfc_conv_function_expr): Likewise.
2928         (gfc_conv_procedure_call): Use build_call_vec instead of
2929         build_call_list.
2930
2931 2010-07-04  Daniel Kraft  <d@domob.eu>
2932
2933         * gfc-internals.texi (gfc_code): Document BLOCK and ASSOCIATE.
2934
2935 2010-07-04  Paul Thomas  <pault@gcc.gnu.org>
2936
2937         PR fortran/44596
2938         PR fortran/44745
2939         * trans-types.c (gfc_get_derived_type): Derived type fields
2940         with the vtype attribute must have TYPE_REF_CAN_ALIAS_ALL set.
2941
2942 2010-07-02  Mikael Morin  <mikael@gcc.gnu.org>
2943
2944         PR fortran/44662
2945         * decl.c (match_procedure_in_type): Clear structure before using.
2946         (gfc_match_generic): Ditto.
2947
2948 2010-07-02  Nathan Froyd  <froydnj@codesourcery.com>
2949
2950         * trans-types.h (gfc_add_field_to_struct): Add tree ** parameter.
2951         * trans-types.c (gfc_add_field_to_struct_1): New function, most
2952         of which comes from...
2953         (gfc_add_field_to_struct): ...here.  Call it.  Add new parameter.
2954         (gfc_get_desc_dim_type): Call gfc_add_field_to_struct_1 for
2955         building fields.
2956         (gfc_get_array_descriptor_base): Likewise.
2957         (gfc_get_mixed_entry_union): Likewise.
2958         (gfc_get_derived_type): Add extra chain parameter for
2959         gfc_add_field_to_struct.
2960         * trans-stmt.c (gfc_trans_character_select): Likewise.
2961         * trans-io.c (gfc_build_st_parameter): Likewise.
2962
2963 2010-06-29  Janus Weil  <janus@gcc.gnu.org>
2964
2965         PR fortran/44718
2966         * resolve.c (is_external_proc): Prevent procedure pointers from being
2967         regarded as external procedures.
2968
2969 2010-06-29  Janus Weil  <janus@gcc.gnu.org>
2970
2971         PR fortran/44696
2972         * trans-intrinsic.c (gfc_conv_associated): Handle polymorphic variables
2973         passed as second argument of ASSOCIATED.
2974
2975 2010-06-29  Paul Thomas  <pault@gcc.gnu.org>
2976
2977         PR fortran/44582
2978         * trans-expr.c (arrayfunc_assign_needs_temporary): New function
2979         to determine if a function assignment can be made without a
2980         temporary.
2981         (gfc_trans_arrayfunc_assign): Move all the conditions that
2982         suppress the direct function call to the above new functon and
2983         call it.
2984
2985 2010-06-28  Paul Thomas  <pault@gcc.gnu.org>
2986
2987         PR fortran/40158
2988         * interface.c (argument_rank_mismatch): New function.
2989         (compare_parameter): Call new function instead of generating
2990         the error directly.
2991
2992 2010-06-28  Nathan Froyd  <froydnj@codesourcery.com>
2993
2994         * trans-openmp.c (dovar_init): Define.  Define VECs containing it.
2995         (gfc_trans_omp_do): Use a VEC to accumulate variables and their
2996         initializers.
2997
2998 2010-06-28  Steven Bosscher  <steven@gcc.gnu.org>
2999
3000         * Make-lang.in: Update dependencies.
3001
3002 2010-06-27  Nathan Froyd  <froydnj@codesourcery.com>
3003
3004         * gfortran.h (gfc_code): Split backend_decl field into cycle_label
3005         and exit_label fields.
3006         * trans-openmp.c (gfc_trans_omp_do): Assign to new fields
3007         individually.
3008         * trans-stmt.c (gfc_trans_simple_do): Likewise.
3009         (gfc_trans_do): Likewise.
3010         (gfc_trans_do_while): Likewise.
3011         (gfc_trans_cycle): Use cycle_label directly.
3012         (gfc_trans_exit): Use exit_label directly.
3013
3014 2010-06-27  Daniel Kraft  <d@domob.eu>
3015
3016         * dump-parse-tree.c (show_symbol): Dump target-expression for
3017         associate names.
3018         (show_code_node): Make distinction between BLOCK and ASSOCIATE.
3019         (show_namespace): Use show_level for correct indentation of
3020         "inner namespaces" (contained procedures or BLOCK).
3021
3022 2010-06-27  Thomas Koenig  <tkoenig@gcc.gnu.org>
3023
3024         PR fortran/44678
3025         * dump-parse-tree.c (show_code_node):  Show namespace for
3026         EXEC_BLOCK.
3027
3028 2010-06-26  Tobias Burnus  <burnus@net-b.de>
3029
3030         * decl.c (gfc_match_decl_type_spec): Support
3031         TYPE(intrinsic-type-spec).
3032
3033 2010-06-25  Tobias Burnus  <burnus@net-b.de>
3034
3035         * intrinsic.h (gfc_check_selected_real_kind,
3036         gfc_simplify_selected_real_kind): Update prototypes.
3037         * intrinsic.c (add_functions): Add radix support to
3038         selected_real_kind.
3039         * check.c (gfc_check_selected_real_kind): Ditto.
3040         * simplify.c (gfc_simplify_selected_real_kind): Ditto.
3041         * trans-decl.c (gfc_build_intrinsic_function_decls):
3042         Change call from selected_real_kind to selected_real_kind2008.
3043         * intrinsic.texi (SELECTED_REAL_KIND): Update for radix.
3044         (PRECISION, RANGE, RADIX): Add cross @refs.
3045
3046 2010-06-25  Tobias Burnus  <burnus@net-b.de>
3047
3048         * decl.c (gfc_match_entry): Mark ENTRY as GFC_STD_F2008_OBS.
3049         * gfortran.texi (_gfortran_set_options): Update for
3050         GFC_STD_F2008_OBS addition.
3051         * libgfortran.h: Add GFC_STD_F2008_OBS.
3052         * options.c (set_default_std_flags, gfc_handle_option): Handle
3053         GFC_STD_F2008_OBS.
3054         io.c (check_format): Fix allow_std check.
3055
3056 2010-06-25  Tobias Burnus  <burnus@net-b.de>
3057
3058         * decl.c (gfc_match_entry): Allow END besides
3059         END SUBROUTINE/END FUNCTION for contained procedures.
3060
3061 2010-06-25  Tobias Burnus  <burnus@net-b.de>
3062
3063         * parse.c (next_free, next_fixed): Allow ";" as first character.
3064
3065 2010-06-24  Tobias Burnus  <burnus@net-b.de>
3066
3067         PR fortran/44614
3068         * decl.c (variable_decl): Fix IMPORT diagnostic for CLASS.
3069
3070 2010-06-22  Janus Weil  <janus@gcc.gnu.org>
3071
3072         PR fortran/44616
3073         * resolve.c (resolve_fl_derived): Avoid checking for abstract on class
3074         containers.
3075
3076 2010-06-21  Tobias Burnus  <burnus@net-b.de>
3077
3078         PR fortran/40632
3079         * interface.c (compare_parameter): Add gfc_is_simply_contiguous
3080         checks.
3081         * symbol.c (gfc_add_contiguous): New function.
3082         (gfc_copy_attr, check_conflict): Handle contiguous attribute.
3083         * decl.c (match_attr_spec): Ditto.
3084         (gfc_match_contiguous): New function.
3085         * resolve.c (resolve_fl_derived, resolve_symbol): Handle
3086         contiguous.
3087         * gfortran.h (symbol_attribute): Add contiguous.
3088         (gfc_is_simply_contiguous): Add prototype.
3089         (gfc_add_contiguous): Add prototype.
3090         * match.h (gfc_match_contiguous): Add prototype.
3091         * parse.c (decode_specification_statement,
3092         decode_statement): Handle contiguous attribute.
3093         * expr.c (gfc_is_simply_contiguous): New function.
3094         * dump-parse-tree.c (show_attr): Handle contiguous.
3095         * module.c (ab_attribute, attr_bits, mio_symbol_attribute):
3096         Ditto.
3097         * trans-expr.c (gfc_add_interface_mapping): Copy
3098         attr.contiguous.
3099         * trans-array.c (gfc_conv_descriptor_stride_get,
3100         gfc_conv_array_parameter): Handle contiguous arrays.
3101         * trans-types.c (gfc_build_array_type, gfc_build_array_type,
3102         gfc_sym_type, gfc_get_derived_type, gfc_get_array_descr_info):
3103         Ditto.
3104         * trans.h (gfc_array_kind): Ditto.
3105         * trans-decl.c (gfc_get_symbol_decl): Ditto.
3106
3107 2010-06-20  Joseph Myers  <joseph@codesourcery.com>
3108
3109         * options.c (gfc_handle_option): Don't handle N_OPTS.
3110
3111 2010-06-19  Janus Weil  <janus@gcc.gnu.org>
3112
3113         PR fortran/44584
3114         * resolve.c (resolve_fl_derived): Reverse ordering of conditions
3115         to avoid ICE.
3116
3117 2010-06-18  Tobias Burnus  <burnus@net-b.de>
3118
3119         PR fortran/44556
3120         * resolve.c (resolve_allocate_deallocate): Properly check
3121         part-refs in stat=/errmsg= for invalid use.
3122
3123 2010-06-17  Janus Weil  <janus@gcc.gnu.org>
3124
3125         PR fortran/44558
3126         * resolve.c (resolve_typebound_function,resolve_typebound_subroutine):
3127         Return directly in case of an error.
3128
3129 2010-06-16  Janus Weil  <janus@gcc.gnu.org>
3130
3131         PR fortran/44549
3132         * gfortran.h (gfc_get_typebound_proc): Modified Prototype.
3133         * decl.c (match_procedure_in_type): Give a unique gfc_typebound_proc
3134         structure to each procedure in a procedure list.
3135         * module.c (mio_typebound_proc): Add NULL argument to
3136         'gfc_get_typebound_proc'.
3137         * symbol.c (gfc_get_typebound_proc): Add a new argument, which is used
3138         to initialize the new structure.
3139
3140 2010-06-15  Janus Weil  <janus@gcc.gnu.org>
3141
3142         PR fortran/43388
3143         * gfortran.h (gfc_expr): Add new member 'mold'.
3144         * match.c (gfc_match_allocate): Implement the MOLD tag.
3145         * resolve.c (resolve_allocate_expr): Ditto.
3146         * trans-stmt.c (gfc_trans_allocate): Ditto.
3147
3148 2010-06-15  Jakub Jelinek  <jakub@redhat.com>
3149
3150         PR fortran/44536
3151         * trans-openmp.c (gfc_omp_predetermined_sharing): Don't return
3152         OMP_CLAUSE_DEFAULT_SHARED for artificial vars with
3153         GFC_DECL_SAVED_DESCRIPTOR set.
3154         (gfc_omp_report_decl): New function.
3155         * trans.h (gfc_omp_report_decl): New prototype.
3156         * f95-lang.c (LANG_HOOKS_OMP_REPORT_DECL): Redefine.
3157
3158 2010-06-13  Daniel Franke  <franke.daniel@gmail.com>
3159
3160         PR fortran/31588
3161         PR fortran/43954
3162         * gfortranspec.c (lang_specific_driver): Removed deprecation
3163         warning for -M.
3164         * lang.opt: Add options -M, -MM, -MD, -MMD, -MF, -MG, -MP, -MT, -MQ.
3165         * lang-specs.h (CPP_FORWARD_OPTIONS): Add -M* options.
3166         * cpp.h (gfc_cpp_makedep): New.
3167         (gfc_cpp_add_dep): New.
3168         (gfc_cpp_add_target): New.
3169         * cpp.c (gfc_cpp_option): Add deps* members.
3170         (gfc_cpp_makedep): New.
3171         (gfc_cpp_add_dep): New.
3172         (gfc_cpp_add_target): New.
3173         (gfc_cpp_init_options): Initialize new options.
3174         (gfc_cpp_handle_option): Handle new options.
3175         (gfc_cpp_post_options): Map new options to libcpp-options.
3176         (gfc_cpp_init): Handle deferred -MQ and -MT options.
3177         (gfc_cpp_done): If requested, write dependencies to file.
3178         * module.c (gfc_dump_module): Add a module filename as target.
3179         * scanner.c (open_included_file): New parameter system; add the
3180         included file as dependency.
3181         (gfc_open_included_file): Add the included file as dependency.
3182         (gfc_open_intrinsic_module): Likewise.
3183         * invoke.texi: Removed deprecation warning for -M.
3184         * gfortran.texi: Removed Makefile-dependencies project.
3185
3186 2010-06-12  Daniel Franke  <franke.daniel@gmail.com>
3187
3188         * resolve.c (resolve_global_procedure): Improved checking if an
3189         explicit interface is required.
3190
3191 2010-06-12  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
3192
3193         * trans-decl.c (gfc_build_intrinsic_function_decls): Fix
3194         return type.
3195         * trans-intrinsic.c (gfc_conv_intrinsic_fdate): Fix argument type.
3196         (gfc_conv_intrinsic_ttynam): Likewise.
3197         (gfc_conv_intrinsic_trim): Likewise.
3198
3199 2010-06-12  Janus Weil  <janus@gcc.gnu.org>
3200
3201         PR fortran/40117
3202         * decl.c (match_procedure_in_type): Allow procedure lists (F08).
3203
3204 2010-06-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
3205
3206         * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Fix comment.
3207
3208 2010-06-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
3209
3210         * mathbuiltins.def: Add builtins that do not directly correspond
3211         to a Fortran intrinsic, with new macro OTHER_BUILTIN.
3212         * f95-lang.c (gfc_init_builtin_functions): Define OTHER_BUILTIN.
3213         * trans-intrinsic.c (gfc_intrinsic_map_t): Remove
3214         code_{r,c}{4,8,10,16} fields. Add
3215         {,complex}{float,double,long_double}_built_in fields.
3216         (gfc_intrinsic_map): Adjust definitions of DEFINE_MATH_BUILTIN,
3217         DEFINE_MATH_BUILTIN_C and LIB_FUNCTION accordingly. Add
3218         definition of OTHER_BUILTIN.
3219         (real_compnt_info): Remove unused struct.
3220         (builtin_decl_for_precision, builtin_decl_for_float_kind): New
3221         functions.
3222         (build_round_expr): Call builtin_decl_for_precision instead of
3223         series of if-else.
3224         (gfc_conv_intrinsic_aint): Call builtin_decl_for_float_kind
3225         instead of a switch.
3226         (gfc_build_intrinsic_lib_fndecls): Match
3227         {real,complex}{4,8,10,16}decl into the C-style built_in_decls.
3228         (gfc_get_intrinsic_lib_fndecl): Do not hardcode floating-point
3229         kinds.
3230         (gfc_conv_intrinsic_lib_function): Go through all the extended
3231         gfc_intrinsic_map.
3232         (gfc_trans_same_strlen_check): Call builtin_decl_for_float_kind
3233         instead of a switch.
3234         (gfc_conv_intrinsic_abs): Likewise.
3235         (gfc_conv_intrinsic_mod): Likewise.
3236         (gfc_conv_intrinsic_sign): Likewise.
3237         (gfc_conv_intrinsic_fraction): Likewise.
3238         (gfc_conv_intrinsic_nearest): Likewise.
3239         (gfc_conv_intrinsic_spacing): Likewise.
3240         (gfc_conv_intrinsic_rrspacing): Likewise.
3241         (gfc_conv_intrinsic_scale): Likewise.
3242         (gfc_conv_intrinsic_set_exponent): Likewise.
3243
3244 2010-06-11  Paul Thomas  <pault@gcc.gnu.org>
3245
3246         PR fortran/42051
3247         PR fortran/43896
3248         * trans-expr.c (gfc_conv_derived_to_class): Handle array-valued
3249         functions with CLASS formal arguments.
3250
3251 2010-06-10  Janus Weil  <janus@gcc.gnu.org>
3252
3253         PR fortran/44207
3254         * resolve.c (conformable_arrays): Handle allocatable components.
3255
3256 2010-06-10  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
3257
3258         PR fortran/38273
3259         * gfortran.texi: Document that Cray pointers cannot be function
3260         results.
3261
3262 2010-06-10  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
3263
3264         PR fortran/36234
3265         * gfortran.texi: Document lack of support for syntax
3266         "complex FUNCTION name*16()", and existence of alternative
3267         legacy syntax "complex*16 FUNCTION name()".
3268
3269 2010-06-10  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
3270
3271         PR fortran/43032
3272         * intrinsic.texi (FLUSH): Note the difference between FLUSH and
3273         POSIX's fsync(), and how to call the latter from Fortran code.
3274
3275 2010-06-10  Daniel Franke  <franke.daniel@gmail.com>
3276
3277         PR fortran/44457
3278         * interface.c (compare_actual_formal): Reject actual arguments with
3279         array subscript passed to ASYNCHRONOUS dummys.
3280
3281 2010-06-10  Daniel Kraft  <d@domob.eu>
3282
3283         PR fortran/38936
3284         * gfortran.h (enum gfc_statement): Add ST_ASSOCIATE, ST_END_ASSOCIATE.
3285         (struct gfc_symbol): New field `assoc'.
3286         (struct gfc_association_list): New struct.
3287         (struct gfc_code): New struct `block' in union, move `ns' there
3288         and add association list.
3289         (gfc_free_association_list): New method.
3290         (gfc_has_vector_subscript): Made public;
3291         * match.h (gfc_match_associate): New method.
3292         * parse.h (enum gfc_compile_state): Add COMP_ASSOCIATE.
3293         * decl.c (gfc_match_end): Handle ST_END_ASSOCIATE.
3294         * interface.c (gfc_has_vector_subscript): Made public.
3295         (compare_actual_formal): Rename `has_vector_subscript' accordingly.
3296         * match.c (gfc_match_associate): New method.
3297         (gfc_match_select_type): Change reference to gfc_code's `ns' field.
3298         * primary.c (match_variable): Don't allow names associated to expr here.
3299         * parse.c (decode_statement): Try matching ASSOCIATE statement.
3300         (case_exec_markers, case_end): Add ASSOCIATE statement.
3301         (gfc_ascii_statement): Hande ST_ASSOCIATE and ST_END_ASSOCIATE.
3302         (parse_associate): New method.
3303         (parse_executable): Handle ST_ASSOCIATE.
3304         (parse_block_construct): Change reference to gfc_code's `ns' field.
3305         * resolve.c (resolve_select_type): Ditto.
3306         (resolve_code): Ditto.
3307         (resolve_block_construct): Ditto and add comment.
3308         (resolve_select_type): Set association list in generated BLOCK to NULL.
3309         (resolve_symbol): Resolve associate names.
3310         * st.c (gfc_free_statement): Change reference to gfc_code's `ns' field
3311         and free association list.
3312         (gfc_free_association_list): New method.
3313         * symbol.c (gfc_new_symbol): NULL new field `assoc'.
3314         * trans-stmt.c (gfc_trans_block_construct): Change reference to
3315         gfc_code's `ns' field.
3316
3317 2010-06-10  Kai Tietz  <kai.tietz@onevision.com>
3318
3319         * error.c (error_print): Pre-initialize loc by NULL.
3320         * openmp.c (resolve_omp_clauses): Add explicit
3321         braces to avoid ambigous else.
3322         * array.c (match_subscript): Pre-initialize m to MATCH_ERROR.
3323
3324 2010-06-10  Gerald Pfeifer  <gerald@pfeifer.com>
3325
3326         * gfc-internals.texi: Move to GFDL 1.3.
3327         * gfortran.texi: Ditto.
3328         * intrinsic.texi: Ditto.
3329         * invoke.texi: Ditto.
3330
3331 2010-06-09  Daniel Franke  <franke.daniel@gmail.com>
3332
3333         PR fortran/44347
3334         * check.c (gfc_check_selected_real_kind): Verify that the
3335         actual arguments are scalar.
3336
3337 2010-06-09  Daniel Franke  <franke.daniel@gmail.com>
3338
3339         PR fortran/44359
3340         * intrinsic.c (gfc_convert_type_warn): Further improve -Wconversion.
3341
3342 2010-06-09  Janus Weil  <janus@gcc.gnu.org>
3343
3344         PR fortran/44430
3345         * dump-parse-tree.c (show_symbol): Avoid infinite loop.
3346
3347 2010-06-09  Steven G. Kargl  <kargl@gcc.gnu.org>
3348
3349         * fortran/symbol.c (check_conflict):  Remove an invalid conflict check.
3350
3351 2010-06-09  Steven G. Kargl  <kargl@gcc.gnu.org>
3352
3353         * fortran/intrinsic.c (add_functions): Change gfc_check_btest,
3354         gfc_check_ibclr, and gfc_check_ibset to gfc_check_bitfcn.
3355         * fortran/intrinsic.h: Remove prototypes for gfc_check_btest,
3356         gfc_check_ibclr, and gfc_check_ibset.  Add prototype for
3357         gfc_check_bitfcn.
3358         * fortran/check.c (nonnegative_check, less_than_bitsize1, 
3359         less_than_bitsize2): New functions.
3360         (gfc_check_btest): Renamed to gfc_check_bitfcn.  Use
3361         nonnegative_check and less_than_bitsize1.
3362         (gfc_check_ibclr, gfc_check_ibset):&