OSDN Git Service

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