OSDN Git Service

2011-04-30 Paul Thomas <pault@gcc.gnu.org>
[pf3gnuchains/gcc-fork.git] / gcc / fortran / ChangeLog
1 2011-04-30  Paul Thomas  <pault@gcc.gnu.org>
2
3         PR fortran/48462
4         PR fortran/48746
5         * trans-expr.c ( arrayfunc_assign_needs_temporary): Need a temp
6         if automatic reallocation on assignement is active, the lhs is a
7         target and the rhs an intrinsic function.
8         (realloc_lhs_bounds_for_intrinsic_call): Rename as next.
9         (fcncall_realloc_result): Renamed version of above function.
10         Free the original descriptor data after the function call.Set the bounds and the
11         offset so that the lbounds are one.
12         (gfc_trans_arrayfunc_assign): Call renamed function.
13
14 2011-04-29  Tobias Burnus  <burnus@net-b.de>
15
16         PR fortran/48810
17         * resolve.c (resolve_typebound_generic_call): Don't check access
18         flags of the specific function.
19
20         PR fortran/48800
21         * resolve.c (resolve_formal_arglist): Don't change AS_DEFERRED
22         to AS_ASSUMED_SHAPE for function results.
23         (resolve_fl_var_and_proc): Print also for function results with
24         AS_DEFERRED an error, if they are not a pointer or allocatable.
25         (resolve_types): Make sure arguments of procedures in interface
26         blocks are resolved.
27
28 2011-04-28  Tobias Burnus  <burnus@net-b.de>
29
30         PR fortran/48112
31         * resolve.c (resolve_fl_var_and_proc): Print diagnostic of
32         function results only once.
33         (resolve_symbol): Always resolve function results.
34
35         PR fortran/48279
36         * expr.c (gfc_check_vardef_context): Fix handling of generic
37         EXPR_FUNCTION.
38         * interface.c (check_interface0): Reject internal functions
39         in generic interfaces, unless -std=gnu.
40
41 2011-04-28  Tobias Burnus  <burnus@net-b.de>
42
43         PR fortran/48788
44         * resolve.c (resolve_global_procedure): Error recovery -
45         avoid segfault for (non)character-returning functions.
46
47 2011-04-26  Tobias Burnus  <burnus@net-b.de>
48
49         PR fortran/48588
50         * parse.c (resolve_all_program_units): Skip modules.
51         (translate_all_program_units): Handle modules.
52         (gfc_parse_file): Defer code generation for modules.
53         * module.c (fix_mio_expr): Commit created symbol.
54
55 2011-04-13  Paul Thomas  <pault@gcc.gnu.org>
56
57         PR fortran/48360
58         PR fortran/48456
59         * trans-array.c (get_std_lbound): For derived type variables
60         return array valued component lbound.
61
62 2011-04-05  Duncan Sands  <baldrick@free.fr>
63
64         * f95-lang.c (build_builtin_fntypes): Swap frexp parameter types.
65
66 2011-04-04  Janus Weil  <janus@gcc.gnu.org>
67
68         PR fortran/48291
69         * class.c (get_unique_hashed_string): Adjust maximum allowable length
70         for unique type string.
71
72 2011-03-25  Release Manager
73
74         * GCC 4.6.0 released.
75
76 2011-03-12  Janus Weil  <janus@gcc.gnu.org>
77
78         PR fortran/48059
79         * trans-expr.c (gfc_apply_interface_mapping_to_expr): Replace base type
80         for polymorphic arguments.
81
82 2011-03-12  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
83
84         PR fortran/48054
85         * intrinsic.texi: Clarify doc of logarithm functions.
86
87 2011-03-12  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
88
89         PR fortran/47552
90         * trans-intrinsic.c (gfc_conv_intrinsic_ctime): Fix type of
91         the string length variable.
92
93 2011-03-11  Janus Weil  <janus@gcc.gnu.org>
94
95         PR fortran/47768
96         * module.c (ab_attribute,attr_bits): Add AB_PROC_POINTER_COMP.
97         (mio_symbol_attribute): Handle attribute 'proc_pointer_comp'.
98
99 2011-03-06  Paul Thomas  <pault@gcc.gnu.org>
100             Jerry DeLisle  <jvdelisle@gcc.gnu.org>
101
102         PR fortran/47850
103         * expr.c (gfc_is_constant_expr): Only use gfc_constant_ac if
104         the expression has an iterator.  Otherwise, iterate through the
105         array, checking for constant expressions for each element.
106
107 2011-03-04  Janne Blomqvist  <jb@gcc.gnu.org>
108
109         PR libfortran/47802
110         * intrinsic.texi: Update CTIME and FDATE documentation.
111
112 2011-03-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
113
114         * invoke.texi (Option Summary, Fortran Dialect Options)
115         (Preprocessing Options, Runtime Options, Code Gen Options):
116         Fix vertical list spacing by using @itemx for additinoal
117         items, empty line before @table.  Fix typos.
118
119 2011-02-28  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
120
121         PR fortran/47894
122         * intrinsic.texi: Fix doc of the VERIFY intrinsic.
123
124 2011-02-26  Tobias Burnus  <burnus@net-b.de>
125
126         PR fortran/47846
127         * trans-stmt.c (gfc_trans_allocate): Fix allocation with
128         type-spec of deferred-length strings.
129
130 2011-02-26  Tobias Burnus  <burnus@net-b.de>
131
132         PR fortran/47886
133         * openmp.c (gfc_resolve_omp_directive): Resolve if()
134         condition of OpenMP's task.
135
136 2011-02-26  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
137
138         PR fortran/47894
139         * intrinsic.texi: Fix doc of the VERIFY intrinsic.
140
141 2011-02-24  Tobias Burnus  <burnus@net-b.de>
142
143         PR fortran/47872
144         * intrinsic.texi (ALLOCATED, ATAN, BESSEL_JN, BESSEL_YN): Add
145         multitable for linebreak between different syntax variants.
146
147 2011-02-24  Richard Guenther  <rguenther@suse.de>
148
149         PR fortran/47839
150         * f95-lang.c (pushdecl): For externs in non-global scope push
151         a copy of the decl into the BLOCK.
152
153 2011-02-23  Mikael Morin  <mikael@gcc.gnu.org>
154
155         PR fortran/40850
156         * trans.c (gfc_prepend_expr_to_block): New function.
157         * trans.h (gfc_prepend_expr_to_block): Declare.
158         * trans-array.c (gfc_conv_array_parameter): Replace
159         gfc_add_expr_to_block with gfc_prepend_expr_to_block.
160
161 2011-02-22  Paul Thomas  <pault@gcc.gnu.org>
162
163         PR fortran/45743
164         * trans-decl.c (gfc_get_extern_function_decl): Don't use the
165         gsymbol backend_decl if the procedure has a formal argument
166         that is a procedure.
167
168 2011-02-22  Tobias Burnus  <burnus@net-b.de>
169
170         PR fortran/41359
171         * trans-stmt.c (gfc_trans_if_1): Use correct line for
172         expressions in the if condition.
173
174 2011-02-20  Tobias Burnus  <burnus@net-b.de>
175
176         PR fortran/47797
177         * trans-decl.c (gfc_trans_deferred_vars): Use gfc_set_backend_locus and
178         gfc_restore_backend_locus to have better debug locations.
179         * trans-array.c (gfc_trans_deferred_array): Ditto.
180
181 2011-02-20  Paul Thomas  <pault@gcc.gnu.org>
182
183         PR fortran/45077
184         PR fortran/44945
185         * trans-types.c (gfc_get_derived_type): Remove code that looks
186         for decls in gsym and add call to gfc_get_module_backend_decl.
187         * trans.h : Add prototype for gfc_get_module_backend_decl.
188         * trans-decl.c (gfc_get_module_backend_decl): New function.
189         (gfc_get_symbol_decl): Call it.
190
191 2011-02-19  Paul Thomas  <pault@gcc.gnu.org>
192
193         PR fortran/47348
194         * trans-array.c (get_array_ctor_all_strlen): Move up in file.
195         (get_array_ctor_var_strlen): Add block dummy and add call to
196         get_array_ctor_all_strlen instead of giving up on substrings.
197         Call gcc_unreachable for default case.
198         (get_array_ctor_strlen): Add extra argument to in call to
199         get_array_ctor_var_strlen.
200
201 2011-02-18  Janus Weil  <janus@gcc.gnu.org>
202
203         PR fortran/47789
204         * primary.c (gfc_match_structure_constructor): Handle empty parent
205         types.
206
207 2011-02-18  Tobias Burnus
208
209         PR fortran/47775
210         * trans-expr.c (arrayfunc_assign_needs_temporary): Use
211         esym to check whether the specific procedure returns an
212         allocatable or pointer.
213
214 2011-02-18  Michael Matz  <matz@suse.de>
215
216         PR fortran/45586
217         * gfortran.h (struct gfc_component): Add norestrict_decl member.
218         * trans.h (struct lang_type): Add nonrestricted_type member.
219         * trans-expr.c (gfc_conv_component_ref): Search fields with correct
220         parent type.
221         * trans-types.c (mirror_fields, gfc_nonrestricted_type): New.
222         (gfc_sym_type): Use it.
223
224 2011-02-18  Janus Weil  <janus@gcc.gnu.org>
225
226         PR fortran/47768
227         * resolve.c (resolve_transfer): Reject variables with procedure pointer
228         components.
229
230 2011-02-18  Janus Weil  <janus@gcc.gnu.org>
231
232         PR fortran/47767
233         * gfortran.h (gfc_check_access): Removed prototype.
234         (gfc_check_symbol_access): Added prototype.
235         * module.c (gfc_check_access): Renamed to 'check_access', made static.
236         (gfc_check_symbol_access): New function, basically a shortcut for
237         'check_access'.
238         (write_dt_extensions,write_symbol0,write_generic,write_symtree): Use
239         'gfc_check_symbol_access'.
240         (write_operator,write_module): Renamed 'gfc_check_access'.
241         * resolve.c (resolve_fl_procedure,resolve_fl_derived,
242         resolve_fl_namelist,resolve_symbol,resolve_fntype): Use
243         'gfc_check_symbol_access'.
244
245 2011-02-16  Janus Weil  <janus@gcc.gnu.org>
246
247         PR fortran/47745
248         * class.c (gfc_build_class_symbol): Set 'class_ok' attribute.
249         * decl.c (build_sym,attr_decl1): Move setting of 'class_ok' into
250         'gfc_build_class_symbol'.
251         (gfc_match_decl_type_spec): Reject unlimited polymorphism.
252         * interface.c (matching_typebound_op): Check for 'class_ok' attribute.
253         * match.c (select_type_set_tmp): Move setting of 'class_ok' into
254         'gfc_build_class_symbol'.
255         * primary.c (gfc_variable_attr): Check for 'class_ok' attribute.
256
257 2011-02-15  Steven G. Kargl  <kargl@gcc.gnu.org>
258
259         PR fortran/47633
260         . simplify.c (gfc_simplify_compiler_version): Fix off-by-one issue.
261
262 2011-02-14  Janus Weil  <janus@gcc.gnu.org>
263
264         PR fortran/47730
265         * parse.c (gfc_build_block_ns): Commit 'block@' symbol.
266
267 2011-02-14  Janus Weil  <janus@gcc.gnu.org>
268
269         PR fortran/47728
270         * class.c (gfc_build_class_symbol): Give a fatal error on polymorphic
271         arrays.
272         * primary.c (gfc_match_varspec): Avoid ICE for invalid class
273         declaration.
274
275 2011-02-14  Janus Weil  <janus@gcc.gnu.org>
276
277         PR fortran/47349
278         * interface.c (get_expr_storage_size): Handle derived-type components.
279
280 2011-02-13  Tobias Burnus  <burnus@net-b.de>
281
282         PR fortran/47569
283         * interface.c (compare_parameter): Avoid ICE with
284         character components.
285
286 2011-02-12  Janus Weil  <janus@gcc.gnu.org>
287
288         * class.c (gfc_build_class_symbol): Reject polymorphic arrays.
289         * decl.c (build_sym,build_struct,attr_decl1): Use return value of
290         'gfc_build_class_symbol'.
291
292 2011-02-12  Michael Matz  <matz@suse.de>
293             Janus Weil  <janus@gcc.gnu.org>
294             Tobias Burnus  <burnus@net-b.de>
295
296         PR fortran/45586
297         * trans-expr.c (conv_parent_component_references): Avoid unintendent
298         skipping of parent compounds.
299
300 2011-02-11  Tobias Burnus  <burnus@net-b.de>
301
302         PR fortran/47550
303         * resolve.c (resolve_formal_arglist): PURE with VALUE
304         and no INTENT: Add -std= diagnostics.
305
306 2011-02-09  Janus Weil  <janus@gcc.gnu.org>
307
308         PR fortran/47352
309         * resolve.c (resolve_procedure_interface): If interface has a result
310         variable, copy the typespec and set result pointer to self.
311
312 2011-02-09  Janus Weil  <janus@gcc.gnu.org>
313
314         PR fortran/47463
315         * resolve.c (resolve_typebound_subroutine): Remove erroneous line.
316
317 2011-02-09  Janus Weil  <janus@gcc.gnu.org>
318
319         PR fortran/47637
320         * trans-decl.c (init_intent_out_dt): Handle CLASS arguments.
321
322 2011-02-08  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
323
324         * io.c (match_io_element): Do not set dt if not inquire.
325
326 2011-02-08  Janus Weil  <janus@gcc.gnu.org>
327
328         PR fortran/45290
329         * expr.c (gfc_check_assign_symbol): Reject pointers as pointer
330         initialization target.
331
332 2011-02-07  Janne Blomqvist  <jb@gcc.gnu.org>
333             Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
334
335         * gfortran.texi (Thread-safety): texinfo styling fixes.
336         * intrinsic.texi: Likewise.
337
338 2011-02-06  Janne Blomqvist  <jb@gcc.gnu.org>
339
340         * gfortran.texi (Compiler Characteristics): Add reference to
341         thread-safety section.
342
343 2011-02-06  Janne Blomqvist  <jb@gcc.gnu.org>
344
345         * gfortran.texi (Thread-safety): New section.
346         * intrinsic.texi (EXECUTE_COMMAND_LINE): Mention thread-safety.
347         (GETENV): Likewise.
348         (GET_ENVIRONMENT_VARIABLE): Likewise.
349         (SYSTEM): Likewise.
350
351 2011-02-06  Paul Thomas  <pault@gcc.gnu.org>
352
353         PR fortran/47592
354         * trans-stmt.c (gfc_trans_allocate): For deferred character
355         length allocations with SOURCE, store to the values and string
356         length to avoid calculating twice.  Replace gfc_start_block
357         with gfc_init_block to avoid unnecessary contexts and to keep
358         declarations of temporaries where they should be. Tidy up the
359         code a bit.
360
361 2011-02-05  Janne Blomqvist  <jb@gcc.gnu.org>
362
363         PR fortran/42434
364         * intrinsic.texi (SYSTEM_CLOCK): Update documentation.
365
366 2011-02-02  Janus Weil  <janus@gcc.gnu.org>
367             Paul Thomas  <pault@gcc.gnu.org>
368
369         PR fortran/47082
370         * trans-expr.c (gfc_trans_class_init_assign): Add call to
371         gfc_get_derived_type.
372         * module.c (read_cleanup): Do not use unique_symtrees for vtabs
373         or vtypes.
374
375 2011-02-02  Janus Weil  <janus@gcc.gnu.org>
376
377         PR fortran/47572
378         * resolve.c (resolve_fl_variable): Handle polymorphic allocatables.
379
380 2011-02-01  Janus Weil  <janus@gcc.gnu.org>
381
382         PR fortran/47565
383         * trans-expr.c (gfc_conv_structure): Handle constructors for procedure
384         pointer components with allocatable result.
385
386 2011-01-31  Janus Weil  <janus@gcc.gnu.org>
387
388         PR fortran/47455
389         * trans-expr.c (gfc_conv_procedure_call): Handle procedure pointers
390         with pointer or allocatable result.
391
392 2011-01-31  Paul Thomas  <pault@gcc.gnu.org>
393
394         PR fortran/47519
395         * trans-stmt.c (gfc_trans_allocate): Improve handling of
396         deferred character lengths with SOURCE.
397         * iresolve.c (gfc_resolve_repeat): Calculate character
398         length from source length and ncopies.
399         * dump-parse-tree.c (show_code_node): Show MOLD and SOURCE
400         expressions for ALLOCATE.
401
402 2011-01-31  Janus Weil  <janus@gcc.gnu.org>
403
404         PR fortran/47463
405         * resolve.c (resolve_typebound_subroutine): Bug fix for the case of
406         an argument of a typebound assignment being a component.
407
408 2011-01-31  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
409
410         * gfortranspec.c (add_arg_libgfortran) [HAVE_LD_STATIC_DYNAMIC] Use
411         LD_STATIC_OPTION, LD_DYNAMIC_OPTION.
412
413 2011-01-31  Tobias Burnus  <burnus@net-b.de>
414
415         PR fortran/47042
416         * resolve.c (resolve_fl_procedure): Reject stmt functions
417         with pointer/allocatable attribute.
418
419 2011-01-31  Tobias Burnus  <burnus@net-b.de>
420
421         PR fortran/47042
422         * interface.c (gfc_procedure_use): Add explicit interface check for
423         pointer/allocatable functions.
424
425 2011-01-30  Paul Thomas  <pault@gcc.gnu.org>
426
427         PR fortran/47523
428         * trans-expr.c (gfc_trans_assignment_1): If the rhs is an op
429         expr and is assigned to a deferred character length scalar,
430         make sure that the function is called before reallocation,
431         so that the length is available. Include procedure pointer
432         and procedure pointer component rhs as well.
433
434         PR fortran/45170
435         PR fortran/35810
436         PR fortran/47350
437         * gfortran.dg/allocatable_function_5.f90: New test not added by
438         mistake on 2011-01-28.
439
440 2011-01-29  Tobias Burnus  <burnus@net-b.de>
441
442         PR fortran/47531
443         * check.c (gfc_check_shape): Support kind argument in SHAPE.
444         * intrinsic.c (add_functions): Ditto.
445         * resolve.c (gfc_resolve_shape): Ditto.
446         * simplify.c (gfc_simplify_shape): Ditto.
447         * intrinsic.h (gfc_check_shape, gfc_resolve_shape,
448         gfc_simplify_shape): Update prototypes.
449         * intrinisc.text (SHAPE): Document kind argument.
450
451 2011-01-28  Tobias Burnus  <burnus@net-b.de>
452
453         PR fortran/47507
454         * resolve.c (resolve_formal_arglist): Allow arguments with VALUE
455         attribute also without INTENT.
456
457 2011-01-28  Tobias Burnus  <burnus@net-b.de>
458
459         * gfortran.texi (Fortran 2003 status): Mention support for
460         nonconstant namelist variables.
461
462 2011-01-28  Paul Thomas  <pault@gcc.gnu.org>
463             Tobias Burnus  <burnus@gcc.gnu.org>
464
465         PR fortran/45170
466         PR fortran/35810
467         PR fortran/47350
468         * interface.c (compare_actual_formal): An allocatable or pointer
469         deferred length actual is only allowed if the formal argument
470         is also deferred length. Clean up whitespace.
471         * trans-expr.c (gfc_conv_procedure_call): Pass string length for
472         deferred character length formal arguments by reference. Do the
473         same for function results.
474         (gfc_trans_pointer_assignment): Do not do runtime check of lhs
475         and rhs character lengths, if deferred length lhs.  In this case
476         set the lhs character length to that of the rhs.
477         (gfc_conv_string_parameter): Remove assert that string length is
478         an integer type.
479         (is_scalar_reallocatable_lhs): New function.
480         (alloc_scalar_allocatable_for_assignment): New function.
481         (gfc_trans_assignment_1): Call above new function. If the rhs is
482         a deferred character length itself, makes ure that the function
483         is called before reallocation, so that the length is available.
484         (gfc_trans_asssignment): Remove error about assignment to
485         deferred length character variables.
486         * gfortran.texi : Update entry about (re)allocation on
487         assignment.
488         * trans-stmt.c (gfc_trans_allocate): Add code to handle deferred
489         length character variables.
490         * module.c (mio_typespec): Transfer deferred characteristic.
491         * trans-types.c (gfc_get_function_type): New code to generate
492         hidden typelist, so that those character lengths that are
493         passed by reference get the right type.
494         * resolve.c (resolve_contained_fntype): Supress error for
495         deferred character length functions.
496         (resolve_function, resolve_fl_procedure) The same.
497         (check_symbols): Remove the error that support for
498         entity with deferred type parameter is not yet implemented.
499         (resolve_fl_derived): The same.
500         match.c (alloc_opt_list): Allow MOLD for deferred length object.
501         * trans-decl.c (gfc_get_symbol_decl): For deferred character
502         length dummies, generate a local variable for string length.
503         (create_function_arglist): Hidden length can be a pointer.
504         (gfc_trans_deferred_vars): For deferred character length
505         results and dummies, assign the string length to the local
506         variable from the hidden argument on entry and the other way
507         round on exit, as appropriate.
508
509 2011-01-27  Tobias Burnus  <burnus@net-b.de>
510
511         PR fortran/47474
512         * trans-decl.c (gfc_generate_function_code): Fix init
513         of allocatable result variable with allocatable components.
514
515 2011-01-27  Tobias Burnus  <burnus@net-b.de>
516
517         PR fortran/47472
518         * options.c (gfc_handle_module_path_options): Save
519         module path without trailing slash as include path.
520
521 2011-01-25  Tobias Burnus  <burnus@net-b.de>
522
523         PR fortran/47448
524         * interface.c (gfc_check_operator_interface): Fix
525         defined-assignment check.
526
527 2011-01-23  Tobias Burnus  <burnus@net-b.de>
528
529         PR fortran/47421
530         * trans-decl.c (gfc_trans_deferred_vars): Do not nullify
531         scalar allocatable dummy arguments.
532
533 2011-01-22  Thomas Koenig  <tkoenig@gcc.gnu.org>
534
535         PR fortran/38536
536         * resolve.c (gfc_iso_c_func_interface):  For C_LOC,
537         check for array sections followed by component references
538         which are illegal.  Also check for coindexed arguments.
539
540 2011-01-22  Tobias Burnus  <burnus@net-b.de>
541
542         PR fortran/47399
543         * primary.c (gfc_match_varspec): Relax gcc_assert to allow for
544         PARAMETER TBP.
545
546 2011-01-21  Tobias Burnus  <burnus@net-b.de>
547
548         PR fortran/47394
549         * error.c (gfc_error_now, gfc_fatal_error, gfc_error_check):
550         Use defined instead of magic number exit status codes.
551         * scanner.c (include_line, gfc_new_file): Ditto.
552
553 2011-01-21  Tobias Burnus  <burnus@net-b.de>
554
555         PR fortran/47377
556         * expr.c (gfc_check_pointer_assign): Reject expr data-targets
557         without pointer attribute.
558
559 2011-01-18  Janus Weil  <janus@gcc.gnu.org>
560
561         PR fortran/47240
562         * resolve.c (expression_rank): Fix rank of procedure poiner components.
563         * trans-expr.c (gfc_conv_procedure_call): Take care of procedure
564         pointer components as actual arguments.
565
566 2011-01-17  Jakub Jelinek  <jakub@redhat.com>
567
568         PR fortran/47331
569         * gfortran.h (struct gfc_omp_saved_state): New type.
570         (gfc_omp_save_and_clear_state, gfc_omp_restore_state): New prototypes.
571         * resolve.c (resolve_global_procedure): Call it around gfc_resolve
572         call.
573         * openmp.c (gfc_omp_save_and_clear_state, gfc_omp_restore_state): New
574         functions.
575
576 2011-01-17  Tobias Burnus  <burnus@net-b.de>
577
578         PR fortran/47327
579         * invoke.texi (Options to request or suppress errors
580         and warnings): Fix cross link.
581
582 2011-01-15  Tobias Burnus  <burnus@net-b.de>
583
584         * gfortran.texi: Update Fortran 2003 Status section.
585
586         PR fortran/47177
587         * invoke.texi: Add missing "-E" to the -dM example.
588
589 2011-01-13  Tobias Burnus  <burnus@net-b.de>
590
591         PR fortran/47268
592         * intrinsic.texi (get_command_argument, get_environment_variable):
593         Mark arguments as optional in the Arguments section.
594
595 2011-01-13  Kai Tietz  <kai.tietz@onevision.com>
596             Tobias Burnus  <burnus@net-b.de>
597
598         PR fortran/47260
599         * trans-decl.c (gfc_get_extern_function_decl,
600         build_function_decl): Set TREE_PUBLIC/TREE_EXTERNAL before
601         calling decl_attributes.
602
603 2011-01-13  Tobias Burnus  <burnus@net-b.de>
604             Mikael Morin  <mikael@gcc.gnu.org>
605
606         PR fortran/45848
607         PR fortran/47204
608         * gfortran.h (gfc_code): Move union ext's case_list into
609         the struct block.
610         * dump-parse-tree.c (show_code_node): Adapt by prefixing case_list
611         by "block.".
612         * frontend-passes.c (gfc_code_walker): Ditto.
613         * match.c (gfc_match_goto, gfc_match_call, gfc_match_case,
614         gfc_match_type_is, gfc_match_class_is): Ditto.
615         * resolve.c (resolve_select, resolve_select_type): Ditto.
616         * st.c (gfc_free_statement): Ditto.
617         * trans-stmt.c (gfc_trans_integer_select, gfc_trans_logical_select,
618         gfc_trans_character_select): Ditto.
619         * parse.c (resolve_all_program_units): For error recovery, avoid
620         segfault is proc_name is NULL.
621
622 2011-01-11  Paul Thomas  <pault@gcc.gnu.org>
623
624         PR fortran/47051
625         * trans-array.c (gfc_alloc_allocatable_for_assignment): Change
626         to be standard compliant by testing for shape rather than size
627         before skipping reallocation. Improve comments.
628
629 2011-01-09  Janus Weil  <janus@gcc.gnu.org>
630
631         PR fortran/47224
632         * resolve.c (resolve_actual_arglist): Remove unneeded and buggy piece
633         of code.
634
635 2011-01-09  Thomas Koenig  <tkoenig@gcc.gnu.org>
636
637         PR fortran/38536
638         * resolve.c (is_scalar_expr_ptr):  For a substring reference,
639         use gfc_dep_compare_expr to compare start and end expession.
640         Add FIXME for using gfc_deb_compare_expr elsewhere.
641
642 2011-01-09  Janus Weil  <janus@gcc.gnu.org>
643
644         PR fortran/46313
645         * class.c (get_unique_type_string): Make type name start with upper
646         case letter.
647
648 2011-01-08  Thomas Koenig  <tkoenig@gcc.gnu.org>
649
650         PR fortran/46405
651         * invoke.texi:  Mention -ffree-line-length-none and
652         -ffixed-line-length-none for preprocessing.
653
654 2011-01-08  Paul Thomas  <pault@gcc.gnu.org>
655
656         PR fortran/46896
657         * trans-expr.c (gfc_conv_procedure_call): With a non-copying
658         procedure argument (eg TRANSPOSE) use a temporary if there is
659         any chance of aliasing due to host or use association.
660         (arrayfunc_assign_needs_temporary): Correct logic for function
661         results and do not use a temporary for implicitly PURE
662         variables.  Use a temporary for Cray pointees.
663         * symbol.c (gfc_add_save): Explicit SAVE not compatible with
664         implicit pureness of containing procedure.
665         * decl.c (match_old_style_init, gfc_match_data): Where decl
666         would fail in PURE procedure, set implicit_pure to zero.
667         * gfortran.h : Add implicit_pure to structure symbol_attr and
668         add prototype for function gfc_implicit_pure.
669         * expr.c (gfc_check_pointer_assign, gfc_check_vardef_context):
670         Where decl would fail in PURE procedure, reset implicit_pure.
671         * io.c (match_vtag, gfc_match_open, gfc_match_close,
672         gfc_match_print, gfc_match_inquire, gfc_match_wait): The same.
673         * match.c (gfc_match_critical, gfc_match_stopcode,
674         sync_statement, gfc_match_allocate, gfc_match_deallocate): The
675         same.
676         * parse.c (decode_omp_directive): The same.
677         (parse_contained): If not PURE, set implicit pure attribute.
678         * resolve.c (resolve_formal_arglist, resolve_structure_cons,
679         resolve_function, resolve_ordinary_assign) : The same.
680         (gfc_implicit_pure): New function.
681         * module.c (mio_symbol_attribute): Introduce AB_IMPLICIT_PURE
682         to ab_attribute enum and use it in this function.
683
684 2011-01-08  Thomas Koenig  <tkoenig@gcc.gnu.org>
685
686         PR fortran/45777
687         * symbol.c (gfc_symbols_could_alias):  Strip gfc_ prefix,
688         make static and move in front of its only caller, to ...
689         * trans-array.c (symbols_could_alias): ... here.
690         Pass information about pointer and target status as
691         arguments.  Allocatable arrays don't alias anything
692         unless they have the POINTER attribute.
693         (gfc_could_be_alias):  Keep track of pointer and target
694         status when following references.  Also check if typespecs
695         of components match those of other components or symbols.
696
697 2011-01-07  Tobias Burnus  <burnus@net-b.de>
698
699         PR fortran/41580
700         * class.c (gfc_build_class_symbol): Mark __vtab as attr.vtab.
701         * intrinsic.c (add_functions): Use simplify functions for
702         EXTENDS_TYPE_OF and SAME_TYPE_AS.
703         * intrinsic.h (gfc_simplify_extends_type_of,
704         gfc_simplify_same_type_as): New prototypes.
705         * simplify.c (is_last_ref_vtab, gfc_simplify_extends_type_of,
706         gfc_simplify_same_type_as): New functions.
707
708 2011-01-07  Janus Weil  <janus@gcc.gnu.org>
709
710         PR fortran/47189
711         PR fortran/47194
712         * gfortran.h (gfc_lval_expr_from_sym): Moved prototype.
713         * class.c (gfc_class_null_initializer): Initialize _vptr to declared
714         type.
715         * expr.c (gfc_lval_expr_from_sym): Moved here from symbol.c.
716         * resolve.c (resolve_deallocate_expr): _data component will be added
717         at translation stage.
718         * symbol.c (gfc_lval_expr_from_sym): Moved to expr.c.
719         * trans-stmt.c (gfc_trans_deallocate): Reset _vptr to declared type.
720
721 2011-01-06  Daniel Franke  <franke.daniel@gmail.com>
722
723         PR fortran/33117
724         PR fortran/46478
725         * parse.c (parse_interface): Remove check for procedure types.
726         * interface.c (check_interface0): Verify that procedures are
727         either all SUBROUTINEs or all FUNCTIONs.
728
729 2011-01-05  Janus Weil  <janus@gcc.gnu.org>
730
731         PR fortran/47180
732         * trans-expr.c (gfc_trans_class_assign): Bugfix for r168524 (make sure
733         'vtab' is initialized).
734
735 2011-01-05  Janus Weil  <janus@gcc.gnu.org>
736
737         PR fortran/47180
738         * trans-expr.c (gfc_trans_class_assign): For a polymorphic NULL pointer
739         assignment, set the _vptr component to the declared type.
740
741 2011-01-05  Thomas Koenig  <tkoenig@gcc.gnu.org>
742
743         PR fortran/46017
744         * resolve.c (resolve_allocate_deallocate): Follow references to
745         check for duplicate occurence of allocation/deallocation objects.
746
747 2011-01-05  Janus Weil  <janus@gcc.gnu.org>
748
749         PR fortran/47024
750         * trans-decl.c (gfc_trans_deferred_vars): Initialize the _vpr component
751         of polymorphic allocatables according to their declared type.
752
753 2011-01-04  Janus Weil  <janus@gcc.gnu.org>
754
755         PR fortran/46448
756         * class.c (gfc_find_derived_vtab): Set the module field for the copying
757         routine to make sure it receives module name mangling.
758
759 2011-01-03  Jakub Jelinek  <jakub@redhat.com>
760
761         * gfortranspec.c (lang_specific_driver): Update copyright notice
762         dates.
763
764 2011-01-03  Janus Weil  <janus@gcc.gnu.org>
765
766         * intrinsic.texi (LEADZ): Fix example.
767
768 2011-01-02  Janus Weil  <janus@gcc.gnu.org>
769
770         PR fortran/46408
771         * class.c (gfc_find_derived_vtab): Use EXEC_INIT_ASSIGN for __copy_
772         routine.
773
774 \f
775 Copyright (C) 2011 Free Software Foundation, Inc.
776
777 Copying and distribution of this file, with or without modification,
778 are permitted in any medium without royalty provided the copyright
779 notice and this notice are preserved.