OSDN Git Service

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