OSDN Git Service

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