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