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