]> gcc.gnu.org Git - gcc.git/blob - gcc/fortran/ChangeLog
c3b58b5312caa7a18674118120cff0036ad2b54f
[gcc.git] / gcc / fortran / ChangeLog
1 2008-11-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2
3 PR fortran/37988
4 * io.c (enum format_token): For readability replace FMT_POS with FMT_T,
5 FMT_TL, and FMT_TR. (format_lex): Use new enumerators. (check_format):
6 Add check for missing positive integer.
7
8 2008-10-14 Paul Thomas <pault@gcc.gnu.org>
9
10 PR fortran/38033
11 * trans-array.c (gfc_trans_create_temp_array): Stabilize the
12 'to' expression.
13 (gfc_conv_loop_setup): Use the end expression for the loop 'to'
14 if it is available.
15
16 2008-11-12 Jakub Jelinek <jakub@redhat.com>
17
18 PR target/35366
19 PR fortran/33759
20 * trans-const.c (gfc_conv_constant_to_tree): Warn when
21 converting an integer outside of LOGICAL's range to
22 LOGICAL.
23 * trans-intrinsic.c (gfc_conv_intrinsic_function,
24 gfc_conv_intrinsic_array_transfer, gfc_conv_intrinsic_transfer):
25 Use INTEGER_TYPE instead of BOOLEAN_TYPE for TRANSFER as
26 argument of another TRANSFER.
27
28 2008-11-12 Tobias Burnus <burnus@net-b.de>
29
30 PR fortran/38065
31 * resolve.c (resolve_fntype): Fix private derived type checking.
32
33 2008-11-09 Paul Thomas <pault@gcc.gnu.org>
34
35 PR fortran/37836
36 * intrinsic.c (add_functions): Reference gfc_simplify._minval
37 and gfc_simplify_maxval.
38 * intrinsic.h : Add prototypes for gfc_simplify._minval and
39 gfc_simplify_maxval.
40 * simplify.c (min_max_choose): New function extracted from
41 simplify_min_max.
42 (simplify_min_max): Call it.
43 (simplify_minval_maxval, gfc_simplify_minval,
44 gfc_simplify_maxval): New functions.
45
46 2008-11-04 Paul Thomas <pault@gcc.gnu.org>
47
48 PR fortran/37597
49 * parse.c (gfc_fixup_sibling_symbols ): Fixup contained, even
50 when symbol not found.
51
52 2008-11-03 Tobias Burnus <burnus@net-b.de>
53
54 PR fortran/37821
55 * cpp.c (gfc_cpp_add_include_path): Use BRACKET.
56 * scanner.c (add_path_to_list): Argument to add at head.
57 (gfc_add_include_path): Add new argument.
58 (gfc_add_intrinsic_modules_path) Update call.
59 (load_file): Print filename/line in the error message.
60 * gfortran.h (gfc_add_include_path): Update prototype.
61 * options.c (gfc_post_options,gfc_handle_module_path_options,
62 gfc_handle_option): Update call.
63 * lang-spec.h (F951_OPTIONS): Don't insert include path twice.
64
65 * arith.c (arith_error): Add -fno-range-error to the message.
66
67 2008-11-03 Paul Thomas <pault@gcc.gnu.org>
68
69 PR fortran/37445
70 * resolve.c (resolve_actual_arglist ): Correct comparison of
71 FL_VARIABLE with e->expr_type.
72 (resolve_call): Check that host association is correct.
73 (resolve_actual_arglist ): Remove return is old_sym is use
74 associated. Only reparse expression if old and new symbols
75 have different types.
76
77 PR fortran/PR35769
78 * resolve.c (gfc_resolve_assign_in_forall): Change error to a
79 warning.
80
81 2008-11-01 Janus Weil <janus@gcc.gnu.org>
82
83 PR fortran/36426
84 * expr.c (replace_symbol): Replace all symbols which lie in the
85 formal namespace of the interface and copy their attributes.
86 * resolve.c (resolve_symbol): Add charlen to namespace.
87
88 2008-11-01 Steven G. Kargl <kargls@comcast.net>
89
90 PR fortran/19925
91 * trans-array.c (gfc_trans_array_constructor_value): Fix comment.
92 (gfc_conv_array_initializer): Convert internal_error() to gfc_error_now.
93 * array.c: Remove GFC_MAX_AC_EXPAND macro.
94 (gfc_expand_constructor): Use gfc_option.flag_max_array_constructor.
95 * gfortran.h (gfc_option): Add flag_max_array_constructor member.
96 * lang.opt: Add -fmax-array-constructor option.
97 * expr.c (gfc_match_init_expr): Fix error message to mention new option.
98 * invoke.texi: Document new option.
99 * options.c (gfc_init_options): Set default value for new option.
100 (gfc_handle_option): Deal with commandline.
101
102 2008-11-01 Daniel Kraft <d@domob.eu>
103
104 PR fortran/35681
105 * gfortran.h (struct gfc_code): New field `resolved_isym'.
106 * trans.h (gfc_build_memcpy_call): Made public.
107 * trans-array.h (gfc_trans_create_temp_array): New argument `initial'.
108 * intrinsic.c (gfc_intrinsic_sub_interface): Set resolved_isym.
109 * iresolve.c (create_formal_for_intents): New helper method.
110 (gfc_resolve_mvbits): Put dummy formal arglist on resolved_sym.
111 * resolve.c (resolve_call): Initialize resolved_isym to NULL.
112 * trans-array.c (gfc_trans_allocate_array_storage): New argument
113 `initial' to allow initializing the allocated storage to some initial
114 value copied from another array.
115 (gfc_trans_create_temp_array): Allow initialization of the temporary
116 with a copy of some other array by using the new extension.
117 (gfc_trans_array_constructor): Pass NULL_TREE for initial argument.
118 (gfc_conv_loop_setup): Ditto.
119 * trans-intrinsic.c (gfc_conv_intrinsic_array_transfer): Ditto.
120 * trans-expr.c (gfc_conv_function_call): Ditto.
121 (gfc_build_memcpy_call): Made public.
122 * trans-stmt.c (gfc_conv_elemental_dependencies): Initialize created
123 temporary for INTENT(INOUT) arguments to the value of the mirrored
124 array and clean up the temporary as very last intructions in the created
125 block.
126 * trans.c (gfc_trans_code): For EXEC_CALL, see if we have a MVBITS call
127 and enable elemental dependency checking if we have.
128
129 2008-11-01 Janus Weil <janus@gcc.gnu.org>
130
131 PR fortran/36322
132 PR fortran/36463
133 * gfortran.h: New function gfc_expr_replace_symbols.
134 * decl.c (match_procedure_decl): Increase reference count for interface.
135 * expr.c: New functions replace_symbol and gfc_expr_replace_symbols.
136 * resolve.c (resolve_symbol): Correctly copy array spec and char len
137 of PROCEDURE declarations from their interface.
138 * symbol.c (gfc_get_default_type): Enhanced error message.
139 (copy_formal_args): Call copy_formal_args recursively for arguments.
140 * trans-expr.c (gfc_conv_function_call): Bugfix.
141
142 2008-11-01 Dennis Wassel <dennis.wassel@gmail.com>
143
144 PR fortran/37159
145 * fortran/check.c (gfc_check_random_seed): Check PUT size
146 at compile time.
147
148 2008-10-31 Mikael Morin <mikael.morin@tele2.fr>
149
150 PR fortran/35840
151 * expr.c (gfc_reduce_init_expr): New function, containing checking code
152 from gfc_match_init_expr, so that checking can be deferred.
153 (gfc_match_init_expr): Use gfc_reduce_init_expr.
154 * io.c (check_io_constraints): Use gfc_reduce_init_expr instead of
155 checking that the expression is a constant.
156 * match.h (gfc_reduce_init_expr): Prototype added.
157
158 2008-10-31 Mikael Morin <mikael.morin@tele2.fr>
159
160 PR fortran/35820
161 * resolve.c (gfc_count_forall_iterators): New function.
162 (gfc_resolve_forall): Use gfc_count_forall_iterators to evaluate
163 the needed memory amount to allocate. Don't forget to free allocated
164 memory. Add an assertion to check for memory leaks.
165
166 2008-10-30 Steven G. Kargl <kargls@comcast.net>
167
168 PR fortran/37930
169 * fortran/arith.c (gfc_mpfr_to_mpz): Test for NaN and Inf values.
170 Remove stale comment and kludge code for MPFR 2.0.1 and older.
171 (gfc_real2int): Error on conversion of NaN or Inf.
172 (gfc_complex2int): Ditto.
173 * fortran/arith.h: Update mpfr_to_mpz prototype.
174 * fortran/simplify.c (gfc_simplify_ceiling, gfc_simplify_floor,
175 gfc_simplify_ifix, gfc_simplify_idint, simplify_nint): Update function
176 calls to include locus.
177
178 2008-10-30 Mikael Morin <mikael.morin@tele2.fr>
179
180 PR fortran/37903
181 * trans-array.c (gfc_trans_create_temp_array): If n is less
182 than the temporary dimension, assert that loop->from is
183 zero (reverts to earlier versions). If there is at least one
184 null loop->to[n], it is a callee allocated array so set the
185 size to NULL and break.
186 (gfc_trans_constant_array_constructor): Set the offset to zero.
187 (gfc_trans_array_constructor): Remove loop shifting around the
188 temporary creation.
189 (gfc_conv_loop_setup): Prefer zero-based descriptors if
190 possible. Calculate the translation from loop variables to
191 array indices if an array constructor.
192
193 2008-10-30 Mikael Morin <mikael.morin@tele2.fr>
194
195 PR fortran/37749
196 * trans-array.c (gfc_trans_create_temp_array): If size is NULL
197 use the array bounds for loop->to.
198
199 2008-10-28 Tobias Burnus <burnus@net-b.de>
200
201 * intrinsic.texi: Update OpenMP section for OMPv3.
202
203 2008-10-24 Jakub Jelinek <jakub@redhat.com>
204
205 * Make-lang.in (check-f95-subtargets, check-fortran-subtargets): New
206 aliases for check-gfortran-subtargets.
207 (lang_checks_parallelized): Add check-gfortran.
208 (check_gfortran_parallelize): New variable.
209
210 2008-10-19 Paul Thomas <pault@gcc.gnu.org>
211
212 PR fortran/37723
213 * dependency.c (gfc_dep_resolver ): If we find equal array
214 element references, go on to the next reference.
215
216 2008-10-16 Daniel Kraft <d@domob.eu>
217
218 * resolve.c (resolve_elemental_actual): Handle calls to intrinsic
219 subroutines correctly.
220
221 2008-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
222
223 * simplify.c: Remove MPFR_VERSION_NUM(2,3,0) conditionals.
224
225 2008-10-12 Daniel Kraft <d@domob.eu>
226
227 PR fortran/37688
228 * expr.c (gfc_expr_check_typed): Extend permission of untyped
229 expressions to both top-level variable and basic arithmetic expressions.
230
231 2008-10-12 Paul Thomas <pault@gcc.gnu.org>
232
233 PR fortran/37787
234 * dependency.c (gfc_are_equivalenced_arrays): Look in symbol
235 namespace rather than current namespace, if it is available.
236
237 2008-10-12 Steven G. Kargl <kargls@comcast.net>
238
239 PR fortran/37792
240 * fortran/resolve.c (resolve_fl_variable): Simplify the
241 initializer if there is one.
242
243 2008-10-11 Paul Thomas <pault@gcc.gnu.org>
244
245 PR fortran/37794
246 * module.c (check_for_ambiguous): Remove redundant code.
247
248 2008-10-09 Daniel Kraft <d@domob.eu>
249
250 PR fortran/35723
251 * gfortran.h (gfc_suppress_error): Removed from header.
252 (gfc_push_suppress_errors), (gfc_pop_suppress_errors): New methods.
253 * array.c (gfc_array_size): Use new gfc_push/pop_suppress_errors
254 instead of directly changing gfc_suppress_error.
255 * intrinsic.c (gfc_intrinsic_func_interface): Ditto.
256 (gfc_intrinsic_sub_interface): Ditto.
257 * error.c (suppress_errors): Made static from `gfc_suppress_error'.
258 (gfc_push_suppress_errors), (gfc_pop_suppress_errors): New methods.
259 (gfc_notify_std), (gfc_error): Use new static name of global.
260 * expr.c (check_arglist), (check_references): New methods.
261 (check_restricted): Check arglists and references of EXPR_FUNCTIONs
262 and EXPR_VARAIBALEs, respectively. Allow PARAMETER symbols.
263
264 2008-10-07 Jakub Jelinek <jakub@redhat.com>
265
266 * f95-lang.c (poplevel): Don't clear BLOCK_VARS if functionbody.
267 * trans-decl.c (gfc_build_qualified_array): Build accurate debug type
268 even if nest.
269 (build_entry_thunks, gfc_generate_function_code,
270 gfc_generate_constructors): Ensure DECL_SAVED_TREE is a BIND_EXPR
271 with DECL_INITIAL as its BLOCK.
272
273 2008-10-05 Paul Thomas <pault@gcc.gnu.org>
274
275 PR fortran/35680
276 * gfortran.h : Add 'error' bit field to gfc_expr structure.
277 * expr.c (check_inquiry): When checking a restricted expression
278 check that arguments are either variables or restricted.
279 (check_restricted): Do not emit error if the expression has
280 'error' set. Clean up detection of host-associated variable.
281
282 2008-10-05 Daniel Kraft <d@domob.eu>
283
284 PR fortran/37638
285 * gfortran.h (struct gfc_typebound_proc): New flag `error'.
286 * resolve.c (update_arglist_pass): Added assertion.
287 (update_compcall_arglist): Fail early for erraneous procedures to avoid
288 confusion later.
289 (resolve_typebound_generic_call): Ignore erraneous specific targets
290 and added assertions.
291 (resolve_typebound_procedure): Set new `error' flag.
292
293 2008-10-04 Paul Thomas <pault@gcc.gnu.org>
294
295 PR fortran/37706
296 * module.c (load_equiv): Check the module before negating the
297 unused flag.
298
299 2008-10-02 Steven Bosscher <steven@gcc.gnu.org>
300
301 PR fortran/37635
302 * intrinsic.c (add_functions): Add LEADZ and TRAILZ as generics.
303 * intrinsic.h (gfc_simplify_leadz, gfc_simplify_trailz): New protos.
304 * gfortran.h <enum gfc_isym_id>: (GFC_ISYM_LEADZ, GFC_ISYM_TRAILZ): New.
305 * f95-lang (gfc_init_builtin_functions): Add BUILT_IN_CLZ,
306 BUILT_IN_CLZL, BUILT_IN_CLZLL, BUILT_IN_CTZ, BUILT_IN_CTZL, and
307 BUILT_IN_CTZLL.
308 * trans-intrinsic.c (gfc_conv_intrinsic_leadz,
309 gfc_conv_intrinsic_trails): New code-generation functions for LEADZ
310 and TRAILZ intrinsics.
311 (gfc_conv_intrinsic_function): Use them
312 * intrinsic.texi: Add documentation for LEADZ and TRAILZ.
313 * simplify.c (gfc_simplify_leadz, gfc_simplify_trailz): New functions.
314
315 2008-09-30 Janus Weil <janus@gcc.gnu.org>
316
317 PR fortran/36592
318 * symbol.c (check_conflict): If a symbol in a COMMON block is a
319 procedure, it must be a procedure pointer.
320 (gfc_add_in_common): Symbols in COMMON blocks may be variables or
321 procedure pointers.
322 * trans-types.c (gfc_sym_type): Make procedure pointers in COMMON
323 blocks work.
324
325 2008-09-25 Jerry DeLisle <jvdelisle@gcc.gnu.org
326
327 PR fortran/37498
328 * trans-io.c (build_dt): Revert previous patch..
329 * ioparm.def: Delete IOPARM_dt_f2003.
330
331 2008-09-25 Tobias Burnus <burnus@net-b.de>
332
333 PR fortran/37504
334 * expr.c (gfc_check_pointer_assign): Allow assignment of
335 protected pointers.
336 * match.c (gfc_match_assignment,gfc_match_pointer_assignment):
337 Remove unreachable code.
338
339 2008-09-24 Tobias Burnus <burnus@net-b.de>
340
341 * options.c (set_default_std_flags,gfc_init_options):
342 Add comment: keep in sync with libgfortran.
343
344 2008-09-24 Tobias Burnus <burnus@net-b.de>
345
346 PR fortran/37626
347 * trans-array.c (gfc_trans_deferred_array): Don't auto-deallocate
348 result variables.
349
350 2008-09-23 Daniel Kraft <d@domob.eu>
351
352 PR fortran/37588
353 * gfortran.h (gfc_compare_actual_formal): Removed, made private.
354 (gfc_arglist_matches_symbol): New method.
355 * interface.c (compare_actual_formal): Made static.
356 (gfc_procedure_use): Use new name of compare_actual_formal.
357 (gfc_arglist_matches_symbol): New method.
358 (gfc_search_interface): Moved code partially to new
359 gfc_arglist_matches_symbol.
360 * resolve.c (resolve_typebound_generic_call): Resolve actual arglist
361 before checking against formal and use new gfc_arglist_matches_symbol
362 for checking.
363 (resolve_compcall): Set type-spec of generated expression.
364
365 2008-09-23 Tobias Burnus <burnus@net-b.de>
366
367 PR fortran/37580
368 * expr.c (gfc_check_pointer_assign): Add checks for pointer
369 remapping.
370
371 2008-09-22 Jerry DeLisle <jvdelisle@gcc.gnu.org
372
373 PR fortran/37498
374 * trans-io.c (gfc_build_io_library_fndecls): Bump pad size.
375 (build_dt): Set mask bit for IOPARM_dt_f2003.
376 * ioparm.def: Add IOPARM_dt_f2003.
377
378 2008-09-22 Janus Weil <janus@gcc.gnu.org>
379
380 PR fortran/37486
381 * gfortran.h (gfc_option_t): New members flag_align_commons and
382 warn_align_commons.
383 * lang.opt: New options falign-commons and Walign-commons.
384 * invoke.texi: Documentation for new options.
385 * options.c (gfc_init_options): Initialize new options.
386 (gfc_handle_options): Handle new options.
387 * trans-common.c (translate_common): Implement new options.
388 (gfc_trans_common): Set correct locus.
389
390 2008-09-21 Paul Thomas <pault@gcc.gnu.org>
391
392 PR fortran/37583
393 * decl.c (scalarize_intrinsic_call): Both subroutines and
394 functions can give a true for get_proc_mame's last argument so
395 remove the &&gfc_current_ns->proc_name->attr.function.
396 resolve.c (resolve_actual_arglist): Add check for recursion by
397 reference to procedure as actual argument.
398
399 2008-09-21 Daniel Kraft <d@domob.eu>
400
401 PR fortran/35846
402 * trans.h (gfc_conv_string_length): New argument `expr'.
403 * trans-expr.c (flatten_array_ctors_without_strlen): New method.
404 (gfc_conv_string_length): New argument `expr' that is used in a new
405 special case handling if cl->length is NULL.
406 (gfc_conv_subref_array_arg): Pass expr to gfc_conv_string_length.
407 * trans-array.c (gfc_conv_expr_descriptor): Ditto.
408 (gfc_trans_auto_array_allocation): Pass NULL as new expr.
409 (gfc_trans_g77_array), (gfc_trans_dummy_array_bias): Ditto.
410 (gfc_trans_deferred_array): Ditto.
411 (gfc_trans_array_constructor): Save and restore old values of globals
412 used for bounds checking.
413 * trans-decl.c (gfc_trans_dummy_character): Ditto.
414 (gfc_trans_auto_character_variable): Ditto.
415
416 2008-09-21 Daniel Kraft <d@domob.eu>
417
418 * decl.c (match_procedure_in_type): Changed misleading error message
419 for not yet implemented PROCEDURE(interface) syntax.
420
421 2008-09-18 Paul Thomas <pault@gcc.gnu.org>
422
423 PR fortran/35945
424 * resolve.c (resolve_fl_variable_derived): Remove derived type
425 comparison for use associated derived types. Host association
426 of a derived type will not arise if there is a local derived type
427 whose use name is the same.
428
429 PR fortran/36700
430 * match.c (gfc_match_call): Use the existing symbol even if
431 it is a function.
432
433 2008-09-18 Daniel Kraft <d@domob.eu>
434
435 PR fortran/37507
436 * trans.h (gfc_trans_runtime_error): New method.
437 (gfc_trans_runtime_error_vararg): New method.
438 (gfc_allocate_array_with_status): New argument `expr' for locus/varname.
439 (gfc_deallocate_array_with_status): Ditto.
440 * trans-array.h (gfc_array_deallocate): Ditto.
441 * trans.c (gfc_trans_runtime_error): New method.
442 (gfc_trans_runtime_error_vararg): New method, moved parts of the code
443 from gfc_trans_runtime_check here.
444 (gfc_trans_runtime_error_check): Moved code partly to new method.
445 (gfc_call_malloc): Fix tab-indentation.
446 (gfc_allocate_array_with_status): New argument `expr' and call
447 gfc_trans_runtime_error for error reporting to include locus.
448 (gfc_deallocate_with_status): Ditto.
449 * trans-stmt.c (gfc_trans_deallocate): Pass expr as new argument.
450 * trans-array.c (gfc_array_allocate): Ditto.
451 (gfc_array_deallocate): New argument `expr', passed on.
452 (gfc_trans_dealloc_allocated): Pass NULL for expr.
453 * trans-openmp.c (gfc_omp_clause_default): Ditto.
454
455 2008-09-18 Paul Thomas <pault@gcc.gnu.org>
456
457 PR fortran/37274
458 PR fortran/36374
459 * module.c (check_for_ambiguous): New function to test loaded
460 symbol for ambiguity with fixup symbol.
461 (read_module): Call check_for_ambiguous.
462 (write_symtree): Do not write the symtree for symbols coming
463 from an interface body.
464
465 PR fortran/36374
466 * resolve.c (count_specific_procs ): New function to count the
467 number of specific procedures with the same name as the generic
468 and emit appropriate errors for and actual argument reference.
469 (resolve_assumed_size_actual): Add new argument no_formal_args.
470 Correct logic around passing generic procedures as arguments.
471 Call count_specific_procs from two locations.
472 (resolve_function): Evaluate and pass no_formal_args.
473 (resolve call): The same and clean up a bit by using csym more
474 widely.
475
476 PR fortran/36454
477 * symbol.c (gfc_add_access): Access can be updated if use
478 associated and not private.
479
480 2008-09-17 Jakub Jelinek <jakub@redhat.com>
481
482 PR fortran/37536
483 * trans-stmt.c (gfc_trans_do): Optimize integer type non-simple
484 do loop initialization.
485
486 2008-09-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
487 Tobias Burnus <burnus@net.b.de>
488
489 PR fortran/35840
490 * io.c (match_vtag): Add tag name to error message.
491 (match_out_tag): Cleanup whitespace.
492 (gfc_resolve_dt): Resolve id and async tags.
493
494 2008-09-13 Daniel Kraft <d@domob.eu>
495
496 PR fortran/35770
497 * primary.c (gfc_match_varspec): Added missing type-spec clearing
498 after wrong implicit character typing.
499
500 2008-09-12 Richard Guenther <rguenther@suse.de>
501
502 * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Use
503 build_fold_addr_expr to properly mark the argument
504 addressable.
505
506 2008-09-11 Daniel Kraft <d@domob.eu>
507
508 PR fortran/36214
509 * simplify.c (simplify_cmplx): Added linebreak to long line.
510 * target-memory.c (gfc_convert_boz): Fix indentation.
511 (gfc_interpret_float): Set mpfr precision to right value before
512 calling mpfr_init.
513
514 2008-09-10 H.J. Lu <hongjiu.lu@intel.com>
515
516 * expr.c (find_array_element): Reformat comment.
517
518 2008-09-10 H.J. Lu <hongjiu.lu@intel.com>
519
520 * expr.c (find_array_element): Reformat.
521
522 2008-09-10 Tobias Burnus <burnus@net-b.de>
523
524 PR fortran/37420
525 * trans-decl.c (get_proc_pointer_decl): Fix -Wunused-variable.
526
527 2008-09-09 Daniel Kraft <d@domob.eu>
528
529 PR fortran/37429
530 * resolve.c (expression_rank): Added assertion to guard against
531 EXPR_COMPCALL expressions.
532 (resolve_compcall): Set expression's rank from the target procedure's.
533
534 2008-09-09 Daniel Kraft <d@domob.eu>
535
536 PR fortran/37411
537 * trans-array.c (gfc_conv_array_parameter): Added assertion that the
538 symbol has an array spec.
539
540 2008-09-08 Daniel Kraft <d@domob.eu>
541
542 PR fortran/37199
543 * trans-expr.c (gfc_add_interface_mapping): Set new_sym->as.
544 (gfc_map_intrinsic_function): Added checks against NULL bounds in
545 array specs.
546
547 2008-09-08 Tobias Burnus <burnus@net.b.de>
548
549 PR fortran/37400
550 * symbol.c (gfc_set_default_type): Copy char len.
551
552 2008-09-06 Steven G. Kargl <kargls@comcast.net>
553
554 PR fortran/36153
555 * fortran/resolve.c (resolve_function): Shortcircuit for SIZE and
556 UBOUND if 2nd argument is KIND.
557
558 2008-09-06 Steven G. Kargl <kargls@comcast.net>
559
560 PR fortran/33229
561 * resolve.c (resolve_function): An intrinsic subroutine should not be
562 called as a function.
563
564 2008-09-05 Daniel Kraft <d@domob.eu>
565
566 PR fortran/35837
567 * resolve.c (resolve_types): Restore gfc_current_ns on exit.
568 * symbol.c (gfc_save_all): Removed blank line.
569
570 2008-09-05 Daniel Kraft <d@domob.eu>
571
572 PR fortran/36746
573 * primary.c (gfc_match_rvalue): Removed logic to handle implicit
574 typing to a derived-type if a component reference is found.
575 (gfc_match_varspec): Moved it here.
576
577 2008-09-04 Richard Guenther <rguenther@suse.de>
578
579 * trans-array.c (gfc_conv_array_parameter): Use correct types
580 in building COND_EXPRs.
581 * trans-expr.c (gfc_conv_missing_dummy): Likewise.
582 * trans-intrinsics.c (gfc_conv_intrinsic_merge): Likewise.
583
584 2008-09-04 Daniel Kraft <d@domob.eu>
585
586 * PR fortran/37099
587 * expr.c (simplify_const_ref): Update expression's character length
588 when pulling out a substring reference.
589
590 2008-09-04 Ian Lance Taylor <iant@google.com>
591
592 * symbol.c (generate_isocbinding_symbol): Compare
593 gfc_notification_std with ERROR rather than FAILURE.
594 * resolve.c (check_assumed_size_reference): Compare array type
595 with AR_FULL rather than DIMEN_ELEMENT.
596 (resolve_actual_arglist): Compare with EXPR_VARIABLE rather than
597 FL_VARIABLE.
598
599 2008-09-01 Jerry DeLisle <jvdelisle@gcc.gnu.org>
600
601 PR fortran/37228
602 * io.c (check_format): Allow specifying precision with g0 format.
603
604 2008-09-02 Daniel Kraft <d@domob.eu>
605
606 * gfortran.h (struct gfc_namespace): New member `implicit_loc'.
607 (gfc_add_abstract): New method.
608 * decl.c (gfc_get_type_attr_spec): Match ABSTRACT attribute.
609 (gfc_match_derived_decl): Copy abstract attribute in derived symbol.
610 * dump-parse-tree.c (show_attr): Show ABSTRACT attribute as `ABSTRACT'
611 only to allow for ABSTRACT types.
612 * parse.c (parse_interface): Use new gfc_add_abstract.
613 * primary.c (gfc_match_structure_constructor): Check that no ABSTRACT
614 type is constructed.
615 * resolve.c (resolve_typespec_used): New method.
616 (resolve_fl_derived): Check type in respect to ABSTRACT attribute and
617 check that no component is of an ABSTRACT type.
618 (resolve_symbol): Check that no symbol is of an ABSTRACT type.
619 (resolve_types): Check IMPLICIT declarations for ABSTRACT types.
620 * symbol.c (gfc_merge_new_implicit): Remember loci of IMPLICIT's.
621 (gfc_add_abstract): New method.
622
623 2008-09-01 Daniel Kraft <d@domob.eu>
624
625 PR fortran/37193
626 * module.c (read_module): Initialize use_only flag on used symbols.
627
628 2008-09-01 Daniel Kraft <d@domob.eu>
629
630 * gfc-internals.texi (F2003 OOP), (Type-bound Procedures): New chapter
631 and section to document the internals of type-bound procedures.
632 (gfc_expr): Document EXPR_COMPCALL.
633 * gfortran.h (struct gfc_expr): Remove unused `derived' from compcall.
634 * dump-parse-tree.c (show_compcall): New method.
635 (show_expr): Call it for EXPR_COMPCALL.
636 (show_typebound), (show_f2k_derived): New methods.
637 (show_symbol): Call show_f2k_derived.
638 (show_code_node): Handle EXEC_COMPCALL.
639 * primary.c (gfc_match_varspec): Don't initialize removed `derived' in
640 primary->value.compcall.
641
642 2008-08-31 Richard Guenther <rguenther@suse.de>
643
644 * trans-expr.c (gfc_trans_string_copy): Use the correct types
645 to compute slen and dlen.
646
647 2008-08-31 Daniel Kraft <d@domob.eu>
648
649 * gfortran.h (enum gfc_statement): New entry `ST_GENERIC'.
650 (struct gfc_tbp_generic): New type.
651 (struct gfc_typebound_proc): Removed `target' and added union with
652 `specific' and `generic' members; new members `overridden',
653 `subroutine', `function' and `is_generic'.
654 (struct gfc_expr): New members `derived' and `name' in compcall union
655 member and changed type of `tbp' to gfc_typebound_proc.
656 (gfc_compare_interfaces), (gfc_compare_actual_formal): Made public.
657 * match.h (gfc_typebound_default_access): New global.
658 (gfc_match_generic): New method.
659 * decl.c (gfc_match_generic): New method.
660 (match_binding_attributes): New argument `generic' and handle it.
661 (match_procedure_in_type): Mark matched binding as non-generic.
662 * interface.c (gfc_compare_interfaces): Made public.
663 (gfc_compare_actual_formal): Ditto.
664 (check_interface_1), (compare_parameter): Use new public names.
665 (gfc_procedure_use), (gfc_search_interface): Ditto.
666 * match.c (match_typebound_call): Set base-symbol referenced.
667 * module.c (binding_generic): New global array.
668 (current_f2k_derived): New global.
669 (mio_typebound_proc): Handle IO of GENERIC bindings.
670 (mio_f2k_derived): Record current f2k-namespace in current_f2k_derived.
671 * parse.c (decode_statement): Handle GENERIC statement.
672 (gfc_ascii_statement): Ditto.
673 (typebound_default_access), (set_typebound_default_access): Removed.
674 (gfc_typebound_default_access): New global.
675 (parse_derived_contains): New default-access implementation and handle
676 GENERIC statements encountered.
677 * primary.c (gfc_match_varspec): Adapted to new gfc_typebound_proc
678 structure and removed check for SUBROUTINE/FUNCTION from here.
679 * resolve.c (extract_compcall_passed_object): New method.
680 (update_compcall_arglist): Use it.
681 (resolve_typebound_static): Adapted to new gfc_typebound_proc structure.
682 (resolve_typebound_generic_call): New method.
683 (resolve_typebound_call): Check target is a SUBROUTINE and handle calls
684 to GENERIC bindings.
685 (resolve_compcall): Ditto (check for target being FUNCTION).
686 (check_typebound_override): Handle GENERIC bindings.
687 (check_generic_tbp_ambiguity), (resolve_typebound_generic): New methods.
688 (resolve_typebound_procedure): Handle GENERIC bindings and set new
689 attributes subroutine, function and overridden in gfc_typebound_proc.
690 (resolve_fl_derived): Ensure extended type is resolved before the
691 extending one is.
692 * st.c (gfc_free_statement): Fix bug with free'ing EXEC_COMPCALL's.
693 * symbol.c (gfc_find_typebound_proc): Adapt for GENERIC changes.
694
695 2008-08-29 Jan Hubicka <jh@suse.cz>
696
697 * parse.c (parse_interface): Silence uninitialized var warning.
698
699 2008-08-29 Jakub Jelinek <jakub@redhat.com>
700
701 * trans.h (struct lang_type): Add span.
702 (GFC_TYPE_ARRAY_SPAN): Define.
703 * trans-decl.c (gfc_get_symbol_decl): For subref array pointers,
704 copy TREE_STATIC from decl to span instead of setting it
705 unconditionally, set DECL_ARTIFICIAL, fix type of initializer
706 and set GFC_TYPE_ARRAY_SPAN on decl's type.
707 * trans-types.c (gfc_get_array_descr_info): If
708 GFC_TYPE_ARRAY_SPAN is non-NULL, use it as element size.
709
710 * trans-decl.c (check_constant_initializer,
711 gfc_emit_parameter_debug_info): New functions.
712 (gfc_generate_module_vars, gfc_generate_function_code): Emit
713 PARAMETERs and unreferenced variables with initializers into
714 debug info.
715
716 * gfortran.h (gfc_use_list): Add where field.
717 * module.c (use_locus): New static variable.
718 (gfc_match_use): Set it.
719 (gfc_use_module): Copy it to gfc_use_list's where field.
720 * trans-decl.c (gfc_generate_module_vars): Call gfc_trans_use_stmts.
721 (gfc_trans_use_stmts): Set backend locus before calling the debug
722 hook. Allow non-VAR_DECLs to be created even for non-external
723 module. Don't emit anything so far for renames from different
724 modules.
725
726 PR fortran/24790
727 * trans-decl.c (create_function_arglist): Set DECL_BY_REFERENCE on
728 PARM_DECLs with pointer or reference type.
729
730 * trans-decl.c (gfc_build_qualified_array): Build non-flat
731 array type for debug info purposes.
732
733 PR fortran/29635
734 PR fortran/23057
735 * f95-lang.c (gfc_init_ts): New function.
736 (LANG_HOOKS_INIT_TS): Define.
737 * gfortran.h (gfc_use_rename): New type, moved from module.c.
738 (gfc_get_use_rename): New macro, moved from module.c.
739 (gfc_use_list): New type.
740 (gfc_get_use_list): New macro.
741 (gfc_namespace): Add use_stmts field.
742 (gfc_free_use_stmts): New prototype.
743 * Make-lang.in (fortran/trans-decl.o): Depend on debug.h.
744 * module.c (gfc_use_rename, gfc_get_use_rename): Moved to
745 gfortran.h.
746 (gfc_use_module): Chain the USE statement info to
747 ns->use_stmts.
748 (gfc_free_use_stmts): New function.
749 * symbol.c (gfc_free_namespace): Call gfc_free_use_stmts.
750 * trans.h (struct module_htab_entry): New type.
751 (gfc_find_module, gfc_module_add_decl): New functions.
752 * trans.c (gfc_generate_module_code): Create NAMESPACE_DECL for
753 the module, adjust DECL_CONTEXTs of module procedures and
754 call gfc_module_add_decl for them.
755 * trans-common.c (build_common_decl): Set DECL_IGNORED_P
756 on the common variable.
757 (create_common): Set DECL_IGNORED_P for use associated vars.
758 * trans-decl.c: Include debug.h.
759 (gfc_get_symbol_decl): Set DECL_IGNORED_P on use_assoc vars from
760 modules.
761 (build_function_decl): Allow current_function_decl's context
762 to be a NAMESPACE_DECL.
763 (module_htab, cur_module): New variables.
764 (module_htab_do_hash, module_htab_eq, module_htab_decls_hash,
765 module_htab_decls_eq, gfc_find_module, gfc_module_add_decl): New
766 functions.
767 (gfc_create_module_variable): Adjust DECL_CONTEXTs of module
768 variables and types and call gfc_module_add_decl for them.
769 (gfc_generate_module_vars): Temporarily set cur_module.
770 (gfc_trans_use_stmts): New function.
771 (gfc_generate_function_code): Call it.
772 (gfc_generate_block_data): Set DECL_IGNORED_P on decl.
773 * trans-types.c (gfc_get_derived_type): Adjust DECL_CONTEXT
774 and TYPE_CONTEXT of module derived types.
775
776 2008-08-28 Daniel Kraft <d@domob.eu>
777
778 * gfortran.h (enum expr_t): New value `EXPR_COMPCALL'.
779 (gfc_get_typebound_proc): New macro.
780 (struct gfc_expr): New union-member `compcall' for EXPR_COMPCALL.
781 (enum gfc_exec_op): New value `EXEC_COMPCALL'.
782 (gfc_find_typebound_proc): New argument.
783 (gfc_copy_ref), (gfc_match_varspec): Made public.
784 * decl.c (match_procedure_in_type): Use gfc_get_typebound_proc.
785 * expr.c (free_expr0), (gfc_copy_expr): Handle EXPR_COMPCALL.
786 (gfc_copy_ref): Made public and use new name.
787 (simplify_const_ref): Use new name of gfc_copy_ref.
788 (simplify_parameter_variable): Ditto.
789 (gfc_simplify_expr): gcc_unreachable for EXPR_COMPCALL.
790 * match.c (match_typebound_call): New method.
791 (gfc_match_call): Allow for CALL's to typebound procedures.
792 * module.c (binding_passing), (binding_overriding): New variables.
793 (expr_types): Add EXPR_COMPCALL.
794 (mio_expr): gcc_unreachable for EXPR_COMPCALL.
795 (mio_typebound_proc), (mio_typebound_symtree): New methods.
796 (mio_f2k_derived): Handle type-bound procedures.
797 * primary.c (gfc_match_varspec): Made public and parse trailing
798 references to type-bound procedures; new argument `sub_flag'.
799 (gfc_match_rvalue): New name and argument of gfc_match_varspec.
800 (match_variable): Ditto.
801 * resolve.c (update_arglist_pass): New method.
802 (update_compcall_arglist), (resolve_typebound_static): New methods.
803 (resolve_typebound_call), (resolve_compcall): New methods.
804 (gfc_resolve_expr): Handle EXPR_COMPCALL.
805 (resolve_code): Handle EXEC_COMPCALL.
806 (resolve_fl_derived): New argument to gfc_find_typebound_proc.
807 (resolve_typebound_procedure): Ditto and removed not-implemented error.
808 * st.c (gfc_free_statement): Handle EXEC_COMPCALL.
809 * symbol.c (gfc_find_typebound_proc): New argument `noaccess' and
810 implement access-checking.
811 * trans-expr.c (gfc_apply_interface_mapping_to_expr): gcc_unreachable
812 on EXPR_COMPCALL.
813 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Add missing break.
814 * trans-openmp.c (gfc_trans_omp_array_reduction): Add missing
815 intialization of ref->type.
816
817 2008-08-28 Janus Weil <janus@gcc.gnu.org>
818
819 PR fortran/37253
820 * module.c (ab_attribute,attr_bits,mio_symbol_attribute): Take care of
821 saving attr.procedure and attr.proc_ptr to the module file.
822
823 2008-08-25 Daniel Kraft <d@domob.eu>
824
825 * gfortran.h (gfc_find_component): Add new arguments.
826 * parse.c (parse_derived_contains): Check if the derived-type containing
827 the CONTAINS section is SEQUENCE/BIND(C).
828 * resolve.c (resolve_typebound_procedure): Check for name collision with
829 components.
830 (resolve_fl_derived): Check for name collision with inherited
831 type-bound procedures.
832 * symbol.c (gfc_find_component): New arguments `noaccess' and `silent'.
833 (gfc_add_component): Adapt for new arguments.
834 * primary.c (match_varspec), (gfc_match_structure_constructor): Ditto.
835
836 2008-08-24 Tobias Burnus <burnus@net-b.de>
837
838 PR fortran/37201
839 * decl.c (verify_bind_c_sym): Reject array/string returning
840 functions.
841
842 2008-08-24 Tobias Burnus <burnus@net-b.de>
843
844 PR fortran/37201
845 * trans-expr.c (gfc_conv_function_call): Add string_length
846 for character-returning bind(C) functions.
847
848 2008-08-24 Daniel Kraft <d@domob.eu>
849
850 * gfortran.h (gfc_typebound_proc): New struct.
851 (gfc_symtree): New member typebound.
852 (gfc_find_typebound_proc): Prototype for new method.
853 (gfc_get_derived_super_type): Prototype for new method.
854 * parse.h (gfc_compile_state): New state COMP_DERIVED_CONTAINS.
855 * decl.c (gfc_match_procedure): Handle PROCEDURE inside derived-type
856 CONTAINS section.
857 (gfc_match_end): Handle new context COMP_DERIVED_CONTAINS.
858 (gfc_match_private): Ditto.
859 (match_binding_attributes), (match_procedure_in_type): New methods.
860 (gfc_match_final_decl): Rewrote to make use of new
861 COMP_DERIVED_CONTAINS parser state.
862 * parse.c (typebound_default_access): New global helper variable.
863 (set_typebound_default_access): New callback method.
864 (parse_derived_contains): New method.
865 (parse_derived): Extracted handling of CONTAINS to new parser state
866 and parse_derived_contains.
867 * resolve.c (resolve_bindings_derived), (resolve_bindings_result): New.
868 (check_typebound_override), (resolve_typebound_procedure): New methods.
869 (resolve_typebound_procedures): New method.
870 (resolve_fl_derived): Call new resolving method for typebound procs.
871 * symbol.c (gfc_new_symtree): Initialize new member typebound to NULL.
872 (gfc_find_typebound_proc): New method.
873 (gfc_get_derived_super_type): New method.
874
875 2008-08-23 Janus Weil <janus@gcc.gnu.org>
876
877 * gfortran.h (gfc_component): Add field "symbol_attribute attr", remove
878 fields "pointer", "allocatable", "dimension", "access".
879 Remove functions "gfc_set_component_attr" and "gfc_get_component_attr".
880 * interface.c (gfc_compare_derived_types): Ditto.
881 * trans-array.c (gfc_array_allocate,structure_alloc_comps): Ditto.
882 * trans-expr.c (gfc_conv_component_ref,gfc_trans_subcomponent_assign,
883 gfc_conv_structure): Ditto.
884 * symbol.c (gfc_find_component,free_components,gfc_set_component_attr,
885 gfc_get_component_attr,verify_bind_c_derived_type,
886 generate_isocbinding_symbol): Ditto.
887 * decl.c (build_struct): Ditto.
888 * dump-parse-tree.c (show_components): Ditto.
889 * trans-stmt.c (gfc_trans_deallocate): Ditto.
890 * expr.c (gfc_check_assign,gfc_check_pointer_assign,
891 gfc_default_initializer): Ditto.
892 * module.c (mio_component): Ditto.
893 * trans-types.c (copy_dt_decls_ifequal,gfc_get_derived_type): Ditto.
894 * resolve.c (has_default_initializer,resolve_structure_cons,
895 gfc_iso_c_func_interface,find_array_spec,resolve_ref,
896 resolve_deallocate_expr,resolve_allocate_expr,resolve_fl_derived,
897 resolve_equivalence_derived): Ditto.
898 * trans-io.c (transfer_expr): Ditto.
899 * parse.c (parse_derived): Ditto.
900 * dependency.c (gfc_check_dependency): Ditto.
901 * primary.c (gfc_variable_attr): Ditto.
902
903 2008-08-23 Tobias Burnus <burnus@net-b.de>
904
905 PR fortran/37076
906 * arith.c (gfc_arith_concat): Fix concat of kind=4 strings.
907
908 2008-08-23 Tobias Burnus <burnus@net-b.de>
909
910 PR fortran/37025
911 * target-memory.c (gfc_interpret_character): Support
912 kind=4 characters.
913
914 2008-08-22 Daniel Kraft <d@domob.eu>
915
916 PR fortran/30239
917 * symbol.c (gfc_add_type): Warn on -Wsurprising if a function-result
918 type is re-declared but neither -pedantic nor -std=f* is given and so
919 this is no error.
920 * invoke.texi (-Wsurprising): Document this new behaviour.
921
922 2008-08-22 Daniel Kraft <d@domob.eu>
923
924 * gfortran.h (in_prefix): Removed from this header.
925 * match.h (gfc_matching_prefix): Moved and renamed from `in_prefix'.
926 * decl.c (in_prefix): Removed from here.
927 (gfc_match_prefix): Use new name of `gfc_matching_prefix'.
928 * symbol.c (gfc_check_symbol_typed): Ditto.
929 * expr.c (check_typed_ns): New helper variable.
930 (expr_check_typed_help): New helper method.
931 (gfc_expr_check_typed): Rewrote to use gfc_traverse_expr to do the
932 work, fixing a minor problem.
933 * match.c (gfc_matching_prefix): New variable.
934
935 2008-08-22 Daniel Kraft <d@domob.eu>
936
937 PR fortran/32095
938 PR fortran/34228
939 * gfortran.h (in_prefix): New global.
940 (gfc_check_symbol_typed), (gfc_check_expr_typed): New methods.
941 * array.c (match_array_element_spec): Check that bounds-expressions
942 don't have symbols not-yet-typed in them.
943 * decl.c (var_element): Check that variable used is already typed.
944 (char_len_param_value): Check that expression does not contain
945 not-yet-typed symbols.
946 (in_prefix): New global.
947 (gfc_match_prefix): Record using `in_prefix' if we're at the moment
948 parsing a prefix or not.
949 * expr.c (gfc_expr_check_typed): New method.
950 * parse.c (verify_st_order): New argument to disable error output.
951 (check_function_result_typed): New helper method.
952 (parse_spec): Check that the function-result declaration, if given in
953 a prefix, contains no not-yet-typed symbols when the IMPLICIT rules are
954 parsed.
955 * symbol.c (gfc_check_symbol_typed): Check that a symbol already has
956 a type associated to it, otherwise use the IMPLICIT rules or signal
957 an error.
958
959 2008-08-21 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
960
961 * f95-lang.c: Update all calls to pedwarn.
962
963 2008-08-18 Daniel Franke <franke.daniel@gmail.com>
964
965 PR fortran/37032
966 * gfortran.texi: Document decision on include file handling in
967 preprocessed files.
968
969 2008-08-16 Tobias Burnus <burnus@net-b.de>
970
971 PR fortran/36825
972 * libgfortran.h: Reduce GFC_MAX_DIMENSIONS to 7.
973
974 2008-08-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
975
976 PR fortran/35863
977 * io.c (gfc_match_open): Enable UTF-8 in checks.
978 * simplify.c (gfc_simplify_selected_char_kind): Enable iso_10646.
979
980 2008-08-14 Janus Weil <janus@gcc.gnu.org>
981
982 PR fortran/36705
983 * symbol.c (check_conflict): Move conflict checks for (procedure,save)
984 and (procedure,intent) to resolve_fl_procedure.
985 * resolve.c (resolve_fl_procedure): Ditto.
986
987 2008-08-09 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
988
989 PR 36901
990 * f95-lang.c (gfc_mark_addressable): Use "pedwarn (0," instead of
991 'pedwarn0'.
992
993 2008-08-09 Paul Thomas <pault@gcc.gnu.org>
994
995 PR fortran/37011
996 * symbol.c (gfc_add_extension): New function.
997 * decl.c (gfc_get_type_attr_spec): Call it.
998 (gfc_match_derived_decl): Set symbol extension attribute from
999 attr.extension.
1000 * gfortran.h : Add prototype for gfc_add_extension.
1001
1002 2008-08-08 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1003
1004 PR 28875
1005 * options.c (set_Wall): Replace set_Wunused by warn_unused.
1006
1007 2008-08-08 Daniel Kraft <d@domob.eu>
1008
1009 * gfortran.h (gfc_finalizer): Replaced member `procedure' by two
1010 new members `proc_sym' and `proc_tree' to store the symtree after
1011 resolution.
1012 (gfc_find_sym_in_symtree): Made public.
1013 * decl.c (gfc_match_final_decl): Adapted for new member name.
1014 * interface.c (gfc_find_sym_in_symtree): Made public.
1015 (gfc_extend_expr), (gfc_extend_assign): Changed call accordingly.
1016 * module.c (mio_finalizer), (mio_f2k_derived), (mio_full_f2k_derived):
1017 New methods for module-file IO of f2k_derived.
1018 (mio_symbol): Do IO of f2k_derived namespace.
1019 * resolve.c (gfc_resolve_finalizers): Adapted for new member name and
1020 finding the symtree for the symbol here.
1021 * symbol.c (gfc_free_finalizer): Adapted for new members.
1022
1023 2008-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1024
1025 * gfc-internals.texi: Update to GFDL 1.2. Do not list GPL as
1026 Invariant Section.
1027 * gfortran.texi: Likewise.
1028 * intrinsic.texi: Do not list GPL as Invariant Section.
1029 * invoke.texi: Likewise. Update copyright years.
1030
1031 2008-07-29 Paul Thomas <pault@gcc.gnu.org>
1032
1033 * trans-expr.c (conv_parent_component_references): New function
1034 to build missing parent references.
1035 (gfc_conv_variable): Call it
1036 * symbol.c (gfc_add_component): Check that component name in a
1037 derived type extension does not appear in parent.
1038 (gfc_find_component): For a derived type extension, check if
1039 the component appears in the parent derived type by calling
1040 self. Separate errors for private components and private types.
1041 * decl.c (match_data_constant): Add extra arg to call to
1042 gfc_match_structure_constructor.
1043 (check_extended_derived_type): New function to check that a
1044 parent derived type exists and that it is OK for exension.
1045 (gfc_get_type_attr_spec): Add extra argument 'name' and return
1046 it if extends is specified.
1047 (gfc_match_derived_decl): Match derived type extension and
1048 build a first component of the parent derived type if OK. Add
1049 the f2k namespace if not present.
1050 * gfortran.h : Add the extension attribute.
1051 * module.c : Handle attribute 'extension'.
1052 * match.h : Modify prototypes for gfc_get_type_attr_spec and
1053 gfc_match_structure_constructor.
1054 * primary.c (build_actual_constructor): New function extracted
1055 from gfc_match_structure_constructor and modified to call self
1056 iteratively to build derived type extensions, when f2k named
1057 components are used.
1058 (gfc_match_structure_constructor): Do not throw error for too
1059 many components if a parent type is being handled. Use
1060 gfc_find_component to generate errors for non-existent or
1061 private components. Iteratively call self for derived type
1062 extensions so that parent constructor is built. If extension
1063 and components left over, throw error.
1064 (gfc_match_rvalue): Add extra arg to call to
1065 gfc_match_structure_constructor.
1066
1067 * trans-array.c (gfc_conv_resolve_dependencies): If lhs and rhs
1068 are the same symbol, aliassing does not matter.
1069
1070 2008-07-29 Jan Hubicka <jh@suse.cz>
1071
1072 * options.c (gfc_post_options): Do not set flag_no_inline.
1073
1074 2008-07-29 Daniel Kraft <d@domob.eu>
1075
1076 PR fortran/36403
1077 * trans-intrinsic.c (conv_generic_with_optional_char_arg): New method
1078 to append a string-length even if the string argument is missing, e.g.
1079 for EOSHIFT.
1080 (gfc_conv_intrinsic_function): Call the new method for EOSHIFT, PACK
1081 and RESHAPE.
1082
1083 2008-07-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1084
1085 * gfortran.h (try): Remove macro. Replace try with gfc_try
1086 throughout.
1087 * array.c: Likewise.
1088 * check.c: Likewise.
1089 * cpp.c: Likewise.
1090 * cpp.h: Likewise.
1091 * data.c: Likewise.
1092 * data.h: Likewise.
1093 * decl.c: Likewise.
1094 * error.c: Likewise.
1095 * expr.c: Likewise.
1096 * interface.c: Likewise.
1097 * intrinsic.c: Likewise.
1098 * intrinsic.h: Likewise.
1099 * io.c: Likewise.
1100 * match.h: Likewise.
1101 * parse.c: Likewise.
1102 * parse.h: Likewise.
1103 * resolve.c: Likewise.
1104 * scanner.c: Likewise.
1105 * simplify.c: Likewise.
1106 * symbol.c: Likewise.
1107 * trans-openmp.c: Likewise.
1108 * trans-types.c: Likewise.
1109
1110 2008-07-28 Tobias Burnus <burnus@net-b.de>
1111
1112 * Make-lang.in: Remove -Wno-* from fortran-warn.
1113
1114 2008-07-28 Richard Guenther <rguenther@suse.de>
1115
1116 Merge from gimple-tuples-branch.
1117
1118 2008-07-18 Aldy Hernandez <aldyh@redhat.com>
1119
1120 * trans-expr.c: Include gimple.h instead of tree-gimple.h.
1121 * trans-array.c: Same.
1122 * trans-openmp.c: Same.
1123 * trans-stmt.c: Same.
1124 * f95-lang.c: Same.
1125 * trans-io.c: Same.
1126 * trans-decl.c: Same.
1127 * trans-intrinsic.c: Same.
1128 * trans.c: Same. Include tree-iterator.h.
1129 * Make-lang.in (trans.o): Depend on tree-iterator.h
1130
1131 2008-07-14 Aldy Hernandez <aldyh@redhat.com>
1132
1133 * trans-array.h (gfc_conv_descriptor_data_set_internal):
1134 Rename to gfc_conv_descriptor_data_set.
1135 (gfc_conv_descriptor_data_set_tuples): Remove.
1136 * trans-array.c (gfc_conv_descriptor_data_get): Rename
1137 from gfc_conv_descriptor_data_set_internal.
1138 Remove last argument to gfc_add_modify.
1139 (gfc_trans_allocate_array_storage): Rename gfc_add_modify_expr to
1140 gfc_add_modify.
1141 (gfc_trans_create_temp_array): Same.
1142 (gfc_conv_array_transpose): Same.
1143 (gfc_grow_array): Same.
1144 (gfc_put_offset_into_var): Same.
1145 (gfc_trans_array_ctor_element): Same.
1146 (gfc_trans_array_constructor_subarray): Same.
1147 (gfc_trans_array_constructor_value): Same.
1148 (gfc_trans_scalarized_loop_end): Same.
1149 (gfc_array_init_size): Same.
1150 (gfc_array_allocate): Same.
1151 (gfc_trans_array_bounds): Same.
1152 (gfc_trans_auto_array_allocation): Same.
1153 (gfc_trans_g77_array): Same.
1154 (gfc_trans_dummy_array_bias): Same.
1155 (gfc_conv_expr_descriptor): Same.
1156 (structure_alloc_comps): Same.
1157 * trans-expr.c: Same.
1158 * trans-openmp.c (gfc_omp_clause_default_ctor): Same.
1159 Rename gfc_conv_descriptor_data_set_tuples to
1160 gfc_conv_descriptor_data_set.
1161 (gfc_omp_clause_copy_ctor): Change build_gimple_modify_stmt to
1162 build2_v.
1163 (gfc_omp_clause_assign_op): Same.
1164 (gfc_trans_omp_array_reduction): Rename gfc_add_modify_expr to
1165 gfc_add_modify.
1166 (gfc_trans_omp_atomic): Same.
1167 (gfc_trans_omp_do): Same. Change GIMPLE_MODIFY_STMT to MODIFY_EXPR.
1168 Rename gfc_add_modify_stmt to gfc_add_modify.
1169 * trans-stmt.c: Rename gfc_add_modify_expr to
1170 gfc_add_modify.
1171 * trans.c: Rename gfc_add_modify_expr to
1172 gfc_add_modify.
1173 (gfc_add_modify): Remove last argument.
1174 Rename GIMPLE_MODIFY_STMT to MODIFY_EXPR.
1175 * trans.h: Remove gfc_add_modify_expr, gfc_add_modify_stmt.
1176 Add prototype for gfc_add_modify.
1177 * f95-lang.c (union lang_tree_node): Rename GENERIC_NEXT to TREE_CHAIN.
1178 * trans-decl.c: Rename gfc_add_modify_stmt to gfc_add_modify.
1179 * trans-io.c: Same.
1180 * trans-intrinsic.c: Same.
1181
1182 2008-02-25 Aldy Hernandez <aldyh@redhat.com>
1183
1184 * Make-lang.in (fortran-warn): Add -Wno-format.
1185
1186 2008-02-19 Diego Novillo <dnovillo@google.com>
1187
1188 http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00804.html
1189
1190 * fortran/Make-lang.in (fortran-warn): Remove.
1191
1192 2007-11-22 Aldy Hernandez <aldyh@redhat.com>
1193
1194 * trans-expr.c (gfc_trans_string_copy): Use "void *" when building a
1195 memset.
1196
1197 2007-11-10 Aldy Hernandez <aldyh@redhat.com>
1198
1199 * Make-lang.in (fortran-warn): Set to -Wno-format.
1200 * trans.c (gfc_trans_code): Update comment to say GENERIC.
1201 Call tree_annotate_all_with_locus instead of annotate_all_with_locus.
1202
1203 2008-07-27 Tobias Burnus <burnus@net-b.de>
1204
1205 PR fortran/36132
1206 PR fortran/29952
1207 PR fortran/36909
1208 * trans.c (gfc_trans_runtime_check): Allow run-time warning besides
1209 run-time error.
1210 * trans.h (gfc_trans_runtime_check): Update declaration.
1211 * trans-array.c (gfc_trans_array_ctor_element,gfc_trans_array_bound_check,
1212 gfc_conv_array_ref,gfc_conv_ss_startstride,gfc_trans_dummy_array_bias):
1213 Updated gfc_trans_runtime_check calls.
1214 (gfc_conv_array_parameter): Implement flag_check_array_temporaries,
1215 fix packing/unpacking for nonpresent optional actuals to optional
1216 formals.
1217 * trans-array.h (gfc_conv_array_parameter): Update declaration.
1218 * trans-expr.c (gfc_conv_substring,gfc_trans_arrayfunc_assign,
1219 gfc_conv_function_call): Updated gfc_trans_runtime_check calls.
1220 (gfc_conv_function_call): Update gfc_conv_array_parameter calls.
1221 * trans-expr.c (gfc_trans_goto): Updated gfc_trans_runtime_check
1222 calls.
1223 * trans-io.c (set_string,gfc_conv_intrinsic_repeat): Ditto.
1224 (gfc_conv_intrinsic_transfer,gfc_conv_intrinsic_loc): Same for
1225 gfc_conv_array_parameter.
1226 * trans-intrinsics.c (gfc_conv_intrinsic_bound): Ditto.
1227 * trans-decl.c (gfc_build_builtin_function_decls): Add
1228 gfor_fndecl_runtime_warning_at.
1229 * lang.opt: New option fcheck-array-temporaries.
1230 * gfortran.h (gfc_options): New flag_check_array_temporaries.
1231 * options.c (gfc_init_options, gfc_handle_option): Handle flag.
1232 * invoke.texi: New option fcheck-array-temporaries.
1233
1234 2008-07-24 Jan Hubicka <jh@suse.cz>
1235
1236 * fortran/options.c (gfc_post_options): Remove flag_unline_trees code.
1237
1238 2008-07-24 Daniel Kraft <d@domob.eu>
1239
1240 PR fortran/33141
1241 * lang.opt (Wnonstd-intrinsics): Removed option.
1242 (Wintrinsics-std), (Wintrinsic-shadow): New options.
1243 * invoke.texi (Option Summary): Removed -Wnonstd-intrinsics
1244 from the list and added -Wintrinsics-std and -Wintrinsic-shadow.
1245 (Error and Warning Options): Documented the new options and removed
1246 the documentation for -Wnonstd-intrinsics.
1247 * gfortran.h (gfc_option_t): New members warn_intrinsic_shadow and
1248 warn_intrinsics_std, removed warn_nonstd_intrinsics.
1249 (gfc_is_intrinsic): Renamed from gfc_intrinsic_name.
1250 (gfc_warn_intrinsic_shadow), (gfc_check_intrinsic_standard): New.
1251 * decl.c (match_procedure_decl): Replaced gfc_intrinsic_name by
1252 the new name gfc_is_intrinsic.
1253 (warn_intrinsic_shadow): New helper method.
1254 (gfc_match_function_decl), (gfc_match_subroutine): Call the new method
1255 warn_intrinsic_shadow to check the just-parsed procedure.
1256 * expr.c (check_init_expr): Call new gfc_is_intrinsic to check whether
1257 the function called is really an intrinsic in the selected standard.
1258 * intrinsic.c (gfc_is_intrinsic): Renamed from gfc_intrinsic_name and
1259 extended to take into account the selected standard settings when trying
1260 to find out whether a symbol is an intrinsic or not.
1261 (gfc_check_intrinsic_standard): Made public and extended.
1262 (gfc_intrinsic_func_interface), (gfc_intrinsic_sub_interface): Removed
1263 the calls to check_intrinsic_standard, this check now happens inside
1264 gfc_is_intrinsic.
1265 (gfc_warn_intrinsic_shadow): New method defined.
1266 * options.c (gfc_init_options): Initialize new warning flags to false
1267 and removed intialization of Wnonstd-intrinsics flag.
1268 (gfc_post_options): Removed logic for Wnonstd-intrinsics flag.
1269 (set_Wall): Set new warning flags and removed Wnonstd-intrinsics flag.
1270 (gfc_handle_option): Handle the new flags and removed handling of the
1271 old Wnonstd-intrinsics flag.
1272 * primary.c (gfc_match_rvalue): Replaced call to gfc_intrinsic_name by
1273 the new name gfc_is_intrinsic.
1274 * resolve.c (resolve_actual_arglist): Ditto.
1275 (resolve_generic_f), (resolve_unknown_f): Ditto.
1276 (is_external_proc): Ditto.
1277 (resolve_generic_s), (resolve_unknown_s): Ditto.
1278 (resolve_symbol): Ditto and ensure for symbols declared INTRINSIC that
1279 they are really available in the selected standard setting.
1280
1281 2008-07-24 Daniel Kraft <d@domob.eu>
1282
1283 * match.c (gfc_match): Add assertion to catch wrong calls trying to
1284 match upper-case characters.
1285
1286 2008-07-24 Thomas Koenig <tkoenig@gcc.gnu.org>
1287
1288 PR fortran/29952
1289 * gfortran.h: Add "warn_array_temp" to gfc_option_t.
1290 * lang.opt: Add -Warray-temporaries.
1291 * invoke.texi: Document -Warray-temporaries
1292 * trans-array.h (gfc_trans_create_temp_array): Add argument of
1293 type *locus.
1294 (gfc_conv_loop_setup): Likewise.
1295 * trans-array.c (gfc_trans_create_temp_array): If
1296 -Warray-temporaries is given and locus is present, warn about
1297 creation of array temporaries.
1298 (gfc_trans_array_constructor_subarray): Add locus to call
1299 of gfc_conv_loop_setup.
1300 (gfc_trans_array_constructor): Add where argument. Pass where
1301 argument to call of gfc_trans_create_temp_array.
1302 (gfc_add_loop_ss_code): Add where argument. Pass where argument
1303 to recursive call of gfc_add_loop_ss_code and to call of
1304 gfc_trans_array_constructor.
1305 (gfc_conv_loop_setup): Add where argument. Pass where argument
1306 to calls to gfc_add_loop_ss_code and to gfc_trans_create_temp_array.
1307 (gfc_conv_expr_descriptor): Pass location to call of
1308 gfc_conv_loop_setup.
1309 (gfc_conv_array_parameter): If -Warray-temporaries is given,
1310 warn about creation of temporary arrays.
1311 * trans-expr.c (gfc_conv_subref_array_arg): Add where argument
1312 to call to gfc_conv_loop_setup.
1313 (gfc_conv_function_call): Add where argument to call to
1314 gfc_trans_creat_temp_array.
1315 (gfc_trans_subarray_assign): Likewise.
1316 (gfc_trans_assignment_1): Add where argument to call to
1317 gfc_conv_loop_setup.
1318 * trans-stmt.c (gfc_conv_elemental_dependencies): Add where
1319 argument to call to gfc_trans_create_temp_array.
1320 (gfc_trans_call): Add where argument to call to gfc_conv_loop_setup.
1321 (generate_loop_for_temp_to_lhs): Likewise.
1322 (generate_loop_for_rhs_to_temp): Likewise.
1323 (compute_inner_temp_size): Likewise.
1324 (gfc_trans-pointer_assign_need_temp): Likewise.
1325 (gfc_evaluate_where_mask): Likewise.
1326 (gfc_trans_where_assign): Likewise.
1327 (gfc_trans_where_3): Likewise.
1328 * trans-io.c (transfer_srray_component): Add where argument
1329 to function. Add where argument to call to gfc_conv_loop_setup.
1330 (transfer_expr): Add where argument to call to
1331 transfer_array_component.
1332 (gfc_trans_transfer): Add where expression to call to
1333 gfc_conv_loop_setup.
1334 * trans-intrinsic.c (gfc_conv_intrinsic_anyall): Add
1335 where argument to call to gfc_conv_loop_setup.
1336 (gfc_conv_intrinsic_count): Likewise.
1337 (gfc_conv_intrinsic_arith): Likewise.
1338 (gfc_conv_intrinsic_dot_product): Likewise.
1339 (gfc_conv_intrinsic_minmaxloc): Likewise.
1340 (gfc_conv_intrinsic_minmaxval): Likewise.
1341 (gfc_conv_intrinsic_array_transfer): Warn about
1342 creation of temporary array.
1343 Add where argument to call to gfc_trans_create_temp_array.
1344 * options.c (gfc_init_options): Initialize gfc_option.warn_array_temp.
1345 (gfc_handle_option): Set gfc_option.warn_array_temp.
1346
1347 2008-07-23 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
1348
1349 PR 35058
1350 * f95-lang.c (gfc_mark_addressable): All calls to pedwarn changed.
1351
1352 2008-07-22 Daniel Kraft <d@domob.eu>
1353
1354 PR fortran/29835
1355 * io.c (error_element), (format_locus): New static globals.
1356 (unexpected_element): Spelled out this message fully.
1357 (next_char): Keep track of locus when not MODE_STRING.
1358 (next_char_not_space): Remember last parsed element in error_element.
1359 (format_lex): Fix two indentation errors.
1360 (check_format): Use format_locus and possibly error_element for a
1361 slightly better error message on invalid format.
1362 (check_format_string): Set format_locus to start of the string
1363 expression used as format.
1364
1365 2008-07-21 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1366
1367 * expr.c (gfc_check_pointer_assign): Fix typo in string.
1368 * io.c (check_format): Fix typo in string. Fix comment typos.
1369 * parse.c (gfc_global_used): Likewise.
1370 * resolve.c (resolve_allocate_expr): Likewise.
1371 * symbol.c (gfc_set_default_type): Likewise.
1372 * arith.c: Fix typos in comments.
1373 * array.c: Likewise.
1374 * data.c: Likewise.
1375 * decl.c: Likewise.
1376 * dependency.c: Likewise.
1377 * f95-lang.c: Likewise.
1378 * gfortran.h: Likewise.
1379 * matchexp.c: Likewise.
1380 * module.c: Likewise.
1381 * primary.c: Likewise.
1382 * scanner.c: Likewise.
1383 * trans-array.c: Likewise.
1384 * trans-common.c: Likewise.
1385 * trans-decl.c: Likewise.
1386 * trans-expr.c: Likewise.
1387 * trans-intrinsic.c: Likewise.
1388 * trans-types.c: Likewise.
1389 * trans.c: Likewise.
1390 * trans.h: Likewise.
1391
1392 2008-07-19 Tobias Burnus <burnus@net-b.de>
1393
1394 PR fortran/36795
1395 * matchexp.c (gfc_get_parentheses): Remove obsolete workaround,
1396 which caused the generation of wrong code.
1397
1398 2008-07-19 Tobias Burnus <burnus@net-b.de>
1399
1400 PR fortran/36342
1401 * scanner.c (load_file): Add argument to destinguish between
1402 true filename and displayed filename.
1403 (include_line,gfc_new_file): Adapt accordingly.
1404
1405 2008-07-19 Tobias Burnus <burnus@net-b.de>
1406
1407 * check.c (gfc_check_cshift,gfc_check_eoshift,gfc_check_unpack): Add rank
1408 checks for cshift's shift and eoshift's shift and boundary args.
1409 (gfc_check_unpack): Add rank and shape tests for unpack.
1410
1411 2008-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1412
1413 * gfortran.h (new): Remove macro.
1414 * array.c (gfc_append_constructor, match_array_list,
1415 gfc_match_array_constructor): Likewise.
1416 * bbt.c (insert, gfc_insert_bbt): Likewise.
1417 * decl.c (var_element, top_var_list, top_val_list, gfc_match_data,
1418 get_proc_name): Likewise.
1419 * expr.c (gfc_copy_actual_arglist): Likewise.
1420 * interface.c (compare_actual_formal, check_new_interface,
1421 gfc_add_interface): Likewise.
1422 * intrinsic.c gfc_convert_type_warn, gfc_convert_chartype):
1423 Likewise.
1424 * io.c (match_io_iterator, match_io_list): Likewise.
1425 * match.c (match_forall_header): Likewise.
1426 * matchexp.c (build_node): Likewise.
1427 * module.c (gfc_match_use): Likewise.
1428 * scanner.c (load_file): Likewise.
1429 * st.c (gfc_append_code): Likewise.
1430 * symbol.c (save_symbol_data, gfc_get_sym_tree, gfc_undo_symbols,
1431 gfc_commit_symbols): Likewise.
1432 * trans-common.c (build_field): Likewise.
1433 * trans-decl.c (gfc_finish_var_decl): Likewise.
1434 * trans-expr.c (gfc_free_interface_mapping,
1435 gfc_get_interface_mapping_charlen, gfc_add_interface_mapping,
1436 gfc_finish_interface_mapping,
1437 gfc_apply_interface_mapping_to_expr): Likewise.
1438 * trans.h (gfc_interface_sym_mapping): Likewise.
1439
1440 2008-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1441
1442 * gfortran.h (operator): Remove macro.
1443 (gfc_namespace, gfc_expr): Avoid C++ keywords.
1444 * arith.c (eval_intrinsic, eval_intrinsic_f2, eval_intrinsic_f3):
1445 Likewise.
1446 * decl.c (access_attr_decl): Likewise.
1447 * dependency.c (gfc_dep_compare_expr): Likewise.
1448 * dump-parse-tree.c (show_expr, show_uop, show_namespace):
1449 Likewise.
1450 * expr.c (gfc_copy_expr, gfc_type_convert_binary,
1451 simplify_intrinsic_op, check_intrinsic_op): Likewise.
1452 * interface.c (fold_unary, gfc_match_generic_spec,
1453 gfc_match_interface, gfc_match_end_interface,
1454 check_operator_interface, check_uop_interfaces,
1455 gfc_check_interfaces, gfc_extend_expr, gfc_extend_assign,
1456 gfc_add_interface, gfc_current_interface_head,
1457 gfc_set_current_interface_head): Likewise.
1458 * iresolve.c (gfc_resolve_dot_product, gfc_resolve_matmul):
1459 Likewise.
1460 * matchexp.c (gfc_get_parentheses, build_node): Likewise.
1461 * module.c (gfc_use_rename, gfc_match_use, find_use_name_n,
1462 number_use_names, mio_expr, load_operator_interfaces, read_module,
1463 write_operator, write_module): Likewise.
1464 * openmp.c (resolve_omp_atomic): Likewise.
1465 * resolve.c (resolve_operator, gfc_resolve_character_operator,
1466 gfc_resolve_uops): Likewise.
1467 * symbol.c (free_uop_tree, gfc_free_namespace): Likewise.
1468 * trans-expr.c (gfc_conv_expr_op): Likewise.
1469 * trans-openmp.c (gfc_trans_omp_atomic): Likewise.
1470
1471 2008-07-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1472
1473 * gfortran.h (protected): Remove macro.
1474 * dump-parse-tree.c (show_attr): Avoid C++ keywords.
1475 * expr.c (gfc_check_pointer_assign): Likewise.
1476 * interface.c (compare_parameter_protected): Likewise.
1477 * intrinsic.c (enum class, add_sym, add_sym_0, add_sym_1,
1478 add_sym_1s, add_sym_1m, add_sym_2, add_sym_2s, add_sym_3,
1479 add_sym_3ml, add_sym_3red, add_sym_3s, add_sym_4, add_sym_4s,
1480 add_sym_5s): Likewise.
1481 * match.c (gfc_match_assignment, gfc_match_pointer_assignment):
1482 Likewise.
1483 * module.c (mio_symbol_attribute): Likewise.
1484 * primary.c (match_variable): Likewise.
1485 * resolve.c (resolve_equivalence): Likewise.
1486 * symbol.c (check_conflict, gfc_add_protected, gfc_copy_attr):
1487 Likewise.
1488 * trans-types.c (gfc_get_array_type_bounds): Likewise.
1489
1490 2008-07-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1491
1492 * arith.c (eval_type_intrinsic0): Avoid C++ keywords.
1493 * gfortran.h (try, protected, operator, new): Likewise.
1494
1495 2008-07-17 Tobias Burnus <burnus@net-b.de>
1496
1497 PR fortran/36825
1498 PR fortran/36824
1499 * array.c (gfc_match_array_spec): Fix array-rank check.
1500 * resolve.c (resolve_fl_derived): Fix constentness check
1501 for the array dimensions.
1502
1503 2008-07-14 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1504
1505 * Make-lang.in (gfortranspec.o): Fix dependencies.
1506
1507 2008-07-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1508
1509 PR fortran/36725
1510 * io.c: Add error check for g0 edit descriptor followed by '.'.
1511
1512 2008-07-12 Daniel Kraft <d@domob.eu>
1513
1514 * resolve.c (resolve_fl_derived): Allow pointer components to empty
1515 derived types fixing a missing part of PR fortran/33221.
1516
1517 2008-07-10 Daniel Kraft <d@domob.eu>
1518
1519 * gfc-internals.texi (section gfc_expr): Created documentation about
1520 the gfc_expr internal data structure.
1521
1522 2008-07-07 Thomas Koenig <tkoenig@gcc.gnu.org>
1523
1524 PR fortran/36670
1525 * iresolve.c (gfc_resolve_product): Set shape of return
1526 value from array.
1527 (gfc_resolve_sum): Likewise.
1528
1529 2008-07-07 Jakub Jelinek <jakub@redhat.com>
1530
1531 PR middle-end/36726
1532 * f95-lang.c (poplevel): Don't ever add subblocks to
1533 global_binding_level.
1534
1535 2008-07-02 Janus Weil <janus@gcc.gnu.org>
1536 Tobias Burnus <burnus@net-b.de>
1537 Paul Thomas <pault@gcc.gnu.org>
1538
1539 PR fortran/32580
1540 * gfortran.h (struct gfc_symbol): New member "proc_pointer".
1541 * check.c (gfc_check_associated,gfc_check_null): Implement
1542 procedure pointers.
1543 * decl.c (match_procedure_decl): Ditto.
1544 * expr.c (gfc_check_pointer_assign,gfc_check_assign_symbol): Ditto.
1545 * interface.c (compare_actual_formal): Ditto.
1546 * match.h: Ditto.
1547 * match.c (gfc_match_pointer_assignment): Ditto.
1548 * parse.c (parse_interface): Ditto.
1549 * primary.c (gfc_match_rvalue,match_variable): Ditto.
1550 * resolve.c (resolve_fl_procedure): Ditto.
1551 * symbol.c (check_conflict,gfc_add_external,gfc_add_pointer,
1552 gfc_copy_attr,gen_fptr_param,build_formal_args): Ditto.
1553 * trans-decl.c (get_proc_pointer_decl,gfc_get_extern_function_decl,
1554 create_function_arglist): Ditto.
1555 * trans-expr.c (gfc_conv_variable,gfc_conv_function_val,
1556 gfc_conv_function_call,gfc_trans_pointer_assignment): Ditto.
1557
1558 2008-07-02 Thomas Koenig <tkoenig@gcc.gnu.org>
1559
1560 PR fortran/36590
1561 PR fortran/36681
1562 * iresolve.c (resolve_mask_arg): Don't convert mask to
1563 kind=1 logical if it is of that type already.
1564
1565 2008-06-29 Thomas Koenig <tkoenig@gcc.gnu.org>
1566
1567 PR fortran/36341
1568 * iresolve.c (gfc_resolve_matmul): Copy shapes
1569 from arguments.
1570
1571 2008-06-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1572
1573 * invoke.texi: Add documentation for runtime behavior of
1574 -fno-range-check.
1575
1576 2008-06-28 Daniel Kraft <d@domob.eu>
1577
1578 * gfc-internals.texi (section gfc_code): Extended documentation about
1579 gfc_code in the internal datastructures chapter including details about
1580 how IF, DO and SELECT blocks look like and an example for how the
1581 block-chaining works.
1582
1583 2008-06-25 Paul Thomas <pault@gcc.gnu.org>
1584
1585 PR fortran/36526
1586 * interface.c (check_intents): Correct error where the actual
1587 arg was checked for a pointer argument, rather than the formal.
1588
1589 2008-06-24 Paul Thomas <pault@gcc.gnu.org>
1590
1591 PR fortran/34371
1592 * expr.c (gfc_check_assign): Change message and locus for
1593 error when conform == 0.
1594
1595 2008-06-23 Jakub Jelinek <jakub@redhat.com>
1596
1597 PR fortran/36597
1598 * cpp.c (cpp_define_builtins): Change _OPENMP value to 200805.
1599
1600 2008-06-20 Laurynas Biveinis <laurynas.biveinis@gmail.com>
1601 Tobias Burnus <burnus@net-b.de>
1602
1603 PR fortran/34908
1604 PR fortran/36276
1605 * scanner.c (preprocessor_line): do not call gfc_free for
1606 current_file->filename if it differs from filename.
1607
1608 2008-06-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1609
1610 * arith.c (hollerith2representation): Fix for -Wc++-compat.
1611 * array.c (gfc_get_constructor): Likewise.
1612 * decl.c (gfc_get_data_variable, gfc_get_data_value, gfc_get_data,
1613 create_enum_history, gfc_match_final_decl): Likewise.
1614 * error.c (error_char): Likewise.
1615 * expr.c (gfc_get_expr, gfc_copy_expr): Likewise.
1616 * gfortran.h (gfc_get_charlen, gfc_get_array_spec,
1617 gfc_get_component, gfc_get_formal_arglist, gfc_get_actual_arglist,
1618 gfc_get_namelist, gfc_get_omp_clauses, gfc_get_interface,
1619 gfc_get_common_head, gfc_get_dt_list, gfc_get_array_ref,
1620 gfc_get_ref, gfc_get_equiv, gfc_get_case, gfc_get_iterator,
1621 gfc_get_alloc, gfc_get_wide_string): Likewise.
1622 * interface.c (count_types_test): Likewise.
1623 * intrinsic.c (add_char_conversions, gfc_intrinsic_init_1):
1624 Likewise.
1625 * io.c (gfc_match_open, gfc_match_close, match_filepos, match_io,
1626 gfc_match_inquire, gfc_match_wait): Likewise.
1627 * match.c (gfc_match, match_forall_iterator): Likewise.
1628 * module.c (gfc_get_pointer_info, gfc_get_use_rename, add_fixup,
1629 add_true_name, parse_string, write_atom, quote_string,
1630 mio_symtree_ref, mio_gmp_real, write_common_0): Likewise.
1631 * options.c (gfc_post_options): Likewise.
1632 * primary.c (match_integer_constant, match_hollerith_constant,
1633 match_boz_constant, match_real_constant,
1634 gfc_get_structure_ctor_component, gfc_match_structure_constructor): Likewise.
1635 * scanner.c (gfc_widechar_to_char, add_path_to_list,
1636 add_file_change, load_line, get_file, preprocessor_line,
1637 load_file, unescape_filename, gfc_read_orig_filename): Likewise.
1638 * simplify.c (gfc_simplify_ibits, gfc_simplify_ishft,
1639 gfc_simplify_ishftc): Likewise.
1640 * symbol.c (gfc_get_st_label, gfc_get_namespace, gfc_new_symtree,
1641 gfc_get_uop, gfc_new_symbol, save_symbol_data, gfc_get_gsymbol):
1642 Likewise.
1643 * target-memory.c (gfc_target_interpret_expr): Likewise.
1644 * trans-const.c (gfc_build_wide_string_const): Likewise.
1645 * trans-expr.c (gfc_add_interface_mapping): Likewise.
1646 * trans-intrinsic.c (gfc_conv_intrinsic_conversion,
1647 gfc_conv_intrinsic_int, gfc_conv_intrinsic_lib_function,
1648 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_ctime,
1649 gfc_conv_intrinsic_fdate, gfc_conv_intrinsic_ttynam,
1650 gfc_conv_intrinsic_minmax, gfc_conv_intrinsic_minmax_char,
1651 gfc_conv_intrinsic_ishftc, gfc_conv_intrinsic_index_scan_verify,
1652 gfc_conv_intrinsic_merge, gfc_conv_intrinsic_trim): Likewise.
1653 * trans.c (gfc_get_backend_locus): Likewise.
1654 * trans.h (gfc_get_ss): Likewise.
1655
1656 2008-06-18 Daniel Kraft <d@domob.eu>
1657
1658 PR fortran/36517, fortran/36492
1659 * array.c (gfc_resolve_character_array_constructor): Call
1660 gfc_set_constant_character_len with changed length-chec argument.
1661 * decl.c (gfc_set_constant_character_len): Changed array argument to
1662 be a generic length-checking argument that can be used for correct
1663 checking with typespec and in special cases where the should-be length
1664 is different from the target length.
1665 (build_struct): Call gfc_set_constant_character_len with changed length
1666 checking argument and introduced additional checks for exceptional
1667 conditions on invalid code.
1668 (add_init_expr_to_sym), (do_parm): Call gfc_set_constant_character_len
1669 with changed argument.
1670 * match.h (gfc_set_constant_character_len): Changed third argument to
1671 int for the should-be length rather than bool.
1672
1673 2008-06-17 Daniel Kraft <d@domob.eu>
1674
1675 PR fortran/36112
1676 * array.c (gfc_resolve_character_array_constructor): Check that all
1677 elements with constant character length have the same one rather than
1678 fixing it if no typespec is given, emit an error if they don't. Changed
1679 return type to "try" and return FAILURE for the case above.
1680 (gfc_resolve_array_constructor): Removed unneeded call to
1681 gfc_resolve_character_array_constructor in this function.
1682 * gfortran.h (gfc_resolve_character_array_constructor): Returns try.
1683 * trans-array.c (get_array_ctor_strlen): Return length of first element
1684 rather than last element.
1685 * resolve.c (gfc_resolve_expr): Handle FAILURE return from
1686 gfc_resolve_character_array_constructor.
1687
1688 2008-06-17 Paul Thomas <pault@gcc.gnu.org>
1689
1690 PR fortran/34396
1691 * resolve.c (add_dt_to_dt_list): New function.
1692 (resolve_fl_derived): Call new function for pointer components
1693 and when derived type resolved.
1694
1695 2008-06-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1696
1697 PR fortran/36515
1698 * trans-decl.c (gfc_generate_function_code): Add range_check to options
1699 array.
1700
1701 2008-06-15 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1702
1703 * gfc-internals.texi: Expand TABs, drop indentation outside examples.
1704 * gfortran.texi: Likewise.
1705 * intrinsic.texi: Likewise.
1706 * invoke.texi: Likewise.
1707
1708 2008-06-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1709
1710 PR fortran/35863
1711 * trans-io.c (gfc_build_io_library_fndecls): Build declaration for
1712 transfer_character_wide which includes passing in the character kind to
1713 support wide character IO. (transfer_expr): If the kind == 4, create the
1714 argument and build the call.
1715 * gfortran.texi: Fix typo.
1716
1717 2008-06-13 Tobias Burnus <burnus@net-b.de>
1718
1719 PR fortran/36476
1720 * decl.c (do_parm): Handle init expression for len=*.
1721
1722 2008-06-12 Tobias Burnus <burnus@net-b.de>
1723
1724 PR fortran/36462
1725 * trans-intrinsic.c (gfc_conv_intrinsic_index_scan_verify):
1726 Fix passing of the BACK= argument.
1727
1728 2008-06-10 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1729
1730 * cpp.c: Add copyright notice.
1731 * cpp.h: Add copyright notice.
1732
1733 2008-06-08 Janus Weil <janus@gcc.gnu.org>
1734
1735 PR fortran/36459
1736 * decl.c (match_procedure_decl): Correctly recognize if the interface
1737 is an intrinsic procedure.
1738
1739 2008-06-08 Tobias Burnus <burnus@net-b.de>
1740
1741 PR fortran/35830
1742 * resolve.c (resolve_symbol): Copy more attributes for
1743 PROCEDUREs with interfaces.
1744
1745 2008-06-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1746
1747 PR fortran/36420
1748 PR fortran/36422
1749 * io.c (check_format): Add new error message for zero width.
1750 Use new error message for FMT_A and with READ, FMT_G. Allow
1751 FMT_G with WRITE except when -std=F95 and -std=F2003.
1752
1753 2008-06-07 Tobias Burnus <burnus@net-b.de>
1754
1755 PR fortran/36437
1756 * intrinsic.c (add_functions): Implement c_sizeof.
1757 * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): Do not
1758 create unneeded variable in the scalar case.
1759 * intrinsic.texi: Add C_SIZEOF documentation.
1760
1761 2008-06-06 Tobias Burnus <burnus@net-b.de>
1762
1763 * intrinsic.texi (BESSEL_J1): Fix BES(S)EL_J1 typo.
1764
1765 2008-06-06 Jakub Jelinek <jakub@redhat.com>
1766
1767 * scanner.c (skip_free_comments, skip_fixed_comments): Handle tabs.
1768 * parse.c (next_free): Allow tab after !$omp.
1769 (decode_omp_directive): Handle !$omp task, !$omp taskwait
1770 and !$omp end task.
1771 (case_executable): Add ST_OMP_TASKWAIT.
1772 (case_exec_markers): Add ST_OMP_TASK.
1773 (gfc_ascii_statement): Handle ST_OMP_TASK, ST_OMP_END_TASK and
1774 ST_OMP_TASKWAIT.
1775 (parse_omp_structured_block, parse_executable): Handle ST_OMP_TASK.
1776 * gfortran.h (gfc_find_sym_in_expr): New prototype.
1777 (gfc_statement): Add ST_OMP_TASK, ST_OMP_END_TASK and ST_OMP_TASKWAIT.
1778 (gfc_omp_clauses): Add OMP_SCHED_AUTO to sched_kind,
1779 OMP_DEFAULT_FIRSTPRIVATE to default_sharing. Add collapse and
1780 untied fields.
1781 (gfc_exec_op): Add EXEC_OMP_TASK and EXEC_OMP_TASKWAIT.
1782 * f95-lang.c (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
1783 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP, LANG_HOOKS_OMP_CLAUSE_DTOR,
1784 LANG_HOOKS_OMP_PRIVATE_OUTER_REF): Define.
1785 * trans.h (gfc_omp_clause_default_ctor): Add another argument.
1786 (gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op,
1787 gfc_omp_clause_dtor, gfc_omp_private_outer_ref): New prototypes.
1788 * types.def (BT_ULONGLONG, BT_PTR_ULONGLONG,
1789 BT_FN_BOOL_ULONGLONGPTR_ULONGLONGPTR,
1790 BT_FN_BOOL_BOOL_ULL_ULL_ULL_ULLPTR_ULLPTR,
1791 BT_FN_BOOL_BOOL_ULL_ULL_ULL_ULL_ULLPTR_ULLPTR,
1792 BT_FN_VOID_PTR_PTR, BT_PTR_FN_VOID_PTR_PTR,
1793 BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT): New.
1794 (BT_BOOL): Use integer type with BOOL_TYPE_SIZE rather
1795 than boolean_type_node.
1796 * dump-parse-tree.c (gfc_show_omp_node): Handle EXEC_OMP_TASK,
1797 EXEC_OMP_TASKWAIT, OMP_SCHED_AUTO, OMP_DEFAULT_FIRSTPRIVATE,
1798 untied and collapse clauses.
1799 (gfc_show_code_node): Handle EXEC_OMP_TASK and EXEC_OMP_TASKWAIT.
1800 * trans.c (gfc_trans_code): Handle EXEC_OMP_TASK and
1801 EXEC_OMP_TASKWAIT.
1802 * st.c (gfc_free_statement): Likewise.
1803 * resolve.c (gfc_resolve_blocks, resolve_code): Likewise.
1804 (find_sym_in_expr): Rename to...
1805 (gfc_find_sym_in_expr): ... this. No longer static.
1806 (resolve_allocate_expr, resolve_ordinary_assign): Adjust caller.
1807 * match.h (gfc_match_omp_task, gfc_match_omp_taskwait): New
1808 prototypes.
1809 * openmp.c (resolve_omp_clauses): Allow allocatable arrays in
1810 firstprivate, lastprivate, reduction, copyprivate and copyin
1811 clauses.
1812 (omp_current_do_code): Made static.
1813 (omp_current_do_collapse): New variable.
1814 (gfc_resolve_omp_do_blocks): Compute omp_current_do_collapse,
1815 clear omp_current_do_code and omp_current_do_collapse on return.
1816 (gfc_resolve_do_iterator): Handle collapsed do loops.
1817 (resolve_omp_do): Likewise, diagnose errorneous collapsed do loops.
1818 (OMP_CLAUSE_COLLAPSE, OMP_CLAUSE_UNTIED): Define.
1819 (gfc_match_omp_clauses): Handle default (firstprivate),
1820 schedule (auto), untied and collapse (n) clauses.
1821 (OMP_DO_CLAUSES): Add OMP_CLAUSE_COLLAPSE.
1822 (OMP_TASK_CLAUSES): Define.
1823 (gfc_match_omp_task, gfc_match_omp_taskwait): New functions.
1824 * trans-openmp.c (gfc_omp_private_outer_ref): New function.
1825 (gfc_omp_clause_default_ctor): Add outer argument. For allocatable
1826 arrays allocate them with the bounds of the outer var if outer
1827 var is allocated.
1828 (gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op,
1829 gfc_omp_clause_dtor): New functions.
1830 (gfc_trans_omp_array_reduction): If decl is allocatable array,
1831 allocate it with outer var's bounds in OMP_CLAUSE_REDUCTION_INIT
1832 and deallocate it in OMP_CLAUSE_REDUCTION_MERGE.
1833 (gfc_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
1834 for assumed-size arrays.
1835 (gfc_trans_omp_do): Add par_clauses argument. If dovar is
1836 present in lastprivate clause and do loop isn't simple,
1837 set OMP_CLAUSE_LASTPRIVATE_STMT. If dovar is present in
1838 parallel's lastprivate clause, change it to shared and add
1839 lastprivate clause to OMP_FOR_CLAUSES. Handle collapsed do loops.
1840 (gfc_trans_omp_directive): Adjust gfc_trans_omp_do callers.
1841 (gfc_trans_omp_parallel_do): Likewise. Move collapse clause to
1842 OMP_FOR from OMP_PARALLEL.
1843 (gfc_trans_omp_clauses): Handle OMP_SCHED_AUTO,
1844 OMP_DEFAULT_FIRSTPRIVATE, untied and collapse clauses.
1845 (gfc_trans_omp_task, gfc_trans_omp_taskwait): New functions.
1846 (gfc_trans_omp_directive): Handle EXEC_OMP_TASK and
1847 EXEC_OMP_TASKWAIT.
1848
1849 2008-06-04 Janus Weil <janus@gcc.gnu.org>
1850
1851 PR fortran/36322
1852 PR fortran/36275
1853 * resolve.c (resolve_symbol): Correctly copy the interface for a
1854 PROCEDURE declaration.
1855
1856 2008-06-02 Janus Weil <janus@gcc.gnu.org>
1857
1858 PR fortran/36361
1859 * symbol.c (gfc_add_allocatable,gfc_add_dimension,
1860 gfc_add_explicit_interface): Added checks.
1861 * decl.c (attr_decl1): Added missing "var_locus".
1862 * parse.c (parse_interface): Checking for errors.
1863
1864 2008-06-02 Daniel Kraft <d@domob.eu>
1865
1866 * gfortran.h: New statement-type ST_FINAL for FINAL declarations.
1867 (struct gfc_symbol): New member f2k_derived.
1868 (struct gfc_namespace): New member finalizers, for use in the above
1869 mentioned f2k_derived namespace.
1870 (struct gfc_finalizer): New type defined for finalizers linked list.
1871 * match.h (gfc_match_final_decl): New function header.
1872 * decl.c (gfc_match_derived_decl): Create f2k_derived namespace on
1873 constructed symbol node.
1874 (gfc_match_final_decl): New function to match a FINAL declaration line.
1875 * parse.c (decode_statement): match-call for keyword FINAL.
1876 (parse_derived): Parse CONTAINS section and accept FINAL statements.
1877 * resolve.c (gfc_resolve_finalizers): New function to resolve (that is
1878 in this case, check) a list of finalizer procedures.
1879 (resolve_fl_derived): Call gfc_resolve_finalizers here.
1880 * symbol.c (gfc_get_namespace): Initialize new finalizers to NULL.
1881 (gfc_free_namespace): Free finalizers list.
1882 (gfc_new_symbol): Initialize new f2k_derived to NULL.
1883 (gfc_free_symbol): Free f2k_derived namespace.
1884 (gfc_free_finalizer): New function to free a single gfc_finalizer node.
1885 (gfc_free_finalizer_list): New function to free a linked list of
1886 gfc_finalizer nodes.
1887
1888 2008-06-02 Daniel Franke <franke.daniel@gmail.com>
1889
1890 PR fortran/36375
1891 PR fortran/36377
1892 * cpp.c (gfc_cpp_init): Do not initialize builtins if
1893 processing already preprocessed input.
1894 (gfc_cpp_preprocess): Finalize output with newline.
1895
1896 2008-05-31 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1897
1898 * intrinsic.texi: Revert wrong commit.
1899
1900 2008-05-31 Steven G. Kargl <kargls@comcast.net>
1901
1902 * arith.c (gfc_arith_init_1): Remove now unused r and c variables.
1903 Cleanup numerical inquiry function initialization.
1904 (gfc_arith_done_1): Replace multiple mpfr_clear() invocations with
1905 a single mpfr_clears().
1906 (gfc_check_real_range): Re-arrange logic to eliminate multiple
1907 unnecessary branching and assignments.
1908 (gfc_arith_times): Use mpfr_clears() in preference to multiple
1909 mpfr_clear().
1910 (gfc_arith_divide): Ditto.
1911 (complex_reciprocal): Eliminate now unused variables a, re, im.
1912 Cleanup the mpfr abuse. Use mpfr_clears() in preference to
1913 multiple mpfr_clear().
1914 (complex_pow): Fix comment whitespace. Use mpfr_clears() in
1915 preference to multiple mpfr_clear().
1916 * simplify.c (gfc_simplify_and): Remove blank line.
1917 (gfc_simplify_atan2): Move error checking earlier to eliminate
1918 a now unnecessay gfc_free_expr().
1919 (gfc_simplify_bessel_j0): Remove unnecessary gfc_set_model_kind().
1920 (gfc_simplify_bessel_j1): Ditto.
1921 (gfc_simplify_bessel_jn): Ditto.
1922 (gfc_simplify_bessel_y0): Ditto.
1923 (gfc_simplify_bessel_y1): Ditto.
1924 (gfc_simplify_bessel_yn): Ditto.
1925 (only_convert_cmplx_boz): Eliminate unnecessary duplicate code, and
1926 combine nested if statement rational expressions.
1927 (gfc_simplify_cos): Use mpfr_clears() in preference to multiple
1928 mpfr_clear().
1929 (gfc_simplify_exp): Ditto.
1930 (gfc_simplify_fraction): Move gfc_set_model_kind() to after the
1931 special case of 0. Use mpfr_clears() in preference to multiple
1932 mpfr_clear().
1933 (gfc_simplify_gamma): Eliminate unnecessary gfc_set_model_kind().
1934 (gfc_simplify_lgamma): Ditto.
1935 (gfc_simplify_log10): Ditto.
1936 (gfc_simplify_log): Move gfc_set_model_kind () inside switch
1937 statement. Use mpfr_clears() in preference to multiple mpfr_clear().
1938 (gfc_simplify_mod): Eliminate now unused variables quot, iquot,
1939 and term. Simplify the mpfr magic.
1940 (gfc_simplify_modulo): Ditto.
1941 (gfc_simplify_nearest): Eliminate unnecessary gfc_set_model_kind().
1942 (gfc_simplify_scale): Use mpfr_clears() in preference to multiple
1943 mpfr_clear().
1944 (gfc_simplify_sin): Ditto
1945 (gfc_simplify_sqrt): Ditto
1946 (gfc_simplify_set_exponent): Move gfc_set_model_kind() to after the
1947 special case of 0. Use mpfr_clears() in preference to multiple
1948 mpfr_clear().
1949
1950 2008-05-29 Daniel Franke <franke.daniel@gmail.com>
1951
1952 PR target/36348
1953 * Make-lang.in (F95_OBJS): Added dependency on FORTRAN_TARGET_OBJS.
1954
1955 2008-05-29 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1956
1957 * scanner.c (load_line): Add first_char argument. Don't call ungetc.
1958 (gfc_read_orig_filename): Adjust call to load_line. Don't call
1959 ungetc.
1960 (load_file): Adjust call to load_line.
1961
1962 2008-05-28 Janus Weil <janus@gcc.gnu.org>
1963
1964 PR fortran/36325
1965 PR fortran/35830
1966 * interface.c (gfc_procedure_use): Enable argument checking for
1967 external procedures with explicit interface.
1968 * symbol.c (check_conflict): Fix conflict checking for externals.
1969 (copy_formal_args): Fix handling of arrays.
1970 * resolve.c (resolve_specific_f0, resolve_specific_s0): Fix handling
1971 of intrinsics.
1972 * parse.c (parse_interface): Non-abstract INTERFACE statement implies
1973 EXTERNAL attribute.
1974
1975 2008-05-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1976
1977 PR fortran/36319
1978 * intrinsic.c (gfc_convert_chartype): Don't mark conversion
1979 function as pure.
1980 * trans-array.c (gfc_trans_array_ctor_element): Divide element
1981 size by the size of one character to obtain length.
1982 * iresolve.c (gfc_resolve_cshift): Call the _char4 variant when
1983 appropriate.
1984 (gfc_resolve_eoshift): Likewise.
1985 * trans-intrinsic.c (gfc_conv_intrinsic_ctime): Minor beautification.
1986 (gfc_conv_intrinsic_fdate): Minor beautification.
1987 (gfc_conv_intrinsic_ttynam): Minor beautification.
1988 (gfc_conv_intrinsic_minmax_char): Allow all character kinds.
1989 (size_of_string_in_bytes): New function.
1990 (gfc_conv_intrinsic_size): Call size_of_string_in_bytes for
1991 character expressions.
1992 (gfc_conv_intrinsic_sizeof): Likewise.
1993 (gfc_conv_intrinsic_array_transfer): Likewise.
1994 (gfc_conv_intrinsic_trim): Allow all character kinds. Minor
1995 beautification.
1996 (gfc_conv_intrinsic_repeat): Fix comment typo.
1997 * simplify.c (gfc_convert_char_constant): Take care of conversion
1998 of array constructors.
1999
2000 2008-05-27 Tobias Burnus <burnus@net-b.de>
2001
2002 PR fortran/36316
2003 * trans-array.c (gfc_set_loop_bounds_from_array_spec):
2004 Add missing fold_convert.
2005
2006 2008-05-26 Daniel Franke <franke.daniel@gmail.com>
2007
2008 * fortran/cpp.c (cpp_define_builtins): Remove usage of TARGET_* macros,
2009 added FIXME instead.
2010
2011 2008-05-26 Daniel Franke <franke.daniel@gmail.com>
2012
2013 PR fortran/18428
2014 * lang.opt (A, C, CC, D, E, H, P, U, cpp, d, fworking-directory,
2015 imultilib, iprefix, iquote, isysroot, isystem, nocpp, nostdinc,
2016 o, undef, v): New options.
2017 * options.c (gfc_init_options): Also initialize preprocessor
2018 options.
2019 (gfc_post_options): Also handle post-initialization of preprocessor
2020 options.
2021 (gfc_handle_option): Check if option is a preprocessor option.
2022 If yes, let gfc_cpp_handle_option() handle the option.
2023 * lang-specs.h: Reorganized to handle new options.
2024 * scanner.c (gfc_new_file): Read temporary file instead of
2025 input source if preprocessing is enabled.
2026 * f95-lang.c (gfc_init): Initialize preprocessor.
2027 (gfc_finish): Clean up preprocessor.
2028 * cpp.c: New.
2029 * cpp.h: New.
2030 * Make-lang.in: Added new objects and dependencies.
2031 * gfortran.texi: Updated section "Preprocessing and
2032 conditional compilation".
2033 * invoke.texi: Added new section "Preprocessing Options",
2034 listed and documented the preprocessing options handled
2035 by gfortran.
2036
2037 2008-05-25 Tobias Burnus <burnus@net-b.de>
2038
2039 PR fortran/32600
2040 * trans-expr.c (gfc_conv_function_call): Remove library
2041 call for c_f_pointer with scalar Fortran pointers and for
2042 c_f_procpointer.
2043
2044 2008-05-21 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2045
2046 PR fortran/36257
2047 * iresolve.c (check_charlen_present): Don't force the rank to 1.
2048
2049 2008-05-19 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2050
2051 PR fortran/36265
2052 * trans-expr.c (gfc_conv_string_tmp): Pick the correct type for
2053 the temporary variable.
2054
2055 2008-05-19 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2056
2057 * simplify.c (gfc_simplify_dble, gfc_simplify_real): Initialize
2058 result variable to avoid warnings.
2059
2060 2008-05-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2061
2062 * intrinsic.c (char_conversions, ncharconv): New static variables.
2063 (find_char_conv): New function.
2064 (add_functions): Add simplification functions for ADJUSTL and
2065 ADJUSTR. Don't check the kind of their argument. Add checking for
2066 LGE, LLE, LGT and LLT.
2067 (add_subroutines): Fix argument type for SLEEP. Fix argument name
2068 for SYSTEM.
2069 (add_char_conversions): New function.
2070 (gfc_intrinsic_init_1): Call add_char_conversions.
2071 (gfc_intrinsic_done_1): Free char_conversions.
2072 (check_arglist): Use kind == 0 as a signal that we don't want
2073 the kind value to be checked.
2074 (do_simplify): Also simplify character functions.
2075 (gfc_convert_chartype): New function
2076 * trans-array.c (gfc_trans_array_ctor_element): Don't force the
2077 use of default character type.
2078 (gfc_trans_array_constructor_value): Likewise.
2079 (get_array_ctor_var_strlen): Use integer kind to build an integer
2080 instead of a character kind!
2081 (gfc_build_constant_array_constructor): Don't force the use of
2082 default character type.
2083 (gfc_conv_loop_setup): Likewise.
2084 * trans-expr.c (gfc_conv_string_tmp): Don't force the use of
2085 default character type. Allocate enough memory for wide strings.
2086 (gfc_conv_concat_op): Make sure operand kind are the same.
2087 (string_to_single_character): Remove gfc_ prefix. Reindent.
2088 Don't force the use of default character type.
2089 (gfc_conv_scalar_char_value): Likewise.
2090 (gfc_build_compare_string): Call string_to_single_character.
2091 (fill_with_spaces): New function
2092 (gfc_trans_string_copy): Add kind arguments. Use them to deal
2093 with wide character kinds.
2094 (gfc_conv_statement_function): Whitespace fix. Call
2095 gfc_trans_string_copy with new kind arguments.
2096 (gfc_conv_substring_expr): Call gfc_build_wide_string_const
2097 instead of using gfc_widechar_to_char.
2098 (gfc_conv_string_parameter): Don't force the use of default
2099 character type.
2100 (gfc_trans_scalar_assign): Pass kind args to gfc_trans_string_copy.
2101 * intrinsic.h (gfc_check_lge_lgt_lle_llt, gfc_convert_char_constant,
2102 gfc_resolve_adjustl, gfc_resolve_adjustr): New prototypes.
2103 * decl.c (gfc_set_constant_character_len): Don't assert the
2104 existence of a single character kind.
2105 * trans-array.h (gfc_trans_string_copy): New prototype.
2106 * gfortran.h (gfc_check_character_range, gfc_convert_chartype):
2107 New prototypes.
2108 * error.c (print_wide_char_into_buffer): New function lifting
2109 code from gfc_print_wide_char. Fix order to output '\x??' instead
2110 of 'x\??'.
2111 (gfc_print_wide_char): Call print_wide_char_into_buffer.
2112 (show_locus): Call print_wide_char_into_buffer with buffer local
2113 to this function.
2114 * trans-const.c (gfc_build_wide_string_const): New function.
2115 (gfc_conv_string_init): Deal with wide characters strings
2116 constructors.
2117 (gfc_conv_constant_to_tree): Call gfc_build_wide_string_const.
2118 * trans-stmt.c (gfc_trans_label_assign): Likewise.
2119 (gfc_trans_character_select): Deal with wide strings.
2120 * expr.c (gfc_check_assign): Allow conversion between character
2121 kinds on assignment.
2122 * trans-const.h (gfc_build_wide_string_const): New prototype.
2123 * trans-types.c (gfc_get_character_type_len_for_eltype,
2124 gfc_get_character_type_len): Create too variants of the old
2125 gfc_get_character_type_len, one getting kind argument and the
2126 other one directly taking a type tree.
2127 * trans.h (gfor_fndecl_select_string_char4,
2128 gfor_fndecl_convert_char1_to_char4,
2129 gfor_fndecl_convert_char4_to_char1): New prototypes.
2130 * trans-types.h (gfc_get_character_type_len_for_eltype): New
2131 prototype.
2132 * resolve.c (resolve_operator): Exit early when kind mismatches
2133 are detected, because that makes us issue an error message later.
2134 (validate_case_label_expr): Fix wording of error message.
2135 * iresolve.c (gfc_resolve_adjustl, gfc_resolve_adjustr): New
2136 functions.
2137 (gfc_resolve_pack): Call _char4 variants of library function
2138 when dealing with wide characters.
2139 (gfc_resolve_reshape): Likewise.
2140 (gfc_resolve_spread): Likewise.
2141 (gfc_resolve_transpose): Likewise.
2142 (gfc_resolve_unpack): Likewise.
2143 * target-memory.c (size_character): Take character kind bit size
2144 correctly into account (not that it changes anything for now, but
2145 it's more generic).
2146 (gfc_encode_character): Added gfc_ prefix. Encoding each
2147 character of a string by calling native_encode_expr for the
2148 corresponding unsigned integer.
2149 (gfc_target_encode_expr): Add gfc_ prefix to encode_character.
2150 * trans-decl.c (gfc_build_intrinsic_function_decls): Build
2151 gfor_fndecl_select_string_char4, gfor_fndecl_convert_char1_to_char4
2152 and gfor_fndecl_convert_char4_to_char1.
2153 * target-memory.h (gfc_encode_character): New prototype.
2154 * arith.c (gfc_check_character_range): New function.
2155 (eval_intrinsic): Allow non-default character kinds.
2156 * check.c (gfc_check_access_func): Only allow default
2157 character kind arguments.
2158 (gfc_check_chdir): Likewise.
2159 (gfc_check_chdir_sub): Likewise.
2160 (gfc_check_chmod): Likewise.
2161 (gfc_check_chmod_sub): Likewise.
2162 (gfc_check_lge_lgt_lle_llt): New function.
2163 (gfc_check_link): Likewise.
2164 (gfc_check_link_sub): Likewise.
2165 (gfc_check_symlnk): Likewise.
2166 (gfc_check_symlnk_sub): Likewise.
2167 (gfc_check_rename): Likewise.
2168 (gfc_check_rename_sub): Likewise.
2169 (gfc_check_fgetputc_sub): Likewise.
2170 (gfc_check_fgetput_sub): Likewise.
2171 (gfc_check_stat): Likewise.
2172 (gfc_check_stat_sub): Likewise.
2173 (gfc_check_date_and_time): Likewise.
2174 (gfc_check_ctime_sub): Likewise.
2175 (gfc_check_fdate_sub): Likewise.
2176 (gfc_check_gerror): Likewise.
2177 (gfc_check_getcwd_sub): Likewise.
2178 (gfc_check_getarg): Likewise.
2179 (gfc_check_getlog): Likewise.
2180 (gfc_check_hostnm): Likewise.
2181 (gfc_check_hostnm_sub): Likewise.
2182 (gfc_check_ttynam_sub): Likewise.
2183 (gfc_check_perror): Likewise.
2184 (gfc_check_unlink): Likewise.
2185 (gfc_check_unlink_sub): Likewise.
2186 (gfc_check_system_sub): Likewise.
2187 * primary.c (got_delim): Perform correct character range checking
2188 for all kinds.
2189 * trans-intrinsic.c (gfc_conv_intrinsic_conversion): Generate
2190 calls to library functions convert_char4_to_char1 and
2191 convert_char1_to_char4 for character conversions.
2192 (gfc_conv_intrinsic_char): Allow all character kings.
2193 (gfc_conv_intrinsic_strcmp): Fix whitespace.
2194 (gfc_conv_intrinsic_repeat): Take care of all character kinds.
2195 * intrinsic.texi: For all GNU intrinsics accepting character
2196 arguments, mention that they're restricted to the default kind.
2197 * simplify.c (simplify_achar_char): New function.
2198 (gfc_simplify_achar, gfc_simplify_char): Call simplify_achar_char.
2199 gfc_simplify_ichar): Don't error out for wide characters.
2200 (gfc_convert_char_constant): New function.
2201
2202 2008-05-18 Steven G. Kargl <kargls@comcast.net>
2203
2204 PR fortran/36251
2205 * symbol.c (check_conflict): Issue errors for abuse of PUBLIC, PRIVATE,
2206 and BIND(C).
2207 * resolve.c (gfc_verify_binding_labels): Fix NULL pointer dereference.
2208
2209 2008-05-17 Tobias Burnus <burnus@net-b.de>
2210
2211 * intrinsic.texi: Correct description of GET_COMMAND_ARGUMENT
2212 and GET_ENVIRONMENT_VARIABLE; fix keyword= name for GETENV,
2213 GETLOG, GMTIME, HOSTNM, IRAND, ITIME, KILL.
2214 Move LOG_GAMMA after LOG10.
2215
2216 2008-05-17 Tobias Burnus <burnus@net-b.de>
2217
2218 * intrinsic.c (add_functions): Change FLUSH(C) to FLUSH(UNIT).
2219 * intrinsic.texi: Change INTEGER(*) to INTEGER; fix keyword= name for
2220 ABS, ADJUSTL, AINT, ALLOCATED, ANINT, ASSOCIATED, C_ASSOCIATED,
2221 CEILING, DBLE, DFLOAT, DOT_PRODUCT, DREAL, FLOAT, FLOOR, GET_COMMAND.
2222
2223 2008-05-16 Paul Thomas <pault@gcc.gnu.org>
2224
2225 PR fortran/35756
2226 PR fortran/35759
2227 * trans-stmt.c (gfc_trans_where): Tighten up the dependency
2228 check for calling gfc_trans_where_3.
2229
2230 PR fortran/35743
2231 * trans-stmt.c (gfc_trans_where_2): Set the mask size to zero
2232 if it is calculated to be negative.
2233
2234 PR fortran/35745
2235 * trans-stmt.c (gfc_trans_where_3, gfc_trans_where_assign): Set
2236 ss->where for scalar right hand sides.
2237 * trans-array.c (gfc_add_loop_ss_code): If ss->where is set do
2238 not evaluate scalars outside the loop. Clean up whitespace.
2239 * trans.h : Add a bitfield 'where' to gfc_ss.
2240
2241 2008-05-16 Tobias Burnus <burnus@net-b.de>
2242
2243 * libgfortran.h: Increase GFC_MAX_DIMENSIONS to 15.
2244 * array.c (gfc_match_array_spec): Error with -std=f2003 if rank > 7.
2245
2246 2008-04-16 Daniel Kraft <d@domob.eu>
2247
2248 PR fortran/27997
2249 * gfortran.h: Added field "length_from_typespec" to gfc_charlength.
2250 * aray.c (gfc_match_array_constructor): Added code to parse typespec.
2251 (check_element_type, check_constructor_type, gfc_check_constructor_type):
2252 Extended to support explicit typespec on constructor.
2253 (gfc_resolve_character_array_constructor): Pad strings correctly for
2254 explicit, constant character length.
2255 * trans-array.c: New static global variable "typespec_chararray_ctor"
2256 (gfc_trans_array_constructor): New code to support explicit but dynamic
2257 character lengths.
2258
2259 2008-05-16 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2260
2261 PR fortran/34325
2262 * decl.c (match_attr_spec): Check for matching pairs of parenthesis.
2263 * expr.c (gfc_specification_expr): Supplement the error message with the
2264 type that was found.
2265 * resolve.c (gfc_resolve_index): Likewise.
2266 * match.c (gfc_match_parens): Clarify error message with "at or before".
2267 (gfc_match_do): Check for matching pairs of parenthesis.
2268
2269 2008-05-16 Tobias Burnus <burnus@net-b.de
2270
2271 * intrinsic.texi: Write Fortran 77/90/95 instead of F77/90/95;
2272 add missing KIND argument to ACHAR and NINT; and state that
2273 the KIND argument is a F2003 extension for ACHAR, COUNT, IACHAR,
2274 ICHAR, INDEX, LBOUND, LEN, LEN_TRIM, SCAN, SIZE, UBOUND, VERIFY.
2275
2276 2008-05-16 Daniel Kraft <d@domob.eu>
2277
2278 * primary.c: New private structure "gfc_structure_ctor_component".
2279 (gfc_free_structure_ctor_component): New helper function.
2280 (gfc_match_structure_constructor): Extended largely to support named
2281 arguments and default initialization for structure constructors.
2282
2283 2008-05-15 Steven G. Kargl <kargls@comcast.net>
2284
2285 * simplify.c (gfc_simplify_dble, gfc_simplify_float,
2286 simplify_bound, gfc_simplify_nearest, gfc_simplify_real): Plug
2287 possible memory leaks.
2288 (gfc_simplify_reshape): Plug possible memory leaks and dereferencing
2289 of NULL pointers.
2290
2291 2008-05-15 Steven G. Kargl <kargls@comcast.net>
2292
2293 PR fortran/36239
2294 * simplify.c (gfc_simplify_int, gfc_simplify_intconv): Replaced hand
2295 rolled integer conversion with gfc_int2int, gfc_real2int, and
2296 gfc_complex2int.
2297 (gfc_simplify_intconv): Renamed to simplify_intconv.
2298
2299 2008-05-15 Steven G. Kargl, <kargl@comcast.net>
2300 * gfortran.dg/and_or_xor.f90: New test
2301
2302 * fortran/simplify.c (gfc_simplify_and, gfc_simplify_or,
2303 gfc_simplify_xor): Don't range check logical results.
2304
2305 2008-05-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2306
2307 * trans-expr.c (gfc_conv_concat_op): Take care of nondefault
2308 character kinds.
2309 (gfc_build_compare_string): Add kind argument and use it.
2310 (gfc_conv_statement_function): Fix indentation.
2311 * gfortran.h (gfc_character_info): New structure.
2312 (gfc_character_kinds): New array.
2313 * trans-types.c (gfc_character_kinds, gfc_character_types,
2314 gfc_pcharacter_types): New array.
2315 (gfc_init_kinds): Fill character kinds array.
2316 (validate_character): Take care of nondefault character kinds.
2317 (gfc_build_uint_type): New function.
2318 (gfc_init_types): Take care of nondefault character kinds.
2319 (gfc_get_char_type, gfc_get_pchar_type): New functions.
2320 (gfc_get_character_type_len): Use gfc_get_char_type.
2321 * trans.h (gfc_build_compare_string): Adjust prototype.
2322 (gfor_fndecl_compare_string_char4, gfor_fndecl_concat_string_char4,
2323 gfor_fndecl_string_len_trim_char4, gfor_fndecl_string_index_char4,
2324 gfor_fndecl_string_scan_char4, gfor_fndecl_string_verify_char4,
2325 gfor_fndecl_string_trim_char4, gfor_fndecl_string_minmax_char4,
2326 gfor_fndecl_adjustl_char4, gfor_fndecl_adjustr_char4): New
2327 prototypes.
2328 * trans-types.h (gfc_get_char_type, gfc_get_pchar_type): New
2329 prototypes.
2330 * trans-decl.c (gfor_fndecl_compare_string_char4,
2331 gfor_fndecl_string_len_trim_char4, gfor_fndecl_string_index_char4,
2332 gfor_fndecl_string_scan_char4, gfor_fndecl_string_verify_char4,
2333 gfor_fndecl_string_trim_char4, gfor_fndecl_string_minmax_char4,
2334 gfor_fndecl_adjustl_char4, gfor_fndecl_adjustr_char4,
2335 gfor_fndecl_concat_string_char4): New function decls.
2336 (gfc_build_intrinsic_function_decls): Define new *_char4 function
2337 decls.
2338 * trans-intrinsic.c (gfc_conv_intrinsic_minmax_char,
2339 gfc_conv_intrinsic_len_trim, gfc_conv_intrinsic_ichar,
2340 gfc_conv_intrinsic_strcmp, gfc_conv_intrinsic_trim,
2341 gfc_conv_intrinsic_function): Deal with nondefault character kinds.
2342
2343 2008-05-15 Sa Liu <saliu@de.ibm.com>
2344
2345 * iso-c-binding.def: Add standard parameter to macro NAMED_INTCST.
2346 All existing NAMED_INTCST definitions has standard GFC_STD_F2003,
2347 c_int128_t, c_int_least128_t and c_int_fast128_t are added as
2348 GNU extensions.
2349 * iso-fortran-evn.def: Add standard parameter GFC_STD_F2003
2350 to macro NAMED_INTCST.
2351 * symbol.c (std_for_isocbinding_symbol): New helper function to
2352 return the standard that supports this isocbinding symbol.
2353 (generate_isocbinding_symbol): Do not generate GNU extension symbols
2354 if std=f2003. Add new parameter to NAMED_INTCST.
2355 * module.c (use_iso_fortran_env_module): Add new parameter to
2356 NAMED_INTCST and new field standard to struct intmod_sym.
2357 * gfortran.h: Add new parameter to NAMED_INTCST.
2358 * trans-types.c (init_c_interop_kinds): Add new parameter to
2359 NAMED_INTCST.
2360 * intrinsic.texi: Documented new types C_INT128_T, C_INT_LEASE128_T
2361 and C_INT_FAST128_T.
2362
2363 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2364
2365 PR fortran/36059
2366 * trans-decl.c (gfc_build_dummy_array_decl): Don't repack
2367 arrays that have the TARGET attribute.
2368
2369 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2370
2371 PR fortran/36186
2372 * simplify.c (only_convert_cmplx_boz): New function.
2373 (gfc_simplify_cmplx, gfc_simplify_complex, gfc_simplify_dcmplx):
2374 Call only_convert_cmplx_boz.
2375
2376 2008-05-14 Paul Thomas <pault@gcc.gnu.org>
2377
2378 PR fortran/36233
2379 * interface.c (compare_actual_formal): Do not check sizes if the
2380 actual is BT_PROCEDURE.
2381
2382 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2383
2384 PR fortran/35682
2385 * trans-array.c (gfc_conv_ss_startstride): Any negative size is
2386 the same as zero size.
2387 (gfc_conv_loop_setup): Fix size calculation.
2388
2389 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2390
2391 PR fortran/35685
2392 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Correctly
2393 handle zero-size sections.
2394
2395 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2396
2397 PR fortran/36215
2398 * scanner.c (preprocessor_line): Allocate enough memory for a
2399 wide string.
2400
2401 2008-05-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2402
2403 PR fortran/36176
2404 * target-memory.c (gfc_target_expr_size): Correctly treat
2405 substrings.
2406 (gfc_target_encode_expr): Likewise.
2407 (gfc_interpret_complex): Whitespace change.
2408
2409 2008-05-11 Thomas Koenig <tkoenig@gcc.gnu.org>
2410
2411 PR fortran/35719
2412 * trans.c (gfc_call_malloc): If size equals zero, allocate one
2413 byte; don't return a null pointer.
2414
2415 2008-05-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2416
2417 PR fortran/36197
2418 * module.c (quote_string): Fix sprintf format.
2419
2420 2008-05-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2421
2422 PR fortran/36162
2423 * module.c (quote_string, unquote_string,
2424 mio_allocated_wide_string): New functions.
2425 (mio_expr): Call mio_allocated_wide_string where needed.
2426
2427 2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>
2428
2429 * trans-decl.c (gfc_get_extern_function_decl, build_function_decl):
2430 Rename DECL_IS_PURE to DECL_PURE_P.
2431
2432 2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2433
2434 * arith.c: (gfc_arith_concat, gfc_compare_string,
2435 gfc_compare_with_Cstring, hollerith2representation,
2436 gfc_hollerith2int, gfc_hollerith2real, gfc_hollerith2complex,
2437 gfc_hollerith2character, gfc_hollerith2logical): Use wide
2438 characters for character constants.
2439 * data.c (create_character_intializer): Likewise.
2440 * decl.c (gfc_set_constant_character_len): Likewise.
2441 * dump-parse-tree.c (show_char_const): Correctly dump wide
2442 character strings.
2443 error.c (print_wide_char): Rename into gfc_print_wide_char.
2444 (show_locus): Adapt to new prototype of gfc_print_wide_char.
2445 expr.c (free_expr0): Representation is now disjunct from
2446 character string value, so we always free it.
2447 (gfc_copy_expr, find_substring_ref, gfc_simplify_expr): Adapt
2448 to wide character strings.
2449 * gfortran.h (gfc_expr): Make value.character.string a wide string.
2450 (gfc_wide_toupper, gfc_wide_strncasecmp, gfc_wide_memset,
2451 gfc_widechar_to_char, gfc_char_to_widechar): New prototypes.
2452 (gfc_get_wide_string): New macro.
2453 (gfc_print_wide_char): New prototype.
2454 * io.c (format_string): Make a wide string.
2455 (next_char, gfc_match_format, compare_to_allowed_values,
2456 gfc_match_open): Deal with wide strings.
2457 * module.c (mio_expr): Convert between wide strings and ASCII ones.
2458 * primary.c (match_hollerith_constant, match_charkind_name):
2459 Handle wide strings.
2460 * resolve.c (build_default_init_expr): Likewise.
2461 * scanner.c (gfc_wide_toupper, gfc_wide_memset,
2462 gfc_char_to_widechar): New functions.
2463 (wide_strchr, gfc_widechar_to_char, gfc_wide_strncasecmp):
2464 Changes in prototypes.
2465 (gfc_define_undef_line, load_line, preprocessor_line,
2466 include_line, load_file, gfc_read_orig_filename): Handle wide
2467 strings.
2468 * simplify.c (gfc_simplify_achar, gfc_simplify_adjustl,
2469 gfc_simplify_adjustr, gfc_simplify_char, gfc_simplify_iachar,
2470 gfc_simplify_ichar, simplify_min_max, gfc_simplify_new_line,
2471 gfc_simplify_repeat): Handle wide strings.
2472 (wide_strspn, wide_strcspn): New helper functions.
2473 (gfc_simplify_scan, gfc_simplify_trim, gfc_simplify_verify):
2474 Handle wide strings.
2475 * symbol.c (generate_isocbinding_symbol): Likewise.
2476 * target-memory.c (size_character, gfc_target_expr_size,
2477 encode_character, gfc_target_encode_expr, gfc_interpret_character,
2478 gfc_target_interpret_expr): Handle wide strings.
2479 * trans-const.c (gfc_conv_string_init): Lower wide strings to
2480 narrow ones.
2481 (gfc_conv_constant_to_tree): Likewise.
2482 * trans-expr.c (gfc_conv_substring_expr): Handle wide strings.
2483 * trans-io.c (gfc_new_nml_name_expr): Likewise.
2484 * trans-stmt.c (gfc_trans_label_assign): Likewise.
2485
2486 2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2487
2488 * simplify.c (gfc_simplify_bessel_j0,gfc_simplify_bessel_j1,
2489 gfc_simplify_bessel_jn,gfc_simplify_bessel_y0,
2490 gfc_simplify_bessel_y1,gfc_simplify_bessel_yn): Mark arguments
2491 with ATTRIBUTE_UNUSED.
2492
2493 2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2494
2495 * check.c (gfc_check_sizeof): Switch to ATTRIBUTE_UNUSED.
2496 * simplify.c (gfc_simplify_lgamma): Likewise.
2497
2498 2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2499
2500 * openmp.c (gfc_match_omp_eos): Use gfc_next_ascii_char and
2501 gfc_peek_ascii_char.
2502 * decl.c (gfc_match_kind_spec, gfc_match_type_spec,
2503 gfc_match_implicit_none, match_implicit_range, gfc_match_implicit,
2504 match_string_p, match_attr_spec, gfc_match_suffix,
2505 match_procedure_decl, gfc_match_entry, gfc_match_subroutine):
2506 Likewise.
2507 * gfortran.h (gfc_char_t): New type.
2508 (gfc_linebuf): Make line member a gfc_char_t.
2509 (locus): Make nextc member a gfc_char_t.
2510 (gfc_wide_is_printable, gfc_wide_is_digit, gfc_wide_fits_in_byte,
2511 gfc_wide_tolower, gfc_wide_strlen, gfc_next_ascii_char,
2512 gfc_peek_ascii_char, gfc_check_digit): New prototypes.
2513 * error.c (print_wide_char): New function.
2514 (show_locus): Use print_wide_char and gfc_wide_strlen.
2515 * io.c (next_char): Use gfc_char_t type.
2516 (match_io): Use gfc_peek_ascii_char and gfc_next_ascii_char.
2517 * match.c (gfc_match_parens, gfc_match_eos,
2518 gfc_match_small_literal_int, gfc_match_name, gfc_match_name_C,
2519 gfc_match_intrinsic_op, gfc_match_char, gfc_match_return,
2520 gfc_match_common): Likewise.
2521 * match.h (gfc_match_special_char): Change prototype.
2522 * parse.c (decode_specification_statement, decode_statement,
2523 decode_omp_directive, next_free, next_fixed): Use
2524 gfc_peek_ascii_char and gfc_next_ascii_char.
2525 * primary.c (gfc_check_digit): Change name.
2526 (match_digits, match_hollerith_constant, match_boz_constant,
2527 match_real_constant, next_string_char, match_charkind_name,
2528 match_string_constant, match_logical_constant_string,
2529 match_complex_constant, match_actual_arg, match_varspec,
2530 gfc_match_rvalue, match_variable): Use gfc_peek_ascii_char and
2531 gfc_next_ascii_char.
2532 * scanner.c (gfc_wide_fits_in_byte, wide_is_ascii,
2533 gfc_wide_is_printable, gfc_wide_tolower, gfc_wide_is_digit,
2534 gfc_wide_is_digit, wide_atoi, gfc_wide_strlen, wide_strcpy,
2535 wide_strchr, widechar_to_char, wide_strncmp, wide_strncasecmp,
2536 gfc_next_ascii_char, gfc_peek_ascii_char):
2537 New functions.
2538 (next_char, gfc_define_undef_line, skip_free_comments,
2539 gfc_next_char_literal, gfc_next_char, gfc_peek_char,
2540 gfc_error_recovery, load_line, preprocessor_line, include_line,
2541 load_file, gfc_read_orig_filename): Use gfc_char_t for source
2542 characters and the {gfc_,}wide_* functions to manipulate wide
2543 strings.
2544
2545 2008-05-06 Tobias Burnus <burnus@net-b.de>
2546
2547 PR fortran/36117
2548 * intrinsic.c (add_functions): Call gfc_simplify_bessel_*.
2549 * intrinsic.h: Add prototypes for gfc_simplify_bessel_*.
2550 * simplify.c (gfc_simplify_bessel_j0,gfc_simplify_bessel_j1,
2551 gfc_simplify_bessel_jn,gfc_simplify_bessel_y0,
2552 gfc_simplify_bessel_y1,gfc_simplify_bessel_yn): New.
2553
2554 2008-05-03 Janus Weil <jaydub66@gmail.com>
2555
2556 * misc.c (gfc_clear_ts): Set interface to NULL.
2557
2558 2008-05-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2559
2560 PR fortran/33268
2561 * gfortran.h: Add extra_comma pointer to gfc_dt structure. Add iokind to
2562 gfc_expr value union. Add io_kind enum to here from io.c.
2563 * io.c (gfc_free_dt): Free extra_comma.
2564 (gfc_resolve_dt): If an extra comma was encountered and io_unit is type
2565 BT_CHARACTER, resolve to format_expr and set default unit. Error if
2566 io_kind is M_WRITE. (match_io): Match the extra comma and set new
2567 pointer, extra_comma.
2568
2569 2008-05-01 Bud Davis <bdavis9659@sbcglobal.net>
2570
2571 PR35940/Fortran
2572 * simplify.c (gfc_simplify_index): Check for direction argument
2573 being a constant.
2574
2575 2008-05-01 Janus Weil <jaydub66@gmail.com>
2576
2577 * gfortran.h (struct gfc_symbol): Moving "interface" member to
2578 gfc_typespec (plus fixing a small docu error).
2579 * interface.c (gfc_procedure_use): Ditto.
2580 * decl.c (match_procedure_decl): Ditto.
2581 * resolve.c (resolve_specific_f0,
2582 resolve_specific_f0, resolve_symbol): Ditto.
2583
2584 2008-04-30 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2585
2586 * intrinsic.c (add_functions): Add SELECTED_CHAR_KIND intrinsic.
2587 * intrinsic.h (gfc_check_selected_char_kind,
2588 gfc_simplify_selected_char_kind): New prototypes.
2589 * gfortran.h (gfc_isym_id): Add GFC_ISYM_SC_KIND.
2590 * trans.h (gfor_fndecl_sc_kind): New function decl.
2591 * trans-decl.c (gfor_fndecl_sc_kind): Build new decl.
2592 * arith.c (gfc_compare_with_Cstring): New function.
2593 * arith.h (gfc_compare_with_Cstring): New prototype.
2594 * check.c (gfc_check_selected_char_kind): New function.
2595 * primary.c (match_string_constant, match_kind_param): Mark
2596 symbols used as literal constant kind param as referenced.
2597 * trans-intrinsic.c (gfc_conv_intrinsic_sc_kind): New function.
2598 (gfc_conv_intrinsic_function): Call gfc_conv_intrinsic_sc_kind.
2599 * intrinsic.texi (SELECTED_CHAR_KIND): Document new intrinsic.
2600 * simplify.c (gfc_simplify_selected_char_kind): New function.
2601
2602 2008-04-28 Paul Thomas <pault@gcc.gnu.org>
2603
2604 PR fortran/35997
2605 * module.c (find_symbol): Do not return a result for a symbol
2606 that has been renamed in another module.
2607
2608 2008-04-26 George Helffrich <george@gcc.gnu.org>
2609
2610 PR fortran/35892
2611 PR fortran/35154
2612 * trans-common.c (create_common): Add decl to function
2613 chain (if inside one) to preserve identifier scope in debug output.
2614
2615 2008-04-25 Jan Hubicka <jh@suse.cz>
2616
2617 * trans-decl.c (trans_function_start): Update.
2618
2619 2008-04-25 Tobias Burnus <burnus@net-b.de>
2620 Daniel Franke <franke.daniel@gmail.com>
2621
2622 PR fortran/35156
2623 * gfortranspec.c (lang_specific_driver): Deprecate
2624 -M option; fix ICE when "-M" is last argument and
2625 make "-M<dir>" work.
2626 * options.c (gfc_handle_module_path_options):
2627 Use -J instead of -M in error messages.
2628 * invoke.texi: Mark -M as depecated.
2629
2630 2008-04-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2631 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2632
2633 PR fortran/35994
2634 * trans-instrinsic.c (gfc_conv_intrinsic_minmaxloc): Correctly adjust
2635 loop counter offset.
2636
2637 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
2638
2639 * trans-expr.c (gfc_conv_structure): Don't set TREE_INVARIANT.
2640 * trans-array.c (gfc_build_null_descriptor): Don't set TREE_INVARIANT.
2641 (gfc_trans_array_constructor_value): Don't set TREE_INVARIANT.
2642 (gfc_build_constant_array_constructor): Don't set TREE_INVARIANT.
2643 (gfc_conv_array_initializer): Don't set TREE_INVARIANT.
2644 * trans-common.c (get_init_field): Don't set TREE_INVARIANT.
2645 (create_common): Don't set TREE_INVARIANT.
2646 * trans-stmt.c (gfc_trans_character_select): Don't set TREE_INVARIANT.
2647 * trans-decl.c (gfc_generate_function_code): Don't set TREE_INVARIANT.
2648
2649 2008-04-21 Steve Ellcey <sje@cup.hp.com>
2650
2651 * f95-lang.c (gfc_init_decl_processing): use ptr_mode instead of Pmode.
2652
2653 2008-04-21 Daniel Franke <franke.daniel@gmail.com>
2654
2655 PR fortran/35019
2656 * gfortranspec.c (lookup_option): Properly handle separated arguments
2657 in -J option, print missing argument message when necessary.
2658
2659 2008-04-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2660
2661 PR fortran/35882
2662 * scanner.c (skip_fixed_comments): Update continue_line when comment is
2663 detected. (gfc_next_char_literal): Likewise.
2664
2665 2008-04-19 Paul Thomas <pault@gcc.gnu.org>
2666
2667 PR fortran/35944
2668 PR fortran/35946
2669 PR fortran/35947
2670 * trans_array.c (gfc_trans_array_constructor): Temporarily
2671 realign loop, if loop->from is not zero, before creating
2672 the temporary array and provide an offset.
2673
2674 PR fortran/35959
2675 * trans-decl.c (gfc_init_default_dt): Add gfc_ prefix to name
2676 and allow for NULL body. Change all references from
2677 init_default_dt to gfc_init_default_dt.
2678 * trans.h : Add prototype for gfc_init_default_dt.
2679 * trans-array.c (gfc_trans_deferred_vars): After nullification
2680 call gfc_init_default_dt for derived types with allocatable
2681 components.
2682
2683 2008-04-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2684
2685 PR fortran/35892
2686 * trans-common.c (create_common): Revert patch causing regression.
2687
2688 2008-04-16 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2689
2690 PR fortran/35724
2691 * iresolve.c (gfc_resolve_eoshift): Check for NULL symtree in test for
2692 optional argument attribute.
2693
2694 2008-04-16 Paul Thomas <pault@gcc.gnu.org>
2695
2696 PR fortran/35932
2697 * trans-intrinsic.c (gfc_conv_intrinsic_char): Even though KIND
2698 is not used, the argument must be converted.
2699
2700 2008-04-16 Jakub Jelinek <jakub@redhat.com>
2701
2702 PR target/35662
2703 * f95-lang.c (gfc_init_builtin_functions): Make sure
2704 BUILT_IN_SINCOS{,F,L} types aren't varargs.
2705
2706 2008-04-15 Paul Thomas <pault@gcc.gnu.org>
2707
2708 PR fortran/35864
2709 * expr.c (scalarize_intrinsic_call): Reorder identification of
2710 array argument so that if one is not found a segfault does not
2711 occur. Return FAILURE if all scalar arguments.
2712
2713 2008-04-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2714 Tobias Burnus <burnus@net-b.de>
2715
2716 PR fortran/35882
2717 * options.c (gfc_init_options): Set the default maximum continuation
2718 lines to 255 for both free and fixed form source for warnings.
2719 (gfc_handle_option): Set -std=f95 fixed form max continuations to 19 and
2720 the -std=f95 free form max continuations to 39 for warnings.
2721 * scanner.c (gfc_next_char_literal): Adjust the current_line number only
2722 if it is less than the current locus.
2723
2724 2008-04-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2725
2726 PR fortran/25829 28655
2727 * io.c (io_tag): Add new tags for decimal, encoding, asynchronous,
2728 round, sign, and id. (match_open_element): Match new tags.
2729 (gfc_resolve_open): Resolve new tags. (gfc_match_open): Enable encoding
2730 for DEFAULT only. Update error messages. (match_dt_element): Fix match
2731 tag for asynchronous. Update error messages. (gfc_free_inquire): Free
2732 new expressions. (match_inquire_element): Match new tags.
2733 (gfc_match_inquire): Add constraint for ID and PENDING.
2734 (gfc_resolve_inquire): Resolve new tags.
2735 * trans-io.c (gfc_trans_inquire): Clean up whitespace and fix setting of
2736 mask for ID parameter.
2737 * ioparm.def: Fix order of parameters for pending, round, and sign.
2738 NOTE: These must line up with the definitions in libgfortran/io/io.h. or
2739 things don't work.
2740
2741 2008-04-06 Paul Thomas <pault@gcc.gnu.org>
2742
2743 PR fortran/35780
2744 * expr.c (scalarize_intrinsic_call): Identify which argument is
2745 an array and use that as the template.
2746 (check_init_expr): Remove tests that first argument is an array
2747 in the call to scalarize_intrinsic_call.
2748
2749 2008-04-06 Tobias Schlüter <tobi@gcc.gnu.org>
2750
2751 PR fortran/35832
2752 * io.c (io_tag): Add field 'value'. Split 'spec' field in
2753 existing io_tags.
2754 (match_etag, match_vtag, match_ltag): Split parsing in two steps
2755 to give better error messages.
2756
2757 2008-04-06 Tobias Burnus <burnus@net-b.de>
2758
2759 * io.c (check_io_constraints): Add constrains. ID= requires
2760 asynchronous= and asynchronous= must be init expression.
2761
2762 2008-04-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2763
2764 * f95-lang.c: Set LANG_HOOKS_NAME to "GNU Fortran".
2765
2766 2008-04-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2767
2768 * dump-parse-tree.c: Use fprintf, fputs and fputc instead of
2769 gfc_status and gfc_status_char. Remove gfc_ prefix of the gfc_show_*
2770 functions and make them static. Add new gfc_dump_parse_tree
2771 function.
2772 * gfortran.h (gfc_option_t): Rename verbose into dump_parse_tree.
2773 (gfc_status, gfc_status_char): Delete prototypes.
2774 * error.c (gfc_status, gfc_status_char): Remove functions.
2775 * scanner.c (gfc_new_file): Use printf instead of gfc_status.
2776 * options.c (gfc_init_options): Rename verbose into dump_parse_tree.
2777 (gfc_handle_module_path_options): Use gfc_fatal_error instead of
2778 gfc_status and exit.
2779 (gfc_handle_option): Rename verbose into dump_parse_tree.
2780 * parse.c (gfc_parse_file): Use gfc_dump_parse_tree.
2781
2782 2008-04-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2783 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2784
2785 PR fortran/25829 28655
2786 * dump-parse-tree.c (gfc_show_code_node): Show new I/O parameters.
2787 * gfortran.h (gfc_statement): Add ST_WAIT enumerator.
2788 (gfc_open): Add pointers for decimal, encoding, round, sign,
2789 asynchronous. (gfc_inquire): Add pointers for asynchronous, decimal,
2790 encoding, pending, round, sign, size, id.
2791 (gfc_wait): New typedef struct. (gfc_dt): Add pointers for id, pos,
2792 asynchronous, blank, decimal, delim, pad, round, sign.
2793 (gfc_exec_op): Add EXEC_WAIT enumerator. (gfc_code): Add pointer for
2794 wait. (gfc_free_wait), (gfc_resolve_wait): New function prototypes.
2795 * trans-stmt.h (gfc_trans_wait): New function prototype.
2796 * trans.c (gfc_trans_code): Add case for EXEC_WAIT.
2797 * io.c (io_tag): Add new tags for DECIMAL, ENCODING, ROUND, SIGN,
2798 ASYCHRONOUS, ID. (match_open_element): Add matchers for new tags.
2799 (gfc_free_open): Free new pointers. (gfc_resolve_open): Resolve new
2800 tags. (gfc_resolve_open): Remove comment around check for allowed
2801 values and ASYNCHRONOUS, update it. Likewise for DECIMAL, ENCODING,
2802 ROUND, and SIGN. (match_dt_element): Add matching for new tags.
2803 (gfc_free_wait): New function. (gfc_resolve_wait): New function.
2804 (match_wait_element): New function. (gfc_match_wait): New function.
2805 * resolve.c (gfc_resolve_blocks): Add case for EXEC_WAIT.
2806 (resolve_code): Add case for EXEC_WAIT.
2807 * st.c (gfc_free_statement): Add case for EXEC_WAIT.
2808 * trans-io.c (ioparam_type): Add IOPARM_ptype_wait. (gfc_st_parameter):
2809 Add "wait" entry. (iocall): Add IOCALL_WAIT enumerator.
2810 (gfc_build_io_library_fndecls): Add function declaration for st_wait.
2811 (gfc_trans_open): Add mask bits for new I/O tags.
2812 (gfc_trans_inquire): Add mask bits for new I/O tags.
2813 (gfc_trans_wait): New translation function.
2814 (build_dt): Add mask bits for new I/O tags.
2815 * match.c (gfc_match_if) Add matcher for "wait".
2816 * match.h (gfc_match_wait): Prototype for new function.
2817 * ioparm.def: Add new I/O parameter definitions.
2818 * parse.c (decode_statement): Add match for "wait" statement.
2819 (next_statement): Add case for ST_WAIT. (gfc_ascii_statement): Same.
2820
2821 2008-04-03 Jakub Jelinek <jakub@redhat.com>
2822
2823 PR fortran/35786
2824 * openmp.c (resolve_omp_clauses): Diagnose if a clause symbol
2825 isn't a variable.
2826
2827 2008-04-03 Tom Tromey <tromey@redhat.com>
2828
2829 * Make-lang.in (fortran_OBJS): New variable.
2830
2831 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
2832
2833 * f95-lang.c (insert_block): Kill.
2834
2835 2008-04-01 George Helffrich <george@gcc.gnu.org>
2836
2837 PR fortran/35154, fortran/23057
2838 * trans-common.c (create_common): Add decl to function
2839 chain to preserve identifier scope in debug output.
2840
2841 2008-04-01 Joseph Myers <joseph@codesourcery.com>
2842
2843 * gfortran.texi: Include gpl_v3.texi instead of gpl.texi
2844 * Make-lang.in (GFORTRAN_TEXI): Include gpl_v3.texi instead of
2845 gpl.texi.
2846
2847 2008-03-30 Paul Thomas <pault@gcc.gnu.org>
2848
2849 PR fortran/35740
2850 * resolve.c (resolve_function, resolve_call): If the procedure
2851 is elemental do not look for noncopying intrinsics.
2852
2853 2008-03-29 Paul Thomas <pault@gcc.gnu.org>
2854
2855 PR fortran/35698
2856 * trans-array.c (gfc_array_init_size): Set 'size' zero if
2857 negative in one dimension.
2858
2859 PR fortran/35702
2860 * trans-expr.c (gfc_trans_string_copy): Only assign a char
2861 directly if the lhs and rhs types are the same.
2862
2863 2008-03-28 Daniel Franke <franke.daniel@gmail.com>
2864 Paul Richard Thomas <paul.richard.thomas@gmail.com>
2865
2866 PR fortran/34714
2867 * primary.c (match_variable): Improved matching of function
2868 result variables.
2869 * resolve.c (resolve_allocate_deallocate): Removed checks if
2870 the actual argument for STAT is a variable.
2871
2872 2008-03-28 Tobias Burnus <burnus@net-b.de>
2873
2874 * symbol.c (gfc_get_default_type): Fix error message; option
2875 -fallow_leading_underscore should be -fallow-leading-underscore
2876
2877 2008-03-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2878
2879 PR fortran/35724
2880 * iresolve.c (gfc_resolve_cshift): Check for NULL symtree in test for
2881 optional argument attribute.
2882
2883 2008-03-27 Tom Tromey <tromey@redhat.com>
2884
2885 * Make-lang.in: Revert automatic dependency patch.
2886
2887 2008-03-25 Tom Tromey <tromey@redhat.com>
2888
2889 * Make-lang.in: Remove .o targets.
2890 (fortran_OBJS): New variable.
2891 (fortran/gfortranspec.o): Move to fortran/. Reduce to variable
2892 setting.
2893 (GFORTRAN_D_OBJS): Update.
2894 (GFORTRAN_TRANS_DEPS): Remove.
2895
2896 2008-03-24 Paul Thomas <pault@gcc.gnu.org>
2897
2898 PR fortran/34813
2899 * resolve.c (resolve_structure_cons): It is an error to assign
2900 NULL to anything other than a pointer or allocatable component.
2901
2902 PR fortran/33295
2903 * resolve.c (resolve_symbol): If the symbol is a derived type,
2904 resolve the derived type. If the symbol is a derived type
2905 function, ensure that the derived type is visible in the same
2906 namespace as the function.
2907
2908 2008-03-23 Tobias Schlüter <tobi@gcc.gnu.org>
2909
2910 * trans.h: Use fold_build in build1_v, build2_v and build3_v
2911 macros.
2912 * trans-openmp.c (gfc_trans_omp_critical, gfc_trans_omp_single):
2913 Don't use build2_v macro.
2914
2915 2008-03-19 Daniel Franke <franke.daniel@gmail.com>
2916
2917 PR fortran/35152
2918 * interface.c (gfc_procedure_use): Check for keyworded arguments in
2919 procedures without explicit interfaces.
2920
2921 2008-03-16 Paul Thomas <pault@gcc.gnu.org>
2922
2923 PR fortran/35470
2924 * resolve.c (check_assumed_size_reference): Only visit the
2925 first reference and look directly at the highest dimension.
2926
2927 2008-03-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2928
2929 PR fortran/35184
2930 * trans-array.c (gfc_conv_array_index_offset): Remove unnecessary
2931 assert.
2932
2933 2008-03-15 Daniel Franke <franke.daniel@gmail.com>
2934
2935 PR fortran/35584
2936 * resolve.c (resolve_branch): Less strict and pessimistic warning
2937 message.
2938
2939 2008-03-11 Paolo Bonzini <bonzini@gnu.org>
2940
2941 * f95-lang.c (LANG_HOOKS_CLEAR_BINDING_STACK): Delete.
2942 (gfc_be_parse_file): Call clear_binding_stack from here.
2943 (gfc_clear_binding_stack): Rename to clear_binding_stack.
2944
2945 2008-03-09 Paul Thomas <pault@gcc.gnu.org>
2946
2947 PR fortran/35474
2948 * module.c (mio_symtree_ref): After providing a symbol for a
2949 missing equivalence member, resolve and NULL the fixups.
2950
2951 2008-03-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2952
2953 * invoke.texi (Error and Warning Options): Document
2954 -Wline-truncation.
2955
2956 2008-03-08 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2957
2958 PR fortran/34956
2959 * trans-array.c (gfc_conv_ss_startstride): Fix the logic to avoid
2960 checking bounds of absent optional arguments.
2961
2962 2008-03-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2963
2964 PR fortran/33197
2965 * intrinsic.c (add_functions): Add simplification routines for
2966 ERF, DERF, ERFC and DERFC.
2967 * decl.c (gfc_match_suffix, gfc_match_subroutine): Change GNU
2968 extensions into Fortran 2008 features.
2969 * intrinsic.h (gfc_simplify_erf, gfc_simplify_erfc): New
2970 prototypes.
2971 * simplify.c (gfc_simplify_erf, gfc_simplify_erfc): New functions.
2972
2973 2008-03-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2974
2975 PR fortran/33197
2976 * intrinsic.c (add_functions): Modify intrinsics ACOSH, ASINH,
2977 ATANH, ERF, ERFC and GAMMA. Add intrinsics BESSEL_{J,Y}{0,1,N},
2978 ERFC_SCALED, LOG_GAMMA and HYPOT.
2979 * intrinsic.h (gfc_check_hypot, gfc_simplify_hypot,
2980 gfc_resolve_hypot): New prototypes.
2981 * mathbuiltins.def: Add HYPOT builtin. Make complex versions of
2982 ACOSH, ASINH and ATANH available.
2983 * gfortran.h (GFC_ISYM_ERFC_SCALED, GFC_ISYM_HYPOT): New values.
2984 * lang.opt: Add -std=f2008 option.
2985 * libgfortran.h: Define GFC_STD_F2008.
2986 * lang-specs.h: Add .f08 and .F08 file suffixes.
2987 * iresolve.c (gfc_resolve_hypot): New function.
2988 * parse.c (parse_contained): Allow empty CONTAINS for Fortran 2008.
2989 * check.c (gfc_check_hypot): New function.
2990 * trans-intrinsic.c (gfc_intrinsic_map): Define ERFC_SCALE builtin.
2991 * options.c (set_default_std_flags): Allow Fortran 2008 by default.
2992 (form_from_filename): Add .f08 suffix.
2993 (gfc_handle_option): Handle -std=f2008 option.
2994 * simplify.c (gfc_simplify_hypot): New function.
2995 * gfortran.texi: Document Fortran 2008 status and file extensions.
2996 * intrinsic.texi: Document new BESSEL_{J,Y}{0,1,N} intrinsics,
2997 as well as HYPOT and ERFC_SCALED. Update documentation of ERF,
2998 ERFC, GAMMA, LGAMMA, ASINH, ACOSH and ATANH.
2999 * invoke.texi: Document the new -std=f2008 option.
3000
3001 2008-03-02 Jakub Jelinek <jakub@redhat.com>
3002
3003 * gfortranspec.c (lang_specific_driver): Update copyright notice
3004 dates.
3005
3006 2008-02-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3007
3008 PR fortran/35059
3009 * expr.c (find_array_element): Modify traversing the constructor to
3010 avoid trying to access NULL memory pointed to by next for the
3011 last element. (find_array_section): Exit while loop if cons->next is
3012 NULL.
3013 * trans-expr.c (gfc_conv_scalar_char_value): Initialize gfc_typespec.
3014 (gfc_conv_function_call): Same.
3015 * decl.c (gfc_match_implicit): Same.
3016 * trans-intrinsic.c (gfc_conv_intrinsic_sr_kind): Same.
3017
3018 2008-02-28 Daniel Franke <franke.daniel@gmail.com>
3019
3020 PR fortran/31463
3021 PR fortran/33950
3022 PR fortran/34296
3023 * lang.opt: Added -Wreturn-type.
3024 * options.c (gfc_handle_option): Recognize -Wreturn-type.
3025 * trans-decl.c (gfc_trans_deferred_vars): Emit warnings for funtions
3026 where the result value is not set.
3027 (gfc_generate_function_code): Likewise.
3028 (generate_local_decl): Emit warnings for funtions whose RESULT
3029 variable is not set.
3030
3031 2008-02-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3032
3033 PR fortran/34868
3034 * trans-expr.c (gfc_conv_variable): Don't build indirect
3035 references when explicit interface is mandated.
3036 * resolve.c (resolve_formal_arglist): Set attr.always_explicit
3037 on the result symbol as well as the procedure symbol.
3038
3039 2008-02-27 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3040
3041 PR fortran/33387
3042 * trans.h: Remove prototypes for gfor_fndecl_math_exponent4,
3043 gfor_fndecl_math_exponent8, gfor_fndecl_math_exponent10 and
3044 gfor_fndecl_math_exponent16.
3045 * f95-lang.c (build_builtin_fntypes): Add new function types.
3046 (gfc_init_builtin_functions): Add new builtins for nextafter,
3047 frexp, ldexp, fabs, scalbn and inf.
3048 * iresolve.c (gfc_resolve_rrspacing): Don't add hidden arguments.
3049 (gfc_resolve_scale): Don't convert type of second argument.
3050 (gfc_resolve_set_exponent): Likewise.
3051 (gfc_resolve_size): Don't add hidden arguments.
3052 * trans-decl.c: Remove gfor_fndecl_math_exponent4,
3053 gfor_fndecl_math_exponent8, gfor_fndecl_math_exponent10 and
3054 gfor_fndecl_math_exponent16.
3055 * trans-intrinsic.c (gfc_intrinsic_map): Remove intrinsics
3056 for scalbn, fraction, nearest, rrspacing, set_exponent and
3057 spacing.
3058 (gfc_conv_intrinsic_exponent): Directly call frexp.
3059 (gfc_conv_intrinsic_fraction, gfc_conv_intrinsic_nearest,
3060 gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_rrspacing,
3061 gfc_conv_intrinsic_scale, gfc_conv_intrinsic_set_exponent): New
3062 functions.
3063 (gfc_conv_intrinsic_function): Use the new functions above.
3064
3065 2008-02-26 Tobias Burnus <burnus@net-b.de>
3066
3067 PR fortran/35033
3068 * interface.c (check_operator_interface): Show better line for error
3069 messages; fix constrains for user-defined assignment operators.
3070 (gfc_extend_assign): Fix constrains for user-defined assignment
3071 operators.
3072
3073 2008-02-26 Tom Tromey <tromey@redhat.com>
3074
3075 * trans-io.c (set_error_locus): Remove old location code.
3076 * trans-decl.c (gfc_set_decl_location): Remove old location code.
3077 * f95-lang.c (gfc_init): Remove test of USE_MAPPED_LOCATION.
3078 * scanner.c (gfc_gobble_whitespace): Remove old location code.
3079 (get_file): Likewise.
3080 (preprocessor_line): Likewise.
3081 (load_file): Likewise.
3082 (gfc_new_file): Likewise.
3083 * trans.c (gfc_trans_runtime_check): Remove old location code.
3084 (gfc_get_backend_locus): Likewise.
3085 (gfc_set_backend_locus): Likewise.
3086 * data.c (gfc_assign_data_value): Remove old location code.
3087 * error.c (show_locus): Remove old location code.
3088 * gfortran.h (gfc_linebuf): Remove old location code.
3089 (gfc_linebuf_linenum): Remove old-location variant.
3090
3091 2008-02-25 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3092
3093 PR fortran/34729
3094 * trans-const.c (gfc_build_string_const): Don't call gettext.
3095 (gfc_build_localized_string_const): New function.
3096 * trans-const.h (gfc_build_localized_string_const): New prototype.
3097 * trans.c (gfc_trans_runtime_check): Use
3098 gfc_build_localized_string_const instead of gfc_build_string_const.
3099 (gfc_call_malloc): Likewise.
3100 (gfc_allocate_with_status): Likewise.
3101 (gfc_allocate_array_with_status): Likewise.
3102 (gfc_deallocate_with_status): Likewise.
3103 (gfc_call_realloc): Likewise.
3104 * trans-io.c (gfc_trans_io_runtime_check): Likewise.
3105
3106 2008-02-24 Tobias Schlüter <tobi@gcc.gnu.org>
3107
3108 * arith.c: Update copyright years.
3109 * arith.h: Likewise.
3110 * array.c: Likewise.
3111 * bbt.c: Likewise.
3112 * check.c: Likewise.
3113 * data.c: Likewise.
3114 * data.h: Likewise.
3115 * decl.c: Likewise.
3116 * dependency.c: Likewise.
3117 * dependency.h: Likewise.
3118 * dump-parse-tree.c: Likewise.
3119 * error.c: Likewise.
3120 * expr.c: Likewise.
3121 * gfc-internals.texi: Likewise.
3122 * gfortran.h: Likewise.
3123 * gfortran.texi: Likewise.
3124 * gfortranspec.c: Likewise.
3125 * interface.c: Likewise.
3126 * intrinsic.c: Likewise.
3127 * intrinsic.h: Likewise.
3128 * intrinsic.texi: Likewise.
3129 * invoke.texi: Likewise.
3130 * io.c: Likewise.
3131 * iresolve.c: Likewise.
3132 * iso-c-binding.def: Likewise.
3133 * iso-fortran-env.def: Likewise.
3134 * lang-specs.h: Likewise.
3135 * lang.opt: Likewise.
3136 * libgfortran.h: Likewise.
3137 * match.c: Likewise.
3138 * match.h: Likewise.
3139 * matchexp.c: Likewise.
3140 * misc.c: Likewise.
3141 * module.c: Likewise.
3142 * openmp.c: Likewise.
3143 * options.c: Likewise.
3144 * parse.c: Likewise.
3145 * parse.h: Likewise.
3146 * primary.c: Likewise.
3147 * resolve.c: Likewise.
3148 * scanner.c: Likewise.
3149 * simplify.c: Likewise.
3150 * st.c: Likewise.
3151 * symbol.c: Likewise.
3152 * target-memory.c: Likewise.
3153 * target-memory.h: Likewise.
3154 * trans-array.h: Likewise.
3155 * trans-const.h: Likewise.
3156 * trans-stmt.h: Likewise.
3157 * trans-types.c: Likewise.
3158 * trans-types.h: Likewise.
3159 * types.def: Likewise.
3160
3161 2008-02-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3162
3163 PR fortran/35223
3164 * simplify.c (gfc_simplify_ibclr), (gfc_simplify_ibits),
3165 (gfc_simplify_ibset): Remove call to range_check.
3166 (simplify_cmplx), (gfc_simplify_dble), (gfc_simplify_float)
3167 (gfc_simplify_real): Add call gfc_clear_ts to initialize the
3168 temporary gfc_typspec variable.
3169
3170 2008-02-24 Tobias Schlüter <tobi@gcc.gnu.org>
3171
3172 * trans-array.c (gfc_conv_descriptor_data_get,
3173 gfc_conv_descriptor_data_set_internal,
3174 gfc_conv_descriptor_data_addr, gfc_conv_descriptor_offset,
3175 gfc_conv_descriptor_dtype, gfc_conv_descriptor_dimension,
3176 gfc_conv_descriptor_stride, gfc_conv_descriptor_lbound,
3177 gfc_conv_descriptor_ubound, gfc_trans_create_temp_array,
3178 gfc_conv_array_transpose, gfc_grow_array,
3179 gfc_trans_array_constructor_subarray,
3180 gfc_trans_array_constructor_value, gfc_trans_scalarized_loop_end,
3181 gfc_array_init_size, gfc_array_allocate, gfc_array_deallocate,
3182 gfc_conv_array_initializer, gfc_trans_array_bounds,
3183 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
3184 gfc_get_dataptr_offset, gfc_conv_array_parameter,
3185 gfc_trans_dealloc_allocated, get_full_array_size,
3186 gfc_duplicate_allocatable, structure_alloc_comps): Use fold_buildN
3187 instead of buildN.
3188 * trans-expr.c (gfc_conv_expr_present, gfc_conv_missing_dummy,
3189 gfc_conv_component_ref, gfc_conv_cst_int_power,
3190 gfc_conv_function_call, gfc_trans_structur_assign): Likewise.
3191 * trans-common.c (create_common): Likewise.
3192 * trans-openmp.c (gfc_trans_omp_atomic, gfc_trans_omp_do):
3193 Likewise.
3194 * trans-const.c (gfc_conv_constant_to_tree): Likewise.
3195 * trans-stmt.c (gfc_trans_goto, gfc_trans_return, gfc_trans_do,
3196 gfc_trans_integer_select, gfc_trans_character_select,
3197 gfc_trans_forall_loop, compute_overall_iter_number,
3198 gfc_trans_forall_1, gfc_evaluate_where_mask, gfc_trans_allocate,
3199 gfc_trans_deallocate): Likewise.
3200 * trans.c (gfc_build_addr_expr, gfc_trans_runtime_check,
3201 gfc_allocate_with_status, gfc_allocate_array_with_status,
3202 gfc_deallocate_with_status): Likewise.
3203 * f95-lang.c (gfc_truthvalue_conversion): Likewise.
3204 * trans-io.c (set_parameter_const, set_parameter_value,
3205 set_parameter_ref, set_string, set_internal_unit, io_result,
3206 set_error_locus, nml_get_addr_expr, transfer_expr): Likewise.
3207 * trans-decl.c (gfc_build_qualified_array, build_entry_thunks,
3208 gfc_get_fake_result_decl, gfc_trans_auto_character_variable,
3209 gfc_generate_function_code): Likewise.
3210 * convert.c (convert): Likewise.
3211 * trans-intrinsic.c (gfc_conv_intrinsic_conversion,
3212 build_fixbound_expr, build_fix_expr, gfc_conv_intrinsic_aint,
3213 gfc_conv_intrinsic_int, gfc_conv_intrinsic_imagpart,
3214 gfc_conv_intrinsic_conjg, gfc_conv_intrinsic_abs,
3215 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_mod,
3216 gfc_conv_intrinsic_dim, gfc_conv_intrinsic_dprod,
3217 gfc_conv_intrinsic_ctime, gfc_conv_intrinsic_fdate,
3218 gfc_conv_intrinsic_ttynam, gfc_conv_intrinsic_minmax,
3219 gfc_conv_intrinsic_minmax_char, gfc_conv_intrinsic_count,
3220 gfc_conv_intrinsic_arith, gfc_conv_intrinsic_dot_product,
3221 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
3222 gfc_conv_intrinsic_btest, gfc_conv_intrinsic_not,
3223 gfc_conv_intrinsic_ibits, gfc_conv_intrinsic_ishft,
3224 gfc_conv_intrinsic_ichar, gfc_conv_intrinsic_size,
3225 gfc_conv_intrinsic_array_transfer, gfc_conv_intrinsic_transfer,
3226 gfc_conv_allocated, gfc_conv_associated, gfc_conv_intrinsic_trim,
3227 gfc_conv_intrinsic_repeat): Likewise.
3228
3229 2008-02-23 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3230
3231 PR target/25477
3232 * trans-expr.c (gfc_conv_power_op): Use BUILT_IN_CPOW{F,,L}.
3233 * f95-lang.c (gfc_init_builtin_functions): Define BUILT_IN_CPOW{F,,L}.
3234 * trans.h (gfor_fndecl_math_cpow, gfor_fndecl_math_cpowf,
3235 gfor_fndecl_math_cpowl10, gfor_fndecl_math_cpowl16): Remove.
3236 * trans-decl.c: Likewise.
3237
3238 2008-02-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3239
3240 PR fortran/35059
3241 * expr.c (find_array_element): Modify traversing the constructor to
3242 avoid trying to access NULL memory pointed to by next for the
3243 last element. (find_array_section): Exit while loop if cons->next is
3244 NULL.
3245
3246 2008-02-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3247
3248 PR fortran/34907
3249 * iresolve.c (resolve_mask_arg): Add gfc_clear_ts to initialize
3250 structure.
3251 (gfc_resolve_aint): Likewise.
3252 (gfc_resolve_anint): Likewise.
3253 (gfc_resolve_besn): Likewise.
3254 (gfc_resolve_cshift): Likewise.
3255 (gfc_resolve_ctime): Likewise.
3256 (gfc_resolve_eoshift): Likewise.
3257 (gfc_resolve_index_func): Likewise.
3258 (gfc_resolve_isatty): Likewise.
3259 (gfc_resolve_malloc): Likewise.
3260 (gfc_resolve_rrspacing): Likewise.
3261 (gfc_resolve_scale): Likewise.
3262 (gfc_resolve_set_exponent): Likewise.
3263 (gfc_resolve_spacing): Likewise.
3264 (gfc_resolve_spacing): Likewise.
3265 (gfc_resolve_fgetc): Likewise.
3266 (gfc_resolve_fputc): Likewise.
3267 (gfc_resolve_ftell): Likewise.
3268 (gfc_resolve_ttynam): Likewise.
3269 (gfc_resolve_alarm_sub): Likewise.
3270 (gfc_resolve_mvbits): Likewise.
3271 (gfc_resolve_getarg): Likewise.
3272 (gfc_resolve_signal_sub): Likewise.
3273 (gfc_resolve_exit): Likewise.
3274 (gfc_resolve_flush): Likewise.
3275 (gfc_resolve_free): Likewise.
3276 (gfc_resolve_ctime_sub): Likewise.
3277 (gfc_resolve_fgetc_sub): Likewise.
3278 (gfc_resolve_fputc_sub): Likewise.
3279 (gfc_resolve_fseek_sub): Likewise.
3280 (gfc_resolve_ftell_sub): Likewise.
3281 (gfc_resolve_ttynam_sub): Likewise.
3282
3283 2008-02-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3284
3285 * gfc-internals.texi: Fix typos and markup nits.
3286 * gfortran.texi: Likewise.
3287 * intrinsic.texi: Likewise.
3288
3289 2008-02-21 Richard Guenther <rguenther@suse.de>
3290
3291 * trans-expr.c (gfc_conv_expr_op): Expand INTRINSIC_PARENTHESES
3292 as unary PAREN_EXPR for real and complex typed expressions.
3293 (gfc_conv_unary_op): Fold the built tree.
3294
3295 2008-02-20 Tobias Burnus <burnus@net-b.de>
3296
3297 PR fortran/34997
3298 * match.c (gfc_match_name): Improve error message for '$'.
3299
3300 2008-02-19 Daniel Franke <franke.daniel@gmail.com>
3301
3302 PR fortran/35030
3303 * expr.c (gfc_check_pointer_assign): Add type and kind information
3304 to type-mismatch message.
3305 (gfc_check_assign): Unify error messages.
3306
3307 2008-02-16 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3308
3309 PR fortran/34952
3310 * gfortran.texi: Create new section for unimplemented extensions.
3311 Add "STRUCTURE and RECORD" and "ENCODE and DECODE statements".
3312 Remove "smaller projects" list. Fix a few typos.
3313
3314 2008-02-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3315
3316 * intrinsic.texi: Rename INDEX node to avoid clashing with
3317 index.html on case-insensitive systems.
3318
3319 2008-02-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3320
3321 PR fortran/35150
3322 * trans-expr.c (gfc_conv_function_call): Force evaluation of
3323 se->expr.
3324
3325 2008-02-10 Daniel Franke <franke.daniel@gmail.com>
3326
3327 PR fortran/35019
3328 * lang.opt: Allow '-J<dir>' next to '-J <dir>',
3329 likewise '-I <dir>' and '-I<dir>'.
3330
3331 2008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3332
3333 PR other/35107
3334 * Make-lang.in (f951): Add $(GMPLIBS).
3335
3336 2008-02-05 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3337
3338 PR fortran/35037
3339 * trans-common.c (build_field): Mark fields as volatile when needed.
3340
3341 2008-02-05 Tobias Burnus <burnus@net-b.de>
3342
3343 PR fortran/35093
3344 * data.c (gfc_assign_data_value): Only free "size" if
3345 it has not already been freed.
3346
3347 2008-02-05 Paul Thomas <pault@gcc.gnu.org>
3348
3349 PR fortran/34945
3350 * array.c (match_array_element_spec): Remove check for negative
3351 array size.
3352 (gfc_resolve_array_spec): Add check for negative size.
3353
3354 2008-02-05 Paul Thomas <pault@gcc.gnu.org>
3355
3356 PR fortran/32315
3357 * data.c (gfc_assign_data_value): Add bounds check for array
3358 references.
3359
3360 2008-02-04 Daniel Franke <franke.daniel@gmail.com>
3361
3362 * resolve.c (resolve_where): Fix typo.
3363 (gfc_resolve_where_code_in_forall): Likewise.
3364
3365 2008-02-03 Paul Thomas <pault@gcc.gnu.org>
3366
3367 PR fortran/32760
3368 * resolve.c (resolve_allocate_deallocate): New function.
3369 (resolve_code): Call it for allocate and deallocate.
3370 * match.c (gfc_match_allocate, gfc_match_deallocate) : Remove
3371 the checking of the STAT tag and put in above new function.
3372 * primary,c (match_variable): Do not fix flavor of host
3373 associated symbols yet if the type is not known.
3374
3375 2008-01-31 Paul Thomas <pault@gcc.gnu.org>
3376
3377 PR fortran/34910
3378 * expr.c (gfc_check_assign): It is an error to assign
3379 to a sibling procedure.
3380
3381 2008-01-30 Paul Thomas <pault@gcc.gnu.org>
3382
3383 PR fortran/34975
3384 * symbol.c (gfc_delete_symtree, gfc_undo_symbols): Rename
3385 delete_symtree to gfc_delete_symtree.
3386 * gfortran.h : Add prototype for gfc_delete_symtree.
3387 * module.c (load_generic_interfaces): Transfer symbol to a
3388 unique symtree and delete old symtree, instead of renaming.
3389 (read_module): The rsym and the found symbol are the same, so
3390 the found symtree can be deleted.
3391
3392 PR fortran/34429
3393 * decl.c (match_char_spec): Remove the constraint on deferred
3394 matching of functions and free the length expression.
3395 delete_symtree to gfc_delete_symtree.
3396 (gfc_match_type_spec): Whitespace.
3397 (gfc_match_function_decl): Defer characteristic association for
3398 all types except BT_UNKNOWN.
3399 * parse.c (decode_specification_statement): Only derived type
3400 function matching is delayed to the end of specification.
3401
3402 2008-01-28 Tobias Burnus <burnus@net-b.de>
3403
3404 PR libfortran/34980
3405 * simplify.c (gfc_simplify_shape): Simplify rank zero arrays.
3406
3407 2008-01-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3408
3409 PR fortran/34990
3410 * array.c (gfc_check_constructor_type): Revert clearing the expression.
3411
3412 2008-01-26 Tobias Burnus <burnus@net-b.de>
3413
3414 PR fortran/34848
3415 * trans-expr.c (gfc_conv_function_call): Don't call
3416 gfc_add_interface_mapping if the expression is NULL.
3417
3418 2008-01-26 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3419
3420 PR fortran/31610
3421 * trans-array.c (gfc_trans_create_temp_array): Remove call to
3422 gcc_assert (integer_zerop (loop->from[n])).
3423
3424 2008-01-25 Daniel Franke <franke.daniel@gmail.com>
3425
3426 PR fortran/34661
3427 * resolve.c (resolve_where): Added check if user-defined assignment
3428 operator is an elemental subroutine.
3429 (gfc_resolve_where_code_in_forall): Likewise.
3430
3431 2008-01-24 Daniel Franke <franke.daniel@gmail.com>
3432
3433 PR fortran/33375
3434 PR fortran/34858
3435 * gfortran.h: Revert changes from 2008-01-17.
3436 * match.c: Likewise.
3437 * symbol.c: Likewise.
3438 (gfc_undo_symbols): Undo namespace changes related to common blocks.
3439
3440 2008-01-24 Daniel Franke <franke.daniel@gmail.com>
3441
3442 PR fortran/34202
3443 * data.c (formalize_structure_cons): Skip formalization on
3444 empty structures.
3445
3446 2008-01-24 Daniel Franke <franke.daniel@gmail.com>
3447
3448 * gfortran.texi (OpenMP): Extended existing documentation.
3449 (contributors): Added major contributors of 2008 that were
3450 not listed yet.
3451 (proposed extensions): Removed implemented items.
3452
3453 2008-01-24 Paul Thomas <pault@gcc.gnu.org>
3454
3455 PR fortran/34872
3456 * parse.c (next_statement) : If ST_GET_FCN_CHARACTERISTICS is
3457 seen, check for a statement label and, if present, delete it
3458 and set the locus to the start of the statement.
3459
3460 2008-01-22 Paul Thomas <pault@gcc.gnu.org>
3461
3462 PR fortran/34875
3463 * trans-io.c (gfc_trans_transfer): If the array reference in a
3464 read has a vector subscript, use gfc_conv_subref_array_arg to
3465 copy back the temporary.
3466
3467 2008-01-22 Tobias Burnus <burnus@net-b.de>
3468
3469 PR fortran/34848
3470 * interface.c (compare_actual_formal): Fix adding type
3471 to missing_arg_type for absent optional arguments.
3472
3473 2008-01-22 Tobias Burnus <burnus@net-b.de>
3474
3475 PR fortran/34907
3476 * parse.c (parse_spec): Change = into ==.
3477
3478 2008-01-22 Daniel Franke <franke.daniel@gmail.com>
3479
3480 PR fortran/34915
3481 * expr.c (check_elemental): Fix check for valid data types.
3482
3483 2008-01-22 Tobias Burnus <burnus@net-b.de>
3484
3485 PR fortran/34899
3486 * scanner.c (load_line): Support <tab><digit> continuation lines.
3487 * invoke.texi (-Wtabs): Document this.
3488
3489 2008-01-22 Paul Thomas <pault@gcc.gnu.org>
3490
3491 PR fortran/34896
3492 * module.c (read_module): Set use_rename attribute.
3493
3494 2007-01-21 Tobias Burnus <burnus@net-b.de>
3495
3496 PR fortran/34901
3497 * interface.c (compare_parameter): Improved error message
3498 for arguments of same type and mismatched kinds.
3499
3500 2008-01-20 Paul Thomas <pault@gcc.gnu.org>
3501
3502 PR fortran/34861
3503 * resolve.c (resolve_entries): Do not do an array bounds check
3504 if the result symbols are the same.
3505
3506 PR fortran/34854
3507 * module.c (read_module) : Hide the symtree of the previous
3508 version of the symbol if this symbol is renamed.
3509
3510 2008-01-20 Paul Thomas <pault@gcc.gnu.org>
3511
3512 PR fortran/34784
3513 * array.c (gfc_check_constructor_type): Clear the expression ts
3514 so that the checking starts from the deepest level of array
3515 constructor.
3516 * primary.c (match_varspec): If an unknown type is changed to
3517 default character and the attempt to match a substring fails,
3518 change it back to unknown.
3519
3520 PR fortran/34785
3521 * trans-array.c (gfc_add_loop_ss_code) : If ss->string_length is
3522 NULL for an array constructor, use the cl.length expression to
3523 build it.
3524 (gfc_conv_array_parameter): Change call to gfc_evaluate_now to
3525 a tree assignment.
3526
3527 2008-01-19 Thomas Koenig <tkoenig@gcc.gnu.org>
3528
3529 PR fortran/34817
3530 PR fortran/34838
3531 * iresolve.c (gfc_resolve_all): Remove conversion of mask
3532 argument to kind=1 by removing call to resolve_mask_arg().
3533 (gfc_resolve_any): Likewise.
3534
3535 2008-01-19 Tobias Burnus <burnus@net-b.de>
3536
3537 PR fortran/34760
3538 * primary.c (match_variable): Handle FL_UNKNOWN without
3539 uneducated guessing.
3540 (match_variable): Improve error message.
3541
3542 2008-01-18 Tobias Burnus <burnus@net-b.de>
3543
3544 PR fortran/32616
3545 * interface.c (get_expr_storage_size): Return storage size
3546 for array element designators.
3547 (compare_actual_formal): Reject unequal string sizes for
3548 assumed-shape dummy arguments. And fix error message for
3549 array-sections with vector subscripts.
3550
3551 2008-01-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3552
3553 PR fortran/34556
3554 * simplify.c (is_constant_array_expr): New static function that returns
3555 true if the given expression is an array and is constant.
3556 (gfc_simplify_reshape): Use new function.
3557
3558 2008-01-17 H.J. Lu <hongjiu.lu@intel.com>
3559
3560 PR fortran/33375
3561 * symbol.c (free_common_tree): Renamed to ...
3562 (gfc_free_common_tree): This. Remove static.
3563 (gfc_free_namespace): Updated.
3564
3565 * gfortran.h (gfc_free_common_tree): New.
3566
3567 * match.c (gfc_match_common): Call gfc_free_common_tree () with
3568 gfc_current_ns->common_root and set gfc_current_ns->common_root
3569 to NULL on syntax error.
3570
3571 2008-01-18 Richard Sandiford <rsandifo@nildram.co.uk>
3572
3573 PR fortran/34686
3574 * trans-expr.c (gfc_conv_function_call): Use proper
3575 type for returned character pointers.
3576
3577 2008-01-17 Paul Thomas <pault@gcc.gnu.org>
3578
3579 PR fortran/34429
3580 PR fortran/34431
3581 PR fortran/34471
3582 * decl.c : Remove gfc_function_kind_locus and
3583 gfc_function_type_locus. Add gfc_matching_function.
3584 (match_char_length): If matching a function and the length
3585 does not match, return MATCH_YES and try again later.
3586 (gfc_match_kind_spec): The same.
3587 (match_char_kind): The same.
3588 (gfc_match_type_spec): The same for numeric and derived types.
3589 (match_prefix): Rename as gfc_match_prefix.
3590 (gfc_match_function_decl): Except for function valued character
3591 lengths, defer applying kind, type and charlen info until the
3592 end of specification block.
3593 gfortran.h (gfc_statement): Add ST_GET_FCN_CHARACTERISTICS.
3594 parse.c (decode_specification_statement): New function.
3595 (decode_statement): Call it when a function has kind = -1. Set
3596 and reset gfc_matching function, as function statement is being
3597 matched.
3598 (match_deferred_characteristics): Simplify with a single call
3599 to gfc_match_prefix. Do appropriate error handling. In any
3600 case, make sure that kind = -1 is reset or corrected.
3601 (parse_spec): Call above on seeing ST_GET_FCN_CHARACTERISTICS.
3602 Throw an error if kind = -1 after last specification statement.
3603 parse.h : Prototype for gfc_match_prefix.
3604
3605 2008-01-16 Tobias Burnus <burnus@net-b.de>
3606
3607 PR fortran/34796
3608 * interface.c (compare_parameter): Allow AS_DEFERRED array
3609 elements and reject attr.pointer array elemenents.
3610 (get_expr_storage_size): Return storage size of elements of
3611 assumed-shape and pointer arrays.
3612
3613 2008-01-15 Sebastian Pop <sebastian.pop@amd.com>
3614
3615 * f95-lang.c (gfc_init_builtin_functions): Initialize GOMP builtins
3616 for flag_tree_parallelize_loops.
3617
3618 2008-01-15 Thomas Koenig <tkoenig@gcc.gnu.org>
3619
3620 PR libfortran/34671
3621 * iresolve.c (gfc_resolve_all): Call resolve_mask_arg.
3622 (gfc_resolve_any): Likewise.
3623 (gfc_resolve_count): Likewise. Don't append kind of
3624 argument to function name.
3625
3626 2008-01-13 Tobias Burnus <burnus@net-b.de>
3627
3628 PR fortran/34665
3629 * resolve.c (resolve_actual_arglist): For expressions,
3630 also check for assume-sized arrays.
3631 * interface.c (compare_parameter): Move F2003 character checks
3632 here, print error messages here, reject elements of
3633 assumed-shape array as argument to dummy arrays.
3634 (compare_actual_formal): Update for the changes above.
3635
3636 2008-01-13 Tobias Burnus <burnus@net-b.de>
3637
3638 PR fortran/34763
3639 * decl.c (contained_procedure): Only check directly preceeding state.
3640
3641 2008-01-13 Tobias Burnus <burnus@net-b.de>
3642
3643 PR fortran/34759
3644 * check.c (gfc_check_shape): Accept array ranges of
3645 assumed-size arrays.
3646
3647 2008-01-12 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3648
3649 PR fortran/34432
3650 * match.c (gfc_match_name): Don't error if leading character is a '(',
3651 just return MATCH_NO.
3652
3653 2008-01-11 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3654
3655 PR fortran/34722
3656 * trans-io.c (create_dummy_iostat): Commit the symbol.
3657
3658 2008-01-11 Paul Thomas <pault@gcc.gnu.org>
3659
3660 PR fortran/34537
3661 * simplify.c (gfc_simplify_transfer): Return NULL if the size
3662 of the element is unavailable and only assign character length
3663 to the result, if 'mold' is constant.
3664
3665 2008-01-10 Paul Thomas <pault@gcc.gnu.org>
3666
3667 PR fortran/34396
3668 * trans-array.c (gfc_trans_array_ctor_element): Use gfc_trans_string_copy
3669 to assign strings and perform bounds checks on the string length.
3670 (get_array_ctor_strlen): Remove bounds checking.
3671 (gfc_trans_array_constructor): Initialize string length checking.
3672 * trans-array.h : Add prototype for gfc_trans_string_copy.
3673
3674 2008-01-08 Richard Guenther <rguenther@suse.de>
3675
3676 PR fortran/34706
3677 PR tree-optimization/34683
3678 * trans-types.c (gfc_get_array_type_bounds): Use an array type
3679 with known size for accesses if that is known.
3680
3681 2008-01-08 Paul Thomas <pault@gcc.gnu.org>
3682
3683 PR fortran/34476
3684 * expr.c (find_array_element): Check that the array bounds are
3685 constant before using them. Use lower, as well as upper bound.
3686 (check_restricted): Allow implied index variable.
3687
3688 2008-01-08 Paul Thomas <pault@gcc.gnu.org>
3689
3690 PR fortran/34681
3691 * trans_array.c (gfc_trans_deferred_array): Do not null the
3692 data pointer on entering scope, nor deallocate it on leaving
3693 scope, if the symbol has the 'save' attribute.
3694
3695 PR fortran/34704
3696 * trans_decl.c (gfc_finish_var_decl): Derived types with
3697 allocatable components and an initializer must be TREE_STATIC.
3698
3699 2008-01-07 Paul Thomas <pault@gcc.gnu.org>
3700
3701 PR fortran/34672
3702 * module.c (write_generic): Rewrite completely.
3703 (write_module): Change call to write_generic.
3704
3705 2008-01-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3706
3707 PR fortran/34659
3708 * scanner.c (load_line): Do not count ' ' as printable when checking for
3709 continuations.
3710
3711 2008-01-06 Paul Thomas <pault@gcc.gnu.org>
3712
3713 PR fortran/34545
3714 * module.c (load_needed): If the namespace has no proc_name
3715 give it the module symbol.
3716
3717 2008-01-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3718
3719 PR fortran/34387
3720 * trans-expr.c (gfc_conv_missing_dummy): Use a temporary to type convert
3721 the dummy variable expression, test for NULL, and pass the variable
3722 address to the called function.
3723
3724 2007-01-06 Tobias Burnus <burnus@net-b.de>
3725
3726 PR fortran/34658
3727 * match.c (gfc_match_common): Remove blank common in
3728 DATA BLOCK warning.
3729 * resolve.c (resolve_common_vars): New function.
3730 (resolve_common_blocks): Move checks to resolve_common_vars
3731 and invoke that function.
3732 (resolve_types): Call resolve_common_vars for blank commons.
3733
3734 2008-01-06 Tobias Burnus <burnus@net-b.de>
3735
3736 PR fortran/34655
3737 * resolve.c (resolve_equivalence_derived): Reject derived types with
3738 default initialization if equivalenced with COMMON variable.
3739
3740 2008-01-06 Tobias Burnus <burnus@net-b.de>
3741
3742 PR fortran/34654
3743 * io.c (check_io_constraints): Disallow unformatted I/O for
3744 internal units.
3745
3746 2008-01-06 Tobias Burnus <burnus@net-b.de>
3747
3748 PR fortran/34660
3749 * resolve.c (resolve_formal_arglist): Reject dummy procedure in
3750 ELEMENTAL functions.
3751
3752 2008-01-06 Tobias Burnus <burnus@net-b.de>
3753
3754 PR fortran/34662
3755 * interface.c (compare_actual_formal): Reject parameter
3756 actual to intent(out) dummy.
3757
3758 2008-01-04 Tobias Burnus <burnus@net-b.de>
3759
3760 PR fortran/34557
3761 * primary.c (match_varspec): Gobble whitespace before
3762 checking for '('.
This page took 0.18202 seconds and 4 git commands to generate.