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