re PR fortran/37336 ([F03] Finish derived-type finalization)
[gcc.git] / gcc / fortran / ChangeLog
1 2013-06-08 Tobias Burnus <burnus@net-b.de>
2
3 PR fortran/37336
4 * trans-decl.c (init_intent_out_dt): Call finalizer
5 when approriate.
6
7 2013-06-08 Tobias Burnus <burnus@net-b.de>
8
9 PR fortran/57553
10 * simplify.c (gfc_simplify_storage_size): Handle literal
11 strings.
12 * trans-intrinsic.c (gfc_conv_intrinsic_storage_size):
13 Add missing fold_convert.
14
15 2013-06-07 Tobias Burnus <burnus@net-b.de>
16
17 PR fortran/57549
18 * array.c (gfc_match_array_constructor): Call
19 gfc_match_type_spec instead of gfc_match_decl_type_spec.
20 * match.c (gfc_match_type_spec): Renamed from match_type_spec.
21 (gfc_match_type_is, gfc_match_allocate): Update call.
22 * match.h (gfc_match_type_spec): Add prototype.
23
24 2013-06-07 Tobias Burnus <burnus@net-b.de>
25
26 PR fortran/57556
27 * trans.c (gfc_build_final_call): Init block before use.
28
29 2013-06-06 Tobias Burnus <burnus@net-b.de>
30
31 PR fortran/57542
32 * trans.c (gfc_build_final_call): Add se.pre to the block
33 and modify the assert.
34
35 2013-06-04 Tobias Burnus <burnus@net-b.de>
36
37 PR fortran/37336
38 * trans.h (gfc_build_final_call): Remove prototype.
39 (gfc_add_finalizer_call): Add prototype.
40 * trans-array.c (gfc_trans_dealloc_allocated): Support finalization.
41 (structure_alloc_comps): Update caller.
42 (gfc_trans_deferred_array): Call finalizer.
43 * trans-array.h (gfc_trans_dealloc_allocated): Update prototype.
44 * trans-decl.c (gfc_trans_deferred_vars): Don't deallocate/finalize
45 variables of the main program.
46 * trans-expr.c (gfc_conv_procedure_call): Support finalization.
47 * trans-openmp.c (gfc_omp_clause_dtor,
48 gfc_trans_omp_array_reduction): Update calls.
49 * trans-stmt.c (gfc_trans_deallocate): Avoid double deallocation
50 of alloc components.
51 * trans.c (gfc_add_finalizer_call): New function.
52 (gfc_deallocate_with_status,
53 gfc_deallocate_scalar_with_status): Call it
54 (gfc_build_final_call): Fix handling of scalar coarrays,
55 move up in the file and make static.
56
57 2013-06-01 Janus Weil <janus@gcc.gnu.org>
58 Mikael Morin <mikael@gcc.gnu.org>
59
60 * error.c (get_terminal_width): Only limit the width if we're
61 outputting to a terminal. Try to determine width via ioctl.
62
63 2013-06-01 Tobias Burnus <burnus@net-b.de>
64
65 * decl.c (add_global_entry): Take locus.
66 (gfc_match_entry): Update call.
67 (gfc_match_end): Better error location.
68 * parse.c (parse_block_data, parse_module, add_global_procedure,
69 add_global_program): Use better locus data.
70
71 2013-05-31 Tobias Burnus <burnus@net-b.de>
72
73 PR fortran/57456
74 * trans-array.c (gfc_array_init_size): Use passed type spec,
75 when available.
76 (gfc_array_allocate): Pass typespec on.
77 * trans-array.h (gfc_array_allocate): Update prototype.
78 * trans-stmt.c (gfc_trans_allocate): Pass typespec on.
79
80 2013-05-31 Janus Weil <janus@gcc.gnu.org>
81
82 PR fortran/54190
83 PR fortran/57217
84 * gfortran.h (gfc_terminal_width): Remove prototype.
85 * error.c (get_terminal_width): Moved here from misc.c. Renamed.
86 Try to determine terminal width from environment variable.
87 * interface.c (compare_type, compare_rank): New functions. Fix assumed
88 type/rank handling.
89 (compare_type_rank, check_dummy_characteristics,
90 check_result_characteristics, gfc_compare_interfaces): Use them.
91 (symbol_rank): Slightly modified and moved.
92 * misc.c (gfc_terminal_width): Moved to error.c.
93
94 2013-05-30 Janus Weil <janus@gcc.gnu.org>
95
96 PR fortran/54189
97 * resolve.c (check_assumed_size_reference): Check for e->ref.
98
99 2013-05-30 Tobias Burnus <burnus@net-b.de>
100
101 PR fortran/57458
102 * interface.c (compare_parameter): Update C1239/C1240 constraint
103 check for assumed-rank/TS29113.
104
105 2013-05-29 Tobias Burnus <burnus@net-b.de>
106
107 PR fortran/37336
108 * class.c (finalize_component): Fix coarray array refs.
109 (generate_finalization_wrapper): Only gfc_convert_type_warn
110 when the kind value is different.
111 (gfc_find_intrinsic_vtab): _copy's dst is now intent(inout).
112 (gfc_find_derived_vtab): Ditto. Enable finalization-wrapper
113 generation.
114 * module.c (MOD_VERSION): Bump.
115 (gfc_dump_module, gfc_use_module): Remove empty line in .mod.
116 * trans-array.c (gfc_conv_descriptor_token): Accept nonrestricted
117 void pointer.
118 (gfc_array_allocate, structure_alloc_comps): Don't nullify for
119 BT_CLASS allocations.
120 * trans-stmt.c (gfc_trans_allocate): Ditto.
121
122 2013-05-29 Tobias Burnus <burnus@net-b.de>
123
124 PR fortran/37336
125 * resolve.c (gfc_resolve_finalizers): Remove not implemented error.
126
127 2013-05-28 Tobias Burnus <burnus@net-b.de>
128
129 * trans-expr.c (gfc_conv_procedure_call): Deallocate
130 polymorphic arrays for allocatable intent(out) dummies.
131 (gfc_reset_vptr): New function, moved from trans-stmt.c
132 and extended.
133 * trans-stmt.c (reset_vptr): Remove.
134 (gfc_trans_deallocate): Update calls.
135 * trans.h (gfc_reset_vptr): New prototype.
136
137 2013-05-28 Dominique d'Humieres <dominiq@lps.ens.fr>
138
139 PR fortran/57435
140 * module.c (check_for_ambiguous): Avoid null pointer deref.
141
142 2013-05-28 Janus Weil <janus@gcc.gnu.org>
143 Tobias Burnus <burnus@net-b.de>
144
145 PR fortran/57217
146 * interface.c (check_dummy_characteristics): Symmetrize type check.
147
148 2013-05-27 Bud Davis <jmdavis@link.com>
149
150 PR fortran/50405
151 * resolve.c (resolve_formal_arglist): Detect error when an argument
152 has the same name as the function.
153
154 2013-05-27 Tobias Burnus <burnus@net-b.de>
155
156 * expr.c (gfc_build_intrinsic_call): Make symbol as attr.artificial.
157 * intrinsic.c (gfc_is_intrinsic): Disable std check for those.
158
159 2013-05-22 Tobias Burnus <burnus@net-b.de>
160
161 * resolve.c (get_temp_from_expr): Change mangling to
162 start always with a _.
163
164 2013-05-22 Tobias Burnus <burnus@net-b.de>
165
166 * resolve.c (get_temp_from_expr): Fix temp var mangling.
167
168 2013-05-22 Tobias Burnus <burnus@net-b.de>
169
170 PR fortran/57364
171 * resolve.c (get_temp_from_expr): Commit created sym.
172
173 2013-05-22 Tobias Burnus <burnus@net-b.de>
174
175 PR fortran/57338
176 * intrinsic.c (do_check): Move some checks to ...
177 (do_ts29113_check): ... this new function.
178 (check_specific, gfc_intrinsic_sub_interface): Call it.
179
180 2013-05-22 Janne Blomqvist <jb@gcc.gnu.org>
181
182 * intrinsic.texi (RANDOM_SEED): Improve example.
183
184 2013-05-21 Tobias Burnus <burnus@net-b.de>
185
186 PR fortran/57035
187 * intrinsic.c (do_check): Add constraint check for
188 NO_ARG_CHECK, assumed rank and assumed type.
189 * gfortran.texi (NO_ARG_CHECK): Minor wording change,
190 allow PRESENT intrinsic.
191
192 2013-05-20 Tobias Burnus <burnus@net-b.de>
193
194 PR fortran/48858
195 PR fortran/55465
196 * decl.c (add_global_entry): Add sym_name.
197 * parse.c (add_global_procedure): Ditto.
198 * resolve.c (resolve_bind_c_derived_types): Handle multiple decl for
199 a procedure.
200 (resolve_global_procedure): Handle gsym->ns pointing to a module.
201 * trans-decl.c (gfc_get_extern_function_decl): Ditto.
202
203 2013-05-20 Tobias Burnus <burnus@net-b.de>
204
205 PR fortran/48858
206 * decl.c (add_global_entry): Use nonbinding name
207 only for F2003 or if no binding label exists.
208 (gfc_match_entry): Update calls.
209 * parse.c (gfc_global_used): Improve error message.
210 (add_global_procedure): Use nonbinding name
211 only for F2003 or if no binding label exists.
212 (gfc_parse_file): Update call.
213 * resolve.c (resolve_global_procedure): Use binding
214 name when available.
215 * trans-decl.c (gfc_get_extern_function_decl): Ditto.
216
217 2013-05-20 Tobias Burnus <burnus@net-b.de>
218
219 PR fortran/48858
220 * decl.c (gfc_match_bind_c_stmt): Add gfc_notify_std.
221 * match.c (gfc_match_common): Don't add commons to gsym.
222 * resolve.c (resolve_common_blocks): Add to gsym and
223 add checks.
224 (resolve_bind_c_comms): Remove.
225 (resolve_types): Remove call to the latter.
226 * trans-common.c (gfc_common_ns): Remove static var.
227 (gfc_map_of_all_commons): Add static var.
228 (build_common_decl): Correctly handle binding label.
229
230 2013-05-16 Jason Merrill <jason@redhat.com>
231
232 * Make-lang.in (f951$(exeext)): Use link mutex.
233
234 2013-05-05 Tobias Burnus <burnus@net-b.de>
235
236 * resolve.c (conformable_arrays): Avoid segfault
237 when ar.start[i] == NULL.
238
239 2013-05-05 Tobias Burnus <burnus@net-b.de>
240
241 PR fortran/57141
242 * decl.c (gfc_match_null): Permit use-associated
243 NULL intrinsic.
244
245 2013-05-04 Tobias Burnus <burnus@net-b.de>
246
247 * decl.c (gfc_verify_c_interop_param): Permit allocatable
248 and pointer with -std=f2008ts.
249
250 2013-05-02 Tobias Burnus <burnus@net-b.de>
251
252 PR fortran/57142
253 * simplify.c (gfc_simplify_size): Renamed from
254 simplify_size; fix kind=8 handling.
255 (gfc_simplify_size): New function.
256 (gfc_simplify_shape): Add range check.
257 * resolve.c (resolve_function): Fix handling
258 for ISYM_SIZE.
259
260 2013-05-01 Thomas Koenig <tkoenig@gcc.gnu.org>
261
262 * frontend-passes.c (optimize_power): Fix typo
263 in comment.
264
265 2013-04-30 Thomas Koenig <tkoenig@gcc.gnu.org>
266
267 PR fortran/57071
268 * frontend-passes.c (optimize_power): Simplify
269 1**k to 1.
270
271 2013-04-28 Tobias Burnus <burnus@net-b.de>
272
273 PR fortran/57114
274 * intrinsic.texi (RANK): Correct syntax description and
275 expected result.
276
277 2013-04-28 Tobias Burnus <burnus@net-b.de>
278
279 PR fortran/57093
280 * trans-types.c (gfc_get_element_type): Fix handling
281 of scalar coarrays of type character.
282 * intrinsic.texi (PACK): Add missing ")".
283
284 2013-04-28 Thomas Koenig <tkoenig@gcc.gnu.org>
285
286 PR fortran/57071
287 * frontend-passes (optimize_power): New function.
288 (optimize_op): Use it.
289
290 2013-04-25 Janne Blomqvist <jb@gcc.gnu.org>
291
292 PR bootstrap/57028
293 * Make-lang.in (f951): Link in ZLIB.
294 (CFLAGS-fortran/module.o): Add zlib include directory.
295
296 2013-04-22 Janus Weil <janus@gcc.gnu.org>
297
298 PR fortran/53685
299 PR fortran/57022
300 * check.c (gfc_calculate_transfer_sizes): Fix for array-valued SOURCE
301 expressions.
302 * simplify.c (gfc_simplify_sizeof,gfc_simplify_storage_size): Get rid
303 of special treatment for EXPR_ARRAY.
304 * target-memory.h (gfc_element_size): New prototype.
305 * target-memory.c (size_array): Remove.
306 (gfc_element_size): New function.
307 (gfc_target_expr_size): Modified to always return the full size of the
308 expression.
309
310 2013-04-20 Tobias Burnus <burnus@net-b.de>
311
312 PR fortran/56907
313 * trans-intrinsic.c (conv_isocbinding_function): Don't pack array
314 passed to C_LOC
315
316 2013-04-19 Thomas Koenig <tkoenig@gcc.gnu.org>
317 Mikael Morin <mikael@gcc.gnu.org>
318
319 PR fortran/56872
320 * frontend-passes.c (copy_walk_reduction_arg): Change argument type
321 to gfc_constructor. If it has an iterator, wrap the copy of its
322 expression in an array constructor with that iterator. Don't special
323 case function expressions.
324 (callback_reduction): Update caller. Don't return early if there is
325 an iterator.
326
327 2013-04-18 Tobias Burnus <burnus@net-b.de>
328
329 * expr.c (find_array_element): Don't copy expr.
330 * data.c (create_character_initializer): Free expr.
331 * frontend-passes.c (combine_array_constructor): Ditto.
332 * match.c (match_typebound_call, gfc_match_select_type): Ditto.
333 * resolve.c (resolve_typebound_function): Free gfc_ref.
334
335 2013-04-18 Tobias Burnus <burnus@net-b.de>
336
337 PR fortran/56994
338 * invoke.texi (NEAREST): S argument is not optional.
339
340 2013-04-17 Janus Weil <janus@gcc.gnu.org>
341
342 PR fortran/56814
343 * interface.c (check_result_characteristics): Get result from interface
344 if present.
345
346 2013-04-17 Janne Blomqvist <jb@gcc.gnu.org>
347
348 PR fortran/40958
349 * scanner.h: New file.
350 * Make-lang.in: Dependencies on scanner.h.
351 * scanner.c (gfc_directorylist): Move to scanner.h.
352 * module.c: Don't include md5.h, include scanner.h and zlib.h.
353 (MOD_VERSION): Add comment about backwards compatibility.
354 (module_fp): Change type to gzFile.
355 (ctx): Remove.
356 (gzopen_included_file_1): New function.
357 (gzopen_included_file): New function.
358 (gzopen_intrinsic_module): New function.
359 (write_char): Use gzputc.
360 (read_crc32_from_module_file): New function.
361 (read_md5_from_module_file): Remove.
362 (gfc_dump_module): Use gz* functions instead of stdio, check gzip
363 crc32 instead of md5.
364 (read_module_to_tmpbuf): Use gz* functions instead of stdio.
365 (gfc_use_module): Use gz* functions.
366
367 2013-04-16 Tobias Burnus <burnus@net-b.de>
368
369 PR fortran/39505
370 * decl.c (ext_attr_list): Add EXT_ATTR_NO_ARG_CHECK.
371 * gfortran.h (ext_attr_id_t): Ditto.
372 * gfortran.texi (GNU Fortran Compiler Directives):
373 Document it.
374 * interface.c (compare_type_rank): Ignore rank for NO_ARG_CHECK.
375 (compare_parameter): Ditto - and regard as unlimited polymorphic.
376 * resolve.c (resolve_symbol, resolve_variable): Add same constraint
377 checks as for TYPE(*); turn dummy to TYPE(*),dimension(*).
378 (gfc_explicit_interface_required): Require explicit interface
379 for NO_ARG_CHECK.
380
381 2013-04-16 Janus Weil <janus@gcc.gnu.org>
382
383 PR fortran/56968
384 * expr.c (gfc_check_pointer_assign): Handle generic functions returning
385 procedure pointers.
386
387 2013-04-16 Tobias Burnus <burnus@net-b.de>
388
389 PR fortran/56969
390 * intrinsic.c (gfc_intrinsic_func_interface): Don't set
391 module name to "(intrinsic)" for intrinsics from intrinsic
392 modules.
393
394 2013-04-15 Tobias Burnus <burnus@net-b.de>
395
396 * intrinsic.texi (SYSTEM_CLOCK): Recommend kind=8.
397
398 2013-04-15 Janne Blomqvist <jb@gcc.gnu.org>
399
400 PR fortran/56919
401 * intrinsics.texi (SYSTEM_CLOCK): Update documentation.
402
403 2013-04-15 Tobias Burnus <burnus@net-b.de>
404
405 * class.c (gfc_find_intrinsic_vtab): Removed unused var.
406 * dependency.c (check_data_pointer_types): Fix check.
407 * frontend-passes.c (check_data_pointer_types): Remove
408 superfluous statement.
409 * parse.c (decode_omp_directive): Add missing break.
410 * resolve.c (resolve_typebound_subroutine: Free variable.
411 * trans-decl.c (create_function_arglist): Correct condition.
412
413 2013-04-14 Mikael Morin <mikael@gcc.gnu.org>
414
415 PR fortran/56816
416 * match.c (gfc_match_select_type): Add syntax error. Move namespace
417 allocation and cleanup...
418 * parse.c (decode_statement): ... here.
419
420 2013-04-13 Janus Weil <janus@gcc.gnu.org>
421
422 PR fortran/55959
423 * expr.c (gfc_simplify_expr): Branch is not unreachable.
424
425 2013-04-12 Janus Weil <janus@gcc.gnu.org>
426
427 PR fortran/56266
428 * primary.c (gfc_match_varspec): Turn gcc_assert into MATCH_ERROR.
429
430 2013-04-12 Tobias Burnus <burnus@net-b.de>
431
432 PR fortran/56929
433 * trans-array.c (duplicate_allocatable): Fix handling
434 of scalar coarrays.
435
436 2013-04-12 Janus Weil <janus@gcc.gnu.org>
437
438 PR fortran/56261
439 * gfortran.h (gfc_explicit_interface_required): New prototype.
440 * expr.c (gfc_check_pointer_assign): Check if an explicit interface is
441 required in a proc-ptr assignment.
442 * interface.c (check_result_characteristics): Extra check.
443 * resolve.c (gfc_explicit_interface_required): New function.
444 (resolve_global_procedure): Use new function
445 'gfc_explicit_interface_required'. Do a full interface check.
446
447 2013-04-12 Tobias Burnus <burnus@net-b.de>
448
449 PR fortran/56845
450 * trans-decl.c (gfc_trans_deferred_vars): Restrict
451 static CLASS init to SAVE and -fno-automatic.
452
453 2013-04-12 Tobias Burnus <burnus@net-b.de>
454
455 PR fortran/56845
456 * trans-decl.c (gfc_trans_deferred_vars): Set _vptr for
457 allocatable static BT_CLASS.
458 * trans-expr.c (gfc_class_set_static_fields): New function.
459 * trans.h (gfc_class_set_static_fields): New prototype.
460
461 2013-04-11 Janne Blomqvist <jb@gcc.gnu.org>
462
463 * gfortran.h: Remove enum gfc_try, replace gfc_try with bool type.
464 * arith.c: Replace gfc_try with bool type.
465 * array.c: Likewise.
466 * check.c: Likewise.
467 * class.c: Likewise.
468 * cpp.c: Likewise.
469 * cpp.h: Likewise.
470 * data.c: Likewise.
471 * data.h: Likewise.
472 * decl.c: Likewise.
473 * error.c: Likewise.
474 * expr.c: Likewise.
475 * f95-lang.c: Likewise.
476 * interface.c: Likewise.
477 * intrinsic.c: Likewise.
478 * intrinsic.h: Likewise.
479 * io.c: Likewise.
480 * match.c: Likewise.
481 * match.h: Likewise.
482 * module.c: Likewise.
483 * openmp.c: Likewise.
484 * parse.c: Likewise.
485 * parse.h: Likewise.
486 * primary.c: Likewise.
487 * resolve.c: Likewise.
488 * scanner.c: Likewise.
489 * simplify.c: Likewise.
490 * symbol.c: Likewise.
491 * trans-intrinsic.c: Likewise.
492 * trans-openmp.c: Likewise.
493 * trans-stmt.c: Likewise.
494 * trans-types.c: Likewise.
495
496 2013-04-09 Tobias Burnus <burnus@net-b.de>
497
498 * gfortran.texi (KIND Type Parameters,
499 Internal representation of LOGICAL variables): Add crossrefs.
500 (Intrinsic Types): Mention issues with _Bool interop.
501 (Naming and argument-passing conventions): New section.
502
503 2013-04-08 Thomas Koenig <tkoenig@gcc.gnu.org>
504
505 PR fortran/56782
506 * frontend-passes.c (callback_reduction): Dont't do
507 any simplification if there is only a single element
508 which has an iterator.
509
510 2013-04-07 Tobias Burnus <burnus@net-b.de>
511
512 PR fortran/56849
513 * iresolve.c (gfc_resolve_reshape): Set shape also
514 with order=.
515
516 2013-04-04 Janus Weil <janus@gcc.gnu.org>
517
518 PR fortran/40881
519 * match.c (gfc_match_return): Remove standard notification.
520 * primary.c (gfc_match_actual_arglist): Add standard notification.
521
522 2013-04-04 Tobias Burnus <burnus@net-b.de>
523
524 PR fortran/50269
525 * gcc/fortran/check.c (is_c_interoperable,
526 gfc_check_c_loc): Correct c_loc array checking
527 for Fortran 2003 and Fortran 2008.
528
529 2013-04-03 Janus Weil <janus@gcc.gnu.org>
530
531 PR fortran/56284
532 PR fortran/40881
533 * decl.c (gfc_match_formal_arglist): Warn about alternate-return
534 arguments.
535 * interface.c (check_dummy_characteristics): Return if symbols are NULL.
536
537 2013-04-01 Janus Weil <janus@gcc.gnu.org>
538
539 PR fortran/56500
540 * symbol.c (gfc_set_default_type): Build class container for
541 IMPLICIT CLASS.
542
543 2013-03-31 Tobias Burnus <burnus@net-b.de>
544
545 * class.c (finalization_scalarizer, finalizer_insert_packed_call,
546 generate_finalization_wrapper): Avoid segfault with absent SIZE=
547 argment to TRANSFER and use correct result kind for SIZE.
548 * intrinsic.c (gfc_isym_id_by_intmod): Also handle ids of
549 nonmodules.
550 * trans.c (gfc_build_final_call): Handle coarrays.
551
552 2013-03-30 Thomas Koenig <tkoenig@gcc.gnu.org>
553
554 * trans-expr.c (build_memcmp_call): New function.
555 (gfc_build_compare_string): If the strings
556 compared have constant and equal lengths and
557 the strings are kind=1, or, for kind=4 strings,
558 the test is for (in)equality, use memcmp().
559
560 2013-03-29 Tobias Burnus <burnus@net-b.de>
561
562 PR fortran/35203
563 * trans-decl.c (create_function_arglist): Pass hidden argument
564 for passed-by-value optional+value dummies.
565 * trans-expr.c (gfc_conv_expr_present,
566 gfc_conv_procedure_call): Handle those.
567
568 2013-03-28 Thomas Koenig <tkoenig@gcc.gnu.org>
569
570 PR fortran/45159
571 * gfortran.h (gfc_dep_difference): Add prototype.
572 * dependency.c (discard_nops): New function.
573 (gfc_dep_difference): New function.
574 (check_section_vs_section): Use gfc_dep_difference
575 to calculate the difference of starting indices.
576 * trans-expr.c (gfc_conv_substring): Use
577 gfc_dep_difference to calculate the length of
578 substrings where possible.
579
580 2013-03-28 Thomas Koenig <tkoenig@gcc.gnu.org>
581
582 PR fortran/55806
583 * frontend-passes.c (optimize_code): Keep track of
584 current code to make code insertion possible.
585 (combine_array_constructor): New function.
586 (optimize_op): Call it.
587
588 2013-03-27 Tobias Burnus <burnus@net-b.de>
589
590 PR fortran/56650
591 PR fortran/36437
592 * check.c (gfc_check_sizeof, gfc_check_c_sizeof,
593 gfc_check_storage_size): Update checks.
594 * intrinsic.texi (SIZEOF): Correct class.
595 * intrinsic.h (gfc_simplify_sizeof,
596 gfc_simplify_storage_size): New prototypes.
597 * intrinsic.c (add_functions): Use them.
598 * simplify.c (gfc_simplify_sizeof,
599 gfc_simplify_storage_size): New functions.
600
601 2013-03-27 Janne Blomqvist <jb@gcc.gnu.org>
602
603 PR fortran/25708
604 * module.c (module_locus): Use long for position.
605 (module_content): New variable.
606 (module_pos): Likewise.
607 (prev_character): Remove.
608 (bad_module): Free data instead of closing mod file.
609 (set_module_locus): Use module_pos.
610 (get_module_locus): Likewise.
611 (module_char): use buffer rather than stdio file.
612 (module_unget_char): Likewise.
613 (read_module_to_tmpbuf): New function.
614 (gfc_use_module): Call read_module_to_tmpbuf.
615
616 2013-03-26 Tobias Burnus <burnus@net-b.de>
617
618 PR fortran/56649
619 * simplify.c (gfc_simplify_merge): Simplify more.
620
621 2013-03-25 Tobias Burnus <burnus@net-b.de>
622
623 PR fortran/38536
624 PR fortran/38813
625 PR fortran/38894
626 PR fortran/39288
627 PR fortran/40963
628 PR fortran/45824
629 PR fortran/47023
630 PR fortran/47034
631 PR fortran/49023
632 PR fortran/50269
633 PR fortran/50612
634 PR fortran/52426
635 PR fortran/54263
636 PR fortran/55343
637 PR fortran/55444
638 PR fortran/55574
639 PR fortran/56079
640 PR fortran/56378
641 * check.c (gfc_var_strlen): Properly handle 0-sized string.
642 (gfc_check_c_sizeof): Use is_c_interoperable, add checks.
643 (is_c_interoperable, gfc_check_c_associated, gfc_check_c_f_pointer,
644 gfc_check_c_f_procpointer, gfc_check_c_funloc, gfc_check_c_loc): New
645 functions.
646 * expr.c (check_inquiry): Add c_sizeof, compiler_version and
647 compiler_options.
648 (gfc_check_pointer_assign): Refine function result check.
649 gfortran.h (gfc_isym_id): Add GFC_ISYM_C_ASSOCIATED,
650 GFC_ISYM_C_F_POINTER, GFC_ISYM_C_F_PROCPOINTER, GFC_ISYM_C_FUNLOC,
651 GFC_ISYM_C_LOC.
652 (iso_fortran_env_symbol, iso_c_binding_symbol): Handle
653 NAMED_SUBROUTINE.
654 (generate_isocbinding_symbol): Update prototype.
655 (get_iso_c_sym): Remove.
656 (gfc_isym_id_by_intmod, gfc_isym_id_by_intmod_sym): New prototypes.
657 * intrinsic.c (gfc_intrinsic_subroutine_by_id): New function.
658 (gfc_intrinsic_sub_interface): Use it.
659 (add_functions, add_subroutines): Add missing C-binding intrinsics.
660 (gfc_intrinsic_func_interface): Add special case for c_loc.
661 gfc_isym_id_by_intmod, gfc_isym_id_by_intmod_sym): New functions.
662 (gfc_intrinsic_func_interface, gfc_intrinsic_sub_interface): Use them.
663 * intrinsic.h (gfc_check_c_associated, gfc_check_c_f_pointer,
664 gfc_check_c_f_procpointer, gfc_check_c_funloc, gfc_check_c_loc,
665 gfc_resolve_c_loc, gfc_resolve_c_funloc): New prototypes.
666 * iresolve.c (gfc_resolve_c_loc, gfc_resolve_c_funloc): New
667 functions.
668 * iso-c-binding.def: Split PROCEDURE into NAMED_SUBROUTINE and
669 NAMED_FUNCTION.
670 * iso-fortran-env.def: Add NAMED_SUBROUTINE for completeness.
671 * module.c (create_intrinsic_function): Support subroutines and
672 derived-type results.
673 (use_iso_fortran_env_module): Update calls.
674 (import_iso_c_binding_module): Ditto; update calls to
675 generate_isocbinding_symbol.
676 * resolve.c (find_arglists): Skip for intrinsic symbols.
677 (gfc_resolve_intrinsic): Find intrinsic subs via id.
678 (is_scalar_expr_ptr, gfc_iso_c_func_interface,
679 set_name_and_label, gfc_iso_c_sub_interface): Remove.
680 (resolve_function, resolve_specific_s0): Remove calls to those.
681 (resolve_structure_cons): Fix handling.
682 * symbol.c (gen_special_c_interop_ptr): Update c_ptr/c_funptr
683 generation.
684 (gen_cptr_param, gen_fptr_param, gen_shape_param,
685 build_formal_args, get_iso_c_sym): Remove.
686 (std_for_isocbinding_symbol): Handle NAMED_SUBROUTINE.
687 (generate_isocbinding_symbol): Support hidden symbols and
688 using c_ptr/c_funptr symtrees for nullptr defs.
689 * target-memory.c (gfc_target_encode_expr): Fix handling
690 of c_ptr/c_funptr.
691 * trans-expr.c (conv_isocbinding_procedure): Remove.
692 (gfc_conv_procedure_call): Remove call to it.
693 (gfc_trans_subcomponent_assign, gfc_conv_expr): Update handling
694 of c_ptr/c_funptr.
695 * trans-intrinsic.c (conv_isocbinding_function,
696 conv_isocbinding_subroutine): New.
697 (gfc_conv_intrinsic_function, gfc_conv_intrinsic_subroutine):
698 Call them.
699 * trans-io.c (transfer_expr): Fix handling of c_ptr/c_funptr.
700 * trans-types.c (gfc_typenode_for_spec,
701 gfc_get_derived_type): Ditto.
702 (gfc_init_c_interop_kinds): Handle NAMED_SUBROUTINE.
703
704 2013-03-18 Tobias Burnus <burnus@net-b.de>
705
706 * gfortran.h (gfc_option_t): Remove flag_whole_file.
707 * invoke.texi (-fno-whole-file): Remove.
708 * lang.opt (fwhole-file): Change to Ignore.
709 * options.c (gfc_init_options, gfc_post_options,
710 gfc_handle_option): Remove !flag_whole_file handling
711 * parse.c (resolve_all_program_units, translate_all_program_units,
712 gfc_parse_file): Ditto.
713 * resolve.c (resolve_global_procedure): Ditto.
714 * trans-decl.c (gfc_get_symbol_decl, gfc_get_extern_function_decl,
715 gfc_create_module_variable): Ditto.
716 * trans-types.c (gfc_get_derived_type): Ditto.
717
718 2013-03-15 Tobias Burnus <burnus@net-b.de>
719
720 PR fortran/56615
721 * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Pack arrays
722 if they are not simply contiguous.
723
724 2013-03-11 Tobias Burnus <burnus@net-b.de>
725
726 * gfortran.texi (STRUCTURE and RECORD): State more clearly how
727 to convert them into derived types.
728
729 2013-03-10 Paul Thomas <pault@gcc.gnu.org>
730
731 PR fortran/56575
732 * expr.c (gfc_default_initializer): Check that a class declared
733 type has any components.
734 * resolve.c (resolve_fl_derived0): On failing the test for C437
735 set the type to BT_UNKNOWN to prevent repeat error messages.
736
737 2013-03-03 Mikael Morin <mikael@gcc.gnu.org>
738
739 PR fortran/56477
740 * expr.c (gfc_check_pointer_assign): Avoid NULL pointer dereference.
741
742 2013-03-03 Mikael Morin <mikael@gcc.gnu.org>
743
744 PR fortran/54730
745 * array.c (gfc_match_array_constructor): Set a checkpoint before
746 matching a typespec. Drop it on success, restore it otherwise.
747
748 2013-03-03 Mikael Morin <mikael@gcc.gnu.org>
749
750 PR fortran/54730
751 * gfortran.h (struct gfc_undo_change_set): New field 'previous'.
752 (gfc_new_undo_checkpoint, gfc_drop_last_undo_checkpoint,
753 gfc_restore_last_undo_checkpoint): New prototypes.
754 * symbol.c (default_undo_chgset_var): Update initialization.
755 (single_undo_checkpoint_p, gfc_new_undo_checkpoint,
756 free_undo_change_set_data, pop_undo_change_set,
757 gfc_drop_last_undo_checkpoint, enforce_single_undo_checkpoint):
758 New functions.
759 (save_symbol_data): Handle multiple change sets. Make sure old_symbol
760 field's previous value is not overwritten. Clear gfc_new field.
761 (restore_old_symbol): Restore previous old_symbol field.
762 (gfc_restore_last_undo_checkpoint): New function, using body renamed
763 from gfc_undo_symbols. Restore the previous change set as current one.
764 (gfc_undo_symbols): New body.
765 (gfc_commit_symbols, gfc_commit_symbol, gfc_enforce_clean_symbol_state):
766 Call enforce_single_undo_checkpoint.
767 (gfc_symbol_done_2): Ditto. Free change set data.
768
769 2013-03-03 Mikael Morin <mikael@gcc.gnu.org>
770
771 * symbol.c (restore_old_symbol): Fix thinko.
772
773 2013-03-03 Mikael Morin <mikael@gcc.gnu.org>
774
775 * symbol.c (gfc_undo_symbols): Move code...
776 (restore_old_symbol): ... here as a new function.
777
778 2013-03-03 Mikael Morin <mikael@gcc.gnu.org>
779
780 * Make-lang.in (F95_PARSER_OBJS): Add dependency to vec.h.
781 * gfortran.h: Include vec.h.
782 (gfc_undo_change_set): New struct.
783 * symbol.c (tentative_tbp): Remove struct.
784 (changed_syms, tentative_tbp_list): Remove variables.
785 (default_undo_chgset_var, latest_undo_chgset): New variables.
786 (save_symbol_data, gfc_get_sym_tree, gfc_undo_symbols,
787 gfc_commit_symbols, gfc_commit_symbol,
788 gfc_enforce_clean_symbol_state, gfc_get_typebound_proc):
789 Use latest_undo_chgset instead of changed_syms and tentative_tbp_list.
790
791 2013-03-01 Tobias Burnus <burnus@net-b.de>
792
793 PR fortran/56491
794 * iresolve.c (resolve_bound): Use gfc_get_string instead of xstrdup.
795 * symbol.c (free_components): Free proc-pointer components.
796
797 2013-03-01 Tobias Burnus <burnus@net-b.de>
798
799 * trans-decl.c (gfc_trans_deferred_vars): Free expr after use.
800 * trans-io.c (build_dt): Ditto.
801
802 2013-02-24 Joseph Myers <joseph@codesourcery.com>
803
804 * resolve.c (generate_component_assignments): Don't use UTF-8
805 ligature in diagnostic.
806
807 2013-02-21 Janus Weil <janus@gcc.gnu.org>
808
809 PR fortran/56385
810 * trans-array.c (structure_alloc_comps): Handle procedure-pointer
811 components with allocatable result.
812
813 2013-02-21 Tobias Burnus <burnus@net-b.de>
814
815 PR fortran/56416
816 * gfortran.texi (Part II: Language Reference, Extensions,
817 Non-Fortran Main Program): Sort @menu to match actual section order.
818 * intrinsic.texi (Intrinsic Procedures): Ditto.
819 (C_F_POINTER, PRECISION): Move to the alphabetically correct place.
820
821 2013-02-15 Tobias Burnus <burnus@net-b.de>
822 Mikael Morin <mikael@gcc.gnu.org>
823
824 PR fortran/56318
825 * simplify.c (gfc_simplify_matmul): Fix result shape
826 and matmul result.
827
828 2013-02-15 Tobias Burnus <burnus@net-b.de>
829
830 PR fortran/53818
831 * resolve.c (apply_default_init_local): Don't create an
832 initializer for a result variable.
833
834 2013-02-14 Thomas Koenig <tkoenig@gcc.gnu.org>
835
836 PR fortran/56224
837 * gfortran.h (gfc_add_include_path): Add boolean argument
838 for warn.
839 * scanner.c (gfc_add_include_path): Pass along warn argument
840 to add_path_to_list.
841 * options.c (gfc_post_options): Add true warn argument to
842 gfc_add_include_path.
843 (gfc_handle_module_path_options): Likewise.
844 (gfc_handle_option): Also gfc_add_include_path for intrinsic
845 modules, without warning.
846
847 2013-02-14 Paul Thomas <pault@gcc.gnu.org>
848 Tobias Burnus <burnus@net-b.de>
849
850 PR testsuite/56138
851 * trans-decl.c (gfc_get_symbol_decl): Fix deferred-length
852 results for functions without extra result variable.
853
854 Revert:
855 2013-01-30 Tobias Burnus <burnus@net-b.de>
856
857 PR fortran/56138
858 * trans-decl.c (gfc_trans_deferred_vars): Fix deferred-length
859 results for functions without extra result variable.
860
861 2013-02-12 Janus Weil <janus@gcc.gnu.org>
862
863 PR fortran/46952
864 * resolve.c (resolve_call): Do not check deferred procedures for
865 recursiveness.
866
867 2013-02-09 Paul Thomas <pault@gcc.gnu.org>
868
869 PR fortran/55362
870 * check.c (array_check): It is an error if a procedure is
871 passed.
872
873 2013-02-08 Mikael Morin <mikael@gcc.gnu.org>
874
875 PR fortran/54107
876 * trans-types.c (gfc_get_function_type): Change a NULL backend_decl
877 to error_mark_node on entry. Detect recursive types. Build a variadic
878 procedure type if the type is recursive. Restore the initial
879 backend_decl.
880
881 2013-02-07 Tobias Burnus <burnus@net-b.de>
882
883 PR fortran/54339
884 * gfortran.texi (Standards): Mention TS29113.
885 (Varying Length Character): Mention deferred-length
886 strings.
887 (Fortran 2003 Status): Add unlimited polymorphic.
888 (TS 29113 Status): Add TYPE(*) and DIMENSION(..).
889 (C Interop): Update the section about TS29113.
890
891 2013-02-06 Paul Thomas <pault@gcc.gnu.org>
892
893 PR fortran/55789
894 * trans-array.c (trans_array_constructor): Remove condition
895 'dynamic' = true if the loop ubound is a VAR_DECL.
896
897 2013-02-04 Paul Thomas <pault@gcc.gnu.org>
898
899 PR fortran/56008
900 PR fortran/47517
901 * trans-array.c (gfc_alloc_allocatable_for_assignment): Save
902 the lhs descriptor before it is modified for reallocation. Use
903 it to deallocate allocatable components in the reallocation
904 block. Nullify allocatable components for newly (re)allocated
905 arrays.
906
907 2013-02-04 Mikael Morin <mikael@gcc.gnu.org>
908
909 PR fortran/54195
910 * resolve.c (resolve_typebound_procedures): Recurse through
911 resolve_symbol.
912
913 2013-02-04 Mikael Morin <mikael@gcc.gnu.org>
914
915 PR fortran/54107
916 PR fortran/54195
917 * gfortran.h (struct gfc_symbol): New field 'resolved'.
918 * resolve.c (resolve_fl_var_and_proc): Don't skip result symbols.
919 (resolve_symbol): Skip duplicate calls. Don't check the current
920 namespace.
921
922 2013-02-02 Thomas Koenig <tkoenig@gcc.gnu.org>
923
924 PR fortran/50627
925 PR fortran/56054
926 * decl.c (gfc_match_end): Remove half-ready namespace
927 from parent if the end of a block is missing.
928 * parse.c (parse_module): Do not put namespace into
929 gsymbol on error.
930
931 2013-01-30 Tobias Burnus <burnus@net-b.de>
932
933 PR fortran/56138
934 * trans-decl.c (gfc_trans_deferred_vars): Fix deferred-length
935 results for functions without extra result variable.
936
937 2013-01-29 Janus Weil <janus@gcc.gnu.org>
938 Mikael Morin <mikael@gcc.gnu.org>
939
940 PR fortran/54107
941 * gfortran.h (gfc_component): Delete members 'formal' and 'formal_ns'.
942 (gfc_copy_formal_args,gfc_copy_formal_args_ppc,gfc_expr_replace_symbols,
943 gfc_expr_replace_comp): Delete.
944 (gfc_sym_get_dummy_args): New prototype.
945 * dependency.c (gfc_check_fncall_dependency): Use
946 'gfc_sym_get_dummy_args'.
947 * expr.c (gfc_is_constant_expr): Ditto.
948 (replace_symbol,gfc_expr_replace_symbols,replace_comp,
949 gfc_expr_replace_comp): Deleted.
950 * frontend-passes.c (doloop_code,do_function): Use
951 'gfc_sym_get_dummy_args'.
952 * interface.c (gfc_check_operator_interface,gfc_compare_interfaces,
953 gfc_procedure_use,gfc_ppc_use,gfc_arglist_matches_symbol,
954 gfc_check_typebound_override): Ditto.
955 * module.c (MOD_VERSION): Bump module version.
956 (mio_component): Do not read/write 'formal' and 'formal_ns'.
957 * resolve.c (resolve_procedure_interface,resolve_fl_derived0): Do not
958 copy formal args, but just keep a pointer to the interface.
959 (resolve_function,resolve_call,resolve_typebound_generic_call,
960 resolve_ppc_call,resolve_expr_ppc,generate_component_assignments,
961 resolve_fl_procedure,gfc_resolve_finalizers,check_generic_tbp_ambiguity,
962 resolve_typebound_procedure,check_uop_procedure): Use
963 'gfc_sym_get_dummy_args'.
964 * symbol.c (free_components): Do not free 'formal' and 'formal_ns'.
965 (gfc_copy_formal_args,gfc_copy_formal_args_ppc): Deleted.
966 (gfc_sym_get_dummy_args): New function.
967 * trans-array.c (get_array_charlen,gfc_walk_elemental_function_args):
968 Use 'gfc_sym_get_dummy_args'.
969 * trans-decl.c (build_function_decl,create_function_arglist,
970 build_entry_thunks,init_intent_out_dt,gfc_trans_deferred_vars,
971 add_argument_checking): Ditto.
972 * trans-expr.c (gfc_map_fcn_formal_to_actual,gfc_conv_procedure_call,
973 gfc_conv_statement_function): Ditto.
974 * trans-stmt.c (gfc_conv_elemental_dependencies): Ditto.
975 * trans-types.c (create_fn_spec,gfc_get_function_type): Ditto.
976
977 2013-01-28 Tobias Burnus <burnus@net-b.de>
978 Mikael Morin <mikael@gcc.gnu.org>
979
980 PR fortran/53537
981 * symbol.c (gfc_find_sym_tree): Don't look for the symbol outside an
982 interface block.
983 (gfc_get_ha_symtree): Let gfc_find_sym_tree lookup the parent namespace.
984 * decl.c (gfc_match_data_decl): Ditto.
985 (variable_decl): Remove undeclared type error.
986 (gfc_match_import): Use renamed instead of original name.
987
988 2013-01-27 Paul Thomas <pault@gcc.gnu.org>
989
990 PR fortran/55984
991 PR fortran/56047
992 * gfortran.h : Add associate_var to symbol_attr.
993 * resolve.c (resolve_assoc_var): Set associate_var attribute.
994 If the target class_ok is set, set it for the associate
995 variable.
996 * check.c (allocatable_check): Associate variables should not
997 have the allocatable attribute even if their symbols do.
998 * class.c (gfc_build_class_symbol): Symbols with associate_var
999 set will always have a good class container.
1000
1001 2013-01-23 Janus Weil <janus@gcc.gnu.org>
1002
1003 PR fortran/56081
1004 * resolve.c (resolve_select): Add argument 'select_type', reject
1005 non-scalar expressions.
1006 (resolve_select_type,resolve_code): Pass new argument to
1007 'resolve_select'.
1008
1009 2013-01-23 Jakub Jelinek <jakub@redhat.com>
1010
1011 PR fortran/56052
1012 * trans-decl.c (gfc_get_symbol_decl): Set DECL_ARTIFICIAL
1013 and DECL_IGNORED_P on select_type_temporary and don't set
1014 DECL_BY_REFERENCE.
1015
1016 2013-01-21 Thomas Koenig <tkoenig@gcc.gnu.org>
1017
1018 PR fortran/55919
1019 * scanner.c (add_path_to_list): Copy path to temporary and strip
1020 trailing directory separators before calling stat().
1021
1022 2013-01-17 Richard Biener <rguenther@suse.de>
1023
1024 * trans-stmt.c (gfc_trans_do): Conditionally compute countm1
1025 dependent on sign of step, avoids repeated evaluation of
1026 step sign test. Avoid undefined overflow issues by using unsigned
1027 arithmetic.
1028
1029 2013-01-16 Janus Weil <janus@gcc.gnu.org>
1030
1031 PR fortran/55983
1032 * class.c (find_typebound_proc_uop): Check for f2k_derived instead of
1033 asserting it.
1034
1035 2013-01-16 Jakub Jelinek <jakub@redhat.com>
1036 Tobias Burnus <burnus@net-b.de>
1037
1038 PR driver/55884
1039 * lang.opt (fintrinsic-modules-path): Don't accept Joined.
1040 (fintrinsic-modules-path=): New.
1041 * options.c (gfc_handle_option, gfc_get_option_string,
1042 gfc_get_option_string): Handle the latter.
1043
1044 2013-01-16 Jakub Jelinek <jakub@redhat.com>
1045
1046 PR fortran/52865
1047 * trans-stmt.c (gfc_trans_do): Put countm1-- before conditional
1048 and use value of countm1 before the decrement in the condition.
1049
1050 2013-01-15 Paul Thomas <pault@gcc.gnu.org>
1051
1052 PR fortran/54286
1053 * expr.c (gfc_check_pointer_assign): Check for presence of
1054 's2' before using it.
1055
1056 2013-01-14 Thomas Koenig <tkoenig@gcc.gnu.org>
1057
1058 PR fortran/55806
1059 * frontend-passes.c (optimize_reduction): New function,
1060 including prototype.
1061 (callback_reduction): Likewise.
1062 (gfc_run_passes): Also run optimize_reduction.
1063 (copy_walk_reduction_arg): New function.
1064 (dummy_code_callback): New function.
1065
1066 2013-01-13 Jakub Jelinek <jakub@redhat.com>
1067
1068 PR fortran/55935
1069 * trans-expr.c (gfc_conv_structure): Call
1070 unshare_expr_without_location on the ctor elements.
1071
1072 2013-01-13 Paul Thomas <pault@gcc.gnu.org>
1073
1074 PR fortran/54286
1075 * expr.c (gfc_check_pointer_assign): Ensure that both lvalue
1076 and rvalue interfaces are presented to gfc_compare_interfaces.
1077 Simplify references to interface names by using the symbols
1078 themselves. Call gfc_compare_interfaces with s1 and s2 inter-
1079 changed to overcome the asymmetry of this function. Do not
1080 repeat the check for the presence of s1 and s2.
1081
1082 2013-01-12 Janus Weil <janus@gcc.gnu.org>
1083
1084 PR fortran/55072
1085 * trans-array.c (gfc_conv_array_parameter): No packing was done for
1086 full arrays of derived type.
1087
1088 2013-01-08 Paul Thomas <pault@gcc.gnu.org>
1089
1090 PR fortran/55868
1091 * class.c (get_unique_type_string): Change $tar to STAR and
1092 replace sprintf by strcpy where there is no formatting.
1093 * decl.c (gfc_match_decl_type_spec): Change $tar to STAR.
1094
1095 2013-01-09 Mikael Morin <mikael@gcc.gnu.org>
1096
1097 PR fortran/47203
1098 * module.c (check_for_ambiguous): Get the current program unit using
1099 gfc_current_ns.
1100
1101 2013-01-09 Tobias Burnus <burnus@net-b.de>
1102
1103 PR fortran/55758
1104 * resolve.c (resolve_symbol): Reject non-C_Bool logicals
1105 in BIND(C) procedures with -std=f*.
1106
1107 2013-01-08 Paul Thomas <pault@gcc.gnu.org>
1108
1109 PR fortran/55618
1110 * trans-expr.c (gfc_conv_procedure_call): Dereference scalar
1111 character function arguments to elemental procedures in
1112 scalarization loops.
1113
1114 2013-01-07 Tobias Burnus <burnus@net-b.de>
1115
1116 PR fortran/55763
1117 * gfortran.h (gfc_check_assign_symbol): Update prototype.
1118 * decl.c (add_init_expr_to_sym, do_parm): Update call.
1119 * expr.c (gfc_check_assign_symbol): Handle BT_CLASS and
1120 improve error location; support components.
1121 (gfc_check_pointer_assign): Handle component assignments.
1122 * resolve.c (resolve_fl_derived0): Call gfc_check_assign_symbol.
1123 (resolve_values): Update call.
1124 (resolve_structure_cons): Avoid double diagnostic.
1125
1126 2013-01-07 Tobias Burnus <burnus@net-b.de>
1127 Thomas Koenig <tkoenig@gcc.gnu.org>
1128
1129 PR fortran/55852
1130 * expr.c (gfc_build_intrinsic_call): Avoid clashes
1131 with user's procedures.
1132 * gfortran.h (gfc_build_intrinsic_call): Update prototype.
1133 * simplify.c (gfc_simplify_size): Update call.
1134 * class.c (finalization_scalarizer, finalization_get_offset,
1135 finalizer_insert_packed_call, generate_finalization_wrapper):
1136 Clean up by using gfc_build_intrinsic_call.
1137
1138 2013-01-07 Tobias Burnus <burnus@net-b.de>
1139
1140 PR fortran/55763
1141 * resolve.c (resolve_select_type): Reject intrinsic types for
1142 a non-unlimited-polymorphic selector.
1143
1144 2013-01-06 Paul Thomas <pault@gcc.gnu.org>
1145
1146 PR fortran/53876
1147 PR fortran/54990
1148 PR fortran/54992
1149 * trans-array.c (build_array_ref): Check the TYPE_CANONICAL
1150 to see if it is GFC_CLASS_TYPE_P.
1151 * trans-expr.c (gfc_get_vptr_from_expr): The same.
1152 (gfc_conv_class_to_class): If the types are not the same,
1153 cast parmese->expr to the type of ctree.
1154 * trans-types.c (gfc_get_derived_type): GFC_CLASS_TYPE_P of
1155 CLASS components must be set.
1156
1157 2013-01-06 Mikael Morin <mikael@gcc.gnu.org>
1158
1159 PR fortran/42769
1160 PR fortran/45836
1161 PR fortran/45900
1162 * module.c (read_module): Don't reuse local symtree if the associated
1163 symbol isn't exactly the one wanted. Don't reuse local symtree if it is
1164 ambiguous.
1165 * resolve.c (resolve_call): Use symtree's name instead of symbol's to
1166 lookup the symtree.
1167
1168 2013-01-05 Steven G. Kargl <kargl@gcc.gnu.org>
1169 Mikael Morin <mikael@gcc.gnu.org>
1170
1171 PR fortran/55827
1172 * class.c (gfc_fix_class_refs): Adapt ts initialization for the case
1173 e->symtree == NULL.
1174 * trans-expr.c (gfc_conv_function_expr): Init sym earlier. Use it.
1175
1176 2013-01-05 Tobias Burnus <burnus@net-b.de>
1177
1178 * class.c (finalize_component): Used passed offset expr.
1179 (finalization_get_offset): New static function.
1180 (finalizer_insert_packed_call, generate_finalization_wrapper): Use it
1181 to handle noncontiguous arrays.
1182
1183 2013-01-04 Tobias Burnus <burnus@net-b.de>
1184
1185 * trans.c (gfc_build_final_call): New function.
1186 * trans.h (gfc_build_final_call, gfc_conv_scalar_to_descriptor):
1187 New function prototypes.
1188 * trans-expr.c (gfc_conv_scalar_to_descriptor): Renamed from
1189 conv_scalar_to_descriptor, removed static attribute.
1190 (gfc_conv_procedure_call): Honor renaming.
1191
1192 2013-01-04 Tobias Burnus <burnus@net-b.de>
1193
1194 * intrinsic.c (add_functions): New internal intrinsic
1195 function GFC_PREFIX ("stride").
1196 * gfortran.h (gfc_isym_id): Add GFC_ISYM_STRIDE.
1197 * intrinsic.h (gfc_resolve_stride): New prototypes.
1198 * iresolve.c (gfc_resolve_stride): New function.
1199 * trans-intrinsic.c (conv_intrinsic_stride): New static
1200 function.
1201 (gfc_conv_intrinsic_function): Use it.
1202
1203 2013-01-04 Tobias Burnus <burnus@net-b.de>
1204
1205 * class.c (gfc_find_intrinsic_vtab): Add _final
1206 component.
1207 * decl.c (gfc_match_null): Remove superfluous
1208 variadic argument to gfc_match.
1209
1210 2013-01-04 Paul Thomas <pault@gcc.gnu.org>
1211
1212 PR fortran/55172
1213 * match.c (copy_ts_from_selector_to_associate): Remove call to
1214 gfc_resolve_expr and replace it with explicit setting of the
1215 array reference type.
1216 * resolve.c (resolve_select_type): It is an error if the
1217 selector is coindexed.
1218
1219 2013-01-04 Tobias Burnus <burnus@net-b.de>
1220
1221 PR fortran/55763
1222 * decl.c (gfc_match_null): Parse and reject MOLD.
1223
1224 2013-01-04 Tobias Burnus <burnus@net-b.de>
1225
1226 PR fortran/55854
1227 PR fortran/55763
1228 * class.c (gfc_class_null_initializer): Fix finding the vtab.
1229 (gfc_find_intrinsic_vtab): Use BT_VOID for some components.
1230
1231 2013-01-03 Janus Weil <janus@gcc.gnu.org>
1232
1233 PR fortran/55855
1234 * expr.c (gfc_check_assign): Use 'gfc_expr_attr' to evaluate attributes
1235 of rvalue. Correct hyphenation in error message.
1236
1237 2013-01-03 Jakub Jelinek <jakub@redhat.com>
1238
1239 * gfortranspec.c (lang_specific_driver): Update copyright notice
1240 dates.
1241 \f
1242 Copyright (C) 2013 Free Software Foundation, Inc.
1243
1244 Copying and distribution of this file, with or without modification,
1245 are permitted in any medium without royalty provided the copyright
1246 notice and this notice are preserved.