re PR fortran/36590 (internal error: Can't convert LOGICAL(1) to LOGICAL(1))
[gcc.git] / gcc / fortran / ChangeLog
1 2008-07-02 Thomas Koenig <tkoenig@gcc.gnu.org>
2
3 PR fortran/36590
4 PR fortran/36681
5 * iresolve.c (resolve_mask_arg): Don't convert mask to
6 kind=1 logical if it is of that type already.
7
8 2008-06-29 Thomas Koenig <tkoenig@gcc.gnu.org>
9
10 PR fortran/36341
11 * iresolve.c (gfc_resolve_matmul): Copy shapes
12 from arguments.
13
14 2008-06-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
15
16 * invoke.texi: Add documentation for runtime behavior of
17 -fno-range-check.
18
19 2008-06-28 Daniel Kraft <d@domob.eu>
20
21 * gfc-internals.texi (section gfc_code): Extended documentation about
22 gfc_code in the internal datastructures chapter including details about
23 how IF, DO and SELECT blocks look like and an example for how the
24 block-chaining works.
25
26 2008-06-25 Paul Thomas <pault@gcc.gnu.org>
27
28 PR fortran/36526
29 * interface.c (check_intents): Correct error where the actual
30 arg was checked for a pointer argument, rather than the formal.
31
32 2008-06-24 Paul Thomas <pault@gcc.gnu.org>
33
34 PR fortran/34371
35 * expr.c (gfc_check_assign): Change message and locus for
36 error when conform == 0.
37
38 2008-06-23 Jakub Jelinek <jakub@redhat.com>
39
40 PR fortran/36597
41 * cpp.c (cpp_define_builtins): Change _OPENMP value to 200805.
42
43 2008-06-20 Laurynas Biveinis <laurynas.biveinis@gmail.com>
44 Tobias Burnus <burnus@net-b.de>
45
46 PR fortran/34908
47 PR fortran/36276
48 * scanner.c (preprocessor_line): do not call gfc_free for
49 current_file->filename if it differs from filename.
50
51 2008-06-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
52
53 * arith.c (hollerith2representation): Fix for -Wc++-compat.
54 * array.c (gfc_get_constructor): Likewise.
55 * decl.c (gfc_get_data_variable, gfc_get_data_value, gfc_get_data,
56 create_enum_history, gfc_match_final_decl): Likewise.
57 * error.c (error_char): Likewise.
58 * expr.c (gfc_get_expr, gfc_copy_expr): Likewise.
59 * gfortran.h (gfc_get_charlen, gfc_get_array_spec,
60 gfc_get_component, gfc_get_formal_arglist, gfc_get_actual_arglist,
61 gfc_get_namelist, gfc_get_omp_clauses, gfc_get_interface,
62 gfc_get_common_head, gfc_get_dt_list, gfc_get_array_ref,
63 gfc_get_ref, gfc_get_equiv, gfc_get_case, gfc_get_iterator,
64 gfc_get_alloc, gfc_get_wide_string): Likewise.
65 * interface.c (count_types_test): Likewise.
66 * intrinsic.c (add_char_conversions, gfc_intrinsic_init_1):
67 Likewise.
68 * io.c (gfc_match_open, gfc_match_close, match_filepos, match_io,
69 gfc_match_inquire, gfc_match_wait): Likewise.
70 * match.c (gfc_match, match_forall_iterator): Likewise.
71 * module.c (gfc_get_pointer_info, gfc_get_use_rename, add_fixup,
72 add_true_name, parse_string, write_atom, quote_string,
73 mio_symtree_ref, mio_gmp_real, write_common_0): Likewise.
74 * options.c (gfc_post_options): Likewise.
75 * primary.c (match_integer_constant, match_hollerith_constant,
76 match_boz_constant, match_real_constant,
77 gfc_get_structure_ctor_component, gfc_match_structure_constructor): Likewise.
78 * scanner.c (gfc_widechar_to_char, add_path_to_list,
79 add_file_change, load_line, get_file, preprocessor_line,
80 load_file, unescape_filename, gfc_read_orig_filename): Likewise.
81 * simplify.c (gfc_simplify_ibits, gfc_simplify_ishft,
82 gfc_simplify_ishftc): Likewise.
83 * symbol.c (gfc_get_st_label, gfc_get_namespace, gfc_new_symtree,
84 gfc_get_uop, gfc_new_symbol, save_symbol_data, gfc_get_gsymbol):
85 Likewise.
86 * target-memory.c (gfc_target_interpret_expr): Likewise.
87 * trans-const.c (gfc_build_wide_string_const): Likewise.
88 * trans-expr.c (gfc_add_interface_mapping): Likewise.
89 * trans-intrinsic.c (gfc_conv_intrinsic_conversion,
90 gfc_conv_intrinsic_int, gfc_conv_intrinsic_lib_function,
91 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_ctime,
92 gfc_conv_intrinsic_fdate, gfc_conv_intrinsic_ttynam,
93 gfc_conv_intrinsic_minmax, gfc_conv_intrinsic_minmax_char,
94 gfc_conv_intrinsic_ishftc, gfc_conv_intrinsic_index_scan_verify,
95 gfc_conv_intrinsic_merge, gfc_conv_intrinsic_trim): Likewise.
96 * trans.c (gfc_get_backend_locus): Likewise.
97 * trans.h (gfc_get_ss): Likewise.
98
99 2008-06-18 Daniel Kraft <d@domob.eu>
100
101 PR fortran/36517, fortran/36492
102 * array.c (gfc_resolve_character_array_constructor): Call
103 gfc_set_constant_character_len with changed length-chec argument.
104 * decl.c (gfc_set_constant_character_len): Changed array argument to
105 be a generic length-checking argument that can be used for correct
106 checking with typespec and in special cases where the should-be length
107 is different from the target length.
108 (build_struct): Call gfc_set_constant_character_len with changed length
109 checking argument and introduced additional checks for exceptional
110 conditions on invalid code.
111 (add_init_expr_to_sym), (do_parm): Call gfc_set_constant_character_len
112 with changed argument.
113 * match.h (gfc_set_constant_character_len): Changed third argument to
114 int for the should-be length rather than bool.
115
116 2008-06-17 Daniel Kraft <d@domob.eu>
117
118 PR fortran/36112
119 * array.c (gfc_resolve_character_array_constructor): Check that all
120 elements with constant character length have the same one rather than
121 fixing it if no typespec is given, emit an error if they don't. Changed
122 return type to "try" and return FAILURE for the case above.
123 (gfc_resolve_array_constructor): Removed unneeded call to
124 gfc_resolve_character_array_constructor in this function.
125 * gfortran.h (gfc_resolve_character_array_constructor): Returns try.
126 * trans-array.c (get_array_ctor_strlen): Return length of first element
127 rather than last element.
128 * resolve.c (gfc_resolve_expr): Handle FAILURE return from
129 gfc_resolve_character_array_constructor.
130
131 2008-06-17 Paul Thomas <pault@gcc.gnu.org>
132
133 PR fortran/34396
134 * resolve.c (add_dt_to_dt_list): New function.
135 (resolve_fl_derived): Call new function for pointer components
136 and when derived type resolved.
137
138 2008-06-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
139
140 PR fortran/36515
141 * trans-decl.c (gfc_generate_function_code): Add range_check to options
142 array.
143
144 2008-06-15 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
145
146 * gfc-internals.texi: Expand TABs, drop indentation outside examples.
147 * gfortran.texi: Likewise.
148 * intrinsic.texi: Likewise.
149 * invoke.texi: Likewise.
150
151 2008-06-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
152
153 PR fortran/35863
154 * trans-io.c (gfc_build_io_library_fndecls): Build declaration for
155 transfer_character_wide which includes passing in the character kind to
156 support wide character IO. (transfer_expr): If the kind == 4, create the
157 argument and build the call.
158 * gfortran.texi: Fix typo.
159
160 2008-06-13 Tobias Burnus <burnus@net-b.de>
161
162 PR fortran/36476
163 * decl.c (do_parm): Handle init expression for len=*.
164
165 2008-06-12 Tobias Burnus <burnus@net-b.de>
166
167 PR fortran/36462
168 * trans-intrinsic.c (gfc_conv_intrinsic_index_scan_verify):
169 Fix passing of the BACK= argument.
170
171 2008-06-10 Jerry DeLisle <jvdelisle@gcc.gnu.org>
172
173 * cpp.c: Add copyright notice.
174 * cpp.h: Add copyright notice.
175
176 2008-06-08 Janus Weil <janus@gcc.gnu.org>
177
178 PR fortran/36459
179 * decl.c (match_procedure_decl): Correctly recognize if the interface
180 is an intrinsic procedure.
181
182 2008-06-08 Tobias Burnus <burnus@net-b.de>
183
184 PR fortran/35830
185 * resolve.c (resolve_symbol): Copy more attributes for
186 PROCEDUREs with interfaces.
187
188 2008-06-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
189
190 PR fortran/36420
191 PR fortran/36422
192 * io.c (check_format): Add new error message for zero width.
193 Use new error message for FMT_A and with READ, FMT_G. Allow
194 FMT_G with WRITE except when -std=F95 and -std=F2003.
195
196 2008-06-07 Tobias Burnus <burnus@net-b.de>
197
198 PR fortran/36437
199 * intrinsic.c (add_functions): Implement c_sizeof.
200 * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): Do not
201 create unneeded variable in the scalar case.
202 * intrinsic.texi: Add C_SIZEOF documentation.
203
204 2008-06-06 Tobias Burnus <burnus@net-b.de>
205
206 * intrinsic.texi (BESSEL_J1): Fix BES(S)EL_J1 typo.
207
208 2008-06-06 Jakub Jelinek <jakub@redhat.com>
209
210 * scanner.c (skip_free_comments, skip_fixed_comments): Handle tabs.
211 * parse.c (next_free): Allow tab after !$omp.
212 (decode_omp_directive): Handle !$omp task, !$omp taskwait
213 and !$omp end task.
214 (case_executable): Add ST_OMP_TASKWAIT.
215 (case_exec_markers): Add ST_OMP_TASK.
216 (gfc_ascii_statement): Handle ST_OMP_TASK, ST_OMP_END_TASK and
217 ST_OMP_TASKWAIT.
218 (parse_omp_structured_block, parse_executable): Handle ST_OMP_TASK.
219 * gfortran.h (gfc_find_sym_in_expr): New prototype.
220 (gfc_statement): Add ST_OMP_TASK, ST_OMP_END_TASK and ST_OMP_TASKWAIT.
221 (gfc_omp_clauses): Add OMP_SCHED_AUTO to sched_kind,
222 OMP_DEFAULT_FIRSTPRIVATE to default_sharing. Add collapse and
223 untied fields.
224 (gfc_exec_op): Add EXEC_OMP_TASK and EXEC_OMP_TASKWAIT.
225 * f95-lang.c (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
226 LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP, LANG_HOOKS_OMP_CLAUSE_DTOR,
227 LANG_HOOKS_OMP_PRIVATE_OUTER_REF): Define.
228 * trans.h (gfc_omp_clause_default_ctor): Add another argument.
229 (gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op,
230 gfc_omp_clause_dtor, gfc_omp_private_outer_ref): New prototypes.
231 * types.def (BT_ULONGLONG, BT_PTR_ULONGLONG,
232 BT_FN_BOOL_ULONGLONGPTR_ULONGLONGPTR,
233 BT_FN_BOOL_BOOL_ULL_ULL_ULL_ULLPTR_ULLPTR,
234 BT_FN_BOOL_BOOL_ULL_ULL_ULL_ULL_ULLPTR_ULLPTR,
235 BT_FN_VOID_PTR_PTR, BT_PTR_FN_VOID_PTR_PTR,
236 BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT): New.
237 (BT_BOOL): Use integer type with BOOL_TYPE_SIZE rather
238 than boolean_type_node.
239 * dump-parse-tree.c (gfc_show_omp_node): Handle EXEC_OMP_TASK,
240 EXEC_OMP_TASKWAIT, OMP_SCHED_AUTO, OMP_DEFAULT_FIRSTPRIVATE,
241 untied and collapse clauses.
242 (gfc_show_code_node): Handle EXEC_OMP_TASK and EXEC_OMP_TASKWAIT.
243 * trans.c (gfc_trans_code): Handle EXEC_OMP_TASK and
244 EXEC_OMP_TASKWAIT.
245 * st.c (gfc_free_statement): Likewise.
246 * resolve.c (gfc_resolve_blocks, resolve_code): Likewise.
247 (find_sym_in_expr): Rename to...
248 (gfc_find_sym_in_expr): ... this. No longer static.
249 (resolve_allocate_expr, resolve_ordinary_assign): Adjust caller.
250 * match.h (gfc_match_omp_task, gfc_match_omp_taskwait): New
251 prototypes.
252 * openmp.c (resolve_omp_clauses): Allow allocatable arrays in
253 firstprivate, lastprivate, reduction, copyprivate and copyin
254 clauses.
255 (omp_current_do_code): Made static.
256 (omp_current_do_collapse): New variable.
257 (gfc_resolve_omp_do_blocks): Compute omp_current_do_collapse,
258 clear omp_current_do_code and omp_current_do_collapse on return.
259 (gfc_resolve_do_iterator): Handle collapsed do loops.
260 (resolve_omp_do): Likewise, diagnose errorneous collapsed do loops.
261 (OMP_CLAUSE_COLLAPSE, OMP_CLAUSE_UNTIED): Define.
262 (gfc_match_omp_clauses): Handle default (firstprivate),
263 schedule (auto), untied and collapse (n) clauses.
264 (OMP_DO_CLAUSES): Add OMP_CLAUSE_COLLAPSE.
265 (OMP_TASK_CLAUSES): Define.
266 (gfc_match_omp_task, gfc_match_omp_taskwait): New functions.
267 * trans-openmp.c (gfc_omp_private_outer_ref): New function.
268 (gfc_omp_clause_default_ctor): Add outer argument. For allocatable
269 arrays allocate them with the bounds of the outer var if outer
270 var is allocated.
271 (gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op,
272 gfc_omp_clause_dtor): New functions.
273 (gfc_trans_omp_array_reduction): If decl is allocatable array,
274 allocate it with outer var's bounds in OMP_CLAUSE_REDUCTION_INIT
275 and deallocate it in OMP_CLAUSE_REDUCTION_MERGE.
276 (gfc_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
277 for assumed-size arrays.
278 (gfc_trans_omp_do): Add par_clauses argument. If dovar is
279 present in lastprivate clause and do loop isn't simple,
280 set OMP_CLAUSE_LASTPRIVATE_STMT. If dovar is present in
281 parallel's lastprivate clause, change it to shared and add
282 lastprivate clause to OMP_FOR_CLAUSES. Handle collapsed do loops.
283 (gfc_trans_omp_directive): Adjust gfc_trans_omp_do callers.
284 (gfc_trans_omp_parallel_do): Likewise. Move collapse clause to
285 OMP_FOR from OMP_PARALLEL.
286 (gfc_trans_omp_clauses): Handle OMP_SCHED_AUTO,
287 OMP_DEFAULT_FIRSTPRIVATE, untied and collapse clauses.
288 (gfc_trans_omp_task, gfc_trans_omp_taskwait): New functions.
289 (gfc_trans_omp_directive): Handle EXEC_OMP_TASK and
290 EXEC_OMP_TASKWAIT.
291
292 2008-06-04 Janus Weil <janus@gcc.gnu.org>
293
294 PR fortran/36322
295 PR fortran/36275
296 * resolve.c (resolve_symbol): Correctly copy the interface for a
297 PROCEDURE declaration.
298
299 2008-06-02 Janus Weil <janus@gcc.gnu.org>
300
301 PR fortran/36361
302 * symbol.c (gfc_add_allocatable,gfc_add_dimension,
303 gfc_add_explicit_interface): Added checks.
304 * decl.c (attr_decl1): Added missing "var_locus".
305 * parse.c (parse_interface): Checking for errors.
306
307 2008-06-02 Daniel Kraft <d@domob.eu>
308
309 * gfortran.h: New statement-type ST_FINAL for FINAL declarations.
310 (struct gfc_symbol): New member f2k_derived.
311 (struct gfc_namespace): New member finalizers, for use in the above
312 mentioned f2k_derived namespace.
313 (struct gfc_finalizer): New type defined for finalizers linked list.
314 * match.h (gfc_match_final_decl): New function header.
315 * decl.c (gfc_match_derived_decl): Create f2k_derived namespace on
316 constructed symbol node.
317 (gfc_match_final_decl): New function to match a FINAL declaration line.
318 * parse.c (decode_statement): match-call for keyword FINAL.
319 (parse_derived): Parse CONTAINS section and accept FINAL statements.
320 * resolve.c (gfc_resolve_finalizers): New function to resolve (that is
321 in this case, check) a list of finalizer procedures.
322 (resolve_fl_derived): Call gfc_resolve_finalizers here.
323 * symbol.c (gfc_get_namespace): Initialize new finalizers to NULL.
324 (gfc_free_namespace): Free finalizers list.
325 (gfc_new_symbol): Initialize new f2k_derived to NULL.
326 (gfc_free_symbol): Free f2k_derived namespace.
327 (gfc_free_finalizer): New function to free a single gfc_finalizer node.
328 (gfc_free_finalizer_list): New function to free a linked list of
329 gfc_finalizer nodes.
330
331 2008-06-02 Daniel Franke <franke.daniel@gmail.com>
332
333 PR fortran/36375
334 PR fortran/36377
335 * cpp.c (gfc_cpp_init): Do not initialize builtins if
336 processing already preprocessed input.
337 (gfc_cpp_preprocess): Finalize output with newline.
338
339 2008-05-31 Jerry DeLisle <jvdelisle@gcc.gnu.org>
340
341 * intrinsic.texi: Revert wrong commit.
342
343 2008-05-31 Steven G. Kargl <kargls@comcast.net>
344
345 * arith.c (gfc_arith_init_1): Remove now unused r and c variables.
346 Cleanup numerical inquiry function initialization.
347 (gfc_arith_done_1): Replace multiple mpfr_clear() invocations with
348 a single mpfr_clears().
349 (gfc_check_real_range): Re-arrange logic to eliminate multiple
350 unnecessary branching and assignments.
351 (gfc_arith_times): Use mpfr_clears() in preference to multiple
352 mpfr_clear().
353 (gfc_arith_divide): Ditto.
354 (complex_reciprocal): Eliminate now unused variables a, re, im.
355 Cleanup the mpfr abuse. Use mpfr_clears() in preference to
356 multiple mpfr_clear().
357 (complex_pow): Fix comment whitespace. Use mpfr_clears() in
358 preference to multiple mpfr_clear().
359 * simplify.c (gfc_simplify_and): Remove blank line.
360 (gfc_simplify_atan2): Move error checking earlier to eliminate
361 a now unnecessay gfc_free_expr().
362 (gfc_simplify_bessel_j0): Remove unnecessary gfc_set_model_kind().
363 (gfc_simplify_bessel_j1): Ditto.
364 (gfc_simplify_bessel_jn): Ditto.
365 (gfc_simplify_bessel_y0): Ditto.
366 (gfc_simplify_bessel_y1): Ditto.
367 (gfc_simplify_bessel_yn): Ditto.
368 (only_convert_cmplx_boz): Eliminate unnecessary duplicate code, and
369 combine nested if statement rational expressions.
370 (gfc_simplify_cos): Use mpfr_clears() in preference to multiple
371 mpfr_clear().
372 (gfc_simplify_exp): Ditto.
373 (gfc_simplify_fraction): Move gfc_set_model_kind() to after the
374 special case of 0. Use mpfr_clears() in preference to multiple
375 mpfr_clear().
376 (gfc_simplify_gamma): Eliminate unnecessary gfc_set_model_kind().
377 (gfc_simplify_lgamma): Ditto.
378 (gfc_simplify_log10): Ditto.
379 (gfc_simplify_log): Move gfc_set_model_kind () inside switch
380 statement. Use mpfr_clears() in preference to multiple mpfr_clear().
381 (gfc_simplify_mod): Eliminate now unused variables quot, iquot,
382 and term. Simplify the mpfr magic.
383 (gfc_simplify_modulo): Ditto.
384 (gfc_simplify_nearest): Eliminate unnecessary gfc_set_model_kind().
385 (gfc_simplify_scale): Use mpfr_clears() in preference to multiple
386 mpfr_clear().
387 (gfc_simplify_sin): Ditto
388 (gfc_simplify_sqrt): Ditto
389 (gfc_simplify_set_exponent): Move gfc_set_model_kind() to after the
390 special case of 0. Use mpfr_clears() in preference to multiple
391 mpfr_clear().
392
393 2008-05-29 Daniel Franke <franke.daniel@gmail.com>
394
395 PR target/36348
396 * Make-lang.in (F95_OBJS): Added dependency on FORTRAN_TARGET_OBJS.
397
398 2008-05-29 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
399
400 * scanner.c (load_line): Add first_char argument. Don't call ungetc.
401 (gfc_read_orig_filename): Adjust call to load_line. Don't call
402 ungetc.
403 (load_file): Adjust call to load_line.
404
405 2008-05-28 Janus Weil <janus@gcc.gnu.org>
406
407 PR fortran/36325
408 PR fortran/35830
409 * interface.c (gfc_procedure_use): Enable argument checking for
410 external procedures with explicit interface.
411 * symbol.c (check_conflict): Fix conflict checking for externals.
412 (copy_formal_args): Fix handling of arrays.
413 * resolve.c (resolve_specific_f0, resolve_specific_s0): Fix handling
414 of intrinsics.
415 * parse.c (parse_interface): Non-abstract INTERFACE statement implies
416 EXTERNAL attribute.
417
418 2008-05-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
419
420 PR fortran/36319
421 * intrinsic.c (gfc_convert_chartype): Don't mark conversion
422 function as pure.
423 * trans-array.c (gfc_trans_array_ctor_element): Divide element
424 size by the size of one character to obtain length.
425 * iresolve.c (gfc_resolve_cshift): Call the _char4 variant when
426 appropriate.
427 (gfc_resolve_eoshift): Likewise.
428 * trans-intrinsic.c (gfc_conv_intrinsic_ctime): Minor beautification.
429 (gfc_conv_intrinsic_fdate): Minor beautification.
430 (gfc_conv_intrinsic_ttynam): Minor beautification.
431 (gfc_conv_intrinsic_minmax_char): Allow all character kinds.
432 (size_of_string_in_bytes): New function.
433 (gfc_conv_intrinsic_size): Call size_of_string_in_bytes for
434 character expressions.
435 (gfc_conv_intrinsic_sizeof): Likewise.
436 (gfc_conv_intrinsic_array_transfer): Likewise.
437 (gfc_conv_intrinsic_trim): Allow all character kinds. Minor
438 beautification.
439 (gfc_conv_intrinsic_repeat): Fix comment typo.
440 * simplify.c (gfc_convert_char_constant): Take care of conversion
441 of array constructors.
442
443 2008-05-27 Tobias Burnus <burnus@net-b.de>
444
445 PR fortran/36316
446 * trans-array.c (gfc_set_loop_bounds_from_array_spec):
447 Add missing fold_convert.
448
449 2008-05-26 Daniel Franke <franke.daniel@gmail.com>
450
451 * fortran/cpp.c (cpp_define_builtins): Remove usage of TARGET_* macros,
452 added FIXME instead.
453
454 2008-05-26 Daniel Franke <franke.daniel@gmail.com>
455
456 PR fortran/18428
457 * lang.opt (A, C, CC, D, E, H, P, U, cpp, d, fworking-directory,
458 imultilib, iprefix, iquote, isysroot, isystem, nocpp, nostdinc,
459 o, undef, v): New options.
460 * options.c (gfc_init_options): Also initialize preprocessor
461 options.
462 (gfc_post_options): Also handle post-initialization of preprocessor
463 options.
464 (gfc_handle_option): Check if option is a preprocessor option.
465 If yes, let gfc_cpp_handle_option() handle the option.
466 * lang-specs.h: Reorganized to handle new options.
467 * scanner.c (gfc_new_file): Read temporary file instead of
468 input source if preprocessing is enabled.
469 * f95-lang.c (gfc_init): Initialize preprocessor.
470 (gfc_finish): Clean up preprocessor.
471 * cpp.c: New.
472 * cpp.h: New.
473 * Make-lang.in: Added new objects and dependencies.
474 * gfortran.texi: Updated section "Preprocessing and
475 conditional compilation".
476 * invoke.texi: Added new section "Preprocessing Options",
477 listed and documented the preprocessing options handled
478 by gfortran.
479
480 2008-05-25 Tobias Burnus <burnus@net-b.de>
481
482 PR fortran/32600
483 * trans-expr.c (gfc_conv_function_call): Remove library
484 call for c_f_pointer with scalar Fortran pointers and for
485 c_f_procpointer.
486
487 2008-05-21 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
488
489 PR fortran/36257
490 * iresolve.c (check_charlen_present): Don't force the rank to 1.
491
492 2008-05-19 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
493
494 PR fortran/36265
495 * trans-expr.c (gfc_conv_string_tmp): Pick the correct type for
496 the temporary variable.
497
498 2008-05-19 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
499
500 * simplify.c (gfc_simplify_dble, gfc_simplify_real): Initialize
501 result variable to avoid warnings.
502
503 2008-05-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
504
505 * intrinsic.c (char_conversions, ncharconv): New static variables.
506 (find_char_conv): New function.
507 (add_functions): Add simplification functions for ADJUSTL and
508 ADJUSTR. Don't check the kind of their argument. Add checking for
509 LGE, LLE, LGT and LLT.
510 (add_subroutines): Fix argument type for SLEEP. Fix argument name
511 for SYSTEM.
512 (add_char_conversions): New function.
513 (gfc_intrinsic_init_1): Call add_char_conversions.
514 (gfc_intrinsic_done_1): Free char_conversions.
515 (check_arglist): Use kind == 0 as a signal that we don't want
516 the kind value to be checked.
517 (do_simplify): Also simplify character functions.
518 (gfc_convert_chartype): New function
519 * trans-array.c (gfc_trans_array_ctor_element): Don't force the
520 use of default character type.
521 (gfc_trans_array_constructor_value): Likewise.
522 (get_array_ctor_var_strlen): Use integer kind to build an integer
523 instead of a character kind!
524 (gfc_build_constant_array_constructor): Don't force the use of
525 default character type.
526 (gfc_conv_loop_setup): Likewise.
527 * trans-expr.c (gfc_conv_string_tmp): Don't force the use of
528 default character type. Allocate enough memory for wide strings.
529 (gfc_conv_concat_op): Make sure operand kind are the same.
530 (string_to_single_character): Remove gfc_ prefix. Reindent.
531 Don't force the use of default character type.
532 (gfc_conv_scalar_char_value): Likewise.
533 (gfc_build_compare_string): Call string_to_single_character.
534 (fill_with_spaces): New function
535 (gfc_trans_string_copy): Add kind arguments. Use them to deal
536 with wide character kinds.
537 (gfc_conv_statement_function): Whitespace fix. Call
538 gfc_trans_string_copy with new kind arguments.
539 (gfc_conv_substring_expr): Call gfc_build_wide_string_const
540 instead of using gfc_widechar_to_char.
541 (gfc_conv_string_parameter): Don't force the use of default
542 character type.
543 (gfc_trans_scalar_assign): Pass kind args to gfc_trans_string_copy.
544 * intrinsic.h (gfc_check_lge_lgt_lle_llt, gfc_convert_char_constant,
545 gfc_resolve_adjustl, gfc_resolve_adjustr): New prototypes.
546 * decl.c (gfc_set_constant_character_len): Don't assert the
547 existence of a single character kind.
548 * trans-array.h (gfc_trans_string_copy): New prototype.
549 * gfortran.h (gfc_check_character_range, gfc_convert_chartype):
550 New prototypes.
551 * error.c (print_wide_char_into_buffer): New function lifting
552 code from gfc_print_wide_char. Fix order to output '\x??' instead
553 of 'x\??'.
554 (gfc_print_wide_char): Call print_wide_char_into_buffer.
555 (show_locus): Call print_wide_char_into_buffer with buffer local
556 to this function.
557 * trans-const.c (gfc_build_wide_string_const): New function.
558 (gfc_conv_string_init): Deal with wide characters strings
559 constructors.
560 (gfc_conv_constant_to_tree): Call gfc_build_wide_string_const.
561 * trans-stmt.c (gfc_trans_label_assign): Likewise.
562 (gfc_trans_character_select): Deal with wide strings.
563 * expr.c (gfc_check_assign): Allow conversion between character
564 kinds on assignment.
565 * trans-const.h (gfc_build_wide_string_const): New prototype.
566 * trans-types.c (gfc_get_character_type_len_for_eltype,
567 gfc_get_character_type_len): Create too variants of the old
568 gfc_get_character_type_len, one getting kind argument and the
569 other one directly taking a type tree.
570 * trans.h (gfor_fndecl_select_string_char4,
571 gfor_fndecl_convert_char1_to_char4,
572 gfor_fndecl_convert_char4_to_char1): New prototypes.
573 * trans-types.h (gfc_get_character_type_len_for_eltype): New
574 prototype.
575 * resolve.c (resolve_operator): Exit early when kind mismatches
576 are detected, because that makes us issue an error message later.
577 (validate_case_label_expr): Fix wording of error message.
578 * iresolve.c (gfc_resolve_adjustl, gfc_resolve_adjustr): New
579 functions.
580 (gfc_resolve_pack): Call _char4 variants of library function
581 when dealing with wide characters.
582 (gfc_resolve_reshape): Likewise.
583 (gfc_resolve_spread): Likewise.
584 (gfc_resolve_transpose): Likewise.
585 (gfc_resolve_unpack): Likewise.
586 * target-memory.c (size_character): Take character kind bit size
587 correctly into account (not that it changes anything for now, but
588 it's more generic).
589 (gfc_encode_character): Added gfc_ prefix. Encoding each
590 character of a string by calling native_encode_expr for the
591 corresponding unsigned integer.
592 (gfc_target_encode_expr): Add gfc_ prefix to encode_character.
593 * trans-decl.c (gfc_build_intrinsic_function_decls): Build
594 gfor_fndecl_select_string_char4, gfor_fndecl_convert_char1_to_char4
595 and gfor_fndecl_convert_char4_to_char1.
596 * target-memory.h (gfc_encode_character): New prototype.
597 * arith.c (gfc_check_character_range): New function.
598 (eval_intrinsic): Allow non-default character kinds.
599 * check.c (gfc_check_access_func): Only allow default
600 character kind arguments.
601 (gfc_check_chdir): Likewise.
602 (gfc_check_chdir_sub): Likewise.
603 (gfc_check_chmod): Likewise.
604 (gfc_check_chmod_sub): Likewise.
605 (gfc_check_lge_lgt_lle_llt): New function.
606 (gfc_check_link): Likewise.
607 (gfc_check_link_sub): Likewise.
608 (gfc_check_symlnk): Likewise.
609 (gfc_check_symlnk_sub): Likewise.
610 (gfc_check_rename): Likewise.
611 (gfc_check_rename_sub): Likewise.
612 (gfc_check_fgetputc_sub): Likewise.
613 (gfc_check_fgetput_sub): Likewise.
614 (gfc_check_stat): Likewise.
615 (gfc_check_stat_sub): Likewise.
616 (gfc_check_date_and_time): Likewise.
617 (gfc_check_ctime_sub): Likewise.
618 (gfc_check_fdate_sub): Likewise.
619 (gfc_check_gerror): Likewise.
620 (gfc_check_getcwd_sub): Likewise.
621 (gfc_check_getarg): Likewise.
622 (gfc_check_getlog): Likewise.
623 (gfc_check_hostnm): Likewise.
624 (gfc_check_hostnm_sub): Likewise.
625 (gfc_check_ttynam_sub): Likewise.
626 (gfc_check_perror): Likewise.
627 (gfc_check_unlink): Likewise.
628 (gfc_check_unlink_sub): Likewise.
629 (gfc_check_system_sub): Likewise.
630 * primary.c (got_delim): Perform correct character range checking
631 for all kinds.
632 * trans-intrinsic.c (gfc_conv_intrinsic_conversion): Generate
633 calls to library functions convert_char4_to_char1 and
634 convert_char1_to_char4 for character conversions.
635 (gfc_conv_intrinsic_char): Allow all character kings.
636 (gfc_conv_intrinsic_strcmp): Fix whitespace.
637 (gfc_conv_intrinsic_repeat): Take care of all character kinds.
638 * intrinsic.texi: For all GNU intrinsics accepting character
639 arguments, mention that they're restricted to the default kind.
640 * simplify.c (simplify_achar_char): New function.
641 (gfc_simplify_achar, gfc_simplify_char): Call simplify_achar_char.
642 gfc_simplify_ichar): Don't error out for wide characters.
643 (gfc_convert_char_constant): New function.
644
645 2008-05-18 Steven G. Kargl <kargls@comcast.net>
646
647 PR fortran/36251
648 * symbol.c (check_conflict): Issue errors for abuse of PUBLIC, PRIVATE,
649 and BIND(C).
650 * resolve.c (gfc_verify_binding_labels): Fix NULL pointer dereference.
651
652 2008-05-17 Tobias Burnus <burnus@net-b.de>
653
654 * intrinsic.texi: Correct description of GET_COMMAND_ARGUMENT
655 and GET_ENVIRONMENT_VARIABLE; fix keyword= name for GETENV,
656 GETLOG, GMTIME, HOSTNM, IRAND, ITIME, KILL.
657 Move LOG_GAMMA after LOG10.
658
659 2008-05-17 Tobias Burnus <burnus@net-b.de>
660
661 * intrinsic.c (add_functions): Change FLUSH(C) to FLUSH(UNIT).
662 * intrinsic.texi: Change INTEGER(*) to INTEGER; fix keyword= name for
663 ABS, ADJUSTL, AINT, ALLOCATED, ANINT, ASSOCIATED, C_ASSOCIATED,
664 CEILING, DBLE, DFLOAT, DOT_PRODUCT, DREAL, FLOAT, FLOOR, GET_COMMAND.
665
666 2008-05-16 Paul Thomas <pault@gcc.gnu.org>
667
668 PR fortran/35756
669 PR fortran/35759
670 * trans-stmt.c (gfc_trans_where): Tighten up the dependency
671 check for calling gfc_trans_where_3.
672
673 PR fortran/35743
674 * trans-stmt.c (gfc_trans_where_2): Set the mask size to zero
675 if it is calculated to be negative.
676
677 PR fortran/35745
678 * trans-stmt.c (gfc_trans_where_3, gfc_trans_where_assign): Set
679 ss->where for scalar right hand sides.
680 * trans-array.c (gfc_add_loop_ss_code): If ss->where is set do
681 not evaluate scalars outside the loop. Clean up whitespace.
682 * trans.h : Add a bitfield 'where' to gfc_ss.
683
684 2008-05-16 Tobias Burnus <burnus@net-b.de>
685
686 * libgfortran.h: Increase GFC_MAX_DIMENSIONS to 15.
687 * array.c (gfc_match_array_spec): Error with -std=f2003 if rank > 7.
688
689 2008-04-16 Daniel Kraft <d@domob.eu>
690
691 PR fortran/27997
692 * gfortran.h: Added field "length_from_typespec" to gfc_charlength.
693 * aray.c (gfc_match_array_constructor): Added code to parse typespec.
694 (check_element_type, check_constructor_type, gfc_check_constructor_type):
695 Extended to support explicit typespec on constructor.
696 (gfc_resolve_character_array_constructor): Pad strings correctly for
697 explicit, constant character length.
698 * trans-array.c: New static global variable "typespec_chararray_ctor"
699 (gfc_trans_array_constructor): New code to support explicit but dynamic
700 character lengths.
701
702 2008-05-16 Jerry DeLisle <jvdelisle@gcc.gnu.org>
703
704 PR fortran/34325
705 * decl.c (match_attr_spec): Check for matching pairs of parenthesis.
706 * expr.c (gfc_specification_expr): Supplement the error message with the
707 type that was found.
708 * resolve.c (gfc_resolve_index): Likewise.
709 * match.c (gfc_match_parens): Clarify error message with "at or before".
710 (gfc_match_do): Check for matching pairs of parenthesis.
711
712 2008-05-16 Tobias Burnus <burnus@net-b.de
713
714 * intrinsic.texi: Write Fortran 77/90/95 instead of F77/90/95;
715 add missing KIND argument to ACHAR and NINT; and state that
716 the KIND argument is a F2003 extension for ACHAR, COUNT, IACHAR,
717 ICHAR, INDEX, LBOUND, LEN, LEN_TRIM, SCAN, SIZE, UBOUND, VERIFY.
718
719 2008-05-16 Daniel Kraft <d@domob.eu>
720
721 * primary.c: New private structure "gfc_structure_ctor_component".
722 (gfc_free_structure_ctor_component): New helper function.
723 (gfc_match_structure_constructor): Extended largely to support named
724 arguments and default initialization for structure constructors.
725
726 2008-05-15 Steven G. Kargl <kargls@comcast.net>
727
728 * simplify.c (gfc_simplify_dble, gfc_simplify_float,
729 simplify_bound, gfc_simplify_nearest, gfc_simplify_real): Plug
730 possible memory leaks.
731 (gfc_simplify_reshape): Plug possible memory leaks and dereferencing
732 of NULL pointers.
733
734 2008-05-15 Steven G. Kargl <kargls@comcast.net>
735
736 PR fortran/36239
737 * simplify.c (gfc_simplify_int, gfc_simplify_intconv): Replaced hand
738 rolled integer conversion with gfc_int2int, gfc_real2int, and
739 gfc_complex2int.
740 (gfc_simplify_intconv): Renamed to simplify_intconv.
741
742 2008-05-15 Steven G. Kargl, <kargl@comcast.net>
743 * gfortran.dg/and_or_xor.f90: New test
744
745 * fortran/simplify.c (gfc_simplify_and, gfc_simplify_or,
746 gfc_simplify_xor): Don't range check logical results.
747
748 2008-05-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
749
750 * trans-expr.c (gfc_conv_concat_op): Take care of nondefault
751 character kinds.
752 (gfc_build_compare_string): Add kind argument and use it.
753 (gfc_conv_statement_function): Fix indentation.
754 * gfortran.h (gfc_character_info): New structure.
755 (gfc_character_kinds): New array.
756 * trans-types.c (gfc_character_kinds, gfc_character_types,
757 gfc_pcharacter_types): New array.
758 (gfc_init_kinds): Fill character kinds array.
759 (validate_character): Take care of nondefault character kinds.
760 (gfc_build_uint_type): New function.
761 (gfc_init_types): Take care of nondefault character kinds.
762 (gfc_get_char_type, gfc_get_pchar_type): New functions.
763 (gfc_get_character_type_len): Use gfc_get_char_type.
764 * trans.h (gfc_build_compare_string): Adjust prototype.
765 (gfor_fndecl_compare_string_char4, gfor_fndecl_concat_string_char4,
766 gfor_fndecl_string_len_trim_char4, gfor_fndecl_string_index_char4,
767 gfor_fndecl_string_scan_char4, gfor_fndecl_string_verify_char4,
768 gfor_fndecl_string_trim_char4, gfor_fndecl_string_minmax_char4,
769 gfor_fndecl_adjustl_char4, gfor_fndecl_adjustr_char4): New
770 prototypes.
771 * trans-types.h (gfc_get_char_type, gfc_get_pchar_type): New
772 prototypes.
773 * trans-decl.c (gfor_fndecl_compare_string_char4,
774 gfor_fndecl_string_len_trim_char4, gfor_fndecl_string_index_char4,
775 gfor_fndecl_string_scan_char4, gfor_fndecl_string_verify_char4,
776 gfor_fndecl_string_trim_char4, gfor_fndecl_string_minmax_char4,
777 gfor_fndecl_adjustl_char4, gfor_fndecl_adjustr_char4,
778 gfor_fndecl_concat_string_char4): New function decls.
779 (gfc_build_intrinsic_function_decls): Define new *_char4 function
780 decls.
781 * trans-intrinsic.c (gfc_conv_intrinsic_minmax_char,
782 gfc_conv_intrinsic_len_trim, gfc_conv_intrinsic_ichar,
783 gfc_conv_intrinsic_strcmp, gfc_conv_intrinsic_trim,
784 gfc_conv_intrinsic_function): Deal with nondefault character kinds.
785
786 2008-05-15 Sa Liu <saliu@de.ibm.com>
787
788 * iso-c-binding.def: Add standard parameter to macro NAMED_INTCST.
789 All existing NAMED_INTCST definitions has standard GFC_STD_F2003,
790 c_int128_t, c_int_least128_t and c_int_fast128_t are added as
791 GNU extensions.
792 * iso-fortran-evn.def: Add standard parameter GFC_STD_F2003
793 to macro NAMED_INTCST.
794 * symbol.c (std_for_isocbinding_symbol): New helper function to
795 return the standard that supports this isocbinding symbol.
796 (generate_isocbinding_symbol): Do not generate GNU extension symbols
797 if std=f2003. Add new parameter to NAMED_INTCST.
798 * module.c (use_iso_fortran_env_module): Add new parameter to
799 NAMED_INTCST and new field standard to struct intmod_sym.
800 * gfortran.h: Add new parameter to NAMED_INTCST.
801 * trans-types.c (init_c_interop_kinds): Add new parameter to
802 NAMED_INTCST.
803 * intrinsic.texi: Documented new types C_INT128_T, C_INT_LEASE128_T
804 and C_INT_FAST128_T.
805
806 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
807
808 PR fortran/36059
809 * trans-decl.c (gfc_build_dummy_array_decl): Don't repack
810 arrays that have the TARGET attribute.
811
812 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
813
814 PR fortran/36186
815 * simplify.c (only_convert_cmplx_boz): New function.
816 (gfc_simplify_cmplx, gfc_simplify_complex, gfc_simplify_dcmplx):
817 Call only_convert_cmplx_boz.
818
819 2008-05-14 Paul Thomas <pault@gcc.gnu.org>
820
821 PR fortran/36233
822 * interface.c (compare_actual_formal): Do not check sizes if the
823 actual is BT_PROCEDURE.
824
825 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
826
827 PR fortran/35682
828 * trans-array.c (gfc_conv_ss_startstride): Any negative size is
829 the same as zero size.
830 (gfc_conv_loop_setup): Fix size calculation.
831
832 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
833
834 PR fortran/35685
835 * trans-intrinsic.c (gfc_conv_intrinsic_bound): Correctly
836 handle zero-size sections.
837
838 2008-05-14 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
839
840 PR fortran/36215
841 * scanner.c (preprocessor_line): Allocate enough memory for a
842 wide string.
843
844 2008-05-12 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
845
846 PR fortran/36176
847 * target-memory.c (gfc_target_expr_size): Correctly treat
848 substrings.
849 (gfc_target_encode_expr): Likewise.
850 (gfc_interpret_complex): Whitespace change.
851
852 2008-05-11 Thomas Koenig <tkoenig@gcc.gnu.org>
853
854 PR fortran/35719
855 * trans.c (gfc_call_malloc): If size equals zero, allocate one
856 byte; don't return a null pointer.
857
858 2008-05-10 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
859
860 PR fortran/36197
861 * module.c (quote_string): Fix sprintf format.
862
863 2008-05-09 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
864
865 PR fortran/36162
866 * module.c (quote_string, unquote_string,
867 mio_allocated_wide_string): New functions.
868 (mio_expr): Call mio_allocated_wide_string where needed.
869
870 2008-05-07 Kenneth Zadeck <zadeck@naturalbridge.com>
871
872 * trans-decl.c (gfc_get_extern_function_decl, build_function_decl):
873 Rename DECL_IS_PURE to DECL_PURE_P.
874
875 2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
876
877 * arith.c: (gfc_arith_concat, gfc_compare_string,
878 gfc_compare_with_Cstring, hollerith2representation,
879 gfc_hollerith2int, gfc_hollerith2real, gfc_hollerith2complex,
880 gfc_hollerith2character, gfc_hollerith2logical): Use wide
881 characters for character constants.
882 * data.c (create_character_intializer): Likewise.
883 * decl.c (gfc_set_constant_character_len): Likewise.
884 * dump-parse-tree.c (show_char_const): Correctly dump wide
885 character strings.
886 error.c (print_wide_char): Rename into gfc_print_wide_char.
887 (show_locus): Adapt to new prototype of gfc_print_wide_char.
888 expr.c (free_expr0): Representation is now disjunct from
889 character string value, so we always free it.
890 (gfc_copy_expr, find_substring_ref, gfc_simplify_expr): Adapt
891 to wide character strings.
892 * gfortran.h (gfc_expr): Make value.character.string a wide string.
893 (gfc_wide_toupper, gfc_wide_strncasecmp, gfc_wide_memset,
894 gfc_widechar_to_char, gfc_char_to_widechar): New prototypes.
895 (gfc_get_wide_string): New macro.
896 (gfc_print_wide_char): New prototype.
897 * io.c (format_string): Make a wide string.
898 (next_char, gfc_match_format, compare_to_allowed_values,
899 gfc_match_open): Deal with wide strings.
900 * module.c (mio_expr): Convert between wide strings and ASCII ones.
901 * primary.c (match_hollerith_constant, match_charkind_name):
902 Handle wide strings.
903 * resolve.c (build_default_init_expr): Likewise.
904 * scanner.c (gfc_wide_toupper, gfc_wide_memset,
905 gfc_char_to_widechar): New functions.
906 (wide_strchr, gfc_widechar_to_char, gfc_wide_strncasecmp):
907 Changes in prototypes.
908 (gfc_define_undef_line, load_line, preprocessor_line,
909 include_line, load_file, gfc_read_orig_filename): Handle wide
910 strings.
911 * simplify.c (gfc_simplify_achar, gfc_simplify_adjustl,
912 gfc_simplify_adjustr, gfc_simplify_char, gfc_simplify_iachar,
913 gfc_simplify_ichar, simplify_min_max, gfc_simplify_new_line,
914 gfc_simplify_repeat): Handle wide strings.
915 (wide_strspn, wide_strcspn): New helper functions.
916 (gfc_simplify_scan, gfc_simplify_trim, gfc_simplify_verify):
917 Handle wide strings.
918 * symbol.c (generate_isocbinding_symbol): Likewise.
919 * target-memory.c (size_character, gfc_target_expr_size,
920 encode_character, gfc_target_encode_expr, gfc_interpret_character,
921 gfc_target_interpret_expr): Handle wide strings.
922 * trans-const.c (gfc_conv_string_init): Lower wide strings to
923 narrow ones.
924 (gfc_conv_constant_to_tree): Likewise.
925 * trans-expr.c (gfc_conv_substring_expr): Handle wide strings.
926 * trans-io.c (gfc_new_nml_name_expr): Likewise.
927 * trans-stmt.c (gfc_trans_label_assign): Likewise.
928
929 2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
930
931 * simplify.c (gfc_simplify_bessel_j0,gfc_simplify_bessel_j1,
932 gfc_simplify_bessel_jn,gfc_simplify_bessel_y0,
933 gfc_simplify_bessel_y1,gfc_simplify_bessel_yn): Mark arguments
934 with ATTRIBUTE_UNUSED.
935
936 2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
937
938 * check.c (gfc_check_sizeof): Switch to ATTRIBUTE_UNUSED.
939 * simplify.c (gfc_simplify_lgamma): Likewise.
940
941 2008-05-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
942
943 * openmp.c (gfc_match_omp_eos): Use gfc_next_ascii_char and
944 gfc_peek_ascii_char.
945 * decl.c (gfc_match_kind_spec, gfc_match_type_spec,
946 gfc_match_implicit_none, match_implicit_range, gfc_match_implicit,
947 match_string_p, match_attr_spec, gfc_match_suffix,
948 match_procedure_decl, gfc_match_entry, gfc_match_subroutine):
949 Likewise.
950 * gfortran.h (gfc_char_t): New type.
951 (gfc_linebuf): Make line member a gfc_char_t.
952 (locus): Make nextc member a gfc_char_t.
953 (gfc_wide_is_printable, gfc_wide_is_digit, gfc_wide_fits_in_byte,
954 gfc_wide_tolower, gfc_wide_strlen, gfc_next_ascii_char,
955 gfc_peek_ascii_char, gfc_check_digit): New prototypes.
956 * error.c (print_wide_char): New function.
957 (show_locus): Use print_wide_char and gfc_wide_strlen.
958 * io.c (next_char): Use gfc_char_t type.
959 (match_io): Use gfc_peek_ascii_char and gfc_next_ascii_char.
960 * match.c (gfc_match_parens, gfc_match_eos,
961 gfc_match_small_literal_int, gfc_match_name, gfc_match_name_C,
962 gfc_match_intrinsic_op, gfc_match_char, gfc_match_return,
963 gfc_match_common): Likewise.
964 * match.h (gfc_match_special_char): Change prototype.
965 * parse.c (decode_specification_statement, decode_statement,
966 decode_omp_directive, next_free, next_fixed): Use
967 gfc_peek_ascii_char and gfc_next_ascii_char.
968 * primary.c (gfc_check_digit): Change name.
969 (match_digits, match_hollerith_constant, match_boz_constant,
970 match_real_constant, next_string_char, match_charkind_name,
971 match_string_constant, match_logical_constant_string,
972 match_complex_constant, match_actual_arg, match_varspec,
973 gfc_match_rvalue, match_variable): Use gfc_peek_ascii_char and
974 gfc_next_ascii_char.
975 * scanner.c (gfc_wide_fits_in_byte, wide_is_ascii,
976 gfc_wide_is_printable, gfc_wide_tolower, gfc_wide_is_digit,
977 gfc_wide_is_digit, wide_atoi, gfc_wide_strlen, wide_strcpy,
978 wide_strchr, widechar_to_char, wide_strncmp, wide_strncasecmp,
979 gfc_next_ascii_char, gfc_peek_ascii_char):
980 New functions.
981 (next_char, gfc_define_undef_line, skip_free_comments,
982 gfc_next_char_literal, gfc_next_char, gfc_peek_char,
983 gfc_error_recovery, load_line, preprocessor_line, include_line,
984 load_file, gfc_read_orig_filename): Use gfc_char_t for source
985 characters and the {gfc_,}wide_* functions to manipulate wide
986 strings.
987
988 2008-05-06 Tobias Burnus <burnus@net-b.de>
989
990 PR fortran/36117
991 * intrinsic.c (add_functions): Call gfc_simplify_bessel_*.
992 * intrinsic.h: Add prototypes for gfc_simplify_bessel_*.
993 * simplify.c (gfc_simplify_bessel_j0,gfc_simplify_bessel_j1,
994 gfc_simplify_bessel_jn,gfc_simplify_bessel_y0,
995 gfc_simplify_bessel_y1,gfc_simplify_bessel_yn): New.
996
997 2008-05-03 Janus Weil <jaydub66@gmail.com>
998
999 * misc.c (gfc_clear_ts): Set interface to NULL.
1000
1001 2008-05-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1002
1003 PR fortran/33268
1004 * gfortran.h: Add extra_comma pointer to gfc_dt structure. Add iokind to
1005 gfc_expr value union. Add io_kind enum to here from io.c.
1006 * io.c (gfc_free_dt): Free extra_comma.
1007 (gfc_resolve_dt): If an extra comma was encountered and io_unit is type
1008 BT_CHARACTER, resolve to format_expr and set default unit. Error if
1009 io_kind is M_WRITE. (match_io): Match the extra comma and set new
1010 pointer, extra_comma.
1011
1012 2008-05-01 Bud Davis <bdavis9659@sbcglobal.net>
1013
1014 PR35940/Fortran
1015 * simplify.c (gfc_simplify_index): Check for direction argument
1016 being a constant.
1017
1018 2008-05-01 Janus Weil <jaydub66@gmail.com>
1019
1020 * gfortran.h (struct gfc_symbol): Moving "interface" member to
1021 gfc_typespec (plus fixing a small docu error).
1022 * interface.c (gfc_procedure_use): Ditto.
1023 * decl.c (match_procedure_decl): Ditto.
1024 * resolve.c (resolve_specific_f0,
1025 resolve_specific_f0, resolve_symbol): Ditto.
1026
1027 2008-04-30 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1028
1029 * intrinsic.c (add_functions): Add SELECTED_CHAR_KIND intrinsic.
1030 * intrinsic.h (gfc_check_selected_char_kind,
1031 gfc_simplify_selected_char_kind): New prototypes.
1032 * gfortran.h (gfc_isym_id): Add GFC_ISYM_SC_KIND.
1033 * trans.h (gfor_fndecl_sc_kind): New function decl.
1034 * trans-decl.c (gfor_fndecl_sc_kind): Build new decl.
1035 * arith.c (gfc_compare_with_Cstring): New function.
1036 * arith.h (gfc_compare_with_Cstring): New prototype.
1037 * check.c (gfc_check_selected_char_kind): New function.
1038 * primary.c (match_string_constant, match_kind_param): Mark
1039 symbols used as literal constant kind param as referenced.
1040 * trans-intrinsic.c (gfc_conv_intrinsic_sc_kind): New function.
1041 (gfc_conv_intrinsic_function): Call gfc_conv_intrinsic_sc_kind.
1042 * intrinsic.texi (SELECTED_CHAR_KIND): Document new intrinsic.
1043 * simplify.c (gfc_simplify_selected_char_kind): New function.
1044
1045 2008-04-28 Paul Thomas <pault@gcc.gnu.org>
1046
1047 PR fortran/35997
1048 * module.c (find_symbol): Do not return a result for a symbol
1049 that has been renamed in another module.
1050
1051 2008-04-26 George Helffrich <george@gcc.gnu.org>
1052
1053 PR fortran/35892
1054 PR fortran/35154
1055 * trans-common.c (create_common): Add decl to function
1056 chain (if inside one) to preserve identifier scope in debug output.
1057
1058 2008-04-25 Jan Hubicka <jh@suse.cz>
1059
1060 * trans-decl.c (trans_function_start): Update.
1061
1062 2008-04-25 Tobias Burnus <burnus@net-b.de>
1063 Daniel Franke <franke.daniel@gmail.com>
1064
1065 PR fortran/35156
1066 * gfortranspec.c (lang_specific_driver): Deprecate
1067 -M option; fix ICE when "-M" is last argument and
1068 make "-M<dir>" work.
1069 * options.c (gfc_handle_module_path_options):
1070 Use -J instead of -M in error messages.
1071 * invoke.texi: Mark -M as depecated.
1072
1073 2008-04-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1074 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1075
1076 PR fortran/35994
1077 * trans-instrinsic.c (gfc_conv_intrinsic_minmaxloc): Correctly adjust
1078 loop counter offset.
1079
1080 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
1081
1082 * trans-expr.c (gfc_conv_structure): Don't set TREE_INVARIANT.
1083 * trans-array.c (gfc_build_null_descriptor): Don't set TREE_INVARIANT.
1084 (gfc_trans_array_constructor_value): Don't set TREE_INVARIANT.
1085 (gfc_build_constant_array_constructor): Don't set TREE_INVARIANT.
1086 (gfc_conv_array_initializer): Don't set TREE_INVARIANT.
1087 * trans-common.c (get_init_field): Don't set TREE_INVARIANT.
1088 (create_common): Don't set TREE_INVARIANT.
1089 * trans-stmt.c (gfc_trans_character_select): Don't set TREE_INVARIANT.
1090 * trans-decl.c (gfc_generate_function_code): Don't set TREE_INVARIANT.
1091
1092 2008-04-21 Steve Ellcey <sje@cup.hp.com>
1093
1094 * f95-lang.c (gfc_init_decl_processing): use ptr_mode instead of Pmode.
1095
1096 2008-04-21 Daniel Franke <franke.daniel@gmail.com>
1097
1098 PR fortran/35019
1099 * gfortranspec.c (lookup_option): Properly handle separated arguments
1100 in -J option, print missing argument message when necessary.
1101
1102 2008-04-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1103
1104 PR fortran/35882
1105 * scanner.c (skip_fixed_comments): Update continue_line when comment is
1106 detected. (gfc_next_char_literal): Likewise.
1107
1108 2008-04-19 Paul Thomas <pault@gcc.gnu.org>
1109
1110 PR fortran/35944
1111 PR fortran/35946
1112 PR fortran/35947
1113 * trans_array.c (gfc_trans_array_constructor): Temporarily
1114 realign loop, if loop->from is not zero, before creating
1115 the temporary array and provide an offset.
1116
1117 PR fortran/35959
1118 * trans-decl.c (gfc_init_default_dt): Add gfc_ prefix to name
1119 and allow for NULL body. Change all references from
1120 init_default_dt to gfc_init_default_dt.
1121 * trans.h : Add prototype for gfc_init_default_dt.
1122 * trans-array.c (gfc_trans_deferred_vars): After nullification
1123 call gfc_init_default_dt for derived types with allocatable
1124 components.
1125
1126 2008-04-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1127
1128 PR fortran/35892
1129 * trans-common.c (create_common): Revert patch causing regression.
1130
1131 2008-04-16 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1132
1133 PR fortran/35724
1134 * iresolve.c (gfc_resolve_eoshift): Check for NULL symtree in test for
1135 optional argument attribute.
1136
1137 2008-04-16 Paul Thomas <pault@gcc.gnu.org>
1138
1139 PR fortran/35932
1140 * trans-intrinsic.c (gfc_conv_intrinsic_char): Even though KIND
1141 is not used, the argument must be converted.
1142
1143 2008-04-16 Jakub Jelinek <jakub@redhat.com>
1144
1145 PR target/35662
1146 * f95-lang.c (gfc_init_builtin_functions): Make sure
1147 BUILT_IN_SINCOS{,F,L} types aren't varargs.
1148
1149 2008-04-15 Paul Thomas <pault@gcc.gnu.org>
1150
1151 PR fortran/35864
1152 * expr.c (scalarize_intrinsic_call): Reorder identification of
1153 array argument so that if one is not found a segfault does not
1154 occur. Return FAILURE if all scalar arguments.
1155
1156 2008-04-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1157 Tobias Burnus <burnus@net-b.de>
1158
1159 PR fortran/35882
1160 * options.c (gfc_init_options): Set the default maximum continuation
1161 lines to 255 for both free and fixed form source for warnings.
1162 (gfc_handle_option): Set -std=f95 fixed form max continuations to 19 and
1163 the -std=f95 free form max continuations to 39 for warnings.
1164 * scanner.c (gfc_next_char_literal): Adjust the current_line number only
1165 if it is less than the current locus.
1166
1167 2008-04-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1168
1169 PR fortran/25829 28655
1170 * io.c (io_tag): Add new tags for decimal, encoding, asynchronous,
1171 round, sign, and id. (match_open_element): Match new tags.
1172 (gfc_resolve_open): Resolve new tags. (gfc_match_open): Enable encoding
1173 for DEFAULT only. Update error messages. (match_dt_element): Fix match
1174 tag for asynchronous. Update error messages. (gfc_free_inquire): Free
1175 new expressions. (match_inquire_element): Match new tags.
1176 (gfc_match_inquire): Add constraint for ID and PENDING.
1177 (gfc_resolve_inquire): Resolve new tags.
1178 * trans-io.c (gfc_trans_inquire): Clean up whitespace and fix setting of
1179 mask for ID parameter.
1180 * ioparm.def: Fix order of parameters for pending, round, and sign.
1181 NOTE: These must line up with the definitions in libgfortran/io/io.h. or
1182 things don't work.
1183
1184 2008-04-06 Paul Thomas <pault@gcc.gnu.org>
1185
1186 PR fortran/35780
1187 * expr.c (scalarize_intrinsic_call): Identify which argument is
1188 an array and use that as the template.
1189 (check_init_expr): Remove tests that first argument is an array
1190 in the call to scalarize_intrinsic_call.
1191
1192 2008-04-06 Tobias Schlüter <tobi@gcc.gnu.org>
1193
1194 PR fortran/35832
1195 * io.c (io_tag): Add field 'value'. Split 'spec' field in
1196 existing io_tags.
1197 (match_etag, match_vtag, match_ltag): Split parsing in two steps
1198 to give better error messages.
1199
1200 2008-04-06 Tobias Burnus <burnus@net-b.de>
1201
1202 * io.c (check_io_constraints): Add constrains. ID= requires
1203 asynchronous= and asynchronous= must be init expression.
1204
1205 2008-04-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1206
1207 * f95-lang.c: Set LANG_HOOKS_NAME to "GNU Fortran".
1208
1209 2008-04-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1210
1211 * dump-parse-tree.c: Use fprintf, fputs and fputc instead of
1212 gfc_status and gfc_status_char. Remove gfc_ prefix of the gfc_show_*
1213 functions and make them static. Add new gfc_dump_parse_tree
1214 function.
1215 * gfortran.h (gfc_option_t): Rename verbose into dump_parse_tree.
1216 (gfc_status, gfc_status_char): Delete prototypes.
1217 * error.c (gfc_status, gfc_status_char): Remove functions.
1218 * scanner.c (gfc_new_file): Use printf instead of gfc_status.
1219 * options.c (gfc_init_options): Rename verbose into dump_parse_tree.
1220 (gfc_handle_module_path_options): Use gfc_fatal_error instead of
1221 gfc_status and exit.
1222 (gfc_handle_option): Rename verbose into dump_parse_tree.
1223 * parse.c (gfc_parse_file): Use gfc_dump_parse_tree.
1224
1225 2008-04-05 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1226 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1227
1228 PR fortran/25829 28655
1229 * dump-parse-tree.c (gfc_show_code_node): Show new I/O parameters.
1230 * gfortran.h (gfc_statement): Add ST_WAIT enumerator.
1231 (gfc_open): Add pointers for decimal, encoding, round, sign,
1232 asynchronous. (gfc_inquire): Add pointers for asynchronous, decimal,
1233 encoding, pending, round, sign, size, id.
1234 (gfc_wait): New typedef struct. (gfc_dt): Add pointers for id, pos,
1235 asynchronous, blank, decimal, delim, pad, round, sign.
1236 (gfc_exec_op): Add EXEC_WAIT enumerator. (gfc_code): Add pointer for
1237 wait. (gfc_free_wait), (gfc_resolve_wait): New function prototypes.
1238 * trans-stmt.h (gfc_trans_wait): New function prototype.
1239 * trans.c (gfc_trans_code): Add case for EXEC_WAIT.
1240 * io.c (io_tag): Add new tags for DECIMAL, ENCODING, ROUND, SIGN,
1241 ASYCHRONOUS, ID. (match_open_element): Add matchers for new tags.
1242 (gfc_free_open): Free new pointers. (gfc_resolve_open): Resolve new
1243 tags. (gfc_resolve_open): Remove comment around check for allowed
1244 values and ASYNCHRONOUS, update it. Likewise for DECIMAL, ENCODING,
1245 ROUND, and SIGN. (match_dt_element): Add matching for new tags.
1246 (gfc_free_wait): New function. (gfc_resolve_wait): New function.
1247 (match_wait_element): New function. (gfc_match_wait): New function.
1248 * resolve.c (gfc_resolve_blocks): Add case for EXEC_WAIT.
1249 (resolve_code): Add case for EXEC_WAIT.
1250 * st.c (gfc_free_statement): Add case for EXEC_WAIT.
1251 * trans-io.c (ioparam_type): Add IOPARM_ptype_wait. (gfc_st_parameter):
1252 Add "wait" entry. (iocall): Add IOCALL_WAIT enumerator.
1253 (gfc_build_io_library_fndecls): Add function declaration for st_wait.
1254 (gfc_trans_open): Add mask bits for new I/O tags.
1255 (gfc_trans_inquire): Add mask bits for new I/O tags.
1256 (gfc_trans_wait): New translation function.
1257 (build_dt): Add mask bits for new I/O tags.
1258 * match.c (gfc_match_if) Add matcher for "wait".
1259 * match.h (gfc_match_wait): Prototype for new function.
1260 * ioparm.def: Add new I/O parameter definitions.
1261 * parse.c (decode_statement): Add match for "wait" statement.
1262 (next_statement): Add case for ST_WAIT. (gfc_ascii_statement): Same.
1263
1264 2008-04-03 Jakub Jelinek <jakub@redhat.com>
1265
1266 PR fortran/35786
1267 * openmp.c (resolve_omp_clauses): Diagnose if a clause symbol
1268 isn't a variable.
1269
1270 2008-04-03 Tom Tromey <tromey@redhat.com>
1271
1272 * Make-lang.in (fortran_OBJS): New variable.
1273
1274 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
1275
1276 * f95-lang.c (insert_block): Kill.
1277
1278 2008-04-01 George Helffrich <george@gcc.gnu.org>
1279
1280 PR fortran/35154, fortran/23057
1281 * trans-common.c (create_common): Add decl to function
1282 chain to preserve identifier scope in debug output.
1283
1284 2008-04-01 Joseph Myers <joseph@codesourcery.com>
1285
1286 * gfortran.texi: Include gpl_v3.texi instead of gpl.texi
1287 * Make-lang.in (GFORTRAN_TEXI): Include gpl_v3.texi instead of
1288 gpl.texi.
1289
1290 2008-03-30 Paul Thomas <pault@gcc.gnu.org>
1291
1292 PR fortran/35740
1293 * resolve.c (resolve_function, resolve_call): If the procedure
1294 is elemental do not look for noncopying intrinsics.
1295
1296 2008-03-29 Paul Thomas <pault@gcc.gnu.org>
1297
1298 PR fortran/35698
1299 * trans-array.c (gfc_array_init_size): Set 'size' zero if
1300 negative in one dimension.
1301
1302 PR fortran/35702
1303 * trans-expr.c (gfc_trans_string_copy): Only assign a char
1304 directly if the lhs and rhs types are the same.
1305
1306 2008-03-28 Daniel Franke <franke.daniel@gmail.com>
1307 Paul Richard Thomas <paul.richard.thomas@gmail.com>
1308
1309 PR fortran/34714
1310 * primary.c (match_variable): Improved matching of function
1311 result variables.
1312 * resolve.c (resolve_allocate_deallocate): Removed checks if
1313 the actual argument for STAT is a variable.
1314
1315 2008-03-28 Tobias Burnus <burnus@net-b.de>
1316
1317 * symbol.c (gfc_get_default_type): Fix error message; option
1318 -fallow_leading_underscore should be -fallow-leading-underscore
1319
1320 2008-03-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1321
1322 PR fortran/35724
1323 * iresolve.c (gfc_resolve_cshift): Check for NULL symtree in test for
1324 optional argument attribute.
1325
1326 2008-03-27 Tom Tromey <tromey@redhat.com>
1327
1328 * Make-lang.in: Revert automatic dependency patch.
1329
1330 2008-03-25 Tom Tromey <tromey@redhat.com>
1331
1332 * Make-lang.in: Remove .o targets.
1333 (fortran_OBJS): New variable.
1334 (fortran/gfortranspec.o): Move to fortran/. Reduce to variable
1335 setting.
1336 (GFORTRAN_D_OBJS): Update.
1337 (GFORTRAN_TRANS_DEPS): Remove.
1338
1339 2008-03-24 Paul Thomas <pault@gcc.gnu.org>
1340
1341 PR fortran/34813
1342 * resolve.c (resolve_structure_cons): It is an error to assign
1343 NULL to anything other than a pointer or allocatable component.
1344
1345 PR fortran/33295
1346 * resolve.c (resolve_symbol): If the symbol is a derived type,
1347 resolve the derived type. If the symbol is a derived type
1348 function, ensure that the derived type is visible in the same
1349 namespace as the function.
1350
1351 2008-03-23 Tobias Schlüter <tobi@gcc.gnu.org>
1352
1353 * trans.h: Use fold_build in build1_v, build2_v and build3_v
1354 macros.
1355 * trans-openmp.c (gfc_trans_omp_critical, gfc_trans_omp_single):
1356 Don't use build2_v macro.
1357
1358 2008-03-19 Daniel Franke <franke.daniel@gmail.com>
1359
1360 PR fortran/35152
1361 * interface.c (gfc_procedure_use): Check for keyworded arguments in
1362 procedures without explicit interfaces.
1363
1364 2008-03-16 Paul Thomas <pault@gcc.gnu.org>
1365
1366 PR fortran/35470
1367 * resolve.c (check_assumed_size_reference): Only visit the
1368 first reference and look directly at the highest dimension.
1369
1370 2008-03-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1371
1372 PR fortran/35184
1373 * trans-array.c (gfc_conv_array_index_offset): Remove unnecessary
1374 assert.
1375
1376 2008-03-15 Daniel Franke <franke.daniel@gmail.com>
1377
1378 PR fortran/35584
1379 * resolve.c (resolve_branch): Less strict and pessimistic warning
1380 message.
1381
1382 2008-03-11 Paolo Bonzini <bonzini@gnu.org>
1383
1384 * f95-lang.c (LANG_HOOKS_CLEAR_BINDING_STACK): Delete.
1385 (gfc_be_parse_file): Call clear_binding_stack from here.
1386 (gfc_clear_binding_stack): Rename to clear_binding_stack.
1387
1388 2008-03-09 Paul Thomas <pault@gcc.gnu.org>
1389
1390 PR fortran/35474
1391 * module.c (mio_symtree_ref): After providing a symbol for a
1392 missing equivalence member, resolve and NULL the fixups.
1393
1394 2008-03-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1395
1396 * invoke.texi (Error and Warning Options): Document
1397 -Wline-truncation.
1398
1399 2008-03-08 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1400
1401 PR fortran/34956
1402 * trans-array.c (gfc_conv_ss_startstride): Fix the logic to avoid
1403 checking bounds of absent optional arguments.
1404
1405 2008-03-06 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1406
1407 PR fortran/33197
1408 * intrinsic.c (add_functions): Add simplification routines for
1409 ERF, DERF, ERFC and DERFC.
1410 * decl.c (gfc_match_suffix, gfc_match_subroutine): Change GNU
1411 extensions into Fortran 2008 features.
1412 * intrinsic.h (gfc_simplify_erf, gfc_simplify_erfc): New
1413 prototypes.
1414 * simplify.c (gfc_simplify_erf, gfc_simplify_erfc): New functions.
1415
1416 2008-03-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1417
1418 PR fortran/33197
1419 * intrinsic.c (add_functions): Modify intrinsics ACOSH, ASINH,
1420 ATANH, ERF, ERFC and GAMMA. Add intrinsics BESSEL_{J,Y}{0,1,N},
1421 ERFC_SCALED, LOG_GAMMA and HYPOT.
1422 * intrinsic.h (gfc_check_hypot, gfc_simplify_hypot,
1423 gfc_resolve_hypot): New prototypes.
1424 * mathbuiltins.def: Add HYPOT builtin. Make complex versions of
1425 ACOSH, ASINH and ATANH available.
1426 * gfortran.h (GFC_ISYM_ERFC_SCALED, GFC_ISYM_HYPOT): New values.
1427 * lang.opt: Add -std=f2008 option.
1428 * libgfortran.h: Define GFC_STD_F2008.
1429 * lang-specs.h: Add .f08 and .F08 file suffixes.
1430 * iresolve.c (gfc_resolve_hypot): New function.
1431 * parse.c (parse_contained): Allow empty CONTAINS for Fortran 2008.
1432 * check.c (gfc_check_hypot): New function.
1433 * trans-intrinsic.c (gfc_intrinsic_map): Define ERFC_SCALE builtin.
1434 * options.c (set_default_std_flags): Allow Fortran 2008 by default.
1435 (form_from_filename): Add .f08 suffix.
1436 (gfc_handle_option): Handle -std=f2008 option.
1437 * simplify.c (gfc_simplify_hypot): New function.
1438 * gfortran.texi: Document Fortran 2008 status and file extensions.
1439 * intrinsic.texi: Document new BESSEL_{J,Y}{0,1,N} intrinsics,
1440 as well as HYPOT and ERFC_SCALED. Update documentation of ERF,
1441 ERFC, GAMMA, LGAMMA, ASINH, ACOSH and ATANH.
1442 * invoke.texi: Document the new -std=f2008 option.
1443
1444 2008-03-02 Jakub Jelinek <jakub@redhat.com>
1445
1446 * gfortranspec.c (lang_specific_driver): Update copyright notice
1447 dates.
1448
1449 2008-02-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1450
1451 PR fortran/35059
1452 * expr.c (find_array_element): Modify traversing the constructor to
1453 avoid trying to access NULL memory pointed to by next for the
1454 last element. (find_array_section): Exit while loop if cons->next is
1455 NULL.
1456 * trans-expr.c (gfc_conv_scalar_char_value): Initialize gfc_typespec.
1457 (gfc_conv_function_call): Same.
1458 * decl.c (gfc_match_implicit): Same.
1459 * trans-intrinsic.c (gfc_conv_intrinsic_sr_kind): Same.
1460
1461 2008-02-28 Daniel Franke <franke.daniel@gmail.com>
1462
1463 PR fortran/31463
1464 PR fortran/33950
1465 PR fortran/34296
1466 * lang.opt: Added -Wreturn-type.
1467 * options.c (gfc_handle_option): Recognize -Wreturn-type.
1468 * trans-decl.c (gfc_trans_deferred_vars): Emit warnings for funtions
1469 where the result value is not set.
1470 (gfc_generate_function_code): Likewise.
1471 (generate_local_decl): Emit warnings for funtions whose RESULT
1472 variable is not set.
1473
1474 2008-02-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1475
1476 PR fortran/34868
1477 * trans-expr.c (gfc_conv_variable): Don't build indirect
1478 references when explicit interface is mandated.
1479 * resolve.c (resolve_formal_arglist): Set attr.always_explicit
1480 on the result symbol as well as the procedure symbol.
1481
1482 2008-02-27 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1483
1484 PR fortran/33387
1485 * trans.h: Remove prototypes for gfor_fndecl_math_exponent4,
1486 gfor_fndecl_math_exponent8, gfor_fndecl_math_exponent10 and
1487 gfor_fndecl_math_exponent16.
1488 * f95-lang.c (build_builtin_fntypes): Add new function types.
1489 (gfc_init_builtin_functions): Add new builtins for nextafter,
1490 frexp, ldexp, fabs, scalbn and inf.
1491 * iresolve.c (gfc_resolve_rrspacing): Don't add hidden arguments.
1492 (gfc_resolve_scale): Don't convert type of second argument.
1493 (gfc_resolve_set_exponent): Likewise.
1494 (gfc_resolve_size): Don't add hidden arguments.
1495 * trans-decl.c: Remove gfor_fndecl_math_exponent4,
1496 gfor_fndecl_math_exponent8, gfor_fndecl_math_exponent10 and
1497 gfor_fndecl_math_exponent16.
1498 * trans-intrinsic.c (gfc_intrinsic_map): Remove intrinsics
1499 for scalbn, fraction, nearest, rrspacing, set_exponent and
1500 spacing.
1501 (gfc_conv_intrinsic_exponent): Directly call frexp.
1502 (gfc_conv_intrinsic_fraction, gfc_conv_intrinsic_nearest,
1503 gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_rrspacing,
1504 gfc_conv_intrinsic_scale, gfc_conv_intrinsic_set_exponent): New
1505 functions.
1506 (gfc_conv_intrinsic_function): Use the new functions above.
1507
1508 2008-02-26 Tobias Burnus <burnus@net-b.de>
1509
1510 PR fortran/35033
1511 * interface.c (check_operator_interface): Show better line for error
1512 messages; fix constrains for user-defined assignment operators.
1513 (gfc_extend_assign): Fix constrains for user-defined assignment
1514 operators.
1515
1516 2008-02-26 Tom Tromey <tromey@redhat.com>
1517
1518 * trans-io.c (set_error_locus): Remove old location code.
1519 * trans-decl.c (gfc_set_decl_location): Remove old location code.
1520 * f95-lang.c (gfc_init): Remove test of USE_MAPPED_LOCATION.
1521 * scanner.c (gfc_gobble_whitespace): Remove old location code.
1522 (get_file): Likewise.
1523 (preprocessor_line): Likewise.
1524 (load_file): Likewise.
1525 (gfc_new_file): Likewise.
1526 * trans.c (gfc_trans_runtime_check): Remove old location code.
1527 (gfc_get_backend_locus): Likewise.
1528 (gfc_set_backend_locus): Likewise.
1529 * data.c (gfc_assign_data_value): Remove old location code.
1530 * error.c (show_locus): Remove old location code.
1531 * gfortran.h (gfc_linebuf): Remove old location code.
1532 (gfc_linebuf_linenum): Remove old-location variant.
1533
1534 2008-02-25 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1535
1536 PR fortran/34729
1537 * trans-const.c (gfc_build_string_const): Don't call gettext.
1538 (gfc_build_localized_string_const): New function.
1539 * trans-const.h (gfc_build_localized_string_const): New prototype.
1540 * trans.c (gfc_trans_runtime_check): Use
1541 gfc_build_localized_string_const instead of gfc_build_string_const.
1542 (gfc_call_malloc): Likewise.
1543 (gfc_allocate_with_status): Likewise.
1544 (gfc_allocate_array_with_status): Likewise.
1545 (gfc_deallocate_with_status): Likewise.
1546 (gfc_call_realloc): Likewise.
1547 * trans-io.c (gfc_trans_io_runtime_check): Likewise.
1548
1549 2008-02-24 Tobias Schlüter <tobi@gcc.gnu.org>
1550
1551 * arith.c: Update copyright years.
1552 * arith.h: Likewise.
1553 * array.c: Likewise.
1554 * bbt.c: Likewise.
1555 * check.c: Likewise.
1556 * data.c: Likewise.
1557 * data.h: Likewise.
1558 * decl.c: Likewise.
1559 * dependency.c: Likewise.
1560 * dependency.h: Likewise.
1561 * dump-parse-tree.c: Likewise.
1562 * error.c: Likewise.
1563 * expr.c: Likewise.
1564 * gfc-internals.texi: Likewise.
1565 * gfortran.h: Likewise.
1566 * gfortran.texi: Likewise.
1567 * gfortranspec.c: Likewise.
1568 * interface.c: Likewise.
1569 * intrinsic.c: Likewise.
1570 * intrinsic.h: Likewise.
1571 * intrinsic.texi: Likewise.
1572 * invoke.texi: Likewise.
1573 * io.c: Likewise.
1574 * iresolve.c: Likewise.
1575 * iso-c-binding.def: Likewise.
1576 * iso-fortran-env.def: Likewise.
1577 * lang-specs.h: Likewise.
1578 * lang.opt: Likewise.
1579 * libgfortran.h: Likewise.
1580 * match.c: Likewise.
1581 * match.h: Likewise.
1582 * matchexp.c: Likewise.
1583 * misc.c: Likewise.
1584 * module.c: Likewise.
1585 * openmp.c: Likewise.
1586 * options.c: Likewise.
1587 * parse.c: Likewise.
1588 * parse.h: Likewise.
1589 * primary.c: Likewise.
1590 * resolve.c: Likewise.
1591 * scanner.c: Likewise.
1592 * simplify.c: Likewise.
1593 * st.c: Likewise.
1594 * symbol.c: Likewise.
1595 * target-memory.c: Likewise.
1596 * target-memory.h: Likewise.
1597 * trans-array.h: Likewise.
1598 * trans-const.h: Likewise.
1599 * trans-stmt.h: Likewise.
1600 * trans-types.c: Likewise.
1601 * trans-types.h: Likewise.
1602 * types.def: Likewise.
1603
1604 2008-02-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1605
1606 PR fortran/35223
1607 * simplify.c (gfc_simplify_ibclr), (gfc_simplify_ibits),
1608 (gfc_simplify_ibset): Remove call to range_check.
1609 (simplify_cmplx), (gfc_simplify_dble), (gfc_simplify_float)
1610 (gfc_simplify_real): Add call gfc_clear_ts to initialize the
1611 temporary gfc_typspec variable.
1612
1613 2008-02-24 Tobias Schlüter <tobi@gcc.gnu.org>
1614
1615 * trans-array.c (gfc_conv_descriptor_data_get,
1616 gfc_conv_descriptor_data_set_internal,
1617 gfc_conv_descriptor_data_addr, gfc_conv_descriptor_offset,
1618 gfc_conv_descriptor_dtype, gfc_conv_descriptor_dimension,
1619 gfc_conv_descriptor_stride, gfc_conv_descriptor_lbound,
1620 gfc_conv_descriptor_ubound, gfc_trans_create_temp_array,
1621 gfc_conv_array_transpose, gfc_grow_array,
1622 gfc_trans_array_constructor_subarray,
1623 gfc_trans_array_constructor_value, gfc_trans_scalarized_loop_end,
1624 gfc_array_init_size, gfc_array_allocate, gfc_array_deallocate,
1625 gfc_conv_array_initializer, gfc_trans_array_bounds,
1626 gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
1627 gfc_get_dataptr_offset, gfc_conv_array_parameter,
1628 gfc_trans_dealloc_allocated, get_full_array_size,
1629 gfc_duplicate_allocatable, structure_alloc_comps): Use fold_buildN
1630 instead of buildN.
1631 * trans-expr.c (gfc_conv_expr_present, gfc_conv_missing_dummy,
1632 gfc_conv_component_ref, gfc_conv_cst_int_power,
1633 gfc_conv_function_call, gfc_trans_structur_assign): Likewise.
1634 * trans-common.c (create_common): Likewise.
1635 * trans-openmp.c (gfc_trans_omp_atomic, gfc_trans_omp_do):
1636 Likewise.
1637 * trans-const.c (gfc_conv_constant_to_tree): Likewise.
1638 * trans-stmt.c (gfc_trans_goto, gfc_trans_return, gfc_trans_do,
1639 gfc_trans_integer_select, gfc_trans_character_select,
1640 gfc_trans_forall_loop, compute_overall_iter_number,
1641 gfc_trans_forall_1, gfc_evaluate_where_mask, gfc_trans_allocate,
1642 gfc_trans_deallocate): Likewise.
1643 * trans.c (gfc_build_addr_expr, gfc_trans_runtime_check,
1644 gfc_allocate_with_status, gfc_allocate_array_with_status,
1645 gfc_deallocate_with_status): Likewise.
1646 * f95-lang.c (gfc_truthvalue_conversion): Likewise.
1647 * trans-io.c (set_parameter_const, set_parameter_value,
1648 set_parameter_ref, set_string, set_internal_unit, io_result,
1649 set_error_locus, nml_get_addr_expr, transfer_expr): Likewise.
1650 * trans-decl.c (gfc_build_qualified_array, build_entry_thunks,
1651 gfc_get_fake_result_decl, gfc_trans_auto_character_variable,
1652 gfc_generate_function_code): Likewise.
1653 * convert.c (convert): Likewise.
1654 * trans-intrinsic.c (gfc_conv_intrinsic_conversion,
1655 build_fixbound_expr, build_fix_expr, gfc_conv_intrinsic_aint,
1656 gfc_conv_intrinsic_int, gfc_conv_intrinsic_imagpart,
1657 gfc_conv_intrinsic_conjg, gfc_conv_intrinsic_abs,
1658 gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_mod,
1659 gfc_conv_intrinsic_dim, gfc_conv_intrinsic_dprod,
1660 gfc_conv_intrinsic_ctime, gfc_conv_intrinsic_fdate,
1661 gfc_conv_intrinsic_ttynam, gfc_conv_intrinsic_minmax,
1662 gfc_conv_intrinsic_minmax_char, gfc_conv_intrinsic_count,
1663 gfc_conv_intrinsic_arith, gfc_conv_intrinsic_dot_product,
1664 gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
1665 gfc_conv_intrinsic_btest, gfc_conv_intrinsic_not,
1666 gfc_conv_intrinsic_ibits, gfc_conv_intrinsic_ishft,
1667 gfc_conv_intrinsic_ichar, gfc_conv_intrinsic_size,
1668 gfc_conv_intrinsic_array_transfer, gfc_conv_intrinsic_transfer,
1669 gfc_conv_allocated, gfc_conv_associated, gfc_conv_intrinsic_trim,
1670 gfc_conv_intrinsic_repeat): Likewise.
1671
1672 2008-02-23 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1673
1674 PR target/25477
1675 * trans-expr.c (gfc_conv_power_op): Use BUILT_IN_CPOW{F,,L}.
1676 * f95-lang.c (gfc_init_builtin_functions): Define BUILT_IN_CPOW{F,,L}.
1677 * trans.h (gfor_fndecl_math_cpow, gfor_fndecl_math_cpowf,
1678 gfor_fndecl_math_cpowl10, gfor_fndecl_math_cpowl16): Remove.
1679 * trans-decl.c: Likewise.
1680
1681 2008-02-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1682
1683 PR fortran/35059
1684 * expr.c (find_array_element): Modify traversing the constructor to
1685 avoid trying to access NULL memory pointed to by next for the
1686 last element. (find_array_section): Exit while loop if cons->next is
1687 NULL.
1688
1689 2008-02-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1690
1691 PR fortran/34907
1692 * iresolve.c (resolve_mask_arg): Add gfc_clear_ts to initialize
1693 structure.
1694 (gfc_resolve_aint): Likewise.
1695 (gfc_resolve_anint): Likewise.
1696 (gfc_resolve_besn): Likewise.
1697 (gfc_resolve_cshift): Likewise.
1698 (gfc_resolve_ctime): Likewise.
1699 (gfc_resolve_eoshift): Likewise.
1700 (gfc_resolve_index_func): Likewise.
1701 (gfc_resolve_isatty): Likewise.
1702 (gfc_resolve_malloc): Likewise.
1703 (gfc_resolve_rrspacing): Likewise.
1704 (gfc_resolve_scale): Likewise.
1705 (gfc_resolve_set_exponent): Likewise.
1706 (gfc_resolve_spacing): Likewise.
1707 (gfc_resolve_spacing): Likewise.
1708 (gfc_resolve_fgetc): Likewise.
1709 (gfc_resolve_fputc): Likewise.
1710 (gfc_resolve_ftell): Likewise.
1711 (gfc_resolve_ttynam): Likewise.
1712 (gfc_resolve_alarm_sub): Likewise.
1713 (gfc_resolve_mvbits): Likewise.
1714 (gfc_resolve_getarg): Likewise.
1715 (gfc_resolve_signal_sub): Likewise.
1716 (gfc_resolve_exit): Likewise.
1717 (gfc_resolve_flush): Likewise.
1718 (gfc_resolve_free): Likewise.
1719 (gfc_resolve_ctime_sub): Likewise.
1720 (gfc_resolve_fgetc_sub): Likewise.
1721 (gfc_resolve_fputc_sub): Likewise.
1722 (gfc_resolve_fseek_sub): Likewise.
1723 (gfc_resolve_ftell_sub): Likewise.
1724 (gfc_resolve_ttynam_sub): Likewise.
1725
1726 2008-02-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1727
1728 * gfc-internals.texi: Fix typos and markup nits.
1729 * gfortran.texi: Likewise.
1730 * intrinsic.texi: Likewise.
1731
1732 2008-02-21 Richard Guenther <rguenther@suse.de>
1733
1734 * trans-expr.c (gfc_conv_expr_op): Expand INTRINSIC_PARENTHESES
1735 as unary PAREN_EXPR for real and complex typed expressions.
1736 (gfc_conv_unary_op): Fold the built tree.
1737
1738 2008-02-20 Tobias Burnus <burnus@net-b.de>
1739
1740 PR fortran/34997
1741 * match.c (gfc_match_name): Improve error message for '$'.
1742
1743 2008-02-19 Daniel Franke <franke.daniel@gmail.com>
1744
1745 PR fortran/35030
1746 * expr.c (gfc_check_pointer_assign): Add type and kind information
1747 to type-mismatch message.
1748 (gfc_check_assign): Unify error messages.
1749
1750 2008-02-16 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1751
1752 PR fortran/34952
1753 * gfortran.texi: Create new section for unimplemented extensions.
1754 Add "STRUCTURE and RECORD" and "ENCODE and DECODE statements".
1755 Remove "smaller projects" list. Fix a few typos.
1756
1757 2008-02-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1758
1759 * intrinsic.texi: Rename INDEX node to avoid clashing with
1760 index.html on case-insensitive systems.
1761
1762 2008-02-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1763
1764 PR fortran/35150
1765 * trans-expr.c (gfc_conv_function_call): Force evaluation of
1766 se->expr.
1767
1768 2008-02-10 Daniel Franke <franke.daniel@gmail.com>
1769
1770 PR fortran/35019
1771 * lang.opt: Allow '-J<dir>' next to '-J <dir>',
1772 likewise '-I <dir>' and '-I<dir>'.
1773
1774 2008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1775
1776 PR other/35107
1777 * Make-lang.in (f951): Add $(GMPLIBS).
1778
1779 2008-02-05 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1780
1781 PR fortran/35037
1782 * trans-common.c (build_field): Mark fields as volatile when needed.
1783
1784 2008-02-05 Tobias Burnus <burnus@net-b.de>
1785
1786 PR fortran/35093
1787 * data.c (gfc_assign_data_value): Only free "size" if
1788 it has not already been freed.
1789
1790 2008-02-05 Paul Thomas <pault@gcc.gnu.org>
1791
1792 PR fortran/34945
1793 * array.c (match_array_element_spec): Remove check for negative
1794 array size.
1795 (gfc_resolve_array_spec): Add check for negative size.
1796
1797 2008-02-05 Paul Thomas <pault@gcc.gnu.org>
1798
1799 PR fortran/32315
1800 * data.c (gfc_assign_data_value): Add bounds check for array
1801 references.
1802
1803 2008-02-04 Daniel Franke <franke.daniel@gmail.com>
1804
1805 * resolve.c (resolve_where): Fix typo.
1806 (gfc_resolve_where_code_in_forall): Likewise.
1807
1808 2008-02-03 Paul Thomas <pault@gcc.gnu.org>
1809
1810 PR fortran/32760
1811 * resolve.c (resolve_allocate_deallocate): New function.
1812 (resolve_code): Call it for allocate and deallocate.
1813 * match.c (gfc_match_allocate, gfc_match_deallocate) : Remove
1814 the checking of the STAT tag and put in above new function.
1815 * primary,c (match_variable): Do not fix flavor of host
1816 associated symbols yet if the type is not known.
1817
1818 2008-01-31 Paul Thomas <pault@gcc.gnu.org>
1819
1820 PR fortran/34910
1821 * expr.c (gfc_check_assign): It is an error to assign
1822 to a sibling procedure.
1823
1824 2008-01-30 Paul Thomas <pault@gcc.gnu.org>
1825
1826 PR fortran/34975
1827 * symbol.c (gfc_delete_symtree, gfc_undo_symbols): Rename
1828 delete_symtree to gfc_delete_symtree.
1829 * gfortran.h : Add prototype for gfc_delete_symtree.
1830 * module.c (load_generic_interfaces): Transfer symbol to a
1831 unique symtree and delete old symtree, instead of renaming.
1832 (read_module): The rsym and the found symbol are the same, so
1833 the found symtree can be deleted.
1834
1835 PR fortran/34429
1836 * decl.c (match_char_spec): Remove the constraint on deferred
1837 matching of functions and free the length expression.
1838 delete_symtree to gfc_delete_symtree.
1839 (gfc_match_type_spec): Whitespace.
1840 (gfc_match_function_decl): Defer characteristic association for
1841 all types except BT_UNKNOWN.
1842 * parse.c (decode_specification_statement): Only derived type
1843 function matching is delayed to the end of specification.
1844
1845 2008-01-28 Tobias Burnus <burnus@net-b.de>
1846
1847 PR libfortran/34980
1848 * simplify.c (gfc_simplify_shape): Simplify rank zero arrays.
1849
1850 2008-01-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1851
1852 PR fortran/34990
1853 * array.c (gfc_check_constructor_type): Revert clearing the expression.
1854
1855 2008-01-26 Tobias Burnus <burnus@net-b.de>
1856
1857 PR fortran/34848
1858 * trans-expr.c (gfc_conv_function_call): Don't call
1859 gfc_add_interface_mapping if the expression is NULL.
1860
1861 2008-01-26 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1862
1863 PR fortran/31610
1864 * trans-array.c (gfc_trans_create_temp_array): Remove call to
1865 gcc_assert (integer_zerop (loop->from[n])).
1866
1867 2008-01-25 Daniel Franke <franke.daniel@gmail.com>
1868
1869 PR fortran/34661
1870 * resolve.c (resolve_where): Added check if user-defined assignment
1871 operator is an elemental subroutine.
1872 (gfc_resolve_where_code_in_forall): Likewise.
1873
1874 2008-01-24 Daniel Franke <franke.daniel@gmail.com>
1875
1876 PR fortran/33375
1877 PR fortran/34858
1878 * gfortran.h: Revert changes from 2008-01-17.
1879 * match.c: Likewise.
1880 * symbol.c: Likewise.
1881 (gfc_undo_symbols): Undo namespace changes related to common blocks.
1882
1883 2008-01-24 Daniel Franke <franke.daniel@gmail.com>
1884
1885 PR fortran/34202
1886 * data.c (formalize_structure_cons): Skip formalization on
1887 empty structures.
1888
1889 2008-01-24 Daniel Franke <franke.daniel@gmail.com>
1890
1891 * gfortran.texi (OpenMP): Extended existing documentation.
1892 (contributors): Added major contributors of 2008 that were
1893 not listed yet.
1894 (proposed extensions): Removed implemented items.
1895
1896 2008-01-24 Paul Thomas <pault@gcc.gnu.org>
1897
1898 PR fortran/34872
1899 * parse.c (next_statement) : If ST_GET_FCN_CHARACTERISTICS is
1900 seen, check for a statement label and, if present, delete it
1901 and set the locus to the start of the statement.
1902
1903 2008-01-22 Paul Thomas <pault@gcc.gnu.org>
1904
1905 PR fortran/34875
1906 * trans-io.c (gfc_trans_transfer): If the array reference in a
1907 read has a vector subscript, use gfc_conv_subref_array_arg to
1908 copy back the temporary.
1909
1910 2008-01-22 Tobias Burnus <burnus@net-b.de>
1911
1912 PR fortran/34848
1913 * interface.c (compare_actual_formal): Fix adding type
1914 to missing_arg_type for absent optional arguments.
1915
1916 2008-01-22 Tobias Burnus <burnus@net-b.de>
1917
1918 PR fortran/34907
1919 * parse.c (parse_spec): Change = into ==.
1920
1921 2008-01-22 Daniel Franke <franke.daniel@gmail.com>
1922
1923 PR fortran/34915
1924 * expr.c (check_elemental): Fix check for valid data types.
1925
1926 2008-01-22 Tobias Burnus <burnus@net-b.de>
1927
1928 PR fortran/34899
1929 * scanner.c (load_line): Support <tab><digit> continuation lines.
1930 * invoke.texi (-Wtabs): Document this.
1931
1932 2008-01-22 Paul Thomas <pault@gcc.gnu.org>
1933
1934 PR fortran/34896
1935 * module.c (read_module): Set use_rename attribute.
1936
1937 2007-01-21 Tobias Burnus <burnus@net-b.de>
1938
1939 PR fortran/34901
1940 * interface.c (compare_parameter): Improved error message
1941 for arguments of same type and mismatched kinds.
1942
1943 2008-01-20 Paul Thomas <pault@gcc.gnu.org>
1944
1945 PR fortran/34861
1946 * resolve.c (resolve_entries): Do not do an array bounds check
1947 if the result symbols are the same.
1948
1949 PR fortran/34854
1950 * module.c (read_module) : Hide the symtree of the previous
1951 version of the symbol if this symbol is renamed.
1952
1953 2008-01-20 Paul Thomas <pault@gcc.gnu.org>
1954
1955 PR fortran/34784
1956 * array.c (gfc_check_constructor_type): Clear the expression ts
1957 so that the checking starts from the deepest level of array
1958 constructor.
1959 * primary.c (match_varspec): If an unknown type is changed to
1960 default character and the attempt to match a substring fails,
1961 change it back to unknown.
1962
1963 PR fortran/34785
1964 * trans-array.c (gfc_add_loop_ss_code) : If ss->string_length is
1965 NULL for an array constructor, use the cl.length expression to
1966 build it.
1967 (gfc_conv_array_parameter): Change call to gfc_evaluate_now to
1968 a tree assignment.
1969
1970 2008-01-19 Thomas Koenig <tkoenig@gcc.gnu.org>
1971
1972 PR fortran/34817
1973 PR fortran/34838
1974 * iresolve.c (gfc_resolve_all): Remove conversion of mask
1975 argument to kind=1 by removing call to resolve_mask_arg().
1976 (gfc_resolve_any): Likewise.
1977
1978 2008-01-19 Tobias Burnus <burnus@net-b.de>
1979
1980 PR fortran/34760
1981 * primary.c (match_variable): Handle FL_UNKNOWN without
1982 uneducated guessing.
1983 (match_variable): Improve error message.
1984
1985 2008-01-18 Tobias Burnus <burnus@net-b.de>
1986
1987 PR fortran/32616
1988 * interface.c (get_expr_storage_size): Return storage size
1989 for array element designators.
1990 (compare_actual_formal): Reject unequal string sizes for
1991 assumed-shape dummy arguments. And fix error message for
1992 array-sections with vector subscripts.
1993
1994 2008-01-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1995
1996 PR fortran/34556
1997 * simplify.c (is_constant_array_expr): New static function that returns
1998 true if the given expression is an array and is constant.
1999 (gfc_simplify_reshape): Use new function.
2000
2001 2008-01-17 H.J. Lu <hongjiu.lu@intel.com>
2002
2003 PR fortran/33375
2004 * symbol.c (free_common_tree): Renamed to ...
2005 (gfc_free_common_tree): This. Remove static.
2006 (gfc_free_namespace): Updated.
2007
2008 * gfortran.h (gfc_free_common_tree): New.
2009
2010 * match.c (gfc_match_common): Call gfc_free_common_tree () with
2011 gfc_current_ns->common_root and set gfc_current_ns->common_root
2012 to NULL on syntax error.
2013
2014 2008-01-18 Richard Sandiford <rsandifo@nildram.co.uk>
2015
2016 PR fortran/34686
2017 * trans-expr.c (gfc_conv_function_call): Use proper
2018 type for returned character pointers.
2019
2020 2008-01-17 Paul Thomas <pault@gcc.gnu.org>
2021
2022 PR fortran/34429
2023 PR fortran/34431
2024 PR fortran/34471
2025 * decl.c : Remove gfc_function_kind_locus and
2026 gfc_function_type_locus. Add gfc_matching_function.
2027 (match_char_length): If matching a function and the length
2028 does not match, return MATCH_YES and try again later.
2029 (gfc_match_kind_spec): The same.
2030 (match_char_kind): The same.
2031 (gfc_match_type_spec): The same for numeric and derived types.
2032 (match_prefix): Rename as gfc_match_prefix.
2033 (gfc_match_function_decl): Except for function valued character
2034 lengths, defer applying kind, type and charlen info until the
2035 end of specification block.
2036 gfortran.h (gfc_statement): Add ST_GET_FCN_CHARACTERISTICS.
2037 parse.c (decode_specification_statement): New function.
2038 (decode_statement): Call it when a function has kind = -1. Set
2039 and reset gfc_matching function, as function statement is being
2040 matched.
2041 (match_deferred_characteristics): Simplify with a single call
2042 to gfc_match_prefix. Do appropriate error handling. In any
2043 case, make sure that kind = -1 is reset or corrected.
2044 (parse_spec): Call above on seeing ST_GET_FCN_CHARACTERISTICS.
2045 Throw an error if kind = -1 after last specification statement.
2046 parse.h : Prototype for gfc_match_prefix.
2047
2048 2008-01-16 Tobias Burnus <burnus@net-b.de>
2049
2050 PR fortran/34796
2051 * interface.c (compare_parameter): Allow AS_DEFERRED array
2052 elements and reject attr.pointer array elemenents.
2053 (get_expr_storage_size): Return storage size of elements of
2054 assumed-shape and pointer arrays.
2055
2056 2008-01-15 Sebastian Pop <sebastian.pop@amd.com>
2057
2058 * f95-lang.c (gfc_init_builtin_functions): Initialize GOMP builtins
2059 for flag_tree_parallelize_loops.
2060
2061 2008-01-15 Thomas Koenig <tkoenig@gcc.gnu.org>
2062
2063 PR libfortran/34671
2064 * iresolve.c (gfc_resolve_all): Call resolve_mask_arg.
2065 (gfc_resolve_any): Likewise.
2066 (gfc_resolve_count): Likewise. Don't append kind of
2067 argument to function name.
2068
2069 2008-01-13 Tobias Burnus <burnus@net-b.de>
2070
2071 PR fortran/34665
2072 * resolve.c (resolve_actual_arglist): For expressions,
2073 also check for assume-sized arrays.
2074 * interface.c (compare_parameter): Move F2003 character checks
2075 here, print error messages here, reject elements of
2076 assumed-shape array as argument to dummy arrays.
2077 (compare_actual_formal): Update for the changes above.
2078
2079 2008-01-13 Tobias Burnus <burnus@net-b.de>
2080
2081 PR fortran/34763
2082 * decl.c (contained_procedure): Only check directly preceeding state.
2083
2084 2008-01-13 Tobias Burnus <burnus@net-b.de>
2085
2086 PR fortran/34759
2087 * check.c (gfc_check_shape): Accept array ranges of
2088 assumed-size arrays.
2089
2090 2008-01-12 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2091
2092 PR fortran/34432
2093 * match.c (gfc_match_name): Don't error if leading character is a '(',
2094 just return MATCH_NO.
2095
2096 2008-01-11 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2097
2098 PR fortran/34722
2099 * trans-io.c (create_dummy_iostat): Commit the symbol.
2100
2101 2008-01-11 Paul Thomas <pault@gcc.gnu.org>
2102
2103 PR fortran/34537
2104 * simplify.c (gfc_simplify_transfer): Return NULL if the size
2105 of the element is unavailable and only assign character length
2106 to the result, if 'mold' is constant.
2107
2108 2008-01-10 Paul Thomas <pault@gcc.gnu.org>
2109
2110 PR fortran/34396
2111 * trans-array.c (gfc_trans_array_ctor_element): Use gfc_trans_string_copy
2112 to assign strings and perform bounds checks on the string length.
2113 (get_array_ctor_strlen): Remove bounds checking.
2114 (gfc_trans_array_constructor): Initialize string length checking.
2115 * trans-array.h : Add prototype for gfc_trans_string_copy.
2116
2117 2008-01-08 Richard Guenther <rguenther@suse.de>
2118
2119 PR fortran/34706
2120 PR tree-optimization/34683
2121 * trans-types.c (gfc_get_array_type_bounds): Use an array type
2122 with known size for accesses if that is known.
2123
2124 2008-01-08 Paul Thomas <pault@gcc.gnu.org>
2125
2126 PR fortran/34476
2127 * expr.c (find_array_element): Check that the array bounds are
2128 constant before using them. Use lower, as well as upper bound.
2129 (check_restricted): Allow implied index variable.
2130
2131 2008-01-08 Paul Thomas <pault@gcc.gnu.org>
2132
2133 PR fortran/34681
2134 * trans_array.c (gfc_trans_deferred_array): Do not null the
2135 data pointer on entering scope, nor deallocate it on leaving
2136 scope, if the symbol has the 'save' attribute.
2137
2138 PR fortran/34704
2139 * trans_decl.c (gfc_finish_var_decl): Derived types with
2140 allocatable components and an initializer must be TREE_STATIC.
2141
2142 2008-01-07 Paul Thomas <pault@gcc.gnu.org>
2143
2144 PR fortran/34672
2145 * module.c (write_generic): Rewrite completely.
2146 (write_module): Change call to write_generic.
2147
2148 2008-01-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2149
2150 PR fortran/34659
2151 * scanner.c (load_line): Do not count ' ' as printable when checking for
2152 continuations.
2153
2154 2008-01-06 Paul Thomas <pault@gcc.gnu.org>
2155
2156 PR fortran/34545
2157 * module.c (load_needed): If the namespace has no proc_name
2158 give it the module symbol.
2159
2160 2008-01-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2161
2162 PR fortran/34387
2163 * trans-expr.c (gfc_conv_missing_dummy): Use a temporary to type convert
2164 the dummy variable expression, test for NULL, and pass the variable
2165 address to the called function.
2166
2167 2007-01-06 Tobias Burnus <burnus@net-b.de>
2168
2169 PR fortran/34658
2170 * match.c (gfc_match_common): Remove blank common in
2171 DATA BLOCK warning.
2172 * resolve.c (resolve_common_vars): New function.
2173 (resolve_common_blocks): Move checks to resolve_common_vars
2174 and invoke that function.
2175 (resolve_types): Call resolve_common_vars for blank commons.
2176
2177 2008-01-06 Tobias Burnus <burnus@net-b.de>
2178
2179 PR fortran/34655
2180 * resolve.c (resolve_equivalence_derived): Reject derived types with
2181 default initialization if equivalenced with COMMON variable.
2182
2183 2008-01-06 Tobias Burnus <burnus@net-b.de>
2184
2185 PR fortran/34654
2186 * io.c (check_io_constraints): Disallow unformatted I/O for
2187 internal units.
2188
2189 2008-01-06 Tobias Burnus <burnus@net-b.de>
2190
2191 PR fortran/34660
2192 * resolve.c (resolve_formal_arglist): Reject dummy procedure in
2193 ELEMENTAL functions.
2194
2195 2008-01-06 Tobias Burnus <burnus@net-b.de>
2196
2197 PR fortran/34662
2198 * interface.c (compare_actual_formal): Reject parameter
2199 actual to intent(out) dummy.
2200
2201 2008-01-04 Tobias Burnus <burnus@net-b.de>
2202
2203 PR fortran/34557
2204 * primary.c (match_varspec): Gobble whitespace before
2205 checking for '('.