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