OSDN Git Service

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