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