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