re PR fortran/86863 ([OOP][F2008] type-bound module procedure name not recognized)
[gcc.git] / gcc / fortran / ChangeLog
1 2017-08-23 Paul Thomas <pault@gcc.gnu.org>
2
3 PR fortran/86863
4 * resolve.c (resolve_typebound_call): If the TBP is not marked
5 as a subroutine, check the specific symbol.
6
7 2018-08-22 Thomas Koenig <tkoenig@gcc.gnu.org>
8
9 * gfortran.texi: Mention that asynchronous I/O does
10 not work on systems which lack condition variables, such
11 as AIX.
12
13 2018-08-22 Janus Weil <janus@gcc.gnu.org>
14
15 PR fortran/86935
16 * match.c (gfc_match_associate): Improve diagnostics for the ASSOCIATE
17 statement.
18
19 2018-08-22 Andrew Benson <abensonca@gmail.com>
20
21 * module.c (load_generic_interfaces): Move call to find_symbol()
22 so that only occurs if actually needed.
23
24 2018-08-22 Janus Weil <janus@gcc.gnu.org>
25
26 PR fortran/86888
27 * decl.c (gfc_match_data_decl): Allow allocatable components of
28 indirectly recursive type.
29 * resolve.c (resolve_component): Remove two errors messages ...
30 (resolve_fl_derived): ... and replace them by a new one.
31
32 2018-08-21 Janne Blomqvist <jb@gcc.gnu.org>
33
34 * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Use
35 MAX_EXPR/MIN_EXPR unconditionally for real arguments.
36 * gfortran.texi (Compiler Characteristics): Document MAX/MIN
37 behavior wrt NaN.
38
39 2018-08-21 Nicolas Koenig <koenigni@gcc.gnu.org>
40 Thomas Koenig <tkoenig@gcc.gnu.org>
41
42 PR fortran/25829
43 * gfortran.texi: Add description of asynchronous I/O.
44 * trans-decl.c (gfc_finish_var_decl): Treat asynchronous variables
45 as volatile.
46 * trans-io.c (gfc_build_io_library_fndecls): Rename st_wait to
47 st_wait_async and change argument spec from ".X" to ".w".
48 (gfc_trans_wait): Pass ID argument via reference.
49
50 2018-08-16 Nathan Sidwell <nathan@acm.org>
51
52 * cpp.c (dump_macro): Use cpp_user_macro_p.
53
54 2018-08-14 Janus Weil <janus@gcc.gnu.org>
55
56 PR fortran/86116
57 * interface.c (compare_type): Remove a CLASS/TYPE check.
58 (compare_type_characteristics): New function that behaves like the old
59 'compare_type'.
60 (gfc_check_dummy_characteristics, gfc_check_result_characteristics):
61 Call 'compare_type_characteristics' instead of 'compare_type'.
62
63 2018-08-12 Paul Thomas <pault@gcc.gnu.org>
64
65 PR fortran/66679
66 * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Class array
67 elements are returned as references to the data element. Get
68 the class expression by stripping back the references. Use this
69 for the element size.
70
71 2018-08-12 Paul Thomas <pault@gcc.gnu.org>
72
73 PR fortran/86906
74 * resolve.c (resolve_fl_variable_derived): Check if the derived
75 type is use associated before checking for the host association
76 error.
77
78 2018-08-10 Janus Weil <janus@gcc.gnu.org>
79
80 PR fortran/57160
81 * invoke.texi (frontend-optimize): Mention short-circuiting.
82 * options.c (gfc_post_options): Disable -ffrontend-optimize with -Og.
83 * resolve.c (resolve_operator): Warn about short-circuiting only with
84 -ffrontend-optimize.
85 * trans-expr.c (gfc_conv_expr_op): Use short-circuiting operators only
86 with -ffrontend-optimize. Without that flag, make sure that both
87 operands are evaluated.
88
89 2018-08-08 Nathan Sidwell <nathan@acm.org>
90
91 * cpp.c (cb_file_change): Use linemap_included_from.
92
93 2018-08-07 Cesar Philippidis <cesar@codesourcery.com>
94
95 * trans-stmt.h: Remove stale reference to trans-openacc.c.
96
97 2018-08-04 Janus Weil <janus@gcc.gnu.org>
98
99 PR fortran/45521
100 * interface.c (gfc_compare_interfaces): Apply additional
101 distinguishability criteria of F08 to operator interfaces.
102
103 2018-07-31 Andre Vieira <andre.simoesdiasvieira@arm.com>
104
105 Revert 'AsyncI/O patch committed'
106 2018-07-25 Nicolas Koenig <koenigni@gcc.gnu.org>
107 Thomas Koenig <tkoenig@gcc.gnu.org>
108
109 PR fortran/25829
110 * gfortran.texi: Add description of asynchronous I/O.
111 * trans-decl.c (gfc_finish_var_decl): Treat asynchronous variables
112 as volatile.
113 * trans-io.c (gfc_build_io_library_fndecls): Rename st_wait to
114 st_wait_async and change argument spec from ".X" to ".w".
115 (gfc_trans_wait): Pass ID argument via reference.
116
117 2018-07-25 Nicolas Koenig <koenigni@gcc.gnu.org>
118 Thomas Koenig <tkoenig@gcc.gnu.org>
119
120 PR fortran/25829
121 * gfortran.texi: Add description of asynchronous I/O.
122 * trans-decl.c (gfc_finish_var_decl): Treat asynchronous variables
123 as volatile.
124 * trans-io.c (gfc_build_io_library_fndecls): Rename st_wait to
125 st_wait_async and change argument spec from ".X" to ".w".
126 (gfc_trans_wait): Pass ID argument via reference.
127
128 2018-07-20 Martin Sebor <msebor@redhat.com>
129
130 PR middle-end/82063
131 * gfortran.h (gfc_handle_option): Change function argument
132 to HOST_WIDE_INT.
133 * options.c (gfc_handle_option): Same.
134
135 2018-07-20 Andrew Benson <abenson@carnegiescience.edu>
136
137 * gfortran.h (gfc_symbol): Add pointer to next derived type.
138 (gfc_dt_list, gfc_get_dt_list): Remove.
139 (gfc_namespace): Replace gfc_dt_list with gfc_symbol.
140 * parse.c (resolve_all_program_units): Replace gfc_free_dt_list() with
141 simple nullification of gfc_derived_types.
142 * resolve.c (resolve_global_procedure): Replace gfc_dt_list with
143 gfc_symbol.
144 (add_dt_to_dt_list): Change derived type linked list insertion to
145 utilize dt_next pointers in gfc_symbol.
146 * symbol.c (gfc_new_symbol, gfc_free_dt_list, gfc_symbol_done2)
147 (get_iso_c_binding_dt, generate_isocbinding_symbol): Remove
148 gfc_free_dt_list as gfc_dt_list is obsoleted. Change derived type
149 linked list search/insertion to utilize dt_next pointers in gfc_symbol.
150 * trans-types.c (gfc_get_derived_type): Change derived type linked
151 list search to utilize dt_next pointers in gfc_symbol.
152
153 2018-07-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
154
155 * trans-intrinsic.c: (gfc_conv_intrinsic_minmax): Emit MIN_MAX_EXPR
156 or IFN_FMIN/FMAX sequence to calculate the min/max when possible.
157
158 2018-07-18 Janus Weil <janus@gcc.gnu.org>
159 Thomas Koenig <tkoenig@gcc.gnu.org>
160
161 PR fortran/85599
162 * dump-parse-tree.c (show_attr): Add handling of implicit_pure.
163 * frontend-passes.c (do_warn_function_elimination): Do not warn for
164 pure functions.
165 * gfortran.h: Add prototypes for gfc_pure_function and
166 gfc_implicit_pure_function.
167 * gfortran.texi: Add chapter on evaluation of logical expressions.
168 * invoke.texi: Mention that -Wfunction-elimination is implied
169 by -Wextra.
170 * lang.opt: Make -Wextra imply -Wfunction-elimination.
171 * resolve.c (pure_function): Rename to gfc_pure_function.
172 (gfc_implicit_pure_function): New function.
173 (check_pure_function): Use it here.
174 (impure_function_callback): New function.
175 (resolve_operator): Call it via gfc_expr_walker.
176
177 2018-07-16 Fritz Reese <fritzoreese@gmail.com>
178
179 PR fortran/83184
180 * decl.c (match_old_style_init): Initialize locus of variable expr when
181 creating a data variable.
182 (match_clist_expr): Verify array is explicit shape/size before
183 attempting to allocate constant array constructor.
184
185 2018-07-16 Fritz Reese <fritzoreese@gmail.com>
186
187 PR fortran/86417
188 * module.c (mio_component): Set component->loc when loading from module.
189
190 2018-07-10 Jakub Jelinek <jakub@redhat.com>
191
192 PR fortran/86421
193 * module.c (omp_declare_simd_clauses): Add LINEAR with _REF, _VAL and
194 _UVAL suffixes.
195 (mio_omp_declare_simd): Save and restore ref, val and uval modifiers
196 on linear clauses. Initialize n->where to gfc_current_locus.
197
198 2018-07-05 Paul Thomas <pault@gcc.gnu.org>
199
200 PR fortran/86408
201 * resolve.c.c (resolve_contained_fntype): Reference to C418 is
202 in F2008 and not F2003.
203 (resolve_function): Ditto in error message. Also, exclude
204 deferred character length results from the error.
205
206 2018-07-05 Fritz Reese <fritzoreese@gmail.com>
207
208 PR fortran/83183
209 PR fortran/86325
210 * expr.c (class_allocatable, class_pointer, comp_allocatable,
211 comp_pointer): New helpers.
212 (component_initializer): Generate EXPR_NULL for allocatable or pointer
213 components. Do not generate initializers for components within BT_CLASS.
214 Do not assign to comp->initializer.
215 (gfc_generate_initializer): Use new helpers; move code to generate
216 EXPR_NULL for class allocatable components into component_initializer().
217
218 2018-07-04 Jerry DeLisle <jvdelisle@gcc.gnu.org>
219
220 PR fortran/82009
221 * trans-decl.c (gfc_process_block_locals): Delete assert and set
222 saved_local_decls = NULL_TREE.
223
224 2018-07-02 Richard Biener <rguenther@suse.de>
225
226 PR lto/86321
227 * trans-types.c (gfc_get_array_type_bounds): Unshare TYPE_FIELDs
228 for the distinct type copy.
229
230 2018-07-02 Paul Thomas <pault@gcc.gnu.org>
231
232 PR fortran/82969
233 PR fortran/86242
234 * trans-array.c (structure_alloc_comps): Do not explicitly copy
235 procedure pointer components.
236
237 2018-07-02 Paul Thomas <pault@gcc.gnu.org>
238
239 PR fortran/45305
240 * expr.c : Add a prototype for scalarize_intrinsic_call.
241 (gfc_simplify_expr): Use scalarize_intrinsic_call for elemental
242 intrinsic function calls.
243 (scalarize_intrinsic_call): Add 'init_flag' argument. Check if
244 the expression or any of the actual argument expressions are
245 NULL. Before calling gfc_check_init_expr, check 'init_flag'.
246 Only simplify the scalarized expressions if there are no errors
247 on the stack.
248 (gfc_check_init_expr): Set 'init_flag' true in the call to
249 scalarize_intrinsic_call.
250
251 2018-06-28 Fritz Reese <fritzoreese@gmail.com>
252
253 PR fortran/82865
254 * decl.c (gfc_match_type): Refactor and check for PDT declarations.
255
256 2018-06-28 Martin Liska <mliska@suse.cz>
257
258 * gfortranspec.c: Include opt-suggestions.h.
259
260 2018-06-25 Fritz Reese <fritzoreese@gmail.com>
261
262 PR fortran/82972
263 PR fortran/83088
264 PR fortran/85851
265 * expr.c (component_initializer): Assign init expr to c->initializer.
266 (generate_isocbinding_initializer): New.
267 (gfc_generate_initializer): Call generate_isocbinding_initializer to
268 generate initializers for c_ptr and c_funptr with -finit-derived.
269
270 2018-06-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
271
272 PR fortran/85983
273 * interface.c (check_dtio_interface1): Delete assert.
274
275 2018-06-22 Paul Thomas <pault@gcc.gnu.org>
276 Rainer Orth <ro@gcc.gnu.org>
277
278 PR fortran/86281
279 * resolve.c (resolve_contained_fntype): Check for the charlen
280 before testing the length.
281
282 2018-06-21 Paul Thomas <pault@gcc.gnu.org>
283
284 PR fortran/49630
285 * resolve.c (resolve_contained_fntype): Change standard ref.
286 from F95 to F2003: C418. Correct a spelling error in a comment.
287 It is an error for an abstract interface to have an assumed
288 character length result.
289 * trans-expr.c (gfc_conv_procedure_call): Likewise change the
290 standard reference.
291
292 2018-06-21 Paul Thomas <pault@gcc.gnu.org>
293
294 PR fortran/83118
295 * resolve.c (resolve_ordinary_assign): Force the creation of a
296 vtable for assignment of non-polymorphic expressions to an
297 unlimited polymorphic object.
298 * trans-array.c (gfc_alloc_allocatable_for_assignment): Use the
299 size of the rhs type for such assignments. Set the dtype, _len
300 and vptrs appropriately.
301 * trans-expr.c (gfc_trans_assignment): Force the use of the
302 _copy function for these assignments.
303
304 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
305 Thomas Schwinge <thomas@codesourcery.com>
306 Cesar Philippidis <cesar@codesourcery.com>
307
308 * gfortran.h (gfc_omp_clauses): Add unsigned if_present, finalize
309 bitfields.
310 * openmp.c (enum omp_mask2): Remove OMP_CLAUSE_PRESENT_OR_*. Add
311 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
312 (gfc_match_omp_clauses): Update handling of copy, copyin, copyout,
313 create, deviceptr, present_of_*. Add support for finalize and
314 if_present.
315 (OACC_PARALLEL_CLAUSES): Remove PRESENT_OR_* clauses.
316 (OACC_KERNELS_CLAUSES): Likewise.
317 (OACC_DATA_CLAUSES): Likewise.
318 (OACC_DECLARE_CLAUSES): Likewise.
319 (OACC_UPDATE_CLAUSES): Add IF_PRESENT clause.
320 (OACC_ENTER_DATA_CLAUSES): Remove PRESENT_OR_* clauses.
321 (OACC_EXIT_DATA_CLAUSES): Add FINALIZE clause.
322 (gfc_match_oacc_declare): Update to OpenACC 2.5 semantics.
323 * trans-openmp.c (gfc_trans_omp_clauses): Add support for IF_PRESENT
324 and FINALIZE.
325
326 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
327
328 * trans-decl.c (gfc_get_fake_result_decl): Revert latest change.
329
330 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
331
332 * trans-decl.c (nonlocal_dummy_decl_pset): Delete.
333 (nonlocal_dummy_decls): Likewise.
334 (gfc_nonlocal_dummy_array_decl): Likewise.
335 (gfc_get_symbol_decl): Do not call gfc_nonlocal_dummy_array_decl.
336 (gfc_get_fake_result_decl): Do not generate a new DECL if simply
337 reusing the result of a recursive call.
338 (gfc_generate_function_code): Do not create, insert and destroy
339 nonlocal_dummy_decls.
340
341 2018-06-13 Steven G. Kargl <kargl@gcc.gnu.org>
342
343 PR fortran/86110
344 * array.c (gfc_resolve_character_array_constructor): Avoid NULL
345 pointer dereference.
346
347 2018-06-13 Cesar Philippidis <cesar@codesourcery.com>
348
349 PR fortran/85703
350 * parse.c (decode_oacc_directive): Set gfc_matching_function
351 to false.
352 (decode_omp_directive): Likewise.
353
354 2018-06-13 Cesar Philippidis <cesar@codesourcery.com>
355
356 PR fortran/85702
357 * openmp.c (gfc_match_oacc_wait): Use %C to report error location.
358
359 2018-06-12 David Malcolm <dmalcolm@redhat.com>
360
361 PR other/69968
362 * misc.c (gfc_closest_fuzzy_match): Update for renaming of
363 levenshtein_distance to get_edit_distance.
364
365 2018-06-12 Steven G. Kargl <kargl@gcc.gnu.org>
366
367 PR fortran/44491
368 * expr.c (gfc_check_assign): Select non-NULL locus.
369
370 2018-06-11 Janus Weil <janus@gcc.gnu.org>
371
372 PR fortran/45521
373 * interface.c (compare_ptr_alloc): New function.
374 (generic_correspondence): Call it.
375
376 2018-06-10 Thomas Koenig <tkoenig@gcc.gnu.org>
377
378 * gfortran.h (gfc_expr): Add no_bounds_check field.
379 * frontend-passes.c (get_array_inq_function): Set no_bounds_check
380 on function and function argument.
381 (inline_matmul_assign): Set no_bounds_check on zero expression
382 and on lhs of zero expression.
383 Also handle A1B2 case if realloc on assigment is active.
384 * trans-array.c (gfc_conv_array_ref): Don't do range checking
385 if expr has no_bounds_check set.
386 (gfc_conv_expr_descriptor): Set no_bounds_check on ss if expr
387 has it set.
388 * trans-expr.c (gfc_trans_assignment_1): Set no_bounds_check
389 on lss and lss if the corresponding expressions have it set.
390
391 2018-06-10 Dominique d'Humieres <dominiq@gcc.gnu.org>
392
393 PR fortran/79854
394 * trans-const.c: Remove include "diagnostic-core.h".
395 (gfc_conv_constant_to_tree): Replace fatal_error with gcc_unreachable.
396
397 2018-06-10 Janus Weil <janus@gcc.gnu.org>
398
399 PR fortran/85088
400 * decl.c (match_attr_spec): Synchronize the DECL_* enum values with the
401 INTENT_* values from the enum 'sym_intent'. Call 'match_intent_spec'
402 and remove a TODO note.
403 * gfortran.h: Add a comment to sym_intent.
404
405 2018-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
406
407 PR fortran/38351
408 * resolve.c (resolve_operator): Provide better error message for
409 derived type entity used in an binary intrinsic numeric operator.
410
411 2018-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
412
413 PR fortran/85138
414 PR fortran/85996
415 PR fortran/86051
416 * decl.c (gfc_match_char_spec): Use private namespace in attempt to
417 reduce a charlen to a constant.
418
419 2018-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
420
421 PR fortran/78278
422 * data.c (gfc_assign_data_value): Re-arrange code to allow for
423 an error for double initialization of CHARACTER entities.
424
425 2018-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
426
427 PR fortran/63514
428 * symbol.c (gfc_add_volatile): Enforce F2008:C1282 and F2018:C1588.
429
430 2018-06-08 Thomas Koenig <tkoenig@gcc.gnu.org>
431
432 PR fortran/85631
433 * trans.h (gfc_ss): Add field no_bounds_check.
434 * trans-array.c (gfc_conv_ss_startstride): If flag_realloc_lhs and
435 ss->no_bounds_check is set, do not use runtime checks.
436 * trans-expr.c (gfc_trans_assignment_1): Set lss->no_bounds_check
437 for reallocatable lhs.
438
439 2018-06-08 Steven G. Kargl <kargl@gcc.gnu.org>
440
441 PR fortran/86059
442 * array.c (match_array_cons_element): NULL() cannot be in an
443 array constructor.
444
445 2018-06-08 Steven G. Kargl <kargl@gcc.gnu.org>
446
447 PR fortran/78571
448 * data.c (create_character_initializer): Return early if type is
449 incompatible with CHARACTER.
450
451 2018-06-07 Steven G. Kargl <kargl@gcc.gnu.org>
452
453 PR fortran/86045
454 * simplify.c (gfc_simplify_mod): Re-arrange code to test whether
455 'P' is zero and issue an error if it is.
456
457 2018-06-06 Thomas Koenig <tkoenig@gcc.gnu.org>
458
459 PR fortran/85641
460 * frontend-passes.c (is_fe_temp): Add prototype.
461 (realloc_string_callback): Early return for frontend-generated
462 temporary.
463
464 2018-06-05 Cesar Philippidis <cesar@codesourcery.com>
465
466 PR fortran/85701
467
468 * openmp.c (gfc_resolve_oacc_declare): Error on functions and
469 subroutine data clause arguments.
470
471 2018-06-04 Steven G. Kargl <kargl@gcc.gnu.org>
472
473 PR fortran/85981
474 * resolve.c (resolve_allocate_deallocate): Check errmsg is default
475 character kind.
476
477 2018-06-03 Paul Thomas <pault@gcc.gnu.org>
478
479 PR fortran/36497
480 * decl.c (variable_decl): Use gfc_add_type for cray pointees.
481
482 2018-06-01 Steven G. Kargl <kargl@gcc.gnu.org>
483
484 PR fortran/63570
485 * check.c (gfc_check_random_init): New function. Check arguments of
486 RANDOM_INIT.
487 * gfortran.h (GFC_ISYM_RANDOM_INIT): New enum token.
488 * intrinsic.c (add_subroutines): Add RANDOM_INIT to list of
489 subroutines.
490 (gfc_check_intrinsic_standard): Introduce Fortran 2018 check.
491 * intrinsic.h: Add prototypes for gfc_check_random_init and
492 gfc_resolve_random_init
493 * intrinsic.texi: Document new intrinsic subprogram.
494 * iresolve.c (gfc_resolve_random_init): Resolve routine name.
495 * trans-decl.c: Declare gfor_fndecl_random_init
496 * trans-intrinsic.c (conv_intrinsic_random_init): New function.
497 Translate call to RANDOM_INIT.
498 (gfc_conv_intrinsic_subroutine): Call it.
499 * trans.h: Declare gfor_fndecl_random_init
500
501 2018-05-27 Steven G. Kargl <kargl@gcc.gnu.org>
502
503 * decl.c (match_data_constant): Fortran 2018 allows pointer
504 initialization in a data statement.
505
506 2018-05-25 Janus Weil <janus@gcc.gnu.org>
507
508 PR fortran/85839
509 * match.c (gfc_match_block_data): Call gfc_notify_std to warn about
510 an obsolescent feature in Fortran 2018.
511 (gfc_match_equivalence): Ditto.
512 * resolve.c (resolve_common_blocks): Ditto.
513 (gfc_resolve_forall): Ditto.
514 * symbol.c (gfc_define_st_label): Ditto.
515
516 2018-05-24 Steven G. Kargl <kargl@gcc.gnu.org>
517
518 PR fortran/85543
519 * resolve.c (update_current_proc_array_outer_dependency): Avoid NULL
520 pointer dereference.
521
522 2018-05-24 Steven G. Kargl <kargl@gcc.gnu.org>
523
524 PR fortran/85780
525 * resolve.c (resolve_fl_procedure): Avoid NULL dereference.
526
527 2018-05-24 Steven G. Kargl <kargl@gcc.gnu.org>
528
529 PR fortran/85779
530 * decl.c (gfc_match_derived_decl): Fix NULL point dereference.
531
532 2018-05-24 Steven G. Kargl <kargl@gcc.gnu.org>
533
534 PR fortran/85895
535 * resolve.c (resolve_sync): Resolve expression before checking for
536 an error.
537
538 2018-05-22 Janus Weil <janus@gcc.gnu.org>
539
540 PR fortran/85841
541 * libgfortran.h: Remove the macros GFC_STD_F2008_TS and
542 GFC_STD_OPT_F08TS.
543 * error.c (notify_std_msg): Remove GFC_STD_F2008_TS.
544 * options.c (set_default_std_flags): Ditto.
545 (gfc_handle_option): Make -std=f2008ts an alias for -std=f2018.
546 * array.c (gfc_match_array_spec): Replace GFC_STD_F2008_TS by
547 GFC_STD_F2018.
548 * check.c (gfc_check_atomic, gfc_check_event_query,
549 gfc_check_c_f_pointer, gfc_check_c_f_procpointer, gfc_check_c_funloc,
550 gfc_check_c_loc, gfc_check_num_images, gfc_check_this_image): Ditto.
551 * decl.c (gfc_verify_c_interop_param, gfc_match_decl_type_spec): Ditto.
552 * intrinsic.c (add_functions, add_subroutines,
553 gfc_check_intrinsic_standard): Ditto.
554 * iso-c-binding.def: Ditto.
555 * iso-fortran-env.def: Ditto.
556 * match.c (gfc_match_event_post, gfc_match_event_wait,
557 gfc_match_fail_image, gfc_match_form_team, gfc_match_change_team,
558 gfc_match_end_team, gfc_match_sync_team): Ditto.
559 * gfortran.texi: Remove mention of -std=f2008ts.
560 Move TSs into F2018 section.
561 * invoke.texi: Update documentation of -std=f2008ts.
562
563 2018-05-21 Janus Weil <janus@gcc.gnu.org>
564
565 PR fortran/85841
566 * libgfortran.h: New macros GFC_STD_OPT_*.
567 * error.c (notify_std_msg): New function.
568 (gfc_notify_std): Adjust such that it can handle combinations of
569 GFC_STD_* flags in the 'std' argument, not just a single one.
570 * match.c (match_arithmetic_if, gfc_match_if): Reject arithmetic if
571 in Fortran 2018.
572 (gfc_match_stopcode): Use GFC_STD_OPT_* macros.
573 * options.c (set_default_std_flags): Warn for F2018 deleted features
574 by default.
575 (gfc_handle_option): F2018 deleted features are allowed in earlier
576 standards.
577 * symbol.c (gfc_define_st_label, gfc_reference_st_label): Reject
578 nonblock do constructs in Fortran 2018.
579
580 2018-05-20 Paul Thomas <pault@gcc.gnu.org>
581
582 PR fortran/80657
583 * resolve.c (flag_fn_result_spec): Use the 'sym' argument to
584 test for self refs to the function result in the character len
585 expression. If a self reference is found, emit an error and
586 return true.
587 (resolve_fntype): Use the function symbol in the calls to the
588 above.
589
590 2018-05-20 Paul Thomas <pault@gcc.gnu.org>
591
592 PR fortran/49636
593 * trans-array.c (gfc_get_array_span): Renamed from
594 'get_array_span'.
595 (gfc_conv_expr_descriptor): Change references to above.
596 * trans-array.h : Add prototype for 'gfc_get_array_span'.
597 * trans-intrinsic.c (gfc_conv_associated): Add pre and post
598 blocks for 'arg1'.
599 * trans-stmt.c (trans_associate_var): If the associate name is
600 a subref array pointer, use gfc_get_array_span for the span.
601
602 2018-05-20 Paul Thomas <pault@gcc.gnu.org>
603
604 PR fortran/82275
605 * match.c (gfc_match_type_spec): Go through the array ref and
606 decrement 'rank' for every dimension that is an element.
607
608 2018-05-19 Paul Thomas <pault@gcc.gnu.org>
609
610 PR fortran/82923
611 PR fortran/66694
612 PR fortran/82617
613 * trans-array.c (gfc_alloc_allocatable_for_assignment): Set the
614 charlen backend_decl of the rhs expr to ss->info->string_length
615 so that the value in the current scope is used.
616
617 2018-05-13 Steven G. Kargl <kargl@gcc.gnu.org>
618
619 PR fortran/63529
620 * gfortran.texi: Clarify documentation for Cray pointer and
621 assumed-sized array.
622
623 2018-05-13 Paul Thomas <pault@gcc.gnu.org>
624
625 PR fortran/85742
626 * trans-types.c (gfc_get_dtype_rank_type): Reorder evaluation
627 of 'size'. If the element type is a pointer use the size of the
628 TREE_TYPE of the type, unless it is VOID_TYPE. In this latter
629 case, set the size to zero.
630
631 2018-05-13 Steven G. Kargl <kargl@gcc.gnu.org>
632
633 * gfortran.h: Remove prototype.
634 * symbol.c (gfc_new_undo_checkpoint): Remove unused function.
635
636 2018-05-11 Steven G. Kargl <kargl@gcc.gnu.org>
637
638 PR fortran/85542
639 * expr.c (check_inquiry): Avoid NULL pointer dereference.
640
641 2018-05-10 Steven G. Kargl <kargl@gcc.gnu.org>
642
643 PR fortran/85687
644 * check.c (gfc_check_rank): Check that the argument is a data object.
645
646 2018-05-10 Steven G. Kargl <kargl@gcc.gnu.org>
647
648 PR fortran/85521
649 * array.c (gfc_resolve_character_array_constructor): Substrings
650 with upper bound smaller than lower bound are zero length strings.
651
652 2018-05-10 Steven G. Kargl <kargl@gcc.gnu.org>
653
654 PR fortran/70870
655 * data.c (gfc_assign_data_value): Check that a data object does
656 not also have default initialization.
657
658 2018-05-10 Marek Polacek <polacek@redhat.com>
659
660 PR fortran/85735
661 * options.c (gfc_post_options): Set main_input_filename.
662
663 2018-05-10 Thomas Koenig <tkoenig@gcc.gnu.org>
664
665 PR fortran/54613
666 * intrinsic.texi: Document BACK for MINLOC and MAXLOC.
667
668 2018-05-10 Paul Thomas <pault@gcc.gnu.org>
669
670 PR fortran/68846
671 PR fortran/70864
672 * resolve.c (get_temp_from_expr): The temporary must not have
673 dummy or intent attributes.
674
675 2018-05-08 Thomas Koenig <tkoenig@gcc.gnu.org>
676
677 PR fortran/54613
678 * check.c (gfc_check_minmaxloc): Remove error for BACK not being
679 implemented. Use gfc_logical_4_kind for BACK.
680 * simplify.c (min_max_choose): Add optional argument back_val.
681 Handle it.
682 (simplify_minmaxloc_to_scalar): Add argument back_val. Pass
683 back_val to min_max_choose.
684 (simplify_minmaxloc_to_nodim): Likewise.
685 (simplify_minmaxloc_to_array): Likewise.
686 (gfc_simplify_minmaxloc): Add argument back, handle it.
687 Pass back_val to specific simplification functions.
688 (gfc_simplify_minloc): Remove ATTRIBUTE_UNUSED from argument back,
689 pass it on to gfc_simplify_minmaxloc.
690 (gfc_simplify_maxloc): Likewise.
691 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Adjust
692 comment. If BACK is true, use greater or equal (or lesser or
693 equal) insteal of greater (or lesser). Mark the condition of
694 having found a value which exceeds the limit as unlikely.
695
696 2018-05-07 Jeff Law <law@redhat.comg>
697
698 * scanner.c (preprocessor_line): Call linemap_add after a line
699 directive that changes the current filename.
700
701 2018-05-06 Andre Vehreschild <vehre@gcc.gnu.org>
702
703 PR fortran/85507
704 * dependency.c (gfc_dep_resolver): Revert looking at coarray dimension
705 introduced by r259385.
706 * trans-intrinsic.c (conv_caf_send): Always report a dependency for
707 same variables in coarray assignments.
708
709 2018-05-02 Tom de Vries <tom@codesourcery.com>
710
711 PR libgomp/82428
712 * f95-lang.c (DEF_GOACC_BUILTIN_ONLY): Define.
713
714 2018-04-24 Steven G. Kargl <kargl@gcc.gnu.org>
715
716 PR fortran/85520
717 * decl.c (gfc_match_char_spec): Check for negative length and set to 0.
718
719 2018-04-14 Andre Vehreschild <vehre@gcc.gnu.org>
720
721 PR fortran/81773
722 PR fortran/83606
723 * dependency.c (gfc_dep_resolver): Coarray indexes are to be ignored
724 during dependency computation. They define no data dependency.
725 * trans-array.c (conv_array_index_offset): The stride can not be set
726 here, prevent fail.
727 * trans-intrinsic.c (conv_caf_send): Add creation of temporary array
728 for caf_get's result and copying to the array with vectorial
729 indexing.
730
731 2018-04-14 Thomas Koenig <tkoenig@gcc.gnu.org>
732
733 PR fortran/85387
734 * frontend-passes.c (traverse_io_block): Check for start, end or
735 stride being defined by an outer implied DO loop.
736
737 2018-04-12 Thomas Koenig <tkoenig@gcc.gnu.org>
738
739 PR fortran/83064
740 PR testsuite/85346
741 * trans-stmt.c (gfc_trans_forall_loop): Use annot_expr_ivdep_kind
742 for annotation and remove dependence on -ftree-parallelize-loops.
743
744 2018-04-10 Jakub Jelinek <jakub@redhat.com>
745
746 PR fortran/85313
747 * openmp.c (resolve_omp_do): Remove bogus if (j < i) break;.
748 (resolve_oacc_nested_loops): Likewise. Formatting fix.
749
750 2018-04-09 Thomas Koenig <tkoenig@gcc.gnu.org>
751
752 PR fortran/83064
753 * trans-stmt.c (gfc_trans_forall_loop): Remove annotation for
754 parallell processing of DO CONCURRENT -ftree-parallelize-loops
755 is set.
756
757 2018-04-09 Thomas Koenig <tkoenig@gcc.gnu.org>
758
759 PR fortran/51260
760 * resolve.c (resolve_variable): Simplify cases where access to a
761 parameter array results in a single constant.
762
763 2018-04-02 Thomas Koenig <tkoenig@gcc.gnu.org>
764
765 PR fortran/85102
766 * decl.c (variable_decl): If upper or lower bounds simplify
767 to a constant, use that.
768
769 2018-03-30 Paul Thomas <pault@gcc.gnu.org>
770
771 PR fortran/84931
772 * simplify.c (gfc_convert_constant): Handle case of array
773 constructors within an array that has no iterator and improve
774 the conciseness of this section of code.
775
776 2017-03-30 Thomas Koenig <tkoenig@gcc.gnu.org>
777
778 PR fortran/85111
779 * array.c (gfc_resolve_character_array_constructor): Early
780 exit for zero-size arrays.
781 * simplify.c (simplify_transformation_to_array): Exit early
782 if the result size is zero.
783 (simplify_minmaxloc_to_array): Likewise.
784
785 2018-03-28 Mikael Morin <mikael@gcc.gnu.org>
786
787 PR fortran/69497
788 * symbol.c (gfc_symbol_done_2): Start freeing namespaces
789 from the root.
790 (gfc_free_namespace): Restore assert (revert r258839).
791
792 2018-03-28 Jakub Jelinek <jakub@redhat.com>
793
794 * gfortran.h (gfc_dt): Rename default_exp field to dec_ext.
795 * ioparm.def (IOPARM_dt_default_exp): Rename to ...
796 (IOPARM_dt_dec_ext): ... this.
797 * trans-io.c (build_dt): Adjust for default_exp renaming to
798 dec_ext and IOPARM_dt_default_exp renaming to IOPARM_dt_dec_ext.
799 * io.c (match_io): Likewise.
800
801 2018-03-27 Thomas Koenig <tkoenig@gcc.gnu.org>
802
803 PR fortran/85084
804 * frontend-passes.c (gfc_run_passes): Do not run front-end
805 optimizations if a previous error occurred.
806
807 2018-03-27 Thomas Koenig <tkoenig@gcc.gnu.org>
808 Harald Anlauf <anlauf@gmx.de>
809
810 PR fortran/85083
811 * primary.c (gfc_convert_to_structure_constructor): Check
812 conformance of argument types in structure constructor.
813
814 2018-03-26 Thomas Koenig <tkoenig@gcc.gnu.org>
815
816 PR fortran/66709
817 * io.c: Include constructor.h.
818 (resolve_tag_format): For a constant character array, concatenate
819 into a single character expression.
820
821 2018-03-25 Seth Johnson <johnsonsr@ornl.gov>
822 Dominique d'Humieres <dominiq@gcc.gnu.org>
823
824 PR fortran/84924
825 * check.c (gfc_check_c_f_pointer): Allow scalar noninteroperable
826 scalar derived type with -std=f2003 and -std=f2008.
827
828 2018-03-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
829 Dominique d'Humieres <dominiq@gcc.gnu.org>
830
831 PR fortran/69497
832 * symbol.c (gfc_free_namespace): Delete the assert and only if
833 refs count is equals zero, free the namespace. Otherwise,
834 something is halfway and other errors will resound.
835
836 2018-03-24 Thomas Koenig <tkoenig@gcc.gnu.org>
837
838 PR fortran/70068
839 * expr.c (find_substring_ref): Change types of start, end
840 and length variables to gfc_charlen_t. Set length to zero
841 for empty substring.
842
843 2018-03-24 Steven G. Kargl <kargl@gcc.gnu.org>
844
845 PR fortran/42651
846 * decl.c (check_function_name): Improved error message
847 (gfc_match_volatile, gfc_match_asynchronous) Use check_function_name.
848
849 2018-03-22 Steven G. Kargl <kargl@gcc.gnu.org>
850
851 PR fortran/84922
852 * decl.c (get_proc_name): If the MODULE prefix appears in interface
853 body, then it must appear on the contained subroutine or function.
854 While here, fix nearby mis-indented code.
855
856 2018-03-21 Thomas Koenig <tkoenig@gcc.gnu.org>
857 Harald Anlauf <anlauf@gmx.de>
858
859 PR fortran/84957
860 * trans-types.c (gfc_sym_type): Do not dereference NULL pointer.
861
862 2018-03-21 Janne Blomqvist <jb@gcc.gnu.org>
863
864 PR fortran/84615
865 * trans-expr.c (gfc_conv_procedure_call): Convert charlen to
866 gfc_charlen_type_node when calling procedure.
867
868 2018-03-20 Steven G. Kargl <kargl@gcc.gnu.org>
869
870 PR fortran/85001
871 * interface.c (symbol_rank): Remove bogus null pointer check that
872 crept in when translating a ternary operator into an if-else
873 constructor.
874
875 2018-03-19 Thomas Koenig <tkoenig@gcc.gnu.org>
876
877 PR fortran/84931
878 * simplify.c (gfc_convert_constant): Correctly handle iterators
879 for type conversion.
880
881 2018-03-18 Steven G. Kargl <kargl@gcc.gnu.org>
882
883 PR fortran/77414
884 * decl.c (get_proc_name): Check for a subroutine re-defined in
885 the contain portion of a subroutine. Change language of existing
886 error message to better describe the issue. While here fix whitespace
887 issues.
888
889 2018-03-18 Steven G. Kargl <kargl@gcc.gnu.org>
890
891 PR fortran/65453
892 * decl.c (get_proc_name): Catch clash between a procedure statement
893 and a contained subprogram
894
895 2018-03-16 Steven G. Kargl <kargl@gcc.gnu.org>
896
897 PR fortran/69395
898 * decl.c (merge_array_spec): Correct the error condition.
899
900 2018-03-15 Steven G. Kargl <kargl@gcc.gnu.org>
901
902 PR fortran/78741
903 * decl.c (get_proc_name): Check for clash of entry name with
904 subroutine name.
905
906 2018-03-15 Steven G. Kargl <kargl@gcc.gnu.org>
907
908 PR fortran/69395
909 * decl.c (merge_array_spec): Limit the merging to maximum allowed
910 dimensions, and issue error message if limit is exceeded.
911
912 2018-03-13 Steven G. Kargl <kargl@gcc.gnu.org>
913
914 * check.c (gfc_check_kill_sub): Remove check for INTEGER(4) or (8).
915 * intrinsic.c (add_functions): Remove reference to gfc_resolve_kill.
916 (add_subroutines): Remove reference to gfc_resolve_kill_sub.
917 * intrinsic.texi: Update documentation.
918 * iresolve.c (gfc_resolve_kill, gfc_resolve_kill_sub): Remove.
919 * trans-decl.c (gfc_build_intrinsic_function_decls): Add
920 gfor_fndecl_kill and gfor_fndecl_kill_sub
921 * trans-intrinsic.c (conv_intrinsic_kill, conv_intrinsic_kill_sub): new
922 functions.
923 (gfc_conv_intrinsic_function): Use conv_intrinsic_kill.
924 (gfc_conv_intrinsic_subroutine): Use conv_intrinsic_kill_sub.
925 * trans.h: Declare gfor_fndecl_kill and gfor_fndecl_kill_sub.
926
927 2018-03-11 Paul Thomas <pault@gcc.gnu.org>
928
929 PR fortran/84546
930 * trans-array.c (structure_alloc_comps): Make sure that the
931 vptr is copied and that the unlimited polymorphic _len is used
932 to compute the size to be allocated.
933 * trans-expr.c (gfc_get_class_array_ref): If unlimited, use the
934 unlimited polymorphic _len for the offset to the element.
935 (gfc_copy_class_to_class): Set the new 'unlimited' argument.
936 * trans.h : Add the boolean 'unlimited' to the prototype.
937
938 2018-03-11 Steven G. Kargl <kargl@gcc.gnu.org>
939
940 PR fortran/83939
941 * resolve.c (resolve_fl_procedure): Enforce F2018:C15100.
942
943 2018-03-11 Steven G. Kargl <kargls@gcc.gnu.org>
944
945 * check.c (gfc_check_kill): Check pid and sig are scalar.
946 (gfc_check_kill_sub): Restrict kind to 4 and 8.
947 * intrinsic.c (add_function): Sort keyword list. Add pid and sig
948 keywords for KILL. Remove redundant *back="back" in favor of the
949 original *bck="back".
950 (add_subroutines): Sort keyword list. Add pid and sig keywords
951 for KILL.
952 * intrinsic.texi: Fix documentation to consistently use pid and sig.
953 * iresolve.c (gfc_resolve_kill): Kind can only be 4 or 8. Choose the
954 correct function.
955 (gfc_resolve_rename_sub): Add comment.
956
957 2018-03-11 Thomas Koenig <tkoenig@gcc.gnu.org>
958
959 PR fortran/66128
960 * simplify.c (simplify_transformation): Return default result for
961 empty array argument.
962 (gfc_simplify_all): Remove special-case handling for zerosize.
963 (gfc_simplify_any): Likewise.
964 (gfc_simplify_count): Likewise.
965 (gfc_simplify_iall): Likewise.
966 (gfc_simplify_iany): Likewise.
967 (gfc_simplify_iparity): Likewise.
968 (gfc_simplify_minval): Likewise.
969 (gfc_simplify_maxval): Likewise.
970 (gfc_simplify_norm2): Likewise.
971 (gfc_simplify_product): Likewise.
972 (gfc_simplify_sum): Likewise.
973
974 2018-03-10 Steven G. Kargl <kargl@gcc.gnu.org>
975
976 PR fortran/84734
977 * arith.c (check_result, eval_intrinsic): If result overflows, pass
978 the expression up the chain instead of a NULL pointer.
979
980 2018-03-07 Steven G. Kargl <kargl@gcc.gnu.org>
981
982 PR fortran/64124
983 PR fortran/70409
984 * decl.c (gfc_match_char_spec): Try to reduce a charlen to a constant.
985
986 2017-03-06 Thomas Koenig <tkoenig@gcc.gnu.org>
987
988 PR fortran/84697
989 PR fortran/66128
990 * expr.c (simplify_parameter_variable): If p is a size zero array
991 and not an ARRAY_EXPR insert an empty array constructor and
992 return.
993 * gfortran.h: Add prototype for gfc_is_size_zero_array.
994 * simplify.c (is_size_zero_array): Make non-static and rename into
995 (gfc_is_size_zero_array): Check for parameter arrays of zero
996 size by comparing shape and absence of constructor.
997 (gfc_simplify_all): Use gfc_is_size_zero_array instead of
998 is_size_zero_array.
999 (gfc_simplify_count): Likewise.
1000 (gfc_simplify_iall): Likewise.
1001 (gfc_simplify_iany): Likewise.
1002 (gfc_simplify_iparity): Likewise.
1003 (gfc_simplify_minval): Likewise.
1004 (gfc_simplify_maxval): Likewise.
1005 (gfc_simplify_product): Likewise.
1006 (gfc_simplify_sum): Likewise.
1007
1008 2018-03-06 Steven G. Kargl <kargl@gcc.gnu.org>
1009
1010 PR fortran/56667
1011 * primary.c (match_sym_complex_part): Give the matcher for an implied
1012 do-loop a chance to run.
1013
1014 2018-03-03 Harald Anlauf <anlauf@gmx.de>
1015
1016 PR fortran/71085
1017 * trans-expr.c (gfc_apply_interface_mapping_to_expr): Do not
1018 dereference NULL pointer.
1019
1020 2018-03-03 Steven G. Kargl <kargl@gcc.gnu.org>
1021
1022 PR fortran/66128
1023 * simplify.c (is_size_zero_array): New function to check for size
1024 zero array.
1025 (gfc_simplify_all, gfc_simplify_any, gfc_simplify_count,
1026 gfc_simplify_iall, gfc_simplify_iany, gfc_simplify_iparity,
1027 gfc_simplify_minval, gfc_simplify_maxval, gfc_simplify_norm2,
1028 gfc_simplify_product, gfc_simplify_sum): Use it, and implement
1029 requirements from F2018.
1030
1031 2018-03-03 Steven G. Kargl <kargl@gcc.gnu.org>
1032
1033 PR fortran/51434
1034 * simplify.c (gfc_simplify_transfer): Resolve mold.
1035
1036 2018-03-03 Paul Thomas <pault@gcc.gnu.org>
1037
1038 PR fortran/80965
1039 * resolve.c (build_loc_call): Change symtree name from 'loc' to
1040 '_loc'.
1041
1042 2018-03-01 Paul Thomas <pault@gcc.gnu.org>
1043
1044 PR fortran/84219
1045 * target-memory.c (gfc_interpret_derived): Assert that BT_VOID
1046 components are caf tokens.
1047 (gfc_target_interpret_expr): Treat BT_VOID expressions as
1048 integers.
1049
1050 2018-03-01 Paul Thomas <pault@gcc.gnu.org>
1051
1052 PR fortran/84538
1053 * class.c (class_array_ref_detected): Remove the condition that
1054 there be no reference after the array reference.
1055 (find_intrinsic_vtab): Remove excess whitespace.
1056 * trans-array.c (gfc_conv_scalarized_array_ref): Rename 'tmp'
1057 as 'base and call build_class_array_ref earlier.
1058
1059 2018-02-28 Paul Thomas <pault@gcc.gnu.org>
1060
1061 PR fortran/83901
1062 * trans-stmt.c (trans_associate_var): Make sure that the se
1063 expression is a pointer type before converting it to the symbol
1064 backend_decl type.
1065
1066 2018-02-25 Steven G. Kargl <kargl@gcc.gnu.org>
1067
1068 PR fortran/83633
1069 * decl.c (variable_decl): Check that an explicit-shape-array with
1070 nonconstant bounds is allowed.
1071
1072 2018-02-25 Paul Thomas <pault@gcc.gnu.org>
1073
1074 PR fortran/84523
1075 * trans-intrinsic.c (gfc_conv_allocated): If the argument se
1076 has a pre block, add it to the expression pre block.
1077
1078 2018-02-25 Thomas Koenig <tkoenig@gcc.gnu.org>
1079
1080 PR fortran/78238
1081 * gfortran.h (gfc_integer_4_kind): Define.
1082 * resolve.c (resolve_select_type): Make sure that the
1083 kind of c->high is gfc_integer_4_kind.
1084
1085 2018-02-24 Steven G. Kargl <kargl@gcc.gnu.org>
1086
1087 PR fortran/30792
1088 * decl.c (gfc_match_data): Check for invalid substring in
1089 data-implied-do
1090
1091 2018-02-23 Steven G. Kargl <kargl@gcc.gnu.org>
1092
1093 * intrinsic.texi: Arguments to MATMUL cannot both be rank one.
1094
1095 2018-02-23 Steven G. Kargl <kargl@gcc.gnu.org>
1096
1097 PR fortran/84511
1098 * trans-io.c (transfer_expr): Deal with C_LOC in transfer statement.
1099
1100 2018-02-23 Steven G. Kargl <kargl@gcc.gnu.org>
1101
1102 PR fortran/84346
1103 * interface.c (compare_actual_formal): Issue error if keyword is
1104 used in a statement function.
1105
1106 2018-02-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1107
1108 PR fortran/84506
1109 * trans-io.c (set_parameter_value_inquire): Adjust range check of
1110 negative unit values for kind=8 units to the kind=4 negative limit.
1111
1112 2018-02-23 Paul Thomas <pault@gcc.gnu.org>
1113
1114 PR fortran/83149
1115 * trans-types.c (gfc_sym_type): Test sym->ns->proc_name before
1116 accessing its components.
1117
1118 2018-02-23 Paul Thomas <pault@gcc.gnu.org>
1119
1120 PR fortran/83149
1121 * trans-decl.c (gfc_finish_var_decl): Test sym->ns->proc_name
1122 before accessing its components.
1123
1124 2018-02-23 Paul Thomas <pault@gcc.gnu.org>
1125
1126 PR fortran/83148
1127 * trans-const.c : Clean up some whitespace issues.
1128 * trans-expr.c (gfc_conv_initializer): If an iso_c_binding
1129 derived type has a kind value of zero, set it to the default
1130 integer kind.
1131
1132 2018-02-23 Janne Blomqvist <jb@gcc.gnu.org>
1133
1134 PR fortran/84519
1135 * trans-decl.c (gfc_build_builtin_function_decls): Add bool
1136 argument to stop and error stop decls.
1137 * trans-stmt.c (gfc_trans_stop): Add false value to argument
1138 lists.
1139
1140 2018-02-22 Janne Blomqvist <jb@gcc.gnu.org>
1141
1142 PR 78534
1143 PR 84509
1144 * trans-decl.c (gfc_build_builtin_function_decls): Pass
1145 gfc_int8_type node to pause_numeric, size_type_node to
1146 pause_string.
1147 * trans-stmt.c (gfc_trans_pause): Likewise.
1148
1149 2018-02-22 Janne Blomqvist <jb@gcc.gnu.org>
1150
1151 * gfortran.texi: Update Coarray API description.
1152 * trans-decl.c (gfc_build_builtin_function_decls): Use size_t for
1153 character lengths, int for exit codes.
1154 (generate_coarray_sym_init): Use size_t for character length.
1155 * trans-intrinsic.c (conv_co_collective): Likewise.
1156 * trans-stmt.c (gfc_trans_lock_unlock): Likewise.
1157 (gfc_trans_event_post_wait): Likewise.
1158 (gfc_trans_sync): Likewise.
1159 (gfc_trans_stop): Use size_t for character lengths, int for exit
1160 codes.
1161
1162 2018-02-20 Thomas Koenig <tkoenig@gcc.gnu.org>
1163
1164 PR fortran/48890
1165 PR fortran/83823
1166 * primary.c (gfc_convert_to_structure_constructor):
1167 For a constant string constructor, make sure the length
1168 is correct.
1169
1170 2018-02-19 Paul Thomas <pault@gcc.gnu.org>
1171
1172 PR fortran/83344
1173 PR fortran/83975
1174 * resolve.c (resolve_assoc_var): Rearrange the logic for the
1175 determination of the character length of associate names. If
1176 the associate name is missing a length expression or the length
1177 expression is not a constant and the target is not a variable,
1178 make the associate name allocatable and deferred length.
1179 * trans-decl.c (gfc_get_symbol_decl): Null the character length
1180 backend_decl for deferred length associate names that are not
1181 variables. Set 'length' to gfc_index_zero_node for character
1182 associate names, whose character length is a PARM_DECL.
1183
1184 2018-02-19 Thomas Koenig <tkoenig@gcc.gnu.org>
1185
1186 PR fortran/35339
1187 * frontend-passes.c (traverse_io_block): Remove workaround for
1188 PR 80945.
1189
1190 2018-02-19 Andre Vehreschild <vehre@gcc.gnu.org>
1191
1192 * gfortran.texi: Document additional src/dst_type. Fix some typos.
1193 * trans-decl.c (gfc_build_builtin_function_decls): Declare the new
1194 argument of _caf_*_by_ref () with * e { get, send, sendget }.
1195 * trans-intrinsic.c (gfc_conv_intrinsic_caf_get): Add the type of the
1196 data referenced when generating a call to caf_get_by_ref ().
1197 (conv_caf_send): Same but for caf_send_by_ref () and
1198 caf_sendget_by_ref ().
1199
1200 2018-02-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1201
1202 PR fortran/84389
1203 * io.c (check_format): Allow FMT_COLON.
1204
1205 2018-02-18 Paul Thomas <pault@gcc.gnu.org>
1206
1207 PR fortran/80945
1208 * trans-array.c (gfc_conv_expr_descriptor): Set parmtype from
1209 the typenode in the case of deferred length characters.
1210
1211 2018-02-17 Thomas Koenig <tkoenig@gcc.gnu.org>
1212
1213 PR fortran/84270
1214 * frontend-passes (scalarized_expr): If the expression
1215 is an assumed size array, leave in the last reference
1216 and pass AR_SECTION instead of AR_FULL to gfc_resolve
1217 in order to avoid an error.
1218
1219 2018-02-17 Paul Thomas <pault@gcc.gnu.org>
1220
1221 PR fortran/84115
1222 * resolve.c (resolve_assoc_var): If a non-constant target expr.
1223 has no string length expression, make the associate variable
1224 into a deferred length, allocatable symbol.
1225 * trans-decl.c (gfc_is_reallocatable_lhs): Add and use a ptr to
1226 the symbol.
1227 * trans-stmt.c (trans_associate_var): Null and free scalar
1228 associate names that are allocatable. After assignment, remove
1229 the allocatable attribute to prevent reallocation.
1230
1231 2018-02-16 Jakub Jelinek <jakub@redhat.com>
1232
1233 PR fortran/84418
1234 * trans-openmp.c (gfc_trans_omp_clauses): For OMP_CLAUSE_LINEAR_REF
1235 kind set OMP_CLAUSE_LINEAR_STEP to TYPE_SIZE_UNIT times last_step.
1236
1237 2018-02-16 Dominique d'Humieres <dominiq@gcc.gnu.org>
1238
1239 PR fortran/84354
1240 * decl.c (gfc_get_pdt_instance): Replace '%qs' with %qs.
1241
1242 2018-02-15 Janus Weil <janus@gcc.gnu.org>
1243
1244 PR fortran/84409
1245 * interface.c (check_dtio_arg_TKR_intent): Add a check for character
1246 length.
1247
1248 2018-02-14 Janus Weil <janus@gcc.gnu.org>
1249
1250 PR fortran/84385
1251 * match.c (gfc_match_select_type): Fix check for selector in
1252 SELECT TYPE statement.
1253
1254 2018-02-13 Janus Weil <janus@gcc.gnu.org>
1255
1256 PR fortran/84313
1257 * symbol.c (check_conflict): Reject procedure pointers in common blocks.
1258
1259 2018-02-13 Alastair McKinstry <alastair.mckinstry@sceal.ie>
1260 Janne Blomqvist <jb@gcc.gnu.org>
1261
1262 * module.c (dump_module): Use lbasename to ensure that module
1263 files are reproducible.
1264
1265 2018-02-12 Janus Weil <janus@gcc.gnu.org>
1266
1267 PR fortran/84273
1268 * resolve.c (resolve_component): Fix checks of passed argument in
1269 procedure-pointer components.
1270
1271 2018-02-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1272
1273 PR fortran/35299
1274 * resolve.c (resolve_formal_arglist): Update error message.
1275
1276 2018-02-11 Andre Vehreschild <vehre@gcc.gnu.org>
1277
1278 * gfortran.texi: Fix typos in documentation of caf_register ().
1279 * trans-array.c (structure_alloc_comps): Only register a component of
1280 a derived typed corray, not of an ultimate component coarray.
1281
1282 2018-02-11 Steven G. Kargl <kargl@gcc.gnu.org>
1283
1284 PR fortran/54223
1285 PR fortran/84276
1286 * interface.c (compare_actual_formal): Add in_statement_function
1287 bool parameter. Skip check of INTENT attribute for statement
1288 functions. Arguments to a statement function cannot be optional,
1289 issue error for missing argument.
1290 (gfc_procedure_use, gfc_ppc_use, gfc_arglist_matches_symbol): Use
1291 in_statement_function.
1292
1293 2018-02-11 Paul Thomas <pault@gcc.gnu.org>
1294
1295 PR fortran/84074
1296 * trans-expr.c (gfc_conv_derived_to_class): Set the use_offset
1297 flag. If the is a vector subscript or the expression is not a
1298 variable, make the descriptor one-based.
1299
1300 2018-02-10 Paul Thomas <pault@gcc.gnu.org>
1301
1302 PR fortran/84141
1303 PR fortran/84155
1304 * trans-array.c (gfc_array_init_size): Revert the change made
1305 in revision 257356 setting the dtype.
1306 * trans-types.c (gfc_get_dtype): Do not use the cached dtype.
1307 Call gfc_get_dtype_rank_type every time.
1308
1309 PR fortran/56691
1310 * trans-array.c (gfc_conv_expr_descriptor): If the source array
1311 is a descriptor type, use its offset, removing the condition
1312 that is be a class expression.
1313
1314 2018-02-07 Steven G. Kargl <kargl@gcc.gnu.org>
1315
1316 PR fortran/82994
1317 * match.c (gfc_match_deallocate): Check for NULL pointer.
1318
1319 2018-02-07 Thomas Koenig <tkoenig@gcc.gnu.org>
1320
1321 PR fortran/68560
1322 * trans-intrinsic.c (gfc_conv_intrinsic_shape): New function.
1323 (gfc_conv_intrinsic_function): Call it.
1324
1325 2018-02-07 Steven G. Kargl <kargl@gcc.gnu.org>
1326
1327 PR fortran/82049
1328 * match.c (gfc_match_type_spec): If the charlen is non-NULL, then
1329 try to resolve it. While here return early if possible.
1330
1331 2018-02-04 Paul Thomas <pault@gcc.gnu.org>
1332
1333 PR fortran/84115
1334 * trans-decl.c (gfc_get_symbol_decl): Do not finish the decl of
1335 'length' if the symbol charlen backend_decl is an indirect ref.
1336
1337 2018-02-03 Paul Thomas <pault@gcc.gnu.org>
1338
1339 PR fortran/84141
1340 PR fortran/84155
1341 * trans-array.c (gfc_array_init_size): Instead of gfc_get_dtype
1342 use gfc_get_dtype_rank_type.
1343
1344 2018-02-01 Janne Blomqvist <jb@gcc.gnu.org>
1345
1346 PR 83975
1347 PR 83344
1348 * resolve.c (resolve_assoc_var): Generate an error if
1349 target length unknown.
1350
1351 2018-02-01 Janne Blomqvist <jb@gcc.gnu.org>
1352
1353 PR fortran/83705
1354 * simplify.c (gfc_simplify_repeat): Increase limit for deferring
1355 to runtime, print a warning message.
1356
1357 2018-01-31 Jakub Jelinek <jakub@redhat.com>
1358
1359 PR fortran/84116
1360 * openmp.c (gfc_match_omp_clauses): If all the linear
1361 gfc_match_omp_variable_list calls failed, don't gfc_free_omp_namelist
1362 nor set *head = NULL. Formatting fixes.
1363
1364 2018-01-31 Paul Thomas <pault@gcc.gnu.org>
1365
1366 PR fortran/84088
1367 * trans-expr.c (gfc_conv_procedure_call): If the parm expr is
1368 an address expression passed to an assumed rank dummy, convert
1369 to an indirect reference.
1370
1371 2018-01-31 Thomas Koenig <tkoenig@gcc.gnu.org>
1372
1373 * dump-parse-tree.c (write_proc): Use sym_name (which may
1374 be sym->binding_label) instead of sym->name.
1375
1376 2018-01-31 Janne Blomqvist <jb@gcc.gnu.org>
1377
1378 * trans-const.c (gfc_conv_string_init): Use gfc_charlen_t instead
1379 of int for slen.
1380
1381 2018-01-31 Janne Blomqvist <jb@gcc.gnu.org>
1382
1383 PR fortran/78534
1384 * trans-expr.c (fill_with_spaces): Use memset instead of
1385 generating loop.
1386 (gfc_trans_string_copy): Improve opportunity to use builtins with
1387 constant lengths.
1388
1389 2018-01-30 Jakub Jelinek <jakub@redhat.com>
1390
1391 PR debug/84131
1392 * trans-array.c (gfc_get_descriptor_offsets_for_info): Set *data_off
1393 to DATA_FIELD's offset rather than OFFSET_FIELD's offset.
1394
1395 2018-01-30 Thomas Koenig <tkoenig@gcc.gnu.org>
1396
1397 PR fortran/84134
1398 * array.c (gfc_ref_dimen_size): Whitespace fixes. If stride is
1399 zero, return false.
1400
1401 2018-01-30 Thomas Koenig <tkoenig@gcc.gnu.org>
1402
1403 PR fortran/84133
1404 * frontend-passes (matmul_to_var_expr): Return early if
1405 in association list.
1406 (inline_matmul_assign): Likewise.
1407
1408 2017-01-29 Thomas Koenig <tkoenig@gcc.gnu.org>
1409
1410 PR fortran/84073
1411 * resolve.c (resolve_component): Ensure BIND(C) character
1412 components have length one.
1413 (resolve_symbol): Likewise for variables.
1414
1415 2018-01-27 Jakub Jelinek <jakub@redhat.com>
1416
1417 PR fortran/84065
1418 * decl.c (add_init_expr_to_sym): Ignore initializers for too large
1419 lengths.
1420
1421 2018-01-26 Damian Rouson <damian@sourceryinstitute.org>
1422 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
1423 Soren Rasmussen <s.c.rasmussen@gmail.com>
1424
1425 Partial support for Fortran 2018 teams features.
1426
1427 * array.c (gfc_match_array_ref): add team attribute in coarray
1428 transfers.
1429 * check.c (gfc_check_get_team, gfc_check_team_number): add new
1430 functions for get_team and team_number.
1431 * dump-parse-tree.c (show_code_node): add new statements: form team,
1432 change team, end team, and sync team.
1433 * expr.c (gfc_find_team_co): add new function.
1434 * gfortran.h: add new statements.
1435 * intrinsic.c (add_functions): add get_team and team_number functions.
1436 * intrinsic.h: add get_team and team_number prototypes for check,
1437 simplify, and resolve.
1438 * iresolve.c (gfc_resolve_get_team, gfc_resolve_team_number): add new
1439 functions.
1440 * iso-fortran-env.def: add the team_type derived type.
1441 * match.c (gfc_match_if, gfc_match_form_team, gfc_match_team_number)
1442 (gfc_match_end_team, gfc_match_sync_team, gfc_match_change_team):
1443 add change team, end team, form team, sync team match and functions.
1444 * match.h: add new prototypes for change team, end team, form team,
1445 and sync team.
1446 * parse.c (decode_statement): add cases for change team, end team,
1447 form team, and sync team.
1448 * resolve.c: add cases for exec form team, change team, end team, and
1449 sync team.
1450 * simplify.c (gfc_simplify_get_team): add new function for get team.
1451 * st.c (gfc_free_statement): add cases exec for change team, end team,
1452 form team, sync team.
1453 * trans-decl.c (gfor_fndecl_caf_form_team)
1454 (gfor_fndecl_caf_change_team, gfor_fndecl_caf_end_team)
1455 (gfor_fndecl_caf_sync_team, gfor_fndecl_caf_get_team)
1456 (gfor_fndecl_caf_team_number): add functions and definitions.
1457 * trans-intrinsic.c (conv_caf_send, conv_intrinsic_team_number): add
1458 new function and team_type argument support.
1459 * trans-stmt.c (gfc_trans_form_team, gfc_trans_change_team)
1460 (gfc_trans_end_team, gfc_trans_sync_team): add new functions.
1461 * trans-stmt.h: add new prototypes.
1462 * trans-types.c (gfc_get_derived_type): check condition for team_type.
1463 * trans.c (trans_code): new exec cases for form team, change team, end
1464 team, and sync team.
1465 * trans.h: add new prototypes.
1466
1467 2018-01-26 Steven G. Kargl <kargl@gcc.gnu.org>
1468
1469 PR fortran/83998
1470 * simplify.c (compute_dot_product): Initialize result to INTEGER(1) 0
1471 or .false. The summation does the correct type conversion.
1472 (gfc_simplify_dot_product): Special case zero-sized arrays.
1473
1474 2018-25-01 Paul Thomas <pault@gcc.gnu.org>
1475
1476 PR fortran/37577
1477 * array.c (gfc_match_array_ref): If standard earlier than F2008
1478 it is an error if the reference dimension is greater than 7.
1479 libgfortran.h : Increase GFC_MAX_DIMENSIONS to 15. Change the
1480 dtype masks and shifts accordingly.
1481 * trans-array.c (gfc_conv_descriptor_dtype): Use the dtype
1482 type node to check the field.
1483 (gfc_conv_descriptor_dtype): Access the rank field of dtype.
1484 (duplicate_allocatable_coarray): Access the rank field of the
1485 dtype descriptor rather than the dtype itself.
1486 * trans-expr.c (get_scalar_to_descriptor_type): Store the type
1487 of 'scalar' on entry and use its TREE_TYPE if it is ARRAY_TYPE
1488 (ie. a character).
1489 (gfc_conv_procedure_call): Pass TREE_OPERAND (tmp,0) to
1490 get_scalar_to_descriptor_type if the actual expression is a
1491 constant.
1492 (gfc_trans_structure_assign): Assign the rank directly to the
1493 dtype rank field.
1494 * trans-intrinsic.c (gfc_conv_intrinsic_rank): Cast the result
1495 to default integer kind.
1496 (gfc_conv_intrinsic_sizeof): Obtain the element size from the
1497 'elem_len' field of the dtype.
1498 * trans-io.c (gfc_build_io_library_fndecls): Replace
1499 gfc_int4_type_node with dtype_type_node where necessary.
1500 (transfer_namelist_element): Use gfc_get_dtype_rank_type for
1501 scalars.
1502 * trans-types.c : Provide 'get_dtype_type_node' to acces the
1503 dtype_type_node and, if necessary, build it.
1504 The maximum size of an array element is now determined by the
1505 maximum value of size_t.
1506 Update the description of the array descriptor, including the
1507 type def for the dtype_type.
1508 (gfc_get_dtype_rank_type): Build a constructor for the dtype.
1509 Distinguish RECORD_TYPEs that are BT_DERIVED or BT_CLASS.
1510 (gfc_get_array_descriptor_base): Change the type of the dtype
1511 field to dtype_type_node.
1512 (gfc_get_array_descr_info): Get the offset to the rank field of
1513 the dtype.
1514 * trans-types.h : Add a prototype for 'get_dtype_type_node ()'.
1515 * trans.h : Define the indices of the dtype fields.
1516
1517 2018-23-01 Paul Thomas <pault@gcc.gnu.org>
1518
1519 PR fortran/83866
1520 * decl.c (gfc_match_derived_decl): If eos not matched, recover
1521 and emit error about garbage after declaration.
1522
1523 2018-23-01 Paul Thomas <pault@gcc.gnu.org>
1524
1525 PR fortran/83898
1526 * trans-stmt.c (trans_associate_var): Do not set cst_array_ctor
1527 for characters.
1528
1529 2018-01-22 Janne Blomqvist <jb@gcc.gnu.org>
1530
1531 PR 78534
1532 PR 83704
1533 * arith.c (gfc_arith_concat): Use size_t for string length.
1534 (gfc_compare_string): Likewise.
1535 (gfc_compare_with_Cstring): Likewise.
1536 * array.c (gfc_resolve_character_array_constructor): Use
1537 HOST_WIDE_INT, gfc_mpz_get_hwi.
1538 * check.c (gfc_check_fe_runtime_error): Use size_t.
1539 * data.c (create_character_initializer): Use HOST_WIDE_INT,
1540 gfc_extract_hwi.
1541 * decl.c (gfc_set_constant_character_len): Use gfc_charlen_t.
1542 (add_init_expr_to_sym): Use HOST_WIDE_INT.
1543 * expr.c (gfc_build_init_expr): Use HOST_WIDE_INT,
1544 gfc_extract_hwi.
1545 (gfc_apply_init): Likewise.
1546 * match.h (gfc_set_constant_character_len): Update prototype.
1547 * primary.c (match_string_constant): Use size_t.
1548 * resolve.c (resolve_ordinary_assign): Use HOST_WIDE_INT,
1549 gfc_mpz_get_hwi.
1550 * simplify.c (init_result_expr): Likewise.
1551 (gfc_simplify_len_trim): Use size_t.
1552 * target-memory.c (gfc_encode_character): Use size_t.
1553 (gfc_target_encode_expr): Use HOST_WIDE_INT, gfc_mpz_get_hwi.
1554 (interpret_array): Use size_t.
1555 (gfc_interpret_character): Likewise.
1556 * target-memory.h (gfc_encode_character): Update prototype.
1557 (gfc_interpret_character): Likewise.
1558 (gfc_target_interpret_expr): Likewise.
1559 * trans-const.c (gfc_build_string_const): Use size_t for length
1560 argument.
1561 (gfc_build_wide_string_const): Likewise.
1562 * trans-const.h (gfc_build_string_const): Likewise.
1563 (gfc_build_wide_string_const): Likewise.
1564
1565 2018-01-20 Steven G. Kargl <kargl@gcc.gnu.org>
1566
1567 PR fortran/83900
1568 * simplify.c (gfc_simplify_matmul): Set return type correctly.
1569
1570 2018-01-19 Steven G. Kargl <kargl@gcc.gnu.org>
1571
1572 PR fortran/83900
1573 * simplify.c (gfc_simplify_matmul): Delete bogus assertion.
1574
1575 2018-01-17 Harald Anlauf <anlauf@gmx.de>
1576
1577 PR fortran/83864
1578 * expr.c (add_init_expr_to_sym): Do not dereference NULL pointer.
1579
1580 2018-01-17 Harald Anlauf <anlauf@gmx.de>
1581
1582 PR fortran/83874
1583 * decl.c (add_init_expr_to_sym): Do not dereference NULL pointer.
1584
1585 2018-01-15 Louis Krupp <louis.krupp@zoho.com>
1586
1587 PR fortran/82257
1588 * interface.c (compare_rank): Don't try to retrieve CLASS_DATA
1589 from symbol marked unlimited polymorphic.
1590 * resolve.c (resolve_structure_cons): Likewise.
1591 * misc.c (gfc_typename): Don't dereference derived->components
1592 if it's NULL.
1593
1594 2018-01-15 Thomas Koenig <tkoenig@gcc.gnu.org>
1595
1596 PR fortran/54613
1597 * gfortran.h (gfc_check_f): Rename f4ml to f5ml.
1598 (gfc_logical_4_kind): New macro
1599 * intrinsic.h (gfc_simplify_minloc): Add a gfc_expr *argument.
1600 (gfc_simplify_maxloc): Likewise.
1601 (gfc_resolve_maxloc): Likewise.
1602 (gfc_resolve_minloc): Likewise.
1603 * check.c (gfc_check_minloc_maxloc): Add checking for "back"
1604 argument; also raise error if it is used (for now). Add it
1605 if it isn't present.
1606 * intrinsic.c (add_sym_4ml): Rename to
1607 (add_sym_5ml), adjust for extra argument.
1608 (add_functions): Add "back" constant. Adjust maxloc and minloc
1609 for back argument.
1610 * iresolve.c (gfc_resolve_maxloc): Add back argument. If back is
1611 not of gfc_logical_4_kind, convert.
1612 (gfc_resolve_minloc): Likewise.
1613 * simplify.c (gfc_simplify_minloc): Add back argument.
1614 (gfc_simplify_maxloc): Likewise.
1615 * trans-intinsic.c (gfc_conv_intrinsic_minmaxloc): Rename last
1616 argument to %VAL to ensure passing by value.
1617 (gfc_conv_intrinsic_function): Call gfc_conv_intrinsic_minmaxloc
1618 also for library calls.
1619
1620 2018-01-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1621
1622 PR fortran/82007
1623 * resolve.c (resolve_transfer): Delete code looking for 'DT'
1624 format specifiers in format strings. Set formatted to true if a
1625 format string or format label is present.
1626 * trans-io.c (get_dtio_proc): Likewise. (transfer_expr): Fix
1627 whitespace.
1628
1629 2018-01-13 Thomas Koenig <tkoenig@gcc.gnu.org>
1630
1631 PR fortran/83744
1632 * dump-parse-tree.c (get_c_type_name): Remove extra line.
1633 Change for loop to use declaration in for loop. Handle BT_LOGICAL
1634 and BT_CHARACTER.
1635 (write_decl): Add where argument. Fix indentation. Replace
1636 assert with error message. Add typename to warning
1637 in comment.
1638 (write_type): Adjust locus to call of write_decl.
1639 (write_variable): Likewise.
1640 (write_proc): Likewise. Replace assert with error message.
1641
1642 2018-01-13 Paul Thomas <pault@gcc.gnu.org>
1643
1644 PR fortran/52162
1645 * trans-expr.c (gfc_trans_scalar_assign): Flag is_alloc_lhs if
1646 the rhs expression is neither an elemental nor a conversion
1647 function.
1648
1649 PR fortran/83622
1650 * trans-array.c (is_pointer_array): Remove unconditional return
1651 of false for -fopenmp.
1652
1653 2018-01-13 Thomas Koenig <tkoenig@gcc.gnu.org>
1654 <emsr@gcc.gnu.org>
1655
1656 PR fortran/83803
1657 * dump-parse-tree.c (write_proc): Always emit closing parenthesis
1658 for functions.
1659
1660 2018-01-10 Steven G. Kargl <kargl@gcc.gnu.org>
1661
1662 PR fortran/82367
1663 * resolve.c (resolve_allocate_expr): Check for NULL pointer.
1664
1665 2018-01-10 Steven G. Kargl <kargl@gcc.gnu.org>
1666
1667 PR fortran/83093
1668 * resolve.c (resolve_charlen): Check the type of cl->length
1669 after resolution.
1670
1671 2018-01-10 Janne Blomqvist <jb@gcc.gnu.org>
1672
1673 PR fortran/83740
1674 * trans-array.c (gfc_trans_array_ctor_element): Fix formatting.
1675
1676 2018-01-10 Janne Blomqvist <jb@gcc.gnu.org>
1677
1678 PR fortran/83740
1679 * trans-array.c (gfc_trans_array_ctor_element): Convert RHS to the
1680 LHS type when assigning.
1681
1682 2018-01-09 Steven G. Kargl <kargl@gcc.gnu.org>
1683
1684 PR fortran/83742
1685 * expr.c (gfc_is_simply_contiguous): Check for NULL pointer.
1686
1687 2018-01-08 Steven G. Kargl <kargl@gcc.gnu.org>
1688
1689 * match.c (gfc_match_allocate): Check for NULL pointer.
1690
1691 2018-01-08 Steven G. Kargl <kargl@gcc.gnu.org>
1692
1693 * expr.c (gfc_check_pointer_assign): Fix typo in comment.
1694
1695 2018-01-08 Paul Thomas <pault@gcc.gnu.org>
1696
1697 PR fortran/83611
1698 * decl.c (gfc_get_pdt_instance): If parameterized arrays have
1699 an initializer, convert the kind parameters and add to the
1700 component if the instance.
1701 * trans-array.c (structure_alloc_comps): Add 'is_pdt_type' and
1702 use it with case COPY_ALLOC_COMP. Call 'duplicate_allocatable'
1703 for parameterized arrays. Clean up typos in comments. Convert
1704 parameterized array initializers and copy into the array.
1705 * trans-expr.c (gfc_trans_scalar_assign): Do a deep copy for
1706 parameterized types.
1707 *trans-stmt.c (trans_associate_var): Deallocate associate vars
1708 as necessary, when they are PDT function results for example.
1709
1710 PR fortran/83731
1711 * trans-array.c (structure_alloc_comps): Only compare len parms
1712 when they are declared explicitly.
1713
1714 2018-01-06 Janne Blomqvist <jb@gcc.gnu.org>
1715
1716 PR fortran/50892
1717 * trans-expr.c (gfc_trans_pointer_assignment): fold_convert rhs to
1718 lhs type.
1719
1720 2018-01-05 Janne Blomqvist <jb@gcc.gnu.org>
1721
1722 PR fortran/78534
1723 PR fortran/66310
1724 * array.c (got_charlen): Use gfc_charlen_int_kind.
1725 * class.c (gfc_find_derived_vtab): Use gfc_size_kind instead of
1726 hardcoded kind.
1727 (find_intrinsic_vtab): Likewise.
1728 * decl.c (match_char_length): Use gfc_charlen_int_kind.
1729 (add_init_expr_to_sym): Use gfc_charlen_t and gfc_charlen_int_kind.
1730 (gfc_match_implicit): Use gfc_charlen_int_kind.
1731 * dump-parse-tree.c (show_char_const): Use gfc_charlen_t and size_t.
1732 (show_expr): Use HOST_WIDE_INT_PRINT_DEC.
1733 * expr.c (gfc_get_character_expr): Length parameter of type
1734 gfc_charlen_t.
1735 (gfc_get_int_expr): Value argument of type HOST_WIDE_INT.
1736 (gfc_extract_hwi): New function.
1737 (simplify_const_ref): Make string_len of type gfc_charlen_t.
1738 (gfc_simplify_expr): Use HOST_WIDE_INT for substring refs.
1739 * frontend-passes.c (optimize_trim): Use gfc_charlen_int_kind.
1740 * gfortran.h (gfc_mpz_get_hwi): New prototype.
1741 (gfc_mpz_set_hwi): Likewise.
1742 (gfc_charlen_t): New typedef.
1743 (gfc_expr): Use gfc_charlen_t for character lengths.
1744 (gfc_size_kind): New extern variable.
1745 (gfc_extract_hwi): New prototype.
1746 (gfc_get_character_expr): Use gfc_charlen_t for character length.
1747 (gfc_get_int_expr): Use HOST_WIDE_INT type for value argument.
1748 * gfortran.texi: Update description of hidden string length argument.
1749 * iresolve.c (check_charlen_present): Use gfc_charlen_int_kind.
1750 (gfc_resolve_char_achar): Likewise.
1751 (gfc_resolve_repeat): Pass string length directly without
1752 temporary, use gfc_charlen_int_kind.
1753 (gfc_resolve_transfer): Use gfc_charlen_int_kind.
1754 * match.c (select_intrinsic_set_tmp): Use HOST_WIDE_INT for charlen.
1755 * misc.c (gfc_mpz_get_hwi): New function.
1756 (gfc_mpz_set_hwi): New function.
1757 * module.c (atom_int): Change type from int to HOST_WIDE_INT.
1758 (parse_integer): Don't complain about large integers.
1759 (write_atom): Use HOST_WIDE_INT for integers.
1760 (mio_integer): Handle integer type mismatch.
1761 (mio_hwi): New function.
1762 (mio_intrinsic_op): Use HOST_WIDE_INT.
1763 (mio_array_ref): Likewise.
1764 (mio_expr): Likewise.
1765 * primary.c (match_substring): Use gfc_charlen_int_kind.
1766 * resolve.c (resolve_substring_charlen): Use gfc_charlen_int_kind.
1767 (resolve_character_operator): Likewise.
1768 (resolve_assoc_var): Likewise.
1769 (resolve_select_type): Use HOST_WIDE_INT for charlen, use snprintf.
1770 (resolve_charlen): Use mpz_sgn to determine sign.
1771 * simplify.c (gfc_simplify_repeat): Use HOST_WIDE_INT/gfc_charlen_t
1772 instead of long.
1773 * symbol.c (generate_isocbinding_symbol): Use gfc_charlen_int_kind.
1774 * target-memory.c (size_character): Length argument of type
1775 gfc_charlen_t.
1776 (gfc_encode_character): Likewise.
1777 (gfc_interpret_character): Use gfc_charlen_t.
1778 * target-memory.h (gfc_encode_character): Modify prototype.
1779 * trans-array.c (gfc_trans_array_ctor_element): Use existing type.
1780 (get_array_ctor_var_strlen): Use gfc_conv_mpz_to_tree_type.
1781 (trans_array_constructor): Use existing type.
1782 (get_array_charlen): Likewise.
1783 * trans-const.c (gfc_conv_mpz_to_tree_type): New function.
1784 * trans-const.h (gfc_conv_mpz_to_tree_type): New prototype.
1785 * trans-decl.c (gfc_trans_deferred_vars): Use existing type.
1786 (add_argument_checking): Likewise.
1787 * trans-expr.c (gfc_class_len_or_zero_get): Build const of type
1788 gfc_charlen_type_node.
1789 (gfc_conv_intrinsic_to_class): Use gfc_charlen_int_kind instead of
1790 4, fold_convert to correct type.
1791 (gfc_conv_class_to_class): Build const of type size_type_node for
1792 size.
1793 (gfc_copy_class_to_class): Likewise.
1794 (gfc_conv_string_length): Use same type in expression.
1795 (gfc_conv_substring): Likewise, use HOST_WIDE_INT for charlen.
1796 (gfc_conv_string_tmp): Make sure len is of the right type.
1797 (gfc_conv_concat_op): Use same type in expression.
1798 (gfc_conv_procedure_call): Likewise.
1799 (fill_with_spaces): Comment out memset() block due to spurious
1800 -Wstringop-overflow warnings.
1801 (gfc_trans_string_copy): Use gfc_charlen_type_node.
1802 (alloc_scalar_allocatable_for_subcomponent_assignment):
1803 fold_convert to right type.
1804 (gfc_trans_subcomponent_assign): Likewise.
1805 (trans_class_vptr_len_assignment): Build const of correct type.
1806 (gfc_trans_pointer_assignment): Likewise.
1807 (alloc_scalar_allocatable_for_assignment): fold_convert to right
1808 type in expr.
1809 (trans_class_assignment): Build const of correct type.
1810 * trans-intrinsic.c (gfc_conv_associated): Likewise.
1811 (gfc_conv_intrinsic_repeat): Do calculation in sizetype.
1812 * trans-io.c (gfc_build_io_library_fndecls): Use
1813 gfc_charlen_type_node for character lengths.
1814 (set_string): Convert to right type in assignment.
1815 * trans-stmt.c (gfc_trans_label_assign): Build const of
1816 gfc_charlen_type_node.
1817 (trans_associate_var): Likewise.
1818 (gfc_trans_character_select): Likewise.
1819 (gfc_trans_allocate): Likewise, don't typecast strlen result.
1820 (gfc_trans_deallocate): Don't typecast strlen result.
1821 * trans-types.c (gfc_size_kind): New variable.
1822 (gfc_init_types): Determine gfc_charlen_int_kind and gfc_size_kind
1823 from size_type_node.
1824 * trans-types.h: Fix comment.
1825
1826 2018-01-04 Thomas Koenig <tkoenig@gcc.gnu.org>
1827
1828 PR fortran/83683
1829 PR fortran/45689
1830 * check.c (gfc_check_eoshift): Check for string length and
1831 for conformance of boundary.
1832 * intrinsic.c (add_functions): Add gfc_simplify_eoshift.
1833 * intrinsic.h: Add prototype for gfc_simplify_eoshift.
1834 * simplify.c (gfc_simplify_eoshift): New function.
1835
1836 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1837 Alan Hayward <alan.hayward@arm.com>
1838 David Sherwood <david.sherwood@arm.com>
1839
1840 * trans-types.c (gfc_type_for_mode): Handle MODE_VECTOR_BOOL.
1841
1842 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1843 Alan Hayward <alan.hayward@arm.com>
1844 David Sherwood <david.sherwood@arm.com>
1845
1846 * trans-types.c (gfc_type_for_mode): Check valid_vector_subparts_p.
1847
1848 2018-01-03 Thomas Koenig <tkoenig@gcc.gnu.org>
1849
1850 PR fortran/83664
1851 * check.c (gfc_check_eoshift): Error for missing boundary if array
1852 is not one of the standard types.
1853
1854 2018-01-03 Jakub Jelinek <jakub@redhat.com>
1855
1856 Update copyright years.
1857
1858 * gfortranspec.c (lang_specific_driver): Update copyright notice
1859 dates.
1860 * gfc-internals.texi: Bump @copying's copyright year.
1861 * gfortran.texi: Ditto.
1862 * intrinsic.texi: Ditto.
1863 * invoke.texi: Ditto.
1864
1865 2017-01-02 Thomas Koenig <tkoenig@gcc.gnu.org>
1866
1867 PR fortran/45689
1868 * intrinsic.c (add_function): Add gfc_simplify_maxloc and
1869 gfc_simplify_minloc to maxloc and minloc, respectively.
1870 * intrinsic.h: Add prototypes for gfc_simplify_minloc
1871 and gfc_simplify_maxloc.
1872 * simplify.c (min_max_chose): Adjust prototype. Modify function
1873 to have a return value which indicates if the extremum was found.
1874 (is_constant_array_expr): Fix typo in comment.
1875 (simplify_minmaxloc_to_scalar): New function.
1876 (simplify_minmaxloc_nodim): New function.
1877 (new_array): New function.
1878 (simplify_minmaxloc_to_array): New function.
1879 (gfc_simplify_minmaxloc): New function.
1880 (simplify_minloc): New function.
1881 (simplify_maxloc): New function.
1882
1883 2018-01-02 Thomas Koenig <tkoenig@gcc.gnu.org>
1884
1885 PR fortran/45689
1886 PR fortran/83650
1887 * simplify.c (gfc_simplify_cshift): Re-implement to allow full
1888 range of arguments.
1889
1890 2018-01-01 Paul Thomas <pault@gcc.gnu.org>
1891
1892 PR fortran/83076
1893 * resolve.c (resolve_fl_derived0): Add caf_token fields for
1894 allocatable and pointer scalars, when -fcoarray selected.
1895 * trans-types.c (gfc_copy_dt_decls_ifequal): Copy the token
1896 field as well as the backend_decl.
1897 (gfc_get_derived_type): Flag GFC_FCOARRAY_LIB for module
1898 derived types that are not vtypes. Components with caf_token
1899 attribute are pvoid types. For a component requiring it, find
1900 the caf_token field and have the component token field point to
1901 its backend_decl.
1902
1903 PR fortran/83319
1904 *trans-types.c (gfc_get_array_descriptor_base): Add the token
1905 field to the descriptor even when codimen not set.
1906 \f
1907 Copyright (C) 2018 Free Software Foundation, Inc.
1908
1909 Copying and distribution of this file, with or without modification,
1910 are permitted in any medium without royalty provided the copyright
1911 notice and this notice are preserved.