OSDN Git Service

2011-04-30 Paul Thomas <pault@gcc.gnu.org>
[pf3gnuchains/gcc-fork.git] / gcc / fortran / ChangeLog
1 2011-04-30  Paul Thomas  <pault@gcc.gnu.org>
2
3         PR fortran/48746
4         * trans-expr.c (fcncall_realloc_result): Set the bounds and the
5         offset so that the lbounds are one.
6         (gfc_trans_arrayfunc_assign): Add rank to arguments of above.
7
8 2011-04-29  Paul Thomas  <pault@gcc.gnu.org>
9
10         PR fortran/48462
11         * trans-expr.c (arrayfunc_assign_needs_temporary): Deal with
12         automatic reallocation when the lhs is a target.
13
14         PR fortran/48746
15         * trans-expr.c (fcncall_realloc_result): Make sure that the
16         result dtype field is set before the function call.
17
18 2011-04-29  Tobias Burnus  <burnus@net-b.de>
19
20         PR fortran/48810
21         * resolve.c (resolve_typebound_generic_call): Don't check access
22         flags of the specific function.
23
24         PR fortran/48800
25         * resolve.c (resolve_formal_arglist): Don't change AS_DEFERRED
26         to AS_ASSUMED_SHAPE for function results.
27         (resolve_fl_var_and_proc): Print also for function results with
28         AS_DEFERRED an error, if they are not a pointer or allocatable.
29         (resolve_types): Make sure arguments of procedures in interface
30         blocks are resolved.
31
32 2011-04-29  Michael Matz  <matz@suse.de>
33
34         * options.c (options.c): Set warn_maybe_uninitialized.
35
36 2011-04-28  Tobias Burnus  <burnus@net-b.de>
37
38         PR fortran/48112
39         * resolve.c (resolve_fl_var_and_proc): Print diagnostic of
40         function results only once.
41         (resolve_symbol): Always resolve function results.
42
43         PR fortran/48279
44         * expr.c (gfc_check_vardef_context): Fix handling of generic
45         EXPR_FUNCTION.
46         * interface.c (check_interface0): Reject internal functions
47         in generic interfaces, unless -std=gnu.
48
49 2011-04-27  Tobias Burnus  <burnus@net-b.de>
50
51         PR fortran/48788
52         * resolve.c (resolve_global_procedure): Error recovery -
53         avoid segfault for (non)character-returning functions.
54
55 2011-04-26  Thomas Koenig  <tkoenig@gcc.gnu.org>
56
57         * decl.c (gfc_match_end):  Check that the block name starts
58         with "block@".
59         * parse.c (gfc_build_block_ns):  Make block names unique by
60         numbering them.
61
62 2011-04-26  Thomas Koenig  <tkoenig@gcc.gnu.org>
63
64         * frontend-passes.c (inserted_block):  New variable.
65         (changed_statement):  Likewise.
66         (create_var):  Encase statement to be operated on in a BLOCK.
67         Adjust code insertion for BLOCK.
68         (cfe_code):  Set inserted_block and changed_statement to NULL.
69
70 2011-04-23  Tobias Burnus  <burnus@net-b.de>
71
72         PR fortran/18918
73         * module.c (mio_array_spec): Set as->cotype on reading.
74         * resolve.c (resolve_allocate_expr): Fix allocating coarray
75         components.
76
77 2011-04-21  Thomas Koenig  <tkoenig@gcc.gnu.org>
78
79         PR fortran/48405
80         * frontend_passes (cfe_register_funcs): Remove workaround for DO
81         loops.
82         (gfc_code_walker):  Make sure the pointer to the current
83         statement doen't change when other statements are inserted.
84
85 2011-04-21  Tobias Burnus  <burnus@net-b.de>
86
87         PR fortran/18918
88         * array.c (gfc_match_array_spec): Fix maximal rank(+corank) check.
89
90 2011-04-20  Jim Meyering  <meyering@redhat.com>
91
92         * expr.c (free_expr0): Remove useless if-before-free.
93         * gfortranspec.c (lang_specific_pre_link): Likewise.
94         * interface.c (gfc_extend_expr): Likewise.
95         * trans-openmp.c (gfc_trans_omp_array_reduction): Likewise.
96
97 2011-04-19  Tobias Burnus  <burnus@net-b.de>
98
99         PR fortran/48588
100         PR fortran/48692
101
102         * module.c (fix_mio_expr): Commit created symbol.
103
104 2011-04-19  Janne Blomqvist  <jb@gcc.gnu.org>
105
106         * scanner.c (load_file): Use XCNEWVAR instead of xcalloc.
107
108 2011-04-19  Janne Blomqvist  <jb@gcc.gnu.org>
109
110         * frontend-passes.c (gfc_run_passes): Use XDELETEVEC instead of
111         free.
112
113 2011-04-19  Janne Blomqvist  <jb@gcc.gnu.org>
114
115         * misc.c (gfc_getmem): Remove function.
116         * gfortran.h: Remove gfc_getmem prototype. Replace gfc_getmem
117         usage with XCNEW or XCNEWVEC.
118         * expr.c (gfc_check_assign_symbol): Replace gfc_getmem usage with
119         XCNEW or XCNEWVEC.
120         * options.c (gfc_handle_module_path_options)
121         (gfc_get_option_string): Likewise.
122         * resolve.c (gfc_resolve_forall): Likewise.
123         * simplify.c (simplify_transformation_to_array): Likewise.
124         * target-memory.c (gfc_target_interpret_expr): Likewise.
125         * trans-common.c (get_segment_info, copy_equiv_list_to_ns)
126         (get_init_field): Likewise.
127         * trans-expr.c (gfc_conv_statement_function): Likewise.
128         * trans-io.c (nml_full_name): Likewise.
129         * trans-stmt.c (gfc_trans_forall_1): Likewise.
130         * scanner.c (load_file): Replace gfc_getmem usage with xcalloc.
131
132 2011-04-19  Tobias Burnus  <burnus@net-b.de>
133
134         PR fortran/48588
135         * parse.c (resolve_all_program_units): Skip modules.
136         (translate_all_program_units): Handle modules.
137         (gfc_parse_file): Defer code generation for modules.
138
139 2011-04-19  Martin Jambor  <mjambor@suse.cz>
140
141         * trans-decl.c (gfc_generate_function_code): Call cgraph_create_node
142         instead of cgraph_get_create_node.
143
144 2011-04-18  Jim Meyering  <meyering@redhat.com>
145
146         remove now-unused definition of gfc_free
147         * misc.c (gfc_free): Remove function.
148         * gfortran.h (gfc_free): Remove its prototype.
149
150 2011-04-18  Jim Meyering  <meyering@redhat.com>
151
152         convert each use of gfc_free (p) to free (p)
153         Do that by running this command:
154           perl -pi -e    's/\bgfc_free ?\(/free (/' \
155             $(git grep -El '\bgfc_free ?\(')
156         which also corrects the few uses that lacked a space between
157         the function name and the open parenthesis.
158         Manually undo the change to the function definition itself
159         and its prototype.  They'll be removed next.
160         * array.c (gfc_free_array_spec, gfc_set_array_spec): s/gfc_free/free/
161         * constructor.c (node_free): Likewise.
162         * cpp.c (dump_queued_macros): Likewise.
163         * data.c (gfc_assign_data_value): Likewise.
164         * decl.c (free_variable, free_value, gfc_free_data): Likewise.
165         (gfc_free_data_all, match_old_style_init): Likewise.
166         (gfc_set_constant_character_len, gfc_free_enum_history, NUM_DECL):
167         Likewise.
168         (gfc_match_modproc): Likewise.
169         * dependency.c (check_section_vs_section): Likewise.
170         * error.c (gfc_pop_error, gfc_free_error): Likewise.
171         * expr.c (free_expr0, gfc_free_expr, gfc_free_actual_arglist): Likewise.
172         (gfc_free_ref_list, gfc_replace_expr, gfc_copy_ref): Likewise.
173         (find_substring_ref, gfc_simplify_expr, gfc_check_assign_symbol):
174         Likewise.
175         * frontend-passes.c (gfc_run_passes, cfe_expr_0): Likewise.
176         (strip_function_call, optimize_comparison): Likewise.
177         * interface.c (gfc_free_interface, arginfo, check_interface0): Likewise.
178         (CHECK_OS_COMPARISON, gfc_extend_assign, gfc_free_formal_arglist):
179         Likewise.
180         * intrinsic.c (gfc_intrinsic_done_1, gfc_convert_type_warn): Likewise.
181         (gfc_convert_chartype): Likewise.
182         * io.c (gfc_free_open, compare_to_allowed_values, gfc_free_close):
183         Likewise.
184         (gfc_free_filepos, gfc_free_dt, gfc_free_inquire): Likewise.
185         * match.c (gfc_free_iterator, gfc_match_associate): Likewise.
186         (gfc_free_alloc_list, gfc_free_namelist, gfc_free_equiv_until):
187         Likewise.
188         (free_case, gfc_free_forall_iterator): Likewise.
189         * misc.c: Likewise.
190         * module.c (free_pi_tree, resolve_fixups, free_rename): Likewise.
191         (free_true_name, peek_atom, mio_allocated_wide_string): Likewise.
192         (mio_pool_string, mio_internal_string, mio_gmp_integer): Likewise.
193         (mio_gmp_real, mio_expr, mio_typebound_proc): Likewise.
194         (mio_full_typebound_tree, skip_list, load_equiv): Likewise.
195         (free_written_common, gfc_use_module, gfc_free_use_stmts): Likewise.
196         * openmp.c (gfc_free_omp_clauses): Likewise.
197         * options.c (gfc_post_options): Likewise.
198         * parse.c (select_type_pop, parse_omp_structured_block): Likewise.
199         * primary.c (gfc_free_structure_ctor_component): Likewise.
200         * resolve.c (resolve_structure_cons, check_host_association): Likewise.
201         (gfc_resolve_forall, resolve_equivalence): Likewise.
202         * scanner.c (gfc_scanner_done_1, gfc_release_include_path): Likewise.
203         (gfc_define_undef_line, preprocessor_line, include_line): Likewise.
204         (load_file, gfc_read_orig_filename): Likewise.
205         * simplify.c (simplify_transformation_to_array): Likewise.
206         (gfc_simplify_ibits, simplify_shift, gfc_simplify_ishftc, STRING):
207         Likewise.
208         (gfc_simplify_compiler_options): Likewise.
209         * st.c (gfc_free_statement, gfc_free_statements): Likewise.
210         (gfc_free_association_list): Likewise.
211         * symbol.c (free_components, gfc_free_st_label, free_st_labels):
212         Likewise.
213         (gfc_delete_symtree, gfc_free_symbol, gfc_undo_symbols): Likewise.
214         (free_old_symbol, gfc_commit_symbols, free_tb_tree): Likewise.
215         (free_common_tree, free_uop_tree, free_sym_tree): Likewise.
216         (gfc_free_dt_list, gfc_free_equiv_infos, gfc_free_equiv_lists):
217         Likewise.
218         (gfc_free_finalizer, gfc_free_charlen, free_entry_list): Likewise.
219         (gfc_free_namespace): Likewise.
220         * trans-array.c (gfc_free_ss, gfc_trans_array_bound_check): Likewise.
221         (gfc_conv_array_ref, gfc_conv_ss_startstride): Likewise.
222         (gfc_trans_dummy_array_bias, gfc_conv_array_parameter): Likewise.
223         * trans-common.c (get_init_field, create_common): Likewise.
224         * trans-const.c (gfc_build_wide_string_const): Likewise.
225         (gfc_conv_string_init): Likewise.
226         * trans-decl.c (gfc_generate_function_code): Likewise.
227         * trans-expr.c (gfc_conv_substring, gfc_free_interface_mapping):
228         Likewise.
229         (SCALAR_POINTER, gfc_conv_statement_function): Likewise.
230         (gfc_trans_subarray_assign): Likewise.
231         * trans-intrinsic.c (conv_generic_with_optional_char_arg): Likewise.
232         * trans-io.c (gfc_trans_io_runtime_check, set_string): Likewise.
233         (transfer_namelist_element, transfer_array_component): Likewise.
234         * trans-openmp.c (gfc_trans_omp_array_reduction): Likewise.
235         * trans-stmt.c (cleanup_forall_symtrees, gfc_trans_forall_1): Likewise.
236         * trans.c (trans_runtime_error_vararg, gfc_restore_backend_locus):
237         Likewise.
238
239 2011-04-15  Jim Meyering  <meyering@redhat.com>
240
241         gfortran: remove cpp definition of free, ...
242         in preparation for the s/gfc_free/free/ transformation.
243         * gfortran.h (free): Remove macro definition that would otherwise
244         prevent direct use of the function.
245
246 2011-04-18  Tobias Burnus  <burnus@net-b.de>
247
248         PR fortran/18918
249         * array.c (gfc_match_array_ref): Check for too many codimensions.
250         * check.c (gfc_check_image_index): Check number of elements
251         in SUB argument.
252         * simplify.c (gfc_simplify_image_index): Remove unreachable checks.
253
254 2011-04-18  Tobias Burnus  <burnus@net-b.de>
255
256         PR fortran/18918
257         * iresolve.c (gfc_resolve_image_index): Set ts.type.
258         * simplify.c (gfc_simplify_image_index): Don't abort if the bounds
259         are not known at compile time and handle -fcoarray=lib.
260         * trans-intrinsics.c (gfc_conv_intrinsic_function): Handle
261         IMAGE_INDEX.
262         (conv_intrinsic_cobound): Fix comment typo.
263         (trans_this_image): New function.
264         * trans-array.c (gfc_unlikely): Move to trans.c.
265         * trans.c (gfc_unlikely): Function moved from trans-array.c.
266         (gfc_trans_runtime_check): Use it.
267         * trans-io.c (gfc_trans_io_runtime_check): Ditto.
268         * trans.h (gfc_unlikely): Add prototype.
269
270 2011-04-18  Paul Thomas  <pault@gcc.gnu.org>
271
272         PR fortran/48462
273         * trans-expr.c (fcncall_realloc_result): Renamed version of
274         realloc_lhs_bounds_for_intrinsic_call that does not touch the
275         descriptor bounds anymore but makes a temporary descriptor to
276         hold the result.
277         (gfc_trans_arrayfunc_assign): Modify the reference to above
278         renamed function.
279
280 2011-05-17  Tobias Burnus  <burnus@net-b.de>
281
282         PR fortran/48624
283         * trans-decl.c (gfc_get_extern_function_decl): Fix decl
284         for external procedures with proc arguments.
285
286 2011-04-15  Michael Matz  <matz@suse.de>
287
288         * trans-array.c (toplevel): Include gimple.h.
289         (gfc_trans_allocate_array_storage): Check flag_stack_arrays,
290         properly expand variable length arrays.
291         (gfc_trans_auto_array_allocation): If flag_stack_arrays create
292         variable length decls and associate them with their scope.
293         * gfortran.h (gfc_option_t): Add flag_stack_arrays member.
294         * options.c (gfc_init_options): Handle -fstack_arrays option.
295         * lang.opt (fstack-arrays): Add option.
296         * invoke.texi (Code Gen Options): Document it.
297         * Make-lang.in (trans-array.o): Depend on GIMPLE_H.
298
299 2011-04-15  Tobias Burnus  <burnus@net-b.de>
300
301         PR fortran/18918
302         * trans-intrinsic.c (conv_intrinsic_cobound): Remove unused
303         code which is also causing an ICE.
304
305 2011-04-14  Nathan Froyd  <froydnj@codesourcery.com>
306
307         * f95-lang.c (poplevel): Use BLOCK_CHAIN and block_chainon.
308
309 2011-04-12  Nathan Froyd  <froydnj@codesourcery.com>
310
311         * f95-lang.c (union lang_tree_node): Check for TS_COMMON before
312         calling TREE_CHAIN.
313
314 2011-04-12  Paul Thomas  <pault@gcc.gnu.org>
315
316         PR fortran/48360
317         PR fortran/48456
318         * trans-array.c (get_std_lbound): For derived type variables
319         return array valued component lbound.
320
321 2011-04-12  Martin Jambor  <mjambor@suse.cz>
322
323         * trans-decl.c (gfc_generate_function_code): Call
324         cgraph_get_create_node instead of cgraph_node.
325
326 2011-04-11  Tobias Burnus  <burnus@net-b.de>
327
328         PR fortran/18918
329         * simplify.c (simplify_bound_dim): Exit for
330         ucobound's last dimension unless -fcoarray=single.
331         * trans-array (gfc_conv_descriptor_size_1): Renamed from
332         gfc_conv_descriptor_size, made static, has now from_dim and
333         to_dim arguments.
334         (gfc_conv_descriptor_size): Call gfc_conv_descriptor_size.
335         (gfc_conv_descriptor_cosize): New function.
336         * trans-array.h (gfc_conv_descriptor_cosize): New prototype.
337         * trans-intrinsic.c (conv_intrinsic_cobound): Add input_location
338         and handle last codim of ucobound for when -fcoarray is not "single".
339
340 2011-04-08  Thomas Koenig  <tkoenig@gcc.gnu.org>
341
342         PR fortran/48448
343         * gfortran.h (gfc_option_t):  Add warn_function_elimination and
344         flag_frontend_optimize.
345         * lang.opt (Wfunction-elimination):  Add.
346         (ffrontend-optimize):  Add.
347         * invoke.texi:  Add documentation for -Wfunction-elimination
348         and -ffrontend-optimize.  Add -faggressive-function-elimination
349         to list of code generation options.
350         * frontend-passes.c (gfc_run_passes):  Run optimizations if
351         flag_frontend_optimize is set.
352         (warn_function_elimination):  New function.
353         (cfe_expr_0):  Call it if requested to do so.
354         * options.c (gfc_init_options):  Initiate warn_function_elimination
355         and flag_frontend_optimize.
356         (gfc_post_options):  Set flag_frontend_optimize if not specified
357         by user, depending on the optimization level.
358         (gfc_handle_option):  Handle -Wfunction-elimination and
359         -ffrontend-optimize.
360
361 2011-04-06  Tobias Burnus  <burnus@net-b.de>
362
363         PR fortran/18918
364         * trans-intrinsic.c (gfc_conv_intrinsic_function): Fix
365         call for this_image.
366
367 2011-04-05  Nathan Froyd  <froydnj@codesourcery.com>
368
369         * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Use
370         build_function_type_list instead of build_function_type.  Correct
371         argument order for func_frexp and func_scalbn.
372
373 2011-04-05  Duncan Sands  <baldrick@free.fr>
374
375         * f95-lang.c (build_builtin_fntypes): Swap frexp parameter types.
376
377 2010-04-04  Thomas Koenig  <tkoenig@gcc.gnu.org>
378
379         * frontend-passes: (optimize_lexical_comparison): New function.
380         (optimize_expr): Call it.
381         (optimize_comparison): Also handle lexical comparison functions.
382         Return false instad of -2 for unequal comparison.
383
384 2011-04-04  Thomas Koenig  <tkoenig@gcc.gnu.org>
385
386         PR fortran/48412
387         * frontend-passes (cfe_expr_0):  Reverse the order of going
388         through the loops.
389
390 2011-04-04  Tobias Burnus  <burnus@net-b.de>
391             Mikael Morin  <mikael.morin@sfr.fr>
392
393         PR fortran/18918
394         * check.c (is_coarray): Update - because of DIMEN_THIS_IMAGE.
395         * expr.c (gfc_is_coindexed): Ditto.
396         * gfortran.h (gfc_array_ref_dimen_type): Add DIMEN_THIS_IMAGE.
397         * interface.c (compare_parameter): Use gfc_expr_attr and
398         gfc_is_coindexed.
399         * resolve.c (check_dimension, compare_spec_to_ref,
400         resolve_allocate_expr, check_data_variable): Update for
401         DIMEN_THIS_IMAGE.
402         * simplify.c (gfc_simplify_lcobound, gfc_simplify_this_image,
403         gfc_simplify_ucobound): Allow non-constant bounds.
404         * trans-array.c (gfc_set_loop_bounds_from_array_spec,
405         gfc_trans_create_temp_array, gfc_trans_constant_array_constructor,
406         gfc_set_vector_loop_bounds, gfc_conv_array_index_offset,
407         gfc_start_scalarized_body, gfc_trans_scalarizing_loops,
408         gfc_trans_scalarized_loop_boundary, gfc_conv_section_startstride,
409         gfc_conv_ss_startstride, gfc_conv_loop_setup,
410         gfc_trans_array_bounds, gfc_conv_expr_descriptor,
411         gfc_walk_variable_expr): Handle codimen.
412         * trans-decl.c (gfc_build_qualified_array): Save cobounds.
413         * trans-intrinsic.c (gfc_conv_intrinsic_bound): Use arg2.
414         (conv_intrinsic_cobound): New function.
415         (gfc_conv_intrinsic_function): Call it.
416         (gfc_walk_intrinsic_function, gfc_add_intrinsic_ss_code): Handle
417         ucobound, lcobound, this_image.
418         * fortran/trans-types.c (gfc_build_array_type): Save cobounds.
419         (gfc_get_dtype): Honour corank.
420         (gfc_get_nodesc_array_type): Save corank and codimensions.
421         (gfc_get_array_type_bounds): Save cobound.
422         * fortran/trans.h (gfc_ss_info,gfc_loopinfo): Add codimen item.
423         (gfc_array_kind): Add corank item.
424         (GFC_TYPE_ARRAY_CORANK): New macro.
425
426 2011-04-03  Kai Tietz  <ktietz@redhat.com>
427
428         PR middle-end/48422
429         * Make-lang.in (f95-lang.o): Add some missing dependencies.
430
431 2011-04-01  Thomas Koenig  <tkoenig@gcc.gnu.org>
432
433         PR fortran/48352
434         * frontend-passes (cfe_register_funcs):  Don't
435         register functions if they appear as iterators in DO loops.
436
437 2011-03-30  Michael Matz  <matz@suse.de>
438
439         PR fortran/47516
440         * trans-expr.c (realloc_lhs_loop_for_fcn_call): Take loop as parameter,
441         don't use local variable.
442         (gfc_trans_arrayfunc_assign): Adjust caller.
443
444 2011-03-29  Janus Weil  <janus@gcc.gnu.org>
445
446         PR fortran/48095
447         * decl.c (match_procedure_decl,match_ppc_decl): Set flavor of interface.
448         * module.c (MOD_VERSION): Bump.
449         (mio_typespec): Read/write 'interface' field.
450         * primary.c (match_string_constant,match_logical_constant): Remove
451         unneeded code.
452         (match_complex_constant): Make sure to clear the typespec.
453
454 2011-03-29  Thomas Koenig  <tkoenig@gcc.gnu.org>
455
456         * frontend-passes.c (create_var):  Warn about creating an
457         array temporary if requested.
458
459 2011-03-27  Thomas Koenig  <tkoenig@gcc.gnu.org>
460
461         PR fortran/47065
462         * frontend-passes.c (optimize_trim): Also follow references, except
463         when they are substring references or array references.
464
465 2011-03-27  Tobias Burnus  <burnus@net-b.de>
466
467         PR fortran/18918
468         * gfortran.h (gfc_isym_id): Rename GFC_ISYM_NUMIMAGES to
469         GFC_ISYM_NUM_IMAGES.
470         (gfc_fcoarray): Add GFC_FCOARRAY_LIB.
471         * intrinsic.c (add_functions): Update due to GFC_ISYM_NUM_IMAGES
472         rename.
473         * invoke.texi (-fcoarray=): Document "lib" argument.
474         * iresolve.c (gfc_resolve_this_image): Fix THIS IMAGE().
475         * libgfortran.h (libgfortran_stat_codes): Add comments.
476         * options.c (gfc_handle_coarray_option): Add -fcoarray=lib.
477         * simplify.c (gfc_simplify_num_images, gfc_simplify_this_image):
478         Handle GFC_FCOARRAY_LIB.
479         * trans.h (gfc_init_coarray_decl): New prototype.
480         (gfor_fndecl_caf_init, gfor_fndecl_caf_finalize,
481         gfor_fndecl_caf_critical, gfor_fndecl_caf_end_critical,
482         gfor_fndecl_caf_sync_all, gfor_fndecl_caf_sync_images,
483         gfor_fndecl_caf_error_stop, gfor_fndecl_caf_error_stop_str,
484         gfort_gvar_caf_num_images, gfort_gvar_caf_this_image):
485         New global variables.
486         * trans-decl.c: Declare several CAF functions (cf. above).
487         (gfc_build_builtin_function_decls): Initialize those.
488         (gfc_init_coarray_decl): New function.
489         (create_main_function): Call CAF init/finalize functions.
490         * trans-intrinsic.c (trans_this_image, trans_num_images): New.
491         (gfc_conv_intrinsic_function): Call those.
492         * trans-stmt.c (gfc_trans_stop, gfc_trans_sync, gfc_trans_critical):
493         Add code for GFC_FCOARRAY_LIB.
494
495 2011-03-26  Janus Weil  <janus@gcc.gnu.org>
496
497         PR fortran/48291
498         * class.c (get_unique_hashed_string): Adjust maximum allowable length
499         for unique type string.
500
501 2011-03-25  Kai Tietz  <ktietz@redhat.com>
502
503         * scanner.c (preprocessor_line): Use filename_cmp
504         instead of strcmp.
505
506 2011-03-25  Tobias Burnus  <burnus@net-b.de>
507
508         PR fortran/48174
509         PR fortran/45304
510         * trans-types.c (gfc_get_function_type): Don't use varargs if the
511         procedure is known to have no arguments.
512
513 2010-03-21  Thomas Koenig  <tkoenig@gcc.gnu.org>
514
515         PR fortran/22572
516         * gfortran.h (gfc_option_t) : Add
517         flag_aggressive_function_elimination.
518         (gfc_dep_compare_functions):  Add prototype.
519         * lang.opt: Add faggressive-function-elimination.
520         * invoke.texi: Document -faggressive-function-elimination.
521         * frontend_passes (expr_array):  New static variable.
522         (expr_size):  Likewise.
523         (expr_count):  Likewise.
524         (current_code):  Likewise.
525         (current_ns):  Likewise.
526         (gfc_run_passes):  Allocate and free space for expressions.
527         (cfe_register_funcs):  New function.
528         (create_var):  New function.
529         (cfc_expr_0):  New function.
530         (cfe_code):  New function.
531         (optimize_namespace):  Invoke gfc_code_walker with cfe_code
532         and cfe_expr_0.
533         * dependency.c (gfc_dep_compare_functions):  New function.
534         (gfc_dep_compare_expr):  Use it.
535         * options.c (gfc_init_options):  Handle
536         flag_aggressive_function_elimination.
537         (gfc_handle_option):  Likewise.
538
539 2011-03-15  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
540
541         * arith.c (arith_power): Plug memory leak.
542
543 2011-03-12  Janus Weil  <janus@gcc.gnu.org>
544
545         PR fortran/48059
546         * trans-expr.c (gfc_apply_interface_mapping_to_expr): Replace base type
547         for polymorphic arguments.
548
549 2011-03-12  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
550
551         PR fortran/48054
552         * intrinsic.texi: Clarify doc of logarithm functions.
553
554 2011-03-12  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
555
556         PR fortran/47552
557         * trans-intrinsic.c (gfc_conv_intrinsic_ctime): Fix type of
558         the string length variable.
559
560 2011-03-11  Janus Weil  <janus@gcc.gnu.org>
561
562         PR fortran/47768
563         * module.c (ab_attribute,attr_bits): Add AB_PROC_POINTER_COMP.
564         (mio_symbol_attribute): Handle attribute 'proc_pointer_comp'.
565
566 2011-03-06  Paul Thomas  <pault@gcc.gnu.org>
567             Jerry DeLisle  <jvdelisle@gcc.gnu.org>
568
569         PR fortran/47850
570         * expr.c (gfc_is_constant_expr): Only use gfc_constant_ac if
571         the expression has an iterator.  Otherwise, iterate through the
572         array, checking for constant expressions for each element.
573
574 2011-03-04  Janne Blomqvist  <jb@gcc.gnu.org>
575
576         PR libfortran/47802
577         * intrinsic.texi: Update CTIME and FDATE documentation.
578
579 2011-03-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
580
581         * invoke.texi (Option Summary, Fortran Dialect Options)
582         (Preprocessing Options, Runtime Options, Code Gen Options):
583         Fix vertical list spacing by using @itemx for additinoal
584         items, empty line before @table.  Fix typos.
585
586 2011-02-28  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
587
588         PR fortran/47894
589         * intrinsic.texi: Fix doc of the VERIFY intrinsic.
590
591 2011-02-26  Tobias Burnus  <burnus@net-b.de>
592
593         PR fortran/47846
594         * trans-stmt.c (gfc_trans_allocate): Fix allocation with
595         type-spec of deferred-length strings.
596
597 2011-02-26  Tobias Burnus  <burnus@net-b.de>
598
599         PR fortran/47886
600         * openmp.c (gfc_resolve_omp_directive): Resolve if()
601         condition of OpenMP's task.
602
603 2011-02-26  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
604
605         PR fortran/47894
606         * intrinsic.texi: Fix doc of the VERIFY intrinsic.
607
608 2011-02-24  Tobias Burnus  <burnus@net-b.de>
609
610         PR fortran/47872
611         * intrinsic.texi (ALLOCATED, ATAN, BESSEL_JN, BESSEL_YN): Add
612         multitable for linebreak between different syntax variants.
613
614 2011-02-24  Richard Guenther  <rguenther@suse.de>
615
616         PR fortran/47839
617         * f95-lang.c (pushdecl): For externs in non-global scope push
618         a copy of the decl into the BLOCK.
619
620 2011-02-23  Mikael Morin  <mikael@gcc.gnu.org>
621
622         PR fortran/40850
623         * trans.c (gfc_prepend_expr_to_block): New function.
624         * trans.h (gfc_prepend_expr_to_block): Declare.
625         * trans-array.c (gfc_conv_array_parameter): Replace
626         gfc_add_expr_to_block with gfc_prepend_expr_to_block.
627
628 2011-02-22  Paul Thomas  <pault@gcc.gnu.org>
629
630         PR fortran/45743
631         * trans-decl.c (gfc_get_extern_function_decl): Don't use the
632         gsymbol backend_decl if the procedure has a formal argument
633         that is a procedure.
634
635 2011-02-22  Tobias Burnus  <burnus@net-b.de>
636
637         PR fortran/41359
638         * trans-stmt.c (gfc_trans_if_1): Use correct line for
639         expressions in the if condition.
640
641 2011-02-20  Tobias Burnus  <burnus@net-b.de>
642
643         PR fortran/47797
644         * trans-decl.c (gfc_trans_deferred_vars): Use gfc_set_backend_locus and
645         gfc_restore_backend_locus to have better debug locations.
646         * trans-array.c (gfc_trans_deferred_array): Ditto.
647
648 2011-02-20  Paul Thomas  <pault@gcc.gnu.org>
649
650         PR fortran/45077
651         PR fortran/44945
652         * trans-types.c (gfc_get_derived_type): Remove code that looks
653         for decls in gsym and add call to gfc_get_module_backend_decl.
654         * trans.h : Add prototype for gfc_get_module_backend_decl.
655         * trans-decl.c (gfc_get_module_backend_decl): New function.
656         (gfc_get_symbol_decl): Call it.
657
658 2011-02-19  Paul Thomas  <pault@gcc.gnu.org>
659
660         PR fortran/47348
661         * trans-array.c (get_array_ctor_all_strlen): Move up in file.
662         (get_array_ctor_var_strlen): Add block dummy and add call to
663         get_array_ctor_all_strlen instead of giving up on substrings.
664         Call gcc_unreachable for default case.
665         (get_array_ctor_strlen): Add extra argument to in call to
666         get_array_ctor_var_strlen.
667
668 2011-02-18  Janus Weil  <janus@gcc.gnu.org>
669
670         PR fortran/47789
671         * primary.c (gfc_match_structure_constructor): Handle empty parent
672         types.
673
674 2011-02-18  Tobias Burnus
675
676         PR fortran/47775
677         * trans-expr.c (arrayfunc_assign_needs_temporary): Use
678         esym to check whether the specific procedure returns an
679         allocatable or pointer.
680
681 2011-02-18  Michael Matz  <matz@suse.de>
682
683         PR fortran/45586
684         * gfortran.h (struct gfc_component): Add norestrict_decl member.
685         * trans.h (struct lang_type): Add nonrestricted_type member.
686         * trans-expr.c (gfc_conv_component_ref): Search fields with correct
687         parent type.
688         * trans-types.c (mirror_fields, gfc_nonrestricted_type): New.
689         (gfc_sym_type): Use it.
690
691 2011-02-18  Janus Weil  <janus@gcc.gnu.org>
692
693         PR fortran/47768
694         * resolve.c (resolve_transfer): Reject variables with procedure pointer
695         components.
696
697 2011-02-18  Janus Weil  <janus@gcc.gnu.org>
698
699         PR fortran/47767
700         * gfortran.h (gfc_check_access): Removed prototype.
701         (gfc_check_symbol_access): Added prototype.
702         * module.c (gfc_check_access): Renamed to 'check_access', made static.
703         (gfc_check_symbol_access): New function, basically a shortcut for
704         'check_access'.
705         (write_dt_extensions,write_symbol0,write_generic,write_symtree): Use
706         'gfc_check_symbol_access'.
707         (write_operator,write_module): Renamed 'gfc_check_access'.
708         * resolve.c (resolve_fl_procedure,resolve_fl_derived,
709         resolve_fl_namelist,resolve_symbol,resolve_fntype): Use
710         'gfc_check_symbol_access'.
711
712 2011-02-16  Janus Weil  <janus@gcc.gnu.org>
713
714         PR fortran/47745
715         * class.c (gfc_build_class_symbol): Set 'class_ok' attribute.
716         * decl.c (build_sym,attr_decl1): Move setting of 'class_ok' into
717         'gfc_build_class_symbol'.
718         (gfc_match_decl_type_spec): Reject unlimited polymorphism.
719         * interface.c (matching_typebound_op): Check for 'class_ok' attribute.
720         * match.c (select_type_set_tmp): Move setting of 'class_ok' into
721         'gfc_build_class_symbol'.
722         * primary.c (gfc_variable_attr): Check for 'class_ok' attribute.
723
724 2011-02-15  Steven G. Kargl  <kargl@gcc.gnu.org>
725
726         PR fortran/47633
727         . simplify.c (gfc_simplify_compiler_version): Fix off-by-one issue.
728
729 2011-02-14  Janus Weil  <janus@gcc.gnu.org>
730
731         PR fortran/47730
732         * parse.c (gfc_build_block_ns): Commit 'block@' symbol.
733
734 2011-02-14  Janus Weil  <janus@gcc.gnu.org>
735
736         PR fortran/47728
737         * class.c (gfc_build_class_symbol): Give a fatal error on polymorphic
738         arrays.
739         * primary.c (gfc_match_varspec): Avoid ICE for invalid class
740         declaration.
741
742 2011-02-14  Janus Weil  <janus@gcc.gnu.org>
743
744         PR fortran/47349
745         * interface.c (get_expr_storage_size): Handle derived-type components.
746
747 2011-02-13  Tobias Burnus  <burnus@net-b.de>
748
749         PR fortran/47569
750         * interface.c (compare_parameter): Avoid ICE with
751         character components.
752
753 2011-02-12  Janus Weil  <janus@gcc.gnu.org>
754
755         * class.c (gfc_build_class_symbol): Reject polymorphic arrays.
756         * decl.c (build_sym,build_struct,attr_decl1): Use return value of
757         'gfc_build_class_symbol'.
758
759 2011-02-12  Michael Matz  <matz@suse.de>
760             Janus Weil  <janus@gcc.gnu.org>
761             Tobias Burnus  <burnus@net-b.de>
762
763         PR fortran/45586
764         * trans-expr.c (conv_parent_component_references): Avoid unintendent
765         skipping of parent compounds.
766
767 2011-02-11  Tobias Burnus  <burnus@net-b.de>
768
769         PR fortran/47550
770         * resolve.c (resolve_formal_arglist): PURE with VALUE
771         and no INTENT: Add -std= diagnostics.
772
773 2011-02-09  Janus Weil  <janus@gcc.gnu.org>
774
775         PR fortran/47352
776         * resolve.c (resolve_procedure_interface): If interface has a result
777         variable, copy the typespec and set result pointer to self.
778
779 2011-02-09  Janus Weil  <janus@gcc.gnu.org>
780
781         PR fortran/47463
782         * resolve.c (resolve_typebound_subroutine): Remove erroneous line.
783
784 2011-02-09  Janus Weil  <janus@gcc.gnu.org>
785
786         PR fortran/47637
787         * trans-decl.c (init_intent_out_dt): Handle CLASS arguments.
788
789 2011-02-08  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
790
791         * io.c (match_io_element): Do not set dt if not inquire.
792
793 2011-02-08  Janus Weil  <janus@gcc.gnu.org>
794
795         PR fortran/45290
796         * expr.c (gfc_check_assign_symbol): Reject pointers as pointer
797         initialization target.
798
799 2011-02-07  Janne Blomqvist  <jb@gcc.gnu.org>
800             Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
801
802         * gfortran.texi (Thread-safety): texinfo styling fixes.
803         * intrinsic.texi: Likewise.
804
805 2011-02-06  Janne Blomqvist  <jb@gcc.gnu.org>
806
807         * gfortran.texi (Compiler Characteristics): Add reference to
808         thread-safety section.
809
810 2011-02-06  Janne Blomqvist  <jb@gcc.gnu.org>
811
812         * gfortran.texi (Thread-safety): New section.
813         * intrinsic.texi (EXECUTE_COMMAND_LINE): Mention thread-safety.
814         (GETENV): Likewise.
815         (GET_ENVIRONMENT_VARIABLE): Likewise.
816         (SYSTEM): Likewise.
817
818 2011-02-06  Paul Thomas  <pault@gcc.gnu.org>
819
820         PR fortran/47592
821         * trans-stmt.c (gfc_trans_allocate): For deferred character
822         length allocations with SOURCE, store to the values and string
823         length to avoid calculating twice.  Replace gfc_start_block
824         with gfc_init_block to avoid unnecessary contexts and to keep
825         declarations of temporaries where they should be. Tidy up the
826         code a bit.
827
828 2011-02-05  Janne Blomqvist  <jb@gcc.gnu.org>
829
830         PR fortran/42434
831         * intrinsic.texi (SYSTEM_CLOCK): Update documentation.
832
833 2011-02-02  Janus Weil  <janus@gcc.gnu.org>
834             Paul Thomas  <pault@gcc.gnu.org>
835
836         PR fortran/47082
837         * trans-expr.c (gfc_trans_class_init_assign): Add call to
838         gfc_get_derived_type.
839         * module.c (read_cleanup): Do not use unique_symtrees for vtabs
840         or vtypes.
841
842 2011-02-02  Janus Weil  <janus@gcc.gnu.org>
843
844         PR fortran/47572
845         * resolve.c (resolve_fl_variable): Handle polymorphic allocatables.
846
847 2011-02-01  Janus Weil  <janus@gcc.gnu.org>
848
849         PR fortran/47565
850         * trans-expr.c (gfc_conv_structure): Handle constructors for procedure
851         pointer components with allocatable result.
852
853 2011-01-31  Janus Weil  <janus@gcc.gnu.org>
854
855         PR fortran/47455
856         * trans-expr.c (gfc_conv_procedure_call): Handle procedure pointers
857         with pointer or allocatable result.
858
859 2011-01-31  Paul Thomas  <pault@gcc.gnu.org>
860
861         PR fortran/47519
862         * trans-stmt.c (gfc_trans_allocate): Improve handling of
863         deferred character lengths with SOURCE.
864         * iresolve.c (gfc_resolve_repeat): Calculate character
865         length from source length and ncopies.
866         * dump-parse-tree.c (show_code_node): Show MOLD and SOURCE
867         expressions for ALLOCATE.
868
869 2011-01-31  Janus Weil  <janus@gcc.gnu.org>
870
871         PR fortran/47463
872         * resolve.c (resolve_typebound_subroutine): Bug fix for the case of
873         an argument of a typebound assignment being a component.
874
875 2011-01-31  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
876
877         * gfortranspec.c (add_arg_libgfortran) [HAVE_LD_STATIC_DYNAMIC] Use
878         LD_STATIC_OPTION, LD_DYNAMIC_OPTION.
879
880 2011-01-31  Tobias Burnus  <burnus@net-b.de>
881
882         PR fortran/47042
883         * resolve.c (resolve_fl_procedure): Reject stmt functions
884         with pointer/allocatable attribute.
885
886 2011-01-31  Tobias Burnus  <burnus@net-b.de>
887
888         PR fortran/47042
889         * interface.c (gfc_procedure_use): Add explicit interface check for
890         pointer/allocatable functions.
891
892 2011-01-30  Paul Thomas  <pault@gcc.gnu.org>
893
894         PR fortran/47523
895         * trans-expr.c (gfc_trans_assignment_1): If the rhs is an op
896         expr and is assigned to a deferred character length scalar,
897         make sure that the function is called before reallocation,
898         so that the length is available. Include procedure pointer
899         and procedure pointer component rhs as well.
900
901         PR fortran/45170
902         PR fortran/35810
903         PR fortran/47350
904         * gfortran.dg/allocatable_function_5.f90: New test not added by
905         mistake on 2011-01-28.
906
907 2011-01-29  Tobias Burnus  <burnus@net-b.de>
908
909         PR fortran/47531
910         * check.c (gfc_check_shape): Support kind argument in SHAPE.
911         * intrinsic.c (add_functions): Ditto.
912         * resolve.c (gfc_resolve_shape): Ditto.
913         * simplify.c (gfc_simplify_shape): Ditto.
914         * intrinsic.h (gfc_check_shape, gfc_resolve_shape,
915         gfc_simplify_shape): Update prototypes.
916         * intrinisc.text (SHAPE): Document kind argument.
917
918 2011-01-28  Tobias Burnus  <burnus@net-b.de>
919
920         PR fortran/47507
921         * resolve.c (resolve_formal_arglist): Allow arguments with VALUE
922         attribute also without INTENT.
923
924 2011-01-28  Tobias Burnus  <burnus@net-b.de>
925
926         * gfortran.texi (Fortran 2003 status): Mention support for
927         nonconstant namelist variables.
928
929 2011-01-28  Paul Thomas  <pault@gcc.gnu.org>
930             Tobias Burnus  <burnus@gcc.gnu.org>
931
932         PR fortran/45170
933         PR fortran/35810
934         PR fortran/47350
935         * interface.c (compare_actual_formal): An allocatable or pointer
936         deferred length actual is only allowed if the formal argument
937         is also deferred length. Clean up whitespace.
938         * trans-expr.c (gfc_conv_procedure_call): Pass string length for
939         deferred character length formal arguments by reference. Do the
940         same for function results.
941         (gfc_trans_pointer_assignment): Do not do runtime check of lhs
942         and rhs character lengths, if deferred length lhs.  In this case
943         set the lhs character length to that of the rhs.
944         (gfc_conv_string_parameter): Remove assert that string length is
945         an integer type.
946         (is_scalar_reallocatable_lhs): New function.
947         (alloc_scalar_allocatable_for_assignment): New function.
948         (gfc_trans_assignment_1): Call above new function. If the rhs is
949         a deferred character length itself, makes ure that the function
950         is called before reallocation, so that the length is available.
951         (gfc_trans_asssignment): Remove error about assignment to
952         deferred length character variables.
953         * gfortran.texi : Update entry about (re)allocation on
954         assignment.
955         * trans-stmt.c (gfc_trans_allocate): Add code to handle deferred
956         length character variables.
957         * module.c (mio_typespec): Transfer deferred characteristic.
958         * trans-types.c (gfc_get_function_type): New code to generate
959         hidden typelist, so that those character lengths that are
960         passed by reference get the right type.
961         * resolve.c (resolve_contained_fntype): Supress error for
962         deferred character length functions.
963         (resolve_function, resolve_fl_procedure) The same.
964         (check_symbols): Remove the error that support for
965         entity with deferred type parameter is not yet implemented.
966         (resolve_fl_derived): The same.
967         match.c (alloc_opt_list): Allow MOLD for deferred length object.
968         * trans-decl.c (gfc_get_symbol_decl): For deferred character
969         length dummies, generate a local variable for string length.
970         (create_function_arglist): Hidden length can be a pointer.
971         (gfc_trans_deferred_vars): For deferred character length
972         results and dummies, assign the string length to the local
973         variable from the hidden argument on entry and the other way
974         round on exit, as appropriate.
975
976 2011-01-27  Tobias Burnus  <burnus@net-b.de>
977
978         PR fortran/47474
979         * trans-decl.c (gfc_generate_function_code): Fix init
980         of allocatable result variable with allocatable components.
981
982 2011-01-27  Tobias Burnus  <burnus@net-b.de>
983
984         PR fortran/47472
985         * options.c (gfc_handle_module_path_options): Save
986         module path without trailing slash as include path.
987
988 2011-01-25  Tobias Burnus  <burnus@net-b.de>
989
990         PR fortran/47448
991         * interface.c (gfc_check_operator_interface): Fix
992         defined-assignment check.
993
994 2011-01-23  Tobias Burnus  <burnus@net-b.de>
995
996         PR fortran/47421
997         * trans-decl.c (gfc_trans_deferred_vars): Do not nullify
998         scalar allocatable dummy arguments.
999
1000 2011-01-22  Thomas Koenig  <tkoenig@gcc.gnu.org>
1001
1002         PR fortran/38536
1003         * resolve.c (gfc_iso_c_func_interface):  For C_LOC,
1004         check for array sections followed by component references
1005         which are illegal.  Also check for coindexed arguments.
1006
1007 2011-01-22  Tobias Burnus  <burnus@net-b.de>
1008
1009         PR fortran/47399
1010         * primary.c (gfc_match_varspec): Relax gcc_assert to allow for
1011         PARAMETER TBP.
1012
1013 2011-01-21  Tobias Burnus  <burnus@net-b.de>
1014
1015         PR fortran/47394
1016         * error.c (gfc_error_now, gfc_fatal_error, gfc_error_check):
1017         Use defined instead of magic number exit status codes.
1018         * scanner.c (include_line, gfc_new_file): Ditto.
1019
1020 2011-01-21  Tobias Burnus  <burnus@net-b.de>
1021
1022         PR fortran/47377
1023         * expr.c (gfc_check_pointer_assign): Reject expr data-targets
1024         without pointer attribute.
1025
1026 2011-01-18  Janus Weil  <janus@gcc.gnu.org>
1027
1028         PR fortran/47240
1029         * resolve.c (expression_rank): Fix rank of procedure poiner components.
1030         * trans-expr.c (gfc_conv_procedure_call): Take care of procedure
1031         pointer components as actual arguments.
1032
1033 2011-01-17  Jakub Jelinek  <jakub@redhat.com>
1034
1035         PR fortran/47331
1036         * gfortran.h (struct gfc_omp_saved_state): New type.
1037         (gfc_omp_save_and_clear_state, gfc_omp_restore_state): New prototypes.
1038         * resolve.c (resolve_global_procedure): Call it around gfc_resolve
1039         call.
1040         * openmp.c (gfc_omp_save_and_clear_state, gfc_omp_restore_state): New
1041         functions.
1042
1043 2011-01-17  Tobias Burnus  <burnus@net-b.de>
1044
1045         PR fortran/47327
1046         * invoke.texi (Options to request or suppress errors
1047         and warnings): Fix cross link.
1048
1049 2011-01-15  Tobias Burnus  <burnus@net-b.de>
1050
1051         * gfortran.texi: Update Fortran 2003 Status section.
1052
1053         PR fortran/47177
1054         * invoke.texi: Add missing "-E" to the -dM example.
1055
1056 2011-01-13  Tobias Burnus  <burnus@net-b.de>
1057
1058         PR fortran/47268
1059         * intrinsic.texi (get_command_argument, get_environment_variable):
1060         Mark arguments as optional in the Arguments section.
1061
1062 2011-01-13  Kai Tietz  <kai.tietz@onevision.com>
1063             Tobias Burnus  <burnus@net-b.de>
1064
1065         PR fortran/47260
1066         * trans-decl.c (gfc_get_extern_function_decl,
1067         build_function_decl): Set TREE_PUBLIC/TREE_EXTERNAL before
1068         calling decl_attributes.
1069
1070 2011-01-13  Tobias Burnus  <burnus@net-b.de>
1071             Mikael Morin  <mikael@gcc.gnu.org>
1072
1073         PR fortran/45848
1074         PR fortran/47204
1075         * gfortran.h (gfc_code): Move union ext's case_list into
1076         the struct block.
1077         * dump-parse-tree.c (show_code_node): Adapt by prefixing case_list
1078         by "block.".
1079         * frontend-passes.c (gfc_code_walker): Ditto.
1080         * match.c (gfc_match_goto, gfc_match_call, gfc_match_case,
1081         gfc_match_type_is, gfc_match_class_is): Ditto.
1082         * resolve.c (resolve_select, resolve_select_type): Ditto.
1083         * st.c (gfc_free_statement): Ditto.
1084         * trans-stmt.c (gfc_trans_integer_select, gfc_trans_logical_select,
1085         gfc_trans_character_select): Ditto.
1086         * parse.c (resolve_all_program_units): For error recovery, avoid
1087         segfault is proc_name is NULL.
1088
1089 2011-01-11  Paul Thomas  <pault@gcc.gnu.org>
1090
1091         PR fortran/47051
1092         * trans-array.c (gfc_alloc_allocatable_for_assignment): Change
1093         to be standard compliant by testing for shape rather than size
1094         before skipping reallocation. Improve comments.
1095
1096 2011-01-09  Janus Weil  <janus@gcc.gnu.org>
1097
1098         PR fortran/47224
1099         * resolve.c (resolve_actual_arglist): Remove unneeded and buggy piece
1100         of code.
1101
1102 2011-01-09  Thomas Koenig  <tkoenig@gcc.gnu.org>
1103
1104         PR fortran/38536
1105         * resolve.c (is_scalar_expr_ptr):  For a substring reference,
1106         use gfc_dep_compare_expr to compare start and end expession.
1107         Add FIXME for using gfc_deb_compare_expr elsewhere.
1108
1109 2011-01-09  Janus Weil  <janus@gcc.gnu.org>
1110
1111         PR fortran/46313
1112         * class.c (get_unique_type_string): Make type name start with upper
1113         case letter.
1114
1115 2011-01-08  Thomas Koenig  <tkoenig@gcc.gnu.org>
1116
1117         PR fortran/46405
1118         * invoke.texi:  Mention -ffree-line-length-none and
1119         -ffixed-line-length-none for preprocessing.
1120
1121 2011-01-08  Paul Thomas  <pault@gcc.gnu.org>
1122
1123         PR fortran/46896
1124         * trans-expr.c (gfc_conv_procedure_call): With a non-copying
1125         procedure argument (eg TRANSPOSE) use a temporary if there is
1126         any chance of aliasing due to host or use association.
1127         (arrayfunc_assign_needs_temporary): Correct logic for function
1128         results and do not use a temporary for implicitly PURE
1129         variables.  Use a temporary for Cray pointees.
1130         * symbol.c (gfc_add_save): Explicit SAVE not compatible with
1131         implicit pureness of containing procedure.
1132         * decl.c (match_old_style_init, gfc_match_data): Where decl
1133         would fail in PURE procedure, set implicit_pure to zero.
1134         * gfortran.h : Add implicit_pure to structure symbol_attr and
1135         add prototype for function gfc_implicit_pure.
1136         * expr.c (gfc_check_pointer_assign, gfc_check_vardef_context):
1137         Where decl would fail in PURE procedure, reset implicit_pure.
1138         * io.c (match_vtag, gfc_match_open, gfc_match_close,
1139         gfc_match_print, gfc_match_inquire, gfc_match_wait): The same.
1140         * match.c (gfc_match_critical, gfc_match_stopcode,
1141         sync_statement, gfc_match_allocate, gfc_match_deallocate): The
1142         same.
1143         * parse.c (decode_omp_directive): The same.
1144         (parse_contained): If not PURE, set implicit pure attribute.
1145         * resolve.c (resolve_formal_arglist, resolve_structure_cons,
1146         resolve_function, resolve_ordinary_assign) : The same.
1147         (gfc_implicit_pure): New function.
1148         * module.c (mio_symbol_attribute): Introduce AB_IMPLICIT_PURE
1149         to ab_attribute enum and use it in this function.
1150
1151 2011-01-08  Thomas Koenig  <tkoenig@gcc.gnu.org>
1152
1153         PR fortran/45777
1154         * symbol.c (gfc_symbols_could_alias):  Strip gfc_ prefix,
1155         make static and move in front of its only caller, to ...
1156         * trans-array.c (symbols_could_alias): ... here.
1157         Pass information about pointer and target status as
1158         arguments.  Allocatable arrays don't alias anything
1159         unless they have the POINTER attribute.
1160         (gfc_could_be_alias):  Keep track of pointer and target
1161         status when following references.  Also check if typespecs
1162         of components match those of other components or symbols.
1163
1164 2011-01-07  Tobias Burnus  <burnus@net-b.de>
1165
1166         PR fortran/41580
1167         * class.c (gfc_build_class_symbol): Mark __vtab as attr.vtab.
1168         * intrinsic.c (add_functions): Use simplify functions for
1169         EXTENDS_TYPE_OF and SAME_TYPE_AS.
1170         * intrinsic.h (gfc_simplify_extends_type_of,
1171         gfc_simplify_same_type_as): New prototypes.
1172         * simplify.c (is_last_ref_vtab, gfc_simplify_extends_type_of,
1173         gfc_simplify_same_type_as): New functions.
1174
1175 2011-01-07  Janus Weil  <janus@gcc.gnu.org>
1176
1177         PR fortran/47189
1178         PR fortran/47194
1179         * gfortran.h (gfc_lval_expr_from_sym): Moved prototype.
1180         * class.c (gfc_class_null_initializer): Initialize _vptr to declared
1181         type.
1182         * expr.c (gfc_lval_expr_from_sym): Moved here from symbol.c.
1183         * resolve.c (resolve_deallocate_expr): _data component will be added
1184         at translation stage.
1185         * symbol.c (gfc_lval_expr_from_sym): Moved to expr.c.
1186         * trans-stmt.c (gfc_trans_deallocate): Reset _vptr to declared type.
1187
1188 2011-01-06  Daniel Franke  <franke.daniel@gmail.com>
1189
1190         PR fortran/33117
1191         PR fortran/46478
1192         * parse.c (parse_interface): Remove check for procedure types.
1193         * interface.c (check_interface0): Verify that procedures are
1194         either all SUBROUTINEs or all FUNCTIONs.
1195
1196 2011-01-05  Janus Weil  <janus@gcc.gnu.org>
1197
1198         PR fortran/47180
1199         * trans-expr.c (gfc_trans_class_assign): Bugfix for r168524 (make sure
1200         'vtab' is initialized).
1201
1202 2011-01-05  Janus Weil  <janus@gcc.gnu.org>
1203
1204         PR fortran/47180
1205         * trans-expr.c (gfc_trans_class_assign): For a polymorphic NULL pointer
1206         assignment, set the _vptr component to the declared type.
1207
1208 2011-01-05  Thomas Koenig  <tkoenig@gcc.gnu.org>
1209
1210         PR fortran/46017
1211         * resolve.c (resolve_allocate_deallocate): Follow references to
1212         check for duplicate occurence of allocation/deallocation objects.
1213
1214 2011-01-05  Janus Weil  <janus@gcc.gnu.org>
1215
1216         PR fortran/47024
1217         * trans-decl.c (gfc_trans_deferred_vars): Initialize the _vpr component
1218         of polymorphic allocatables according to their declared type.
1219
1220 2011-01-04  Janus Weil  <janus@gcc.gnu.org>
1221
1222         PR fortran/46448
1223         * class.c (gfc_find_derived_vtab): Set the module field for the copying
1224         routine to make sure it receives module name mangling.
1225
1226 2011-01-03  Jakub Jelinek  <jakub@redhat.com>
1227
1228         * gfortranspec.c (lang_specific_driver): Update copyright notice
1229         dates.
1230
1231 2011-01-03  Janus Weil  <janus@gcc.gnu.org>
1232
1233         * intrinsic.texi (LEADZ): Fix example.
1234
1235 2011-01-02  Janus Weil  <janus@gcc.gnu.org>
1236
1237         PR fortran/46408
1238         * class.c (gfc_find_derived_vtab): Use EXEC_INIT_ASSIGN for __copy_
1239         routine.
1240
1241 \f
1242 Copyright (C) 2011 Free Software Foundation, Inc.
1243
1244 Copying and distribution of this file, with or without modification,
1245 are permitted in any medium without royalty provided the copyright
1246 notice and this notice are preserved.