OSDN Git Service

Fix date on last entry.
[pf3gnuchains/gcc-fork.git] / gcc / fortran / ChangeLog
1 2009-06-07  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2
3         PR fortran/40008
4         * gfortran.h (gfc_open): Add newunit expression to structure.
5         * io.c (io_tag): Add new unit tag and fix whitespace.
6         (match_open_element): Add matching for newunit.
7         (gfc_free_open): Free the newunit expression.
8         (gfc_resolve_open): Add newunit to resolution and check constraints.
9         (gfc_resolve_close): Add check for non-negative unit.
10         (gfc_resolve_filepos): Likewise.
11         (gfc_resolve_dt): Likewise.
12         * trans-io.c (set_parameter_value): Build runtime checks for unit
13         numbers within range of kind=4 integer. (gfc_trans_open) Set the
14         newunit parameter.
15         * ioparm.def (IOPARM): Define the newunit parameter as a pointer
16         to GFC_INTEGER_4, pint4.
17
18 2009-06-07  Daniel Franke  <franke.daniel@gmail.com>
19
20         PR fortran/25104
21         PR fortran/29962
22         * array.c (gfc_append_constructor): Added NULL-check.
23         * check.c (gfc_check_spread): Check DIM.
24         (gfc_check_unpack): Check that the ARRAY arguments provides enough
25         values for MASK.
26         * intrinsic.h (gfc_simplify_spread): New prototype.
27         (gfc_simplify_unpack): Likewise.
28         * intrinsic.c (add_functions): Added new simplifier callbacks.
29         * simplify.c (gfc_simplify_spread): New.
30         (gfc_simplify_unpack): New.
31         * expr.c (check_transformational): Allow additional transformational
32         intrinsics in initialization expression.
33
34 2009-06-07  Daniel Franke  <franke.daniel@gmail.com>
35
36         PR fortran/25104
37         PR fortran/29962
38         * check.c (gfc_check_all_any): Check rank of DIM.
39         (gfc_check_count): Likewise.
40         * intrinsic.h (gfc_simplify_all): New prototype.
41         (gfc_simplify_any): Likewise.
42         (gfc_simplify_count): Likewise.
43         (gfc_simplify_sum): Likewise.
44         (gfc_simplify_product): Likewise.
45         * intrinsic.c (add_functions): Added new simplifier callbacks.
46         * simplify.c (transformational_result): New.
47         (simplify_transformation_to_scalar): New.
48         (simplify_transformation_to_array): New.
49         (gfc_count): New.
50         (gfc_simplify_all): New.
51         (gfc_simplify_any): New.
52         (gfc_simplify_count): New.
53         (gfc_simplify_sum): New.
54         (gfc_simplify_product): New.
55         * expr.c (check_transformational): Allow additional transformational
56         intrinsics in initialization expression.
57
58 2009-06-07  Daniel Franke  <franke.daniel@gmail.com>
59
60         * check.c (dim_rank_check): Return SUCCESS if DIM=NULL.
61         (gfc_check_lbound): Removed (now) redundant check for DIM=NULL.
62         (gfc_check_minloc_maxloc): Likewise.
63         (check_reduction): Likewise.
64         (gfc_check_size): Likewise.
65         (gfc_check_ubound): Likewise.
66         (gfc_check_cshift): Added missing shape-conformance checks.
67         (gfc_check_eoshift): Likewise.
68         * gfortran.h (gfc_check_conformance): Modified prototype to printf-style.
69         * expr.c (gfc_check_conformance): Accept error-message chunks in 
70         printf-style. Changed all callers.
71
72
73 2009-06-07  Daniel Franke  <franke.daniel@gmail.com>
74
75         PR fortran/25104
76         PR fortran/29962
77         * intrinsic.h (gfc_simplify_dot_product): New prototype.
78         (gfc_simplify_matmul): Likewise.
79         (gfc_simplify_transpose): Likewise.
80         * intrinsic.c (add_functions): Added new simplifier callbacks.
81         * simplify.c (init_result_expr): New.
82         (compute_dot_product): New.
83         (gfc_simplify_dot_product): New.
84         (gfc_simplify_matmul): New.
85         (gfc_simplify_transpose): New.
86         * expr.c (check_transformational): Allow transformational intrinsics
87         with simplifier in initialization expression.
88
89 2009-06-06  Daniel Franke  <franke.daniel@gmail.com>
90
91         PR fortran/37203
92         * simplify.c (gfc_simplify_reshape): Fixed reshaping of empty arrays
93         without padding.
94
95 2009-06-06  Daniel Franke  <franke.daniel@gmail.com>
96
97         PR fortran/32890
98         * intrinsic.h (gfc_simplify_pack): New prototype.
99         * intrinsic.c (add_functions): Added
100         simplifier-callback to PACK.
101         * simplify.c (is_constant_array_expr): Moved
102         to beginning of file.
103         (gfc_simplify_pack): New.
104         * check.c (gfc_check_pack): Check that VECTOR has enough elements.
105         Added safeguards for empty arrays.
106
107 2009-06-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
108
109         * simplify.c (call_mpc_func): Use mpc_realref/mpc_imagref
110         instead of MPC_RE/MPC_IM.
111
112 2009-06-05  Alexandre Oliva  <aoliva@redhat.com>
113
114         * trans-decl.c (gfc_build_qualified_array): Don't skip generation
115         of range types.
116         * trans.h (struct lang_type): Add base_decls.
117         (GFC_TYPE_ARRAY_BASE_DECL): New.
118         * trans-types.c (gfc_get_array_type_bounds): Initialize base decls
119         proactively and excessively.
120         (gfc_get_array_descr_info): Use existing base decls if available.
121
122 2009-06-04  Daniel Franke  <franke.daniel@gmail.com>
123
124         PR fortran/37203
125         * check.c (gfc_check_reshape): Additional checks for the
126         SHAPE and ORDER arguments.
127         * simplify.c (gfc_simplify_reshape): Converted argument checks
128         to asserts.
129
130 2009-06-03  Tobias Burnus  <burnus@net-b.de>
131
132         * gfortran.texi: Add mixed-language programming, mention
133         varying string lengths, some clean up of introduction parts.
134         * intrinsic.texi (instrinsic modules): Create @menu for subsections.
135         (ISO_C_BINDING): Support ISOCBINDING_INT_FAST128_T.
136         * libgfortran.h: Comment to rember to keep gfortran.texi in sync.
137         * iso-c-binding.def: Support ISOCBINDING_INT_FAST128_T.
138
139 2009-06-03  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
140             Tobias Burnus  <burnus@net-b.de>
141
142         * iso-c-binding.def: Use INTMAX_TYPE instead of intmax_type_node.
143         * trans-types.c (init_c_interop_kinds): Remove intmax_type_node.
144
145 2009-06-03  Alexandre Oliva  <aoliva@redhat.com>
146
147         * module.c (mio_f2k_derived): Initialize cur.
148
149 2009-06-01  Tobias Burnus  <burnus@net-b.de>
150
151         PR fortran/40309
152         * trans-decl.c (gfc_sym_identifier): Use "MAIN__" for PROGRAM "main".
153         (create_main_function): Set main_identifier_node.
154
155 2009-05-29  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
156
157         PR fortran/40019
158         * trans-types.c (gfc_build_uint_type): Make nonstatic.
159         * trans.h (gfor_fndecl_clz128, gfor_fndecl_ctz128): New prototypes.
160         * trans-types.h (gfc_build_uint_type): Add prototype.
161         * trans-decl.c (gfc_build_intrinsic_function_decls): Build
162         gfor_fndecl_clz128 and gfor_fndecl_ctz128.
163         * trans-intrinsic.c (gfc_conv_intrinsic_leadz,
164         gfc_conv_intrinsic_trailz): Call the right builtins or library
165         functions, and cast arguments to unsigned types first.
166         * simplify.c (gfc_simplify_leadz): Deal with negative arguments.
167
168 2009-05-27  Ian Lance Taylor  <iant@google.com>
169
170         * Make-lang.in (gfortran$(exeext)): Change $(COMPILER) to
171         $(LINKER).
172         (f951$(exeext)): Likewise.
173
174 2009-05-27  Tobias Burnus  <burnus@net-b.de>
175
176         PR fortran/40270
177         * trans-decl.c (create_main_function): Mark MAIN__ and
178         argc/argv as TREE_USED and push/pop function_decl context
179         if needed.
180
181 2009-05-26  Tobias Burnus  <burnus@net-b.de>
182
183         PR fortran/39178
184         * gfortranspec.c (lang_specific_driver): Stop linking
185         libgfortranbegin.
186         * trans-decl.c (gfc_build_builtin_function_decls): Stop
187         making MAIN__ publicly visible.
188         (gfc_build_builtin_function_decls): Add
189         gfor_fndecl_set_args.
190         (create_main_function) New function.
191         (gfc_generate_function_code): Use it.
192
193 2009-05-26  Tobias Burnus  <burnus@net-b.de>
194
195         PR fortran/40246
196         * match.c (gfc_match_nullify): NULLify freed pointer.
197
198 2009-05-26  Ian Lance Taylor  <iant@google.com>
199
200         * Make-lang.in (gfortranspec.o): Use $(COMPILER).
201         (gfortran$(exeext), f951$(exeext), fortran/cpp.o): Likewise.
202
203 2009-05-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
204
205         * gfortran.h (GFC_MPC_RND_MODE): New.
206         * simplify.c (call_mpc_func): New helper function.
207         (gfc_simplify_cos, gfc_simplify_exp, gfc_simplify_log,
208         gfc_simplify_sin, gfc_simplify_sqrt): Add MPC support.
209
210 2009-05-25  Janus Weil  <janus@gcc.gnu.org>
211
212         PR fortran/40176
213         * primary.c (gfc_match_varspec): Handle procedure pointer components
214         with array return value.
215         * resolve.c (resolve_expr_ppc): Ditto.
216         (resolve_symbol): Make sure the interface of a procedure pointer has
217         been resolved.
218         * trans-array.c (gfc_walk_function_expr): Handle procedure pointer
219         components with array return value.
220         * trans-expr.c (gfc_conv_component_ref,gfc_conv_procedure_call,
221         gfc_trans_arrayfunc_assign): Ditto.
222         (gfc_trans_pointer_assignment): Handle procedure pointer assignments,
223         where the rhs is a dummy argument.
224         * trans-types.c (gfc_get_ppc_type,gfc_get_derived_type): Handle
225         procedure pointer components with array return value.
226
227 2009-05-24  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
228             Dominique Dhumieres
229
230         PR fortran/35732
231         PR fortran/39872
232         * trans-array.c (gfc_conv_ss_startstride): Add one to index.
233
234 2009-05-22  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
235
236         PR fortran/40195
237         * module.c (read_md5_from_module_file): Close file before returning.
238
239 2009-05-18  Janus Weil  <janus@gcc.gnu.org>
240
241         PR fortran/40164
242         * primary.c (gfc_match_rvalue): Handle procedure pointer components in
243         arrays.
244         * resolve.c (resolve_ppc_call,resolve_expr_ppc): Resolve component and
245         array references.
246         (resolve_fl_derived): Procedure pointer components are not required to
247         have constant array bounds in their return value.
248
249 2009-05-18  Janus Weil  <janus@gcc.gnu.org>
250
251         * intrinsic.c (add_sym): Fix my last commit (r147655),
252         which broke bootstrap.
253
254 2009-05-18  Richard Guenther  <rguenther@suse.de>
255
256         PR fortran/40168
257         * trans-expr.c (gfc_trans_zero_assign): For local array
258         destinations use an assignment from an empty constructor.
259
260 2009-05-18  Janus Weil  <janus@gcc.gnu.org>
261
262         PR fortran/36947
263         PR fortran/40039
264         * expr.c (gfc_check_pointer_assign): Check intents when comparing
265         interfaces.
266         * gfortran.h (typedef struct gfc_intrinsic_arg): Add 'intent' member.
267         (gfc_compare_interfaces): Additional argument.
268         * interface.c (operator_correspondence): Add check for equality of
269         intents, and new argument 'intent_check'.
270         (gfc_compare_interfaces): New argument 'intent_check', which is passed
271         on to operator_correspondence.
272         (check_interface1): Don't check intents when comparing interfaces.
273         (compare_parameter): Do check intents when comparing interfaces.
274         * intrinsic.c (add_sym): Add intents for arguments of intrinsic
275         procedures.
276         (add_sym_1,add_sym_1s,add_sym_1m,add_sym_2,add_sym_2s,add_sym_3,
277         add_sym_3ml,add_sym_3red,add_sym_3s,add_sym_4): Use INTENT_IN by
278         default.
279         (add_sym_1_intent,add_sym_1s_intent,add_sym_2s_intent,add_sym_3s_intent)
280         : New functions to add intrinsic symbols, specifying custom intents.
281         (add_sym_4s,add_sym_5s): Add new arguments to specify intents.
282         (add_functions,add_subroutines): Add intents for various intrinsics.
283         * resolve.c (check_generic_tbp_ambiguity): Don't check intents when
284         comparing interfaces.
285         * symbol.c (gfc_copy_formal_args_intr): Copy intent.
286
287 2009-05-17  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
288
289         * iso-fortran-env.def: Define INT8, INT16, INT32, INT64, REAL32,
290         REAL64 and REAL128.
291         * gfortran.h (gfc_get_int_kind_from_width_isofortranenv,
292         gfc_get_real_kind_from_width_isofortranenv): New prototypes.
293         * iso-c-binding.def: Update definitions for the INT*_T,
294         INT_LEAST*_T and INT_FAST*_T named parameters.
295         * trans-types.c (get_typenode_from_name, get_int_kind_from_name,
296         gfc_get_real_kind_from_width_isofortranenv): New functions.
297
298 2009-05-17  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
299
300         PR fortran/36260
301         * intrinsic.c (add_functions, add_subroutines): Fix argument
302         names and wrap long lines.
303         * intrinsic.texi: Fix documentation and argument names of
304         LOG_GAMMA, DATAN2, DBESJN, DTIME, ETIME, FSTAT, STAT, LSTAT,
305         GET_COMMAND, IDATE, LTIME, MOVE_ALLOC, NINT, OR, PRODUCT,
306         SUM, RAND, RANDOM_SEED, REAL, SELECTED_INT_KIND,
307         SELECTED_REAL_KIND and XOR.
308
309 2009-05-16  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
310
311         PR fortran/33197
312         * intrinsic.c (add_functions): Use ERFC_SCALED simplification.
313         * intrinsic.h (gfc_simplify_erfc_scaled): New prototype.
314         * simplify.c (fullprec_erfc_scaled, asympt_erfc_scaled,
315         gfc_simplify_erfc_scaled): New functions.
316
317 2009-05-16  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
318
319         PR fortran/31243
320         * resolve.c (resolve_substring): Don't allow too large substring
321         indexes.
322         (gfc_resolve_substring_charlen): Fix typo.
323         (gfc_resolve_character_operator): Fix typo.
324         (resolve_charlen): Catch unreasonably large string lengths.
325         * simplify.c (gfc_simplify_len): Don't error out on LEN
326         range checks.
327
328 2009-05-16  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
329
330         PR fortran/36031
331         * decl.c (set_enum_kind): Use global short-enums flag.
332         * gfortran.h (gfc_option_t): Remove short_enums flag.
333         * lang.opt (-fshort-enums): Refer to C documentation.
334         * options.c (gfc_init_options, gfc_handle_option): Use global
335         short-enums flag.
336
337 2009-05-15  Tobias Burnus  <burnus@net-b.de>
338
339         PR fortran/39352
340         * f95-lang.c: Add gfc_maybe_initialize_eh.
341         * gfortran.h: Add gfc_maybe_initialize_eh prototype.
342         * Make-lang.in: Add new .h dendencies for f95-lang.c
343         * openmp.c (resolve_omp_do): Call gfc_maybe_initialize_eh.
344         * misc.c (gfc_free): Avoid #define trickery for free.
345
346 2009-05-14  Steven G. Kargl  <kargl@gcc.gnu.org>
347
348         * dump-parse-tree.c (show_code_node): Add ERRMSG to the dumping
349         of allocate and deallocate statements.
350
351 2009-05-14  Ian Lance Taylor  <iant@google.com>
352
353         * decl.c (match_attr_spec): Change d to unsigned int.
354         * dump-parse-tree.c (show_namespace): Change op to int.  Add cast.
355         * interface.c (gfc_check_interfaces): Change i to int.  Add casts.
356         * module.c (read_module): Change i to int.  Add cast.
357         (write_module): Change i to int.
358         * symbol.c (gfc_get_namespace): Change in to int.
359         (gfc_free_namespace): Change i to int.
360         * trans-io.c (gfc_build_io_library_fndecls): Change ptype to
361         unsigned int.  Add cast.
362         * trans-types.c (gfc_init_kinds): Change mode to unsigned int.
363         Add casts.
364
365 2009-05-14  Daniel Kraft  <d@domob.eu>
366
367         PR fortran/40045
368         * dump-parse-tree.c (show_typebound): Fix missing adaption to new
369         type-bound procedure storage structure.
370
371 2009-05-14  Janus Weil  <janus@gcc.gnu.org>
372
373         PR fortran/39996
374         * decl.c (gfc_match_function_decl): Use gfc_add_type.
375         * symbol.c (gfc_add_type): Better checking for duplicate types in
376         function declarations. And: Always give an error for duplicte types,
377         not just a warning with -std=gnu.
378
379 2009-05-14  Jakub Jelinek  <jakub@redhat.com>
380
381         PR fortran/39865
382         * io.c (resolve_tag_format): CHARACTER array in FMT= argument
383         isn't an extension.  Reject non-CHARACTER array element of
384         assumed shape or pointer or assumed size array.
385         * trans-array.c (array_parameter_size): New function.
386         (gfc_conv_array_parameter): Add size argument.  Call
387         array_parameter_size if it is non-NULL.
388         * trans-array.h (gfc_conv_array_parameter): Adjust prototype.
389         * trans-expr.c (gfc_conv_function_call, gfc_trans_arrayfunc_assign):
390         Adjust callers.
391         * trans-intrinsic.c (gfc_conv_intrinsic_loc): Likewise.
392         * trans-io.c (gfc_convert_array_to_string): Rewritten.
393
394 2009-05-13  Steven G. Kargl  <kargl@gcc.gnu.org>
395
396         * gfortran.h (gfc_code): Rename struct member expr to expr1.
397         * openmp.c (resolve_omp_atomic): Update expr to expr1.
398         * interface.c (gfc_extend_assign): Ditto.
399         * trans-expr.c (gfc_conv_expr_reference, gfc_trans_assignment,
400         gfc_trans_init_assign): Ditto.
401         * dump-parse-tree.c (show_code_node): Ditto.
402         * trans-openmp.c (gfc_trans_omp_atomic): Ditto.
403         * trans-stmt.c ( gfc_trans_label_assign, gfc_trans_goto, gfc_trans_call,
404         gfc_trans_return, gfc_trans_pause, gfc_trans_stop, gfc_trans_if_1,
405         gfc_trans_arithmetic_if, gfc_trans_do_while, gfc_trans_integer_select,
406         gfc_trans_logical_select, gfc_trans_character_select
407         forall_make_variable_temp, check_forall_dependencies
408         gfc_trans_forall_1, gfc_trans_where_2, gfc_trans_where_3
409         gfc_trans_where, gfc_trans_allocate, gfc_trans_deallocate): Ditto.
410         * io.c (match_io_element, gfc_match_inquire): Ditto.
411         * resolve.c (resolve_typebound_call, resolve_ppc_call,
412         resolve_allocate_expr, resolve_allocate_deallocate, resolve_select,
413         resolve_transfer, resolve_where, gfc_resolve_assign_in_forall,
414         gfc_resolve_blocks, resolve_code, build_init_assign): Ditto.
415         * st.c (gfc_free_statement): Ditto.
416         * match.c (gfc_match_assignment, gfc_match_pointer_assignment,
417         match_arithmetic_if, gfc_match_if, gfc_match_elseif
418         gfc_match_stopcode, gfc_match_assign, gfc_match_goto,
419         gfc_match_nullify, match_typebound_call, gfc_match_call
420         gfc_match_select, match_simple_where, gfc_match_where
421         gfc_match_elsewhere, match_simple_forall, gfc_match_forall): Ditto.
422         * trans-io.c (gfc_trans_transfer): Ditto.
423         * parse.c (parse_where_block, parse_if_block): Ditto.
424
425 2009-05-13  Steven G. Kargl  <kargl@gcc.gnu.org>
426
427         * gfortran.h (gfc_code): Rename struct member label to label1.
428         * dump-parse-tree.c (show_code_node): Update symbol.
429         * trans-stmt.c (gfc_trans_label_assign, gfc_trans_goto,
430         gfc_trans_arithmetic_if): Ditto.
431         * resolve.c (gfc_resolve_blocks, resolve_code): Ditto.
432         * match.c (match_arithmetic_if, gfc_match_if, gfc_reference_st_label,
433         gfc_match_assign, gfc_match_goto): Ditto.
434         * parse.c (parse_do_block): Ditto.
435
436 2009-05-13  Tobias Burnus  <burnus@net-b.de>
437
438         PR fortran/34153
439         * gfortran.h (gfc_exec_op): Add EXEC_END_PROCEDURE.
440         * dump-parse-tree.c (show_code_node): Use EXEC_END_PROCEDURE.
441         * trans.c (gfc_trans_code): Ditto.
442         * resolve.c (resolve_code): Ditto.
443         * st.c (gfc_free_statement): Ditto.
444         * parse.c (accept_statement): Ditto.
445
446 2009-05-12  Tobias Burnus  <burnus@net-b.de>
447
448         PR fortran/40110
449         * decl.c (gfc_match_kind_spec): Turn C kind error into a warning.
450
451 2009-05-11  Steve Ellcey  <sje@cup.hp.com>
452
453         * resolve.c (check_host_association): Initialize tail.
454
455 2009-05-11  Janus Weil  <janus@gcc.gnu.org>
456
457         PR fortran/40089
458         * resolve.c (resolve_fl_derived): Only return FAILURE if
459         gfc_notify_std fails.
460
461 2009-05-10  Ian Lance Taylor  <iant@google.com>
462
463         * gfortran.h (enum gfc_omp_sched_kind): New enum, broken out of
464         gfc_omp_clauses.
465         (enum gfc_omp_default_sharing): Likewise.
466         * module.c (enum gfc_rsym_state): New enum, broken out of
467         pointer_info.
468         (enum gfc_wsym_state): Likewise.
469         * parse.c (enum state_order): New enum, broken out of st_state.
470
471 2009-05-10  Paul Thomas  <pault@gcc.gnu.org>
472
473         PR fortran/40018
474         * trans-array.c (gfc_trans_array_constructor_value): Fold
475         convert numeric constants.
476         (gfc_build_constant_array_constructor): The same.
477
478 2009-05-10  Paul Thomas  <pault@gcc.gnu.org>
479
480         PR fortran/38863
481         * trans-expr.c (gfc_conv_operator_assign): Remove function.
482         * trans.h : Remove prototype for gfc_conv_operator_assign.
483         * trans-stmt.c (gfc_conv_elemental_dependencies): Initialize
484         derivde types with intent(out).
485         (gfc_trans_call): Add mask, count1 and invert arguments. Add
486         code to use mask for WHERE assignments.
487         (gfc_trans_forall_1): Use new arguments for gfc_trans_call.
488         (gfc_trans_where_assign): The gfc_symbol argument is replaced
489         by the corresponding code. If this has a resolved_sym, then
490         gfc_trans_call is called. The call to gfc_conv_operator_assign
491         is removed.
492         (gfc_trans_where_2): Change the last argument in the call to
493         gfc_trans_where_assign.
494         * trans-stmt.h : Modify prototype for gfc_trans_call.
495         * trans.c (gfc_trans_code): Use new args for gfc_trans_call.
496
497 2009-05-08  Janus Weil  <janus@gcc.gnu.org>
498
499         PR fortran/39876
500         * intrinsic.c (gfc_is_intrinsic): Do not add the EXTERNAL attribute if
501         the symbol is a module procedure.
502
503 2009-05-08  Tobias Burnus  <burnus@net-b.de>
504
505         * invoke.texi: Add do/recursion to the -fcheck= summary.
506
507 2009-05-07  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
508
509         PR fortran/38830
510         * gfortran.texi: Document that we don't support variable FORMAT
511         expressions.
512
513 2009-05-07  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
514
515         PR fortran/39576
516         * error.c (error_print): Add missing break statement.
517
518 2009-05-07  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
519
520         PR fortran/36382
521         * invoke.texi: Document that -fdollar-ok does not allow $ to be
522         used in IMPLICIT statement.
523
524 2009-05-06  Janus Weil  <janus@gcc.gnu.org>
525             Paul Thomas  <pault@gcc.gnu.org>
526
527         PR fortran/39630
528         * decl.c (match_procedure_interface): New function to match the
529         interface for a PROCEDURE statement.
530         (match_procedure_decl): Call match_procedure_interface.
531         (match_ppc_decl): New function to match the declaration of a
532         procedure pointer component.
533         (gfc_match_procedure):  Call match_ppc_decl.
534         (match_binding_attributes): Add new argument 'ppc' and handle the
535         POINTER attribute for procedure pointer components.
536         (match_procedure_in_type,gfc_match_generic): Added new argument to
537         match_binding_attributes.
538         * dump-parse-tree.c (show_expr,show_components,show_code_node): Handle
539         procedure pointer components.
540         * expr.c (free_expr0,gfc_copy_expr,gfc_simplify_expr): Handle EXPR_PPC.
541         (gfc_check_pointer_assign): Handle procedure pointer components, but no
542         full checking yet.
543         (is_proc_ptr_comp): New function to determine if an expression is a
544         procedure pointer component.
545         * gfortran.h (expr_t): Add EXPR_PPC.
546         (symbol_attribute): Add new member 'proc_pointer_comp'.
547         (gfc_component): Add new member 'formal'.
548         (gfc_exec_op): Add EXEC_CALL_PPC.
549         (gfc_get_default_type): Changed first argument.
550         (is_proc_ptr_comp): Add prototype.
551         (gfc_match_varspec): Add new argument.
552         * interface.c (compare_actual_formal): Handle procedure pointer
553         components.
554         * match.c (gfc_match_pointer_assignment,match_typebound_call): Handle
555         procedure pointer components.
556         * module.c (mio_expr): Handle EXPR_PPC.
557         * parse.c (parse_derived): Handle procedure pointer components.
558         * primary.c (gfc_match_varspec): Add new argument 'ppc_arg' and handle
559         procedure pointer components.
560         (gfc_variable_attr): Handle procedure pointer components.
561         (gfc_match_rvalue): Added new argument to gfc_match_varspec and changed
562         first argument of gfc_get_default_type.
563         (match_variable): Added new argument to gfc_match_varspec.
564         * resolve.c (resolve_entries,set_type,resolve_fl_parameter): Changed
565         first argument of gfc_get_default_type.
566         (resolve_structure_cons,resolve_actual_arglist): Handle procedure
567         pointer components.
568         (resolve_ppc_call): New function to resolve a call to a procedure
569         pointer component (subroutine).
570         (resolve_expr_ppc): New function to resolve a call to a procedure
571         pointer component (function).
572         (gfc_resolve_expr): Handle EXPR_PPC.
573         (resolve_code): Handle EXEC_CALL_PPC.
574         (resolve_fl_derived): Copy the interface for a procedure pointer
575         component.
576         (resolve_symbol): Fix overlong line.
577         * st.c (gfc_free_statement): Handle EXEC_CALL_PPC.
578         * symbol.c (gfc_get_default_type): Changed first argument.
579         (gfc_set_default_type): Changed first argument of gfc_get_default_type.
580         (gfc_add_component): Initialize ts.type to BT_UNKNOWN.
581         * trans.h (gfc_conv_function_call): Renamed.
582         * trans.c (gfc_trans_code): Handle EXEC_CALL_PPC.
583         * trans-expr.c (gfc_conv_component_ref): Ditto.
584         (gfc_conv_function_val): Rename to 'conv_function_val', add new
585         argument 'expr' and handle procedure pointer components.
586         (gfc_conv_operator_assign): Renamed gfc_conv_function_val.
587         (gfc_apply_interface_mapping_to_expr): Handle EXPR_PPC.
588         (gfc_conv_function_call): Rename to 'gfc_conv_procedure_call', add new
589         argument 'expr' and handle procedure pointer components.
590         (gfc_get_proc_ptr_comp): New function to get the backend decl for a
591         procedure pointer component.
592         (gfc_conv_function_expr): Renamed gfc_conv_function_call.
593         (gfc_conv_structure): Handle procedure pointer components.
594         * trans-intrinsic.c (gfc_conv_intrinsic_funcall,
595         conv_generic_with_optional_char_arg): Renamed gfc_conv_function_call.
596         * trans-stmt.h (gfc_get_proc_ptr_comp): Add prototype.
597         * trans-stmt.c (gfc_trans_call): Renamed gfc_conv_function_call.
598         * trans-types.h (gfc_get_ppc_type): Add prototype.
599         * trans-types.c (gfc_get_ppc_type): New function to build a tree node
600         for a procedure pointer component.
601         (gfc_get_derived_type): Handle procedure pointer components.
602
603 2009-05-06  Tobias Burnus  <burnus@net-b.de>
604
605         PR fortran/40041
606         * resolve.c (resolve_symbol): Print no warning for implicitly
607         typed intrinsic functions.
608
609 2009-05-05  Janus Weil  <janus@gcc.gnu.org>
610
611         PR fortran/39998
612         * expr.c (gfc_check_pointer_assign): Check for statement functions and
613         internal procedures in procedure pointer assignments.
614
615 2009-04-28  Janus Weil  <janus@gcc.gnu.org>
616
617         PR fortran/39946
618         * resolve.c (resolve_symbol): Correctly copy the interface of a
619         PROCEDURE statement if the interface involves a RESULT variable.
620
621 2009-04-28  Janus Weil  <janus@gcc.gnu.org>
622
623         PR fortran/39930
624         PR fortran/39931
625         * expr.c (gfc_check_pointer_assign): Correctly detect if the left hand
626         side is a pointer.
627         * parse.c (gfc_fixup_sibling_symbols): Don't check for ambiguity.
628
629 2009-04-28  Paul Thomas  <pault@gcc.gnu.org>
630
631         PR fortran/39879
632         * trans_expr.c (gfc_conv_procedure_call): Deep copy a derived
633         type parentheses argument if it is a variable with allocatable
634         components.
635
636 2009-04-27  Ian Lance Taylor  <iant@google.com>
637
638         * trans-intrinsic.c (DEFINE_MATH_BUILTIN): Add casts to enum
639         type.
640         * trans-io.c (st_parameter_field): Add casts to enum type.
641
642 2009-04-26  Steven G. Kargl  <kargl@gcc.gnu.org>
643
644         PR fortran/39893
645         fortran/data.c (gfc_assign_data_value): If the lvalue is an 
646         assumed character length entity in a data statement, then 
647         return FAILURE to prevent segmentation fault.
648
649 2009-04-26  Jakub Jelinek  <jakub@redhat.com>
650
651         * trans-decl.c: Include pointer-set.h.
652         (nonlocal_dummy_decl_pset, tree nonlocal_dummy_decls): New variables.
653         (gfc_nonlocal_dummy_array_decl): New function.
654         (gfc_get_symbol_decl): Call it for non-local dummy args with saved
655         descriptor.
656         (gfc_get_symbol_decl): Set DECL_BY_REFERENCE when needed.
657         (gfc_generate_function_code): Initialize nonlocal_dummy_decl{s,_pset},
658         chain it to outermost block's vars, destroy it afterwards.
659         * Make-lang.in (trans-decl.o): Depend on pointer-set.h.
660
661 2009-04-25  Janus Weil  <janus@gcc.gnu.org>
662
663         PR fortran/39688
664         * decl.c (gfc_match_import): Use 'sym->name' instead of 'name'.
665         They differ if the symbol has been use-renamed.
666
667 2009-04-24  Ian Lance Taylor  <iant@google.com>
668
669         * gfortran.h (enum gfc_symbol_type): New named enum type, broken
670         out of struct gfc_symbol.
671         (struct gfc_symbol): Use enum gfc_symbol_type.
672         (enum gfc_array_ref_dimen_type): New named enum type, broken out
673         of struct gfc_array_ref).
674         (struct gfc_array_ref): Use enum gfc_array_ref_dimen_type.
675         (mod_pointee_as): Update declaration.
676         * decl.c (add_global_entry): Change type to enum gfc_symbol_type.
677         (gfc_mod_pointee_as): Change return type to "match".
678         * module.c (mio_array_ref): Add cast to enum type.
679         (mio_symbol): Likewise.
680         * resolve.c (resolve_global_procedure): Change type to enum
681         gfc_symbol_type.
682         * trans-io.c (gfc_build_st_parameter): Change type to unsigned
683         int.
684
685 2009-04-24  Daniel Kraft  <d@domob.eu>
686
687         * gfortran.h (gfc_get_typebound_proc): Removed as macro, now a function.
688         (struct gfc_symtree): Moved "typebound" member inside union.
689         (struct gfc_namespace): Add "tb_sym_root" as new symtree to sort out
690         type-bound procedures there.
691         (gfc_get_tbp_symtree): New procedure.
692         * symbol.c (tentative_tbp_list): New global.
693         (gfc_get_namespace): NULL new "tb_sym_root" member.
694         (gfc_new_symtree): Removed initialization of "typebound" member.
695         (gfc_undo_symbols): Process list of tentative tbp's.
696         (gfc_commit_symbols): Ditto.
697         (free_tb_tree): New method.
698         (gfc_free_namespace): Call it.
699         (gfc_get_typebound_proc): New method.
700         (gfc_get_tbp_symtree): New method.
701         (gfc_find_typebound_proc): Adapt to structural changes of gfc_symtree
702         and gfc_namespace with regards to tbp's.
703         * dump-parse-tree.c (show_typebound): Ditto.
704         * primary.c (gfc_match_varspec): Ditto.  Don't reference tbp-symbol
705         as it isn't a symbol any longer.
706         * module.c (mio_typebound_symtree): Adapt to changes.
707         (mio_typebound_proc): Ditto, create symtrees using "gfc_get_tbp_symtree"
708         rather than "gfc_get_sym_tree".
709         (mio_f2k_derived): Ditto.
710         * decl.c (match_procedure_in_type): Ditto.
711         (gfc_match_generic): Ditto.  Don't reference tbp-symbol.
712         * resolve.c (check_typebound_override): Adapt to changes.
713         (resolve_typebound_generic): Ditto.
714         (resolve_typebound_procedures): Ditto.
715         (ensure_not_abstract_walker): Ditto.
716         (ensure_not_abstract): Ditto.
717         (resolve_typebound_procedure): Ditto, ignore erraneous symbols (for
718         instance, through removed tentative ones).
719         * gfc-internals.texi (Type-bound procedures): Document changes.
720
721 2009-04-24  Janus Weil  <janus@gcc.gnu.org>
722
723         PR fortran/39861
724         PR fortran/39864
725         * symbol.c (gfc_copy_formal_args_intr): Set attr.flavor and attr.dummy
726         for the formal arguments.
727
728 2009-04-21  Taras Glek <tglek@mozilla.com>
729
730         * f95-lang.c: Update GTY annotations to new syntax.
731         * trans-intrinsic.c: Likewise.
732         * trans-io.c: Likewise.
733         * trans.h: Likewise.
734
735 2009-04-22  Janus Weil  <janus@gcc.gnu.org>
736
737         PR fortran/39735
738         * decl.c (add_hidden_procptr_result): Bugfix for procptr results.
739         (match_procedure_decl): Set if_source.
740         * expr.c (gfc_check_pointer_assign): Bugfix: Return after error.
741         And: Check interface also for IFSRC_UNKNOWN (return type may be known).
742         * gfortran.h (typedef enum ifsrc): Remove IFSRC_USAGE,
743         add documentation. Rename copy_formal_args and copy_formal_args_intr.
744         * interface.c (gfc_compare_interfaces): Check for return types,
745         handle IFSRC_UNKNOWN.
746         (compare_intr_interfaces,compare_actual_formal_intr): Obsolete, removed.
747         (gfc_procedure_use): Modified handling of intrinsics.
748         * intrinsic.c (add_functions): Bugfix for "dim".
749         * resolve.c (resolve_intrinsic): New function to resolve intrinsics,
750         which copies the interface from isym to sym.
751         (resolve_procedure_expression,resolve_function): Use new function
752         'resolve_intrinsic'.
753         (resolve_symbol): Add function attribute for externals with return type
754         and use new function 'resolve_intrinsic'.
755         * symbol.c (ifsrc_types): Remove string for IFSRC_USAGE.
756         (copy_formal_args): Renamed to gfc_copy_formal_args.
757         (copy_formal_args_intr): Renamed to gfc_copy_formal_args_intr.
758         * trans-const.c (gfc_conv_const_charlen): Handle cl==NULL.
759
760 2009-04-21  Joseph Myers  <joseph@codesourcery.com>
761
762         * ChangeLog, ChangeLog-2002, ChangeLog-2003, ChangeLog-2004,
763         ChangeLog-2005, ChangeLog-2006, ChangeLog-2007, ChangeLog-2008,
764         ChangeLog.ptr, config-lang.in, ioparm.def, mathbuiltins.def: Add
765         copyright and license notices.
766         * ChangeLog, ChangeLog-2005, ChangeLog-2006, ChangeLog-2007,
767         ChangeLog-2008: Correct dates.
768
769 2009-04-20  Tobias Burnus  <burnus@net-b.de>
770
771         PR fortran/39811
772         * scanner.c (load_line): Fix bogus "&" compile-time diagnostic.
773
774 2009-04-20  Paul Thomas  <pault@gcc.gnu.org>
775
776         PR fortran/39800
777         * resolve.c (is_sym_host_assoc): New function.
778         (resolve_fl_derived): Call it when checking PRIVATE components
779         of PUBLIC derived types.  Change gfc_error to a gfc_notify_std
780         with std=f2003.
781         (resolve_fl_namelist): Call it twice to check for host
782         association.
783
784 2009-04-20  Ian Lance Taylor  <iant@google.com>
785
786         * module.c (import_iso_c_binding_module): Add casts to enum type.
787         * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Change op to enum
788         tree_code.
789         (gfc_conv_intrinsic_anyall): Likewise.
790         (gfc_conv_intrinsic_arith): Likewise.
791         (gfc_conv_intrinsic_minmaxloc): Likewise.
792         (gfc_conv_intrinsic_minmaxval): Likewise.
793         (gfc_conv_intrinsic_bitop): Likewise.
794         (gfc_conv_intrinsic_singlebitop): Likewise.
795         (gfc_conv_intrinsic_strcmp): Likewise.
796
797 2009-04-20  Vasilis Liaskovitis  <vliaskov@gmail.com>
798             Jakub Jelinek  <jakub@redhat.com>
799
800         PR fortran/35423
801         * trans.h (OMPWS_WORKSHARE_FLAG, OMPWS_CURR_SINGLEUNIT,
802         OMPWS_SCALARIZER_WS, OMPWS_NOWAIT): Define.
803         (ompws_flags): New extern decl.
804         * trans-array.c (gfc_trans_scalarized_loop_end): Build OMP_FOR
805         for the outer dimension if ompws_flags allow it.
806         * trans.c (gfc_generate_code): Clear ompws_flags.
807         * trans-expr.c (gfc_trans_assignment_1): Allow worksharing
808         array assignments inside of !$omp workshare.
809         * trans-stmt.c (gfc_trans_where_3): Similarly for where statements
810         and constructs.
811         * trans-openmp.c (ompws_flags): New variable.
812         (gfc_trans_omp_workshare): Rewritten.
813
814 2009-04-11  Daniel Kraft  <d@domob.eu>
815
816         PR fortran/37746
817         * gfortran.h (struct gfc_charlen): New field "passed_length" to store
818         the actual passed string length for dummy arguments.
819         * trans-decl.c (gfc_create_string_length): Formatting fixes and added
820         assertion, moved a local variable into the innermost block it is needed.
821         (create_function_arglist): Removed TODO about the check being
822         implemented and initialize cl->passed_length here.
823         (add_argument_checking): New method.
824         (gfc_generate_function_code): Call the argument checking method.
825
826 2009-04-11  Janus Weil  <janus@gcc.gnu.org>
827
828         PR fortran/39692
829         * symbol.c (check_conflict): Reject procedure pointers for -std=f95.
830
831 2009-04-11  Daniel Franke  <franke.daniel@gmail.com>
832
833         * resolve.c (resolve_global_procedure): Enable whole-file checking for
834         procedures that are declared later in the file.
835         
836 2009-04-10  Paolo Bonzini  <bonzini@gnu.org>
837
838         PR middle-end/39701
839         * trans.c (gfc_allocate_with_status): Fix type mismatches
840         on "pstat == 0".
841
842 2009-04-10  Daniel Franke  <franke.daniel@gmail.com>
843
844         PR fortran/38709
845         * expr.c (find_array_section): Leave early on zero-sized arrays.
846
847 2009-04-09  Janus Weil  <janus@gcc.gnu.org>
848
849         PR fortran/36704
850         * decl.c (add_hidden_procptr_result): New function for handling
851         procedure pointer return values by adding a hidden result variable.
852         (variable_decl,match_procedure_decl,gfc_match_function_decl,
853         gfc_match_subroutine,gfc_match_end,attr_decl1): Handle procedure pointer
854         return values.
855         * parse.c (parse_interface): Add EXTERNAL attribute only after
856         FUNCTION/SUBROUTINE declaration is complete.
857         * primary.c (replace_hidden_procptr_result): New function for replacing
858         function symbol by hidden result variable.
859         (gfc_match_rvalue,match_variable): Replace symbol by hidden result
860         variable.
861         * resolve.c (resolve_contained_fntype,resolve_function,resolve_variable,
862         resolve_symbol): Allow for procedure pointer function results.
863         (resolve_fl_procedure): Conflict detection moved here from
864         'check_conflict'.
865         * symbol.c (gfc_check_function_type): Allow for procedure pointer
866         function results.
867         (check_conflict): Move some conflict detection to resolution stage.
868         * trans-types.c (gfc_sym_type,gfc_get_function_type): Handle hidden
869         result variables.
870
871 2009-04-08  Jakub Jelinek  <jakub@redhat.com>
872
873         * trans-types.c (gfc_init_types): Ensure gfc_integer_types doesn't
874         contain TYPE_STRING_FLAG types.
875
876 2009-04-08  Janne Blomqvist  <jb@gcc.gnu.org>
877
878         PR fortran/39670
879         * invoke.texi (fdollar-ok): Fix typo.
880         
881 2009-04-08  Daniel Franke  <franke.daniel@gmail.com>
882
883         PR fortran/39670
884         * invoke.texi (fdollar-ok): Clarify limitations.
885
886 2009-04-08  Paul Thomas  <pault@gcc.gnu.org>
887
888         PR fortran/38863
889         * trans-array.c (gfc_trans_deferred_array): Return if this
890         is a result variable.
891
892 2009-04-07  Janus Weil  <janus@gcc.gnu.org>
893
894         PR fortran/38152
895         * trans-decl.c (gfc_get_symbol_decl): Correctly set decl location for
896         procedure pointer decls.
897
898 2009-04-07  Janus Weil  <janus@gcc.gnu.org>
899
900         PR fortran/38290
901         * expr.c (gfc_check_pointer_assign): Enable interface check for
902         procedure pointers.
903         * gfortran.h: Add copy_formal_args_intr.
904         * interface.c (gfc_compare_interfaces): Call gfc_compare_intr_interfaces
905         if second argument is an intrinsic.
906         (compare_intr_interfaces): Correctly set attr.function, attr.subroutine
907         and ts.
908         (compare_parameter): Call gfc_compare_interfaces also for intrinsics.
909         * resolve.c (resolve_specific_f0,resolve_specific_s0): Don't resolve
910         intrinsic interfaces here. Must happen earlier.
911         (resolve_symbol): Resolution of intrinsic interfaces moved here from
912         resolve_specific_..., and formal args are now copied from intrinsic
913         interfaces.
914         * symbol.c (copy_formal_args_intr): New function to copy the formal
915         arguments from an intinsic procedure.
916
917 2009-04-06  Paul Thomas  <pault@gcc.gnu.org>
918
919         PR fortran/38863
920         * dependency.c (ref_same_as_full_array): New function.
921         (gfc_dep_resolver): Call it.
922
923 2009-04-06  Janus Weil  <janus@gcc.gnu.org>
924
925         PR fortran/39414
926         * decl.c (match_procedure_decl): Fix double declaration problems with
927         PROCEDURE statements.
928         * symbol.c (gfc_add_type): Ditto.
929
930 2009-04-06  Paul Thomas  <pault@gcc.gnu.org>
931
932         PR fortran/36091
933         * trans-array.c (gfc_conv_array_ref): If the symbol has the
934         temporary attribute use the array_spec for the bounds.
935         * gfortran.h : Add the temporary field to the structure
936         'symbol_attribute'.
937         * trans-stmt.c (forall_make_variable_temp): Set the symbol's
938         temporary attribute.
939
940 2009-04-05  Daniel Franke  <franke.daniel@gmail.com>
941
942         PR fortran/29458
943         * trans-array.c (gfc_trans_array_constructor_value): Shadow
944         implied do-loop variable to avoid spurious middle-end warnings.
945
946 2009-04-04  Tobias Burnus  <burnus@net-b.de>
947
948         PR fortran/39577
949         * trans-decl.c (gfc_generate_function_code): Move recursive
950         check to the right position.
951
952 2009-04-04  Paul Thomas  <pault@gcc.gnu.org>
953
954         PR fortran/37614
955         * trans-common.c (translate_common): Do not offset the whole
956         coomon block.
957
958 2009-04-03  Tobias Burnus  <burnus@net-b.de>
959
960         PR fortran/39594
961         * resolve.c (resolve_common_vars): Add FL_VARIABLE to symbol
962         if it is not a procedure pointer.
963         * primary.c (match_actual_arg): Ditto.
964
965 2009-03-31  Joseph Myers  <joseph@codesourcery.com>
966
967         PR preprocessor/15638
968         * cpp.c (cb_cpp_error): Handle CPP_DL_FATAL.
969
970 2009-03-30  Steven G. Kargl  <kargls@comcast.net>
971
972         PR fortran/38389
973         * trans-stmt.c(gfc_trans_allocate): Add translation of ERRMSG.
974         (gfc_trans_deallocate): Add translation of ERRMSG.  Remove stale
975         comments.  Minor whitespace cleanup.
976         * resolve.c(is_scalar_expr_ptr): Whitespace cleanup.
977         (resolve_deallocate_expr (gfc_expr *e): Update error message.
978         (resolve_allocate_expr):  Remove dead code.  Update error message.
979         Move error checking to ...
980         (resolve_allocate_deallocate): ... here.  Add additional error
981         checking for STAT, ERRMSG, and allocate-objects.
982         * match.c(gfc_match_allocate,gfc_match_deallocate):  Parse ERRMSG.
983         Check for redundant uses of STAT and ERRMSG.  Reword error message
984         and add checking for pointer, allocatable, and proc_pointer attributes.
985
986 2009-03-30  Paul Thomas  <pault@gcc.gnu.org>
987
988         PR fortran/22571
989         PR fortran/26227
990         PR fortran/24886
991         * symbol.c : Add gfc_global_ns_list.
992         * decl.c (add_global_entry): Set the namespace ('ns') field.
993         * gfortran.h : Add the resolved field to gfc_namespace. Add the
994         namespace ('ns') field to gfc_gsymbol.  Add flag_whole_file to
995         gfc_option_t.  Add the prototype for gfc_free_dt_list.
996         * lang.opt : Add the whole-file option.
997         * invoke.texi : Document the whole-file option.
998         * resolve.c (resolve_global_procedure): If the fwhole-file
999         option is set, reorder gsymbols to ensure that translation is
1000         in the right order.  Resolve the gsymbol's namespace if that
1001         has not occurred and then check interfaces.
1002         (resolve_function): Move call to resolve_global_procedure.
1003         (resolve_call): The same.
1004         (resolve_codes): Store the current labels_obstack.
1005         (gfc_resolve) : Return if the namespace is already resolved.
1006         trans-decl.c (gfc_get_extern_function_decl): If the whole_file
1007         option is selected, use the backend_decl of a gsymbol, if it is
1008         available.
1009         parse.c (add_global_procedure, add_global_program): If the flag
1010         whole-file is set, add the namespace to the gsymbol.
1011         (gfc_parse_file): On -fwhole-file, put procedure namespaces on
1012         the global namespace list.  Rearrange to do resolution of all
1013         the procedures in a file, followed by their translation.
1014         * options.c (gfc_init_options): Add -fwhole-file.
1015         (gfc_handle_option): The same.
1016
1017 2009-03-30  Ulrich Weigand  <Ulrich.Weigand@de.ibm.com>
1018
1019         * f95-lang.c (gfc_init_builtin_functions): Define BUILT_IN_HUGE_VAL
1020         family of intrinsics instead of BUILT_IN_INF family.
1021         * trans-intrinsics.c (gfc_conv_intrinsic_nearest): Use
1022         BUILT_IN_HUGE_VAL instead of BUILT_IN_INF.
1023
1024 2009-03-30  Jakub Jelinek  <jakub@redhat.com>
1025
1026         * trans-types.c (gfc_sym_type, gfc_return_by_reference): For
1027         sym->attr.result check sym->ns->proc_name->attr.is_bind_c.
1028
1029 2009-03-30  Joseph Myers  <joseph@codesourcery.com>
1030
1031         PR rtl-optimization/323
1032         * options.c (gfc_post_options): Set
1033         flag_excess_precision_cmdline.  Give an error for
1034         -fexcess-precision=standard for processors where the option is
1035         significant.
1036
1037 2009-03-29  Joseph Myers  <joseph@codesourcery.com>
1038
1039         PR preprocessor/34695
1040         * cpp.c (cb_cpp_error): New.
1041         (gfc_cpp_post_options): Don't set cpp_option->inhibit_warnings.
1042         Don't check cpp_errors (cpp_in).
1043         (gfc_cpp_init_0): Set cb->error.
1044
1045 2009-03-29  Steven G. Kargl  <kargl@gcc.gnu.org>
1046
1047         PR fortran/38823
1048         * gfortran.h: Add ARITH_PROHIBIT to arith enum.
1049         expr.c (gfc_match_init_expr): Add global variable init_flag to
1050         flag matching an initialization expression.
1051         (check_intrinsic_op): Move no longer reachable error message to ...
1052         * arith.c (arith_power): ... here.  Remove gfc_ prefix in
1053         gfc_arith_power.  Use init_flag.  Allow constant folding of x**y
1054         when y is REAL or COMPLEX.
1055         (eval_intrinsic): Remove restriction that y in x**y must be INTEGER
1056         for constant folding.
1057         * gfc_power: Update gfc_arith_power to arith_power
1058
1059 2009-03-29  Daniel Kraft  <d@domob.eu>
1060
1061         PR fortran/37423
1062         * gfortran.h (struct gfc_typebound_proc): Added new flag "deferred" and
1063         added a comment explaining DEFERRED binding handling.
1064         * decl.c (match_binding_attributes): Really match DEFERRED attribute.
1065         (match_procedure_in_type): Really match PROCEDURE(interface) syntax
1066         and do some validity checks for DEFERRED and this construct.
1067         * module.c (binding_overriding): New string constant for DEFERRED.
1068         (mio_typebound_proc): Module-IO DEFERRED flag.
1069         * resolve.c (check_typebound_override): Ensure that a non-DEFERRED
1070         binding is not overridden by a DEFERRED one.
1071         (resolve_typebound_procedure): Allow abstract interfaces as targets
1072         for DEFERRED bindings.
1073         (ensure_not_abstract_walker), (ensure_not_abstract): New methods.
1074         (resolve_fl_derived): Use new "ensure_not_abstract" method for
1075         non-ABSTRACT types extending ABSTRACT ones to ensure each DEFERRED
1076         binding is overridden.
1077         (check_typebound_baseobject): New method.
1078         (resolve_compcall), (resolve_typebound_call): Check base-object of
1079         the type-bound procedure call.
1080         * gfc-internals.texi (Type-bound procedures): Document a little bit
1081         about internal handling of DEFERRED bindings.
1082
1083 2009-03-29  Tobias Schlueter  <tobi@gcc.gnu.org>
1084
1085         PR fortran/38507
1086         * gfortran.h (gfc_st_label): Fix comment.
1087         (gfc_exec_op): Add statement code EXEC_END_BLOCK for end of block.
1088         * parse.c (accept_statement): Use EXEC_END_BLOCK for END IF and
1089         END SELECT with labels.
1090         (check_do_closure): Fix formatting.
1091         (parse_do_block): Fix typo in error message.
1092         * resolve.c (code_stack): Remove tail member.  Update comment to
1093         new use of reachable_labels.
1094         (reachable_labels): Rename to ...
1095         (find_reachable_labels): ... this.  Overhaul.  Update preceding
1096         comment.
1097         (resolve_branch): Fix comment preceding function.  Rewrite.
1098         (resolve_code): Update call to find_reachable_labels.  Add code to
1099         deal with EXEC_END_BLOCK.
1100         * st.c (gfc_free_statement): Add code to deal with EXEC_END_BLOCK.
1101         Add 2009 to copyright years.
1102         * trans.c (gfc_trans_code): Likewise on both counts.
1103
1104 2009-03-31  Paul Thomas  <pault@gcc.gnu.org>
1105
1106         PR fortran/38917
1107         * expr.c (gfc_check_assign): Allow pointer components when
1108         checking for NULL.
1109
1110         PR fortran/38918
1111         * resolve.c (check_data_variable): Treat pointer arrays with
1112         scalars.
1113
1114 2009-03-31  Paul Thomas  <pault@gcc.gnu.org>
1115
1116         PR fortran/38915
1117         * trans-expr.c (gfc_trans_assignment_1): Ensure temporaries
1118         have a string_length.
1119
1120 2009-03-28  Tobias Burnus  <burnus@net-b.de>
1121
1122         PR fortran/34656
1123         * trans-stmt.c (gfc_trans_simple_do, gfc_trans_do):
1124         Add GFC_RTCHECK_DO support.
1125         * option.c (gfc_handle_runtime_check_option): Enable GFC_RTCHECK_DO.
1126         * invoke.texi (-fcheck): Document "do" option.
1127
1128 2009-03-28  Paul Thomas  <pault@gcc.gnu.org>
1129
1130         PR fortran/38538
1131         * trans-array.c (get_elemental_fcn_charlen): Remove.
1132         (get_array_charlen): New function to replace previous.
1133
1134 2009-03-28  Paul Thomas  <pault@gcc.gnu.org>
1135
1136         PR fortran/38765
1137         * parse.c (parse_derived): Do not break on finding pointer,
1138         allocatable or private components.
1139
1140 2009-03-28  Tobias Burnus  <burnus@net-b.de>
1141
1142         PR fortran/32626
1143         * option.c (gfc_handle_runtime_check_option): Enable recursion check.
1144         * trans-decl.c (gfc_generate_function_code): Add recursion check.
1145         * invoke.texi (-fcheck): Add recursive option.
1146
1147 2009-03-28  Tobias Burnus  <burnus@net-b.de>
1148
1149         PR fortran/38432
1150         * resolve.c (gfc_resolve_iterator): Add zero-loop warning.
1151
1152 2009-03-28  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1153             Paul Thomas  <pault@gcc.gnu.org>
1154             Tobias Burnus  <burnus@net-b.de>
1155
1156         * gfortran.h (gfc_option_t): Add rtcheck.
1157         * lang.opt: New option -fcheck.
1158         * libgfortran.h: Add GFC_RTCHECK_* constants.
1159         * invoke.texi: Document -fcheck.
1160         * options.c (gfc_handle_runtime_check_option): New function.
1161         (gfc_init_options,gfc_post_options,gfc_handle_option):
1162         Add -fcheck option.
1163
1164 2009-03-27  Richard Guenther  <rguenther@suse.de>
1165
1166         * trans-array.c (gfc_conv_descriptor_data_addr): Use
1167         gfc_build_addr_expr instead of build_fold_addr_expr.
1168         (gfc_trans_allocate_array_storage, gfc_trans_array_constructor_value,
1169         gfc_trans_constant_array_constructor, gfc_conv_array_data,
1170         gfc_conv_expr_descriptor, gfc_conv_array_parameter): Likewise.
1171         * trans-expr.c (gfc_conv_missing_dummy, gfc_conv_variable,
1172         gfc_conv_function_val, gfc_conv_operator_assign,
1173         gfc_conv_subref_array_arg, gfc_conv_function_call,
1174         gfc_conv_expr_reference, gfc_trans_scalar_assign): Likewise.
1175         * trans-intrinsic.c (gfc_conv_intrinsic_exponent,
1176         gfc_conv_intrinsic_ctime, gfc_conv_intrinsic_fdate,
1177         gfc_conv_intrinsic_ttynam, gfc_conv_intrinsic_minmax_char,
1178         gfc_conv_intrinsic_fraction, gfc_conv_intrinsic_spacing,
1179         gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_set_exponent,
1180         gfc_conv_intrinsic_array_transfer, gfc_conv_intrinsic_transfer,
1181         gfc_conv_intrinsic_si_kind, gfc_conv_intrinsic_trim): Likewise.
1182         * trans-io.c (gfc_trans_io_runtime_check, set_parameter_ref,
1183         gfc_convert_array_to_string, gfc_trans_open, gfc_trans_close,
1184         build_filepos, gfc_trans_inquire, gfc_trans_wait,
1185         nml_get_addr_expr, transfer_namelist_element, build_dt,
1186         gfc_trans_dt_end, transfer_array_component, transfer_expr,
1187         transfer_array_desc, gfc_trans_transfer): Likewise.
1188         * trans-stmt.c (gfc_trans_allocate, gfc_trans_deallocate): Likewise.
1189         * trans.c (gfc_build_addr_expr): Mark the base of the address
1190         TREE_ADDRESSABLE.
1191
1192 2009-03-27  Tobias Burnus  <burnus@net-b.de>
1193
1194         * gfortran.h (enum init_local_real.): Add GFC_INIT_REAL_SNAN.
1195         (gfc_expr): Add is_snan.
1196         * trans-const.c (gfc_conv_mpfr_to_tree): Support SNaN.
1197         (gfc_conv_constant_to_tree): Update call to gfc_conv_mpfr_to_tree.
1198         * trans-const.h (gfc_conv_mpfr_to_tree): Update prototype.
1199         * resolve.c (build_default_init_expr): Update call.
1200         * target-memory.c (encode_float): Ditto.
1201         * trans-intrinsic.c (gfc_conv_intrinsic_aint,gfc_conv_intrinsic_mod,
1202
1203 2009-03-18  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1204
1205         * lang.opt: Unify help texts for -I, -Wconversion, -d, -fopenmp,
1206         and -fpreprocessed.
1207
1208 2009-03-06  Alexandre Oliva <aoliva@redhat.com>
1209
1210         * simplify.c (gfc_simplify_transfer): Zero-initialize the
1211         buffer.
1212
1213 2009-02-27  Tobias Burnus  <burnus@net-b.de>
1214
1215         PR fortran/39309
1216         * module.c (read_md5_from_module_file): Add missing quote.
1217
1218 2009-02-27  Tobias Burnus  <burnus@net-b.de>
1219
1220         PR fortran/39309
1221         * module.c (read_md5_from_module_file): Include mod version
1222         in had-changed test.
1223
1224 2009-02-26  Paul Thomas  <pault@gcc.gnu.org>
1225
1226         PR fortran/39295
1227         * interface.c (compare_type_rank_if): Return 1 if the symbols
1228         are the same and deal with external procedures where one is
1229         identified to be a function or subroutine by usage but the
1230         other is not.
1231
1232 2009-02-26  Paul Thomas  <pault@gcc.gnu.org>
1233
1234         PR fortran/39292
1235         * trans-array.c (gfc_conv_array_initializer): Convert all
1236         expressions rather than ICEing.
1237
1238 2009-02-21  Thomas Koenig  <tkoenig@gcc.gnu.org>
1239
1240         PR fortran/38914
1241         * array.c (ref_dimen_size):  Rename to gfc_ref_dimen_size,
1242         make global.  Change function name in error messages.
1243         (ref_size):  Change ref_dimen_size to gfc_ref_dimen_size.
1244         (gfc_array_ref_shape):  Likewise.
1245         * gfortran.h:  Add prototype for gfc_ref_dimen_size.
1246         * simplify.c (simplify_bound_dim):  Add ref argument.
1247         If the reference isn't a full array, return one for
1248         the lower bound and the extent for the upper bound.
1249         (simplify_bound):  For array sections, take as from the
1250         argument.  Add reference to all to simplify_bound_dim.
1251
1252 2009-02-19  Daniel Franke  <franke.daniel@gmail.com>
1253
1254         * scanner.c (load_line): At end of line, skip '\r' without setting
1255         the truncation flag.
1256
1257 2009-02-18  Daniel Kraft  <d@domob.eu>
1258
1259         * gfortran.texi: New chapter about compiler characteristics.
1260         (Compiler Characteristics): Document KIND type parameters here.
1261
1262 2009-02-18  Tobias Burnus  <burnus@net-b.de>
1263
1264         * intrinsic.texi (MALLOC): Make example more portable.
1265
1266 2009-02-13  Mikael Morin  <mikael.morin@tele2.fr>
1267
1268         PR fortran/38259
1269         * module.c (gfc_dump_module,gfc_use_module): Add module
1270         version number.
1271
1272 2009-02-13  Paul Thomas  <pault@gcc.gnu.org>
1273
1274         PR fortran/36703
1275         PR fortran/36528
1276         * trans-expr.c (gfc_conv_function_val): Stabilize Cray-pointer
1277         function references to ensure that a valid expression is used.
1278         (gfc_conv_function_call): Pass Cray pointers to procedures.
1279
1280 2009-02-03  Jakub Jelinek  <jakub@redhat.com>
1281
1282         * gfortranspec.c (lang_specific_driver): Update copyright notice
1283         dates.
1284
1285 2009-01-28  Paul Thomas  <pault@gcc.gnu.org>
1286
1287         PR fortran/38852
1288         PR fortran/39006
1289         * trans-intrinsic.c (gfc_conv_intrinsic_bound): Use the array
1290         descriptor ubound for UBOUND, when the array lbound == 1.
1291
1292 2009-01-27  Daniel Kraft  <d@domob.eu>
1293
1294         PR fortran/38883
1295         * trans-stmt.c (gfc_conv_elemental_dependencies):  Create temporary
1296         for the real type needed to make it work for subcomponent-references.
1297
1298 2009-01-21  Daniel Kraft  <d@domob.eu>
1299
1300         * trans-stmt.c (gfc_conv_elemental_dependencies):  Cleaned up comment.
1301
1302 2009-01-20  Paul Thomas  <pault@gcc.gnu.org>
1303
1304         PR fortran/38907
1305         * resolve.c (check_host_association): Remove the matching to
1306         correct an incorrect host association and use manipulation of
1307         the expression instead.
1308
1309 2009-01-20  Tobias Burnus  <burnus@net-b.de>
1310
1311         * invoke.texi (RANGE): RANGE also takes INTEGER arguments.
1312
1313 2009-01-19  Mikael Morin  <mikael.morin@tele2.fr>
1314
1315         PR fortran/38859
1316         * simplify.c (simplify_bound): Don't use array specification
1317         if variable or component has subsequent references.
1318
1319 2009-01-17  Paul Thomas  <pault@gcc.gnu.org>
1320
1321         PR fortran/38657
1322         * module.c (write_common_0): Add argument 'this_module' and
1323         check that non-use associated common blocks are written first.
1324         (write_common): Call write_common_0 twice, once with true and
1325         then with false.
1326
1327 2009-01-17  Paul Thomas  <pault@gcc.gnu.org>
1328
1329         PR fortran/34955
1330         * trans-intrinsic.c (gfc_conv_intrinsic_array_transfer): Has
1331         been absorbed into gfc_conv_intrinsic_transfer. All
1332         references to it in trans-intrinsic.c have been changed
1333         accordingly.  PR fixed by using a temporary for scalar
1334         character transfer, when the source is shorter than the
1335         destination.
1336
1337 2009-01-17  Paul Thomas  <pault@gcc.gnu.org>
1338
1339         PR fortran/38657
1340         * module.c (write_common_0): Revert patch of 2009-01-05.
1341
1342 2009-01-16  Janus Weil  <janus@gcc.gnu.org>
1343
1344         PR fortran/38152
1345         * expr.c (gfc_check_pointer_assign): Allow use-associated procedure
1346         pointers as lvalue.
1347         * trans-decl.c (get_proc_pointer_decl,gfc_create_module_variable):
1348         Enable procedure pointers as module variables.
1349
1350 2009-01-14  Steven G. Kargl  <kargl@gcc.gnu.org>
1351
1352         * ChangeLog-2007: Clean out svn merge droppings.
1353
1354 2009-01-10  Paul Thomas  <pault@gcc.gnu.org>
1355
1356         PR fortran/38763
1357         * target-memory.c (encode_derived): Encode NULL.
1358
1359 2009-01-10  Paul Thomas  <pault@gcc.gnu.org>
1360
1361         PR fortran/38765
1362         * resolve.c (check_host_association): Use the symtree name to
1363         search for a potential contained procedure, since this is the
1364         name by which it would be referenced.
1365
1366 2009-01-06  Thomas Koenig  <tkoenig@gcc.gnu.org>
1367
1368         PR fortran/38220
1369         * interface.c (gfc_procedure_use):  Don't warn about functions
1370         from ISO_C_BINDING.
1371         * symbol.c (generate_isocbinding_symbol):  Mark c_loc and
1372         c_funloc as pure.
1373
1374 2009-01-05  Paul Thomas  <pault@gcc.gnu.org>
1375
1376         PR fortran/38657
1377         * module.c (write_common_0): Use the name of the symtree rather
1378         than the common block, to determine if the common has been
1379         written.
1380
1381 2009-01-05  Daniel Franke  <franke.daniel@gmail.com>
1382
1383         PR fortran/37159
1384         * check.c (gfc_check_random_seed): Added size check for GET
1385         dummy argument, reworded error messages to follow common pattern.
1386
1387 2009-01-05  Thomas Koenig  <tkoenig@gcc.gnu.org>
1388
1389         PR fortran/38672
1390         * trans-types.c (gfc_get_derived_type):  Check for the
1391         presence of derived->ns->proc_name before
1392         accessing derived->ns->proc_name->attr.flavor .
1393         * resolve.c (resolve_symbol):  Likewise.
1394
1395 2009-01-05  Paul Thomas  <pault@gcc.gnu.org>
1396
1397         PR fortran/38665
1398         * gfortran.h : Add bit to gfc_expr 'user_operator'
1399         * interface.c (gfc_extend_expr): Set the above if the operator
1400         is substituted by a function. 
1401         * resolve.c (check_host_association): Return if above is set.
1402
1403 2009-01-04  Mikael Morin  <mikael.morin@tele2.fr>
1404
1405         PR fortran/35681
1406         * ChangeLog-2008: Fix function name.
1407
1408         PR fortran/38487
1409         * dependency.c (gfc_check_argument_var_dependency):
1410         Move the check for pointerness inside the if block
1411         so that it doesn't affect the return value.
1412
1413         PR fortran/38669
1414         * trans-stmt.c (gfc_trans_call):
1415         Add the dependency code after the loop bounds calculation one.
1416
1417 2009-01-04  Daniel Franke  <franke.daniel@gmail.com>
1418
1419         * intrinsic.c (do_simplify): Removed already implemented TODO.
1420
1421 2009-01-04  Daniel Franke  <franke.daniel@gmail.com>
1422
1423         PR fortran/38718
1424         * simplify.c (gfc_simplify_merge): New.
1425         * intrinsic.h (gfc_simplify_merge): New prototype.
1426         * intrinsic.c (add_functions): Added simplification for MERGE.
1427
1428 2009-01-04  Mikael Morin  <mikael.morin@tele2.fr>
1429
1430         PR fortran/38536
1431         * gfortran.h (gfc_is_data_pointer): Added prototype
1432         * resolve.c (gfc_iso_c_func_interface):
1433         Use gfc_is_data_pointer to test for pointer attribute.
1434         * dependency.c (gfc_is_data_pointer):
1435         Support pointer-returning functions.
1436
1437 2009-01-03  Daniel Franke  <franke.daniel@gmail.com>
1438
1439         * symbol.c (save_symbol): Don't SAVE function results.
1440
1441 2009-01-03  Paul Thomas  <pault@gcc.gnu.org>
1442
1443         PR fortran/38594
1444         * resolve.c (resolve_call): When searching for proper host
1445         association, use symtree rather than symbol.  For everything
1446         except generic subroutines, substitute the symtree in the call
1447         rather than the symbol.
1448
1449 \f
1450 Copyright (C) 2009 Free Software Foundation, Inc.
1451
1452 Copying and distribution of this file, with or without modification,
1453 are permitted in any medium without royalty provided the copyright
1454 notice and this notice are preserved.