OSDN Git Service

2011-08-07 Janus Weil <janus@gcc.gnu.org>
[pf3gnuchains/gcc-fork.git] / gcc / fortran / ChangeLog
1 2011-08-07  Janus Weil  <janus@gcc.gnu.org>
2             Thomas Koenig  <tkoenig@gcc.gnu.org>
3
4         PR fortran/49638
5         * dependency.c (are_identical_variables): For dummy arguments only
6         check for equal names, not equal symbols.
7         * interface.c (gfc_check_typebound_override): Add checking for rank
8         and character length.
9
10 2011-08-07  Janus Weil  <janus@gcc.gnu.org>
11
12         PR fortran/49638
13         * dependency.h (gfc_is_same_range,gfc_are_identical_variables): Remove
14         two prototypes.
15         * dependency.c (gfc_are_identical_variables,are_identical_variables):
16         Renamed the former to the latter and made static.
17         (gfc_dep_compare_expr): Renamed 'gfc_are_identical_variables', handle
18         commutativity of multiplication.
19         (gfc_is_same_range,is_same_range): Renamed the former to the latter,
20         made static and removed argument 'def'.
21         (check_section_vs_section): Renamed 'gfc_is_same_range'.
22         * gfortran.h (gfc_check_typebound_override): New prototype.
23         * interface.c (gfc_check_typebound_override): Moved here from ...
24         * resolve.c (check_typebound_override): ... here (and renamed).
25         (resolve_typebound_procedure): Renamed 'check_typebound_override'.
26
27 2011-08-06  Thomas Koenig  <tkoenig@gcc.gnu.org>
28
29         PR fortran/50004
30         * target-memory.c (gfc_target_expr-size): Don't clobber typespec
31         for derived types.
32         * simplify.c (gfc_simplify_transfer): Don't calculate source_size
33         twice.
34
35 2011-08-05  Thomas Koenig  <tkoenig@gcc.gnu.org>
36
37         PR fortran/37211
38         * gfortran.h (gfc_calculate_transfer_sizes):  Add prototype.
39         * target-memory.h (gfc_target_interpret_expr):  Add boolean
40         argument wether to convert wide characters.
41         * target-memory.c (gfc_target_expr_size):  Also return length
42         of characters for non-constant expressions if these can be
43         determined from the cl.
44         (interpret_array):  Add argument for gfc_target_interpret_expr.
45         (gfc_interpret_derived):  Likewise.
46         (gfc_target_interpret_expr):  Likewise.
47         * check.c:  Include target-memory.h.
48         (gfc_calculate_transfer_sizes):  New function.
49         (gfc_check_transfer):  When -Wsurprising is in force, calculate
50         sizes and warn if result is larger than size (check moved from
51         gfc_simplify_transfer).
52         * simplify.c (gfc_simplify_transfer):  Use
53         gfc_calculate_transfer_sizes.  Remove warning.
54
55 2011-08-04  Richard Guenther  <rguenther@suse.de>
56
57         PR fortran/49957
58         * trans-array.c (add_to_offset): New function.
59         (gfc_conv_array_ref): Build the array index expression in optimally
60         associated order.
61         (gfc_walk_variable_expr): Adjust for the backward walk.
62
63 2011-08-02  Daniel Kraft  <d@domob.eu>
64
65         PR fortran/49885
66         * trans-array.c (gfc_trans_auto_array_allocation): Change
67         gfc_start_block to gfc_init_block to avoid spurious extra-scope.
68
69 2011-08-02  Tobias Burnus  <burnus@net-b.de>
70
71         * trans-array.c (gfc_array_allocate): Pass token to
72           gfc_allocate_allocatable for -fcoarray=lib.
73         * trans-stmt.c (gfc_trans_allocate): Update
74         gfc_allocate_allocatable call.
75         * trans.h (gfc_allocate_allocatable): Update prototype.
76         (gfc_allocate_using_lib): Remove.
77         * trans.c (gfc_allocate_using_lib): Make static, handle token.
78         (gfc_allocate_allocatable): Ditto.
79
80 2011-08-02  Jakub Jelinek  <jakub@redhat.com>
81
82         PR fortran/46752
83         * cpp.c (cpp_define_builtins): Change _OPENMP to 201107.
84         * openmp.c (gfc_free_omp_clauses): Free also final_expr.
85         (OMP_CLAUSE_FINAL, OMP_CLAUSE_MERGEABLE): Define.
86         (gfc_match_omp_clauses): Handle parsing final and mergeable
87         clauses.
88         (OMP_TASK_CLAUSES): Allow final and mergeable clauses.
89         (gfc_match_omp_taskyield): New function.
90         (resolve_omp_clauses): Resolve final clause.  Allow POINTERs and
91         Cray pointers in clauses other than REDUCTION.
92         (gfc_match_omp_atomic): Match optional
93         read/write/update/capture keywords after !$omp atomic.
94         (resolve_omp_atomic): Handle all OpenMP 3.1 atomic forms.
95         * dump-parse-tree.c (show_omp_node): Handle EXEC_OMP_TASKYIELD,
96         print final and mergeable clauses.
97         (show_code_node): Handle EXEC_OMP_TASKYIELD.
98         * trans-openmp.c (gfc_trans_omp_clauses): Handle final and
99         mergeable clauses.
100         (gfc_trans_omp_taskyield): New function.
101         (gfc_trans_omp_directive): Handle EXEC_OMP_TASKYIELD.
102         (gfc_trans_omp_atomic): Handle all OpenMP 3.1 atomic forms.
103         (gfc_omp_clause_copy_ctor): Handle non-allocated allocatable.
104         (gfc_omp_predetermined_sharing): Adjust comment.
105         * gfortran.h (gfc_statement): Add ST_OMP_TASKYIELD and
106         ST_OMP_END_ATOMIC.
107         (gfc_omp_clauses): Add final_expr and mergeable fields.
108         (gfc_exec_op): Add EXEC_OMP_TASKYIELD.
109         (gfc_omp_atomic_op): New enum typedef.
110         (struct gfc_code): Add ext.omp_atomic.
111         * trans.c (trans_code): Handle EXEC_OMP_TASKYIELD.
112         * frontend-passes.c (gfc_code_walker): Also walk final_expr.
113         * resolve.c (gfc_resolve_blocks, resolve_code): Handle
114         EXEC_OMP_TASKYIELD.
115         * st.c (gfc_free_statement): Likewise.
116         * match.h (gfc_match_omp_taskyield): New prototype.
117         * parse.c (decode_omp_directive): Handle taskyield directive.
118         Handle !$omp end atomic.
119         (case_executable): Add ST_OMP_TASKYIELD case.
120         (gfc_ascii_statement): Handle ST_OMP_TASKYIELD.
121         (parse_omp_atomic): Return gfc_statement instead of void.
122         For !$omp atomic capture parse two assignments instead of
123         just one and require !$omp end atomic afterwards, for
124         other !$omp atomic forms just allow !$omp end atomic at the
125         end.
126         (parse_omp_structured_block, parse_executable): Adjust
127         parse_omp_atomic callers.
128
129 2011-08-02  Tobias Burnus  <burnus@net-b.de>
130
131         * intrinsic.c (OMP_LIB): Updated openmp_version's
132         value to 201107.
133         * gfortran.texi (OpenMP): Update ref to OpenMP 3.1.
134         * intrinsic.texi (OpenMP Modules): Update ref to OpenMP 3.1;
135         remove deleted omp_integer_kind and omp_logical_kind constants.
136
137 2011-07-31  Janus Weil  <janus@gcc.gnu.org>
138
139         PR fortran/49112
140         * resolve.c (resolve_structure_cons): Don't do the full dt resolution,
141         only call 'resolve_fl_derived0'.
142         (resolve_typebound_procedures): Resolve typebound procedures of
143         parent type.
144         (resolve_fl_derived0): New function, which does a part of the work
145         for 'resolve_fl_derived'.
146         (resolve_fl_derived): Call 'resolve_fl_derived0' and do some additional
147         things.
148
149 2011-07-30  Thomas Koenig  <tkoenig@gcc.gnu.org>
150
151         PR fortran/48876
152         * expr.c (gfc_simplify_expr):  If end of a string is less
153         than zero, set it to zero.
154
155 2011-07-28  Jakub Jelinek  <jakub@redhat.com>
156
157         PR fortran/31067
158         * frontend-passes.c (optimize_minmaxloc): New function.
159         (optimize_expr): Call it.
160
161 2011-07-27  Tobias Burnus  <burnus@net-b.de>
162
163         PR fortran/45586
164         * trans-types.c (gfc_get_derived_type): Ensure that pointer
165         component types are marked as nonrestricted.
166
167 2011-07-27  Daniel Carrera  <dcarrera@gmail.com>
168
169         PR fortran/49755
170         * trans.c (gfc_allocate_using_malloc): Change function signature.
171         Return nothing. New parameter "pointer". Eliminate temorary variables. 
172         (gfc_allocate_using_lib): Ditto.
173         (gfc_allocate_allocatable): Ditto. Update call to gfc_allocate_using_lib
174         and gfc_allocate_using_malloc. Do not free and then reallocate a
175         variable that is already allocated.
176         (gfc_likely): New function. Basedon gfc_unlikely.
177         * trans-array.c (gfc_array_init_size): New parameter "descriptor_block".
178         Instructions to modify the array descriptor are stored in this block
179         while other instructions continue to be stored in "pblock".
180         (gfc_array_allocate): Update call to gfc_array_init_size. Move the
181         descriptor_block so that the array descriptor is only updated if
182         the array was allocated successfully.
183         Update calls to gfc_allocate_allocatable and gfc_allocate_using_malloc.
184         * trans.h (gfc_allocate_allocatable): Change function signature.
185         Function now returns void.
186         (gfc_allocate_using_lib): Ditto, and new function parameter.
187         (gfc_allocate_using_malloc): Ditto.
188         * trans-openmp.c (gfc_omp_clause_default_ctor,
189         gfc_omp_clause_copy_ctor,gfc_trans_omp_array_reduction): Replace a call
190         to gfc_allocate_allocatable with gfc_allocate_using_malloc.
191         * trans-stmt.c (gfc_trans_allocate): Update function calls for
192         gfc_allocate_allocatable and gfc_allocate_using_malloc.
193
194 2011-07-26  Tobias Burnus  <burnus@net-b.de>
195
196         * trans-array.c (CAF_TOKEN_FIELD): New macro constant.
197         (gfc_conv_descriptor_token): New function.
198         * trans-array.h (gfc_conv_descriptor_token): New prototype.
199         * trans-types.c (gfc_get_array_descriptor_base): For coarrays
200         with -fcoarray=lib, append "void *token" to the array descriptor.
201         (gfc_array_descriptor_base_caf): New static variable.
202         * trans-expr.c (gfc_conv_procedure_call): Handle token and offset
203         when passing a descriptor coarray to a nondescriptor dummy. 
204
205 2011-07-23  Tobias Burnus  <burnus@net-b.de>
206
207         * resolve.c (resolve_symbol): Fix coarray var decl check.
208
209 2011-07-21  Daniel Carrera  <dcarrera@gmail.com>
210
211         * trans.c (gfc_allocate_with_status): Split into two functions
212         gfc_allocate_using_malloc and gfc_allocate_usig_lib.
213         (gfc_allocate_using_malloc): The status parameter is now the
214         actual status rather than a pointer. Code cleanup.
215         (gfc_allocate_using_lib): Ditto. Add new parametrs errmsg and
216         errlen. Pass these to the coarray lib.
217         * trans-openmp.c (gfc_omp_clause_default_ctor): Update calls to
218         gfc_allocate_allocatable.
219         (gfc_omp_clause_copy_ctor): Ditto.
220         (gfc_trans_omp_array_reduction): Ditto.
221         * trans-stmt.c (gfc_trans_allocate): Ditto. Update call to
222         gfc_allocate_using_malloc. Pass stat rather than pstat to the allocate
223         fuctions. If using coarray lib, pass errmsg and errlen to the allocate
224         functions. Move error checking outside the if (!gfc_array_allocate)
225         block so that it also affects trees produced by gfc_array_allocate.
226         * trans-array.c (gfc_array_allocate): Add new parameters errmsg
227         and errlen. Replace parameter pstat by status. Code cleanup. Update
228         calls to gfc_allocate_allocatable and gfc_allocate_using_malloc.
229         * trans-array.h (gfc_array_allocate): Update signature of
230         gfc_array_allocate.
231
232 2011-07-21  Steven G. Kargl  <kargl@gcc.gnu.org>
233
234         * gfortran.texi: Remove a duplicate word.
235
236 2011-07-21  Tobias Burnus  <burnus@net-b.de>
237
238         * check.c (gfc_check_present): Allow coarrays.
239         * trans-array.c (gfc_conv_array_ref): Avoid casting
240         when a pointer is wanted.
241         * trans-decl.c (create_function_arglist): For -fcoarray=lib,
242         handle hidden token and offset arguments for nondescriptor
243         coarrays.
244         * trans-expr.c (get_tree_for_caf_expr): New function.
245         (gfc_conv_procedure_call): For -fcoarray=lib pass the
246         token and offset for nondescriptor coarray dummies.
247         * trans.h (lang_type): Add caf_offset tree.
248         (GFC_TYPE_ARRAY_CAF_OFFSET): New macro.
249
250 2011-07-19  Tobias Burnus  <burnus@net-b.de>
251
252         * expr.c (gfc_is_coarray): New function.
253         * gfortran.h (gfc_is_coarray): New prototype.
254         * interface.c (compare_parameter): Use it.
255
256 2011-07-19  Richard Guenther  <rguenther@suse.de>
257
258         * trans-expr.c (fill_with_spaces): Use fold_build_pointer_plus.
259         (gfc_trans_string_copy): Likewise.
260         * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Likewise.
261         * trans-types.c (gfc_get_array_descr_info): Likewise.
262         * trans.c (gfc_build_array_ref): Likewise.
263
264 2011-07-19  Janus Weil  <janus@gcc.gnu.org>
265
266         PR fortran/49708
267         * resolve.c (resolve_allocate_expr): Fix diagnostics for pointers.
268
269 2011-07-18  Tobias Burnus  <burnus@net-b.de>
270
271         * trans-decl.c (gfc_build_qualified_array): Make coarray's
272         token TYPE_QUAL_RESTRICT.
273
274 2011-07-18  Tobias Burnus  <burnus@net-b.de>
275
276         * resolve.c (resolve_transfer): Mention defined I/O
277         in the diagnostic for alloc_comp/pointer_comp.
278
279 2011-07-17  Tobias Burnus  <burnus@net-b.de>
280
281         PR fortran/34657
282         * module.c (check_for_ambiguous): Check whether the name is matches
283         the current program unit.
284
285 2011-07-17  Tobias Burnus  <burnus@net-b.de>
286
287         PR fortran/49624
288         * expr.c (gfc_check_pointer_assign): Fix checking for invalid
289         pointer bounds.
290
291 2011-07-16  Tobias Burnus  <burnus@net-b.de>
292         
293         * expr.c (gfc_ref_this_image): New function.
294         (gfc_is_coindexed): Use it.
295         * gfortran.h (gfc_ref_this_image): New prototype.
296         * resolve.c (resolve_deallocate_expr,
297         resolve_allocate_expr): Support alloc scalar coarrays.
298         * trans-array.c (gfc_conv_array_ref, gfc_array_init_size,
299         gfc_conv_descriptor_cosize, gfc_array_allocate,
300         gfc_trans_deferred_array): Ditto.
301         * trans-expr.c (gfc_conv_variable) Ditto.:
302         * trans-stmt.c (gfc_trans_deallocate): Ditto.
303         * trans-types.c (gfc_get_element_type, gfc_get_array_type_bounds
304         gfc_get_array_descr_info): Ditto.
305         * trans-decl.c (gfc_get_symbol_decl): Ditto.
306
307 2011-07-11  Jakub Jelinek  <jakub@redhat.com>
308
309         PR fortran/49698
310         * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Initialize
311         inner_size to gfc_index_one_node instead of integer_one_node.
312
313 2011-07-10  Tobias Burnus  <burnus@net-b.de>
314
315         PR fortran/49690
316         * intrinsic.c (add_functions): Use BT_VOID for 2nd argument of SIGNAL.
317
318 2011-07-09  Uros Bizjak  <ubizjak@gmail.com>
319
320         PR fortran/48926
321         * expr.c (gfc_get_corank): Change return value to int.
322         * gfortran.h (gfc_get_corank): Update function prototype.
323
324 2011-07-07  Mikael Morin  <mikael.morin@sfr.fr>
325
326         PR fortran/49648
327         * resolve.c (resolve_symbol): Force resolution of function result's
328         array specification.
329
330 2011-07-07  Tobias Burnus  <burnus@net-b.de>
331
332         * trans.c (gfc_allocate_with_status): Call _gfortran_caf_register
333         with NULL arguments for (new) stat=/errmsg= arguments.
334
335 2011-07-06  Daniel Carrera  <dcarrera@gmail.com>
336
337         * trans-array.c (gfc_array_allocate): Rename allocatable_array to
338         allocatable. Rename function gfc_allocate_array_with_status to
339         gfc_allocate_allocatable_with_status. Update function call for
340         gfc_allocate_with_status.
341         * trans-opemp.c (gfc_omp_clause_default_ctor): Rename function
342         gfc_allocate_array_with_status to gfc_allocate_allocatable_with_status.
343         * trans-stmt.c (gfc_trans_allocate): Update function call for
344         gfc_allocate_with_status. Rename function gfc_allocate_array_with_status
345         to gfc_allocate_allocatable_with_status.
346         * trans.c (gfc_call_malloc): Add new parameter gfc_allocate_with_status
347         so it uses the library for memory allocation when -fcoarray=lib.
348         (gfc_allocate_allocatable_with_status): Renamed from
349         gfc_allocate_array_with_status.
350         (gfc_allocate_allocatable_with_status): Update function call for
351         gfc_allocate_with_status.
352         * trans.h (gfc_coarray_type): New enum.
353         (gfc_allocate_with_status): Update prototype.
354         (gfc_allocate_allocatable_with_status): Renamed from
355         gfc_allocate_array_with_status.
356         * trans-decl.c (generate_coarray_sym_init): Use the new constant
357         GFC_CAF_COARRAY_ALLOC in the call to gfor_fndecl_caf_register.
358
359 2011-07-06  Richard Guenther  <rguenther@suse.de>
360
361         * f95-lang.c (gfc_init_decl_processing):
362         Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
363
364 2011-07-04  Jakub Jelinek  <jakub@redhat.com>
365
366         PR fortran/49623
367         * gfortranspec.c (lang_specific_driver): Ignore options with
368         CL_ERR_MISSING_ARG errors.
369
370 2011-07-02  Janus Weil  <janus@gcc.gnu.org>
371
372         PR fortran/49562
373         * expr.c (gfc_check_vardef_context): Handle type-bound procedures.
374
375 2011-06-30  Jakub Jelinek  <jakub@redhat.com>
376
377         PR fortran/49540
378         * gfortran.h (gfc_constructor): Add repeat field.
379         * trans-array.c (gfc_conv_array_initializer): Handle repeat > 1.
380         * array.c (current_expand): Add repeat field.
381         (expand_constructor): Copy repeat.
382         * constructor.c (node_free, node_copy, gfc_constructor_get,
383         gfc_constructor_lookup): Handle repeat field.
384         (gfc_constructor_lookup_next, gfc_constructor_remove): New functions.
385         * data.h (gfc_assign_data_value): Add mpz_t * argument.
386         (gfc_assign_data_value_range): Removed.
387         * constructor.h (gfc_constructor_advance): Removed.
388         (gfc_constructor_lookup_next, gfc_constructor_remove): New prototypes.
389         * data.c (gfc_assign_data_value): Add REPEAT argument, handle it and
390         also handle overwriting a range with a single entry.
391         (gfc_assign_data_value_range): Removed.
392         * resolve.c (check_data_variable): Adjust gfc_assign_data_value
393         call.  Use gfc_assign_data_value instead of
394         gfc_assign_data_value_expr.
395
396 2011-06-27  Janus Weil  <janus@gcc.gnu.org>
397
398         PR fortran/49466
399         * trans-array.c (structure_alloc_comps): Make sure sub-components
400         and extended types are correctly deallocated.
401
402 2011-06-21  Andrew MacLeod  <amacleod@redhat.com>
403
404         * trans-openmp.c: Add sync_ or SYNC__ to builtin names.
405         * trans-stmt.c: Add sync_ or SYNC__ to builtin names.
406         * trans-decl.c: Add sync_ or SYNC__ to builtin names.
407
408 2011-06-21  Janus Weil  <janus@gcc.gnu.org>
409
410         PR fortran/49112
411         * class.c (gfc_find_derived_vtab): Make vtab and default initialization
412         symbols SAVE_IMPLICIT.
413
414 2011-06-20  Tobias Burnus  <burnus@net-b.de>
415
416         PR fortran/18918
417         * gfortran.h (gfc_check_vardef_context): Update prototype.
418         (iso_fortran_env_symbol): Handle derived types.
419         (symbol_attribute): Add lock_comp.
420         * expr.c (gfc_check_vardef_context): Add LOCK_TYPE check.
421         * interface.c (compare_parameter, gfc_procedure_use): Handle
422         LOCK_TYPE.
423         (compare_actual_formal): Update
424         gfc_check_vardef_context call.
425         * check.c (gfc_check_atomic_def, gfc_check_atomic_ref): Ditto.
426         * intrinsic.c (check_arglist): Ditto.
427         * io.c (resolve_tag, gfc_resolve_dt, gfc_resolve_inquire): Ditto.
428         * iso-fortran-env.def (ISOFORTRAN_LOCK_TYPE): Add.
429         * intrinsic.texi (ISO_FORTRAN_ENV): Document LOCK_TYPE.
430         * module.c (mio_symbol_attribute): Handle lock_comp.
431         (create_derived_type): New function.
432         (use_iso_fortran_env_module): Call it to handle LOCK_TYPE.
433         * parse.c (parse_derived): Add constraint check for LOCK_TYPE.
434         * resolve.c (resolve_symbol, resolve_lock_unlock): Add constraint
435         checks for LOCK_TYPE.
436         (gfc_resolve_iterator, resolve_deallocate_expr,
437         resolve_allocate_expr, resolve_code, resolve_transfer): Update
438         gfc_check_vardef_context call.
439         * trans-stmt.h (gfc_trans_lock_unlock): New prototype.
440         * trans-stmt.c (gfc_trans_lock_unlock): New function.
441         * trans.c (trans_code): Handle LOCK and UNLOCK.
442
443 2011-06-18  Janus Weil  <janus@gcc.gnu.org>
444
445         PR fortran/49400
446         * decl.c (gfc_match_procedure): Allow PROCEDURE declarations inside
447         BLOCK constructs.
448
449 2011-06-17  Janus Weil  <janus@gcc.gnu.org>
450
451         PR fortran/48699
452         * check.c (gfc_check_move_alloc): If 'TO' argument is polymorphic,
453         make sure the vtab is present.
454
455 2011-06-16  Janus Weil  <janus@gcc.gnu.org>
456
457         PR fortran/49074
458         * interface.c (gfc_extend_assign): Propagate the locus from the
459         assignment to the type-bound procedure call.
460
461 2011-06-16  Janus Weil  <janus@gcc.gnu.org>
462
463         PR fortran/49417
464         * module.c (mio_component): Make sure the 'class_ok' attribute is set
465         for use-associated CLASS components.
466         * parse.c (parse_derived): Check for 'class_ok' attribute.
467         * resolve.c (resolve_fl_derived): Ditto.
468
469 2011-06-13  Thomas Koenig  <tkoenig@gcc.gnu.org>
470
471         * frontend-passes.c (remove_trim):  New function.
472         (optimize_assignment):  Use it.
473         (optimize_comparison):  Likewise.  Return correct status
474         for previous change.
475
476 2011-06-12  Tobias Burnus
477
478         PR fortran/49324
479         * trans-expr.c (gfc_trans_assignment_1): Tell
480         gfc_trans_scalar_assign to also deep-copy RHS nonvariables
481         with allocatable components.
482         * trans-array.c (gfc_conv_expr_descriptor): Ditto.
483
484 2011-05-11  Thomas Koenig  <tkoenig@gcc.gnu.org>
485
486         * frontend-passes.c (optimize_assignment): Follow chains
487         of concatenation operators to the end for removing trailing
488         TRIMS for assignments.
489
490 2011-06-10  Daniel Carrera  <dcarrera@gmail.com>
491
492         * trans-decl.c (gfc_build_builtin_function_decls):
493         Updated declaration of caf_sync_all and caf_sync_images.
494         * trans-stmt.c (gfc_trans_sync): Function
495         can now handle a "stat" variable that has an integer type
496         different from integer_type_node.
497
498 2011-06-09  Richard Guenther  <rguenther@suse.de>
499
500         * trans.c (gfc_allocate_array_with_status): Mark error path
501         as unlikely.
502
503 2011-06-08  Tobias Burnus  <burnus@net-b.de>
504
505         PR fortran/18918
506         * gfortran.h (gfc_statement): Add ST_LOCK and ST_UNLOCK.
507         (gfc_exec_op): Add EXEC_LOCK and EXEC_UNLOCK.
508         (gfc_code): Add expr4.
509         * match.h (gfc_match_lock, gfc_match_unlock): New prototypes.
510         * match.c (gfc_match_lock, gfc_match_unlock,
511         lock_unlock_statement): New functions.
512         (sync_statement): Bug fix, avoiding double freeing.
513         (gfc_match_if): Handle LOCK/UNLOCK statement.
514         * parse.c (decode_statement, next_statement,
515         gfc_ascii_statement): Ditto.
516         * st.c (gfc_free_statement): Handle LOCK and UNLOCK.
517         * resolve.c (resolve_lock_unlock): New function.
518         (resolve_code): Call it.
519         * dump-parse-tree.c (show_code_node): Handle LOCK/UNLOCK.
520
521 2011-06-07  Richard Guenther  <rguenther@suse.de>
522
523         * f95-lang.c (gfc_init_decl_processing): Do not set
524         size_type_node or call set_sizetype.
525
526 2011-06-05  Tobias Burnus  <burnus@net-b.de>
527
528         PR fortran/49255
529         * trans-expr.c (gfc_conv_procedure_call): Fix -fcheck=pointer
530         for F2008.
531
532 2011-06-05  Andreas Schmidt  <andreas.schmidt.42@gmx.net>
533         Thomas Koenig  <tkoenig@gcc.gnu.org>
534
535         * dump-parse-tree.c (show_symbol):  Don't dump namespace
536         for ENTRY to avoid infinite recursion.
537
538 2011-06-02  Asher Langton  <langton2@llnl.gov>
539
540         PR fortran/49268
541         * trans-decl.c (gfc_trans_deferred_vars): Treat assumed-size Cray
542         pointees as AS_EXPLICIT.
543
544 2011-06-02  Asher Langton  <langton2@llnl.gov>
545
546         PR fortran/37039
547         * decl.c (variable_decl): Merge current_as before copying to cp_as.
548
549 2011-06-02  Steven G. Kargl  <kargl@gcc.gnu.org>
550
551         PR fortran/49265
552         * decl.c (gfc_match_modproc):  Allow for a double colon in a module
553         procedure statement.
554         * parse.c ( decode_statement): Deal with whitespace around :: in
555         gfc_match_modproc.
556
557 2011-05-31  Tobias Burnus  <burnus@net-b.de>
558
559         PR fortran/18918
560         * intrinsic.c (klass): Add CLASS_ATOMIC.
561         (add_subroutines): Add atomic_ref/atomic_define.
562         * intrinsic.texi (ATOMIC_REF, ATOMIC_DEFINE): Document.
563         * intrinsic.h (gfc_check_atomic_def, gfc_check_atomic_ref,
564         gfc_resolve_atomic_def, gfc_resolve_atomic_ref): New prototypes.
565         * gfortran.h (gfc_isym_id): Add GFC_ISYM_ATOMIC_DEF
566         and GFC_ISYM_ATOMIC_REF.
567         (gfc_atomic_int_kind, gfc_atomic_logical_kind): New global vars.
568         * iresolve.c (gfc_resolve_atomic_def, gfc_resolve_atomic_ref): New
569         functions.
570         * check.c (gfc_check_atomic, gfc_check_atomic_def,
571         gfc_check_atomic_ref): New functions.
572         * iso-fortran-env.def (ISOFORTRANENV_FILE_ATOMIC_INT_KIND,
573         ISOFORTRANENV_FILE_ATOMIC_LOGICAL_KIND): Change kind value.
574         * trans-intrinsic.c (conv_intrinsic_atomic_def,
575         conv_intrinsic_atomic_ref, gfc_conv_intrinsic_subroutine): New
576         functions.
577         (conv_intrinsic_move_alloc) Renamed from
578         gfc_conv_intrinsic_move_alloc - and made static.
579         * trans.h (gfc_conv_intrinsic_move_alloc): Remove.
580         (gfc_conv_intrinsic_subroutine) Add prototype.
581         * trans.c (trans_code): Call gfc_conv_intrinsic_subroutine.
582         * trans-types (gfc_atomic_int_kind, gfc_atomic_logical_kind): New
583         global vars.
584         (gfc_init_kinds): Set them.
585
586 2011-05-31  Tobias Burnus  <burnus@net-b.de>
587
588         PR fortran/18918
589         * trans-array.c (gfc_trans_dummy_array_bias): Handle
590         cobounds of assumed-shape arrays.
591
592 2011-05-31  Tobias Burnus  <burnus@net-b.de>
593
594         PR fortran/18918
595         * resolve.c (resolve_fl_variable): Handle static coarrays
596         with non-constant cobounds.
597
598 2011-05-29  Janus Weil  <janus@gcc.gnu.org>
599
600         PR fortran/47601
601         * module.c (mio_component_ref): Handle components of extended types.
602         * symbol.c (gfc_find_component): Return is sym is NULL.
603
604 2011-05-29  Tobias Burnus  <burnus@net-b.de>
605
606         PR fortran/18918
607         * interface.c (compare_parameter): Add check for passing coarray
608         to allocatable noncoarray dummy.
609
610 2011-05-29  Tobias Burnus  <burnus@net-b.de>
611             Richard Guenther  <rguenther@suse.de>
612
613         PR fortran/18918
614         * trans-types.c (gfc_get_nodesc_array_type): Don't mess with
615         the type's TREE_TYPE.
616         * trans-array.c (gfc_conv_array_ref): Use TYPE_MAIN_VARIANT.
617         * trans.c (gfc_build_array_ref): Ditto.
618
619 2011-05-27  Tobias Burnus  <burnus@net-b.de>
620
621         PR fortran/18918
622         * check.c (gfc_check_associated, gfc_check_null): Add coindexed check.
623         * match.c (gfc_match_nullify): Ditto.
624         * resolve.c (resolve_deallocate_expr): Ditto.
625         * trans-types.c (gfc_get_nodesc_array_type): Don't set restricted
626         for nonpointers.
627
628 2011-05-27  Tobias Burnus  <burnus@net-b.de>
629
630         PR fortran/48820
631         * gfortran.h (gfc_isym_id): Add GFC_ISYM_RANK.
632         * intrinsic.c (add_functions): Add rank intrinsic.
633         (gfc_check_intrinsic_standard): Handle GFC_STD_F2008_TR.
634         * intrinsic.h (gfc_simplify_rank, gfc_check_rank): Add prototypes.
635         * simplify.c (gfc_simplify_rank): New function.
636         * intrinsic.texi (RANK): Add description for rank intrinsic.
637         * check.c (gfc_check_rank): New function.
638
639 2011-05-26  Paul Thomas  <pault@gcc.gnu.org>
640             Thomas Koenig  <tkoenig@gcc.gnu.org>
641
642         PR fortran/48955
643         * trans-expr.c (gfc_trans_assignment_1): GFC_REVERSE_NOT_SET
644         changed to GFC_ENABLE_REVERSE.
645         * trans-array.c (gfc_init_loopinfo): GFC_CANNOT_REVERSE changed
646         to GFC_INHIBIT_REVERSE.
647         * gfortran.h : Enum gfc_reverse is now GFC_ENABLE_REVERSE,
648         GFC_FORWARD_SET, GFC_REVERSE_SET and GFC_INHIBIT_REVERSE.
649         * dependency.c (gfc_dep_resolver): Change names for elements of
650         gfc_reverse as necessary. Change the logic so that forward
651         dependences are remembered as well as backward ones. When both
652         have appeared, force a temporary.
653
654 2011-05-26  Tobias Burnus  <burnus@net-b.de>
655
656         PR fortran/18918
657         * trans-array.c (gfc_conv_array_ref): Handle pointer coarrays.
658         * trans-decl.c (has_coarray_vars, caf_init_block,
659         gfor_fndecl_caf_register): New file-global variables.
660         (gfc_finish_var_decl): Make sure that coarrays in main are static.
661         (gfc_build_qualified_array): Generate coarray token variable.
662         (gfc_get_symbol_decl): Don't use a static initializer for coarrays.
663         (gfc_build_builtin_function_decls): Set gfor_fndecl_caf_register.
664         (gfc_trans_deferred_vars, gfc_emit_parameter_debug_info): Skip for
665         static coarrays.
666         (generate_local_decl): Check for local coarrays.
667         (create_main_function): SYNC ALL before calling MAIN.
668         (generate_coarray_sym_init): Register static coarray.
669         (generate_coarray_init): Generate CAF registering constructor
670         function.
671         (gfc_generate_function_code): Call it, if needed, do not create
672         cgraph twice.
673         (gfc_generate_module_vars, gfc_process_block_locals): Call
674         generate_coarray_init.
675         * trans-types.c (gfc_get_nodesc_array_type): Generate pointers for
676         -fcoarray=lib.
677         * trans.h (gfor_fndecl_caf_register): New variable.
678         (lang_type): New element caf_token.
679         (GFC_TYPE_ARRAY_CAF_TOKEN): New macro.
680
681 2011-05-24  Joseph Myers  <joseph@codesourcery.com>
682
683         * Make-lang.in (GFORTRAN_D_OBJS): Remove prefix.o.
684         (gfortran$(exeext)): Use libcommon-target.a.
685
686 2011-05-22  Thomas Koenig  <tkoenig@gcc.gnu.org>
687
688         * frontend-passes.c (cfe_register_funcs):  Also register
689         character functions if their charlens are known and constant.
690         Also register allocatable functions.
691
692 2011-05-21  Janus Weil  <janus@gcc.gnu.org>
693
694         PR fortran/48699
695         * match.c (select_type_set_tmp): Make the temporary ALLOCATABLE if the
696         selector is ALLOCATABLE.
697
698 2011-05-20  Janus Weil  <janus@gcc.gnu.org>
699
700         PR fortran/48706
701         * module.c (write_dt_extensions): Do not write extended types which
702         are local to a subroutine.
703
704 2011-05-20  Joseph Myers  <joseph@codesourcery.com>
705
706         * Make-lang.in (GFORTRAN_D_OBJS): Remove version.o and intl.o.
707
708 2011-05-20  Janne Blomqvist  <jb@gcc.gnu.org>
709
710         * gfortran.texi (set_fpe): Update documentation.
711         * invoke.texi (-ffpe-trap): Likewise.
712         * libgfortran.h (GFC_FPE_PRECISION): Rename to GFC_FPE_INEXACT.
713         * options.c (gfc_handle_fpe_trap_option): Handle inexact and make
714         precision an alias for it.
715
716 2011-05-19  Tobias Burnus  <burnus@net-b.de>
717
718         PR fortran/18918
719         * trans-types.c (gfc_get_element_type): Handle scalar coarrays.
720         (gfc_get_nodesc_array_type): Make a variant-type copy for scalar
721         coarrays.
722         * trans.c (gfc_build_array_ref): Return original type not variant
723         copy for scalar coarrays.
724         * trans-array.c (gfc_conv_array_ref): Ditto.
725
726 2011-05-18  Janus Weil  <janus@gcc.gnu.org>
727
728         PR fortran/48700
729         * trans-intrinsic.c (gfc_conv_intrinsic_move_alloc): Deallocate 'TO'
730         argument to avoid memory leaks.
731
732 2011-05-16  Tobias Burnus  <burnus@net-b.de>
733
734         * gfortran.texi (_gfortran_set_options): Add GFC_STD_F2008_TR.
735         (Fortran 2008 status): Multi-image support for coarrays.
736         (TR 19113 status): New section.
737
738 2011-05-15  Tobias Burnus  <burnus@net-b.de>
739
740         PR fortran/18918
741         actual argument is not an array; rank mismatch is diagnosted later.
742         * trans-decl.c (gfc_get_symbol_decl, gfc_trans_deferred_vars): Handle
743         scalar coarrays.
744         * trans-types.c (gfc_get_array_type_bounds): Ditto.
745
746 2011-05-15  Joern Rennecke  <amylaar@spamcop.net>
747
748         PR middle-end/46500
749         * trans-types.c: Include "tm.h".
750         [0] (c_size_t_size): Remove.
751
752 2011-05-15  Janne Blomqvist  <jb@gcc.gnu.org>
753
754         PR libfortran/48915
755         * gfortran.texi (_gfortran_set_options): Even though -fbacktrace
756         is now the default, the library defaults to backtracing disabled.
757
758 2011-05-14  Tobias Burnus  <burnus@net-b.de>
759
760         * lang.opt (fdump-core): Re-add as ignored option
761         for backward compatibility.
762
763 2011-05-14  Janne Blomqvist  <jb@gcc.gnu.org>
764
765         PR libfortran/48915
766         * gfortran.texi: Update mixed-language programming section
767         reflecting the removal of the fdump-core option, and that
768         -fbacktrace is now enabled by default.
769
770 2011-05-14  Thomas Koenig  <tkoenig@gcc.gnu.org>
771
772         PR fortran/22572
773         * frontend-passes.c (cfe_register_funcs):  Also register functions
774         for potential elimination if the rank is > 0, the shape is unknown
775         and reallocate on assignment is active.
776         (create_var):  For rank > 0 functions with unknown shape, create
777         an allocatable temporary.
778
779 2011-05-14  Tobias Burnus  <burnus@net-b.de>
780
781         PR fortran/18918
782         * interface.c (compare_parameter): Skip diagnostic if
783         actual argument is not an array; rank mismatch is diagnosted later.
784
785 2011-05-14  Tobias Burnus  <burnus@net-b.de>
786
787         * options.c (gfc_init_options, gfc_post_options): Enable
788         -fstack-arrays by default if -Ofast is used.
789         * invoke.texi (-fstack-arrays): Document this.
790
791 2011-05-14  Janne Blomqvist  <jb@gcc.gnu.org>
792
793         PR libfortran/48915
794         * gfortran.h (gfc_option_t): Remove flag_dump_core.
795         * gfortran.texi (GFORTRAN_ERROR_DUMPCORE): Remove section.
796         (GFORTRAN_ERROR_BACKTRACE): Document that it's enabled by default.
797         * intrinsic.texi (ABORT): Remove explanation of -fdump-core.
798         * invoke.texi: Remove -fdump-core, document that -fbacktrace is
799         enabled by default.
800         * lang.opt: Remove -fdump-core.
801         * options.c (gfc_init_options): Make backtrace default to enabled,
802         remove dump_core.
803         (gfc_handle_option): Remove OPT_fdump-core.
804         * trans-decl.c: Pass a 0 to preserve ABI.
805
806 2011-05-14  Janne Blomqvist  <jb@gcc.gnu.org>
807
808         * gfortran.texi: Remove GFORTRAN_USE_STDERR documentation.
809
810 2011-05-13  Tobias Burnus  <burnus@net-b.de>
811
812         PR fortran/48972
813         * io.c (resolve_tag_format, resolve_tag): Make sure
814         that the string is of default kind.
815         (gfc_resolve_inquire): Also resolve decimal tag.
816
817 2011-05-12  Tobias Burnus  <burnus@net-b.de>
818
819         PR fortran/48972
820         * resolve.c (resolve_intrinsic): Don't resolve module
821         intrinsics multiple times.
822
823 2011-05-11  Tobias Burnus  <burnus@net-b.de>
824
825         PR fortran/48889
826         * expr.c (gfc_is_constant_expr): Use e->value.function.esym
827         instead of e->symtree->n.sym, if available.
828
829 2011-05-07  Eric Botcazou  <ebotcazou@adacore.com>
830
831         * f95-lang.c (global_bindings_p): Return bool and simplify.
832
833 2011-05-07  Tobias Burnus  <burnus@net-b.de>
834
835         PR fortran/18918
836         PR fortran/48919
837         * trans.h: Move gfc_init_coarray_decl prototype ...
838         * gfortran.h: ... to here.
839         * parse.c (translate_all_program_units): Call gfc_init_coarray_decl.
840         (gfc_parse_file): Update translate_all_program_units call.
841         * trans-decl.c (gfc_init_coarray_decl): Fix variable declaration,
842         new argument whether DECL_EXTERNAL should be used.
843         (create_main_function): Update gfc_init_coarray_decl call.
844         * trans-intrinsic.c (trans_this_image, trans_image_index,
845         conv_intrinsic_cobound): Ditto.
846
847 2011-05-06  Tobias Burnus  <burnus@net-b.de>
848
849         PR fortran/18918
850         * trans-array.c (gfc_walk_variable_expr): Continue walking
851         for scalar coarrays.
852         * trans-intrinsic.c (convert_element_to_coarray_ref): New function.
853         (trans_this_image, trans_image_index, conv_intrinsic_cobound): Use it.
854         (trans_this_image): Fix algorithm.
855         * trans-types.c (gfc_get_element_type, gfc_get_array_descriptor_base,
856         gfc_sym_type): Handle scalar coarrays.
857
858 2011-05-06  Tobias Burnus  <burnus@net-b.de>
859
860         PR fortran/48858
861         PR fortran/48820
862         * lang.opt (std=f2008tr): New.
863         * libgfortran.h (GFC_STD_F2008_TR): New macro constant.
864         * decl.c (verify_c_interop_param): Allow OPTIONAL in BIND(C)
865         procedures for -std=f2008tr/gnu/legacy.
866         (gfc_match_import): Set sym to NULL.
867         * options.c (set_default_std_flags,gfc_handle_option): Handle
868         -std=f2008tr.
869         * invoke.texi (-std=): Document -std=f2008tr.
870
871 2011-05-05  Nathan Froyd  <froydnj@codesourcery.com>
872
873         * trans-decl.c (gfc_trans_entry_master_switch): Call build_case_label.
874         * trans-io.c (add_case): Likewise.
875         * trans-stmt.c (gfc_trans_integer_select): Likewise.
876         (gfc_trans_character_select): Likewise.
877
878 2011-05-05  Eric Botcazou  <ebotcazou@adacore.com>
879
880         * trans-decl.c (trans_function_start): Do not set
881         dont_save_pending_sizes_p.
882
883 2011-05-04  Nathan Froyd  <froydnj@codesourcery.com>
884
885         * trans.h (gfc_chainon_list): Delete.
886         * trans.c (gfc_chainon_list): Delete.
887
888 2011-05-04  Tobias Burnus  <burnus@net-b.de>
889
890         PR fortran/48864
891         * invoke.texi (fno-protect-parens): Document
892         that -Ofast implies -fno-protect-parens.
893         * options.c (gfc_init_options, gfc_post_options):
894         Make -Ofast imply -fno-protect-parens.
895
896 2011-05-04  Nathan Froyd  <froydnj@codesourcery.com>
897
898         * trans-decl.c (build_library_function_decl_1): Call
899         build_function_type_vec.  Adjust argument list building accordingly.
900         * trans-intrinsic.c (gfc_get_intrinsic_lib_fndecl): Likewise.
901         * trans-types.c (gfc_get_function_type): Likewise.
902
903 2011-05-04  Richard Guenther  <rguenther@suse.de>
904
905         * trans-array.c (gfc_trans_array_constructor_value): Use
906         size_int for bounds of range types.
907         (gfc_trans_array_constructor_value): Use size_type_node
908         for memcpy argument.
909         * trans-common.c (build_field): Use gfc_charlen_type_node
910         for lengths.
911         * trans-openmp.c (gfc_trans_omp_clauses): Do not pass NULL
912         as type to build_int_cst.
913         * trans-const.c (gfc_build_string_const): Use size_int
914         for bounds of range types.
915         (gfc_build_wide_string_const): Likewise.
916         * trans-stmt.c (gfc_trans_label_assign): Use gfc_charlen_type_node
917         for lengths.
918         (gfc_trans_character_select): Likewise.
919         (gfc_trans_character_select): Do not pass NULL
920         as type to build_int_cst.
921         (gfc_trans_character_select): Use size_int for bounds of range types.
922         * trans-io.c (gfc_build_io_library_fndecls): Likewise.
923         (add_case): Do not pass NULL as type to build_int_cst.
924         (transfer_expr): Likewise.
925         (transfer_array_desc): Likewise.
926         * trans-decl.c (gfc_add_assign_aux_vars): Use gfc_charlen_type_node
927         for lengths.
928         (gfc_trans_assign_aux_var): Likewise.
929         (create_main_function): Use size_int for bounds of range types.
930         * trans-intrinsic.c (gfc_conv_intrinsic_minmax_char): Do not pass
931         NULL as type to build_int_cst.
932         (gfc_conv_intrinsic_spacing): Likewise.
933         (gfc_conv_intrinsic_rrspacing): Likewise.
934         (gfc_conv_intrinsic_len): Use gfc_charlen_type_node for lengths.
935
936 2011-05-04  Richard Guenther  <rguenther@suse.de>
937
938         * trans-types.c (gfc_get_array_type_bounds): Remove zero notrunc
939         argument to int_const_binop.
940
941 2011-05-03  Tobias Burnus  <burnus@net-b.de>
942
943         PR fortran/18918
944         * trans-intrinsic.c (trans_this_image): Implement version with
945         coarray argument.
946         (conv_intrinsic_cobound): Simplify code.
947         (gfc_conv_intrinsic_function): Call trans_this_image for
948         this_image(coarray) except for -fcoarray=single.
949
950 2011-05-02  Steven G. Kargl  <kargl@gcc.gnu.org>
951
952         PR fortran/48720
953         * gfortran.texi: Document the 'Q' exponent-letter extension.
954         * invoke.texi: Document -Wreal-q-constant.
955         * lang.opt: Add -Wreal-q-constant option.
956         * gfortran.h: Add warn_real_q_constant to option struct.
957         * primary.c (match_real_constant):  Use it.  Accept 'Q' as
958         exponent-letter for REAL(16) real-literal-constant with a
959         fallback to REAL(10) or error if REAL(10) is not available.
960         * options.c (gfc_init_options, set_Wall) Set it.
961         (gfc_handle_option): Handle new option.
962
963 2011-04-30  Thomas Koenig  <tkoenig@gcc.gnu.org>
964
965         * dump-prase-tree.c (show_code_node):  Set the current
966         namespace to the BLOCK before displaying it; restore
967         afterwards.
968
969 2011-04-30  Tobias Burnus  <burnus@net-b.de>
970
971         PR fortran/48821
972         * decl.c (gfc_match_import): Don't try to find the
973         symbol if already found.
974
975 2011-04-30  Paul Thomas  <pault@gcc.gnu.org>
976
977         PR fortran/48746
978         * trans-expr.c (fcncall_realloc_result): Set the bounds and the
979         offset so that the lbounds are one.
980         (gfc_trans_arrayfunc_assign): Add rank to arguments of above.
981
982 2011-04-29  Paul Thomas  <pault@gcc.gnu.org>
983
984         PR fortran/48462
985         * trans-expr.c (arrayfunc_assign_needs_temporary): Deal with
986         automatic reallocation when the lhs is a target.
987
988         PR fortran/48746
989         * trans-expr.c (fcncall_realloc_result): Make sure that the
990         result dtype field is set before the function call.
991
992 2011-04-29  Tobias Burnus  <burnus@net-b.de>
993
994         PR fortran/48810
995         * resolve.c (resolve_typebound_generic_call): Don't check access
996         flags of the specific function.
997
998         PR fortran/48800
999         * resolve.c (resolve_formal_arglist): Don't change AS_DEFERRED
1000         to AS_ASSUMED_SHAPE for function results.
1001         (resolve_fl_var_and_proc): Print also for function results with
1002         AS_DEFERRED an error, if they are not a pointer or allocatable.
1003         (resolve_types): Make sure arguments of procedures in interface
1004         blocks are resolved.
1005
1006 2011-04-29  Michael Matz  <matz@suse.de>
1007
1008         * options.c (options.c): Set warn_maybe_uninitialized.
1009
1010 2011-04-28  Tobias Burnus  <burnus@net-b.de>
1011
1012         PR fortran/48112
1013         * resolve.c (resolve_fl_var_and_proc): Print diagnostic of
1014         function results only once.
1015         (resolve_symbol): Always resolve function results.
1016
1017         PR fortran/48279
1018         * expr.c (gfc_check_vardef_context): Fix handling of generic
1019         EXPR_FUNCTION.
1020         * interface.c (check_interface0): Reject internal functions
1021         in generic interfaces, unless -std=gnu.
1022
1023 2011-04-27  Tobias Burnus  <burnus@net-b.de>
1024
1025         PR fortran/48788
1026         * resolve.c (resolve_global_procedure): Error recovery -
1027         avoid segfault for (non)character-returning functions.
1028
1029 2011-04-26  Thomas Koenig  <tkoenig@gcc.gnu.org>
1030
1031         * decl.c (gfc_match_end):  Check that the block name starts
1032         with "block@".
1033         * parse.c (gfc_build_block_ns):  Make block names unique by
1034         numbering them.
1035
1036 2011-04-26  Thomas Koenig  <tkoenig@gcc.gnu.org>
1037
1038         * frontend-passes.c (inserted_block):  New variable.
1039         (changed_statement):  Likewise.
1040         (create_var):  Encase statement to be operated on in a BLOCK.
1041         Adjust code insertion for BLOCK.
1042         (cfe_code):  Set inserted_block and changed_statement to NULL.
1043
1044 2011-04-23  Tobias Burnus  <burnus@net-b.de>
1045
1046         PR fortran/18918
1047         * module.c (mio_array_spec): Set as->cotype on reading.
1048         * resolve.c (resolve_allocate_expr): Fix allocating coarray
1049         components.
1050
1051 2011-04-21  Thomas Koenig  <tkoenig@gcc.gnu.org>
1052
1053         PR fortran/48405
1054         * frontend_passes (cfe_register_funcs): Remove workaround for DO
1055         loops.
1056         (gfc_code_walker):  Make sure the pointer to the current
1057         statement doen't change when other statements are inserted.
1058
1059 2011-04-21  Tobias Burnus  <burnus@net-b.de>
1060
1061         PR fortran/18918
1062         * array.c (gfc_match_array_spec): Fix maximal rank(+corank) check.
1063
1064 2011-04-20  Jim Meyering  <meyering@redhat.com>
1065
1066         * expr.c (free_expr0): Remove useless if-before-free.
1067         * gfortranspec.c (lang_specific_pre_link): Likewise.
1068         * interface.c (gfc_extend_expr): Likewise.
1069         * trans-openmp.c (gfc_trans_omp_array_reduction): Likewise.
1070
1071 2011-04-19  Tobias Burnus  <burnus@net-b.de>
1072
1073         PR fortran/48588
1074         PR fortran/48692
1075
1076         * module.c (fix_mio_expr): Commit created symbol.
1077
1078 2011-04-19  Janne Blomqvist  <jb@gcc.gnu.org>
1079
1080         * scanner.c (load_file): Use XCNEWVAR instead of xcalloc.
1081
1082 2011-04-19  Janne Blomqvist  <jb@gcc.gnu.org>
1083
1084         * frontend-passes.c (gfc_run_passes): Use XDELETEVEC instead of
1085         free.
1086
1087 2011-04-19  Janne Blomqvist  <jb@gcc.gnu.org>
1088
1089         * misc.c (gfc_getmem): Remove function.
1090         * gfortran.h: Remove gfc_getmem prototype. Replace gfc_getmem
1091         usage with XCNEW or XCNEWVEC.
1092         * expr.c (gfc_check_assign_symbol): Replace gfc_getmem usage with
1093         XCNEW or XCNEWVEC.
1094         * options.c (gfc_handle_module_path_options)
1095         (gfc_get_option_string): Likewise.
1096         * resolve.c (gfc_resolve_forall): Likewise.
1097         * simplify.c (simplify_transformation_to_array): Likewise.
1098         * target-memory.c (gfc_target_interpret_expr): Likewise.
1099         * trans-common.c (get_segment_info, copy_equiv_list_to_ns)
1100         (get_init_field): Likewise.
1101         * trans-expr.c (gfc_conv_statement_function): Likewise.
1102         * trans-io.c (nml_full_name): Likewise.
1103         * trans-stmt.c (gfc_trans_forall_1): Likewise.
1104         * scanner.c (load_file): Replace gfc_getmem usage with xcalloc.
1105
1106 2011-04-19  Tobias Burnus  <burnus@net-b.de>
1107
1108         PR fortran/48588
1109         * parse.c (resolve_all_program_units): Skip modules.
1110         (translate_all_program_units): Handle modules.
1111         (gfc_parse_file): Defer code generation for modules.
1112
1113 2011-04-19  Martin Jambor  <mjambor@suse.cz>
1114
1115         * trans-decl.c (gfc_generate_function_code): Call cgraph_create_node
1116         instead of cgraph_get_create_node.
1117
1118 2011-04-18  Jim Meyering  <meyering@redhat.com>
1119
1120         remove now-unused definition of gfc_free
1121         * misc.c (gfc_free): Remove function.
1122         * gfortran.h (gfc_free): Remove its prototype.
1123
1124 2011-04-18  Jim Meyering  <meyering@redhat.com>
1125
1126         convert each use of gfc_free (p) to free (p)
1127         Do that by running this command:
1128           perl -pi -e    's/\bgfc_free ?\(/free (/' \
1129             $(git grep -El '\bgfc_free ?\(')
1130         which also corrects the few uses that lacked a space between
1131         the function name and the open parenthesis.
1132         Manually undo the change to the function definition itself
1133         and its prototype.  They'll be removed next.
1134         * array.c (gfc_free_array_spec, gfc_set_array_spec): s/gfc_free/free/
1135         * constructor.c (node_free): Likewise.
1136         * cpp.c (dump_queued_macros): Likewise.
1137         * data.c (gfc_assign_data_value): Likewise.
1138         * decl.c (free_variable, free_value, gfc_free_data): Likewise.
1139         (gfc_free_data_all, match_old_style_init): Likewise.
1140         (gfc_set_constant_character_len, gfc_free_enum_history, NUM_DECL):
1141         Likewise.
1142         (gfc_match_modproc): Likewise.
1143         * dependency.c (check_section_vs_section): Likewise.
1144         * error.c (gfc_pop_error, gfc_free_error): Likewise.
1145         * expr.c (free_expr0, gfc_free_expr, gfc_free_actual_arglist): Likewise.
1146         (gfc_free_ref_list, gfc_replace_expr, gfc_copy_ref): Likewise.
1147         (find_substring_ref, gfc_simplify_expr, gfc_check_assign_symbol):
1148         Likewise.
1149         * frontend-passes.c (gfc_run_passes, cfe_expr_0): Likewise.
1150         (strip_function_call, optimize_comparison): Likewise.
1151         * interface.c (gfc_free_interface, arginfo, check_interface0): Likewise.
1152         (CHECK_OS_COMPARISON, gfc_extend_assign, gfc_free_formal_arglist):
1153         Likewise.
1154         * intrinsic.c (gfc_intrinsic_done_1, gfc_convert_type_warn): Likewise.
1155         (gfc_convert_chartype): Likewise.
1156         * io.c (gfc_free_open, compare_to_allowed_values, gfc_free_close):
1157         Likewise.
1158         (gfc_free_filepos, gfc_free_dt, gfc_free_inquire): Likewise.
1159         * match.c (gfc_free_iterator, gfc_match_associate): Likewise.
1160         (gfc_free_alloc_list, gfc_free_namelist, gfc_free_equiv_until):
1161         Likewise.
1162         (free_case, gfc_free_forall_iterator): Likewise.
1163         * misc.c: Likewise.
1164         * module.c (free_pi_tree, resolve_fixups, free_rename): Likewise.
1165         (free_true_name, peek_atom, mio_allocated_wide_string): Likewise.
1166         (mio_pool_string, mio_internal_string, mio_gmp_integer): Likewise.
1167         (mio_gmp_real, mio_expr, mio_typebound_proc): Likewise.
1168         (mio_full_typebound_tree, skip_list, load_equiv): Likewise.
1169         (free_written_common, gfc_use_module, gfc_free_use_stmts): Likewise.
1170         * openmp.c (gfc_free_omp_clauses): Likewise.
1171         * options.c (gfc_post_options): Likewise.
1172         * parse.c (select_type_pop, parse_omp_structured_block): Likewise.
1173         * primary.c (gfc_free_structure_ctor_component): Likewise.
1174         * resolve.c (resolve_structure_cons, check_host_association): Likewise.
1175         (gfc_resolve_forall, resolve_equivalence): Likewise.
1176         * scanner.c (gfc_scanner_done_1, gfc_release_include_path): Likewise.
1177         (gfc_define_undef_line, preprocessor_line, include_line): Likewise.
1178         (load_file, gfc_read_orig_filename): Likewise.
1179         * simplify.c (simplify_transformation_to_array): Likewise.
1180         (gfc_simplify_ibits, simplify_shift, gfc_simplify_ishftc, STRING):
1181         Likewise.
1182         (gfc_simplify_compiler_options): Likewise.
1183         * st.c (gfc_free_statement, gfc_free_statements): Likewise.
1184         (gfc_free_association_list): Likewise.
1185         * symbol.c (free_components, gfc_free_st_label, free_st_labels):
1186         Likewise.
1187         (gfc_delete_symtree, gfc_free_symbol, gfc_undo_symbols): Likewise.
1188         (free_old_symbol, gfc_commit_symbols, free_tb_tree): Likewise.
1189         (free_common_tree, free_uop_tree, free_sym_tree): Likewise.
1190         (gfc_free_dt_list, gfc_free_equiv_infos, gfc_free_equiv_lists):
1191         Likewise.
1192         (gfc_free_finalizer, gfc_free_charlen, free_entry_list): Likewise.
1193         (gfc_free_namespace): Likewise.
1194         * trans-array.c (gfc_free_ss, gfc_trans_array_bound_check): Likewise.
1195         (gfc_conv_array_ref, gfc_conv_ss_startstride): Likewise.
1196         (gfc_trans_dummy_array_bias, gfc_conv_array_parameter): Likewise.
1197         * trans-common.c (get_init_field, create_common): Likewise.
1198         * trans-const.c (gfc_build_wide_string_const): Likewise.
1199         (gfc_conv_string_init): Likewise.
1200         * trans-decl.c (gfc_generate_function_code): Likewise.
1201         * trans-expr.c (gfc_conv_substring, gfc_free_interface_mapping):
1202         Likewise.
1203         (SCALAR_POINTER, gfc_conv_statement_function): Likewise.
1204         (gfc_trans_subarray_assign): Likewise.
1205         * trans-intrinsic.c (conv_generic_with_optional_char_arg): Likewise.
1206         * trans-io.c (gfc_trans_io_runtime_check, set_string): Likewise.
1207         (transfer_namelist_element, transfer_array_component): Likewise.
1208         * trans-openmp.c (gfc_trans_omp_array_reduction): Likewise.
1209         * trans-stmt.c (cleanup_forall_symtrees, gfc_trans_forall_1): Likewise.
1210         * trans.c (trans_runtime_error_vararg, gfc_restore_backend_locus):
1211         Likewise.
1212
1213 2011-04-15  Jim Meyering  <meyering@redhat.com>
1214
1215         gfortran: remove cpp definition of free, ...
1216         in preparation for the s/gfc_free/free/ transformation.
1217         * gfortran.h (free): Remove macro definition that would otherwise
1218         prevent direct use of the function.
1219
1220 2011-04-18  Tobias Burnus  <burnus@net-b.de>
1221
1222         PR fortran/18918
1223         * array.c (gfc_match_array_ref): Check for too many codimensions.
1224         * check.c (gfc_check_image_index): Check number of elements
1225         in SUB argument.
1226         * simplify.c (gfc_simplify_image_index): Remove unreachable checks.
1227
1228 2011-04-18  Tobias Burnus  <burnus@net-b.de>
1229
1230         PR fortran/18918
1231         * iresolve.c (gfc_resolve_image_index): Set ts.type.
1232         * simplify.c (gfc_simplify_image_index): Don't abort if the bounds
1233         are not known at compile time and handle -fcoarray=lib.
1234         * trans-intrinsics.c (gfc_conv_intrinsic_function): Handle
1235         IMAGE_INDEX.
1236         (conv_intrinsic_cobound): Fix comment typo.
1237         (trans_this_image): New function.
1238         * trans-array.c (gfc_unlikely): Move to trans.c.
1239         * trans.c (gfc_unlikely): Function moved from trans-array.c.
1240         (gfc_trans_runtime_check): Use it.
1241         * trans-io.c (gfc_trans_io_runtime_check): Ditto.
1242         * trans.h (gfc_unlikely): Add prototype.
1243
1244 2011-04-18  Paul Thomas  <pault@gcc.gnu.org>
1245
1246         PR fortran/48462
1247         * trans-expr.c (fcncall_realloc_result): Renamed version of
1248         realloc_lhs_bounds_for_intrinsic_call that does not touch the
1249         descriptor bounds anymore but makes a temporary descriptor to
1250         hold the result.
1251         (gfc_trans_arrayfunc_assign): Modify the reference to above
1252         renamed function.
1253
1254 2011-05-17  Tobias Burnus  <burnus@net-b.de>
1255
1256         PR fortran/48624
1257         * trans-decl.c (gfc_get_extern_function_decl): Fix decl
1258         for external procedures with proc arguments.
1259
1260 2011-04-15  Michael Matz  <matz@suse.de>
1261
1262         * trans-array.c (toplevel): Include gimple.h.
1263         (gfc_trans_allocate_array_storage): Check flag_stack_arrays,
1264         properly expand variable length arrays.
1265         (gfc_trans_auto_array_allocation): If flag_stack_arrays create
1266         variable length decls and associate them with their scope.
1267         * gfortran.h (gfc_option_t): Add flag_stack_arrays member.
1268         * options.c (gfc_init_options): Handle -fstack_arrays option.
1269         * lang.opt (fstack-arrays): Add option.
1270         * invoke.texi (Code Gen Options): Document it.
1271         * Make-lang.in (trans-array.o): Depend on GIMPLE_H.
1272
1273 2011-04-15  Tobias Burnus  <burnus@net-b.de>
1274
1275         PR fortran/18918
1276         * trans-intrinsic.c (conv_intrinsic_cobound): Remove unused
1277         code which is also causing an ICE.
1278
1279 2011-04-14  Nathan Froyd  <froydnj@codesourcery.com>
1280
1281         * f95-lang.c (poplevel): Use BLOCK_CHAIN and block_chainon.
1282
1283 2011-04-12  Nathan Froyd  <froydnj@codesourcery.com>
1284
1285         * f95-lang.c (union lang_tree_node): Check for TS_COMMON before
1286         calling TREE_CHAIN.
1287
1288 2011-04-12  Paul Thomas  <pault@gcc.gnu.org>
1289
1290         PR fortran/48360
1291         PR fortran/48456
1292         * trans-array.c (get_std_lbound): For derived type variables
1293         return array valued component lbound.
1294
1295 2011-04-12  Martin Jambor  <mjambor@suse.cz>
1296
1297         * trans-decl.c (gfc_generate_function_code): Call
1298         cgraph_get_create_node instead of cgraph_node.
1299
1300 2011-04-11  Tobias Burnus  <burnus@net-b.de>
1301
1302         PR fortran/18918
1303         * simplify.c (simplify_bound_dim): Exit for
1304         ucobound's last dimension unless -fcoarray=single.
1305         * trans-array (gfc_conv_descriptor_size_1): Renamed from
1306         gfc_conv_descriptor_size, made static, has now from_dim and
1307         to_dim arguments.
1308         (gfc_conv_descriptor_size): Call gfc_conv_descriptor_size.
1309         (gfc_conv_descriptor_cosize): New function.
1310         * trans-array.h (gfc_conv_descriptor_cosize): New prototype.
1311         * trans-intrinsic.c (conv_intrinsic_cobound): Add input_location
1312         and handle last codim of ucobound for when -fcoarray is not "single".
1313
1314 2011-04-08  Thomas Koenig  <tkoenig@gcc.gnu.org>
1315
1316         PR fortran/48448
1317         * gfortran.h (gfc_option_t):  Add warn_function_elimination and
1318         flag_frontend_optimize.
1319         * lang.opt (Wfunction-elimination):  Add.
1320         (ffrontend-optimize):  Add.
1321         * invoke.texi:  Add documentation for -Wfunction-elimination
1322         and -ffrontend-optimize.  Add -faggressive-function-elimination
1323         to list of code generation options.
1324         * frontend-passes.c (gfc_run_passes):  Run optimizations if
1325         flag_frontend_optimize is set.
1326         (warn_function_elimination):  New function.
1327         (cfe_expr_0):  Call it if requested to do so.
1328         * options.c (gfc_init_options):  Initiate warn_function_elimination
1329         and flag_frontend_optimize.
1330         (gfc_post_options):  Set flag_frontend_optimize if not specified
1331         by user, depending on the optimization level.
1332         (gfc_handle_option):  Handle -Wfunction-elimination and
1333         -ffrontend-optimize.
1334
1335 2011-04-06  Tobias Burnus  <burnus@net-b.de>
1336
1337         PR fortran/18918
1338         * trans-intrinsic.c (gfc_conv_intrinsic_function): Fix
1339         call for this_image.
1340
1341 2011-04-05  Nathan Froyd  <froydnj@codesourcery.com>
1342
1343         * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Use
1344         build_function_type_list instead of build_function_type.  Correct
1345         argument order for func_frexp and func_scalbn.
1346
1347 2011-04-05  Duncan Sands  <baldrick@free.fr>
1348
1349         * f95-lang.c (build_builtin_fntypes): Swap frexp parameter types.
1350
1351 2011-04-04  Thomas Koenig  <tkoenig@gcc.gnu.org>
1352
1353         * frontend-passes: (optimize_lexical_comparison): New function.
1354         (optimize_expr): Call it.
1355         (optimize_comparison): Also handle lexical comparison functions.
1356         Return false instad of -2 for unequal comparison.
1357
1358 2011-04-04  Thomas Koenig  <tkoenig@gcc.gnu.org>
1359
1360         PR fortran/48412
1361         * frontend-passes (cfe_expr_0):  Reverse the order of going
1362         through the loops.
1363
1364 2011-04-04  Tobias Burnus  <burnus@net-b.de>
1365             Mikael Morin  <mikael.morin@sfr.fr>
1366
1367         PR fortran/18918
1368         * check.c (is_coarray): Update - because of DIMEN_THIS_IMAGE.
1369         * expr.c (gfc_is_coindexed): Ditto.
1370         * gfortran.h (gfc_array_ref_dimen_type): Add DIMEN_THIS_IMAGE.
1371         * interface.c (compare_parameter): Use gfc_expr_attr and
1372         gfc_is_coindexed.
1373         * resolve.c (check_dimension, compare_spec_to_ref,
1374         resolve_allocate_expr, check_data_variable): Update for
1375         DIMEN_THIS_IMAGE.
1376         * simplify.c (gfc_simplify_lcobound, gfc_simplify_this_image,
1377         gfc_simplify_ucobound): Allow non-constant bounds.
1378         * trans-array.c (gfc_set_loop_bounds_from_array_spec,
1379         gfc_trans_create_temp_array, gfc_trans_constant_array_constructor,
1380         gfc_set_vector_loop_bounds, gfc_conv_array_index_offset,
1381         gfc_start_scalarized_body, gfc_trans_scalarizing_loops,
1382         gfc_trans_scalarized_loop_boundary, gfc_conv_section_startstride,
1383         gfc_conv_ss_startstride, gfc_conv_loop_setup,
1384         gfc_trans_array_bounds, gfc_conv_expr_descriptor,
1385         gfc_walk_variable_expr): Handle codimen.
1386         * trans-decl.c (gfc_build_qualified_array): Save cobounds.
1387         * trans-intrinsic.c (gfc_conv_intrinsic_bound): Use arg2.
1388         (conv_intrinsic_cobound): New function.
1389         (gfc_conv_intrinsic_function): Call it.
1390         (gfc_walk_intrinsic_function, gfc_add_intrinsic_ss_code): Handle
1391         ucobound, lcobound, this_image.
1392         * fortran/trans-types.c (gfc_build_array_type): Save cobounds.
1393         (gfc_get_dtype): Honour corank.
1394         (gfc_get_nodesc_array_type): Save corank and codimensions.
1395         (gfc_get_array_type_bounds): Save cobound.
1396         * fortran/trans.h (gfc_ss_info,gfc_loopinfo): Add codimen item.
1397         (gfc_array_kind): Add corank item.
1398         (GFC_TYPE_ARRAY_CORANK): New macro.
1399
1400 2011-04-03  Kai Tietz  <ktietz@redhat.com>
1401
1402         PR middle-end/48422
1403         * Make-lang.in (f95-lang.o): Add some missing dependencies.
1404
1405 2011-04-01  Thomas Koenig  <tkoenig@gcc.gnu.org>
1406
1407         PR fortran/48352
1408         * frontend-passes (cfe_register_funcs):  Don't
1409         register functions if they appear as iterators in DO loops.
1410
1411 2011-03-30  Michael Matz  <matz@suse.de>
1412
1413         PR fortran/47516
1414         * trans-expr.c (realloc_lhs_loop_for_fcn_call): Take loop as parameter,
1415         don't use local variable.
1416         (gfc_trans_arrayfunc_assign): Adjust caller.
1417
1418 2011-03-29  Janus Weil  <janus@gcc.gnu.org>
1419
1420         PR fortran/48095
1421         * decl.c (match_procedure_decl,match_ppc_decl): Set flavor of interface.
1422         * module.c (MOD_VERSION): Bump.
1423         (mio_typespec): Read/write 'interface' field.
1424         * primary.c (match_string_constant,match_logical_constant): Remove
1425         unneeded code.
1426         (match_complex_constant): Make sure to clear the typespec.
1427
1428 2011-03-29  Thomas Koenig  <tkoenig@gcc.gnu.org>
1429
1430         * frontend-passes.c (create_var):  Warn about creating an
1431         array temporary if requested.
1432
1433 2011-03-27  Thomas Koenig  <tkoenig@gcc.gnu.org>
1434
1435         PR fortran/47065
1436         * frontend-passes.c (optimize_trim): Also follow references, except
1437         when they are substring references or array references.
1438
1439 2011-03-27  Tobias Burnus  <burnus@net-b.de>
1440
1441         PR fortran/18918
1442         * gfortran.h (gfc_isym_id): Rename GFC_ISYM_NUMIMAGES to
1443         GFC_ISYM_NUM_IMAGES.
1444         (gfc_fcoarray): Add GFC_FCOARRAY_LIB.
1445         * intrinsic.c (add_functions): Update due to GFC_ISYM_NUM_IMAGES
1446         rename.
1447         * invoke.texi (-fcoarray=): Document "lib" argument.
1448         * iresolve.c (gfc_resolve_this_image): Fix THIS IMAGE().
1449         * libgfortran.h (libgfortran_stat_codes): Add comments.
1450         * options.c (gfc_handle_coarray_option): Add -fcoarray=lib.
1451         * simplify.c (gfc_simplify_num_images, gfc_simplify_this_image):
1452         Handle GFC_FCOARRAY_LIB.
1453         * trans.h (gfc_init_coarray_decl): New prototype.
1454         (gfor_fndecl_caf_init, gfor_fndecl_caf_finalize,
1455         gfor_fndecl_caf_critical, gfor_fndecl_caf_end_critical,
1456         gfor_fndecl_caf_sync_all, gfor_fndecl_caf_sync_images,
1457         gfor_fndecl_caf_error_stop, gfor_fndecl_caf_error_stop_str,
1458         gfort_gvar_caf_num_images, gfort_gvar_caf_this_image):
1459         New global variables.
1460         * trans-decl.c: Declare several CAF functions (cf. above).
1461         (gfc_build_builtin_function_decls): Initialize those.
1462         (gfc_init_coarray_decl): New function.
1463         (create_main_function): Call CAF init/finalize functions.
1464         * trans-intrinsic.c (trans_this_image, trans_num_images): New.
1465         (gfc_conv_intrinsic_function): Call those.
1466         * trans-stmt.c (gfc_trans_stop, gfc_trans_sync, gfc_trans_critical):
1467         Add code for GFC_FCOARRAY_LIB.
1468
1469 2011-03-26  Janus Weil  <janus@gcc.gnu.org>
1470
1471         PR fortran/48291
1472         * class.c (get_unique_hashed_string): Adjust maximum allowable length
1473         for unique type string.
1474
1475 2011-03-25  Kai Tietz  <ktietz@redhat.com>
1476
1477         * scanner.c (preprocessor_line): Use filename_cmp
1478         instead of strcmp.
1479
1480 2011-03-25  Tobias Burnus  <burnus@net-b.de>
1481
1482         PR fortran/48174
1483         PR fortran/45304
1484         * trans-types.c (gfc_get_function_type): Don't use varargs if the
1485         procedure is known to have no arguments.
1486
1487 2011-03-21  Thomas Koenig  <tkoenig@gcc.gnu.org>
1488
1489         PR fortran/22572
1490         * gfortran.h (gfc_option_t) : Add
1491         flag_aggressive_function_elimination.
1492         (gfc_dep_compare_functions):  Add prototype.
1493         * lang.opt: Add faggressive-function-elimination.
1494         * invoke.texi: Document -faggressive-function-elimination.
1495         * frontend_passes (expr_array):  New static variable.
1496         (expr_size):  Likewise.
1497         (expr_count):  Likewise.
1498         (current_code):  Likewise.
1499         (current_ns):  Likewise.
1500         (gfc_run_passes):  Allocate and free space for expressions.
1501         (cfe_register_funcs):  New function.
1502         (create_var):  New function.
1503         (cfc_expr_0):  New function.
1504         (cfe_code):  New function.
1505         (optimize_namespace):  Invoke gfc_code_walker with cfe_code
1506         and cfe_expr_0.
1507         * dependency.c (gfc_dep_compare_functions):  New function.
1508         (gfc_dep_compare_expr):  Use it.
1509         * options.c (gfc_init_options):  Handle
1510         flag_aggressive_function_elimination.
1511         (gfc_handle_option):  Likewise.
1512
1513 2011-03-15  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1514
1515         * arith.c (arith_power): Plug memory leak.
1516
1517 2011-03-12  Janus Weil  <janus@gcc.gnu.org>
1518
1519         PR fortran/48059
1520         * trans-expr.c (gfc_apply_interface_mapping_to_expr): Replace base type
1521         for polymorphic arguments.
1522
1523 2011-03-12  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1524
1525         PR fortran/48054
1526         * intrinsic.texi: Clarify doc of logarithm functions.
1527
1528 2011-03-12  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1529
1530         PR fortran/47552
1531         * trans-intrinsic.c (gfc_conv_intrinsic_ctime): Fix type of
1532         the string length variable.
1533
1534 2011-03-11  Janus Weil  <janus@gcc.gnu.org>
1535
1536         PR fortran/47768
1537         * module.c (ab_attribute,attr_bits): Add AB_PROC_POINTER_COMP.
1538         (mio_symbol_attribute): Handle attribute 'proc_pointer_comp'.
1539
1540 2011-03-06  Paul Thomas  <pault@gcc.gnu.org>
1541             Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1542
1543         PR fortran/47850
1544         * expr.c (gfc_is_constant_expr): Only use gfc_constant_ac if
1545         the expression has an iterator.  Otherwise, iterate through the
1546         array, checking for constant expressions for each element.
1547
1548 2011-03-04  Janne Blomqvist  <jb@gcc.gnu.org>
1549
1550         PR libfortran/47802
1551         * intrinsic.texi: Update CTIME and FDATE documentation.
1552
1553 2011-03-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1554
1555         * invoke.texi (Option Summary, Fortran Dialect Options)
1556         (Preprocessing Options, Runtime Options, Code Gen Options):
1557         Fix vertical list spacing by using @itemx for additinoal
1558         items, empty line before @table.  Fix typos.
1559
1560 2011-02-28  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1561
1562         PR fortran/47894
1563         * intrinsic.texi: Fix doc of the VERIFY intrinsic.
1564
1565 2011-02-26  Tobias Burnus  <burnus@net-b.de>
1566
1567         PR fortran/47846
1568         * trans-stmt.c (gfc_trans_allocate): Fix allocation with
1569         type-spec of deferred-length strings.
1570
1571 2011-02-26  Tobias Burnus  <burnus@net-b.de>
1572
1573         PR fortran/47886
1574         * openmp.c (gfc_resolve_omp_directive): Resolve if()
1575         condition of OpenMP's task.
1576
1577 2011-02-26  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1578
1579         PR fortran/47894
1580         * intrinsic.texi: Fix doc of the VERIFY intrinsic.
1581
1582 2011-02-24  Tobias Burnus  <burnus@net-b.de>
1583
1584         PR fortran/47872
1585         * intrinsic.texi (ALLOCATED, ATAN, BESSEL_JN, BESSEL_YN): Add
1586         multitable for linebreak between different syntax variants.
1587
1588 2011-02-24  Richard Guenther  <rguenther@suse.de>
1589
1590         PR fortran/47839
1591         * f95-lang.c (pushdecl): For externs in non-global scope push
1592         a copy of the decl into the BLOCK.
1593
1594 2011-02-23  Mikael Morin  <mikael@gcc.gnu.org>
1595
1596         PR fortran/40850
1597         * trans.c (gfc_prepend_expr_to_block): New function.
1598         * trans.h (gfc_prepend_expr_to_block): Declare.
1599         * trans-array.c (gfc_conv_array_parameter): Replace
1600         gfc_add_expr_to_block with gfc_prepend_expr_to_block.
1601
1602 2011-02-22  Paul Thomas  <pault@gcc.gnu.org>
1603
1604         PR fortran/45743
1605         * trans-decl.c (gfc_get_extern_function_decl): Don't use the
1606         gsymbol backend_decl if the procedure has a formal argument
1607         that is a procedure.
1608
1609 2011-02-22  Tobias Burnus  <burnus@net-b.de>
1610
1611         PR fortran/41359
1612         * trans-stmt.c (gfc_trans_if_1): Use correct line for
1613         expressions in the if condition.
1614
1615 2011-02-20  Tobias Burnus  <burnus@net-b.de>
1616
1617         PR fortran/47797
1618         * trans-decl.c (gfc_trans_deferred_vars): Use gfc_set_backend_locus and
1619         gfc_restore_backend_locus to have better debug locations.
1620         * trans-array.c (gfc_trans_deferred_array): Ditto.
1621
1622 2011-02-20  Paul Thomas  <pault@gcc.gnu.org>
1623
1624         PR fortran/45077
1625         PR fortran/44945
1626         * trans-types.c (gfc_get_derived_type): Remove code that looks
1627         for decls in gsym and add call to gfc_get_module_backend_decl.
1628         * trans.h : Add prototype for gfc_get_module_backend_decl.
1629         * trans-decl.c (gfc_get_module_backend_decl): New function.
1630         (gfc_get_symbol_decl): Call it.
1631
1632 2011-02-19  Paul Thomas  <pault@gcc.gnu.org>
1633
1634         PR fortran/47348
1635         * trans-array.c (get_array_ctor_all_strlen): Move up in file.
1636         (get_array_ctor_var_strlen): Add block dummy and add call to
1637         get_array_ctor_all_strlen instead of giving up on substrings.
1638         Call gcc_unreachable for default case.
1639         (get_array_ctor_strlen): Add extra argument to in call to
1640         get_array_ctor_var_strlen.
1641
1642 2011-02-18  Janus Weil  <janus@gcc.gnu.org>
1643
1644         PR fortran/47789
1645         * primary.c (gfc_match_structure_constructor): Handle empty parent
1646         types.
1647
1648 2011-02-18  Tobias Burnus
1649
1650         PR fortran/47775
1651         * trans-expr.c (arrayfunc_assign_needs_temporary): Use
1652         esym to check whether the specific procedure returns an
1653         allocatable or pointer.
1654
1655 2011-02-18  Michael Matz  <matz@suse.de>
1656
1657         PR fortran/45586
1658         * gfortran.h (struct gfc_component): Add norestrict_decl member.
1659         * trans.h (struct lang_type): Add nonrestricted_type member.
1660         * trans-expr.c (gfc_conv_component_ref): Search fields with correct
1661         parent type.
1662         * trans-types.c (mirror_fields, gfc_nonrestricted_type): New.
1663         (gfc_sym_type): Use it.
1664
1665 2011-02-18  Janus Weil  <janus@gcc.gnu.org>
1666
1667         PR fortran/47768
1668         * resolve.c (resolve_transfer): Reject variables with procedure pointer
1669         components.
1670
1671 2011-02-18  Janus Weil  <janus@gcc.gnu.org>
1672
1673         PR fortran/47767
1674         * gfortran.h (gfc_check_access): Removed prototype.
1675         (gfc_check_symbol_access): Added prototype.
1676         * module.c (gfc_check_access): Renamed to 'check_access', made static.
1677         (gfc_check_symbol_access): New function, basically a shortcut for
1678         'check_access'.
1679         (write_dt_extensions,write_symbol0,write_generic,write_symtree): Use
1680         'gfc_check_symbol_access'.
1681         (write_operator,write_module): Renamed 'gfc_check_access'.
1682         * resolve.c (resolve_fl_procedure,resolve_fl_derived,
1683         resolve_fl_namelist,resolve_symbol,resolve_fntype): Use
1684         'gfc_check_symbol_access'.
1685
1686 2011-02-16  Janus Weil  <janus@gcc.gnu.org>
1687
1688         PR fortran/47745
1689         * class.c (gfc_build_class_symbol): Set 'class_ok' attribute.
1690         * decl.c (build_sym,attr_decl1): Move setting of 'class_ok' into
1691         'gfc_build_class_symbol'.
1692         (gfc_match_decl_type_spec): Reject unlimited polymorphism.
1693         * interface.c (matching_typebound_op): Check for 'class_ok' attribute.
1694         * match.c (select_type_set_tmp): Move setting of 'class_ok' into
1695         'gfc_build_class_symbol'.
1696         * primary.c (gfc_variable_attr): Check for 'class_ok' attribute.
1697
1698 2011-02-15  Steven G. Kargl  <kargl@gcc.gnu.org>
1699
1700         PR fortran/47633
1701         . simplify.c (gfc_simplify_compiler_version): Fix off-by-one issue.
1702
1703 2011-02-14  Janus Weil  <janus@gcc.gnu.org>
1704
1705         PR fortran/47730
1706         * parse.c (gfc_build_block_ns): Commit 'block@' symbol.
1707
1708 2011-02-14  Janus Weil  <janus@gcc.gnu.org>
1709
1710         PR fortran/47728
1711         * class.c (gfc_build_class_symbol): Give a fatal error on polymorphic
1712         arrays.
1713         * primary.c (gfc_match_varspec): Avoid ICE for invalid class
1714         declaration.
1715
1716 2011-02-14  Janus Weil  <janus@gcc.gnu.org>
1717
1718         PR fortran/47349
1719         * interface.c (get_expr_storage_size): Handle derived-type components.
1720
1721 2011-02-13  Tobias Burnus  <burnus@net-b.de>
1722
1723         PR fortran/47569
1724         * interface.c (compare_parameter): Avoid ICE with
1725         character components.
1726
1727 2011-02-12  Janus Weil  <janus@gcc.gnu.org>
1728
1729         * class.c (gfc_build_class_symbol): Reject polymorphic arrays.
1730         * decl.c (build_sym,build_struct,attr_decl1): Use return value of
1731         'gfc_build_class_symbol'.
1732
1733 2011-02-12  Michael Matz  <matz@suse.de>
1734             Janus Weil  <janus@gcc.gnu.org>
1735             Tobias Burnus  <burnus@net-b.de>
1736
1737         PR fortran/45586
1738         * trans-expr.c (conv_parent_component_references): Avoid unintendent
1739         skipping of parent compounds.
1740
1741 2011-02-11  Tobias Burnus  <burnus@net-b.de>
1742
1743         PR fortran/47550
1744         * resolve.c (resolve_formal_arglist): PURE with VALUE
1745         and no INTENT: Add -std= diagnostics.
1746
1747 2011-02-09  Janus Weil  <janus@gcc.gnu.org>
1748
1749         PR fortran/47352
1750         * resolve.c (resolve_procedure_interface): If interface has a result
1751         variable, copy the typespec and set result pointer to self.
1752
1753 2011-02-09  Janus Weil  <janus@gcc.gnu.org>
1754
1755         PR fortran/47463
1756         * resolve.c (resolve_typebound_subroutine): Remove erroneous line.
1757
1758 2011-02-09  Janus Weil  <janus@gcc.gnu.org>
1759
1760         PR fortran/47637
1761         * trans-decl.c (init_intent_out_dt): Handle CLASS arguments.
1762
1763 2011-02-08  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1764
1765         * io.c (match_io_element): Do not set dt if not inquire.
1766
1767 2011-02-08  Janus Weil  <janus@gcc.gnu.org>
1768
1769         PR fortran/45290
1770         * expr.c (gfc_check_assign_symbol): Reject pointers as pointer
1771         initialization target.
1772
1773 2011-02-07  Janne Blomqvist  <jb@gcc.gnu.org>
1774             Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1775
1776         * gfortran.texi (Thread-safety): texinfo styling fixes.
1777         * intrinsic.texi: Likewise.
1778
1779 2011-02-06  Janne Blomqvist  <jb@gcc.gnu.org>
1780
1781         * gfortran.texi (Compiler Characteristics): Add reference to
1782         thread-safety section.
1783
1784 2011-02-06  Janne Blomqvist  <jb@gcc.gnu.org>
1785
1786         * gfortran.texi (Thread-safety): New section.
1787         * intrinsic.texi (EXECUTE_COMMAND_LINE): Mention thread-safety.
1788         (GETENV): Likewise.
1789         (GET_ENVIRONMENT_VARIABLE): Likewise.
1790         (SYSTEM): Likewise.
1791
1792 2011-02-06  Paul Thomas  <pault@gcc.gnu.org>
1793
1794         PR fortran/47592
1795         * trans-stmt.c (gfc_trans_allocate): For deferred character
1796         length allocations with SOURCE, store to the values and string
1797         length to avoid calculating twice.  Replace gfc_start_block
1798         with gfc_init_block to avoid unnecessary contexts and to keep
1799         declarations of temporaries where they should be. Tidy up the
1800         code a bit.
1801
1802 2011-02-05  Janne Blomqvist  <jb@gcc.gnu.org>
1803
1804         PR fortran/42434
1805         * intrinsic.texi (SYSTEM_CLOCK): Update documentation.
1806
1807 2011-02-02  Janus Weil  <janus@gcc.gnu.org>
1808             Paul Thomas  <pault@gcc.gnu.org>
1809
1810         PR fortran/47082
1811         * trans-expr.c (gfc_trans_class_init_assign): Add call to
1812         gfc_get_derived_type.
1813         * module.c (read_cleanup): Do not use unique_symtrees for vtabs
1814         or vtypes.
1815
1816 2011-02-02  Janus Weil  <janus@gcc.gnu.org>
1817
1818         PR fortran/47572
1819         * resolve.c (resolve_fl_variable): Handle polymorphic allocatables.
1820
1821 2011-02-01  Janus Weil  <janus@gcc.gnu.org>
1822
1823         PR fortran/47565
1824         * trans-expr.c (gfc_conv_structure): Handle constructors for procedure
1825         pointer components with allocatable result.
1826
1827 2011-01-31  Janus Weil  <janus@gcc.gnu.org>
1828
1829         PR fortran/47455
1830         * trans-expr.c (gfc_conv_procedure_call): Handle procedure pointers
1831         with pointer or allocatable result.
1832
1833 2011-01-31  Paul Thomas  <pault@gcc.gnu.org>
1834
1835         PR fortran/47519
1836         * trans-stmt.c (gfc_trans_allocate): Improve handling of
1837         deferred character lengths with SOURCE.
1838         * iresolve.c (gfc_resolve_repeat): Calculate character
1839         length from source length and ncopies.
1840         * dump-parse-tree.c (show_code_node): Show MOLD and SOURCE
1841         expressions for ALLOCATE.
1842
1843 2011-01-31  Janus Weil  <janus@gcc.gnu.org>
1844
1845         PR fortran/47463
1846         * resolve.c (resolve_typebound_subroutine): Bug fix for the case of
1847         an argument of a typebound assignment being a component.
1848
1849 2011-01-31  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1850
1851         * gfortranspec.c (add_arg_libgfortran) [HAVE_LD_STATIC_DYNAMIC] Use
1852         LD_STATIC_OPTION, LD_DYNAMIC_OPTION.
1853
1854 2011-01-31  Tobias Burnus  <burnus@net-b.de>
1855
1856         PR fortran/47042
1857         * resolve.c (resolve_fl_procedure): Reject stmt functions
1858         with pointer/allocatable attribute.
1859
1860 2011-01-31  Tobias Burnus  <burnus@net-b.de>
1861
1862         PR fortran/47042
1863         * interface.c (gfc_procedure_use): Add explicit interface check for
1864         pointer/allocatable functions.
1865
1866 2011-01-30  Paul Thomas  <pault@gcc.gnu.org>
1867
1868         PR fortran/47523
1869         * trans-expr.c (gfc_trans_assignment_1): If the rhs is an op
1870         expr and is assigned to a deferred character length scalar,
1871         make sure that the function is called before reallocation,
1872         so that the length is available. Include procedure pointer
1873         and procedure pointer component rhs as well.
1874
1875         PR fortran/45170
1876         PR fortran/35810
1877         PR fortran/47350
1878         * gfortran.dg/allocatable_function_5.f90: New test not added by
1879         mistake on 2011-01-28.
1880
1881 2011-01-29  Tobias Burnus  <burnus@net-b.de>
1882
1883         PR fortran/47531
1884         * check.c (gfc_check_shape): Support kind argument in SHAPE.
1885         * intrinsic.c (add_functions): Ditto.
1886         * resolve.c (gfc_resolve_shape): Ditto.
1887         * simplify.c (gfc_simplify_shape): Ditto.
1888         * intrinsic.h (gfc_check_shape, gfc_resolve_shape,
1889         gfc_simplify_shape): Update prototypes.
1890         * intrinisc.text (SHAPE): Document kind argument.
1891
1892 2011-01-28  Tobias Burnus  <burnus@net-b.de>
1893
1894         PR fortran/47507
1895         * resolve.c (resolve_formal_arglist): Allow arguments with VALUE
1896         attribute also without INTENT.
1897
1898 2011-01-28  Tobias Burnus  <burnus@net-b.de>
1899
1900         * gfortran.texi (Fortran 2003 status): Mention support for
1901         nonconstant namelist variables.
1902
1903 2011-01-28  Paul Thomas  <pault@gcc.gnu.org>
1904             Tobias Burnus  <burnus@gcc.gnu.org>
1905
1906         PR fortran/45170
1907         PR fortran/35810
1908         PR fortran/47350
1909         * interface.c (compare_actual_formal): An allocatable or pointer
1910         deferred length actual is only allowed if the formal argument
1911         is also deferred length. Clean up whitespace.
1912         * trans-expr.c (gfc_conv_procedure_call): Pass string length for
1913         deferred character length formal arguments by reference. Do the
1914         same for function results.
1915         (gfc_trans_pointer_assignment): Do not do runtime check of lhs
1916         and rhs character lengths, if deferred length lhs.  In this case
1917         set the lhs character length to that of the rhs.
1918         (gfc_conv_string_parameter): Remove assert that string length is
1919         an integer type.
1920         (is_scalar_reallocatable_lhs): New function.
1921         (alloc_scalar_allocatable_for_assignment): New function.
1922         (gfc_trans_assignment_1): Call above new function. If the rhs is
1923         a deferred character length itself, makes ure that the function
1924         is called before reallocation, so that the length is available.
1925         (gfc_trans_asssignment): Remove error about assignment to
1926         deferred length character variables.
1927         * gfortran.texi : Update entry about (re)allocation on
1928         assignment.
1929         * trans-stmt.c (gfc_trans_allocate): Add code to handle deferred
1930         length character variables.
1931         * module.c (mio_typespec): Transfer deferred characteristic.
1932         * trans-types.c (gfc_get_function_type): New code to generate
1933         hidden typelist, so that those character lengths that are
1934         passed by reference get the right type.
1935         * resolve.c (resolve_contained_fntype): Supress error for
1936         deferred character length functions.
1937         (resolve_function, resolve_fl_procedure) The same.
1938         (check_symbols): Remove the error that support for
1939         entity with deferred type parameter is not yet implemented.
1940         (resolve_fl_derived): The same.
1941         match.c (alloc_opt_list): Allow MOLD for deferred length object.
1942         * trans-decl.c (gfc_get_symbol_decl): For deferred character
1943         length dummies, generate a local variable for string length.
1944         (create_function_arglist): Hidden length can be a pointer.
1945         (gfc_trans_deferred_vars): For deferred character length
1946         results and dummies, assign the string length to the local
1947         variable from the hidden argument on entry and the other way
1948         round on exit, as appropriate.
1949
1950 2011-01-27  Tobias Burnus  <burnus@net-b.de>
1951
1952         PR fortran/47474
1953         * trans-decl.c (gfc_generate_function_code): Fix init
1954         of allocatable result variable with allocatable components.
1955
1956 2011-01-27  Tobias Burnus  <burnus@net-b.de>
1957
1958         PR fortran/47472
1959         * options.c (gfc_handle_module_path_options): Save
1960         module path without trailing slash as include path.
1961
1962 2011-01-25  Tobias Burnus  <burnus@net-b.de>
1963
1964         PR fortran/47448
1965         * interface.c (gfc_check_operator_interface): Fix
1966         defined-assignment check.
1967
1968 2011-01-23  Tobias Burnus  <burnus@net-b.de>
1969
1970         PR fortran/47421
1971         * trans-decl.c (gfc_trans_deferred_vars): Do not nullify
1972         scalar allocatable dummy arguments.
1973
1974 2011-01-22  Thomas Koenig  <tkoenig@gcc.gnu.org>
1975
1976         PR fortran/38536
1977         * resolve.c (gfc_iso_c_func_interface):  For C_LOC,
1978         check for array sections followed by component references
1979         which are illegal.  Also check for coindexed arguments.
1980
1981 2011-01-22  Tobias Burnus  <burnus@net-b.de>
1982
1983         PR fortran/47399
1984         * primary.c (gfc_match_varspec): Relax gcc_assert to allow for
1985         PARAMETER TBP.
1986
1987 2011-01-21  Tobias Burnus  <burnus@net-b.de>
1988
1989         PR fortran/47394
1990         * error.c (gfc_error_now, gfc_fatal_error, gfc_error_check):
1991         Use defined instead of magic number exit status codes.
1992         * scanner.c (include_line, gfc_new_file): Ditto.
1993
1994 2011-01-21  Tobias Burnus  <burnus@net-b.de>
1995
1996         PR fortran/47377
1997         * expr.c (gfc_check_pointer_assign): Reject expr data-targets
1998         without pointer attribute.
1999
2000 2011-01-18  Janus Weil  <janus@gcc.gnu.org>
2001
2002         PR fortran/47240
2003         * resolve.c (expression_rank): Fix rank of procedure poiner components.
2004         * trans-expr.c (gfc_conv_procedure_call): Take care of procedure
2005         pointer components as actual arguments.
2006
2007 2011-01-17  Jakub Jelinek  <jakub@redhat.com>
2008
2009         PR fortran/47331
2010         * gfortran.h (struct gfc_omp_saved_state): New type.
2011         (gfc_omp_save_and_clear_state, gfc_omp_restore_state): New prototypes.
2012         * resolve.c (resolve_global_procedure): Call it around gfc_resolve
2013         call.
2014         * openmp.c (gfc_omp_save_and_clear_state, gfc_omp_restore_state): New
2015         functions.
2016
2017 2011-01-17  Tobias Burnus  <burnus@net-b.de>
2018
2019         PR fortran/47327
2020         * invoke.texi (Options to request or suppress errors
2021         and warnings): Fix cross link.
2022
2023 2011-01-15  Tobias Burnus  <burnus@net-b.de>
2024
2025         * gfortran.texi: Update Fortran 2003 Status section.
2026
2027         PR fortran/47177
2028         * invoke.texi: Add missing "-E" to the -dM example.
2029
2030 2011-01-13  Tobias Burnus  <burnus@net-b.de>
2031
2032         PR fortran/47268
2033         * intrinsic.texi (get_command_argument, get_environment_variable):
2034         Mark arguments as optional in the Arguments section.
2035
2036 2011-01-13  Kai Tietz  <kai.tietz@onevision.com>
2037             Tobias Burnus  <burnus@net-b.de>
2038
2039         PR fortran/47260
2040         * trans-decl.c (gfc_get_extern_function_decl,
2041         build_function_decl): Set TREE_PUBLIC/TREE_EXTERNAL before
2042         calling decl_attributes.
2043
2044 2011-01-13  Tobias Burnus  <burnus@net-b.de>
2045             Mikael Morin  <mikael@gcc.gnu.org>
2046
2047         PR fortran/45848
2048         PR fortran/47204
2049         * gfortran.h (gfc_code): Move union ext's case_list into
2050         the struct block.
2051         * dump-parse-tree.c (show_code_node): Adapt by prefixing case_list
2052         by "block.".
2053         * frontend-passes.c (gfc_code_walker): Ditto.
2054         * match.c (gfc_match_goto, gfc_match_call, gfc_match_case,
2055         gfc_match_type_is, gfc_match_class_is): Ditto.
2056         * resolve.c (resolve_select, resolve_select_type): Ditto.
2057         * st.c (gfc_free_statement): Ditto.
2058         * trans-stmt.c (gfc_trans_integer_select, gfc_trans_logical_select,
2059         gfc_trans_character_select): Ditto.
2060         * parse.c (resolve_all_program_units): For error recovery, avoid
2061         segfault is proc_name is NULL.
2062
2063 2011-01-11  Paul Thomas  <pault@gcc.gnu.org>
2064
2065         PR fortran/47051
2066         * trans-array.c (gfc_alloc_allocatable_for_assignment): Change
2067         to be standard compliant by testing for shape rather than size
2068         before skipping reallocation. Improve comments.
2069
2070 2011-01-09  Janus Weil  <janus@gcc.gnu.org>
2071
2072         PR fortran/47224
2073         * resolve.c (resolve_actual_arglist): Remove unneeded and buggy piece
2074         of code.
2075
2076 2011-01-09  Thomas Koenig  <tkoenig@gcc.gnu.org>
2077
2078         PR fortran/38536
2079         * resolve.c (is_scalar_expr_ptr):  For a substring reference,
2080         use gfc_dep_compare_expr to compare start and end expession.
2081         Add FIXME for using gfc_deb_compare_expr elsewhere.
2082
2083 2011-01-09  Janus Weil  <janus@gcc.gnu.org>
2084
2085         PR fortran/46313
2086         * class.c (get_unique_type_string): Make type name start with upper
2087         case letter.
2088
2089 2011-01-08  Thomas Koenig  <tkoenig@gcc.gnu.org>
2090
2091         PR fortran/46405
2092         * invoke.texi:  Mention -ffree-line-length-none and
2093         -ffixed-line-length-none for preprocessing.
2094
2095 2011-01-08  Paul Thomas  <pault@gcc.gnu.org>
2096
2097         PR fortran/46896
2098         * trans-expr.c (gfc_conv_procedure_call): With a non-copying
2099         procedure argument (eg TRANSPOSE) use a temporary if there is
2100         any chance of aliasing due to host or use association.
2101         (arrayfunc_assign_needs_temporary): Correct logic for function
2102         results and do not use a temporary for implicitly PURE
2103         variables.  Use a temporary for Cray pointees.
2104         * symbol.c (gfc_add_save): Explicit SAVE not compatible with
2105         implicit pureness of containing procedure.
2106         * decl.c (match_old_style_init, gfc_match_data): Where decl
2107         would fail in PURE procedure, set implicit_pure to zero.
2108         * gfortran.h : Add implicit_pure to structure symbol_attr and
2109         add prototype for function gfc_implicit_pure.
2110         * expr.c (gfc_check_pointer_assign, gfc_check_vardef_context):
2111         Where decl would fail in PURE procedure, reset implicit_pure.
2112         * io.c (match_vtag, gfc_match_open, gfc_match_close,
2113         gfc_match_print, gfc_match_inquire, gfc_match_wait): The same.
2114         * match.c (gfc_match_critical, gfc_match_stopcode,
2115         sync_statement, gfc_match_allocate, gfc_match_deallocate): The
2116         same.
2117         * parse.c (decode_omp_directive): The same.
2118         (parse_contained): If not PURE, set implicit pure attribute.
2119         * resolve.c (resolve_formal_arglist, resolve_structure_cons,
2120         resolve_function, resolve_ordinary_assign) : The same.
2121         (gfc_implicit_pure): New function.
2122         * module.c (mio_symbol_attribute): Introduce AB_IMPLICIT_PURE
2123         to ab_attribute enum and use it in this function.
2124
2125 2011-01-08  Thomas Koenig  <tkoenig@gcc.gnu.org>
2126
2127         PR fortran/45777
2128         * symbol.c (gfc_symbols_could_alias):  Strip gfc_ prefix,
2129         make static and move in front of its only caller, to ...
2130         * trans-array.c (symbols_could_alias): ... here.
2131         Pass information about pointer and target status as
2132         arguments.  Allocatable arrays don't alias anything
2133         unless they have the POINTER attribute.
2134         (gfc_could_be_alias):  Keep track of pointer and target
2135         status when following references.  Also check if typespecs
2136         of components match those of other components or symbols.
2137
2138 2011-01-07  Tobias Burnus  <burnus@net-b.de>
2139
2140         PR fortran/41580
2141         * class.c (gfc_build_class_symbol): Mark __vtab as attr.vtab.
2142         * intrinsic.c (add_functions): Use simplify functions for
2143         EXTENDS_TYPE_OF and SAME_TYPE_AS.
2144         * intrinsic.h (gfc_simplify_extends_type_of,
2145         gfc_simplify_same_type_as): New prototypes.
2146         * simplify.c (is_last_ref_vtab, gfc_simplify_extends_type_of,
2147         gfc_simplify_same_type_as): New functions.
2148
2149 2011-01-07  Janus Weil  <janus@gcc.gnu.org>
2150
2151         PR fortran/47189
2152         PR fortran/47194
2153         * gfortran.h (gfc_lval_expr_from_sym): Moved prototype.
2154         * class.c (gfc_class_null_initializer): Initialize _vptr to declared
2155         type.
2156         * expr.c (gfc_lval_expr_from_sym): Moved here from symbol.c.
2157         * resolve.c (resolve_deallocate_expr): _data component will be added
2158         at translation stage.
2159         * symbol.c (gfc_lval_expr_from_sym): Moved to expr.c.
2160         * trans-stmt.c (gfc_trans_deallocate): Reset _vptr to declared type.
2161
2162 2011-01-06  Daniel Franke  <franke.daniel@gmail.com>
2163
2164         PR fortran/33117
2165         PR fortran/46478
2166         * parse.c (parse_interface): Remove check for procedure types.
2167         * interface.c (check_interface0): Verify that procedures are
2168         either all SUBROUTINEs or all FUNCTIONs.
2169
2170 2011-01-05  Janus Weil  <janus@gcc.gnu.org>
2171
2172         PR fortran/47180
2173         * trans-expr.c (gfc_trans_class_assign): Bugfix for r168524 (make sure
2174         'vtab' is initialized).
2175
2176 2011-01-05  Janus Weil  <janus@gcc.gnu.org>
2177
2178         PR fortran/47180
2179         * trans-expr.c (gfc_trans_class_assign): For a polymorphic NULL pointer
2180         assignment, set the _vptr component to the declared type.
2181
2182 2011-01-05  Thomas Koenig  <tkoenig@gcc.gnu.org>
2183
2184         PR fortran/46017
2185         * resolve.c (resolve_allocate_deallocate): Follow references to
2186         check for duplicate occurence of allocation/deallocation objects.
2187
2188 2011-01-05  Janus Weil  <janus@gcc.gnu.org>
2189
2190         PR fortran/47024
2191         * trans-decl.c (gfc_trans_deferred_vars): Initialize the _vpr component
2192         of polymorphic allocatables according to their declared type.
2193
2194 2011-01-04  Janus Weil  <janus@gcc.gnu.org>
2195
2196         PR fortran/46448
2197         * class.c (gfc_find_derived_vtab): Set the module field for the copying
2198         routine to make sure it receives module name mangling.
2199
2200 2011-01-03  Jakub Jelinek  <jakub@redhat.com>
2201
2202         * gfortranspec.c (lang_specific_driver): Update copyright notice
2203         dates.
2204
2205 2011-01-03  Janus Weil  <janus@gcc.gnu.org>
2206
2207         * intrinsic.texi (LEADZ): Fix example.
2208
2209 2011-01-02  Janus Weil  <janus@gcc.gnu.org>
2210
2211         PR fortran/46408
2212         * class.c (gfc_find_derived_vtab): Use EXEC_INIT_ASSIGN for __copy_
2213         routine.
2214
2215 \f
2216 Copyright (C) 2011 Free Software Foundation, Inc.
2217
2218 Copying and distribution of this file, with or without modification,
2219 are permitted in any medium without royalty provided the copyright
2220 notice and this notice are preserved.