OSDN Git Service

contrib:
[pf3gnuchains/gcc-fork.git] / gcc / fortran / ChangeLog
1 2008-04-01  Joseph Myers  <joseph@codesourcery.com>
2
3         * gfortran.texi: Include gpl_v3.texi instead of gpl.texi
4         * Make-lang.in (GFORTRAN_TEXI): Include gpl_v3.texi instead of
5         gpl.texi.
6
7 2008-03-30  Paul Thomas  <pault@gcc.gnu.org>
8
9         PR fortran/35740
10         * resolve.c (resolve_function, resolve_call): If the procedure
11         is elemental do not look for noncopying intrinsics.
12
13 2008-03-29  Paul Thomas  <pault@gcc.gnu.org>
14
15         PR fortran/35698
16         * trans-array.c (gfc_array_init_size): Set 'size' zero if
17         negative in one dimension.
18
19         PR fortran/35702
20         * trans-expr.c (gfc_trans_string_copy): Only assign a char
21         directly if the lhs and rhs types are the same.
22
23 2008-03-28  Daniel Franke  <franke.daniel@gmail.com>
24             Paul Richard Thomas <paul.richard.thomas@gmail.com>
25
26         PR fortran/34714
27         * primary.c (match_variable): Improved matching of function 
28         result variables.
29         * resolve.c (resolve_allocate_deallocate): Removed checks if
30         the actual argument for STAT is a variable.
31
32 2008-03-28  Tobias Burnus  <burnus@net-b.de>
33
34         * symbol.c (gfc_get_default_type): Fix error message; option
35         -fallow_leading_underscore should be -fallow-leading-underscore
36
37 2008-03-27  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
38
39         PR fortran/35724
40         * iresolve.c (gfc_resolve_cshift): Check for NULL symtree in test for
41         optional argument attribute.
42
43 2008-03-27  Tom Tromey  <tromey@redhat.com>
44
45         * Make-lang.in: Revert automatic dependency patch.
46
47 2008-03-25  Tom Tromey  <tromey@redhat.com>
48
49         * Make-lang.in: Remove .o targets.
50         (fortran_OBJS): New variable.
51         (fortran/gfortranspec.o): Move to fortran/.  Reduce to variable
52         setting.
53         (GFORTRAN_D_OBJS): Update.
54         (GFORTRAN_TRANS_DEPS): Remove.
55
56 2008-03-24  Paul Thomas  <pault@gcc.gnu.org>
57
58         PR fortran/34813
59         * resolve.c (resolve_structure_cons): It is an error to assign
60         NULL to anything other than a pointer or allocatable component.
61
62         PR fortran/33295
63         * resolve.c (resolve_symbol): If the symbol is a derived type,
64         resolve the derived type.  If the symbol is a derived type
65         function, ensure that the derived type is visible in the same
66         namespace as the function.
67
68 2008-03-23  Tobias Schlüter  <tobi@gcc.gnu.org>
69
70         * trans.h: Use fold_build in build1_v, build2_v and build3_v
71         macros.
72         * trans-openmp.c (gfc_trans_omp_critical, gfc_trans_omp_single):
73         Don't use build2_v macro.
74
75 2008-03-19  Daniel Franke  <franke.daniel@gmail.com>
76
77         PR fortran/35152
78         * interface.c (gfc_procedure_use): Check for keyworded arguments in
79         procedures without explicit interfaces.
80
81 2008-03-16  Paul Thomas  <pault@gcc.gnu.org>
82
83         PR fortran/35470
84         * resolve.c (check_assumed_size_reference):  Only visit the
85         first reference and look directly at the highest dimension.
86
87 2008-03-15  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
88
89         PR fortran/35184
90         * trans-array.c (gfc_conv_array_index_offset): Remove unnecessary
91         assert.
92
93 2008-03-15  Daniel Franke  <franke.daniel@gmail.com>
94
95         PR fortran/35584
96         * resolve.c (resolve_branch): Less strict and pessimistic warning
97         message.
98
99 2008-03-11  Paolo Bonzini  <bonzini@gnu.org>
100
101         * f95-lang.c (LANG_HOOKS_CLEAR_BINDING_STACK): Delete.
102         (gfc_be_parse_file): Call clear_binding_stack from here.
103         (gfc_clear_binding_stack): Rename to clear_binding_stack.
104                 
105 2008-03-09  Paul Thomas  <pault@gcc.gnu.org>
106
107         PR fortran/35474
108         * module.c (mio_symtree_ref): After providing a symbol for a
109         missing equivalence member, resolve and NULL the fixups.
110
111 2008-03-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
112
113         * invoke.texi (Error and Warning Options): Document
114         -Wline-truncation.
115
116 2008-03-08  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
117
118         PR fortran/34956
119         * trans-array.c (gfc_conv_ss_startstride): Fix the logic to avoid
120         checking bounds of absent optional arguments.
121
122 2008-03-06  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
123
124         PR fortran/33197
125         * intrinsic.c (add_functions): Add simplification routines for
126         ERF, DERF, ERFC and DERFC.
127         * decl.c (gfc_match_suffix, gfc_match_subroutine): Change GNU
128         extensions into Fortran 2008 features.
129         * intrinsic.h (gfc_simplify_erf, gfc_simplify_erfc): New
130         prototypes.
131         * simplify.c (gfc_simplify_erf, gfc_simplify_erfc): New functions.
132
133 2008-03-03  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
134
135         PR fortran/33197
136         * intrinsic.c (add_functions): Modify intrinsics ACOSH, ASINH,
137         ATANH, ERF, ERFC and GAMMA. Add intrinsics BESSEL_{J,Y}{0,1,N},
138         ERFC_SCALED, LOG_GAMMA and HYPOT.
139         * intrinsic.h (gfc_check_hypot, gfc_simplify_hypot,
140         gfc_resolve_hypot): New prototypes.
141         * mathbuiltins.def: Add HYPOT builtin. Make complex versions of
142         ACOSH, ASINH and ATANH available.
143         * gfortran.h (GFC_ISYM_ERFC_SCALED, GFC_ISYM_HYPOT): New values.
144         * lang.opt: Add -std=f2008 option.
145         * libgfortran.h: Define GFC_STD_F2008.
146         * lang-specs.h: Add .f08 and .F08 file suffixes.
147         * iresolve.c (gfc_resolve_hypot): New function.
148         * parse.c (parse_contained): Allow empty CONTAINS for Fortran 2008.
149         * check.c (gfc_check_hypot): New function.
150         * trans-intrinsic.c (gfc_intrinsic_map): Define ERFC_SCALE builtin.
151         * options.c (set_default_std_flags): Allow Fortran 2008 by default.
152         (form_from_filename): Add .f08 suffix.
153         (gfc_handle_option): Handle -std=f2008 option.
154         * simplify.c (gfc_simplify_hypot): New function.
155         * gfortran.texi: Document Fortran 2008 status and file extensions.
156         * intrinsic.texi: Document new BESSEL_{J,Y}{0,1,N} intrinsics,
157         as well as HYPOT and ERFC_SCALED. Update documentation of ERF,
158         ERFC, GAMMA, LGAMMA, ASINH, ACOSH and ATANH.
159         * invoke.texi: Document the new -std=f2008 option.
160
161 2008-03-02  Jakub Jelinek  <jakub@redhat.com>
162
163         * gfortranspec.c (lang_specific_driver): Update copyright notice
164         dates.
165
166 2008-02-29  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
167
168         PR fortran/35059
169         * expr.c (find_array_element): Modify traversing the constructor to
170         avoid trying to access NULL memory pointed to by next for the
171         last element. (find_array_section): Exit while loop if cons->next is
172         NULL.
173         * trans-expr.c (gfc_conv_scalar_char_value): Initialize gfc_typespec.
174         (gfc_conv_function_call): Same.
175         * decl.c (gfc_match_implicit): Same.
176         * trans-intrinsic.c (gfc_conv_intrinsic_sr_kind): Same.
177
178 2008-02-28  Daniel Franke  <franke.daniel@gmail.com>
179
180         PR fortran/31463
181         PR fortran/33950
182         PR fortran/34296
183         * lang.opt: Added -Wreturn-type.
184         * options.c (gfc_handle_option): Recognize -Wreturn-type.
185         * trans-decl.c (gfc_trans_deferred_vars): Emit warnings for funtions
186         where the result value is not set.
187         (gfc_generate_function_code): Likewise.
188         (generate_local_decl): Emit warnings for funtions whose RESULT
189         variable is not set.
190
191 2008-02-28  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
192
193         PR fortran/34868
194         * trans-expr.c (gfc_conv_variable): Don't build indirect
195         references when explicit interface is mandated.
196         * resolve.c (resolve_formal_arglist): Set attr.always_explicit
197         on the result symbol as well as the procedure symbol.
198
199 2008-02-27  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
200
201         PR fortran/33387
202         * trans.h: Remove prototypes for gfor_fndecl_math_exponent4,
203         gfor_fndecl_math_exponent8, gfor_fndecl_math_exponent10 and
204         gfor_fndecl_math_exponent16.
205         * f95-lang.c (build_builtin_fntypes): Add new function types.
206         (gfc_init_builtin_functions): Add new builtins for nextafter,
207         frexp, ldexp, fabs, scalbn and inf.
208         * iresolve.c (gfc_resolve_rrspacing): Don't add hidden arguments.
209         (gfc_resolve_scale): Don't convert type of second argument.
210         (gfc_resolve_set_exponent): Likewise.
211         (gfc_resolve_size): Don't add hidden arguments.
212         * trans-decl.c: Remove gfor_fndecl_math_exponent4,
213         gfor_fndecl_math_exponent8, gfor_fndecl_math_exponent10 and
214         gfor_fndecl_math_exponent16.
215         * trans-intrinsic.c (gfc_intrinsic_map): Remove intrinsics
216         for scalbn, fraction, nearest, rrspacing, set_exponent and
217         spacing.
218         (gfc_conv_intrinsic_exponent): Directly call frexp.
219         (gfc_conv_intrinsic_fraction, gfc_conv_intrinsic_nearest,
220         gfc_conv_intrinsic_spacing, gfc_conv_intrinsic_rrspacing,
221         gfc_conv_intrinsic_scale, gfc_conv_intrinsic_set_exponent): New
222         functions.
223         (gfc_conv_intrinsic_function): Use the new functions above.
224
225 2008-02-26  Tobias Burnus  <burnus@net-b.de>
226
227         PR fortran/35033
228         * interface.c (check_operator_interface): Show better line for error
229         messages; fix constrains for user-defined assignment operators.
230         (gfc_extend_assign): Fix constrains for user-defined assignment
231         operators.
232
233 2008-02-26  Tom Tromey  <tromey@redhat.com>
234
235         * trans-io.c (set_error_locus): Remove old location code.
236         * trans-decl.c (gfc_set_decl_location): Remove old location code.
237         * f95-lang.c (gfc_init): Remove test of USE_MAPPED_LOCATION.
238         * scanner.c (gfc_gobble_whitespace): Remove old location code.
239         (get_file): Likewise.
240         (preprocessor_line): Likewise.
241         (load_file): Likewise.
242         (gfc_new_file): Likewise.
243         * trans.c (gfc_trans_runtime_check): Remove old location code.
244         (gfc_get_backend_locus): Likewise.
245         (gfc_set_backend_locus): Likewise.
246         * data.c (gfc_assign_data_value): Remove old location code.
247         * error.c (show_locus): Remove old location code.
248         * gfortran.h (gfc_linebuf): Remove old location code.
249         (gfc_linebuf_linenum): Remove old-location variant.
250
251 2008-02-25  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
252
253         PR fortran/34729
254         * trans-const.c (gfc_build_string_const): Don't call gettext.
255         (gfc_build_localized_string_const): New function.
256         * trans-const.h (gfc_build_localized_string_const): New prototype.
257         * trans.c (gfc_trans_runtime_check): Use
258         gfc_build_localized_string_const instead of gfc_build_string_const.
259         (gfc_call_malloc): Likewise.
260         (gfc_allocate_with_status): Likewise.
261         (gfc_allocate_array_with_status): Likewise.
262         (gfc_deallocate_with_status): Likewise.
263         (gfc_call_realloc): Likewise.
264         * trans-io.c (gfc_trans_io_runtime_check): Likewise.
265
266 2008-02-24  Tobias Schlüter  <tobi@gcc.gnu.org>
267
268         * arith.c: Update copyright years.
269         * arith.h: Likewise.
270         * array.c: Likewise.
271         * bbt.c: Likewise.
272         * check.c: Likewise.
273         * data.c: Likewise.
274         * data.h: Likewise.
275         * decl.c: Likewise.
276         * dependency.c: Likewise.
277         * dependency.h: Likewise.
278         * dump-parse-tree.c: Likewise.
279         * error.c: Likewise.
280         * expr.c: Likewise.
281         * gfc-internals.texi: Likewise.
282         * gfortran.h: Likewise.
283         * gfortran.texi: Likewise.
284         * gfortranspec.c: Likewise.
285         * interface.c: Likewise.
286         * intrinsic.c: Likewise.
287         * intrinsic.h: Likewise.
288         * intrinsic.texi: Likewise.
289         * invoke.texi: Likewise.
290         * io.c: Likewise.
291         * iresolve.c: Likewise.
292         * iso-c-binding.def: Likewise.
293         * iso-fortran-env.def: Likewise.
294         * lang-specs.h: Likewise.
295         * lang.opt: Likewise.
296         * libgfortran.h: Likewise.
297         * match.c: Likewise.
298         * match.h: Likewise.
299         * matchexp.c: Likewise.
300         * misc.c: Likewise.
301         * module.c: Likewise.
302         * openmp.c: Likewise.
303         * options.c: Likewise.
304         * parse.c: Likewise.
305         * parse.h: Likewise.
306         * primary.c: Likewise.
307         * resolve.c: Likewise.
308         * scanner.c: Likewise.
309         * simplify.c: Likewise.
310         * st.c: Likewise.
311         * symbol.c: Likewise.
312         * target-memory.c: Likewise.
313         * target-memory.h: Likewise.
314         * trans-array.h: Likewise.
315         * trans-const.h: Likewise.
316         * trans-stmt.h: Likewise.
317         * trans-types.c: Likewise.
318         * trans-types.h: Likewise.
319         * types.def: Likewise.
320
321 2008-02-24  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
322
323         PR fortran/35223
324         * simplify.c (gfc_simplify_ibclr), (gfc_simplify_ibits),
325         (gfc_simplify_ibset): Remove call to range_check.
326         (simplify_cmplx), (gfc_simplify_dble), (gfc_simplify_float)
327         (gfc_simplify_real): Add call gfc_clear_ts to initialize the
328         temporary gfc_typspec variable.
329
330 2008-02-24  Tobias Schlüter  <tobi@gcc.gnu.org>
331
332         * trans-array.c (gfc_conv_descriptor_data_get,
333         gfc_conv_descriptor_data_set_internal,
334         gfc_conv_descriptor_data_addr, gfc_conv_descriptor_offset,
335         gfc_conv_descriptor_dtype, gfc_conv_descriptor_dimension,
336         gfc_conv_descriptor_stride, gfc_conv_descriptor_lbound,
337         gfc_conv_descriptor_ubound, gfc_trans_create_temp_array,
338         gfc_conv_array_transpose, gfc_grow_array,
339         gfc_trans_array_constructor_subarray,
340         gfc_trans_array_constructor_value, gfc_trans_scalarized_loop_end,
341         gfc_array_init_size, gfc_array_allocate, gfc_array_deallocate,
342         gfc_conv_array_initializer, gfc_trans_array_bounds,
343         gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
344         gfc_get_dataptr_offset, gfc_conv_array_parameter,
345         gfc_trans_dealloc_allocated, get_full_array_size,
346         gfc_duplicate_allocatable, structure_alloc_comps): Use fold_buildN
347         instead of buildN.
348         * trans-expr.c (gfc_conv_expr_present, gfc_conv_missing_dummy,
349         gfc_conv_component_ref, gfc_conv_cst_int_power,
350         gfc_conv_function_call, gfc_trans_structur_assign): Likewise.
351         * trans-common.c (create_common): Likewise.
352         * trans-openmp.c (gfc_trans_omp_atomic, gfc_trans_omp_do):
353         Likewise.
354         * trans-const.c (gfc_conv_constant_to_tree): Likewise.
355         * trans-stmt.c (gfc_trans_goto, gfc_trans_return, gfc_trans_do,
356         gfc_trans_integer_select, gfc_trans_character_select,
357         gfc_trans_forall_loop, compute_overall_iter_number,
358         gfc_trans_forall_1, gfc_evaluate_where_mask, gfc_trans_allocate,
359         gfc_trans_deallocate): Likewise.
360         * trans.c (gfc_build_addr_expr, gfc_trans_runtime_check,
361         gfc_allocate_with_status, gfc_allocate_array_with_status,
362         gfc_deallocate_with_status): Likewise.
363         * f95-lang.c (gfc_truthvalue_conversion): Likewise.
364         * trans-io.c (set_parameter_const, set_parameter_value,
365         set_parameter_ref, set_string, set_internal_unit, io_result,
366         set_error_locus, nml_get_addr_expr, transfer_expr): Likewise.
367         * trans-decl.c (gfc_build_qualified_array, build_entry_thunks,
368         gfc_get_fake_result_decl, gfc_trans_auto_character_variable,
369         gfc_generate_function_code): Likewise.
370         * convert.c (convert): Likewise.
371         * trans-intrinsic.c (gfc_conv_intrinsic_conversion,
372         build_fixbound_expr, build_fix_expr, gfc_conv_intrinsic_aint,
373         gfc_conv_intrinsic_int, gfc_conv_intrinsic_imagpart,
374         gfc_conv_intrinsic_conjg, gfc_conv_intrinsic_abs,
375         gfc_conv_intrinsic_cmplx, gfc_conv_intrinsic_mod,
376         gfc_conv_intrinsic_dim, gfc_conv_intrinsic_dprod,
377         gfc_conv_intrinsic_ctime, gfc_conv_intrinsic_fdate,
378         gfc_conv_intrinsic_ttynam, gfc_conv_intrinsic_minmax,
379         gfc_conv_intrinsic_minmax_char, gfc_conv_intrinsic_count,
380         gfc_conv_intrinsic_arith, gfc_conv_intrinsic_dot_product,
381         gfc_conv_intrinsic_minmaxloc, gfc_conv_intrinsic_minmaxval,
382         gfc_conv_intrinsic_btest, gfc_conv_intrinsic_not,
383         gfc_conv_intrinsic_ibits, gfc_conv_intrinsic_ishft,
384         gfc_conv_intrinsic_ichar, gfc_conv_intrinsic_size,
385         gfc_conv_intrinsic_array_transfer, gfc_conv_intrinsic_transfer,
386         gfc_conv_allocated, gfc_conv_associated, gfc_conv_intrinsic_trim,
387         gfc_conv_intrinsic_repeat): Likewise.
388
389 2008-02-23  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
390
391         PR target/25477
392         * trans-expr.c (gfc_conv_power_op): Use BUILT_IN_CPOW{F,,L}.
393         * f95-lang.c (gfc_init_builtin_functions): Define BUILT_IN_CPOW{F,,L}.
394         * trans.h (gfor_fndecl_math_cpow, gfor_fndecl_math_cpowf,
395         gfor_fndecl_math_cpowl10, gfor_fndecl_math_cpowl16): Remove.
396         * trans-decl.c: Likewise.
397
398 2008-02-22  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
399
400         PR fortran/35059
401         * expr.c (find_array_element): Modify traversing the constructor to
402         avoid trying to access NULL memory pointed to by next for the
403         last element. (find_array_section): Exit while loop if cons->next is
404         NULL.
405
406 2008-02-22  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
407
408         PR fortran/34907
409         * iresolve.c (resolve_mask_arg): Add gfc_clear_ts to initialize
410         structure.
411         (gfc_resolve_aint): Likewise.
412         (gfc_resolve_anint): Likewise.
413         (gfc_resolve_besn): Likewise.
414         (gfc_resolve_cshift): Likewise.
415         (gfc_resolve_ctime): Likewise.
416         (gfc_resolve_eoshift): Likewise.
417         (gfc_resolve_index_func): Likewise.
418         (gfc_resolve_isatty): Likewise.
419         (gfc_resolve_malloc): Likewise.
420         (gfc_resolve_rrspacing): Likewise.
421         (gfc_resolve_scale): Likewise.
422         (gfc_resolve_set_exponent): Likewise.
423         (gfc_resolve_spacing): Likewise.
424         (gfc_resolve_spacing): Likewise.
425         (gfc_resolve_fgetc): Likewise.
426         (gfc_resolve_fputc): Likewise.
427         (gfc_resolve_ftell): Likewise.
428         (gfc_resolve_ttynam): Likewise.
429         (gfc_resolve_alarm_sub): Likewise.
430         (gfc_resolve_mvbits): Likewise.
431         (gfc_resolve_getarg): Likewise.
432         (gfc_resolve_signal_sub): Likewise.
433         (gfc_resolve_exit): Likewise.
434         (gfc_resolve_flush): Likewise.
435         (gfc_resolve_free): Likewise.
436         (gfc_resolve_ctime_sub): Likewise.
437         (gfc_resolve_fgetc_sub): Likewise.
438         (gfc_resolve_fputc_sub): Likewise.
439         (gfc_resolve_fseek_sub): Likewise.
440         (gfc_resolve_ftell_sub): Likewise.
441         (gfc_resolve_ttynam_sub): Likewise.
442
443 2008-02-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
444
445         * gfc-internals.texi: Fix typos and markup nits.
446         * gfortran.texi: Likewise.
447         * intrinsic.texi: Likewise.
448
449 2008-02-21  Richard Guenther  <rguenther@suse.de>
450
451         * trans-expr.c (gfc_conv_expr_op): Expand INTRINSIC_PARENTHESES
452         as unary PAREN_EXPR for real and complex typed expressions.
453         (gfc_conv_unary_op): Fold the built tree.
454
455 2008-02-20  Tobias Burnus  <burnus@net-b.de>
456
457         PR fortran/34997
458         * match.c (gfc_match_name): Improve error message for '$'.
459
460 2008-02-19  Daniel Franke  <franke.daniel@gmail.com>
461
462         PR fortran/35030
463         * expr.c (gfc_check_pointer_assign): Add type and kind information
464         to type-mismatch message.
465         (gfc_check_assign): Unify error messages.
466
467 2008-02-16  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
468
469         PR fortran/34952
470         * gfortran.texi: Create new section for unimplemented extensions.
471         Add "STRUCTURE and RECORD" and "ENCODE and DECODE statements".
472         Remove "smaller projects" list. Fix a few typos.
473
474 2008-02-15  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
475
476         * intrinsic.texi: Rename INDEX node to avoid clashing with
477         index.html on case-insensitive systems.
478
479 2008-02-15  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
480
481         PR fortran/35150
482         * trans-expr.c (gfc_conv_function_call): Force evaluation of
483         se->expr.
484
485 2008-02-10  Daniel Franke  <franke.daniel@gmail.com>
486
487         PR fortran/35019
488         * lang.opt: Allow '-J<dir>' next to '-J <dir>', 
489         likewise '-I <dir>' and '-I<dir>'.
490
491 2008-02-06  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
492
493         PR other/35107
494         * Make-lang.in (f951): Add $(GMPLIBS).
495
496 2008-02-05  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
497
498         PR fortran/35037
499         * trans-common.c (build_field): Mark fields as volatile when needed.
500
501 2008-02-05  Tobias Burnus  <burnus@net-b.de>
502
503         PR fortran/35093
504         * data.c (gfc_assign_data_value): Only free "size" if
505         it has not already been freed.
506
507 2008-02-05  Paul Thomas  <pault@gcc.gnu.org>
508
509         PR fortran/34945
510         * array.c (match_array_element_spec): Remove check for negative
511         array size.
512         (gfc_resolve_array_spec): Add check for negative size.
513
514 2008-02-05  Paul Thomas  <pault@gcc.gnu.org>
515
516         PR fortran/32315
517         * data.c (gfc_assign_data_value): Add bounds check for array
518         references.
519
520 2008-02-04  Daniel Franke  <franke.daniel@gmail.com>
521
522         * resolve.c (resolve_where): Fix typo.
523         (gfc_resolve_where_code_in_forall): Likewise.
524
525 2008-02-03  Paul Thomas  <pault@gcc.gnu.org>
526
527         PR fortran/32760
528         * resolve.c (resolve_allocate_deallocate): New function.
529         (resolve_code): Call it for allocate and deallocate.
530         * match.c (gfc_match_allocate, gfc_match_deallocate) : Remove
531         the checking of the STAT tag and put in above new function.
532         * primary,c (match_variable): Do not fix flavor of host
533         associated symbols yet if the type is not known.
534
535 2008-01-31  Paul Thomas  <pault@gcc.gnu.org>
536
537         PR fortran/34910
538         * expr.c (gfc_check_assign): It is an error to assign
539         to a sibling procedure.
540
541 2008-01-30  Paul Thomas  <pault@gcc.gnu.org>
542
543         PR fortran/34975
544         * symbol.c (gfc_delete_symtree, gfc_undo_symbols): Rename
545         delete_symtree to gfc_delete_symtree.
546         * gfortran.h : Add prototype for gfc_delete_symtree.
547         * module.c (load_generic_interfaces): Transfer symbol to a
548         unique symtree and delete old symtree, instead of renaming.
549         (read_module): The rsym and the found symbol are the same, so
550         the found symtree can be deleted.
551
552         PR fortran/34429
553         * decl.c (match_char_spec): Remove the constraint on deferred
554         matching of functions and free the length expression.
555         delete_symtree to gfc_delete_symtree.
556         (gfc_match_type_spec): Whitespace.
557         (gfc_match_function_decl): Defer characteristic association for
558         all types except BT_UNKNOWN.
559         * parse.c (decode_specification_statement): Only derived type
560         function matching is delayed to the end of specification.
561
562 2008-01-28  Tobias Burnus  <burnus@net-b.de>
563
564         PR libfortran/34980
565         * simplify.c (gfc_simplify_shape): Simplify rank zero arrays.
566
567 2008-01-27  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
568
569         PR fortran/34990
570         * array.c (gfc_check_constructor_type): Revert clearing the expression.
571
572 2008-01-26  Tobias Burnus  <burnus@net-b.de>
573
574         PR fortran/34848
575         * trans-expr.c (gfc_conv_function_call): Don't call
576         gfc_add_interface_mapping if the expression is NULL.
577
578 2008-01-26  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
579
580         PR fortran/31610
581         * trans-array.c (gfc_trans_create_temp_array): Remove call to
582         gcc_assert (integer_zerop (loop->from[n])).
583
584 2008-01-25  Daniel Franke  <franke.daniel@gmail.com>
585
586         PR fortran/34661
587         * resolve.c (resolve_where): Added check if user-defined assignment 
588         operator is an elemental subroutine.
589         (gfc_resolve_where_code_in_forall): Likewise.
590
591 2008-01-24  Daniel Franke  <franke.daniel@gmail.com>
592
593         PR fortran/33375
594         PR fortran/34858
595         * gfortran.h: Revert changes from 2008-01-17.
596         * match.c: Likewise.
597         * symbol.c: Likewise.
598         (gfc_undo_symbols): Undo namespace changes related to common blocks.
599
600 2008-01-24  Daniel Franke  <franke.daniel@gmail.com>
601
602         PR fortran/34202
603         * data.c (formalize_structure_cons): Skip formalization on
604         empty structures.
605
606 2008-01-24  Daniel Franke  <franke.daniel@gmail.com>
607
608         * gfortran.texi (OpenMP): Extended existing documentation.
609         (contributors): Added major contributors of 2008 that were
610         not listed yet.
611         (proposed extensions): Removed implemented items.
612
613 2008-01-24  Paul Thomas  <pault@gcc.gnu.org>
614
615         PR fortran/34872
616         * parse.c (next_statement) : If ST_GET_FCN_CHARACTERISTICS  is
617         seen, check for a statement label and, if present, delete it
618         and set the locus to the start of the statement.
619
620 2008-01-22  Paul Thomas  <pault@gcc.gnu.org>
621
622         PR fortran/34875
623         * trans-io.c (gfc_trans_transfer): If the array reference in a
624         read has a vector subscript, use gfc_conv_subref_array_arg to
625         copy back the temporary.
626
627 2008-01-22  Tobias Burnus  <burnus@net-b.de>
628
629         PR fortran/34848
630         * interface.c (compare_actual_formal): Fix adding type
631         to missing_arg_type for absent optional arguments.
632
633 2008-01-22  Tobias Burnus  <burnus@net-b.de>
634
635         PR fortran/34907
636         * parse.c (parse_spec): Change = into ==.
637
638 2008-01-22  Daniel Franke  <franke.daniel@gmail.com>
639
640         PR fortran/34915
641         * expr.c (check_elemental): Fix check for valid data types.
642
643 2008-01-22  Tobias Burnus  <burnus@net-b.de>
644
645         PR fortran/34899
646         * scanner.c (load_line): Support <tab><digit> continuation lines.
647         * invoke.texi (-Wtabs): Document this.
648
649 2008-01-22  Paul Thomas  <pault@gcc.gnu.org>
650
651         PR fortran/34896
652         * module.c (read_module): Set use_rename attribute.
653
654 2007-01-21  Tobias Burnus  <burnus@net-b.de>
655
656         PR fortran/34901
657         * interface.c (compare_parameter): Improved error message
658         for arguments of same type and mismatched kinds.
659
660 2008-01-20  Paul Thomas  <pault@gcc.gnu.org>
661
662         PR fortran/34861
663         * resolve.c (resolve_entries): Do not do an array bounds check
664         if the result symbols are the same.
665
666         PR fortran/34854
667         * module.c (read_module) : Hide the symtree of the previous
668         version of the symbol if this symbol is renamed.
669
670 2008-01-20  Paul Thomas  <pault@gcc.gnu.org>
671
672         PR fortran/34784
673         * array.c (gfc_check_constructor_type): Clear the expression ts
674         so that the checking starts from the deepest level of array
675         constructor.
676         * primary.c (match_varspec): If an unknown type is changed to
677         default character and the attempt to match a substring fails,
678         change it back to unknown.
679
680         PR fortran/34785
681         * trans-array.c (gfc_add_loop_ss_code) : If ss->string_length is
682         NULL for an array constructor, use the cl.length expression to
683         build it.
684         (gfc_conv_array_parameter): Change call to gfc_evaluate_now to
685         a tree assignment.
686
687 2008-01-19  Thomas Koenig  <tkoenig@gcc.gnu.org>
688
689         PR fortran/34817
690         PR fortran/34838
691         * iresolve.c (gfc_resolve_all):  Remove conversion of mask
692         argument to kind=1 by removing call to resolve_mask_arg().
693         (gfc_resolve_any):  Likewise.
694
695 2008-01-19  Tobias Burnus  <burnus@net-b.de>
696
697         PR fortran/34760
698         * primary.c (match_variable): Handle FL_UNKNOWN without
699         uneducated guessing.
700         (match_variable): Improve error message.
701
702 2008-01-18  Tobias Burnus  <burnus@net-b.de>
703
704         PR fortran/32616
705         * interface.c (get_expr_storage_size): Return storage size
706         for array element designators.
707         (compare_actual_formal): Reject unequal string sizes for
708         assumed-shape dummy arguments. And fix error message for
709         array-sections with vector subscripts.
710
711 2008-01-17  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
712
713         PR fortran/34556
714         * simplify.c (is_constant_array_expr): New static function that returns
715         true if the given expression is an array and is constant.
716         (gfc_simplify_reshape): Use new function.
717
718 2008-01-17  H.J. Lu  <hongjiu.lu@intel.com>
719
720         PR fortran/33375
721         * symbol.c (free_common_tree): Renamed to ...
722         (gfc_free_common_tree): This.  Remove static.
723         (gfc_free_namespace): Updated.
724
725         * gfortran.h (gfc_free_common_tree): New.
726
727         * match.c (gfc_match_common): Call gfc_free_common_tree () with
728         gfc_current_ns->common_root and set gfc_current_ns->common_root
729         to NULL on syntax error.
730
731 2008-01-18  Richard Sandiford  <rsandifo@nildram.co.uk>
732
733         PR fortran/34686
734         * trans-expr.c (gfc_conv_function_call): Use proper
735         type for returned character pointers.
736
737 2008-01-17  Paul Thomas  <pault@gcc.gnu.org>
738
739         PR fortran/34429
740         PR fortran/34431
741         PR fortran/34471
742         * decl.c : Remove gfc_function_kind_locus and
743         gfc_function_type_locus. Add gfc_matching_function.
744         (match_char_length): If matching a function and the length
745         does not match, return MATCH_YES and try again later.
746         (gfc_match_kind_spec): The same.
747         (match_char_kind): The same.
748         (gfc_match_type_spec): The same for numeric and derived types.
749         (match_prefix): Rename as gfc_match_prefix.
750         (gfc_match_function_decl): Except for function valued character
751         lengths, defer applying kind, type and charlen info until the
752         end of specification block.
753         gfortran.h (gfc_statement): Add ST_GET_FCN_CHARACTERISTICS.
754         parse.c (decode_specification_statement): New function.
755         (decode_statement): Call it when a function has kind = -1. Set
756         and reset gfc_matching function, as function statement is being
757         matched.
758         (match_deferred_characteristics): Simplify with a single call
759         to gfc_match_prefix. Do appropriate error handling. In any
760         case, make sure that kind = -1 is reset or corrected.
761         (parse_spec): Call above on seeing ST_GET_FCN_CHARACTERISTICS.
762         Throw an error if kind = -1 after last specification statement.
763         parse.h : Prototype for gfc_match_prefix.
764
765 2008-01-16  Tobias Burnus  <burnus@net-b.de>
766
767         PR fortran/34796
768         * interface.c (compare_parameter): Allow AS_DEFERRED array
769         elements and reject attr.pointer array elemenents.
770         (get_expr_storage_size): Return storage size of elements of
771         assumed-shape and pointer arrays.
772
773 2008-01-15  Sebastian Pop  <sebastian.pop@amd.com>
774
775         * f95-lang.c (gfc_init_builtin_functions): Initialize GOMP builtins
776         for flag_tree_parallelize_loops.
777
778 2008-01-15  Thomas Koenig  <tkoenig@gcc.gnu.org>
779
780         PR libfortran/34671
781         * iresolve.c (gfc_resolve_all):  Call resolve_mask_arg.
782         (gfc_resolve_any):  Likewise.
783         (gfc_resolve_count):  Likewise.  Don't append kind of
784         argument to function name.
785
786 2008-01-13  Tobias Burnus  <burnus@net-b.de>
787
788         PR fortran/34665
789         * resolve.c (resolve_actual_arglist): For expressions,
790         also check for assume-sized arrays.
791         * interface.c (compare_parameter): Move F2003 character checks
792         here, print error messages here, reject elements of
793         assumed-shape array as argument to dummy arrays.
794         (compare_actual_formal): Update for the changes above.
795
796 2008-01-13  Tobias Burnus  <burnus@net-b.de>
797
798         PR fortran/34763
799         * decl.c (contained_procedure): Only check directly preceeding state.
800
801 2008-01-13  Tobias Burnus  <burnus@net-b.de>
802
803         PR fortran/34759
804         * check.c (gfc_check_shape): Accept array ranges of
805         assumed-size arrays.
806
807 2008-01-12  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
808
809         PR fortran/34432
810         * match.c (gfc_match_name): Don't error if leading character is a '(',
811         just return MATCH_NO.
812
813 2008-01-11  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
814
815         PR fortran/34722
816         * trans-io.c (create_dummy_iostat): Commit the symbol.
817
818 2008-01-11  Paul Thomas  <pault@gcc.gnu.org>
819
820         PR fortran/34537
821         * simplify.c (gfc_simplify_transfer): Return NULL if the size
822         of the element is unavailable and only assign character length
823         to the result, if 'mold' is constant.
824
825 2008-01-10  Paul Thomas  <pault@gcc.gnu.org>
826
827         PR fortran/34396
828         * trans-array.c (gfc_trans_array_ctor_element):  Use gfc_trans_string_copy
829         to assign strings and perform bounds checks on the string length.
830         (get_array_ctor_strlen): Remove bounds checking.
831         (gfc_trans_array_constructor): Initialize string length checking.
832         * trans-array.h : Add prototype for gfc_trans_string_copy.
833
834 2008-01-08  Richard Guenther  <rguenther@suse.de>
835
836         PR fortran/34706
837         PR tree-optimization/34683
838         * trans-types.c (gfc_get_array_type_bounds): Use an array type
839         with known size for accesses if that is known.
840
841 2008-01-08  Paul Thomas  <pault@gcc.gnu.org>
842
843         PR fortran/34476
844         * expr.c (find_array_element): Check that the array bounds are
845         constant before using them.  Use lower, as well as upper bound.
846         (check_restricted): Allow implied index variable.
847
848 2008-01-08  Paul Thomas  <pault@gcc.gnu.org>
849
850         PR fortran/34681
851         * trans_array.c (gfc_trans_deferred_array): Do not null the
852         data pointer on entering scope, nor deallocate it on leaving
853         scope, if the symbol has the 'save' attribute.
854
855         PR fortran/34704
856         * trans_decl.c (gfc_finish_var_decl): Derived types with
857         allocatable components and an initializer must be TREE_STATIC.
858
859 2008-01-07  Paul Thomas  <pault@gcc.gnu.org>
860
861         PR fortran/34672
862         * module.c (write_generic): Rewrite completely.
863         (write_module): Change call to write_generic.
864
865 2008-01-06  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
866
867         PR fortran/34659
868         * scanner.c (load_line): Do not count ' ' as printable when checking for
869         continuations.
870
871 2008-01-06  Paul Thomas  <pault@gcc.gnu.org>
872
873         PR fortran/34545
874         * module.c (load_needed): If the namespace has no proc_name
875         give it the module symbol.
876
877 2008-01-06  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
878
879         PR fortran/34387
880         * trans-expr.c (gfc_conv_missing_dummy): Use a temporary to type convert
881         the dummy variable expression, test for NULL, and pass the variable
882         address to the called function.
883
884 2007-01-06  Tobias Burnus  <burnus@net-b.de>
885
886         PR fortran/34658
887         * match.c (gfc_match_common): Remove blank common in
888         DATA BLOCK warning.
889         * resolve.c (resolve_common_vars): New function.
890         (resolve_common_blocks): Move checks to resolve_common_vars
891         and invoke that function.
892         (resolve_types): Call resolve_common_vars for blank commons.
893
894 2008-01-06  Tobias Burnus  <burnus@net-b.de>
895
896         PR fortran/34655
897         * resolve.c (resolve_equivalence_derived): Reject derived types with
898         default initialization if equivalenced with COMMON variable.
899
900 2008-01-06  Tobias Burnus  <burnus@net-b.de>
901
902         PR fortran/34654
903         * io.c (check_io_constraints): Disallow unformatted I/O for
904         internal units.
905
906 2008-01-06  Tobias Burnus  <burnus@net-b.de>
907
908         PR fortran/34660
909         * resolve.c (resolve_formal_arglist): Reject dummy procedure in
910         ELEMENTAL functions.
911
912 2008-01-06  Tobias Burnus  <burnus@net-b.de>
913
914         PR fortran/34662
915         * interface.c (compare_actual_formal): Reject parameter
916         actual to intent(out) dummy.
917
918 2008-01-04  Tobias Burnus  <burnus@net-b.de>
919
920         PR fortran/34557
921         * primary.c (match_varspec): Gobble whitespace before
922         checking for '('.