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