re PR fortran/56284 ([OOP] ICE with alternate return in type-bound procedure)
[gcc.git] / gcc / fortran / ChangeLog
1 2013-04-03 Janus Weil <janus@gcc.gnu.org>
2
3 PR fortran/56284
4 PR fortran/40881
5 * decl.c (gfc_match_formal_arglist): Warn about alternate-return
6 arguments.
7 * interface.c (check_dummy_characteristics): Return if symbols are NULL.
8
9 2013-04-01 Janus Weil <janus@gcc.gnu.org>
10
11 PR fortran/56500
12 * symbol.c (gfc_set_default_type): Build class container for
13 IMPLICIT CLASS.
14
15 2013-03-31 Tobias Burnus <burnus@net-b.de>
16
17 * class.c (finalization_scalarizer, finalizer_insert_packed_call,
18 generate_finalization_wrapper): Avoid segfault with absent SIZE=
19 argment to TRANSFER and use correct result kind for SIZE.
20 * intrinsic.c (gfc_isym_id_by_intmod): Also handle ids of
21 nonmodules.
22 * trans.c (gfc_build_final_call): Handle coarrays.
23
24 2013-03-30 Thomas Koenig <tkoenig@gcc.gnu.org>
25
26 * trans-expr.c (build_memcmp_call): New function.
27 (gfc_build_compare_string): If the strings
28 compared have constant and equal lengths and
29 the strings are kind=1, or, for kind=4 strings,
30 the test is for (in)equality, use memcmp().
31
32 2013-03-29 Tobias Burnus <burnus@net-b.de>
33
34 PR fortran/35203
35 * trans-decl.c (create_function_arglist): Pass hidden argument
36 for passed-by-value optional+value dummies.
37 * trans-expr.c (gfc_conv_expr_present,
38 gfc_conv_procedure_call): Handle those.
39
40 2013-03-28 Thomas Koenig <tkoenig@gcc.gnu.org>
41
42 PR fortran/45159
43 * gfortran.h (gfc_dep_difference): Add prototype.
44 * dependency.c (discard_nops): New function.
45 (gfc_dep_difference): New function.
46 (check_section_vs_section): Use gfc_dep_difference
47 to calculate the difference of starting indices.
48 * trans-expr.c (gfc_conv_substring): Use
49 gfc_dep_difference to calculate the length of
50 substrings where possible.
51
52 2013-03-28 Thomas Koenig <tkoenig@gcc.gnu.org>
53
54 PR fortran/55806
55 * frontend-passes.c (optimize_code): Keep track of
56 current code to make code insertion possible.
57 (combine_array_constructor): New function.
58 (optimize_op): Call it.
59
60 2013-03-27 Tobias Burnus <burnus@net-b.de>
61
62 PR fortran/56650
63 PR fortran/36437
64 * check.c (gfc_check_sizeof, gfc_check_c_sizeof,
65 gfc_check_storage_size): Update checks.
66 * intrinsic.texi (SIZEOF): Correct class.
67 * intrinsic.h (gfc_simplify_sizeof,
68 gfc_simplify_storage_size): New prototypes.
69 * intrinsic.c (add_functions): Use them.
70 * simplify.c (gfc_simplify_sizeof,
71 gfc_simplify_storage_size): New functions.
72
73 2013-03-27 Janne Blomqvist <jb@gcc.gnu.org>
74
75 PR fortran/25708
76 * module.c (module_locus): Use long for position.
77 (module_content): New variable.
78 (module_pos): Likewise.
79 (prev_character): Remove.
80 (bad_module): Free data instead of closing mod file.
81 (set_module_locus): Use module_pos.
82 (get_module_locus): Likewise.
83 (module_char): use buffer rather than stdio file.
84 (module_unget_char): Likewise.
85 (read_module_to_tmpbuf): New function.
86 (gfc_use_module): Call read_module_to_tmpbuf.
87
88 2013-03-26 Tobias Burnus <burnus@net-b.de>
89
90 PR fortran/56649
91 * simplify.c (gfc_simplify_merge): Simplify more.
92
93 2013-03-25 Tobias Burnus <burnus@net-b.de>
94
95 PR fortran/38536
96 PR fortran/38813
97 PR fortran/38894
98 PR fortran/39288
99 PR fortran/40963
100 PR fortran/45824
101 PR fortran/47023
102 PR fortran/47034
103 PR fortran/49023
104 PR fortran/50269
105 PR fortran/50612
106 PR fortran/52426
107 PR fortran/54263
108 PR fortran/55343
109 PR fortran/55444
110 PR fortran/55574
111 PR fortran/56079
112 PR fortran/56378
113 * check.c (gfc_var_strlen): Properly handle 0-sized string.
114 (gfc_check_c_sizeof): Use is_c_interoperable, add checks.
115 (is_c_interoperable, gfc_check_c_associated, gfc_check_c_f_pointer,
116 gfc_check_c_f_procpointer, gfc_check_c_funloc, gfc_check_c_loc): New
117 functions.
118 * expr.c (check_inquiry): Add c_sizeof, compiler_version and
119 compiler_options.
120 (gfc_check_pointer_assign): Refine function result check.
121 gfortran.h (gfc_isym_id): Add GFC_ISYM_C_ASSOCIATED,
122 GFC_ISYM_C_F_POINTER, GFC_ISYM_C_F_PROCPOINTER, GFC_ISYM_C_FUNLOC,
123 GFC_ISYM_C_LOC.
124 (iso_fortran_env_symbol, iso_c_binding_symbol): Handle
125 NAMED_SUBROUTINE.
126 (generate_isocbinding_symbol): Update prototype.
127 (get_iso_c_sym): Remove.
128 (gfc_isym_id_by_intmod, gfc_isym_id_by_intmod_sym): New prototypes.
129 * intrinsic.c (gfc_intrinsic_subroutine_by_id): New function.
130 (gfc_intrinsic_sub_interface): Use it.
131 (add_functions, add_subroutines): Add missing C-binding intrinsics.
132 (gfc_intrinsic_func_interface): Add special case for c_loc.
133 gfc_isym_id_by_intmod, gfc_isym_id_by_intmod_sym): New functions.
134 (gfc_intrinsic_func_interface, gfc_intrinsic_sub_interface): Use them.
135 * intrinsic.h (gfc_check_c_associated, gfc_check_c_f_pointer,
136 gfc_check_c_f_procpointer, gfc_check_c_funloc, gfc_check_c_loc,
137 gfc_resolve_c_loc, gfc_resolve_c_funloc): New prototypes.
138 * iresolve.c (gfc_resolve_c_loc, gfc_resolve_c_funloc): New
139 functions.
140 * iso-c-binding.def: Split PROCEDURE into NAMED_SUBROUTINE and
141 NAMED_FUNCTION.
142 * iso-fortran-env.def: Add NAMED_SUBROUTINE for completeness.
143 * module.c (create_intrinsic_function): Support subroutines and
144 derived-type results.
145 (use_iso_fortran_env_module): Update calls.
146 (import_iso_c_binding_module): Ditto; update calls to
147 generate_isocbinding_symbol.
148 * resolve.c (find_arglists): Skip for intrinsic symbols.
149 (gfc_resolve_intrinsic): Find intrinsic subs via id.
150 (is_scalar_expr_ptr, gfc_iso_c_func_interface,
151 set_name_and_label, gfc_iso_c_sub_interface): Remove.
152 (resolve_function, resolve_specific_s0): Remove calls to those.
153 (resolve_structure_cons): Fix handling.
154 * symbol.c (gen_special_c_interop_ptr): Update c_ptr/c_funptr
155 generation.
156 (gen_cptr_param, gen_fptr_param, gen_shape_param,
157 build_formal_args, get_iso_c_sym): Remove.
158 (std_for_isocbinding_symbol): Handle NAMED_SUBROUTINE.
159 (generate_isocbinding_symbol): Support hidden symbols and
160 using c_ptr/c_funptr symtrees for nullptr defs.
161 * target-memory.c (gfc_target_encode_expr): Fix handling
162 of c_ptr/c_funptr.
163 * trans-expr.c (conv_isocbinding_procedure): Remove.
164 (gfc_conv_procedure_call): Remove call to it.
165 (gfc_trans_subcomponent_assign, gfc_conv_expr): Update handling
166 of c_ptr/c_funptr.
167 * trans-intrinsic.c (conv_isocbinding_function,
168 conv_isocbinding_subroutine): New.
169 (gfc_conv_intrinsic_function, gfc_conv_intrinsic_subroutine):
170 Call them.
171 * trans-io.c (transfer_expr): Fix handling of c_ptr/c_funptr.
172 * trans-types.c (gfc_typenode_for_spec,
173 gfc_get_derived_type): Ditto.
174 (gfc_init_c_interop_kinds): Handle NAMED_SUBROUTINE.
175
176 2013-03-18 Tobias Burnus <burnus@net-b.de>
177
178 * gfortran.h (gfc_option_t): Remove flag_whole_file.
179 * invoke.texi (-fno-whole-file): Remove.
180 * lang.opt (fwhole-file): Change to Ignore.
181 * options.c (gfc_init_options, gfc_post_options,
182 gfc_handle_option): Remove !flag_whole_file handling
183 * parse.c (resolve_all_program_units, translate_all_program_units,
184 gfc_parse_file): Ditto.
185 * resolve.c (resolve_global_procedure): Ditto.
186 * trans-decl.c (gfc_get_symbol_decl, gfc_get_extern_function_decl,
187 gfc_create_module_variable): Ditto.
188 * trans-types.c (gfc_get_derived_type): Ditto.
189
190 2013-03-15 Tobias Burnus <burnus@net-b.de>
191
192 PR fortran/56615
193 * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Pack arrays
194 if they are not simply contiguous.
195
196 2013-03-11 Tobias Burnus <burnus@net-b.de>
197
198 * gfortran.texi (STRUCTURE and RECORD): State more clearly how
199 to convert them into derived types.
200
201 2013-03-10 Paul Thomas <pault@gcc.gnu.org>
202
203 PR fortran/56575
204 * expr.c (gfc_default_initializer): Check that a class declared
205 type has any components.
206 * resolve.c (resolve_fl_derived0): On failing the test for C437
207 set the type to BT_UNKNOWN to prevent repeat error messages.
208
209 2013-03-03 Mikael Morin <mikael@gcc.gnu.org>
210
211 PR fortran/56477
212 * expr.c (gfc_check_pointer_assign): Avoid NULL pointer dereference.
213
214 2013-03-03 Mikael Morin <mikael@gcc.gnu.org>
215
216 PR fortran/54730
217 * array.c (gfc_match_array_constructor): Set a checkpoint before
218 matching a typespec. Drop it on success, restore it otherwise.
219
220 2013-03-03 Mikael Morin <mikael@gcc.gnu.org>
221
222 PR fortran/54730
223 * gfortran.h (struct gfc_undo_change_set): New field 'previous'.
224 (gfc_new_undo_checkpoint, gfc_drop_last_undo_checkpoint,
225 gfc_restore_last_undo_checkpoint): New prototypes.
226 * symbol.c (default_undo_chgset_var): Update initialization.
227 (single_undo_checkpoint_p, gfc_new_undo_checkpoint,
228 free_undo_change_set_data, pop_undo_change_set,
229 gfc_drop_last_undo_checkpoint, enforce_single_undo_checkpoint):
230 New functions.
231 (save_symbol_data): Handle multiple change sets. Make sure old_symbol
232 field's previous value is not overwritten. Clear gfc_new field.
233 (restore_old_symbol): Restore previous old_symbol field.
234 (gfc_restore_last_undo_checkpoint): New function, using body renamed
235 from gfc_undo_symbols. Restore the previous change set as current one.
236 (gfc_undo_symbols): New body.
237 (gfc_commit_symbols, gfc_commit_symbol, gfc_enforce_clean_symbol_state):
238 Call enforce_single_undo_checkpoint.
239 (gfc_symbol_done_2): Ditto. Free change set data.
240
241 2013-03-03 Mikael Morin <mikael@gcc.gnu.org>
242
243 * symbol.c (restore_old_symbol): Fix thinko.
244
245 2013-03-03 Mikael Morin <mikael@gcc.gnu.org>
246
247 * symbol.c (gfc_undo_symbols): Move code...
248 (restore_old_symbol): ... here as a new function.
249
250 2013-03-03 Mikael Morin <mikael@gcc.gnu.org>
251
252 * Make-lang.in (F95_PARSER_OBJS): Add dependency to vec.h.
253 * gfortran.h: Include vec.h.
254 (gfc_undo_change_set): New struct.
255 * symbol.c (tentative_tbp): Remove struct.
256 (changed_syms, tentative_tbp_list): Remove variables.
257 (default_undo_chgset_var, latest_undo_chgset): New variables.
258 (save_symbol_data, gfc_get_sym_tree, gfc_undo_symbols,
259 gfc_commit_symbols, gfc_commit_symbol,
260 gfc_enforce_clean_symbol_state, gfc_get_typebound_proc):
261 Use latest_undo_chgset instead of changed_syms and tentative_tbp_list.
262
263 2013-03-01 Tobias Burnus <burnus@net-b.de>
264
265 PR fortran/56491
266 * iresolve.c (resolve_bound): Use gfc_get_string instead of xstrdup.
267 * symbol.c (free_components): Free proc-pointer components.
268
269 2013-03-01 Tobias Burnus <burnus@net-b.de>
270
271 * trans-decl.c (gfc_trans_deferred_vars): Free expr after use.
272 * trans-io.c (build_dt): Ditto.
273
274 2013-02-24 Joseph Myers <joseph@codesourcery.com>
275
276 * resolve.c (generate_component_assignments): Don't use UTF-8
277 ligature in diagnostic.
278
279 2013-02-21 Janus Weil <janus@gcc.gnu.org>
280
281 PR fortran/56385
282 * trans-array.c (structure_alloc_comps): Handle procedure-pointer
283 components with allocatable result.
284
285 2012-02-21 Tobias Burnus <burnus@net-b.de>
286
287 PR fortran/56416
288 * gfortran.texi (Part II: Language Reference, Extensions,
289 Non-Fortran Main Program): Sort @menu to match actual section order.
290 * intrinsic.texi (Intrinsic Procedures): Ditto.
291 (C_F_POINTER, PRECISION): Move to the alphabetically correct place.
292
293 2013-02-15 Tobias Burnus <burnus@net-b.de>
294 Mikael Morin <mikael@gcc.gnu.org>
295
296 PR fortran/56318
297 * simplify.c (gfc_simplify_matmul): Fix result shape
298 and matmul result.
299
300 2013-02-15 Tobias Burnus <burnus@net-b.de>
301
302 PR fortran/53818
303 * resolve.c (apply_default_init_local): Don't create an
304 initializer for a result variable.
305
306 2013-02-14 Thomas Koenig <tkoenig@gcc.gnu.org>
307
308 PR fortran/56224
309 * gfortran.h (gfc_add_include_path): Add boolean argument
310 for warn.
311 * scanner.c (gfc_add_include_path): Pass along warn argument
312 to add_path_to_list.
313 * options.c (gfc_post_options): Add true warn argument to
314 gfc_add_include_path.
315 (gfc_handle_module_path_options): Likewise.
316 (gfc_handle_option): Also gfc_add_include_path for intrinsic
317 modules, without warning.
318
319 2013-02-14 Paul Thomas <pault@gcc.gnu.org>
320 Tobias Burnus <burnus@net-b.de>
321
322 PR testsuite/56138
323 * trans-decl.c (gfc_get_symbol_decl): Fix deferred-length
324 results for functions without extra result variable.
325
326 Revert:
327 2013-01-30 Tobias Burnus <burnus@net-b.de>
328
329 PR fortran/56138
330 * trans-decl.c (gfc_trans_deferred_vars): Fix deferred-length
331 results for functions without extra result variable.
332
333 2013-02-12 Janus Weil <janus@gcc.gnu.org>
334
335 PR fortran/46952
336 * resolve.c (resolve_call): Do not check deferred procedures for
337 recursiveness.
338
339 2013-02-09 Paul Thomas <pault@gcc.gnu.org>
340
341 PR fortran/55362
342 * check.c (array_check): It is an error if a procedure is
343 passed.
344
345 2013-02-08 Mikael Morin <mikael@gcc.gnu.org>
346
347 PR fortran/54107
348 * trans-types.c (gfc_get_function_type): Change a NULL backend_decl
349 to error_mark_node on entry. Detect recursive types. Build a variadic
350 procedure type if the type is recursive. Restore the initial
351 backend_decl.
352
353 2013-02-07 Tobias Burnus <burnus@net-b.de>
354
355 PR fortran/54339
356 * gfortran.texi (Standards): Mention TS29113.
357 (Varying Length Character): Mention deferred-length
358 strings.
359 (Fortran 2003 Status): Add unlimited polymorphic.
360 (TS 29113 Status): Add TYPE(*) and DIMENSION(..).
361 (C Interop): Update the section about TS29113.
362
363 2013-02-06 Paul Thomas <pault@gcc.gnu.org>
364
365 PR fortran/55789
366 * trans-array.c (trans_array_constructor): Remove condition
367 'dynamic' = true if the loop ubound is a VAR_DECL.
368
369 2013-02-04 Paul Thomas <pault@gcc.gnu.org>
370
371 PR fortran/56008
372 PR fortran/47517
373 * trans-array.c (gfc_alloc_allocatable_for_assignment): Save
374 the lhs descriptor before it is modified for reallocation. Use
375 it to deallocate allocatable components in the reallocation
376 block. Nullify allocatable components for newly (re)allocated
377 arrays.
378
379 2013-02-04 Mikael Morin <mikael@gcc.gnu.org>
380
381 PR fortran/54195
382 * resolve.c (resolve_typebound_procedures): Recurse through
383 resolve_symbol.
384
385 2013-02-04 Mikael Morin <mikael@gcc.gnu.org>
386
387 PR fortran/54107
388 PR fortran/54195
389 * gfortran.h (struct gfc_symbol): New field 'resolved'.
390 * resolve.c (resolve_fl_var_and_proc): Don't skip result symbols.
391 (resolve_symbol): Skip duplicate calls. Don't check the current
392 namespace.
393
394 2013-02-02 Thomas Koenig <tkoenig@gcc.gnu.org>
395
396 PR fortran/50627
397 PR fortran/56054
398 * decl.c (gfc_match_end): Remove half-ready namespace
399 from parent if the end of a block is missing.
400 * parse.c (parse_module): Do not put namespace into
401 gsymbol on error.
402
403 2013-01-30 Tobias Burnus <burnus@net-b.de>
404
405 PR fortran/56138
406 * trans-decl.c (gfc_trans_deferred_vars): Fix deferred-length
407 results for functions without extra result variable.
408
409 2013-01-29 Janus Weil <janus@gcc.gnu.org>
410 Mikael Morin <mikael@gcc.gnu.org>
411
412 PR fortran/54107
413 * gfortran.h (gfc_component): Delete members 'formal' and 'formal_ns'.
414 (gfc_copy_formal_args,gfc_copy_formal_args_ppc,gfc_expr_replace_symbols,
415 gfc_expr_replace_comp): Delete.
416 (gfc_sym_get_dummy_args): New prototype.
417 * dependency.c (gfc_check_fncall_dependency): Use
418 'gfc_sym_get_dummy_args'.
419 * expr.c (gfc_is_constant_expr): Ditto.
420 (replace_symbol,gfc_expr_replace_symbols,replace_comp,
421 gfc_expr_replace_comp): Deleted.
422 * frontend-passes.c (doloop_code,do_function): Use
423 'gfc_sym_get_dummy_args'.
424 * interface.c (gfc_check_operator_interface,gfc_compare_interfaces,
425 gfc_procedure_use,gfc_ppc_use,gfc_arglist_matches_symbol,
426 gfc_check_typebound_override): Ditto.
427 * module.c (MOD_VERSION): Bump module version.
428 (mio_component): Do not read/write 'formal' and 'formal_ns'.
429 * resolve.c (resolve_procedure_interface,resolve_fl_derived0): Do not
430 copy formal args, but just keep a pointer to the interface.
431 (resolve_function,resolve_call,resolve_typebound_generic_call,
432 resolve_ppc_call,resolve_expr_ppc,generate_component_assignments,
433 resolve_fl_procedure,gfc_resolve_finalizers,check_generic_tbp_ambiguity,
434 resolve_typebound_procedure,check_uop_procedure): Use
435 'gfc_sym_get_dummy_args'.
436 * symbol.c (free_components): Do not free 'formal' and 'formal_ns'.
437 (gfc_copy_formal_args,gfc_copy_formal_args_ppc): Deleted.
438 (gfc_sym_get_dummy_args): New function.
439 * trans-array.c (get_array_charlen,gfc_walk_elemental_function_args):
440 Use 'gfc_sym_get_dummy_args'.
441 * trans-decl.c (build_function_decl,create_function_arglist,
442 build_entry_thunks,init_intent_out_dt,gfc_trans_deferred_vars,
443 add_argument_checking): Ditto.
444 * trans-expr.c (gfc_map_fcn_formal_to_actual,gfc_conv_procedure_call,
445 gfc_conv_statement_function): Ditto.
446 * trans-stmt.c (gfc_conv_elemental_dependencies): Ditto.
447 * trans-types.c (create_fn_spec,gfc_get_function_type): Ditto.
448
449 2013-01-28 Tobias Burnus <burnus@net-b.de>
450 Mikael Morin <mikael@gcc.gnu.org>
451
452 PR fortran/53537
453 * symbol.c (gfc_find_sym_tree): Don't look for the symbol outside an
454 interface block.
455 (gfc_get_ha_symtree): Let gfc_find_sym_tree lookup the parent namespace.
456 * decl.c (gfc_match_data_decl): Ditto.
457 (variable_decl): Remove undeclared type error.
458 (gfc_match_import): Use renamed instead of original name.
459
460 2013-01-27 Paul Thomas <pault@gcc.gnu.org>
461
462 PR fortran/55984
463 PR fortran/56047
464 * gfortran.h : Add associate_var to symbol_attr.
465 * resolve.c (resolve_assoc_var): Set associate_var attribute.
466 If the target class_ok is set, set it for the associate
467 variable.
468 * check.c (allocatable_check): Associate variables should not
469 have the allocatable attribute even if their symbols do.
470 * class.c (gfc_build_class_symbol): Symbols with associate_var
471 set will always have a good class container.
472
473 2013-01-23 Janus Weil <janus@gcc.gnu.org>
474
475 PR fortran/56081
476 * resolve.c (resolve_select): Add argument 'select_type', reject
477 non-scalar expressions.
478 (resolve_select_type,resolve_code): Pass new argument to
479 'resolve_select'.
480
481 2013-01-23 Jakub Jelinek <jakub@redhat.com>
482
483 PR fortran/56052
484 * trans-decl.c (gfc_get_symbol_decl): Set DECL_ARTIFICIAL
485 and DECL_IGNORED_P on select_type_temporary and don't set
486 DECL_BY_REFERENCE.
487
488 2013-01-21 Thomas Koenig <tkoenig@gcc.gnu.org>
489
490 PR fortran/55919
491 * scanner.c (add_path_to_list): Copy path to temporary and strip
492 trailing directory separators before calling stat().
493
494 2013-01-17 Richard Biener <rguenther@suse.de>
495
496 * trans-stmt.c (gfc_trans_do): Conditionally compute countm1
497 dependent on sign of step, avoids repeated evaluation of
498 step sign test. Avoid undefined overflow issues by using unsigned
499 arithmetic.
500
501 2013-01-16 Janus Weil <janus@gcc.gnu.org>
502
503 PR fortran/55983
504 * class.c (find_typebound_proc_uop): Check for f2k_derived instead of
505 asserting it.
506
507 2013-01-16 Jakub Jelinek <jakub@redhat.com>
508 Tobias Burnus <burnus@net-b.de>
509
510 PR driver/55884
511 * lang.opt (fintrinsic-modules-path): Don't accept Joined.
512 (fintrinsic-modules-path=): New.
513 * options.c (gfc_handle_option, gfc_get_option_string,
514 gfc_get_option_string): Handle the latter.
515
516 2013-01-16 Jakub Jelinek <jakub@redhat.com>
517
518 PR fortran/52865
519 * trans-stmt.c (gfc_trans_do): Put countm1-- before conditional
520 and use value of countm1 before the decrement in the condition.
521
522 2013-01-15 Paul Thomas <pault@gcc.gnu.org>
523
524 PR fortran/54286
525 * expr.c (gfc_check_pointer_assign): Check for presence of
526 's2' before using it.
527
528 2013-01-14 Thomas Koenig <tkoenig@gcc.gnu.org>
529
530 PR fortran/55806
531 * frontend-passes.c (optimize_reduction): New function,
532 including prototype.
533 (callback_reduction): Likewise.
534 (gfc_run_passes): Also run optimize_reduction.
535 (copy_walk_reduction_arg): New function.
536 (dummy_code_callback): New function.
537
538 2013-01-13 Jakub Jelinek <jakub@redhat.com>
539
540 PR fortran/55935
541 * trans-expr.c (gfc_conv_structure): Call
542 unshare_expr_without_location on the ctor elements.
543
544 2013-01-13 Paul Thomas <pault@gcc.gnu.org>
545
546 PR fortran/54286
547 * expr.c (gfc_check_pointer_assign): Ensure that both lvalue
548 and rvalue interfaces are presented to gfc_compare_interfaces.
549 Simplify references to interface names by using the symbols
550 themselves. Call gfc_compare_interfaces with s1 and s2 inter-
551 changed to overcome the asymmetry of this function. Do not
552 repeat the check for the presence of s1 and s2.
553
554 2013-01-12 Janus Weil <janus@gcc.gnu.org>
555
556 PR fortran/55072
557 * trans-array.c (gfc_conv_array_parameter): No packing was done for
558 full arrays of derived type.
559
560 2013-01-08 Paul Thomas <pault@gcc.gnu.org>
561
562 PR fortran/55868
563 * class.c (get_unique_type_string): Change $tar to STAR and
564 replace sprintf by strcpy where there is no formatting.
565 * decl.c (gfc_match_decl_type_spec): Change $tar to STAR.
566
567 2013-01-09 Mikael Morin <mikael@gcc.gnu.org>
568
569 PR fortran/47203
570 * module.c (check_for_ambiguous): Get the current program unit using
571 gfc_current_ns.
572
573 2013-01-09 Tobias Burnus <burnus@net-b.de>
574
575 PR fortran/55758
576 * resolve.c (resolve_symbol): Reject non-C_Bool logicals
577 in BIND(C) procedures with -std=f*.
578
579 2013-01-08 Paul Thomas <pault@gcc.gnu.org>
580
581 PR fortran/55618
582 * trans-expr.c (gfc_conv_procedure_call): Dereference scalar
583 character function arguments to elemental procedures in
584 scalarization loops.
585
586 2013-01-07 Tobias Burnus <burnus@net-b.de>
587
588 PR fortran/55763
589 * gfortran.h (gfc_check_assign_symbol): Update prototype.
590 * decl.c (add_init_expr_to_sym, do_parm): Update call.
591 * expr.c (gfc_check_assign_symbol): Handle BT_CLASS and
592 improve error location; support components.
593 (gfc_check_pointer_assign): Handle component assignments.
594 * resolve.c (resolve_fl_derived0): Call gfc_check_assign_symbol.
595 (resolve_values): Update call.
596 (resolve_structure_cons): Avoid double diagnostic.
597
598 2013-01-07 Tobias Burnus <burnus@net-b.de>
599 Thomas Koenig <tkoenig@gcc.gnu.org>
600
601 PR fortran/55852
602 * expr.c (gfc_build_intrinsic_call): Avoid clashes
603 with user's procedures.
604 * gfortran.h (gfc_build_intrinsic_call): Update prototype.
605 * simplify.c (gfc_simplify_size): Update call.
606 * class.c (finalization_scalarizer, finalization_get_offset,
607 finalizer_insert_packed_call, generate_finalization_wrapper):
608 Clean up by using gfc_build_intrinsic_call.
609
610 2013-01-07 Tobias Burnus <burnus@net-b.de>
611
612 PR fortran/55763
613 * resolve.c (resolve_select_type): Reject intrinsic types for
614 a non-unlimited-polymorphic selector.
615
616 2013-01-06 Paul Thomas <pault@gcc.gnu.org>
617
618 PR fortran/53876
619 PR fortran/54990
620 PR fortran/54992
621 * trans-array.c (build_array_ref): Check the TYPE_CANONICAL
622 to see if it is GFC_CLASS_TYPE_P.
623 * trans-expr.c (gfc_get_vptr_from_expr): The same.
624 (gfc_conv_class_to_class): If the types are not the same,
625 cast parmese->expr to the type of ctree.
626 * trans-types.c (gfc_get_derived_type): GFC_CLASS_TYPE_P of
627 CLASS components must be set.
628
629 2013-01-06 Mikael Morin <mikael@gcc.gnu.org>
630
631 PR fortran/42769
632 PR fortran/45836
633 PR fortran/45900
634 * module.c (read_module): Don't reuse local symtree if the associated
635 symbol isn't exactly the one wanted. Don't reuse local symtree if it is
636 ambiguous.
637 * resolve.c (resolve_call): Use symtree's name instead of symbol's to
638 lookup the symtree.
639
640 2013-01-05 Steven G. Kargl <kargl@gcc.gnu.org>
641 Mikael Morin <mikael@gcc.gnu.org>
642
643 PR fortran/55827
644 * class.c (gfc_fix_class_refs): Adapt ts initialization for the case
645 e->symtree == NULL.
646 * trans-expr.c (gfc_conv_function_expr): Init sym earlier. Use it.
647
648 2013-01-05 Tobias Burnus <burnus@net-b.de>
649
650 * class.c (finalize_component): Used passed offset expr.
651 (finalization_get_offset): New static function.
652 (finalizer_insert_packed_call, generate_finalization_wrapper): Use it
653 to handle noncontiguous arrays.
654
655 2013-01-04 Tobias Burnus <burnus@net-b.de>
656
657 * trans.c (gfc_build_final_call): New function.
658 * trans.h (gfc_build_final_call, gfc_conv_scalar_to_descriptor):
659 New function prototypes.
660 * trans-expr.c (gfc_conv_scalar_to_descriptor): Renamed from
661 conv_scalar_to_descriptor, removed static attribute.
662 (gfc_conv_procedure_call): Honor renaming.
663
664 2013-01-04 Tobias Burnus <burnus@net-b.de>
665
666 * intrinsic.c (add_functions): New internal intrinsic
667 function GFC_PREFIX ("stride").
668 * gfortran.h (gfc_isym_id): Add GFC_ISYM_STRIDE.
669 * intrinsic.h (gfc_resolve_stride): New prototypes.
670 * iresolve.c (gfc_resolve_stride): New function.
671 * trans-intrinsic.c (conv_intrinsic_stride): New static
672 function.
673 (gfc_conv_intrinsic_function): Use it.
674
675 2013-01-04 Tobias Burnus <burnus@net-b.de>
676
677 * class.c (gfc_find_intrinsic_vtab): Add _final
678 component.
679 * decl.c (gfc_match_null): Remove superfluous
680 variadic argument to gfc_match.
681
682 2013-01-04 Paul Thomas <pault@gcc.gnu.org>
683
684 PR fortran/55172
685 * match.c (copy_ts_from_selector_to_associate): Remove call to
686 gfc_resolve_expr and replace it with explicit setting of the
687 array reference type.
688 * resolve.c (resolve_select_type): It is an error if the
689 selector is coindexed.
690
691 2013-01-04 Tobias Burnus <burnus@net-b.de>
692
693 PR fortran/55763
694 * decl.c (gfc_match_null): Parse and reject MOLD.
695
696 2013-01-04 Tobias Burnus <burnus@net-b.de>
697
698 PR fortran/55854
699 PR fortran/55763
700 * class.c (gfc_class_null_initializer): Fix finding the vtab.
701 (gfc_find_intrinsic_vtab): Use BT_VOID for some components.
702
703 2013-01-03 Janus Weil <janus@gcc.gnu.org>
704
705 PR fortran/55855
706 * expr.c (gfc_check_assign): Use 'gfc_expr_attr' to evaluate attributes
707 of rvalue. Correct hyphenation in error message.
708
709 2013-01-03 Jakub Jelinek <jakub@redhat.com>
710
711 * gfortranspec.c (lang_specific_driver): Update copyright notice
712 dates.
713 \f
714 Copyright (C) 2013 Free Software Foundation, Inc.
715
716 Copying and distribution of this file, with or without modification,
717 are permitted in any medium without royalty provided the copyright
718 notice and this notice are preserved.