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