OSDN Git Service

Mark ChangeLog
[pf3gnuchains/gcc-fork.git] / gcc / fortran / ChangeLog
1 2011-10-26  Release Manager
2
3         * GCC 4.6.2 released.
4
5 2011-10-17  Janus Weil  <janus@gcc.gnu.org>
6
7         PR fortran/47023
8         * primary.c (match_kind_param): Detect ISO_C_BINDING kinds.
9         (get_kind): Pass on 'is_iso_c' flag.
10         (match_integer_constant,match_real_constant,match_logical_constant):
11         Set 'ts.is_c_interop'.
12
13 2011-10-15  Janus Weil  <janus@gcc.gnu.org>
14
15         PR fortran/50570
16         * expr.c (gfc_check_vardef_context): Don't throw an error on
17         non-pointer assignments involving an intent(in) pointer dummy.
18
19 2011-10-15  Tobias Burnus  <burnus@net-b.de>
20
21         PR fortran/50718
22         * gfortran.dg/pointer_check_11.f90: New.
23         * gfortran.dg/pointer_check_12.f90: New.
24
25 2011-10-12  Janus Weil  <janus@gcc.gnu.org>
26
27         PR fortran/50659
28         * expr.c (replace_symbol): Only do replacement if the symbol is a dummy.
29
30 2011-10-11  Tobias Burnus  <burnus@net-b.de>
31             Janus Weil  <janus@gcc.gnu.org>
32
33         * invoke.texi (-fwhole-file): Update wording since -fwhole-file
34         is now enabled by default.
35
36 2011-10-11  Tobias Burnus  <burnus@net-b.de>
37
38         PR fortran/50273
39         * trans-common.c (translate_common): Fix -Walign-commons check.
40
41 2011-10-07  Janus Weil  <janus@gcc.gnu.org>
42
43         PR fortran/50585
44         * interface.c (get_expr_storage_size): Check if 'length' component is
45         associated.
46
47         PR fortran/50625
48         * class.c (gfc_build_class_symbol): Fix whitespace.
49         * module.c (mio_symbol): Set 'class_ok' attribute.
50         * trans-decl.c (gfc_get_symbol_decl): Make sure the backend_decl has
51         been built for class symbols.
52
53 2011-10-04  Janus Weil  <janus@gcc.gnu.org>
54
55         PR fortran/48706
56         * module.c (write_dt_extensions): Do not write extended types which
57         are local to a subroutine.
58
59 2011-08-26  Mikael Morin  <mikael.morin@gcc.gnu.org>
60
61         PR fortran/50050
62         * expr.c (gfc_free_shape): Do nothing if shape is NULL.
63         (free_expr0): Remove redundant NULL shape check.
64         * resolve.c (check_host_association): Ditto.
65         * trans-expr.c (gfc_trans_subarray_assign): Assert that shape is
66         non-NULL.
67         * trans-io.c (transfer_array_component): Ditto.
68
69 2011-08-25  Tobias Burnus  <burnus@net-b.de>
70
71         PR fortran/50163
72         * check_init_expr (check_init_expr): Return when an error occured.
73
74 2011-08-22  Mikael Morin  <mikael.morin@gcc.gnu.org>
75
76         PR fortran/50050
77         * gfortran.h (gfc_clear_shape, gfc_free_shape): New prototypes.
78         * expr.c (gfc_clear_shape, gfc_free_shape): New functions.
79         (free_expr0): Re-use gfc_free_shape.
80         * trans-expr.c (gfc_trans_subarray_assign): Ditto.
81         * trans-io.c (transfer_array_component): Ditto.
82         * resolve.c (check_host_association): Ditto.
83         (gfc_expr_to_initialize): Don't force the rank value and free the shape
84         after updating the expression. Recalculate shape and rank.
85         (resolve_where_shape): Re-use gfc_clear_shape.
86         * array.c (gfc_array_ref_shape): Ditto.
87
88 2011-08-22  Thomas Koenig  <tkoenig@gcc.gnu.org>
89
90         Backport from trunk
91         PR fortran/50130
92         * resolve.c (resolve_array_ref):  Don't calculate upper bound
93         if the stride is zero.
94
95 2011-08-20  Mikael Morin  <mikael.morin@sfr.fr>
96
97         PR fortran/50129
98         * parse.c (parse_where): Undo changes after emitting an error.
99
100 2011-08-19  Jakub Jelinek  <jakub@redhat.com>
101
102         PR fortran/49792
103         * trans-expr.c (gfc_trans_assignment_1): Set OMPWS_SCALARIZER_WS
104         bit in ompws_flags only if loop.temp_ss is NULL, and clear it if
105         lhs needs reallocation.
106         * trans-openmp.c (gfc_trans_omp_workshare): Don't return early if
107         code is NULL, emit a barrier if workshare emitted no code at all
108         and NOWAIT clause isn't present.
109
110 2011-08-05  Janus Weil  <janus@gcc.gnu.org>
111
112         PR fortran/49112
113         * resolve.c (resolve_structure_cons): Don't do the full dt resolution,
114         only call 'resolve_fl_derived0'.
115         (resolve_typebound_procedures): Resolve typebound procedures of
116         parent type.
117         (resolve_fl_derived0): New function, which does a part of the work
118         for 'resolve_fl_derived'.
119         (resolve_fl_derived): Call 'resolve_fl_derived0' and do some additional
120         things.
121
122 2011-08-03  Daniel Kraft  <d@domob.eu>
123
124         PR fortran/49885
125         * trans-array.c (gfc_trans_auto_array_allocation): Change
126         gfc_start_block to gfc_init_block to avoid spurious extra-scope.
127
128 2011-07-30  Thomas Koenig  <tkoenig@gcc.gnu.org>
129
130         Backport from trunk.
131         PR fortran/48876
132         * expr.c (gfc_simplify_expr):  If end of a string is less
133         than zero, set it to zero.
134
135 2011-07-28  Tobias Burnus  <burnus@net-b.de>
136
137         PR fortran/45586
138         * trans-types.c (gfc_get_derived_type): Ensure that pointer
139         component types are marked as nonrestricted.
140
141 2011-07-23  Janus Weil  <janus@gcc.gnu.org>
142
143         PR fortran/49708
144         * resolve.c (resolve_allocate_expr): Fix diagnostics for pointers.
145
146 2011-07-18  Mikael Morin  <mikael.morin@sfr.fr>
147
148         PR fortran/49648
149         * resolve.c (resolve_symbol): Force resolution of function result's
150         array specification.
151
152 2011-07-11  Jakub Jelinek  <jakub@redhat.com>
153
154         PR fortran/49698
155         * trans-stmt.c (gfc_trans_pointer_assign_need_temp): Initialize
156         inner_size to gfc_index_one_node instead of integer_one_node.
157
158 2011-07-10  Tobias Burnus  <burnus@net-b.de>
159
160         PR fortran/49690
161         * intrinsic.c (add_functions): Use BT_VOID for 2nd argument of SIGNAL.
162
163 2011-07-10  Janus Weil  <janus@gcc.gnu.org>
164
165         PR fortran/49562
166         * expr.c (gfc_check_vardef_context): Handle type-bound procedures.
167
168 2011-07-09  Uros Bizjak  <ubizjak@gmail.com>
169
170         PR fortran/48926
171         * expr.c (gfc_get_corank): Change return value to int.
172         * gfortran.h (gfc_get_corank): Update function prototype.
173
174 2011-07-04  Jakub Jelinek  <jakub@redhat.com>
175
176         PR fortran/49623
177         * gfortranspec.c (lang_specific_driver): Ignore options with
178         CL_ERR_MISSING_ARG errors.
179
180         Backported from mainline
181         2011-06-30  Jakub Jelinek  <jakub@redhat.com>
182
183         PR fortran/49540
184         * gfortran.h (gfc_constructor): Add repeat field.
185         * trans-array.c (gfc_conv_array_initializer): Handle repeat > 1.
186         * array.c (current_expand): Add repeat field.
187         (expand_constructor): Copy repeat.
188         * constructor.c (node_free, node_copy, gfc_constructor_get,
189         gfc_constructor_lookup): Handle repeat field.
190         (gfc_constructor_lookup_next, gfc_constructor_remove): New functions.
191         * data.h (gfc_assign_data_value): Add mpz_t * argument.
192         (gfc_assign_data_value_range): Removed.
193         * constructor.h (gfc_constructor_advance): Removed.
194         (gfc_constructor_lookup_next, gfc_constructor_remove): New prototypes.
195         * data.c (gfc_assign_data_value): Add REPEAT argument, handle it and
196         also handle overwriting a range with a single entry.
197         (gfc_assign_data_value_range): Removed.
198         * resolve.c (check_data_variable): Adjust gfc_assign_data_value
199         call.  Use gfc_assign_data_value instead of
200         gfc_assign_data_value_expr.
201
202 2011-07-02  Janus Weil  <janus@gcc.gnu.org>
203
204         PR fortran/49466
205         * trans-array.c (structure_alloc_comps): Make sure sub-components
206         and extended types are correctly deallocated.
207
208 2011-06-27  Release Manager
209
210         * GCC 4.6.1 released.
211
212 2011-06-21  Janus Weil  <janus@gcc.gnu.org>
213
214         PR fortran/49112
215         * class.c (gfc_find_derived_vtab): Make vtab and default initialization
216         symbols SAVE_IMPLICIT.
217
218 2011-06-19  Janus Weil  <janus@gcc.gnu.org>
219
220         PR fortran/47601
221         * module.c (mio_component_ref): Handle components of extended types.
222         * symbol.c (gfc_find_component): Return if sym is NULL.
223
224         PR fortran/48699
225         * check.c (gfc_check_move_alloc): If 'TO' argument is polymorphic,
226         make sure the vtab is present.
227
228         PR fortran/49074
229         * interface.c (gfc_extend_assign): Propagate the locus from the
230         assignment to the type-bound procedure call.
231
232         PR fortran/49417
233         * module.c (mio_component): Make sure the 'class_ok' attribute is set
234         for use-associated CLASS components.
235         * parse.c (parse_derived): Check for 'class_ok' attribute.
236         * resolve.c (resolve_fl_derived): Ditto.
237
238 2011-06-17  Tobias Burnus
239
240         PR fortran/49324
241         * trans-expr.c (gfc_trans_assignment_1): Tell
242         gfc_trans_scalar_assign to also deep-copy RHS nonvariables
243         with allocatable components.
244         * trans-array.c (gfc_conv_expr_descriptor): Ditto.
245
246 2011-06-06  Asher Langton  <langton2@llnl.gov>
247
248         PR fortran/49268
249         * trans-decl.c (gfc_trans_deferred_vars): Treat assumed-size Cray
250         pointees as AS_EXPLICIT.
251
252 2011-06-02  Steven G. Kargl  <kargl@gcc.gnu.org>
253
254         PR fortran/49265
255         * decl.c (gfc_match_modproc):  Allow for a double colon in a module
256         procedure statement.
257         * parse.c ( decode_statement): Deal with whitespace around :: in
258         gfc_match_modproc.
259
260 2011-05-31  Thomas Koenig  <tkoenig@gcc.gnu.org>
261
262         Backport from trunk
263         PR fortran/45786
264         * interface.c (gfc_equivalent_op):  New function.
265         (gfc_check_interface):  Use gfc_equivalent_op instead
266         of switch statement.
267         * decl.c (access_attr_decl):  Also set access to an
268         equivalent operator.
269
270 2011-05-26  Paul Thomas  <pault@gcc.gnu.org>
271             Thomas Koenig  <tkoenig@gcc.gnu.org>
272
273         PR fortran/48955
274         * trans-expr.c (gfc_trans_assignment_1): GFC_REVERSE_NOT_SET
275         changed to GFC_ENABLE_REVERSE.
276         * trans-array.c (gfc_init_loopinfo): GFC_CANNOT_REVERSE changed
277         to GFC_INHIBIT_REVERSE.
278         * gfortran.h : Enum gfc_reverse is now GFC_ENABLE_REVERSE,
279         GFC_FORWARD_SET, GFC_REVERSE_SET and GFC_INHIBIT_REVERSE.
280         * dependency.c (gfc_dep_resolver): Change names for elements of
281         gfc_reverse as necessary. Change the logic so that forward
282         dependences are remembered as well as backward ones. When both
283         have appeared, force a temporary.
284
285 2011-05-11  Tobias Burnus  <burnus@net-b.de>
286
287         PR fortran/48889
288         * expr.c (gfc_is_constant_expr): Use e->value.function.esym
289         instead of e->symtree->n.sym, if available.
290
291 2011-05-04  Steven G. Kargl  <kargl@gcc.gnu.org>
292
293         PR fortran/48720
294         * gfortran.texi: Document the 'Q' exponent-letter extension.
295         * invoke.texi: Document -Wreal-q-constant.
296         * lang.opt: Add -Wreal-q-constant option.
297         * gfortran.h: Add warn_real_q_constant to option struct.
298         * primary.c (match_real_constant):  Use it.  Accept 'Q' as
299         exponent-letter for REAL(16) real-literal-constant with a
300         fallback to REAL(10) or error if REAL(10) is not available.
301         * options.c (gfc_init_options, set_Wall) Set it.
302         (gfc_handle_option): Handle new option.
303
304 2011-04-30  Paul Thomas  <pault@gcc.gnu.org>
305
306         PR fortran/48462
307         PR fortran/48746
308         * trans-expr.c ( arrayfunc_assign_needs_temporary): Need a temp
309         if automatic reallocation on assignement is active, the lhs is a
310         target and the rhs an intrinsic function.
311         (realloc_lhs_bounds_for_intrinsic_call): Rename as next.
312         (fcncall_realloc_result): Renamed version of above function.
313         Free the original descriptor data after the function call.Set the bounds and the
314         offset so that the lbounds are one.
315         (gfc_trans_arrayfunc_assign): Call renamed function.
316
317 2011-04-29  Tobias Burnus  <burnus@net-b.de>
318
319         PR fortran/48810
320         * resolve.c (resolve_typebound_generic_call): Don't check access
321         flags of the specific function.
322
323         PR fortran/48800
324         * resolve.c (resolve_formal_arglist): Don't change AS_DEFERRED
325         to AS_ASSUMED_SHAPE for function results.
326         (resolve_fl_var_and_proc): Print also for function results with
327         AS_DEFERRED an error, if they are not a pointer or allocatable.
328         (resolve_types): Make sure arguments of procedures in interface
329         blocks are resolved.
330
331 2011-04-28  Tobias Burnus  <burnus@net-b.de>
332
333         PR fortran/48112
334         * resolve.c (resolve_fl_var_and_proc): Print diagnostic of
335         function results only once.
336         (resolve_symbol): Always resolve function results.
337
338         PR fortran/48279
339         * expr.c (gfc_check_vardef_context): Fix handling of generic
340         EXPR_FUNCTION.
341         * interface.c (check_interface0): Reject internal functions
342         in generic interfaces, unless -std=gnu.
343
344 2011-04-28  Tobias Burnus  <burnus@net-b.de>
345
346         PR fortran/48788
347         * resolve.c (resolve_global_procedure): Error recovery -
348         avoid segfault for (non)character-returning functions.
349
350 2011-04-26  Tobias Burnus  <burnus@net-b.de>
351
352         PR fortran/48588
353         * parse.c (resolve_all_program_units): Skip modules.
354         (translate_all_program_units): Handle modules.
355         (gfc_parse_file): Defer code generation for modules.
356         * module.c (fix_mio_expr): Commit created symbol.
357
358 2011-04-13  Paul Thomas  <pault@gcc.gnu.org>
359
360         PR fortran/48360
361         PR fortran/48456
362         * trans-array.c (get_std_lbound): For derived type variables
363         return array valued component lbound.
364
365 2011-04-05  Duncan Sands  <baldrick@free.fr>
366
367         * f95-lang.c (build_builtin_fntypes): Swap frexp parameter types.
368
369 2011-04-04  Janus Weil  <janus@gcc.gnu.org>
370
371         PR fortran/48291
372         * class.c (get_unique_hashed_string): Adjust maximum allowable length
373         for unique type string.
374
375 2011-03-25  Release Manager
376
377         * GCC 4.6.0 released.
378
379 2011-03-12  Janus Weil  <janus@gcc.gnu.org>
380
381         PR fortran/48059
382         * trans-expr.c (gfc_apply_interface_mapping_to_expr): Replace base type
383         for polymorphic arguments.
384
385 2011-03-12  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
386
387         PR fortran/48054
388         * intrinsic.texi: Clarify doc of logarithm functions.
389
390 2011-03-12  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
391
392         PR fortran/47552
393         * trans-intrinsic.c (gfc_conv_intrinsic_ctime): Fix type of
394         the string length variable.
395
396 2011-03-11  Janus Weil  <janus@gcc.gnu.org>
397
398         PR fortran/47768
399         * module.c (ab_attribute,attr_bits): Add AB_PROC_POINTER_COMP.
400         (mio_symbol_attribute): Handle attribute 'proc_pointer_comp'.
401
402 2011-03-06  Paul Thomas  <pault@gcc.gnu.org>
403             Jerry DeLisle  <jvdelisle@gcc.gnu.org>
404
405         PR fortran/47850
406         * expr.c (gfc_is_constant_expr): Only use gfc_constant_ac if
407         the expression has an iterator.  Otherwise, iterate through the
408         array, checking for constant expressions for each element.
409
410 2011-03-04  Janne Blomqvist  <jb@gcc.gnu.org>
411
412         PR libfortran/47802
413         * intrinsic.texi: Update CTIME and FDATE documentation.
414
415 2011-03-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
416
417         * invoke.texi (Option Summary, Fortran Dialect Options)
418         (Preprocessing Options, Runtime Options, Code Gen Options):
419         Fix vertical list spacing by using @itemx for additinoal
420         items, empty line before @table.  Fix typos.
421
422 2011-02-28  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
423
424         PR fortran/47894
425         * intrinsic.texi: Fix doc of the VERIFY intrinsic.
426
427 2011-02-26  Tobias Burnus  <burnus@net-b.de>
428
429         PR fortran/47846
430         * trans-stmt.c (gfc_trans_allocate): Fix allocation with
431         type-spec of deferred-length strings.
432
433 2011-02-26  Tobias Burnus  <burnus@net-b.de>
434
435         PR fortran/47886
436         * openmp.c (gfc_resolve_omp_directive): Resolve if()
437         condition of OpenMP's task.
438
439 2011-02-26  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
440
441         PR fortran/47894
442         * intrinsic.texi: Fix doc of the VERIFY intrinsic.
443
444 2011-02-24  Tobias Burnus  <burnus@net-b.de>
445
446         PR fortran/47872
447         * intrinsic.texi (ALLOCATED, ATAN, BESSEL_JN, BESSEL_YN): Add
448         multitable for linebreak between different syntax variants.
449
450 2011-02-24  Richard Guenther  <rguenther@suse.de>
451
452         PR fortran/47839
453         * f95-lang.c (pushdecl): For externs in non-global scope push
454         a copy of the decl into the BLOCK.
455
456 2011-02-23  Mikael Morin  <mikael@gcc.gnu.org>
457
458         PR fortran/40850
459         * trans.c (gfc_prepend_expr_to_block): New function.
460         * trans.h (gfc_prepend_expr_to_block): Declare.
461         * trans-array.c (gfc_conv_array_parameter): Replace
462         gfc_add_expr_to_block with gfc_prepend_expr_to_block.
463
464 2011-02-22  Paul Thomas  <pault@gcc.gnu.org>
465
466         PR fortran/45743
467         * trans-decl.c (gfc_get_extern_function_decl): Don't use the
468         gsymbol backend_decl if the procedure has a formal argument
469         that is a procedure.
470
471 2011-02-22  Tobias Burnus  <burnus@net-b.de>
472
473         PR fortran/41359
474         * trans-stmt.c (gfc_trans_if_1): Use correct line for
475         expressions in the if condition.
476
477 2011-02-20  Tobias Burnus  <burnus@net-b.de>
478
479         PR fortran/47797
480         * trans-decl.c (gfc_trans_deferred_vars): Use gfc_set_backend_locus and
481         gfc_restore_backend_locus to have better debug locations.
482         * trans-array.c (gfc_trans_deferred_array): Ditto.
483
484 2011-02-20  Paul Thomas  <pault@gcc.gnu.org>
485
486         PR fortran/45077
487         PR fortran/44945
488         * trans-types.c (gfc_get_derived_type): Remove code that looks
489         for decls in gsym and add call to gfc_get_module_backend_decl.
490         * trans.h : Add prototype for gfc_get_module_backend_decl.
491         * trans-decl.c (gfc_get_module_backend_decl): New function.
492         (gfc_get_symbol_decl): Call it.
493
494 2011-02-19  Paul Thomas  <pault@gcc.gnu.org>
495
496         PR fortran/47348
497         * trans-array.c (get_array_ctor_all_strlen): Move up in file.
498         (get_array_ctor_var_strlen): Add block dummy and add call to
499         get_array_ctor_all_strlen instead of giving up on substrings.
500         Call gcc_unreachable for default case.
501         (get_array_ctor_strlen): Add extra argument to in call to
502         get_array_ctor_var_strlen.
503
504 2011-02-18  Janus Weil  <janus@gcc.gnu.org>
505
506         PR fortran/47789
507         * primary.c (gfc_match_structure_constructor): Handle empty parent
508         types.
509
510 2011-02-18  Tobias Burnus
511
512         PR fortran/47775
513         * trans-expr.c (arrayfunc_assign_needs_temporary): Use
514         esym to check whether the specific procedure returns an
515         allocatable or pointer.
516
517 2011-02-18  Michael Matz  <matz@suse.de>
518
519         PR fortran/45586
520         * gfortran.h (struct gfc_component): Add norestrict_decl member.
521         * trans.h (struct lang_type): Add nonrestricted_type member.
522         * trans-expr.c (gfc_conv_component_ref): Search fields with correct
523         parent type.
524         * trans-types.c (mirror_fields, gfc_nonrestricted_type): New.
525         (gfc_sym_type): Use it.
526
527 2011-02-18  Janus Weil  <janus@gcc.gnu.org>
528
529         PR fortran/47768
530         * resolve.c (resolve_transfer): Reject variables with procedure pointer
531         components.
532
533 2011-02-18  Janus Weil  <janus@gcc.gnu.org>
534
535         PR fortran/47767
536         * gfortran.h (gfc_check_access): Removed prototype.
537         (gfc_check_symbol_access): Added prototype.
538         * module.c (gfc_check_access): Renamed to 'check_access', made static.
539         (gfc_check_symbol_access): New function, basically a shortcut for
540         'check_access'.
541         (write_dt_extensions,write_symbol0,write_generic,write_symtree): Use
542         'gfc_check_symbol_access'.
543         (write_operator,write_module): Renamed 'gfc_check_access'.
544         * resolve.c (resolve_fl_procedure,resolve_fl_derived,
545         resolve_fl_namelist,resolve_symbol,resolve_fntype): Use
546         'gfc_check_symbol_access'.
547
548 2011-02-16  Janus Weil  <janus@gcc.gnu.org>
549
550         PR fortran/47745
551         * class.c (gfc_build_class_symbol): Set 'class_ok' attribute.
552         * decl.c (build_sym,attr_decl1): Move setting of 'class_ok' into
553         'gfc_build_class_symbol'.
554         (gfc_match_decl_type_spec): Reject unlimited polymorphism.
555         * interface.c (matching_typebound_op): Check for 'class_ok' attribute.
556         * match.c (select_type_set_tmp): Move setting of 'class_ok' into
557         'gfc_build_class_symbol'.
558         * primary.c (gfc_variable_attr): Check for 'class_ok' attribute.
559
560 2011-02-15  Steven G. Kargl  <kargl@gcc.gnu.org>
561
562         PR fortran/47633
563         . simplify.c (gfc_simplify_compiler_version): Fix off-by-one issue.
564
565 2011-02-14  Janus Weil  <janus@gcc.gnu.org>
566
567         PR fortran/47730
568         * parse.c (gfc_build_block_ns): Commit 'block@' symbol.
569
570 2011-02-14  Janus Weil  <janus@gcc.gnu.org>
571
572         PR fortran/47728
573         * class.c (gfc_build_class_symbol): Give a fatal error on polymorphic
574         arrays.
575         * primary.c (gfc_match_varspec): Avoid ICE for invalid class
576         declaration.
577
578 2011-02-14  Janus Weil  <janus@gcc.gnu.org>
579
580         PR fortran/47349
581         * interface.c (get_expr_storage_size): Handle derived-type components.
582
583 2011-02-13  Tobias Burnus  <burnus@net-b.de>
584
585         PR fortran/47569
586         * interface.c (compare_parameter): Avoid ICE with
587         character components.
588
589 2011-02-12  Janus Weil  <janus@gcc.gnu.org>
590
591         * class.c (gfc_build_class_symbol): Reject polymorphic arrays.
592         * decl.c (build_sym,build_struct,attr_decl1): Use return value of
593         'gfc_build_class_symbol'.
594
595 2011-02-12  Michael Matz  <matz@suse.de>
596             Janus Weil  <janus@gcc.gnu.org>
597             Tobias Burnus  <burnus@net-b.de>
598
599         PR fortran/45586
600         * trans-expr.c (conv_parent_component_references): Avoid unintendent
601         skipping of parent compounds.
602
603 2011-02-11  Tobias Burnus  <burnus@net-b.de>
604
605         PR fortran/47550
606         * resolve.c (resolve_formal_arglist): PURE with VALUE
607         and no INTENT: Add -std= diagnostics.
608
609 2011-02-09  Janus Weil  <janus@gcc.gnu.org>
610
611         PR fortran/47352
612         * resolve.c (resolve_procedure_interface): If interface has a result
613         variable, copy the typespec and set result pointer to self.
614
615 2011-02-09  Janus Weil  <janus@gcc.gnu.org>
616
617         PR fortran/47463
618         * resolve.c (resolve_typebound_subroutine): Remove erroneous line.
619
620 2011-02-09  Janus Weil  <janus@gcc.gnu.org>
621
622         PR fortran/47637
623         * trans-decl.c (init_intent_out_dt): Handle CLASS arguments.
624
625 2011-02-08  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
626
627         * io.c (match_io_element): Do not set dt if not inquire.
628
629 2011-02-08  Janus Weil  <janus@gcc.gnu.org>
630
631         PR fortran/45290
632         * expr.c (gfc_check_assign_symbol): Reject pointers as pointer
633         initialization target.
634
635 2011-02-07  Janne Blomqvist  <jb@gcc.gnu.org>
636             Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
637
638         * gfortran.texi (Thread-safety): texinfo styling fixes.
639         * intrinsic.texi: Likewise.
640
641 2011-02-06  Janne Blomqvist  <jb@gcc.gnu.org>
642
643         * gfortran.texi (Compiler Characteristics): Add reference to
644         thread-safety section.
645
646 2011-02-06  Janne Blomqvist  <jb@gcc.gnu.org>
647
648         * gfortran.texi (Thread-safety): New section.
649         * intrinsic.texi (EXECUTE_COMMAND_LINE): Mention thread-safety.
650         (GETENV): Likewise.
651         (GET_ENVIRONMENT_VARIABLE): Likewise.
652         (SYSTEM): Likewise.
653
654 2011-02-06  Paul Thomas  <pault@gcc.gnu.org>
655
656         PR fortran/47592
657         * trans-stmt.c (gfc_trans_allocate): For deferred character
658         length allocations with SOURCE, store to the values and string
659         length to avoid calculating twice.  Replace gfc_start_block
660         with gfc_init_block to avoid unnecessary contexts and to keep
661         declarations of temporaries where they should be. Tidy up the
662         code a bit.
663
664 2011-02-05  Janne Blomqvist  <jb@gcc.gnu.org>
665
666         PR fortran/42434
667         * intrinsic.texi (SYSTEM_CLOCK): Update documentation.
668
669 2011-02-02  Janus Weil  <janus@gcc.gnu.org>
670             Paul Thomas  <pault@gcc.gnu.org>
671
672         PR fortran/47082
673         * trans-expr.c (gfc_trans_class_init_assign): Add call to
674         gfc_get_derived_type.
675         * module.c (read_cleanup): Do not use unique_symtrees for vtabs
676         or vtypes.
677
678 2011-02-02  Janus Weil  <janus@gcc.gnu.org>
679
680         PR fortran/47572
681         * resolve.c (resolve_fl_variable): Handle polymorphic allocatables.
682
683 2011-02-01  Janus Weil  <janus@gcc.gnu.org>
684
685         PR fortran/47565
686         * trans-expr.c (gfc_conv_structure): Handle constructors for procedure
687         pointer components with allocatable result.
688
689 2011-01-31  Janus Weil  <janus@gcc.gnu.org>
690
691         PR fortran/47455
692         * trans-expr.c (gfc_conv_procedure_call): Handle procedure pointers
693         with pointer or allocatable result.
694
695 2011-01-31  Paul Thomas  <pault@gcc.gnu.org>
696
697         PR fortran/47519
698         * trans-stmt.c (gfc_trans_allocate): Improve handling of
699         deferred character lengths with SOURCE.
700         * iresolve.c (gfc_resolve_repeat): Calculate character
701         length from source length and ncopies.
702         * dump-parse-tree.c (show_code_node): Show MOLD and SOURCE
703         expressions for ALLOCATE.
704
705 2011-01-31  Janus Weil  <janus@gcc.gnu.org>
706
707         PR fortran/47463
708         * resolve.c (resolve_typebound_subroutine): Bug fix for the case of
709         an argument of a typebound assignment being a component.
710
711 2011-01-31  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
712
713         * gfortranspec.c (add_arg_libgfortran) [HAVE_LD_STATIC_DYNAMIC] Use
714         LD_STATIC_OPTION, LD_DYNAMIC_OPTION.
715
716 2011-01-31  Tobias Burnus  <burnus@net-b.de>
717
718         PR fortran/47042
719         * resolve.c (resolve_fl_procedure): Reject stmt functions
720         with pointer/allocatable attribute.
721
722 2011-01-31  Tobias Burnus  <burnus@net-b.de>
723
724         PR fortran/47042
725         * interface.c (gfc_procedure_use): Add explicit interface check for
726         pointer/allocatable functions.
727
728 2011-01-30  Paul Thomas  <pault@gcc.gnu.org>
729
730         PR fortran/47523
731         * trans-expr.c (gfc_trans_assignment_1): If the rhs is an op
732         expr and is assigned to a deferred character length scalar,
733         make sure that the function is called before reallocation,
734         so that the length is available. Include procedure pointer
735         and procedure pointer component rhs as well.
736
737         PR fortran/45170
738         PR fortran/35810
739         PR fortran/47350
740         * gfortran.dg/allocatable_function_5.f90: New test not added by
741         mistake on 2011-01-28.
742
743 2011-01-29  Tobias Burnus  <burnus@net-b.de>
744
745         PR fortran/47531
746         * check.c (gfc_check_shape): Support kind argument in SHAPE.
747         * intrinsic.c (add_functions): Ditto.
748         * resolve.c (gfc_resolve_shape): Ditto.
749         * simplify.c (gfc_simplify_shape): Ditto.
750         * intrinsic.h (gfc_check_shape, gfc_resolve_shape,
751         gfc_simplify_shape): Update prototypes.
752         * intrinisc.text (SHAPE): Document kind argument.
753
754 2011-01-28  Tobias Burnus  <burnus@net-b.de>
755
756         PR fortran/47507
757         * resolve.c (resolve_formal_arglist): Allow arguments with VALUE
758         attribute also without INTENT.
759
760 2011-01-28  Tobias Burnus  <burnus@net-b.de>
761
762         * gfortran.texi (Fortran 2003 status): Mention support for
763         nonconstant namelist variables.
764
765 2011-01-28  Paul Thomas  <pault@gcc.gnu.org>
766             Tobias Burnus  <burnus@gcc.gnu.org>
767
768         PR fortran/45170
769         PR fortran/35810
770         PR fortran/47350
771         * interface.c (compare_actual_formal): An allocatable or pointer
772         deferred length actual is only allowed if the formal argument
773         is also deferred length. Clean up whitespace.
774         * trans-expr.c (gfc_conv_procedure_call): Pass string length for
775         deferred character length formal arguments by reference. Do the
776         same for function results.
777         (gfc_trans_pointer_assignment): Do not do runtime check of lhs
778         and rhs character lengths, if deferred length lhs.  In this case
779         set the lhs character length to that of the rhs.
780         (gfc_conv_string_parameter): Remove assert that string length is
781         an integer type.
782         (is_scalar_reallocatable_lhs): New function.
783         (alloc_scalar_allocatable_for_assignment): New function.
784         (gfc_trans_assignment_1): Call above new function. If the rhs is
785         a deferred character length itself, makes ure that the function
786         is called before reallocation, so that the length is available.
787         (gfc_trans_asssignment): Remove error about assignment to
788         deferred length character variables.
789         * gfortran.texi : Update entry about (re)allocation on
790         assignment.
791         * trans-stmt.c (gfc_trans_allocate): Add code to handle deferred
792         length character variables.
793         * module.c (mio_typespec): Transfer deferred characteristic.
794         * trans-types.c (gfc_get_function_type): New code to generate
795         hidden typelist, so that those character lengths that are
796         passed by reference get the right type.
797         * resolve.c (resolve_contained_fntype): Supress error for
798         deferred character length functions.
799         (resolve_function, resolve_fl_procedure) The same.
800         (check_symbols): Remove the error that support for
801         entity with deferred type parameter is not yet implemented.
802         (resolve_fl_derived): The same.
803         match.c (alloc_opt_list): Allow MOLD for deferred length object.
804         * trans-decl.c (gfc_get_symbol_decl): For deferred character
805         length dummies, generate a local variable for string length.
806         (create_function_arglist): Hidden length can be a pointer.
807         (gfc_trans_deferred_vars): For deferred character length
808         results and dummies, assign the string length to the local
809         variable from the hidden argument on entry and the other way
810         round on exit, as appropriate.
811
812 2011-01-27  Tobias Burnus  <burnus@net-b.de>
813
814         PR fortran/47474
815         * trans-decl.c (gfc_generate_function_code): Fix init
816         of allocatable result variable with allocatable components.
817
818 2011-01-27  Tobias Burnus  <burnus@net-b.de>
819
820         PR fortran/47472
821         * options.c (gfc_handle_module_path_options): Save
822         module path without trailing slash as include path.
823
824 2011-01-25  Tobias Burnus  <burnus@net-b.de>
825
826         PR fortran/47448
827         * interface.c (gfc_check_operator_interface): Fix
828         defined-assignment check.
829
830 2011-01-23  Tobias Burnus  <burnus@net-b.de>
831
832         PR fortran/47421
833         * trans-decl.c (gfc_trans_deferred_vars): Do not nullify
834         scalar allocatable dummy arguments.
835
836 2011-01-22  Thomas Koenig  <tkoenig@gcc.gnu.org>
837
838         PR fortran/38536
839         * resolve.c (gfc_iso_c_func_interface):  For C_LOC,
840         check for array sections followed by component references
841         which are illegal.  Also check for coindexed arguments.
842
843 2011-01-22  Tobias Burnus  <burnus@net-b.de>
844
845         PR fortran/47399
846         * primary.c (gfc_match_varspec): Relax gcc_assert to allow for
847         PARAMETER TBP.
848
849 2011-01-21  Tobias Burnus  <burnus@net-b.de>
850
851         PR fortran/47394
852         * error.c (gfc_error_now, gfc_fatal_error, gfc_error_check):
853         Use defined instead of magic number exit status codes.
854         * scanner.c (include_line, gfc_new_file): Ditto.
855
856 2011-01-21  Tobias Burnus  <burnus@net-b.de>
857
858         PR fortran/47377
859         * expr.c (gfc_check_pointer_assign): Reject expr data-targets
860         without pointer attribute.
861
862 2011-01-18  Janus Weil  <janus@gcc.gnu.org>
863
864         PR fortran/47240
865         * resolve.c (expression_rank): Fix rank of procedure poiner components.
866         * trans-expr.c (gfc_conv_procedure_call): Take care of procedure
867         pointer components as actual arguments.
868
869 2011-01-17  Jakub Jelinek  <jakub@redhat.com>
870
871         PR fortran/47331
872         * gfortran.h (struct gfc_omp_saved_state): New type.
873         (gfc_omp_save_and_clear_state, gfc_omp_restore_state): New prototypes.
874         * resolve.c (resolve_global_procedure): Call it around gfc_resolve
875         call.
876         * openmp.c (gfc_omp_save_and_clear_state, gfc_omp_restore_state): New
877         functions.
878
879 2011-01-17  Tobias Burnus  <burnus@net-b.de>
880
881         PR fortran/47327
882         * invoke.texi (Options to request or suppress errors
883         and warnings): Fix cross link.
884
885 2011-01-15  Tobias Burnus  <burnus@net-b.de>
886
887         * gfortran.texi: Update Fortran 2003 Status section.
888
889         PR fortran/47177
890         * invoke.texi: Add missing "-E" to the -dM example.
891
892 2011-01-13  Tobias Burnus  <burnus@net-b.de>
893
894         PR fortran/47268
895         * intrinsic.texi (get_command_argument, get_environment_variable):
896         Mark arguments as optional in the Arguments section.
897
898 2011-01-13  Kai Tietz  <kai.tietz@onevision.com>
899             Tobias Burnus  <burnus@net-b.de>
900
901         PR fortran/47260
902         * trans-decl.c (gfc_get_extern_function_decl,
903         build_function_decl): Set TREE_PUBLIC/TREE_EXTERNAL before
904         calling decl_attributes.
905
906 2011-01-13  Tobias Burnus  <burnus@net-b.de>
907             Mikael Morin  <mikael@gcc.gnu.org>
908
909         PR fortran/45848
910         PR fortran/47204
911         * gfortran.h (gfc_code): Move union ext's case_list into
912         the struct block.
913         * dump-parse-tree.c (show_code_node): Adapt by prefixing case_list
914         by "block.".
915         * frontend-passes.c (gfc_code_walker): Ditto.
916         * match.c (gfc_match_goto, gfc_match_call, gfc_match_case,
917         gfc_match_type_is, gfc_match_class_is): Ditto.
918         * resolve.c (resolve_select, resolve_select_type): Ditto.
919         * st.c (gfc_free_statement): Ditto.
920         * trans-stmt.c (gfc_trans_integer_select, gfc_trans_logical_select,
921         gfc_trans_character_select): Ditto.
922         * parse.c (resolve_all_program_units): For error recovery, avoid
923         segfault is proc_name is NULL.
924
925 2011-01-11  Paul Thomas  <pault@gcc.gnu.org>
926
927         PR fortran/47051
928         * trans-array.c (gfc_alloc_allocatable_for_assignment): Change
929         to be standard compliant by testing for shape rather than size
930         before skipping reallocation. Improve comments.
931
932 2011-01-09  Janus Weil  <janus@gcc.gnu.org>
933
934         PR fortran/47224
935         * resolve.c (resolve_actual_arglist): Remove unneeded and buggy piece
936         of code.
937
938 2011-01-09  Thomas Koenig  <tkoenig@gcc.gnu.org>
939
940         PR fortran/38536
941         * resolve.c (is_scalar_expr_ptr):  For a substring reference,
942         use gfc_dep_compare_expr to compare start and end expession.
943         Add FIXME for using gfc_deb_compare_expr elsewhere.
944
945 2011-01-09  Janus Weil  <janus@gcc.gnu.org>
946
947         PR fortran/46313
948         * class.c (get_unique_type_string): Make type name start with upper
949         case letter.
950
951 2011-01-08  Thomas Koenig  <tkoenig@gcc.gnu.org>
952
953         PR fortran/46405
954         * invoke.texi:  Mention -ffree-line-length-none and
955         -ffixed-line-length-none for preprocessing.
956
957 2011-01-08  Paul Thomas  <pault@gcc.gnu.org>
958
959         PR fortran/46896
960         * trans-expr.c (gfc_conv_procedure_call): With a non-copying
961         procedure argument (eg TRANSPOSE) use a temporary if there is
962         any chance of aliasing due to host or use association.
963         (arrayfunc_assign_needs_temporary): Correct logic for function
964         results and do not use a temporary for implicitly PURE
965         variables.  Use a temporary for Cray pointees.
966         * symbol.c (gfc_add_save): Explicit SAVE not compatible with
967         implicit pureness of containing procedure.
968         * decl.c (match_old_style_init, gfc_match_data): Where decl
969         would fail in PURE procedure, set implicit_pure to zero.
970         * gfortran.h : Add implicit_pure to structure symbol_attr and
971         add prototype for function gfc_implicit_pure.
972         * expr.c (gfc_check_pointer_assign, gfc_check_vardef_context):
973         Where decl would fail in PURE procedure, reset implicit_pure.
974         * io.c (match_vtag, gfc_match_open, gfc_match_close,
975         gfc_match_print, gfc_match_inquire, gfc_match_wait): The same.
976         * match.c (gfc_match_critical, gfc_match_stopcode,
977         sync_statement, gfc_match_allocate, gfc_match_deallocate): The
978         same.
979         * parse.c (decode_omp_directive): The same.
980         (parse_contained): If not PURE, set implicit pure attribute.
981         * resolve.c (resolve_formal_arglist, resolve_structure_cons,
982         resolve_function, resolve_ordinary_assign) : The same.
983         (gfc_implicit_pure): New function.
984         * module.c (mio_symbol_attribute): Introduce AB_IMPLICIT_PURE
985         to ab_attribute enum and use it in this function.
986
987 2011-01-08  Thomas Koenig  <tkoenig@gcc.gnu.org>
988
989         PR fortran/45777
990         * symbol.c (gfc_symbols_could_alias):  Strip gfc_ prefix,
991         make static and move in front of its only caller, to ...
992         * trans-array.c (symbols_could_alias): ... here.
993         Pass information about pointer and target status as
994         arguments.  Allocatable arrays don't alias anything
995         unless they have the POINTER attribute.
996         (gfc_could_be_alias):  Keep track of pointer and target
997         status when following references.  Also check if typespecs
998         of components match those of other components or symbols.
999
1000 2011-01-07  Tobias Burnus  <burnus@net-b.de>
1001
1002         PR fortran/41580
1003         * class.c (gfc_build_class_symbol): Mark __vtab as attr.vtab.
1004         * intrinsic.c (add_functions): Use simplify functions for
1005         EXTENDS_TYPE_OF and SAME_TYPE_AS.
1006         * intrinsic.h (gfc_simplify_extends_type_of,
1007         gfc_simplify_same_type_as): New prototypes.
1008         * simplify.c (is_last_ref_vtab, gfc_simplify_extends_type_of,
1009         gfc_simplify_same_type_as): New functions.
1010
1011 2011-01-07  Janus Weil  <janus@gcc.gnu.org>
1012
1013         PR fortran/47189
1014         PR fortran/47194
1015         * gfortran.h (gfc_lval_expr_from_sym): Moved prototype.
1016         * class.c (gfc_class_null_initializer): Initialize _vptr to declared
1017         type.
1018         * expr.c (gfc_lval_expr_from_sym): Moved here from symbol.c.
1019         * resolve.c (resolve_deallocate_expr): _data component will be added
1020         at translation stage.
1021         * symbol.c (gfc_lval_expr_from_sym): Moved to expr.c.
1022         * trans-stmt.c (gfc_trans_deallocate): Reset _vptr to declared type.
1023
1024 2011-01-06  Daniel Franke  <franke.daniel@gmail.com>
1025
1026         PR fortran/33117
1027         PR fortran/46478
1028         * parse.c (parse_interface): Remove check for procedure types.
1029         * interface.c (check_interface0): Verify that procedures are
1030         either all SUBROUTINEs or all FUNCTIONs.
1031
1032 2011-01-05  Janus Weil  <janus@gcc.gnu.org>
1033
1034         PR fortran/47180
1035         * trans-expr.c (gfc_trans_class_assign): Bugfix for r168524 (make sure
1036         'vtab' is initialized).
1037
1038 2011-01-05  Janus Weil  <janus@gcc.gnu.org>
1039
1040         PR fortran/47180
1041         * trans-expr.c (gfc_trans_class_assign): For a polymorphic NULL pointer
1042         assignment, set the _vptr component to the declared type.
1043
1044 2011-01-05  Thomas Koenig  <tkoenig@gcc.gnu.org>
1045
1046         PR fortran/46017
1047         * resolve.c (resolve_allocate_deallocate): Follow references to
1048         check for duplicate occurence of allocation/deallocation objects.
1049
1050 2011-01-05  Janus Weil  <janus@gcc.gnu.org>
1051
1052         PR fortran/47024
1053         * trans-decl.c (gfc_trans_deferred_vars): Initialize the _vpr component
1054         of polymorphic allocatables according to their declared type.
1055
1056 2011-01-04  Janus Weil  <janus@gcc.gnu.org>
1057
1058         PR fortran/46448
1059         * class.c (gfc_find_derived_vtab): Set the module field for the copying
1060         routine to make sure it receives module name mangling.
1061
1062 2011-01-03  Jakub Jelinek  <jakub@redhat.com>
1063
1064         * gfortranspec.c (lang_specific_driver): Update copyright notice
1065         dates.
1066
1067 2011-01-03  Janus Weil  <janus@gcc.gnu.org>
1068
1069         * intrinsic.texi (LEADZ): Fix example.
1070
1071 2011-01-02  Janus Weil  <janus@gcc.gnu.org>
1072
1073         PR fortran/46408
1074         * class.c (gfc_find_derived_vtab): Use EXEC_INIT_ASSIGN for __copy_
1075         routine.
1076
1077 \f
1078 Copyright (C) 2011 Free Software Foundation, Inc.
1079
1080 Copying and distribution of this file, with or without modification,
1081 are permitted in any medium without royalty provided the copyright
1082 notice and this notice are preserved.