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