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