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