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