OSDN Git Service

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