OSDN Git Service

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