OSDN Git Service

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