]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/fortran/ChangeLog
Fix up ChangeLog entries (name, e-mail, formatting, otherwise).
[thirdparty/gcc.git] / gcc / fortran / ChangeLog
1 2013-10-23 Tobias Burnus <burnus@net-b.de>
2
3 PR fortran/58793
4 * interface.c (compare_parameter): Reject passing TYPE(*)
5 to CLASS(*).
6
7 2013-10-22 Paul Thomas <pault@gcc.gnu.org>
8
9 PR fortran 57893
10 * class.c : Include target-memory.h.
11 (gfc_find_intrinsic_vtab) Build a minimal expression so that
12 gfc_element_size can be used to obtain the storage size, rather
13 that the kind value.
14
15 2013-10-21 Tobias Burnus <burnus@net-b.de>
16
17 PR fortran/58803
18 * decl.c (match_ppc_decl): Prevent later
19 double free.
20
21 2013-10-17 Andrew MacLeod <amacleod@redhat.com>
22
23 * trans-openmp.c: Include omp-low.h.
24
25 2013-10-16 Tobias Burnus <burnus@net-b.de>
26
27 PR fortran/58652
28 * interface.c (compare_parameter): Accept passing CLASS(*)
29 to CLASS(*).
30
31 2013-10-16 Tobias Burnus <burnus@net-b.de>
32
33 * intrinsic.texi (OpenMP Modules): Update to OpenMPv4.
34 Document omp_proc_bind_kind.
35
36 2013-10-15 Tobias Burnus <burnus@net-b.de>
37
38 PR fortran/58652
39 * trans-intrinsic.c (conv_intrinsic_move_alloc): Fix handling
40 of CLASS(*) variables.
41
42 2013-10-14 Tobias Burnus <burnus@net-b.de>
43
44 PR fortran/58658
45 * expr.c (gfc_check_vardef_context): Fix pointer diagnostic
46 for CLASS(*).
47
48 2013-10-11 Jakub Jelinek <jakub@redhat.com>
49
50 * trans-openmp.c (gfc_omp_clause_default_ctor,
51 gfc_omp_clause_dtor): Return NULL for OMP_CLAUSE_REDUCTION.
52 * f95-lang.c (ATTR_NULL, DEF_FUNCTION_TYPE_8): Define.
53 * types.def (DEF_FUNCTION_TYPE_8): Document.
54 (BT_FN_VOID_OMPFN_PTR_UINT,
55 BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG,
56 BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG_LONG,
57 BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT): Remove.
58 (BT_FN_VOID_OMPFN_PTR_UINT_UINT_UINT,
59 BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG_UINT,
60 BT_FN_VOID_OMPFN_PTR_UINT_LONG_LONG_LONG_LONG_UINT,
61 BT_FN_BOOL_INT, BT_FN_BOOL_INT_BOOL, BT_FN_VOID_UINT_UINT,
62 BT_FN_VOID_INT_PTR_SIZE_PTR_PTR_PTR,
63 BT_FN_VOID_INT_OMPFN_PTR_SIZE_PTR_PTR_PTR,
64 BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT_PTR): New.
65
66 2013-10-10 Tobias Burnus <burnus@net-b.de>
67
68 PR fortran/58226
69 * options.c (gfc_get_option_string): Handle zero arg case.
70
71 2013-10-02 Tobias Burnus <burnus@net-b.de>
72
73 PR fortran/58593
74 * trans-expr.c (gfc_conv_string_tmp): Fix obtaining
75 the byte size of a single character.
76
77 2013-10-01 Tobias Burnus <burnus@net-b.de>
78
79 PR fortran/58579
80 * trans-expr.c (gfc_conv_string_tmp): Correctly obtain
81 the byte size of a single character.
82
83 2013-09-27 Janne Blomqvist <jb@gcc.gnu.org>
84
85 * intrinsic.texi (DATE_AND_TIME): Fix example.
86
87 2013-09-25 Tobias Burnus <burnus@net-b.de>
88
89 PR fortran/58436
90 * class.c (generate_finalization_wrapper): Handle CLASS(*).
91
92 2013-09-25 Tobias Burnus <burnus@net-b.de>
93
94 PR fortran/57697
95 PR fortran/58469
96 * resolve.c (generate_component_assignments): Avoid double free
97 at runtime and freeing a still-being used expr.
98
99 2013-09-25 Tom Tromey <tromey@redhat.com>
100
101 * Make-lang.in (fortran_OBJS): Use fortran/gfortranspec.o.
102 (gfortranspec.o): Remove.
103 (CFLAGS-fortran/gfortranspec.o): New variable.
104 (GFORTRAN_D_OBJS): Update.
105 ($(F95_PARSER_OBJS), fortran/openmp.o, GFORTRAN_TRANS_DEPS)
106 (fortran/f95-lang.o, fortran/scanner.o, fortran/convert.o)
107 (fortran/frontend-passes.o, fortran/trans.o, fortran/trans-decl.o)
108 (fortran/trans-types, fortran/trans-const.o, fortran/trans-expr.o)
109 (fortran/trans-stmt.o, fortran/trans-openmp.o, fortran/trans-io.o)
110 (fortran/trans-array.o, fortran/trans-intrinsic.o)
111 (fortran/dependency.o, fortran/trans-common.o, fortran/resolve.o)
112 (fortran/data.o, fortran/options.o, fortran/cpp.o)
113 (fortran/scanner.o, fortran/module.o): Remove.
114
115 2013-09-25 Tom Tromey <tromey@redhat.com>
116
117 * Make-lang.in (gfortranspec.o): Don't use subshell.
118
119 2013-09-23 Janus Weil <janus@gcc.gnu.org>
120
121 PR fortran/58355
122 * decl.c (check_extended_derived_type): Prevent segfault, modify error
123 message.
124
125 2013-09-20 Janus Weil <janus@gcc.gnu.org>
126
127 PR fortran/58099
128 * expr.c (gfc_check_pointer_assign): Remove second call to
129 'gfc_compare_interfaces' with swapped arguments.
130 * interface.c (gfc_compare_interfaces): Symmetrize the call to
131 'check_result_characteristics' by calling it with swapped arguments.
132
133 2013-09-18 Tobias Burnus <burnus@net-b.de>
134
135 * expr.c (gfc_check_assign_symbol): Free lvalue.ref.
136
137 2013-09-18 Tobias Burnus <burnus@net-b.de>
138
139 PR fortran/43366
140 * primary.c (gfc_variable_attr): Also handle codimension.
141 * resolve.c (resolve_ordinary_assign): Add invalid-diagnostic for
142 polymorphic assignment.
143
144 2013-09-16 Tobias Burnus <burnus@net-b.de>
145
146 PR fortran/58356
147 * class.c (generate_finalization_wrapper): Init proc_tree if
148 not yet resolved.
149
150 2013-09-16 Tobias Burnus <burnus@net-b.de>
151
152 PR fortran/57697
153 * resolve.c (generate_component_assignments): Correctly handle the
154 case that the LHS is not allocated.
155
156 2013-09-15 Tobias Burnus <burnus@net-b.de>
157
158 PR fortran/57697
159 * resolve.c (generate_component_assignments): Handle unallocated
160 LHS with defined assignment of components.
161
162 2013-09-12 Brooks Moses <bmoses@google.com>
163
164 PR driver/42955
165 * Make-lang.in: Do not install driver binaries in $(target)/bin.
166
167 2013-09-09 Tobias Burnus <burnus@net-b.de>
168
169 * invoke.texi (Error and Warning Options): Add hyphen.
170
171 2013-09-02 Thomas Koenig <tkoenig@gcc.gnu.org>
172
173 PR fortran/PR56519
174 * gfortran.h: Declare gfc_do_concurrent_flag as extern.
175 * resolve.c: Rename do_concurrent_flag to gfc_do_concurrent_flag
176 and make non-static.
177 (resolve_function): Use gfc_do_concurrent_flag instead of
178 do_concurrent_flag.
179 (pure_subroutine): Likewise.
180 (resolve_code): Likewise.
181 (resolve_types): Likewise.
182 * intrinsic.c (gfc_intrinsic_sub_interface): Raise error for
183 non-pure intrinsic subroutines within DO CONCURRENT.
184
185 2013-08-29 Thomas Koenig <tkoenig@gcc.gnu.org>
186
187 PR fortran/52243
188 * trans-expr.c (is_runtime_conformable): New function.
189 * gfc_trans_assignment_1: Use it.
190
191 2013-08-26 Thomas Koenig <tkoenig@gcc.gnu.org>
192
193 PR fortran/58146
194 * array.c (gfc_ref_dimen_size): If possible, use
195 gfc_dep_difference to calculate array refrence
196 sizes. Fall back to integer code otherwise.
197 * dependency.c (discard_nops). Move up.
198 Also discarde widening integer conversions.
199 (gfc_dep_compare_expr): Use discard_nops.
200
201 2013-08-23 Mikael Morin <mikael@gcc.gnu.org>
202
203 PR fortran/57798
204 * trans-array.c (gfc_conv_ss_startstride, set_loop_bounds,
205 gfc_set_delta): Generate preliminary code before the outermost loop.
206
207 2013-08-23 Janus Weil <janus@gcc.gnu.org>
208
209 PR fortran/57843
210 * interface.c (gfc_extend_assign): Look for type-bound assignment
211 procedures before non-typebound.
212
213 2013-08-23 Mikael Morin <mikael@gcc.gnu.org>
214
215 * trans-array.c (gfc_conv_section_startstride): Move &loop->pre access
216 to the callers.
217 (gfc_conv_ss_startstride, gfc_conv_expr_descriptor): Update callers.
218
219 2013-08-22 Janus Weil <janus@gcc.gnu.org>
220
221 PR fortran/58185
222 * match.c (copy_ts_from_selector_to_associate): Only build class
223 container for polymorphic selector. Some cleanup.
224
225 2013-08-20 Janus Weil <janus@gcc.gnu.org>
226
227 PR fortran/53655
228 * trans-decl.c (generate_local_decl): Check if type has any components.
229
230 2013-08-19 Janus Weil <janus@gcc.gnu.org>
231
232 PR fortran/46271
233 * openmp.c (resolve_omp_clauses): Bugfix for procedure pointers.
234
235 2013-08-12 Thomas Koenig <tkoenig@gcc.gnu.org>
236
237 PR fortran/56666
238 * gfortran.h (gfc_option_t): Add warn_zerotrip.
239 * invoke.texi (-Wzerotrip): Document option.
240 * lang.opt (Wzerotrip): Add.
241 * options.c (gfc_init_options): Initialize warn_zerotrip.
242 (set_Wall): Add handling of warn_zerotrip.
243 (gfc_handle_option): Handle OPT_Wzerotrip.
244 * resolve.c (gfc_resolve_iterator): Honor
245 gfc_option.warn_zerotrip; update error message to show
246 how to suppress the warning.
247
248 2013-08-09 Janus Weil <janus@gcc.gnu.org>
249
250 * gfortran.h (gfc_get_code): Modified prototype.
251 * class.c (finalize_component, finalization_scalarizer,
252 finalization_get_offset, finalizer_insert_packed_call,
253 generate_finalization_wrapper, gfc_find_derived_vtab,
254 gfc_find_intrinsic_vtab): Use 'gfc_get_code'.
255 * io.c (match_io_iterator, match_io_element, terminate_io, get_io_list,
256 gfc_match_inquire): Call 'gfc_get_code' with argument.
257 * match.c (match_simple_forall, gfc_match_forall, gfc_match_goto,
258 gfc_match_nullify, gfc_match_call, match_simple_where, gfc_match_where):
259 Ditto.
260 * parse.c (new_level): Ditto.
261 (add_statement): Use XCNEW.
262 * resolve.c (resolve_entries, resolve_allocate_expr,
263 resolve_select_type, build_assignment, build_init_assign): Call
264 'gfc_get_code' with argument.
265 * st.c (gfc_get_code): Add argument 'op'.
266 * trans-expr.c (gfc_trans_class_array_init_assign): Call 'gfc_get_code'
267 with argument.
268 * trans-stmt.c (gfc_trans_allocate): Ditto.
269
270 2013-08-09 Janus Weil <janus@gcc.gnu.org>
271
272 PR fortran/58058
273 * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Free the temporary
274 string, if necessary.
275
276 2013-08-06 Martin Jambor <mjambor@suse.cz>
277
278 PR fortran/57987
279 * trans-decl.c (gfc_generate_function_code): Never call
280 cgraph_finalize_function on nested functions.
281
282 2013-08-06 Janus Weil <janus@gcc.gnu.org>
283
284 PR fortran/57306
285 * class.c (gfc_class_null_initializer): Rename to
286 'gfc_class_initializer'. Treat non-NULL init-exprs.
287 * gfortran.h (gfc_class_null_initializer): Update prototype.
288 * trans-decl.c (gfc_get_symbol_decl): Treat class variables.
289 * trans-expr.c (gfc_conv_initializer): Ditto.
290 (gfc_trans_subcomponent_assign): Renamed gfc_class_null_initializer.
291
292 2013-07-30 Tobias Burnus <burnus@net-b.de>
293
294 PR fortran/57530
295 * symbol.c (gfc_type_compatible): A type is type compatible with
296 a class if both have the same declared type.
297 * interface.c (compare_type): Reject CLASS/TYPE even if they
298 are type compatible.
299
300 2013-07-30 Tobias Burnus <burnus@net-b.de>
301
302 PR fortran/57530
303 * trans-expr.c (gfc_trans_class_assign): Handle CLASS array
304 functions.
305 (gfc_trans_pointer_assign): Ditto and support pointer assignment of
306 a polymorphic var to a nonpolymorphic var.
307
308 2013-07-22 Po Chang <pchang9@cs.wisc.edu>
309
310 * match.c (gfc_match_call): Exit loop after setting i.
311
312 * resolve.c (resolve_variable): Exit loop after setting seen.
313
314 * expr.c (gfc_check_pointer_assign): Exit loop after setting warn.
315
316 * trans-array.c (set_loop_bounds): Exit loop after setting
317 nonoptional_arr.
318
319 * trans-io.c (gfc_trans_transfer): Exit loop after setting seen_vector.
320
321 2013-07-28 Thomas Koenig <tkoenig@gcc.gnu.org>
322
323 PR fortran/58009
324 * expr.c (gfc_check_vardef_context): Check for same values in
325 vector expression subscripts.
326
327 2013-07-27 Tobias Burnus <burnus@net-b.de>
328
329 PR fortran/57991
330 * interface.c (check_some_aliasing): Also warn for intent OUT/OUT.
331
332 2013-07-27 Janus Weil <janus@gcc.gnu.org>
333
334 PR fortran/57285
335 * check.c (dim_rank_check): Re-enable this check for CLASS arrays.
336
337 2013-07-25 Janus Weil <janus@gcc.gnu.org>
338
339 PR fortran/57966
340 * resolve.c (resolve_typebound_function): Make sure the declared type,
341 including its type-bound procedures, is resolved before resolving the
342 actual type-bound call.
343
344 2013-07-25 Janus Weil <janus@gcc.gnu.org>
345
346 PR fortran/57639
347 * interface.c (compare_parameter): Check for class_ok.
348 * simplify.c (gfc_simplify_same_type_as): Ditto.
349
350 2013-07-23 Ondřej Bílka <neleai@seznam.cz>
351
352 * decl.c: Fix comment typos.
353 * interface.c: Likewise.
354 * trans-array.c: Likewise.
355 * trans.c: Likewise.
356
357 2013-07-22 Tobias Burnus <burnus@net-b.de>
358
359 PR fortran/57906
360 PR fortran/52052
361 * class.c (gfc_build_class_symbol): Set coarray_comp.
362 * trans-array.c (structure_alloc_comps): For coarrays,
363 directly use the data pointer address.
364
365 2013-07-22 Chang <pchang9@cs.wisc.edu>
366
367 * trans-decl.c (gfc_build_dummy_array_decl): Exit loop after
368 setting PACKED_PARTIAL.
369
370 2013-07-22 Tobias Burnus <burnus@net-b.de>
371
372 * trans-array.c (gfc_array_allocate): Correct memory-leak patch.
373
374 2013-07-22 Tobias Burnus <burnus@net-b.de>
375
376 * trans-array.c (gfc_array_allocate,
377 gfc_trans_deferred_array): Plug memory leak.
378
379 2013-07-21 Ondřej Bílka <neleai@seznam.cz>
380
381 * trans-decl.c: Fix comment typos.
382 * trans-expr.c: Ditto.
383
384 2013-07-21 Thomas Koenig <tkoenig@gcc.gnu.org>
385
386 PR fortran/56937
387 * dependency.c (gfc_dep_resolver): Treat identical
388 array subscripts as identical; don't unconditionally
389 return a dependency if an array subscript is found.
390
391 2013-07-21 Tobias Burnus <burnus@net-b.de>
392
393 PR fortran/35862
394 * libgfortran.h (GFC_FPE_DOWNWARD, GFC_FPE_TONEAREST,
395 GFC_FPE_TOWARDZERO, GFC_FPE_UPWARD): New defines.
396
397 2013-07-21 Tobias Burnus <burnus@net-b.de>
398
399 PR fortran/57894
400 * check.c (min_max_args): Add keyword= check.
401
402 2013-07-17 Mikael Morin <mikael@gcc.gnu.org>
403 Tobias Burnus <burnus@net-b.de>
404
405 PR fortran/57895
406 * match.c (gfc_match_name): Ensure that the error
407 message regarding -fdollar-ok gets printed.
408 (gfc_match_common): Avoid multiple freeing.
409
410 2013-07-16 Tobias Burnus <burnus@net-b.de>
411
412 PR fortran/57912
413 * trans-expr.c (gfc_trans_scalar_assign): Correct if
414 condition for caf realloc.
415
416 2013-07-15 Tobias Burnus <burnus@net-b.de>
417
418 * trans-array.h (gfc_deallocate_alloc_comp_no_caf,
419 gfc_reassign_alloc_comp_caf): New prototype.
420 * trans-array.c (enum): Add DEALLOCATE_ALLOC_COMP_NO_CAF
421 and COPY_ALLOC_COMP_CAF.
422 (structure_alloc_comps): Handle it.
423 (gfc_reassign_alloc_comp_caf,
424 gfc_deallocate_alloc_comp_no_caf): New function.
425 (gfc_alloc_allocatable_for_assignment): Call it.
426 * trans-expr.c (gfc_trans_scalar_assign,
427 gfc_trans_arrayfunc_assign, gfc_trans_assignment_1): Ditto.
428 * parse.c (parse_derived): Correctly set coarray_comp.
429 * resolve.c (resolve_symbol): Improve error wording.
430
431 2013-07-15 Tobias Burnus <burnus@net-b.de>
432
433 PR fortran/37336
434 * trans.c (gfc_add_comp_finalizer_call): New function.
435 * trans.h (gfc_add_comp_finalizer_call): New prototype.
436 * trans-array.c (structure_alloc_comps): Call it.
437
438 2013-07-14 Thomas Koenig <tkoenig@gcc.gnu.org>
439 Tobias Burnus <burnus@gcc.gnu.org>
440
441 PR fortran/52669
442 * trans-decl.c (gfc_finish_var_decl): Move setting of
443 PRIVATE for a module variable if the module has a private
444 default or -fmodule-private is given to...
445 (gfc_create_module_variable): here. Optionally
446 warn about private module variable which is not used.
447
448 2013-07-08 Tobias Burnus <burnus@net-b.de>
449
450 PR fortran/57834
451 * check.c (is_c_interoperable): Add special case for c_f_pointer.
452 (explicit-size, gfc_check_c_f_pointer, gfc_check_c_loc): Update
453 call.
454
455 2013-07-08 Tobias Burnus <burnus@net-b.de>
456
457 PR fortran/50554
458 * io.c (match_inquire_element): Add missing do-var check.
459
460 2013-07-08 Tobias Burnus <burnus@net-b.de>
461
462 PR fortran/57785
463 * simplify.c (compute_dot_product): Complex conjugate for
464 dot_product.
465 (gfc_simplify_dot_product, gfc_simplify_matmul): Update call.
466
467 2013-07-08 Tobias Burnus <burnus@net-b.de>
468
469 PR fortran/57469
470 * trans-decl.c (generate_local_decl): Don't warn that
471 a dummy is unused, when it is in a namelist.
472
473 2013-07-01 Dominique d'Humieres <dominiq@lps.ens.fr>
474
475 PR fortran/54788
476 * array.c (spec_size): handle the case as==NULL.
477
478 2013-06-26 Tobias Burnus <burnus@net-b.de>
479
480 PR fortran/29800
481 * trans-array.c (gfc_conv_array_ref): Improve out-of-bounds
482 diagnostic message.
483 * trans-array.c (gfc_conv_array_ref): Update prototype.
484 * trans-expr.c (gfc_conv_variable): Update call.
485
486 2013-06-24 Steven G. Kargl <sgk@troutmask.apl.washington.edu>
487 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
488 Dominique d'Humieres <dominiq@lps.ens.fr>
489
490 PR fortran/52413
491 * simplify.c (gfc_simplify_fraction): Fix the sign of negative values.
492
493 2013-06-21 Tobias Burnus <burnus@net-b.de>
494
495 PR fortran/37336
496 * trans-array.c (gfc_trans_deferred_array): Call the
497 finalizer for nonallocatable local variables.
498 * trans-decl.c (gfc_get_symbol_decl): Add local
499 finalizable vars to the deferred list.
500 (gfc_trans_deferred_vars): Call gfc_trans_deferred_array
501 for those.
502
503 2013-06-21 Tobias Burnus <burnus@net-b.de>
504
505 * trans-array.c (gfc_alloc_allocatable_for_assignment): Allocate
506 at least one byte.
507 * trans-expr.c (alloc_scalar_allocatable_for_assignment): Ditto.
508
509 2013-06-20 Tobias Burnus <burnus@net-b.de>
510
511 * resolve.c (get_temp_from_expr): Don't set FL_VARIABLE twice.
512
513 2013-06-17 Tobias Burnus <burnus@net-b.de>
514
515 * gfortran.h (gfc_option_t): Add fpe_summary.
516 * gfortran.texi (_gfortran_set_options): Update.
517 * invoke.texi (-ffpe-summary): Add doc.
518 * lang.opt (ffpe-summary): Add flag.
519 * options.c (gfc_init_options, gfc_handle_option): Handle it.
520 (gfc_handle_fpe_option): Renamed from gfc_handle_fpe_trap_option,
521 also handle fpe_summary.
522 * trans-decl.c (create_main_function): Update
523 _gfortran_set_options call.
524
525 2013-06-15 Mikael Morin <mikael@gcc.gnu.org>
526
527 PR fortran/49074
528 PR fortran/56136
529 * dependency.c (gfc_check_argument_var_dependency): Return 0 in the
530 array constructor case.
531
532 2013-06-14 Tobias Burnus <burnus@net-b.de>
533
534 PR fortran/57508
535 * resolve.c (get_temp_from_expr): Don't copy function
536 result attributes to temporary.
537
538 2013-06-14 Tobias Burnus <burnus@net-b.de>
539
540 PR fortran/57596
541 * trans-decl.c (gfc_trans_deferred_vars): Honor OPTIONAL
542 for nullify and deferred-strings' length variable.
543
544 2013-06-13 Mikael Morin <mikael@gcc.gnu.org>
545
546 PR fortran/49074
547 * trans-expr.c (gfc_conv_variable): Don't walk the reference chain.
548 Handle NULL array references.
549 (gfc_conv_procedure_call): Remove code handling NULL array references.
550
551 2013-06-11 Tobias Burnus <burnus@net-b.de>
552
553 PR fortran/57535
554 * trans-array.c (build_class_array_ref): Fix ICE for
555 function result variables.
556
557 2013-06-08 Tobias Burnus <burnus@net-b.de>
558
559 PR fortran/37336
560 * trans-decl.c (init_intent_out_dt): Call finalizer
561 when appropriate.
562
563 2013-06-08 Tobias Burnus <burnus@net-b.de>
564
565 PR fortran/57553
566 * simplify.c (gfc_simplify_storage_size): Handle literal
567 strings.
568 * trans-intrinsic.c (gfc_conv_intrinsic_storage_size):
569 Add missing fold_convert.
570
571 2013-06-07 Tobias Burnus <burnus@net-b.de>
572
573 PR fortran/57549
574 * array.c (gfc_match_array_constructor): Call
575 gfc_match_type_spec instead of gfc_match_decl_type_spec.
576 * match.c (gfc_match_type_spec): Renamed from match_type_spec.
577 (gfc_match_type_is, gfc_match_allocate): Update call.
578 * match.h (gfc_match_type_spec): Add prototype.
579
580 2013-06-07 Tobias Burnus <burnus@net-b.de>
581
582 PR fortran/57556
583 * trans.c (gfc_build_final_call): Init block before use.
584
585 2013-06-06 Tobias Burnus <burnus@net-b.de>
586
587 PR fortran/57542
588 * trans.c (gfc_build_final_call): Add se.pre to the block
589 and modify the assert.
590
591 2013-06-04 Tobias Burnus <burnus@net-b.de>
592
593 PR fortran/37336
594 * trans.h (gfc_build_final_call): Remove prototype.
595 (gfc_add_finalizer_call): Add prototype.
596 * trans-array.c (gfc_trans_dealloc_allocated): Support finalization.
597 (structure_alloc_comps): Update caller.
598 (gfc_trans_deferred_array): Call finalizer.
599 * trans-array.h (gfc_trans_dealloc_allocated): Update prototype.
600 * trans-decl.c (gfc_trans_deferred_vars): Don't deallocate/finalize
601 variables of the main program.
602 * trans-expr.c (gfc_conv_procedure_call): Support finalization.
603 * trans-openmp.c (gfc_omp_clause_dtor,
604 gfc_trans_omp_array_reduction): Update calls.
605 * trans-stmt.c (gfc_trans_deallocate): Avoid double deallocation
606 of alloc components.
607 * trans.c (gfc_add_finalizer_call): New function.
608 (gfc_deallocate_with_status,
609 gfc_deallocate_scalar_with_status): Call it
610 (gfc_build_final_call): Fix handling of scalar coarrays,
611 move up in the file and make static.
612
613 2013-06-01 Janus Weil <janus@gcc.gnu.org>
614 Mikael Morin <mikael@gcc.gnu.org>
615
616 * error.c (get_terminal_width): Only limit the width if we're
617 outputting to a terminal. Try to determine width via ioctl.
618
619 2013-06-01 Tobias Burnus <burnus@net-b.de>
620
621 * decl.c (add_global_entry): Take locus.
622 (gfc_match_entry): Update call.
623 (gfc_match_end): Better error location.
624 * parse.c (parse_block_data, parse_module, add_global_procedure,
625 add_global_program): Use better locus data.
626
627 2013-05-31 Tobias Burnus <burnus@net-b.de>
628
629 PR fortran/57456
630 * trans-array.c (gfc_array_init_size): Use passed type spec,
631 when available.
632 (gfc_array_allocate): Pass typespec on.
633 * trans-array.h (gfc_array_allocate): Update prototype.
634 * trans-stmt.c (gfc_trans_allocate): Pass typespec on.
635
636 2013-05-31 Janus Weil <janus@gcc.gnu.org>
637
638 PR fortran/54190
639 PR fortran/57217
640 * gfortran.h (gfc_terminal_width): Remove prototype.
641 * error.c (get_terminal_width): Moved here from misc.c. Renamed.
642 Try to determine terminal width from environment variable.
643 * interface.c (compare_type, compare_rank): New functions. Fix assumed
644 type/rank handling.
645 (compare_type_rank, check_dummy_characteristics,
646 check_result_characteristics, gfc_compare_interfaces): Use them.
647 (symbol_rank): Slightly modified and moved.
648 * misc.c (gfc_terminal_width): Moved to error.c.
649
650 2013-05-30 Janus Weil <janus@gcc.gnu.org>
651
652 PR fortran/54189
653 * resolve.c (check_assumed_size_reference): Check for e->ref.
654
655 2013-05-30 Tobias Burnus <burnus@net-b.de>
656
657 PR fortran/57458
658 * interface.c (compare_parameter): Update C1239/C1240 constraint
659 check for assumed-rank/TS29113.
660
661 2013-05-29 Tobias Burnus <burnus@net-b.de>
662
663 PR fortran/37336
664 * class.c (finalize_component): Fix coarray array refs.
665 (generate_finalization_wrapper): Only gfc_convert_type_warn
666 when the kind value is different.
667 (gfc_find_intrinsic_vtab): _copy's dst is now intent(inout).
668 (gfc_find_derived_vtab): Ditto. Enable finalization-wrapper
669 generation.
670 * module.c (MOD_VERSION): Bump.
671 (gfc_dump_module, gfc_use_module): Remove empty line in .mod.
672 * trans-array.c (gfc_conv_descriptor_token): Accept nonrestricted
673 void pointer.
674 (gfc_array_allocate, structure_alloc_comps): Don't nullify for
675 BT_CLASS allocations.
676 * trans-stmt.c (gfc_trans_allocate): Ditto.
677
678 2013-05-29 Tobias Burnus <burnus@net-b.de>
679
680 PR fortran/37336
681 * resolve.c (gfc_resolve_finalizers): Remove not implemented error.
682
683 2013-05-28 Tobias Burnus <burnus@net-b.de>
684
685 * trans-expr.c (gfc_conv_procedure_call): Deallocate
686 polymorphic arrays for allocatable intent(out) dummies.
687 (gfc_reset_vptr): New function, moved from trans-stmt.c
688 and extended.
689 * trans-stmt.c (reset_vptr): Remove.
690 (gfc_trans_deallocate): Update calls.
691 * trans.h (gfc_reset_vptr): New prototype.
692
693 2013-05-28 Dominique d'Humieres <dominiq@lps.ens.fr>
694
695 PR fortran/57435
696 * module.c (check_for_ambiguous): Avoid null pointer deref.
697
698 2013-05-28 Janus Weil <janus@gcc.gnu.org>
699 Tobias Burnus <burnus@net-b.de>
700
701 PR fortran/57217
702 * interface.c (check_dummy_characteristics): Symmetrize type check.
703
704 2013-05-27 Bud Davis <jmdavis@link.com>
705
706 PR fortran/50405
707 * resolve.c (resolve_formal_arglist): Detect error when an argument
708 has the same name as the function.
709
710 2013-05-27 Tobias Burnus <burnus@net-b.de>
711
712 * expr.c (gfc_build_intrinsic_call): Make symbol as attr.artificial.
713 * intrinsic.c (gfc_is_intrinsic): Disable std check for those.
714
715 2013-05-22 Tobias Burnus <burnus@net-b.de>
716
717 * resolve.c (get_temp_from_expr): Change mangling to
718 start always with a _.
719
720 2013-05-22 Tobias Burnus <burnus@net-b.de>
721
722 * resolve.c (get_temp_from_expr): Fix temp var mangling.
723
724 2013-05-22 Tobias Burnus <burnus@net-b.de>
725
726 PR fortran/57364
727 * resolve.c (get_temp_from_expr): Commit created sym.
728
729 2013-05-22 Tobias Burnus <burnus@net-b.de>
730
731 PR fortran/57338
732 * intrinsic.c (do_check): Move some checks to ...
733 (do_ts29113_check): ... this new function.
734 (check_specific, gfc_intrinsic_sub_interface): Call it.
735
736 2013-05-22 Janne Blomqvist <jb@gcc.gnu.org>
737
738 * intrinsic.texi (RANDOM_SEED): Improve example.
739
740 2013-05-21 Tobias Burnus <burnus@net-b.de>
741
742 PR fortran/57035
743 * intrinsic.c (do_check): Add constraint check for
744 NO_ARG_CHECK, assumed rank and assumed type.
745 * gfortran.texi (NO_ARG_CHECK): Minor wording change,
746 allow PRESENT intrinsic.
747
748 2013-05-20 Tobias Burnus <burnus@net-b.de>
749
750 PR fortran/48858
751 PR fortran/55465
752 * decl.c (add_global_entry): Add sym_name.
753 * parse.c (add_global_procedure): Ditto.
754 * resolve.c (resolve_bind_c_derived_types): Handle multiple decl for
755 a procedure.
756 (resolve_global_procedure): Handle gsym->ns pointing to a module.
757 * trans-decl.c (gfc_get_extern_function_decl): Ditto.
758
759 2013-05-20 Tobias Burnus <burnus@net-b.de>
760
761 PR fortran/48858
762 * decl.c (add_global_entry): Use nonbinding name
763 only for F2003 or if no binding label exists.
764 (gfc_match_entry): Update calls.
765 * parse.c (gfc_global_used): Improve error message.
766 (add_global_procedure): Use nonbinding name
767 only for F2003 or if no binding label exists.
768 (gfc_parse_file): Update call.
769 * resolve.c (resolve_global_procedure): Use binding
770 name when available.
771 * trans-decl.c (gfc_get_extern_function_decl): Ditto.
772
773 2013-05-20 Tobias Burnus <burnus@net-b.de>
774
775 PR fortran/48858
776 * decl.c (gfc_match_bind_c_stmt): Add gfc_notify_std.
777 * match.c (gfc_match_common): Don't add commons to gsym.
778 * resolve.c (resolve_common_blocks): Add to gsym and
779 add checks.
780 (resolve_bind_c_comms): Remove.
781 (resolve_types): Remove call to the latter.
782 * trans-common.c (gfc_common_ns): Remove static var.
783 (gfc_map_of_all_commons): Add static var.
784 (build_common_decl): Correctly handle binding label.
785
786 2013-05-16 Jason Merrill <jason@redhat.com>
787
788 * Make-lang.in (f951$(exeext)): Use link mutex.
789
790 2013-05-05 Tobias Burnus <burnus@net-b.de>
791
792 * resolve.c (conformable_arrays): Avoid segfault
793 when ar.start[i] == NULL.
794
795 2013-05-05 Tobias Burnus <burnus@net-b.de>
796
797 PR fortran/57141
798 * decl.c (gfc_match_null): Permit use-associated
799 NULL intrinsic.
800
801 2013-05-04 Tobias Burnus <burnus@net-b.de>
802
803 * decl.c (gfc_verify_c_interop_param): Permit allocatable
804 and pointer with -std=f2008ts.
805
806 2013-05-02 Tobias Burnus <burnus@net-b.de>
807
808 PR fortran/57142
809 * simplify.c (gfc_simplify_size): Renamed from
810 simplify_size; fix kind=8 handling.
811 (gfc_simplify_size): New function.
812 (gfc_simplify_shape): Add range check.
813 * resolve.c (resolve_function): Fix handling
814 for ISYM_SIZE.
815
816 2013-05-01 Thomas Koenig <tkoenig@gcc.gnu.org>
817
818 * frontend-passes.c (optimize_power): Fix typo
819 in comment.
820
821 2013-04-30 Thomas Koenig <tkoenig@gcc.gnu.org>
822
823 PR fortran/57071
824 * frontend-passes.c (optimize_power): Simplify
825 1**k to 1.
826
827 2013-04-28 Tobias Burnus <burnus@net-b.de>
828
829 PR fortran/57114
830 * intrinsic.texi (RANK): Correct syntax description and
831 expected result.
832
833 2013-04-28 Tobias Burnus <burnus@net-b.de>
834
835 PR fortran/57093
836 * trans-types.c (gfc_get_element_type): Fix handling
837 of scalar coarrays of type character.
838 * intrinsic.texi (PACK): Add missing ")".
839
840 2013-04-28 Thomas Koenig <tkoenig@gcc.gnu.org>
841
842 PR fortran/57071
843 * frontend-passes (optimize_power): New function.
844 (optimize_op): Use it.
845
846 2013-04-25 Janne Blomqvist <jb@gcc.gnu.org>
847
848 PR bootstrap/57028
849 * Make-lang.in (f951): Link in ZLIB.
850 (CFLAGS-fortran/module.o): Add zlib include directory.
851
852 2013-04-22 Janus Weil <janus@gcc.gnu.org>
853
854 PR fortran/53685
855 PR fortran/57022
856 * check.c (gfc_calculate_transfer_sizes): Fix for array-valued SOURCE
857 expressions.
858 * simplify.c (gfc_simplify_sizeof,gfc_simplify_storage_size): Get rid
859 of special treatment for EXPR_ARRAY.
860 * target-memory.h (gfc_element_size): New prototype.
861 * target-memory.c (size_array): Remove.
862 (gfc_element_size): New function.
863 (gfc_target_expr_size): Modified to always return the full size of the
864 expression.
865
866 2013-04-20 Tobias Burnus <burnus@net-b.de>
867
868 PR fortran/56907
869 * trans-intrinsic.c (conv_isocbinding_function): Don't pack array
870 passed to C_LOC
871
872 2013-04-19 Thomas Koenig <tkoenig@gcc.gnu.org>
873 Mikael Morin <mikael@gcc.gnu.org>
874
875 PR fortran/56872
876 * frontend-passes.c (copy_walk_reduction_arg): Change argument type
877 to gfc_constructor. If it has an iterator, wrap the copy of its
878 expression in an array constructor with that iterator. Don't special
879 case function expressions.
880 (callback_reduction): Update caller. Don't return early if there is
881 an iterator.
882
883 2013-04-18 Tobias Burnus <burnus@net-b.de>
884
885 * expr.c (find_array_element): Don't copy expr.
886 * data.c (create_character_initializer): Free expr.
887 * frontend-passes.c (combine_array_constructor): Ditto.
888 * match.c (match_typebound_call, gfc_match_select_type): Ditto.
889 * resolve.c (resolve_typebound_function): Free gfc_ref.
890
891 2013-04-18 Tobias Burnus <burnus@net-b.de>
892
893 PR fortran/56994
894 * invoke.texi (NEAREST): S argument is not optional.
895
896 2013-04-17 Janus Weil <janus@gcc.gnu.org>
897
898 PR fortran/56814
899 * interface.c (check_result_characteristics): Get result from interface
900 if present.
901
902 2013-04-17 Janne Blomqvist <jb@gcc.gnu.org>
903
904 PR fortran/40958
905 * scanner.h: New file.
906 * Make-lang.in: Dependencies on scanner.h.
907 * scanner.c (gfc_directorylist): Move to scanner.h.
908 * module.c: Don't include md5.h, include scanner.h and zlib.h.
909 (MOD_VERSION): Add comment about backwards compatibility.
910 (module_fp): Change type to gzFile.
911 (ctx): Remove.
912 (gzopen_included_file_1): New function.
913 (gzopen_included_file): New function.
914 (gzopen_intrinsic_module): New function.
915 (write_char): Use gzputc.
916 (read_crc32_from_module_file): New function.
917 (read_md5_from_module_file): Remove.
918 (gfc_dump_module): Use gz* functions instead of stdio, check gzip
919 crc32 instead of md5.
920 (read_module_to_tmpbuf): Use gz* functions instead of stdio.
921 (gfc_use_module): Use gz* functions.
922
923 2013-04-16 Tobias Burnus <burnus@net-b.de>
924
925 PR fortran/39505
926 * decl.c (ext_attr_list): Add EXT_ATTR_NO_ARG_CHECK.
927 * gfortran.h (ext_attr_id_t): Ditto.
928 * gfortran.texi (GNU Fortran Compiler Directives):
929 Document it.
930 * interface.c (compare_type_rank): Ignore rank for NO_ARG_CHECK.
931 (compare_parameter): Ditto - and regard as unlimited polymorphic.
932 * resolve.c (resolve_symbol, resolve_variable): Add same constraint
933 checks as for TYPE(*); turn dummy to TYPE(*),dimension(*).
934 (gfc_explicit_interface_required): Require explicit interface
935 for NO_ARG_CHECK.
936
937 2013-04-16 Janus Weil <janus@gcc.gnu.org>
938
939 PR fortran/56968
940 * expr.c (gfc_check_pointer_assign): Handle generic functions returning
941 procedure pointers.
942
943 2013-04-16 Tobias Burnus <burnus@net-b.de>
944
945 PR fortran/56969
946 * intrinsic.c (gfc_intrinsic_func_interface): Don't set
947 module name to "(intrinsic)" for intrinsics from intrinsic
948 modules.
949
950 2013-04-15 Tobias Burnus <burnus@net-b.de>
951
952 * intrinsic.texi (SYSTEM_CLOCK): Recommend kind=8.
953
954 2013-04-15 Janne Blomqvist <jb@gcc.gnu.org>
955
956 PR fortran/56919
957 * intrinsics.texi (SYSTEM_CLOCK): Update documentation.
958
959 2013-04-15 Tobias Burnus <burnus@net-b.de>
960
961 * class.c (gfc_find_intrinsic_vtab): Removed unused var.
962 * dependency.c (check_data_pointer_types): Fix check.
963 * frontend-passes.c (check_data_pointer_types): Remove
964 superfluous statement.
965 * parse.c (decode_omp_directive): Add missing break.
966 * resolve.c (resolve_typebound_subroutine: Free variable.
967 * trans-decl.c (create_function_arglist): Correct condition.
968
969 2013-04-14 Mikael Morin <mikael@gcc.gnu.org>
970
971 PR fortran/56816
972 * match.c (gfc_match_select_type): Add syntax error. Move namespace
973 allocation and cleanup...
974 * parse.c (decode_statement): ... here.
975
976 2013-04-13 Janus Weil <janus@gcc.gnu.org>
977
978 PR fortran/55959
979 * expr.c (gfc_simplify_expr): Branch is not unreachable.
980
981 2013-04-12 Janus Weil <janus@gcc.gnu.org>
982
983 PR fortran/56266
984 * primary.c (gfc_match_varspec): Turn gcc_assert into MATCH_ERROR.
985
986 2013-04-12 Tobias Burnus <burnus@net-b.de>
987
988 PR fortran/56929
989 * trans-array.c (duplicate_allocatable): Fix handling
990 of scalar coarrays.
991
992 2013-04-12 Janus Weil <janus@gcc.gnu.org>
993
994 PR fortran/56261
995 * gfortran.h (gfc_explicit_interface_required): New prototype.
996 * expr.c (gfc_check_pointer_assign): Check if an explicit interface is
997 required in a proc-ptr assignment.
998 * interface.c (check_result_characteristics): Extra check.
999 * resolve.c (gfc_explicit_interface_required): New function.
1000 (resolve_global_procedure): Use new function
1001 'gfc_explicit_interface_required'. Do a full interface check.
1002
1003 2013-04-12 Tobias Burnus <burnus@net-b.de>
1004
1005 PR fortran/56845
1006 * trans-decl.c (gfc_trans_deferred_vars): Restrict
1007 static CLASS init to SAVE and -fno-automatic.
1008
1009 2013-04-12 Tobias Burnus <burnus@net-b.de>
1010
1011 PR fortran/56845
1012 * trans-decl.c (gfc_trans_deferred_vars): Set _vptr for
1013 allocatable static BT_CLASS.
1014 * trans-expr.c (gfc_class_set_static_fields): New function.
1015 * trans.h (gfc_class_set_static_fields): New prototype.
1016
1017 2013-04-11 Janne Blomqvist <jb@gcc.gnu.org>
1018
1019 * gfortran.h: Remove enum gfc_try, replace gfc_try with bool type.
1020 * arith.c: Replace gfc_try with bool type.
1021 * array.c: Likewise.
1022 * check.c: Likewise.
1023 * class.c: Likewise.
1024 * cpp.c: Likewise.
1025 * cpp.h: Likewise.
1026 * data.c: Likewise.
1027 * data.h: Likewise.
1028 * decl.c: Likewise.
1029 * error.c: Likewise.
1030 * expr.c: Likewise.
1031 * f95-lang.c: Likewise.
1032 * interface.c: Likewise.
1033 * intrinsic.c: Likewise.
1034 * intrinsic.h: Likewise.
1035 * io.c: Likewise.
1036 * match.c: Likewise.
1037 * match.h: Likewise.
1038 * module.c: Likewise.
1039 * openmp.c: Likewise.
1040 * parse.c: Likewise.
1041 * parse.h: Likewise.
1042 * primary.c: Likewise.
1043 * resolve.c: Likewise.
1044 * scanner.c: Likewise.
1045 * simplify.c: Likewise.
1046 * symbol.c: Likewise.
1047 * trans-intrinsic.c: Likewise.
1048 * trans-openmp.c: Likewise.
1049 * trans-stmt.c: Likewise.
1050 * trans-types.c: Likewise.
1051
1052 2013-04-09 Tobias Burnus <burnus@net-b.de>
1053
1054 * gfortran.texi (KIND Type Parameters,
1055 Internal representation of LOGICAL variables): Add crossrefs.
1056 (Intrinsic Types): Mention issues with _Bool interop.
1057 (Naming and argument-passing conventions): New section.
1058
1059 2013-04-08 Thomas Koenig <tkoenig@gcc.gnu.org>
1060
1061 PR fortran/56782
1062 * frontend-passes.c (callback_reduction): Don't do
1063 any simplification if there is only a single element
1064 which has an iterator.
1065
1066 2013-04-07 Tobias Burnus <burnus@net-b.de>
1067
1068 PR fortran/56849
1069 * iresolve.c (gfc_resolve_reshape): Set shape also
1070 with order=.
1071
1072 2013-04-04 Janus Weil <janus@gcc.gnu.org>
1073
1074 PR fortran/40881
1075 * match.c (gfc_match_return): Remove standard notification.
1076 * primary.c (gfc_match_actual_arglist): Add standard notification.
1077
1078 2013-04-04 Tobias Burnus <burnus@net-b.de>
1079
1080 PR fortran/50269
1081 * gcc/fortran/check.c (is_c_interoperable,
1082 gfc_check_c_loc): Correct c_loc array checking
1083 for Fortran 2003 and Fortran 2008.
1084
1085 2013-04-03 Janus Weil <janus@gcc.gnu.org>
1086
1087 PR fortran/56284
1088 PR fortran/40881
1089 * decl.c (gfc_match_formal_arglist): Warn about alternate-return
1090 arguments.
1091 * interface.c (check_dummy_characteristics): Return if symbols are NULL.
1092
1093 2013-04-01 Janus Weil <janus@gcc.gnu.org>
1094
1095 PR fortran/56500
1096 * symbol.c (gfc_set_default_type): Build class container for
1097 IMPLICIT CLASS.
1098
1099 2013-03-31 Tobias Burnus <burnus@net-b.de>
1100
1101 * class.c (finalization_scalarizer, finalizer_insert_packed_call,
1102 generate_finalization_wrapper): Avoid segfault with absent SIZE=
1103 argument to TRANSFER and use correct result kind for SIZE.
1104 * intrinsic.c (gfc_isym_id_by_intmod): Also handle ids of
1105 nonmodules.
1106 * trans.c (gfc_build_final_call): Handle coarrays.
1107
1108 2013-03-30 Thomas Koenig <tkoenig@gcc.gnu.org>
1109
1110 * trans-expr.c (build_memcmp_call): New function.
1111 (gfc_build_compare_string): If the strings
1112 compared have constant and equal lengths and
1113 the strings are kind=1, or, for kind=4 strings,
1114 the test is for (in)equality, use memcmp().
1115
1116 2013-03-29 Tobias Burnus <burnus@net-b.de>
1117
1118 PR fortran/35203
1119 * trans-decl.c (create_function_arglist): Pass hidden argument
1120 for passed-by-value optional+value dummies.
1121 * trans-expr.c (gfc_conv_expr_present,
1122 gfc_conv_procedure_call): Handle those.
1123
1124 2013-03-28 Thomas Koenig <tkoenig@gcc.gnu.org>
1125
1126 PR fortran/45159
1127 * gfortran.h (gfc_dep_difference): Add prototype.
1128 * dependency.c (discard_nops): New function.
1129 (gfc_dep_difference): New function.
1130 (check_section_vs_section): Use gfc_dep_difference
1131 to calculate the difference of starting indices.
1132 * trans-expr.c (gfc_conv_substring): Use
1133 gfc_dep_difference to calculate the length of
1134 substrings where possible.
1135
1136 2013-03-28 Thomas Koenig <tkoenig@gcc.gnu.org>
1137
1138 PR fortran/55806
1139 * frontend-passes.c (optimize_code): Keep track of
1140 current code to make code insertion possible.
1141 (combine_array_constructor): New function.
1142 (optimize_op): Call it.
1143
1144 2013-03-27 Tobias Burnus <burnus@net-b.de>
1145
1146 PR fortran/56650
1147 PR fortran/36437
1148 * check.c (gfc_check_sizeof, gfc_check_c_sizeof,
1149 gfc_check_storage_size): Update checks.
1150 * intrinsic.texi (SIZEOF): Correct class.
1151 * intrinsic.h (gfc_simplify_sizeof,
1152 gfc_simplify_storage_size): New prototypes.
1153 * intrinsic.c (add_functions): Use them.
1154 * simplify.c (gfc_simplify_sizeof,
1155 gfc_simplify_storage_size): New functions.
1156
1157 2013-03-27 Janne Blomqvist <jb@gcc.gnu.org>
1158
1159 PR fortran/25708
1160 * module.c (module_locus): Use long for position.
1161 (module_content): New variable.
1162 (module_pos): Likewise.
1163 (prev_character): Remove.
1164 (bad_module): Free data instead of closing mod file.
1165 (set_module_locus): Use module_pos.
1166 (get_module_locus): Likewise.
1167 (module_char): use buffer rather than stdio file.
1168 (module_unget_char): Likewise.
1169 (read_module_to_tmpbuf): New function.
1170 (gfc_use_module): Call read_module_to_tmpbuf.
1171
1172 2013-03-26 Tobias Burnus <burnus@net-b.de>
1173
1174 PR fortran/56649
1175 * simplify.c (gfc_simplify_merge): Simplify more.
1176
1177 2013-03-25 Tobias Burnus <burnus@net-b.de>
1178
1179 PR fortran/38536
1180 PR fortran/38813
1181 PR fortran/38894
1182 PR fortran/39288
1183 PR fortran/40963
1184 PR fortran/45824
1185 PR fortran/47023
1186 PR fortran/47034
1187 PR fortran/49023
1188 PR fortran/50269
1189 PR fortran/50612
1190 PR fortran/52426
1191 PR fortran/54263
1192 PR fortran/55343
1193 PR fortran/55444
1194 PR fortran/55574
1195 PR fortran/56079
1196 PR fortran/56378
1197 * check.c (gfc_var_strlen): Properly handle 0-sized string.
1198 (gfc_check_c_sizeof): Use is_c_interoperable, add checks.
1199 (is_c_interoperable, gfc_check_c_associated, gfc_check_c_f_pointer,
1200 gfc_check_c_f_procpointer, gfc_check_c_funloc, gfc_check_c_loc): New
1201 functions.
1202 * expr.c (check_inquiry): Add c_sizeof, compiler_version and
1203 compiler_options.
1204 (gfc_check_pointer_assign): Refine function result check.
1205 gfortran.h (gfc_isym_id): Add GFC_ISYM_C_ASSOCIATED,
1206 GFC_ISYM_C_F_POINTER, GFC_ISYM_C_F_PROCPOINTER, GFC_ISYM_C_FUNLOC,
1207 GFC_ISYM_C_LOC.
1208 (iso_fortran_env_symbol, iso_c_binding_symbol): Handle
1209 NAMED_SUBROUTINE.
1210 (generate_isocbinding_symbol): Update prototype.
1211 (get_iso_c_sym): Remove.
1212 (gfc_isym_id_by_intmod, gfc_isym_id_by_intmod_sym): New prototypes.
1213 * intrinsic.c (gfc_intrinsic_subroutine_by_id): New function.
1214 (gfc_intrinsic_sub_interface): Use it.
1215 (add_functions, add_subroutines): Add missing C-binding intrinsics.
1216 (gfc_intrinsic_func_interface): Add special case for c_loc.
1217 gfc_isym_id_by_intmod, gfc_isym_id_by_intmod_sym): New functions.
1218 (gfc_intrinsic_func_interface, gfc_intrinsic_sub_interface): Use them.
1219 * intrinsic.h (gfc_check_c_associated, gfc_check_c_f_pointer,
1220 gfc_check_c_f_procpointer, gfc_check_c_funloc, gfc_check_c_loc,
1221 gfc_resolve_c_loc, gfc_resolve_c_funloc): New prototypes.
1222 * iresolve.c (gfc_resolve_c_loc, gfc_resolve_c_funloc): New
1223 functions.
1224 * iso-c-binding.def: Split PROCEDURE into NAMED_SUBROUTINE and
1225 NAMED_FUNCTION.
1226 * iso-fortran-env.def: Add NAMED_SUBROUTINE for completeness.
1227 * module.c (create_intrinsic_function): Support subroutines and
1228 derived-type results.
1229 (use_iso_fortran_env_module): Update calls.
1230 (import_iso_c_binding_module): Ditto; update calls to
1231 generate_isocbinding_symbol.
1232 * resolve.c (find_arglists): Skip for intrinsic symbols.
1233 (gfc_resolve_intrinsic): Find intrinsic subs via id.
1234 (is_scalar_expr_ptr, gfc_iso_c_func_interface,
1235 set_name_and_label, gfc_iso_c_sub_interface): Remove.
1236 (resolve_function, resolve_specific_s0): Remove calls to those.
1237 (resolve_structure_cons): Fix handling.
1238 * symbol.c (gen_special_c_interop_ptr): Update c_ptr/c_funptr
1239 generation.
1240 (gen_cptr_param, gen_fptr_param, gen_shape_param,
1241 build_formal_args, get_iso_c_sym): Remove.
1242 (std_for_isocbinding_symbol): Handle NAMED_SUBROUTINE.
1243 (generate_isocbinding_symbol): Support hidden symbols and
1244 using c_ptr/c_funptr symtrees for nullptr defs.
1245 * target-memory.c (gfc_target_encode_expr): Fix handling
1246 of c_ptr/c_funptr.
1247 * trans-expr.c (conv_isocbinding_procedure): Remove.
1248 (gfc_conv_procedure_call): Remove call to it.
1249 (gfc_trans_subcomponent_assign, gfc_conv_expr): Update handling
1250 of c_ptr/c_funptr.
1251 * trans-intrinsic.c (conv_isocbinding_function,
1252 conv_isocbinding_subroutine): New.
1253 (gfc_conv_intrinsic_function, gfc_conv_intrinsic_subroutine):
1254 Call them.
1255 * trans-io.c (transfer_expr): Fix handling of c_ptr/c_funptr.
1256 * trans-types.c (gfc_typenode_for_spec,
1257 gfc_get_derived_type): Ditto.
1258 (gfc_init_c_interop_kinds): Handle NAMED_SUBROUTINE.
1259
1260 2013-03-18 Tobias Burnus <burnus@net-b.de>
1261
1262 * gfortran.h (gfc_option_t): Remove flag_whole_file.
1263 * invoke.texi (-fno-whole-file): Remove.
1264 * lang.opt (fwhole-file): Change to Ignore.
1265 * options.c (gfc_init_options, gfc_post_options,
1266 gfc_handle_option): Remove !flag_whole_file handling
1267 * parse.c (resolve_all_program_units, translate_all_program_units,
1268 gfc_parse_file): Ditto.
1269 * resolve.c (resolve_global_procedure): Ditto.
1270 * trans-decl.c (gfc_get_symbol_decl, gfc_get_extern_function_decl,
1271 gfc_create_module_variable): Ditto.
1272 * trans-types.c (gfc_get_derived_type): Ditto.
1273
1274 2013-03-15 Tobias Burnus <burnus@net-b.de>
1275
1276 PR fortran/56615
1277 * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Pack arrays
1278 if they are not simply contiguous.
1279
1280 2013-03-11 Tobias Burnus <burnus@net-b.de>
1281
1282 * gfortran.texi (STRUCTURE and RECORD): State more clearly how
1283 to convert them into derived types.
1284
1285 2013-03-10 Paul Thomas <pault@gcc.gnu.org>
1286
1287 PR fortran/56575
1288 * expr.c (gfc_default_initializer): Check that a class declared
1289 type has any components.
1290 * resolve.c (resolve_fl_derived0): On failing the test for C437
1291 set the type to BT_UNKNOWN to prevent repeat error messages.
1292
1293 2013-03-03 Mikael Morin <mikael@gcc.gnu.org>
1294
1295 PR fortran/56477
1296 * expr.c (gfc_check_pointer_assign): Avoid NULL pointer dereference.
1297
1298 2013-03-03 Mikael Morin <mikael@gcc.gnu.org>
1299
1300 PR fortran/54730
1301 * array.c (gfc_match_array_constructor): Set a checkpoint before
1302 matching a typespec. Drop it on success, restore it otherwise.
1303
1304 2013-03-03 Mikael Morin <mikael@gcc.gnu.org>
1305
1306 PR fortran/54730
1307 * gfortran.h (struct gfc_undo_change_set): New field 'previous'.
1308 (gfc_new_undo_checkpoint, gfc_drop_last_undo_checkpoint,
1309 gfc_restore_last_undo_checkpoint): New prototypes.
1310 * symbol.c (default_undo_chgset_var): Update initialization.
1311 (single_undo_checkpoint_p, gfc_new_undo_checkpoint,
1312 free_undo_change_set_data, pop_undo_change_set,
1313 gfc_drop_last_undo_checkpoint, enforce_single_undo_checkpoint):
1314 New functions.
1315 (save_symbol_data): Handle multiple change sets. Make sure old_symbol
1316 field's previous value is not overwritten. Clear gfc_new field.
1317 (restore_old_symbol): Restore previous old_symbol field.
1318 (gfc_restore_last_undo_checkpoint): New function, using body renamed
1319 from gfc_undo_symbols. Restore the previous change set as current one.
1320 (gfc_undo_symbols): New body.
1321 (gfc_commit_symbols, gfc_commit_symbol, gfc_enforce_clean_symbol_state):
1322 Call enforce_single_undo_checkpoint.
1323 (gfc_symbol_done_2): Ditto. Free change set data.
1324
1325 2013-03-03 Mikael Morin <mikael@gcc.gnu.org>
1326
1327 * symbol.c (restore_old_symbol): Fix thinko.
1328
1329 2013-03-03 Mikael Morin <mikael@gcc.gnu.org>
1330
1331 * symbol.c (gfc_undo_symbols): Move code...
1332 (restore_old_symbol): ... here as a new function.
1333
1334 2013-03-03 Mikael Morin <mikael@gcc.gnu.org>
1335
1336 * Make-lang.in (F95_PARSER_OBJS): Add dependency to vec.h.
1337 * gfortran.h: Include vec.h.
1338 (gfc_undo_change_set): New struct.
1339 * symbol.c (tentative_tbp): Remove struct.
1340 (changed_syms, tentative_tbp_list): Remove variables.
1341 (default_undo_chgset_var, latest_undo_chgset): New variables.
1342 (save_symbol_data, gfc_get_sym_tree, gfc_undo_symbols,
1343 gfc_commit_symbols, gfc_commit_symbol,
1344 gfc_enforce_clean_symbol_state, gfc_get_typebound_proc):
1345 Use latest_undo_chgset instead of changed_syms and tentative_tbp_list.
1346
1347 2013-03-01 Tobias Burnus <burnus@net-b.de>
1348
1349 PR fortran/56491
1350 * iresolve.c (resolve_bound): Use gfc_get_string instead of xstrdup.
1351 * symbol.c (free_components): Free proc-pointer components.
1352
1353 2013-03-01 Tobias Burnus <burnus@net-b.de>
1354
1355 * trans-decl.c (gfc_trans_deferred_vars): Free expr after use.
1356 * trans-io.c (build_dt): Ditto.
1357
1358 2013-02-24 Joseph Myers <joseph@codesourcery.com>
1359
1360 * resolve.c (generate_component_assignments): Don't use UTF-8
1361 ligature in diagnostic.
1362
1363 2013-02-21 Janus Weil <janus@gcc.gnu.org>
1364
1365 PR fortran/56385
1366 * trans-array.c (structure_alloc_comps): Handle procedure-pointer
1367 components with allocatable result.
1368
1369 2013-02-21 Tobias Burnus <burnus@net-b.de>
1370
1371 PR fortran/56416
1372 * gfortran.texi (Part II: Language Reference, Extensions,
1373 Non-Fortran Main Program): Sort @menu to match actual section order.
1374 * intrinsic.texi (Intrinsic Procedures): Ditto.
1375 (C_F_POINTER, PRECISION): Move to the alphabetically correct place.
1376
1377 2013-02-15 Tobias Burnus <burnus@net-b.de>
1378 Mikael Morin <mikael@gcc.gnu.org>
1379
1380 PR fortran/56318
1381 * simplify.c (gfc_simplify_matmul): Fix result shape
1382 and matmul result.
1383
1384 2013-02-15 Tobias Burnus <burnus@net-b.de>
1385
1386 PR fortran/53818
1387 * resolve.c (apply_default_init_local): Don't create an
1388 initializer for a result variable.
1389
1390 2013-02-14 Thomas Koenig <tkoenig@gcc.gnu.org>
1391
1392 PR fortran/56224
1393 * gfortran.h (gfc_add_include_path): Add boolean argument
1394 for warn.
1395 * scanner.c (gfc_add_include_path): Pass along warn argument
1396 to add_path_to_list.
1397 * options.c (gfc_post_options): Add true warn argument to
1398 gfc_add_include_path.
1399 (gfc_handle_module_path_options): Likewise.
1400 (gfc_handle_option): Also gfc_add_include_path for intrinsic
1401 modules, without warning.
1402
1403 2013-02-14 Paul Thomas <pault@gcc.gnu.org>
1404 Tobias Burnus <burnus@net-b.de>
1405
1406 PR testsuite/56138
1407 * trans-decl.c (gfc_get_symbol_decl): Fix deferred-length
1408 results for functions without extra result variable.
1409
1410 Revert:
1411 2013-01-30 Tobias Burnus <burnus@net-b.de>
1412
1413 PR fortran/56138
1414 * trans-decl.c (gfc_trans_deferred_vars): Fix deferred-length
1415 results for functions without extra result variable.
1416
1417 2013-02-12 Janus Weil <janus@gcc.gnu.org>
1418
1419 PR fortran/46952
1420 * resolve.c (resolve_call): Do not check deferred procedures for
1421 recursiveness.
1422
1423 2013-02-09 Paul Thomas <pault@gcc.gnu.org>
1424
1425 PR fortran/55362
1426 * check.c (array_check): It is an error if a procedure is
1427 passed.
1428
1429 2013-02-08 Mikael Morin <mikael@gcc.gnu.org>
1430
1431 PR fortran/54107
1432 * trans-types.c (gfc_get_function_type): Change a NULL backend_decl
1433 to error_mark_node on entry. Detect recursive types. Build a variadic
1434 procedure type if the type is recursive. Restore the initial
1435 backend_decl.
1436
1437 2013-02-07 Tobias Burnus <burnus@net-b.de>
1438
1439 PR fortran/54339
1440 * gfortran.texi (Standards): Mention TS29113.
1441 (Varying Length Character): Mention deferred-length
1442 strings.
1443 (Fortran 2003 Status): Add unlimited polymorphic.
1444 (TS 29113 Status): Add TYPE(*) and DIMENSION(..).
1445 (C Interop): Update the section about TS29113.
1446
1447 2013-02-06 Paul Thomas <pault@gcc.gnu.org>
1448
1449 PR fortran/55789
1450 * trans-array.c (trans_array_constructor): Remove condition
1451 'dynamic' = true if the loop ubound is a VAR_DECL.
1452
1453 2013-02-04 Paul Thomas <pault@gcc.gnu.org>
1454
1455 PR fortran/56008
1456 PR fortran/47517
1457 * trans-array.c (gfc_alloc_allocatable_for_assignment): Save
1458 the lhs descriptor before it is modified for reallocation. Use
1459 it to deallocate allocatable components in the reallocation
1460 block. Nullify allocatable components for newly (re)allocated
1461 arrays.
1462
1463 2013-02-04 Mikael Morin <mikael@gcc.gnu.org>
1464
1465 PR fortran/54195
1466 * resolve.c (resolve_typebound_procedures): Recurse through
1467 resolve_symbol.
1468
1469 2013-02-04 Mikael Morin <mikael@gcc.gnu.org>
1470
1471 PR fortran/54107
1472 PR fortran/54195
1473 * gfortran.h (struct gfc_symbol): New field 'resolved'.
1474 * resolve.c (resolve_fl_var_and_proc): Don't skip result symbols.
1475 (resolve_symbol): Skip duplicate calls. Don't check the current
1476 namespace.
1477
1478 2013-02-02 Thomas Koenig <tkoenig@gcc.gnu.org>
1479
1480 PR fortran/50627
1481 PR fortran/56054
1482 * decl.c (gfc_match_end): Remove half-ready namespace
1483 from parent if the end of a block is missing.
1484 * parse.c (parse_module): Do not put namespace into
1485 gsymbol on error.
1486
1487 2013-01-30 Tobias Burnus <burnus@net-b.de>
1488
1489 PR fortran/56138
1490 * trans-decl.c (gfc_trans_deferred_vars): Fix deferred-length
1491 results for functions without extra result variable.
1492
1493 2013-01-29 Janus Weil <janus@gcc.gnu.org>
1494 Mikael Morin <mikael@gcc.gnu.org>
1495
1496 PR fortran/54107
1497 * gfortran.h (gfc_component): Delete members 'formal' and 'formal_ns'.
1498 (gfc_copy_formal_args,gfc_copy_formal_args_ppc,gfc_expr_replace_symbols,
1499 gfc_expr_replace_comp): Delete.
1500 (gfc_sym_get_dummy_args): New prototype.
1501 * dependency.c (gfc_check_fncall_dependency): Use
1502 'gfc_sym_get_dummy_args'.
1503 * expr.c (gfc_is_constant_expr): Ditto.
1504 (replace_symbol,gfc_expr_replace_symbols,replace_comp,
1505 gfc_expr_replace_comp): Deleted.
1506 * frontend-passes.c (doloop_code,do_function): Use
1507 'gfc_sym_get_dummy_args'.
1508 * interface.c (gfc_check_operator_interface,gfc_compare_interfaces,
1509 gfc_procedure_use,gfc_ppc_use,gfc_arglist_matches_symbol,
1510 gfc_check_typebound_override): Ditto.
1511 * module.c (MOD_VERSION): Bump module version.
1512 (mio_component): Do not read/write 'formal' and 'formal_ns'.
1513 * resolve.c (resolve_procedure_interface,resolve_fl_derived0): Do not
1514 copy formal args, but just keep a pointer to the interface.
1515 (resolve_function,resolve_call,resolve_typebound_generic_call,
1516 resolve_ppc_call,resolve_expr_ppc,generate_component_assignments,
1517 resolve_fl_procedure,gfc_resolve_finalizers,check_generic_tbp_ambiguity,
1518 resolve_typebound_procedure,check_uop_procedure): Use
1519 'gfc_sym_get_dummy_args'.
1520 * symbol.c (free_components): Do not free 'formal' and 'formal_ns'.
1521 (gfc_copy_formal_args,gfc_copy_formal_args_ppc): Deleted.
1522 (gfc_sym_get_dummy_args): New function.
1523 * trans-array.c (get_array_charlen,gfc_walk_elemental_function_args):
1524 Use 'gfc_sym_get_dummy_args'.
1525 * trans-decl.c (build_function_decl,create_function_arglist,
1526 build_entry_thunks,init_intent_out_dt,gfc_trans_deferred_vars,
1527 add_argument_checking): Ditto.
1528 * trans-expr.c (gfc_map_fcn_formal_to_actual,gfc_conv_procedure_call,
1529 gfc_conv_statement_function): Ditto.
1530 * trans-stmt.c (gfc_conv_elemental_dependencies): Ditto.
1531 * trans-types.c (create_fn_spec,gfc_get_function_type): Ditto.
1532
1533 2013-01-28 Tobias Burnus <burnus@net-b.de>
1534 Mikael Morin <mikael@gcc.gnu.org>
1535
1536 PR fortran/53537
1537 * symbol.c (gfc_find_sym_tree): Don't look for the symbol outside an
1538 interface block.
1539 (gfc_get_ha_symtree): Let gfc_find_sym_tree lookup the parent namespace.
1540 * decl.c (gfc_match_data_decl): Ditto.
1541 (variable_decl): Remove undeclared type error.
1542 (gfc_match_import): Use renamed instead of original name.
1543
1544 2013-01-27 Paul Thomas <pault@gcc.gnu.org>
1545
1546 PR fortran/55984
1547 PR fortran/56047
1548 * gfortran.h : Add associate_var to symbol_attr.
1549 * resolve.c (resolve_assoc_var): Set associate_var attribute.
1550 If the target class_ok is set, set it for the associate
1551 variable.
1552 * check.c (allocatable_check): Associate variables should not
1553 have the allocatable attribute even if their symbols do.
1554 * class.c (gfc_build_class_symbol): Symbols with associate_var
1555 set will always have a good class container.
1556
1557 2013-01-23 Janus Weil <janus@gcc.gnu.org>
1558
1559 PR fortran/56081
1560 * resolve.c (resolve_select): Add argument 'select_type', reject
1561 non-scalar expressions.
1562 (resolve_select_type,resolve_code): Pass new argument to
1563 'resolve_select'.
1564
1565 2013-01-23 Jakub Jelinek <jakub@redhat.com>
1566
1567 PR fortran/56052
1568 * trans-decl.c (gfc_get_symbol_decl): Set DECL_ARTIFICIAL
1569 and DECL_IGNORED_P on select_type_temporary and don't set
1570 DECL_BY_REFERENCE.
1571
1572 2013-01-21 Thomas Koenig <tkoenig@gcc.gnu.org>
1573
1574 PR fortran/55919
1575 * scanner.c (add_path_to_list): Copy path to temporary and strip
1576 trailing directory separators before calling stat().
1577
1578 2013-01-17 Richard Biener <rguenther@suse.de>
1579
1580 * trans-stmt.c (gfc_trans_do): Conditionally compute countm1
1581 dependent on sign of step, avoids repeated evaluation of
1582 step sign test. Avoid undefined overflow issues by using unsigned
1583 arithmetic.
1584
1585 2013-01-16 Janus Weil <janus@gcc.gnu.org>
1586
1587 PR fortran/55983
1588 * class.c (find_typebound_proc_uop): Check for f2k_derived instead of
1589 asserting it.
1590
1591 2013-01-16 Jakub Jelinek <jakub@redhat.com>
1592 Tobias Burnus <burnus@net-b.de>
1593
1594 PR driver/55884
1595 * lang.opt (fintrinsic-modules-path): Don't accept Joined.
1596 (fintrinsic-modules-path=): New.
1597 * options.c (gfc_handle_option, gfc_get_option_string,
1598 gfc_get_option_string): Handle the latter.
1599
1600 2013-01-16 Jakub Jelinek <jakub@redhat.com>
1601
1602 PR fortran/52865
1603 * trans-stmt.c (gfc_trans_do): Put countm1-- before conditional
1604 and use value of countm1 before the decrement in the condition.
1605
1606 2013-01-15 Paul Thomas <pault@gcc.gnu.org>
1607
1608 PR fortran/54286
1609 * expr.c (gfc_check_pointer_assign): Check for presence of
1610 's2' before using it.
1611
1612 2013-01-14 Thomas Koenig <tkoenig@gcc.gnu.org>
1613
1614 PR fortran/55806
1615 * frontend-passes.c (optimize_reduction): New function,
1616 including prototype.
1617 (callback_reduction): Likewise.
1618 (gfc_run_passes): Also run optimize_reduction.
1619 (copy_walk_reduction_arg): New function.
1620 (dummy_code_callback): New function.
1621
1622 2013-01-13 Jakub Jelinek <jakub@redhat.com>
1623
1624 PR fortran/55935
1625 * trans-expr.c (gfc_conv_structure): Call
1626 unshare_expr_without_location on the ctor elements.
1627
1628 2013-01-13 Paul Thomas <pault@gcc.gnu.org>
1629
1630 PR fortran/54286
1631 * expr.c (gfc_check_pointer_assign): Ensure that both lvalue
1632 and rvalue interfaces are presented to gfc_compare_interfaces.
1633 Simplify references to interface names by using the symbols
1634 themselves. Call gfc_compare_interfaces with s1 and s2 inter-
1635 changed to overcome the asymmetry of this function. Do not
1636 repeat the check for the presence of s1 and s2.
1637
1638 2013-01-12 Janus Weil <janus@gcc.gnu.org>
1639
1640 PR fortran/55072
1641 * trans-array.c (gfc_conv_array_parameter): No packing was done for
1642 full arrays of derived type.
1643
1644 2013-01-08 Paul Thomas <pault@gcc.gnu.org>
1645
1646 PR fortran/55868
1647 * class.c (get_unique_type_string): Change $tar to STAR and
1648 replace sprintf by strcpy where there is no formatting.
1649 * decl.c (gfc_match_decl_type_spec): Change $tar to STAR.
1650
1651 2013-01-09 Mikael Morin <mikael@gcc.gnu.org>
1652
1653 PR fortran/47203
1654 * module.c (check_for_ambiguous): Get the current program unit using
1655 gfc_current_ns.
1656
1657 2013-01-09 Tobias Burnus <burnus@net-b.de>
1658
1659 PR fortran/55758
1660 * resolve.c (resolve_symbol): Reject non-C_Bool logicals
1661 in BIND(C) procedures with -std=f*.
1662
1663 2013-01-08 Paul Thomas <pault@gcc.gnu.org>
1664
1665 PR fortran/55618
1666 * trans-expr.c (gfc_conv_procedure_call): Dereference scalar
1667 character function arguments to elemental procedures in
1668 scalarization loops.
1669
1670 2013-01-07 Tobias Burnus <burnus@net-b.de>
1671
1672 PR fortran/55763
1673 * gfortran.h (gfc_check_assign_symbol): Update prototype.
1674 * decl.c (add_init_expr_to_sym, do_parm): Update call.
1675 * expr.c (gfc_check_assign_symbol): Handle BT_CLASS and
1676 improve error location; support components.
1677 (gfc_check_pointer_assign): Handle component assignments.
1678 * resolve.c (resolve_fl_derived0): Call gfc_check_assign_symbol.
1679 (resolve_values): Update call.
1680 (resolve_structure_cons): Avoid double diagnostic.
1681
1682 2013-01-07 Tobias Burnus <burnus@net-b.de>
1683 Thomas Koenig <tkoenig@gcc.gnu.org>
1684
1685 PR fortran/55852
1686 * expr.c (gfc_build_intrinsic_call): Avoid clashes
1687 with user's procedures.
1688 * gfortran.h (gfc_build_intrinsic_call): Update prototype.
1689 * simplify.c (gfc_simplify_size): Update call.
1690 * class.c (finalization_scalarizer, finalization_get_offset,
1691 finalizer_insert_packed_call, generate_finalization_wrapper):
1692 Clean up by using gfc_build_intrinsic_call.
1693
1694 2013-01-07 Tobias Burnus <burnus@net-b.de>
1695
1696 PR fortran/55763
1697 * resolve.c (resolve_select_type): Reject intrinsic types for
1698 a non-unlimited-polymorphic selector.
1699
1700 2013-01-06 Paul Thomas <pault@gcc.gnu.org>
1701
1702 PR fortran/53876
1703 PR fortran/54990
1704 PR fortran/54992
1705 * trans-array.c (build_array_ref): Check the TYPE_CANONICAL
1706 to see if it is GFC_CLASS_TYPE_P.
1707 * trans-expr.c (gfc_get_vptr_from_expr): The same.
1708 (gfc_conv_class_to_class): If the types are not the same,
1709 cast parmese->expr to the type of ctree.
1710 * trans-types.c (gfc_get_derived_type): GFC_CLASS_TYPE_P of
1711 CLASS components must be set.
1712
1713 2013-01-06 Mikael Morin <mikael@gcc.gnu.org>
1714
1715 PR fortran/42769
1716 PR fortran/45836
1717 PR fortran/45900
1718 * module.c (read_module): Don't reuse local symtree if the associated
1719 symbol isn't exactly the one wanted. Don't reuse local symtree if it is
1720 ambiguous.
1721 * resolve.c (resolve_call): Use symtree's name instead of symbol's to
1722 lookup the symtree.
1723
1724 2013-01-05 Steven G. Kargl <kargl@gcc.gnu.org>
1725 Mikael Morin <mikael@gcc.gnu.org>
1726
1727 PR fortran/55827
1728 * class.c (gfc_fix_class_refs): Adapt ts initialization for the case
1729 e->symtree == NULL.
1730 * trans-expr.c (gfc_conv_function_expr): Init sym earlier. Use it.
1731
1732 2013-01-05 Tobias Burnus <burnus@net-b.de>
1733
1734 * class.c (finalize_component): Used passed offset expr.
1735 (finalization_get_offset): New static function.
1736 (finalizer_insert_packed_call, generate_finalization_wrapper): Use it
1737 to handle noncontiguous arrays.
1738
1739 2013-01-04 Tobias Burnus <burnus@net-b.de>
1740
1741 * trans.c (gfc_build_final_call): New function.
1742 * trans.h (gfc_build_final_call, gfc_conv_scalar_to_descriptor):
1743 New function prototypes.
1744 * trans-expr.c (gfc_conv_scalar_to_descriptor): Renamed from
1745 conv_scalar_to_descriptor, removed static attribute.
1746 (gfc_conv_procedure_call): Honor renaming.
1747
1748 2013-01-04 Tobias Burnus <burnus@net-b.de>
1749
1750 * intrinsic.c (add_functions): New internal intrinsic
1751 function GFC_PREFIX ("stride").
1752 * gfortran.h (gfc_isym_id): Add GFC_ISYM_STRIDE.
1753 * intrinsic.h (gfc_resolve_stride): New prototypes.
1754 * iresolve.c (gfc_resolve_stride): New function.
1755 * trans-intrinsic.c (conv_intrinsic_stride): New static
1756 function.
1757 (gfc_conv_intrinsic_function): Use it.
1758
1759 2013-01-04 Tobias Burnus <burnus@net-b.de>
1760
1761 * class.c (gfc_find_intrinsic_vtab): Add _final
1762 component.
1763 * decl.c (gfc_match_null): Remove superfluous
1764 variadic argument to gfc_match.
1765
1766 2013-01-04 Paul Thomas <pault@gcc.gnu.org>
1767
1768 PR fortran/55172
1769 * match.c (copy_ts_from_selector_to_associate): Remove call to
1770 gfc_resolve_expr and replace it with explicit setting of the
1771 array reference type.
1772 * resolve.c (resolve_select_type): It is an error if the
1773 selector is coindexed.
1774
1775 2013-01-04 Tobias Burnus <burnus@net-b.de>
1776
1777 PR fortran/55763
1778 * decl.c (gfc_match_null): Parse and reject MOLD.
1779
1780 2013-01-04 Tobias Burnus <burnus@net-b.de>
1781
1782 PR fortran/55854
1783 PR fortran/55763
1784 * class.c (gfc_class_null_initializer): Fix finding the vtab.
1785 (gfc_find_intrinsic_vtab): Use BT_VOID for some components.
1786
1787 2013-01-03 Janus Weil <janus@gcc.gnu.org>
1788
1789 PR fortran/55855
1790 * expr.c (gfc_check_assign): Use 'gfc_expr_attr' to evaluate attributes
1791 of rvalue. Correct hyphenation in error message.
1792
1793 2013-01-03 Jakub Jelinek <jakub@redhat.com>
1794
1795 * gfortranspec.c (lang_specific_driver): Update copyright notice
1796 dates.
1797 \f
1798 Copyright (C) 2013 Free Software Foundation, Inc.
1799
1800 Copying and distribution of this file, with or without modification,
1801 are permitted in any medium without royalty provided the copyright
1802 notice and this notice are preserved.