]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/fortran/ChangeLog
expr.c (external_spec_function): Add ieee_support_subnormal to list of IEEE inquiry...
[thirdparty/gcc.git] / gcc / fortran / ChangeLog
1 2018-12-29 Steven G. Kargl <kargl@gcc.gnu.org>
2
3 * expr.c (external_spec_function): Add ieee_support_subnormal to list
4 of IEEE inquiry functions.
5
6 2018-12-29 Steven G. Kargl <kargl@gcc.gnu.org>
7
8 * cpp.c (gfc_cpp_init): Add pre-defined macros for INTEGER(1)
9 INTEGER(2), INTEGER(8) and INTEGER(16) if supported. Add pre-defined
10 macros for REAL(10) and REAL(16) if available.
11 * gfortran.texi: Document new macros.
12
13 2018-12-27 Steven G. Kargl <kargl@gcc.gnu.org>
14
15 PR fortran/81027
16 * expr.c (gfc_check_init_expr): Distinguish assumed-shape versus
17 deferred-shape dummy arguments in an error message.
18
19 2018-12-26 Harald Anlauf <anlauf@gmx.de>
20
21 PR fortran/85407
22 * module.c (read_module): Convert assert to fatal error to give a
23 sensible error message.
24
25 2018-12-24 Steven G. Kargl <kargl@gcc.gnu.org>
26
27 PR fortran/45513
28 PR fortran/81509
29 * check.c: Rename function gfc_check_iand to gfc_check_iand_ieor_ior.
30 * check.c (boz_args_check): New function. Check I and J not both BOZ.
31 (gfc_check_dshift,gfc_check_iand_ieor_ior, gfc_check_ishft,
32 gfc_check_and, gfc_check_merge_bits): Use it.
33 * check.c (gfc_check_iand_ieor_ior): Force conversion of BOZ to kind
34 type of other agrument. Remove silly GNU extension.
35 (gfc_check_ieor, gfc_check_ior): Delete now unused functions.
36 * intrinsic.c (add_functions): Use gfc_check_iand_ieor_ior. Wrap long
37 line.
38 * intrinsic.h: Rename gfc_check_iand to gfc_check_iand_ieor_ior.
39 Delete prototype for bool gfc_check_ieor and gfc_check_ior
40 * intrinsic.texi: Update documentation for boz-literal-constant.
41
42 2018-12-23 Paul Thomas <pault@gcc.gnu.org>
43
44 PR fortran/77703
45 * resolve.c (get_temp_from_expr): Use the string length of
46 constant character expressions.
47
48 2018-12-22 Steven G. Kargl <kargl@gcc.gnu.org>
49
50 PR fortran/88328
51 * io.c (resolve_tag_format): Add error for zero-sized array.
52 (gfc_resolve_dt): Manipulate gfc_current_locus to get sensible error
53 message locus.
54
55 2018-12-22 Steven G . Kargl <kargl@gcc.gnu.org>
56
57 PR fortran/85798
58 * decl.c (gfc_match_data): If a component of a derived type entity
59 appears in data statement, check that does not have the allocatable
60 attribute.
61
62 2018-12-22 Steven G. Kargl <kargl@gcc.gnu.org>
63
64 PR fortran/88169
65 * module.c (mio_namelist): Remove an error condition/message that
66 is contrary to the Fortran standard.
67
68 2018-12-22 Thomas Koenig <tkoenig@gcc.gnu.org>
69
70 PR fortran/85544
71 * frontend-passes.c (optimize_power): Remove.
72 (optimize_op): Remove call to optimize_power.
73 * trans-expr.c (gfc_conv_power_op): Handle cases of 1**integer,
74 (2|4|8|16) ** integer and (-1) ** integer.
75
76 2018-12-21 Paul Thomas <pault@gcc.gnu.org>
77
78 PR fortran/87881
79 * expr.c (find_inquiry_ref): Loop through the inquiry refs in
80 case there are two of them.
81 (simplify_ref_chain): Return true after a successful call to
82 find_inquiry_ref.
83
84 2018-12-19 Steven G. Kargl <kargl@gcc.gnu.org>
85
86 PR fortran/87992
87 * resolve.c (resolve_fl_variable): Avoid a NULL pointer.
88
89 2018-12-16 Steven G. Kargl <kargl@gcc.gnu.org>
90
91 * resolve.c (resolve_transfer): Remove dead code.
92
93 2018-12-16 Steven G. Kargl <kargl@gcc.gnu.org>
94
95 PR fortran/88116
96 PR fortran/88467
97 * array.c (gfc_match_array_constructor): Check return value of
98 gfc_convert_type(). Skip constructor elements with BT_UNKNOWN,
99 which need to go through resolution.
100 * intrinsic.c (gfc_convert_type_warn): Return early if the types
101 match (i.e., no conversion is required).
102 * simplify.c (gfc_convert_constant): Remove a gfc_internal_error,
103 and return gfc_bad_expr.
104
105 2018-12-16 Steven G. Kargl <kargl@gcc.gnu.org>
106
107 * decl.c (variable_decl): Typo fixes in comment and error messsage.
108
109 2018-12-16 Thomas Koenig <tkoenig@gcc.gnu.org>
110
111 PF fortran/88364
112 * trans-expr.c (gfc_conv_expr_reference): Do not add clobber if
113 the expression contains a reference.
114
115 2018-12-15 Steven G. Kargl <kargl@gcc.gnu.org>
116
117 PR fortran/87944
118 * decl.c (match_data_constant): Allow inquiry parameter as data
119 constant in data statement.
120
121 2018-12-15 Steven G. Kargl <kargl@gcc.gnu.org>
122
123 PR fortran/88138
124 * decl.c (variable_decl): Check that a derived isn't being assigned
125 an incompatible entity in an initialization.
126
127 2018-12-12 Jakub Jelinek <jakub@redhat.com>
128
129 PR fortran/88463
130 * trans-openmp.c (gfc_omp_predetermined_sharing): Handle TREE_READONLY
131 VAR_DECLs with DECL_EXTERNAL like those with TREE_STATIC.
132
133 2018-12-11 Steven G. Kargl <kargl@gcc.gnu.org>
134
135 PR fortran/88155
136 * primary.c (gfc_match_structure_constructor): Set the locus of
137 an expression to avoid a NULL pointer dereference.
138
139 2018-12-11 Steven G. Kargl <kargl@gcc.gnu.org>
140
141 PR fortran/88249
142 * gfortran.h: Update prototype for gfc_resolve_filepos().
143 * io.c (gfc_resolve_filepos): Check for UNIT number if ERR= is present.
144 Use passed in locus for error message.
145 * resolve.c (gfc_resolve_code): Pass locus in gfc_resolve_filepos()
146 call.
147
148 2018-12-10 Steven G. Kargl <kargl@gcc.gnu.org>
149
150 PR fortran/97922
151 * io.c (gfc_match_open): Additional checks on ASYNCHRONOUS.
152
153 2018-12-10 Steven G. Kargl <kargl@gcc.gnu.org>
154
155 PR fortran/88269
156 * io.c (io_constraint): Update macro. If locus line buffer is NULL,
157 use gfc_current_locus in error messages.
158 (check_io_constraints): Catch missing IO UNIT in write and read
159 statements. io_constraint macro is incompatible here.
160
161 2018-12-09 Steven G. Kargl <kargl@gcc.gnu.org>
162
163 PR fortran/88205
164 * io.c (gfc_match_open): Move NEWUNIT checks to after STATUS checks.
165
166 2018-12-09 Steven G. Kargl <kargl@gcc.gnu.org>
167
168 PR fortran/88206
169 * match.c (gfc_match_type_spec): REAL can be an intrinsic function.
170
171 2018-12-09 Fritz Reese <fritzoreese@gmail.com>
172
173 PR fortran/88228
174 * resolve.c (resolve_operator): Do not call resolve_function.
175 Break like other cases.
176
177 2018-12-09 Cesar Philippidis <cesar@codesourcery.com>
178
179 * trans-openmp.c (gfc_trans_oacc_combined_directive): Set the
180 location of combined acc loops.
181
182 2018-12-09 Thomas Schwinge <thomas@codesourcery.com>
183
184 * openmp.c (resolve_oacc_loop_blocks): Remove checking of OpenACC
185 loop clauses.
186
187 PR fortran/88420
188 * openmp.c (resolve_oacc_loop_blocks): Remove "Clause SEQ
189 conflicts with INDEPENDENT" diagnostic.
190
191 2018-12-08 Steven G. Kargl <kargl@gcc.gnu.org>
192
193 PR fortran/88048
194 * resolve.c (check_data_variable): Named constant cannot be a
195 data object.
196
197 2018-12-08 Steven G. Kargl <kargl@gcc.gnu.org>
198
199 PR fortran/87945
200 * decl.c (var_element): Inquiry parameters cannit be data objects.
201
202 2018-12-08 Steven G. Kargl <kargl@gcc.gnu.org>
203
204 PR fortran/88025
205 * expr.c (gfc_apply_init): Remove asserts that cannot trigger.
206 Check for a NULL pointer.
207
208 2018-12-08 Steven G. Kargl <kargl@gcc.gnu.org>
209
210 PR fortran/88357
211 * class.c (insert_component_ref): Check for NULL pointer and
212 previous error message issued.
213 * parse.c (parse_associate): Check for NULL pointer.
214 * resolve.c (resolve_assoc_var): Check for NULL pointer.
215
216 2018-12-07 Jakub Jelinek <jakub@redhat.com>
217
218 PR fortran/88377
219 * trans-openmp.c (gfc_omp_clause_default_ctor,
220 gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op,
221 gfc_omp_clause_linear_ctor, gfc_omp_clause_dtor): Only consider
222 GFC_DECL_GET_SCALAR_ALLOCATABLE vars as scalar allocatables if they
223 have pointer type.
224
225 2018-12-03 Fritz Reese <fritzoreese@gmail.com>
226 Mark Eggleston <mark.eggleston@codethink.co.uk>
227
228 PR fortran/87919
229 * options.c (SET_FLAG, SET_BITFLAG, SET_BITFLAG2): New macros.
230 (set_dec_flags): Set/unset DEC and std flags according to value.
231 (post_dec_flags, set_init_local_zero): New functions.
232 (gfc_init_options): Use set_init_local_zero and post_dec_flags.
233 (gfc_handle_options) <case OPT_fcheck_array_temporaries>: Use
234 SET_BITFLAG.
235 <case OPT_finit_local_zero>: Use set_init_local_zero.
236 <case OPT_fdec>: Pass value to set_dec_flags.
237 <case OPT_fdec_structure>: Remove.
238
239 2018-11-30 Thomas Schwinge <thomas@codesourcery.com>
240
241 * gfortran.h (struct gfc_omp_clauses): Remove "wait". Adjust all
242 users.
243
244 * openmp.c (gfc_match_omp_clauses): Support multiple OpenACC wait
245 clauses.
246
247 2018-11-27 Martin Liska <mliska@suse.cz>
248
249 * decl.c (gfc_match_gcc_builtin): New function.
250 * gfortran.h (struct vect_builtin_tuple): New.
251 (gfc_adjust_builtins): Likewise.
252 * lang-specs.h (TARGET_F951_OPTIONS): New.
253 (F951_OPTIONS): Use it.
254 * lang.opt: Add new option -fpre-include.
255 * match.h (gfc_match_gcc_builtin): Declare new function.
256 * parse.c (decode_gcc_attribute): Handle builtin.
257 (parse_progunit): Call gfc_adjust_builtins.
258 * scanner.c (gfc_new_file): Load pre-included header file
259 when provided.
260 * trans-intrinsic.c (add_simd_flag_for_built_in): New.
261 (gfc_adjust_builtins): Likewise.
262
263 2018-11-24 Paul Thomas <pault@gcc.gnu.org>
264
265 PR fortran/88143
266 * resolve.c (resolve_variable): Check for associate names with
267 NULL target.
268
269 2018-11-23 Jakub Jelinek <jakub@redhat.com>
270
271 * lang.opt (fpad-source): New option.
272 * scanner.c (load_line): Don't pad fixed form lines if
273 !flag_pad_source.
274 * invoke.texi (-fno-pad-source): Document.
275
276 2018-11-21 Jakub Jelinek <jakub@redhat.com>
277
278 * invoke.texi (-fdec-include): Document.
279
280 2018-11-21 Jakub Jelinek <jakub@redhat.com>
281 Mark Eggleston <mark.eggleston@codethink.com>
282
283 * lang.opt (fdec-include): New option.
284 * options.c (set_dec_flags): Set also flag_dec_include.
285 * scanner.c (include_line): Change return type from bool to int.
286 In fixed form allow spaces in between include keyword letters.
287 For -fdec-include, allow in fixed form 0 in column 6. With
288 -fdec-include return -1 if the parsed line is not full include
289 statement and it could be successfully completed on continuation
290 lines.
291 (include_stmt): New function.
292 (load_file): Adjust include_line caller. If it returns -1, keep
293 trying include_stmt until it stops returning -1 whenever adding
294 further line of input.
295
296 2018-11-18 Thomas Koenig <tkoenig@gcc.gnu.org>
297
298 PR fortran/88073
299 * frontend-passes.c (combine_array_constructor): Do not do
300 anything if in a WHERE statement.
301
302 2018-11-18 Thomas Koenig <tkoenig@gcc.gnu.org>
303
304 PR fortran/70260
305 * expr.c (gfc_check_assign): Reject assigning to an external
306 symbol.
307 (gfc_check_pointer_assign): Add suppress_type_test
308 argument. Insert line after if. A non-proc pointer can not point
309 to a constant. Only check types if suppress_type_test is false.
310 * gfortran.h (gfc_check_pointer_assign): Add optional
311 suppress_type_test argument.
312 * resolve.c (gfc_resolve_code): Move up gfc_check_pointer_assign
313 and give it the extra argument.
314 (resolve_fl_procedure): Set error on value for a function with
315 an inizializer.
316
317 2018-11-15 David Malcolm <dmalcolm@redhat.com>
318
319 PR other/19165
320 * error.c (gfc_diagnostic_finalizer): Add diagnostic_t param.
321
322 2018-11-13 David Malcolm <dmalcolm@redhat.com>
323
324 * cpp.c: Replace "source_location" with "location_t".
325 * gfortran.h: Likewise.
326
327 2018-11-08 Jakub Jelinek <jakub@redhat.com>
328
329 * trans-openmp.c (gfc_trans_omp_clauses): Use
330 OMP_CLAUSE_DEFAULTMAP_SET_KIND.
331 (gfc_trans_omp_atomic): Set OMP_ATOMIC_MEMORY_ORDER
332 rather than OMP_ATOMIC_SEQ_CST.
333 (gfc_trans_omp_taskgroup): Build OMP_TASKGROUP using
334 make_node instead of build1_loc.
335 * types.def (BT_FN_VOID_BOOL, BT_FN_VOID_SIZE_SIZE_PTR,
336 BT_FN_UINT_UINT_PTR_PTR, BT_FN_UINT_OMPFN_PTR_UINT_UINT,
337 BT_FN_BOOL_UINT_LONGPTR_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
338 BT_FN_BOOL_UINT_ULLPTR_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR,
339 BT_FN_BOOL_LONG_LONG_LONG_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
340 BT_FN_BOOL_BOOL_ULL_ULL_ULL_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR): New.
341 (BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR_PTR): Formatting fix.
342
343 2018-11-02 Thomas Koenig <tkoenig@gcc.gnu.org>
344
345 PR fortran/46020
346 * decl.c (verify_bind_c_sym): Remove unnecessary space
347 in error message.
348
349 2018-11-01 Thomas Koenig <tkoenig@gcc.gnu.org>
350
351 PR fortran/87782
352 * frontend-passes.c (constant_string_length): If there is a
353 substring with a length which cannot be reduced to a constant,
354 return NULL.
355
356 2018-11-01 Paul Thomas <pault@gcc.gnu.org>
357
358 PR fortran/40196
359 * dependency.c (are_identical_variables): Return false if the
360 inquiry refs are not the same.
361 (gfc_ref_needs_temporary_p): Break on an inquiry ref.
362 * dump_parse_tree.c (show_ref): Show the inquiry ref type.
363 * expr.c (gfc_free_ref_list): Break on an inquiry ref.
364 (gfc_copy_ref): Copy the inquiry ref types.
365 (find_inquiry_ref): New function.
366 (simplify_const_ref, simplify_ref_chain): Call it. Add new arg
367 to simplify_ref_chain.
368 (gfc_simplify_expr): Use the new arg in call to
369 simplify_ref_chain.
370 (gfc_get_full_arrayspec_from_expr, gfc_is_coarray): Break on
371 inquiry ref.
372 (gfc_traverse_expr): Return true for inquiry ref.
373 * frontend-passes.c (gfc_expr_walker): Break on inquiry ref.
374 * gfortran.h : Add enums and union member in gfc_ref to
375 implement inquiry refs.
376 * intrinsic.c : Fix white nois.
377 * match.c (gfc_match_assignment): A constant lavlue is an
378 error.
379 * module.c : Add DECL_MIO_NAME for inquiry_type and the mstring
380 for inquiry_types.
381 (mio_ref): Handle inquiry refs.
382 * primary.c (is_inquiry_ref): New function.
383 (gfc_match_varspec): Handle inquiry refs calling new function.
384 (gfc_variable_attr): Detect inquiry ref for disambiguation
385 with components.
386 (caf_variable_attr): Treat inquiry and substring refs in the
387 same way.
388 * resolve.c (find_array_spec): ditto.
389 (gfc_resolve_substring_charlen): If there is neither a charlen
390 ref not an inquiry ref, return.
391 (resolve_ref): Handle inqiry refs as appropriate.
392 (resolve_allocate_expr): Entities with an inquiry ref cannot be
393 allocated.
394 * simplify.c (simplify_bound, simplify_cobound): Punt on
395 inquiry refs.
396 * trans-array.c (get_array_ctor_var_strlen): Break on inquiry
397 ref.
398 *trans-expr.c (conv_inquiry): New function.
399 (gfc_conv_variable): Retain the last typespec to pass to
400 conv_inquiry on detecting an inquiry ref.
401
402 2018-11-01 Thomas Koenig <tkoenig@gcc.gnu.org>
403
404 PR fortran/46020
405 * decl.c (verify_bind_c_sym): Improve error message.
406
407 2018-11-01 Thomas Koenig <tkoenig@gcc.gnu.org>
408
409 PR fortran/54613
410 * gfortran.texi (File format of unformatted sequential files):
411 Replace random comma with period.
412 * intrinsic.texi (Intrinsic Procedures): Add FINDLOC to menu.
413 (FINDLOC): Document.
414 (MAXLOC): Add refrence to FINDLOC.
415 (MINLOC): Likewise.
416
417 2018-10-31 Nathan Sidwell <nathan@acm.org>
418
419 * cpp.c (gfc_cpp_init): Adjust cpp_force_token_locations call.
420
421 2018-10-31 Martin Liska <mliska@suse.cz>
422
423 * trans-decl.c (struct module_hasher): Call htab_hash_string
424 for s->name and not for s.
425
426 2018-10-30 Thomas Koenig <tkoenig@gcc.gnu.org>
427
428 PR fortran/85896
429 * simplify.c (simplify_min_max): Do not convert the type of the
430 return expression.
431
432 2017-10-28 Thomas Koenig <tkoenig@gcc.gnu.org>
433
434 PR fortran/54613
435 * gfortran.h (gfc_isym_id): Add GFC_ISYM_FINDLOC.
436 (gfc_check_f): Add f6fl field.
437 (gfc_simplify_f): Add f6 field.
438 (gfc_resolve_f): Likewise.
439 (gfc_type_letter): Add optional logical_equas_int flag.
440 * check.c (intrinsic_type_check): New function.
441 (gfc_check_findloc): New function.
442 * intrinsics.c (gfc_type_letter): If logical_equals_int is
443 set, act accordingly.
444 (add_sym_5ml): Reformat comment.
445 (add_sym_6fl): New function.
446 (add_functions): Add findloc.
447 (check_arglist): Add sixth argument, handle it.
448 (resolve_intrinsic): Likewise.
449 (check_specific): Handle findloc.
450 * intrinsic.h (gfc_check_findloc): Add prototype.
451 (gfc_simplify_findloc): Likewise.
452 (gfc_resolve_findloc): Likewise.
453 (MAX_INTRINSIC_ARGS): Adjust.
454 * iresolve.c (gfc_resolve_findloc): New function.
455 * simplify.c (gfc_simplify_minmaxloc): Make static.
456 (simplify_findloc_to_scalar): New function.
457 (simplify_findloc_nodim): New function.
458 (simplify_findloc_to_array): New function.
459 (gfc_simplify_findloc): New function.
460 (gfc_conv_intrinsic_findloc): New function.
461 (gfc_conv_intrinsic_function): Handle GFC_ISYM_FINDLOC.
462 (gfc_is_intrinsic_libcall): Likewise.
463
464 2018-10-27 Thomas Koenig <tkoenig@gcc.gnu.org>
465
466 PR fortran/86907
467 * frontend-passes.c (check_locus_code): Add information that
468 warning about missing location information points to an
469 inconsisten internal state.
470 (check_locus_expr): Likewise.
471
472 2018-10-25 Jakub Jelinek <jakub@redhat.com>
473
474 PR fortran/87725
475 * openmp.c (gfc_match_omp_clauses): Parse simd, monotonic and
476 nonmonotonic modifiers regardless of if they have been parsed
477 already or if the opposite one has. Fix up check whether
478 comma after modifier should be parsed.
479 (resolve_omp_clauses): Diagnose schedule modifier restrictions.
480
481 2018-10-23 Paul Thomas <pault@gcc.gnu.org>
482
483 PR fortran/85603
484 * frontend-passes.c (get_len_call): New function to generate a
485 call to intrinsic LEN.
486 (create_var): Use this to make length expressions for variable
487 rhs string lengths.
488 Clean up some white space issues.
489
490 2018-10-21 Paul Thomas <pault@gcc.gnu.org>
491
492 PR fortran/71880
493 * trans-expr.c (gfc_trans_pointer_assignment): Set the string
494 length for array valued deferred length lhs.
495
496 2018-10-18 Tobias Burnus <burnus@net-b.de>
497
498 PR fortran/87625
499 * trans-array.c (gfc_is_reallocatable_lhs): Detect allocatable
500 polymorphic arrays.
501
502 2018-10-18 Paul Thomas <pault@gcc.gnu.org>
503
504 PR fortran/58618
505 * trans-stmt.c (trans_associate_var): All strings that return
506 as pointer types can be assigned directly to the associate
507 name so remove 'attr' and the condition that uses it.
508
509 2018-10-18 Paul Thomas <pault@gcc.gnu.org>
510
511 PR fortran/58618
512 * trans-decl.c (gfc_get_symbol_decl): Deal correctly with the
513 initialization with NULL() of a deferred length pointer.
514
515 2018-10-17 Tobias Burnus <burnus@net-b.de>
516
517 PR fortran/87632
518 * resolve.c (resolve_select_type): Use correct variable.
519
520 2018-10-17 David Malcolm <dmalcolm@redhat.com>
521
522 * Make-lang.in (selftest-fortran): New.
523
524 2018-10-17 Paul Thomas <pault@gcc.gnu.org>
525
526 PR fortran/56386
527 PR fortran/58906
528 PR fortran/77385
529 PR fortran/80260
530 PR fortran/82077
531 * resolve.c (resolve_variable): Fix up expressions with array
532 associate names, where the parser did not detect that this is
533 array and there was no array part_ref in the expression.
534
535 2018-10-16 Tobias Burnus <burnus@net-b.de>
536
537 PR fortran/67125
538 * trans-array.c (gfc_array_init_size, gfc_array_allocate):
539 Rename argument e3_is_array_constr to e3_has_nodescriptor
540 and update comments.
541 * trans-stmt.c (gfc_trans_allocate): Also fix lower bound
542 to 1 for nonalloc/nonpointer func results/vars besides
543 array constructors.
544
545 2018-10-16 Tobias Burnus <burnus@net-b.de>
546
547 PR fortran/87556
548 * trans-stmt.c (form_team, change_team, sync_team):
549 Don't ignore argse.pre/argse.post.
550
551 2018-10-15 Paul Thomas <pault@gcc.gnu.org>
552 Tobias Burnus <burnus@gcc.gnu.org>
553
554 PR fortran/87566
555 * resolve.c (resolve_assoc_var): Add missing array spec for
556 class associate names.
557 (resolve_select_type): Handle case where last typed component
558 of the selector has a different type to the expression.
559 * trans-expr.c (gfc_find_and_cut_at_last_class_ref): Replace
560 call to gfc_expr_to_initialize with call to gfc_copy_expr.
561 (gfc_conv_class_to_class): Guard assignment to 'len' field
562 against case where zero constant is supplied.
563
564 2018-10-12 Tobias Burnus <burnus@net-b.de>
565
566 PR fortran/87597
567 * expr.c (gfc_simplify_expr): Avoid simplifying
568 the 'array' argument to lbound/ubound/lcobound/
569 ucobound.
570
571 2018-10-12 Tobias Burnus <burnus@net-b.de>
572
573 PR fortran/58787
574 * decl.c (get_proc_name): Return with error before
575 creating sym_tree.
576
577 2018-10-11 Tobias Burnus <burnus@net-b.de>
578
579 Revert:
580 2018-10-09 Tobias Burnus <burnus@net-b.de>
581
582 PR fortran/83522
583 * resolve.c (resolve_ref): Reject nonscalar
584 substring references.
585
586 2018-10-09 David Malcolm <dmalcolm@redhat.com>
587
588 * cpp.c (gfc_cpp_init_0): Update for renamings.
589 (cb_cpp_error): Rename to...
590 (cb_cpp_diagnostic): ...this, converting level and reason to
591 enums.
592
593 2018-10-09 Tobias Burnus <burnus@net-b.de>
594
595 PR fortran/83522
596 * resolve.c (resolve_ref): Reject nonscalar
597 substring references.
598
599 2018-10-09 Paul Thomas <pault@gcc.gnu.org>
600
601 PR fortran/87151
602 * trans-array.c (gfc_get_array_span): Deal with deferred char
603 array components having a TYPE_MAX_VALUE of zero.
604 (gfc_array_init_size): Use the hidden string length component
605 to build the descriptor dtype.
606 (gfc_array_allocate): Remove the erroneous replacement of the
607 charlen backend decl with a temporary.
608 (gfc_conv_expr_descriptor): Use the ss_info string length in
609 the case of deferred character components.
610 (gfc_alloc_allocatable_for_assignment): Actually compare the
611 string lengths for deferred characters. Make sure that kind > 1
612 is handled correctly. Set the span field of the descriptor.
613 * trans-intrinsic.c (gfc_conv_intrinsic_len): Remove the stupid
614 comment.
615
616 PR fortran/80931
617 * trans-array.c (gfc_array_allocate): Set the span field for
618 variable length character arrays.
619
620 2018-10-08 Cesar Philippidis <cesar@codesourcery.com>
621
622 * expr.c (gfc_check_pointer_assign): Demote "Assignment to
623 contiguous pointer from non-contiguous target" to a warning.
624
625 2018-10-08 Paul Thomas <pault@gcc.gnu.org>
626
627 PR fortran/86372
628 * trans-stmt.c (trans_associate_var): Character associate names
629 with variable string length do not have to be deferred length
630 for the string length to be set, if variable.
631
632 2018-10-06 Thomas Koenig <tkoenig@gcc.gnu.org>
633
634 PR fortran/86111
635 * gfortran.h (enum arith): Add ARITH_WRONGCONCAT.
636 * arith.h (gfc_arith_error): Issue error for ARITH_WRONGCONCAT.
637 (gfc_arith_concat): If the types of op1 and op2 are not
638 character of if their kinds do not match, issue ARITH_WRONGCONCAT.
639
640 2018-10-06 Paul Thomas <pault@gcc.gnu.org>
641
642 PR fortran/83999
643 * resolve.c (resolve_fl_procedure): Include class functions in
644 the test that elemental function results be scalar.
645
646 2018-10-06 Thomas Koenig <tkoenig@gcc.gnu.org>
647
648 PR fortran/84640
649 * simplify.c (gfc_simplify_cshift): Extend size of hs_ex and ss_ex
650 by one. Set extents one past the array boundaries to zero to avoid
651 warning with instrumented compiler.
652 (gfc_simplify_eoshift): Likewise, only for ss_ex.
653
654 2018-10-05 Paul Thomas <pault@gcc.gnu.org>
655
656 PR fortran/87487
657 * trans-decl.c (gfc_get_symbol_decl): Make sure that deferred
658 character length pointer initializer has the right type to fix
659 problem with deferred_character_24.f90 on big endian.
660
661 2018-10-03 Jeff Law <law@redhat.comg>
662
663 * trans-types.c (get_typenode_from_name): Moved into gcc/tree.c.
664
665 2018-10-01 Paul Thomas <pault@gcc.gnu.org>
666
667 PR fortran/65677
668 * trans-expr.c (gfc_trans_assignment_1): Set the 'identical'
669 flag in the call to gfc_check_dependency.
670
671 2018-09-30 Paul Thomas <pault@gcc.gnu.org>
672
673 PR fortran/87359
674 * trans-array.c (gfc_is_reallocatable_lhs): Correct the problem
675 introduced by r264358, which prevented components of associate
676 names from being reallocated on assignment.
677
678 2018-09-30 Paul Thomas <pault@gcc.gnu.org>
679
680 PR fortran/70752
681 PR fortran/72709
682 * trans-array.c (gfc_conv_scalarized_array_ref): If this is a
683 deferred type and the info->descriptor is present, use the
684 info->descriptor
685 (gfc_conv_array_ref): Is the se expr is a descriptor type, pass
686 it as 'decl' rather than the symbol backend_decl.
687 (gfc_array_allocate): If the se string_length is a component
688 reference, fix it and use it for the expression string length
689 if the latter is not a variable type. If it is a variable do
690 an assignment. Make use of component ref string lengths to set
691 the descriptor 'span'.
692 (gfc_conv_expr_descriptor): For pointer assignment, do not set
693 the span field if gfc_get_array_span returns zero.
694 * trans.c (get_array_span): If the upper bound a character type
695 is zero, use the descriptor span if available.
696
697 2018-09-30 Paul Thomas <pault@gcc.gnu.org>
698
699 PR fortran/70149
700 * trans-decl.c (gfc_get_symbol_decl): A deferred character
701 length pointer that is initialized needs the string length to
702 be initialized as well.
703
704 2018-09-29 Paul Thomas <pault@gcc.gnu.org>
705
706 PR fortran/65677
707 * trans-expr.c (gfc_trans_assignment_1): If there is dependency
708 fix the rse stringlength.
709
710 2018-09-25 Martin Liska <mliska@suse.cz>
711
712 PR fortran/87394
713 * decl.c (add_hidden_procptr_result): Simplify condition
714 as we are in branch witch 'case1 || case2'.
715
716 2018-09-25 Martin Liska <mliska@suse.cz>
717
718 * trans.c (remove_suffix): Remove
719 unused function.
720
721 2018-09-24 Thomas Koenig <tkoenig@gcc.gnu.org>
722
723 PR fortran/87397
724 * gfc_conv_procedure_call: Do not add clobber on INTENT(OUT)
725 for variables in an associate statement.
726
727 2018-09-24 Bernhard Reuther-Fischer <aldot@gcc.gnu.org>
728 Cesar Philippidis <cesar@codesourcery.com>
729
730 * openmp.c (resolve_oacc_loop_blocks):
731
732 2018-09-23 Thomas Koenig <tkoenig@gcc.gnu.org>
733
734 PR fortran/87397
735 * gfc_conv_procedure_call: Do not add clobber on INTENT(OUT)
736 for variables having the dimension attribute.
737
738 2018-09-23 Janne Blomqvist <jb@gcc.gnu.org>
739
740 * trans-expr.c (gfc_caf_get_image_index): Do array index
741 calculations in gfc_array_index_type.
742 * trans-intrinsic.c (conv_intrinsic_event_query): Likewise.
743 * trans-stmt.c (gfc_trans_lock_unlock): Likewise.
744 (gfc_trans_event_post_wait): Likewise.
745
746 2018-09-23 Thomas Koenig <tkoenig@gcc.gnu.org>
747
748 PR fortran/87395
749 * gfc_conv_procedure_call: Reformat comments slightly. Do not add
750 clobber on INTENT(OUT) for saved variables.
751
752 2018-09-22 Thomas Koenig <tkoenig@gcc.gnu.org>
753
754 PR fortran/41453
755 * trans.h (gfc_conv_expr_reference): Add optional argument
756 add_clobber to prototype.
757 (gfc_conv_procedure_call): Set add_clobber argument to
758 gfc_conv_procedure_reference to true for scalar, INTENT(OUT),
759 non-pointer, non-allocatable, non-dummy variables whose type
760 is neither BT_CHARACTER, BT_DERIVED or BT_CLASS, but only if
761 the procedure is not elemental.
762 * trans-expr.c (gfc_conv_procedure_reference): Add clobber
763 statement before call if add_clobber is set.
764
765 2018-09-22 Paul Thomas <pault@gcc.gnu.org>
766
767 PR fortran/85603
768 * trans-array.c (gfc_alloc_allocatable_for_assignment): Test
769 the charlen backend_decl before using the VAR_P macro.
770
771 2018-09-21 Paul Thomas <pault@gcc.gnu.org>
772
773 PR fortran/77325
774 * trans-array.c (gfc_alloc_allocatable_for_assignment): If the
775 rhs has a charlen expression, convert that and use it.
776 * trans-expr.c (gfc_trans_assignment_1): The rse.pre for the
777 assignment of deferred character array vars to a realocatable
778 lhs should not be added to the exterior block since vector
779 indices, for example, generate temporaries indexed within the
780 loop.
781
782 2018-09-21 Paul Thomas <pault@gcc.gnu.org>
783
784 PR fortran/87359
785 * trans-stmt.c (gfc_trans_allocate): Don't deallocate alloc
786 components if must_finalize is set for expr3.
787
788 2018-09-21 Andrew Stubbs <ams@codesourcery.com>
789 Kwok Cheung Yeung <kcy@codesourcery.com>
790
791 * trans-expr.c (gfc_trans_structure_assign): Ensure that the first
792 argument of a call to _gfortran_caf_register is of size_type_node.
793 * trans-intrinsic.c (conv_intrinsic_event_query): Convert computed
794 index to a size_type_node type.
795 * trans-stmt.c (gfc_trans_event_post_wait): Likewise.
796
797 2018-09-20 Allan Sandfeld Jensen <allan.jensen@qt.io>
798
799 * gfortranspec.c (lang_specific_driver): Handle -r like -nostdlib.
800
801 2018-09-20 Janus Weil <janus@gcc.gnu.org>
802
803 * gfortran.h (gfc_str_startswith): New macro.
804 * decl.c (variable_decl, gfc_match_end): Use it.
805 * iresolve.c (is_trig_resolved): Ditto.
806 * module.c (load_omp_udrs, read_module): Ditto.
807 * options.c (gfc_handle_runtime_check_option): Ditto.
808 * primary.c (match_arg_list_function): Ditto.
809 * trans-decl.c (gfc_get_symbol_decl): Ditto.
810 * trans-expr.c (gfc_conv_procedure_call): Ditto.
811 * interface.c (dtio_op): Replace strncmp by strcmp.
812 * resolve.c (resolve_actual_arglist, resolve_function): Ditto.
813 * trans-expr.c (conv_arglist_function): Ditto.
814 * trans-intrinsic.c (gfc_conv_ieee_arithmetic_function): Replace macro
815 STARTS_WITH by gfc_str_startswith.
816
817 2018-09-20 Cesar Philippidis <cesar@codesourcery.com>
818
819 * dump-parse-tree.c (show_omp_clauses): Add missing omp list_types
820 and reorder the switch cases to match the enum in gfortran.h.
821
822 2018-09-19 Paul Thomas <pault@gcc.gnu.org>
823
824 PR fortran/84109
825 * trans-expr.c (gfc_trans_assignment_1): The rse.pre for the
826 assignment of deferred character intrinsic elemental function
827 results to a realocatable lhs must not be added to the exterior
828 block if they are array valued but must go to the loop body.
829
830 2018-09-18 Thomas Koenig <tkoenig@gcc.gnu.org>
831
832 PR fortran/29550
833 * gfortran.h (gfc_expr): Add external_blas flag.
834 * frontend-passes.c (matrix_case): Add case A2TB2T.
835 (optimize_namespace): Handle flag_external_blas by
836 calling call_external_blas.
837 (get_array_inq_function): Add argument okind. If
838 it is nonzero, use it as the kind of argument
839 to be used.
840 (inline_limit_check): Remove m_case argument, add
841 limit argument instead. Remove assert about m_case.
842 Set the limit for inlining from the limit argument.
843 (matmul_lhs_realloc): Handle case A2TB2T.
844 (inline_matmul_assign): Handle inline limit for other cases with
845 two rank-two matrices. Remove no-op calls to inline_limit_check.
846 (call_external_blas): New function.
847 * trans-intrinsic.c (gfc_conv_intrinsic_funcall): Do not add
848 argument to external BLAS if external_blas is already set.
849
850 2018-09-18 Paul Thomas <pault@gcc.gnu.org>
851
852 PR fortran/87239
853 * trans-expr.c (gfc_trans_assignment_1): The rse.pre for the
854 assignment of deferred character elemental function results to
855 a realocatable lhs must not be added to the exterior block but
856 must go to the loop body.
857
858 2018-09-18 Paul Thomas <pault@gcc.gnu.org>
859
860 PR fortran/87336
861 * trans-array.c (gfc_get_array_span): Try to get the element
862 length of incomplete types. Return NULL_TREE otherwise.
863 (gfc_conv_expr_descriptor): Only set the 'span' field if the
864 above does not return NULL_TREE. Set 'span' field if possible
865 for all new descriptors.
866
867 2018-09-17 Paul Thomas <pault@gcc.gnu.org>
868
869 PR fortran/64120
870 * trans-decl.c (gfc_get_symbol_decl): Flag allocatable, scalar
871 characters with a variable length expression for deferred init.
872 (gfc_trans_deferred_vars): Perform the assignment for these
873 symbols by calling gfc_conv_string_length.
874
875 2018-09-17 Paul Thomas <pault@gcc.gnu.org>
876
877 PR fortran/85954
878 * resolve.c (resolve_assoc_var): If the target expression is a
879 deferred charlen dummy and the associate name shares the
880 charlen, generate a new one. Make sure that new charlens are in
881 the namespace list so that they get cleaned up.
882 * trans-array.c (gfc_is_reallocatable_lhs): Associate names are
883 not reallocatable.
884 * trans-decl.c (gfc_get_symbol_decl): Put deferred character
885 length dummy and result arrays on the deferred initialization
886 list so that the variable length arrays can be correctly dealt
887 with.
888 * trans-expr.c (gfc_conv_string_length): Return if 'expr' is
889 NULL rather than ICEing..
890
891 2018-09-16 Janus Weil <janus@gcc.gnu.org>
892
893 PR fortran/86484
894 PR fortran/84543
895 * match.c (gfc_match_assignment): For a polymorphic assignment,
896 make sure that the vtab for the rhs type is generated.
897
898 2018-09-16 Thomas Koenig <tkoenig@gcc.gnu.org>
899
900 PR fortran/37802
901 * frontend-passes.c (B_ERROR): New macro for matmul bounds
902 checking error messages.
903 (C_ERROR): Likewise.
904 (inline_matmul_assign): Reorganize bounds checking, use B_ERROR
905 and C_ERROR macros.
906
907 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
908
909 * trans-array.c (gfc_conv_array_initializer): Remove excess precision
910 from overlength string initializers.
911
912 2018-09-12 Paul Thomas <pault@gcc.gnu.org>
913
914 PR fortran/87284
915 * trans-expr.c (gfc_trans_class_init_assign): Access to
916 to array elements of the dynamic type requires that the array
917 reference be added to the class expression and not the _data
918 component, unlike scalar expressions.
919
920 2018-09-11 Janus Weil <janus@gcc.gnu.org>
921
922 PR fortran/87172
923 * resolve.c (resolve_fl_derived): If a type has the 'use_assoc'
924 attribute, then it was declared in another module, so there should be
925 no error that it has not been declared.
926
927 2018-09-11 Paul Thomas <pault@gcc.gnu.org>
928
929 PR fortran/87277
930 * expr.c (is_subref_array): Add the check of dimensionality for
931 class, dummy, pointer arrays.
932
933 2018-09-11 Janus Weil <janus@gcc.gnu.org>
934
935 PR fortran/86830
936 * expr.c (gfc_is_simply_contiguous): Handle type-bound procedure calls
937 with non-polymorphic objects.
938
939 2018-09-10 Janus Weil <janus@gcc.gnu.org>
940
941 PR fortran/85395
942 * decl.c (match_binding_attributes): Use correct default accessibility
943 for procedure pointer components.
944
945 2018-09-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
946
947 * simplify.c (gfc_simplify_modulo): Re-arrange code to test whether
948 'P' is zero and issue an error if it is.
949
950 2018-08-31 Paul Thomas <pault@gcc.gnu.org>
951
952 PR fortran/86328
953 PR fortran/86760
954 * trans-array.c (gfc_conv_scalarized_array_ref): Do not fix
955 info->descriptor but pass it directly to gfc_build_array_ref.
956 (gfc_conv_array_ref): Likewise for se->expr.
957 * trans.c (gfc_build_array_ref): If 'decl' is a COMPONENT_REF
958 obtain the span field directly from it.
959
960 2017-08-28 Paul Thomas <pault@gcc.gnu.org>
961
962 PR fortran/80477
963 * trans-expr.c (gfc_conv_procedure_call): Allocatable class
964 scalar results being passed to a derived type formal argument
965 are finalized if possible. Otherwise, rely on existing code for
966 deallocation. Make the deallocation of allocatable result
967 components conditional on finalization not taking place. Make
968 the freeing of data components after finalization conditional
969 on the data being NULL.
970 (gfc_trans_arrayfunc_assign): Change the gcc_assert to a
971 condition to return NULL_TREE.
972 (gfc_trans_assignment_1): If the assignment is class to class
973 and the rhs expression must be finalized but the assignment
974 is not marked as a polymorphic assignment, use the vptr copy
975 function instead of gfc_trans_scalar_assign.
976
977 PR fortran/86481
978 * trans-expr.c (gfc_conv_expr_reference): Do not add the post
979 block to the pre block if the expression is to be finalized.
980 * trans-stmt.c (gfc_trans_allocate): If the expr3 must be
981 finalized, load the post block into a finalization block and
982 add it right at the end of the allocation block.
983
984 2018-08-27 David Malcolm <dmalcolm@redhat.com>
985
986 PR 87091
987 * error.c (gfc_format_decoder): Update for conversion of
988 show_caret_p to a tri-state.
989
990 2018-08-25 Janus Weil <janus@gcc.gnu.org>
991
992 PR fortran/86545
993 * resolve.c (resolve_transfer): Correctly determine typespec for
994 generic function calls, in order to throw a proper error.
995
996 2018-08-24 Thomas Koenig <tkoenig@gcc.gnu.org>
997
998 PR fortran/86837
999 * frontend-passes.c (var_in_expr_callback): New function.
1000 (var_in_expr): New function.
1001 (traverse_io_block): Use var_in_expr instead of
1002 gfc_check_dependency for checking if the variable depends on the
1003 previous interators.
1004
1005 2018-08-23 Janne Blomqvist <blomqvist.janne@gmail.com>
1006
1007 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxval): Delete
1008 HONOR_SIGNED_ZEROS checks.
1009
1010 2018-08-23 Paul Thomas <pault@gcc.gnu.org>
1011
1012 PR fortran/86863
1013 * resolve.c (resolve_typebound_call): If the TBP is not marked
1014 as a subroutine, check the specific symbol.
1015
1016 2018-08-22 Thomas Koenig <tkoenig@gcc.gnu.org>
1017
1018 * gfortran.texi: Mention that asynchronous I/O does
1019 not work on systems which lack condition variables, such
1020 as AIX.
1021
1022 2018-08-22 Janus Weil <janus@gcc.gnu.org>
1023
1024 PR fortran/86935
1025 * match.c (gfc_match_associate): Improve diagnostics for the ASSOCIATE
1026 statement.
1027
1028 2018-08-22 Andrew Benson <abensonca@gmail.com>
1029
1030 * module.c (load_generic_interfaces): Move call to find_symbol()
1031 so that only occurs if actually needed.
1032
1033 2018-08-22 Janus Weil <janus@gcc.gnu.org>
1034
1035 PR fortran/86888
1036 * decl.c (gfc_match_data_decl): Allow allocatable components of
1037 indirectly recursive type.
1038 * resolve.c (resolve_component): Remove two errors messages ...
1039 (resolve_fl_derived): ... and replace them by a new one.
1040
1041 2018-08-21 Janne Blomqvist <jb@gcc.gnu.org>
1042
1043 * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Use
1044 MAX_EXPR/MIN_EXPR unconditionally for real arguments.
1045 * gfortran.texi (Compiler Characteristics): Document MAX/MIN
1046 behavior wrt NaN.
1047
1048 2018-08-21 Nicolas Koenig <koenigni@gcc.gnu.org>
1049 Thomas Koenig <tkoenig@gcc.gnu.org>
1050
1051 PR fortran/25829
1052 * gfortran.texi: Add description of asynchronous I/O.
1053 * trans-decl.c (gfc_finish_var_decl): Treat asynchronous variables
1054 as volatile.
1055 * trans-io.c (gfc_build_io_library_fndecls): Rename st_wait to
1056 st_wait_async and change argument spec from ".X" to ".w".
1057 (gfc_trans_wait): Pass ID argument via reference.
1058
1059 2018-08-16 Nathan Sidwell <nathan@acm.org>
1060
1061 * cpp.c (dump_macro): Use cpp_user_macro_p.
1062
1063 2018-08-14 Janus Weil <janus@gcc.gnu.org>
1064
1065 PR fortran/86116
1066 * interface.c (compare_type): Remove a CLASS/TYPE check.
1067 (compare_type_characteristics): New function that behaves like the old
1068 'compare_type'.
1069 (gfc_check_dummy_characteristics, gfc_check_result_characteristics):
1070 Call 'compare_type_characteristics' instead of 'compare_type'.
1071
1072 2018-08-12 Paul Thomas <pault@gcc.gnu.org>
1073
1074 PR fortran/66679
1075 * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Class array
1076 elements are returned as references to the data element. Get
1077 the class expression by stripping back the references. Use this
1078 for the element size.
1079
1080 2018-08-12 Paul Thomas <pault@gcc.gnu.org>
1081
1082 PR fortran/86906
1083 * resolve.c (resolve_fl_variable_derived): Check if the derived
1084 type is use associated before checking for the host association
1085 error.
1086
1087 2018-08-10 Janus Weil <janus@gcc.gnu.org>
1088
1089 PR fortran/57160
1090 * invoke.texi (frontend-optimize): Mention short-circuiting.
1091 * options.c (gfc_post_options): Disable -ffrontend-optimize with -Og.
1092 * resolve.c (resolve_operator): Warn about short-circuiting only with
1093 -ffrontend-optimize.
1094 * trans-expr.c (gfc_conv_expr_op): Use short-circuiting operators only
1095 with -ffrontend-optimize. Without that flag, make sure that both
1096 operands are evaluated.
1097
1098 2018-08-08 Nathan Sidwell <nathan@acm.org>
1099
1100 * cpp.c (cb_file_change): Use linemap_included_from.
1101
1102 2018-08-07 Cesar Philippidis <cesar@codesourcery.com>
1103
1104 * trans-stmt.h: Remove stale reference to trans-openacc.c.
1105
1106 2018-08-04 Janus Weil <janus@gcc.gnu.org>
1107
1108 PR fortran/45521
1109 * interface.c (gfc_compare_interfaces): Apply additional
1110 distinguishability criteria of F08 to operator interfaces.
1111
1112 2018-07-31 Andre Vieira <andre.simoesdiasvieira@arm.com>
1113
1114 Revert 'AsyncI/O patch committed'
1115 2018-07-25 Nicolas Koenig <koenigni@gcc.gnu.org>
1116 Thomas Koenig <tkoenig@gcc.gnu.org>
1117
1118 PR fortran/25829
1119 * gfortran.texi: Add description of asynchronous I/O.
1120 * trans-decl.c (gfc_finish_var_decl): Treat asynchronous variables
1121 as volatile.
1122 * trans-io.c (gfc_build_io_library_fndecls): Rename st_wait to
1123 st_wait_async and change argument spec from ".X" to ".w".
1124 (gfc_trans_wait): Pass ID argument via reference.
1125
1126 2018-07-25 Nicolas Koenig <koenigni@gcc.gnu.org>
1127 Thomas Koenig <tkoenig@gcc.gnu.org>
1128
1129 PR fortran/25829
1130 * gfortran.texi: Add description of asynchronous I/O.
1131 * trans-decl.c (gfc_finish_var_decl): Treat asynchronous variables
1132 as volatile.
1133 * trans-io.c (gfc_build_io_library_fndecls): Rename st_wait to
1134 st_wait_async and change argument spec from ".X" to ".w".
1135 (gfc_trans_wait): Pass ID argument via reference.
1136
1137 2018-07-20 Martin Sebor <msebor@redhat.com>
1138
1139 PR middle-end/82063
1140 * gfortran.h (gfc_handle_option): Change function argument
1141 to HOST_WIDE_INT.
1142 * options.c (gfc_handle_option): Same.
1143
1144 2018-07-20 Andrew Benson <abenson@carnegiescience.edu>
1145
1146 * gfortran.h (gfc_symbol): Add pointer to next derived type.
1147 (gfc_dt_list, gfc_get_dt_list): Remove.
1148 (gfc_namespace): Replace gfc_dt_list with gfc_symbol.
1149 * parse.c (resolve_all_program_units): Replace gfc_free_dt_list() with
1150 simple nullification of gfc_derived_types.
1151 * resolve.c (resolve_global_procedure): Replace gfc_dt_list with
1152 gfc_symbol.
1153 (add_dt_to_dt_list): Change derived type linked list insertion to
1154 utilize dt_next pointers in gfc_symbol.
1155 * symbol.c (gfc_new_symbol, gfc_free_dt_list, gfc_symbol_done2)
1156 (get_iso_c_binding_dt, generate_isocbinding_symbol): Remove
1157 gfc_free_dt_list as gfc_dt_list is obsoleted. Change derived type
1158 linked list search/insertion to utilize dt_next pointers in gfc_symbol.
1159 * trans-types.c (gfc_get_derived_type): Change derived type linked
1160 list search to utilize dt_next pointers in gfc_symbol.
1161
1162 2018-07-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1163
1164 * trans-intrinsic.c: (gfc_conv_intrinsic_minmax): Emit MIN_MAX_EXPR
1165 or IFN_FMIN/FMAX sequence to calculate the min/max when possible.
1166
1167 2018-07-18 Janus Weil <janus@gcc.gnu.org>
1168 Thomas Koenig <tkoenig@gcc.gnu.org>
1169
1170 PR fortran/85599
1171 * dump-parse-tree.c (show_attr): Add handling of implicit_pure.
1172 * frontend-passes.c (do_warn_function_elimination): Do not warn for
1173 pure functions.
1174 * gfortran.h: Add prototypes for gfc_pure_function and
1175 gfc_implicit_pure_function.
1176 * gfortran.texi: Add chapter on evaluation of logical expressions.
1177 * invoke.texi: Mention that -Wfunction-elimination is implied
1178 by -Wextra.
1179 * lang.opt: Make -Wextra imply -Wfunction-elimination.
1180 * resolve.c (pure_function): Rename to gfc_pure_function.
1181 (gfc_implicit_pure_function): New function.
1182 (check_pure_function): Use it here.
1183 (impure_function_callback): New function.
1184 (resolve_operator): Call it via gfc_expr_walker.
1185
1186 2018-07-16 Fritz Reese <fritzoreese@gmail.com>
1187
1188 PR fortran/83184
1189 * decl.c (match_old_style_init): Initialize locus of variable expr when
1190 creating a data variable.
1191 (match_clist_expr): Verify array is explicit shape/size before
1192 attempting to allocate constant array constructor.
1193
1194 2018-07-16 Fritz Reese <fritzoreese@gmail.com>
1195
1196 PR fortran/86417
1197 * module.c (mio_component): Set component->loc when loading from module.
1198
1199 2018-07-10 Jakub Jelinek <jakub@redhat.com>
1200
1201 PR fortran/86421
1202 * module.c (omp_declare_simd_clauses): Add LINEAR with _REF, _VAL and
1203 _UVAL suffixes.
1204 (mio_omp_declare_simd): Save and restore ref, val and uval modifiers
1205 on linear clauses. Initialize n->where to gfc_current_locus.
1206
1207 2018-07-05 Paul Thomas <pault@gcc.gnu.org>
1208
1209 PR fortran/86408
1210 * resolve.c.c (resolve_contained_fntype): Reference to C418 is
1211 in F2008 and not F2003.
1212 (resolve_function): Ditto in error message. Also, exclude
1213 deferred character length results from the error.
1214
1215 2018-07-05 Fritz Reese <fritzoreese@gmail.com>
1216
1217 PR fortran/83183
1218 PR fortran/86325
1219 * expr.c (class_allocatable, class_pointer, comp_allocatable,
1220 comp_pointer): New helpers.
1221 (component_initializer): Generate EXPR_NULL for allocatable or pointer
1222 components. Do not generate initializers for components within BT_CLASS.
1223 Do not assign to comp->initializer.
1224 (gfc_generate_initializer): Use new helpers; move code to generate
1225 EXPR_NULL for class allocatable components into component_initializer().
1226
1227 2018-07-04 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1228
1229 PR fortran/82009
1230 * trans-decl.c (gfc_process_block_locals): Delete assert and set
1231 saved_local_decls = NULL_TREE.
1232
1233 2018-07-02 Richard Biener <rguenther@suse.de>
1234
1235 PR lto/86321
1236 * trans-types.c (gfc_get_array_type_bounds): Unshare TYPE_FIELDs
1237 for the distinct type copy.
1238
1239 2018-07-02 Paul Thomas <pault@gcc.gnu.org>
1240
1241 PR fortran/82969
1242 PR fortran/86242
1243 * trans-array.c (structure_alloc_comps): Do not explicitly copy
1244 procedure pointer components.
1245
1246 2018-07-02 Paul Thomas <pault@gcc.gnu.org>
1247
1248 PR fortran/45305
1249 * expr.c : Add a prototype for scalarize_intrinsic_call.
1250 (gfc_simplify_expr): Use scalarize_intrinsic_call for elemental
1251 intrinsic function calls.
1252 (scalarize_intrinsic_call): Add 'init_flag' argument. Check if
1253 the expression or any of the actual argument expressions are
1254 NULL. Before calling gfc_check_init_expr, check 'init_flag'.
1255 Only simplify the scalarized expressions if there are no errors
1256 on the stack.
1257 (gfc_check_init_expr): Set 'init_flag' true in the call to
1258 scalarize_intrinsic_call.
1259
1260 2018-06-28 Fritz Reese <fritzoreese@gmail.com>
1261
1262 PR fortran/82865
1263 * decl.c (gfc_match_type): Refactor and check for PDT declarations.
1264
1265 2018-06-28 Martin Liska <mliska@suse.cz>
1266
1267 * gfortranspec.c: Include opt-suggestions.h.
1268
1269 2018-06-25 Fritz Reese <fritzoreese@gmail.com>
1270
1271 PR fortran/82972
1272 PR fortran/83088
1273 PR fortran/85851
1274 * expr.c (component_initializer): Assign init expr to c->initializer.
1275 (generate_isocbinding_initializer): New.
1276 (gfc_generate_initializer): Call generate_isocbinding_initializer to
1277 generate initializers for c_ptr and c_funptr with -finit-derived.
1278
1279 2018-06-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1280
1281 PR fortran/85983
1282 * interface.c (check_dtio_interface1): Delete assert.
1283
1284 2018-06-22 Paul Thomas <pault@gcc.gnu.org>
1285 Rainer Orth <ro@gcc.gnu.org>
1286
1287 PR fortran/86281
1288 * resolve.c (resolve_contained_fntype): Check for the charlen
1289 before testing the length.
1290
1291 2018-06-21 Paul Thomas <pault@gcc.gnu.org>
1292
1293 PR fortran/49630
1294 * resolve.c (resolve_contained_fntype): Change standard ref.
1295 from F95 to F2003: C418. Correct a spelling error in a comment.
1296 It is an error for an abstract interface to have an assumed
1297 character length result.
1298 * trans-expr.c (gfc_conv_procedure_call): Likewise change the
1299 standard reference.
1300
1301 2018-06-21 Paul Thomas <pault@gcc.gnu.org>
1302
1303 PR fortran/83118
1304 * resolve.c (resolve_ordinary_assign): Force the creation of a
1305 vtable for assignment of non-polymorphic expressions to an
1306 unlimited polymorphic object.
1307 * trans-array.c (gfc_alloc_allocatable_for_assignment): Use the
1308 size of the rhs type for such assignments. Set the dtype, _len
1309 and vptrs appropriately.
1310 * trans-expr.c (gfc_trans_assignment): Force the use of the
1311 _copy function for these assignments.
1312
1313 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
1314 Thomas Schwinge <thomas@codesourcery.com>
1315 Cesar Philippidis <cesar@codesourcery.com>
1316
1317 * gfortran.h (gfc_omp_clauses): Add unsigned if_present, finalize
1318 bitfields.
1319 * openmp.c (enum omp_mask2): Remove OMP_CLAUSE_PRESENT_OR_*. Add
1320 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
1321 (gfc_match_omp_clauses): Update handling of copy, copyin, copyout,
1322 create, deviceptr, present_of_*. Add support for finalize and
1323 if_present.
1324 (OACC_PARALLEL_CLAUSES): Remove PRESENT_OR_* clauses.
1325 (OACC_KERNELS_CLAUSES): Likewise.
1326 (OACC_DATA_CLAUSES): Likewise.
1327 (OACC_DECLARE_CLAUSES): Likewise.
1328 (OACC_UPDATE_CLAUSES): Add IF_PRESENT clause.
1329 (OACC_ENTER_DATA_CLAUSES): Remove PRESENT_OR_* clauses.
1330 (OACC_EXIT_DATA_CLAUSES): Add FINALIZE clause.
1331 (gfc_match_oacc_declare): Update to OpenACC 2.5 semantics.
1332 * trans-openmp.c (gfc_trans_omp_clauses): Add support for IF_PRESENT
1333 and FINALIZE.
1334
1335 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
1336
1337 * trans-decl.c (gfc_get_fake_result_decl): Revert latest change.
1338
1339 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
1340
1341 * trans-decl.c (nonlocal_dummy_decl_pset): Delete.
1342 (nonlocal_dummy_decls): Likewise.
1343 (gfc_nonlocal_dummy_array_decl): Likewise.
1344 (gfc_get_symbol_decl): Do not call gfc_nonlocal_dummy_array_decl.
1345 (gfc_get_fake_result_decl): Do not generate a new DECL if simply
1346 reusing the result of a recursive call.
1347 (gfc_generate_function_code): Do not create, insert and destroy
1348 nonlocal_dummy_decls.
1349
1350 2018-06-13 Steven G. Kargl <kargl@gcc.gnu.org>
1351
1352 PR fortran/86110
1353 * array.c (gfc_resolve_character_array_constructor): Avoid NULL
1354 pointer dereference.
1355
1356 2018-06-13 Cesar Philippidis <cesar@codesourcery.com>
1357
1358 PR fortran/85703
1359 * parse.c (decode_oacc_directive): Set gfc_matching_function
1360 to false.
1361 (decode_omp_directive): Likewise.
1362
1363 2018-06-13 Cesar Philippidis <cesar@codesourcery.com>
1364
1365 PR fortran/85702
1366 * openmp.c (gfc_match_oacc_wait): Use %C to report error location.
1367
1368 2018-06-12 David Malcolm <dmalcolm@redhat.com>
1369
1370 PR other/69968
1371 * misc.c (gfc_closest_fuzzy_match): Update for renaming of
1372 levenshtein_distance to get_edit_distance.
1373
1374 2018-06-12 Steven G. Kargl <kargl@gcc.gnu.org>
1375
1376 PR fortran/44491
1377 * expr.c (gfc_check_assign): Select non-NULL locus.
1378
1379 2018-06-11 Janus Weil <janus@gcc.gnu.org>
1380
1381 PR fortran/45521
1382 * interface.c (compare_ptr_alloc): New function.
1383 (generic_correspondence): Call it.
1384
1385 2018-06-10 Thomas Koenig <tkoenig@gcc.gnu.org>
1386
1387 * gfortran.h (gfc_expr): Add no_bounds_check field.
1388 * frontend-passes.c (get_array_inq_function): Set no_bounds_check
1389 on function and function argument.
1390 (inline_matmul_assign): Set no_bounds_check on zero expression
1391 and on lhs of zero expression.
1392 Also handle A1B2 case if realloc on assigment is active.
1393 * trans-array.c (gfc_conv_array_ref): Don't do range checking
1394 if expr has no_bounds_check set.
1395 (gfc_conv_expr_descriptor): Set no_bounds_check on ss if expr
1396 has it set.
1397 * trans-expr.c (gfc_trans_assignment_1): Set no_bounds_check
1398 on lss and lss if the corresponding expressions have it set.
1399
1400 2018-06-10 Dominique d'Humieres <dominiq@gcc.gnu.org>
1401
1402 PR fortran/79854
1403 * trans-const.c: Remove include "diagnostic-core.h".
1404 (gfc_conv_constant_to_tree): Replace fatal_error with gcc_unreachable.
1405
1406 2018-06-10 Janus Weil <janus@gcc.gnu.org>
1407
1408 PR fortran/85088
1409 * decl.c (match_attr_spec): Synchronize the DECL_* enum values with the
1410 INTENT_* values from the enum 'sym_intent'. Call 'match_intent_spec'
1411 and remove a TODO note.
1412 * gfortran.h: Add a comment to sym_intent.
1413
1414 2018-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
1415
1416 PR fortran/38351
1417 * resolve.c (resolve_operator): Provide better error message for
1418 derived type entity used in an binary intrinsic numeric operator.
1419
1420 2018-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
1421
1422 PR fortran/85138
1423 PR fortran/85996
1424 PR fortran/86051
1425 * decl.c (gfc_match_char_spec): Use private namespace in attempt to
1426 reduce a charlen to a constant.
1427
1428 2018-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
1429
1430 PR fortran/78278
1431 * data.c (gfc_assign_data_value): Re-arrange code to allow for
1432 an error for double initialization of CHARACTER entities.
1433
1434 2018-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
1435
1436 PR fortran/63514
1437 * symbol.c (gfc_add_volatile): Enforce F2008:C1282 and F2018:C1588.
1438
1439 2018-06-08 Thomas Koenig <tkoenig@gcc.gnu.org>
1440
1441 PR fortran/85631
1442 * trans.h (gfc_ss): Add field no_bounds_check.
1443 * trans-array.c (gfc_conv_ss_startstride): If flag_realloc_lhs and
1444 ss->no_bounds_check is set, do not use runtime checks.
1445 * trans-expr.c (gfc_trans_assignment_1): Set lss->no_bounds_check
1446 for reallocatable lhs.
1447
1448 2018-06-08 Steven G. Kargl <kargl@gcc.gnu.org>
1449
1450 PR fortran/86059
1451 * array.c (match_array_cons_element): NULL() cannot be in an
1452 array constructor.
1453
1454 2018-06-08 Steven G. Kargl <kargl@gcc.gnu.org>
1455
1456 PR fortran/78571
1457 * data.c (create_character_initializer): Return early if type is
1458 incompatible with CHARACTER.
1459
1460 2018-06-07 Steven G. Kargl <kargl@gcc.gnu.org>
1461
1462 PR fortran/86045
1463 * simplify.c (gfc_simplify_mod): Re-arrange code to test whether
1464 'P' is zero and issue an error if it is.
1465
1466 2018-06-06 Thomas Koenig <tkoenig@gcc.gnu.org>
1467
1468 PR fortran/85641
1469 * frontend-passes.c (is_fe_temp): Add prototype.
1470 (realloc_string_callback): Early return for frontend-generated
1471 temporary.
1472
1473 2018-06-05 Cesar Philippidis <cesar@codesourcery.com>
1474
1475 PR fortran/85701
1476
1477 * openmp.c (gfc_resolve_oacc_declare): Error on functions and
1478 subroutine data clause arguments.
1479
1480 2018-06-04 Steven G. Kargl <kargl@gcc.gnu.org>
1481
1482 PR fortran/85981
1483 * resolve.c (resolve_allocate_deallocate): Check errmsg is default
1484 character kind.
1485
1486 2018-06-03 Paul Thomas <pault@gcc.gnu.org>
1487
1488 PR fortran/36497
1489 * decl.c (variable_decl): Use gfc_add_type for cray pointees.
1490
1491 2018-06-01 Steven G. Kargl <kargl@gcc.gnu.org>
1492
1493 PR fortran/63570
1494 * check.c (gfc_check_random_init): New function. Check arguments of
1495 RANDOM_INIT.
1496 * gfortran.h (GFC_ISYM_RANDOM_INIT): New enum token.
1497 * intrinsic.c (add_subroutines): Add RANDOM_INIT to list of
1498 subroutines.
1499 (gfc_check_intrinsic_standard): Introduce Fortran 2018 check.
1500 * intrinsic.h: Add prototypes for gfc_check_random_init and
1501 gfc_resolve_random_init
1502 * intrinsic.texi: Document new intrinsic subprogram.
1503 * iresolve.c (gfc_resolve_random_init): Resolve routine name.
1504 * trans-decl.c: Declare gfor_fndecl_random_init
1505 * trans-intrinsic.c (conv_intrinsic_random_init): New function.
1506 Translate call to RANDOM_INIT.
1507 (gfc_conv_intrinsic_subroutine): Call it.
1508 * trans.h: Declare gfor_fndecl_random_init
1509
1510 2018-05-27 Steven G. Kargl <kargl@gcc.gnu.org>
1511
1512 * decl.c (match_data_constant): Fortran 2018 allows pointer
1513 initialization in a data statement.
1514
1515 2018-05-25 Janus Weil <janus@gcc.gnu.org>
1516
1517 PR fortran/85839
1518 * match.c (gfc_match_block_data): Call gfc_notify_std to warn about
1519 an obsolescent feature in Fortran 2018.
1520 (gfc_match_equivalence): Ditto.
1521 * resolve.c (resolve_common_blocks): Ditto.
1522 (gfc_resolve_forall): Ditto.
1523 * symbol.c (gfc_define_st_label): Ditto.
1524
1525 2018-05-24 Steven G. Kargl <kargl@gcc.gnu.org>
1526
1527 PR fortran/85543
1528 * resolve.c (update_current_proc_array_outer_dependency): Avoid NULL
1529 pointer dereference.
1530
1531 2018-05-24 Steven G. Kargl <kargl@gcc.gnu.org>
1532
1533 PR fortran/85780
1534 * resolve.c (resolve_fl_procedure): Avoid NULL dereference.
1535
1536 2018-05-24 Steven G. Kargl <kargl@gcc.gnu.org>
1537
1538 PR fortran/85779
1539 * decl.c (gfc_match_derived_decl): Fix NULL point dereference.
1540
1541 2018-05-24 Steven G. Kargl <kargl@gcc.gnu.org>
1542
1543 PR fortran/85895
1544 * resolve.c (resolve_sync): Resolve expression before checking for
1545 an error.
1546
1547 2018-05-22 Janus Weil <janus@gcc.gnu.org>
1548
1549 PR fortran/85841
1550 * libgfortran.h: Remove the macros GFC_STD_F2008_TS and
1551 GFC_STD_OPT_F08TS.
1552 * error.c (notify_std_msg): Remove GFC_STD_F2008_TS.
1553 * options.c (set_default_std_flags): Ditto.
1554 (gfc_handle_option): Make -std=f2008ts an alias for -std=f2018.
1555 * array.c (gfc_match_array_spec): Replace GFC_STD_F2008_TS by
1556 GFC_STD_F2018.
1557 * check.c (gfc_check_atomic, gfc_check_event_query,
1558 gfc_check_c_f_pointer, gfc_check_c_f_procpointer, gfc_check_c_funloc,
1559 gfc_check_c_loc, gfc_check_num_images, gfc_check_this_image): Ditto.
1560 * decl.c (gfc_verify_c_interop_param, gfc_match_decl_type_spec): Ditto.
1561 * intrinsic.c (add_functions, add_subroutines,
1562 gfc_check_intrinsic_standard): Ditto.
1563 * iso-c-binding.def: Ditto.
1564 * iso-fortran-env.def: Ditto.
1565 * match.c (gfc_match_event_post, gfc_match_event_wait,
1566 gfc_match_fail_image, gfc_match_form_team, gfc_match_change_team,
1567 gfc_match_end_team, gfc_match_sync_team): Ditto.
1568 * gfortran.texi: Remove mention of -std=f2008ts.
1569 Move TSs into F2018 section.
1570 * invoke.texi: Update documentation of -std=f2008ts.
1571
1572 2018-05-21 Janus Weil <janus@gcc.gnu.org>
1573
1574 PR fortran/85841
1575 * libgfortran.h: New macros GFC_STD_OPT_*.
1576 * error.c (notify_std_msg): New function.
1577 (gfc_notify_std): Adjust such that it can handle combinations of
1578 GFC_STD_* flags in the 'std' argument, not just a single one.
1579 * match.c (match_arithmetic_if, gfc_match_if): Reject arithmetic if
1580 in Fortran 2018.
1581 (gfc_match_stopcode): Use GFC_STD_OPT_* macros.
1582 * options.c (set_default_std_flags): Warn for F2018 deleted features
1583 by default.
1584 (gfc_handle_option): F2018 deleted features are allowed in earlier
1585 standards.
1586 * symbol.c (gfc_define_st_label, gfc_reference_st_label): Reject
1587 nonblock do constructs in Fortran 2018.
1588
1589 2018-05-20 Paul Thomas <pault@gcc.gnu.org>
1590
1591 PR fortran/80657
1592 * resolve.c (flag_fn_result_spec): Use the 'sym' argument to
1593 test for self refs to the function result in the character len
1594 expression. If a self reference is found, emit an error and
1595 return true.
1596 (resolve_fntype): Use the function symbol in the calls to the
1597 above.
1598
1599 2018-05-20 Paul Thomas <pault@gcc.gnu.org>
1600
1601 PR fortran/49636
1602 * trans-array.c (gfc_get_array_span): Renamed from
1603 'get_array_span'.
1604 (gfc_conv_expr_descriptor): Change references to above.
1605 * trans-array.h : Add prototype for 'gfc_get_array_span'.
1606 * trans-intrinsic.c (gfc_conv_associated): Add pre and post
1607 blocks for 'arg1'.
1608 * trans-stmt.c (trans_associate_var): If the associate name is
1609 a subref array pointer, use gfc_get_array_span for the span.
1610
1611 2018-05-20 Paul Thomas <pault@gcc.gnu.org>
1612
1613 PR fortran/82275
1614 * match.c (gfc_match_type_spec): Go through the array ref and
1615 decrement 'rank' for every dimension that is an element.
1616
1617 2018-05-19 Paul Thomas <pault@gcc.gnu.org>
1618
1619 PR fortran/82923
1620 PR fortran/66694
1621 PR fortran/82617
1622 * trans-array.c (gfc_alloc_allocatable_for_assignment): Set the
1623 charlen backend_decl of the rhs expr to ss->info->string_length
1624 so that the value in the current scope is used.
1625
1626 2018-05-13 Steven G. Kargl <kargl@gcc.gnu.org>
1627
1628 PR fortran/63529
1629 * gfortran.texi: Clarify documentation for Cray pointer and
1630 assumed-sized array.
1631
1632 2018-05-13 Paul Thomas <pault@gcc.gnu.org>
1633
1634 PR fortran/85742
1635 * trans-types.c (gfc_get_dtype_rank_type): Reorder evaluation
1636 of 'size'. If the element type is a pointer use the size of the
1637 TREE_TYPE of the type, unless it is VOID_TYPE. In this latter
1638 case, set the size to zero.
1639
1640 2018-05-13 Steven G. Kargl <kargl@gcc.gnu.org>
1641
1642 * gfortran.h: Remove prototype.
1643 * symbol.c (gfc_new_undo_checkpoint): Remove unused function.
1644
1645 2018-05-11 Steven G. Kargl <kargl@gcc.gnu.org>
1646
1647 PR fortran/85542
1648 * expr.c (check_inquiry): Avoid NULL pointer dereference.
1649
1650 2018-05-10 Steven G. Kargl <kargl@gcc.gnu.org>
1651
1652 PR fortran/85687
1653 * check.c (gfc_check_rank): Check that the argument is a data object.
1654
1655 2018-05-10 Steven G. Kargl <kargl@gcc.gnu.org>
1656
1657 PR fortran/85521
1658 * array.c (gfc_resolve_character_array_constructor): Substrings
1659 with upper bound smaller than lower bound are zero length strings.
1660
1661 2018-05-10 Steven G. Kargl <kargl@gcc.gnu.org>
1662
1663 PR fortran/70870
1664 * data.c (gfc_assign_data_value): Check that a data object does
1665 not also have default initialization.
1666
1667 2018-05-10 Marek Polacek <polacek@redhat.com>
1668
1669 PR fortran/85735
1670 * options.c (gfc_post_options): Set main_input_filename.
1671
1672 2018-05-10 Thomas Koenig <tkoenig@gcc.gnu.org>
1673
1674 PR fortran/54613
1675 * intrinsic.texi: Document BACK for MINLOC and MAXLOC.
1676
1677 2018-05-10 Paul Thomas <pault@gcc.gnu.org>
1678
1679 PR fortran/68846
1680 PR fortran/70864
1681 * resolve.c (get_temp_from_expr): The temporary must not have
1682 dummy or intent attributes.
1683
1684 2018-05-08 Thomas Koenig <tkoenig@gcc.gnu.org>
1685
1686 PR fortran/54613
1687 * check.c (gfc_check_minmaxloc): Remove error for BACK not being
1688 implemented. Use gfc_logical_4_kind for BACK.
1689 * simplify.c (min_max_choose): Add optional argument back_val.
1690 Handle it.
1691 (simplify_minmaxloc_to_scalar): Add argument back_val. Pass
1692 back_val to min_max_choose.
1693 (simplify_minmaxloc_to_nodim): Likewise.
1694 (simplify_minmaxloc_to_array): Likewise.
1695 (gfc_simplify_minmaxloc): Add argument back, handle it.
1696 Pass back_val to specific simplification functions.
1697 (gfc_simplify_minloc): Remove ATTRIBUTE_UNUSED from argument back,
1698 pass it on to gfc_simplify_minmaxloc.
1699 (gfc_simplify_maxloc): Likewise.
1700 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Adjust
1701 comment. If BACK is true, use greater or equal (or lesser or
1702 equal) insteal of greater (or lesser). Mark the condition of
1703 having found a value which exceeds the limit as unlikely.
1704
1705 2018-05-07 Jeff Law <law@redhat.comg>
1706
1707 * scanner.c (preprocessor_line): Call linemap_add after a line
1708 directive that changes the current filename.
1709
1710 2018-05-06 Andre Vehreschild <vehre@gcc.gnu.org>
1711
1712 PR fortran/85507
1713 * dependency.c (gfc_dep_resolver): Revert looking at coarray dimension
1714 introduced by r259385.
1715 * trans-intrinsic.c (conv_caf_send): Always report a dependency for
1716 same variables in coarray assignments.
1717
1718 2018-05-02 Tom de Vries <tom@codesourcery.com>
1719
1720 PR libgomp/82428
1721 * f95-lang.c (DEF_GOACC_BUILTIN_ONLY): Define.
1722
1723 2018-04-24 Steven G. Kargl <kargl@gcc.gnu.org>
1724
1725 PR fortran/85520
1726 * decl.c (gfc_match_char_spec): Check for negative length and set to 0.
1727
1728 2018-04-14 Andre Vehreschild <vehre@gcc.gnu.org>
1729
1730 PR fortran/81773
1731 PR fortran/83606
1732 * dependency.c (gfc_dep_resolver): Coarray indexes are to be ignored
1733 during dependency computation. They define no data dependency.
1734 * trans-array.c (conv_array_index_offset): The stride can not be set
1735 here, prevent fail.
1736 * trans-intrinsic.c (conv_caf_send): Add creation of temporary array
1737 for caf_get's result and copying to the array with vectorial
1738 indexing.
1739
1740 2018-04-14 Thomas Koenig <tkoenig@gcc.gnu.org>
1741
1742 PR fortran/85387
1743 * frontend-passes.c (traverse_io_block): Check for start, end or
1744 stride being defined by an outer implied DO loop.
1745
1746 2018-04-12 Thomas Koenig <tkoenig@gcc.gnu.org>
1747
1748 PR fortran/83064
1749 PR testsuite/85346
1750 * trans-stmt.c (gfc_trans_forall_loop): Use annot_expr_ivdep_kind
1751 for annotation and remove dependence on -ftree-parallelize-loops.
1752
1753 2018-04-10 Jakub Jelinek <jakub@redhat.com>
1754
1755 PR fortran/85313
1756 * openmp.c (resolve_omp_do): Remove bogus if (j < i) break;.
1757 (resolve_oacc_nested_loops): Likewise. Formatting fix.
1758
1759 2018-04-09 Thomas Koenig <tkoenig@gcc.gnu.org>
1760
1761 PR fortran/83064
1762 * trans-stmt.c (gfc_trans_forall_loop): Remove annotation for
1763 parallell processing of DO CONCURRENT -ftree-parallelize-loops
1764 is set.
1765
1766 2018-04-09 Thomas Koenig <tkoenig@gcc.gnu.org>
1767
1768 PR fortran/51260
1769 * resolve.c (resolve_variable): Simplify cases where access to a
1770 parameter array results in a single constant.
1771
1772 2018-04-02 Thomas Koenig <tkoenig@gcc.gnu.org>
1773
1774 PR fortran/85102
1775 * decl.c (variable_decl): If upper or lower bounds simplify
1776 to a constant, use that.
1777
1778 2018-03-30 Paul Thomas <pault@gcc.gnu.org>
1779
1780 PR fortran/84931
1781 * simplify.c (gfc_convert_constant): Handle case of array
1782 constructors within an array that has no iterator and improve
1783 the conciseness of this section of code.
1784
1785 2017-03-30 Thomas Koenig <tkoenig@gcc.gnu.org>
1786
1787 PR fortran/85111
1788 * array.c (gfc_resolve_character_array_constructor): Early
1789 exit for zero-size arrays.
1790 * simplify.c (simplify_transformation_to_array): Exit early
1791 if the result size is zero.
1792 (simplify_minmaxloc_to_array): Likewise.
1793
1794 2018-03-28 Mikael Morin <mikael@gcc.gnu.org>
1795
1796 PR fortran/69497
1797 * symbol.c (gfc_symbol_done_2): Start freeing namespaces
1798 from the root.
1799 (gfc_free_namespace): Restore assert (revert r258839).
1800
1801 2018-03-28 Jakub Jelinek <jakub@redhat.com>
1802
1803 * gfortran.h (gfc_dt): Rename default_exp field to dec_ext.
1804 * ioparm.def (IOPARM_dt_default_exp): Rename to ...
1805 (IOPARM_dt_dec_ext): ... this.
1806 * trans-io.c (build_dt): Adjust for default_exp renaming to
1807 dec_ext and IOPARM_dt_default_exp renaming to IOPARM_dt_dec_ext.
1808 * io.c (match_io): Likewise.
1809
1810 2018-03-27 Thomas Koenig <tkoenig@gcc.gnu.org>
1811
1812 PR fortran/85084
1813 * frontend-passes.c (gfc_run_passes): Do not run front-end
1814 optimizations if a previous error occurred.
1815
1816 2018-03-27 Thomas Koenig <tkoenig@gcc.gnu.org>
1817 Harald Anlauf <anlauf@gmx.de>
1818
1819 PR fortran/85083
1820 * primary.c (gfc_convert_to_structure_constructor): Check
1821 conformance of argument types in structure constructor.
1822
1823 2018-03-26 Thomas Koenig <tkoenig@gcc.gnu.org>
1824
1825 PR fortran/66709
1826 * io.c: Include constructor.h.
1827 (resolve_tag_format): For a constant character array, concatenate
1828 into a single character expression.
1829
1830 2018-03-25 Seth Johnson <johnsonsr@ornl.gov>
1831 Dominique d'Humieres <dominiq@gcc.gnu.org>
1832
1833 PR fortran/84924
1834 * check.c (gfc_check_c_f_pointer): Allow scalar noninteroperable
1835 scalar derived type with -std=f2003 and -std=f2008.
1836
1837 2018-03-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1838 Dominique d'Humieres <dominiq@gcc.gnu.org>
1839
1840 PR fortran/69497
1841 * symbol.c (gfc_free_namespace): Delete the assert and only if
1842 refs count is equals zero, free the namespace. Otherwise,
1843 something is halfway and other errors will resound.
1844
1845 2018-03-24 Thomas Koenig <tkoenig@gcc.gnu.org>
1846
1847 PR fortran/70068
1848 * expr.c (find_substring_ref): Change types of start, end
1849 and length variables to gfc_charlen_t. Set length to zero
1850 for empty substring.
1851
1852 2018-03-24 Steven G. Kargl <kargl@gcc.gnu.org>
1853
1854 PR fortran/42651
1855 * decl.c (check_function_name): Improved error message
1856 (gfc_match_volatile, gfc_match_asynchronous) Use check_function_name.
1857
1858 2018-03-22 Steven G. Kargl <kargl@gcc.gnu.org>
1859
1860 PR fortran/84922
1861 * decl.c (get_proc_name): If the MODULE prefix appears in interface
1862 body, then it must appear on the contained subroutine or function.
1863 While here, fix nearby mis-indented code.
1864
1865 2018-03-21 Thomas Koenig <tkoenig@gcc.gnu.org>
1866 Harald Anlauf <anlauf@gmx.de>
1867
1868 PR fortran/84957
1869 * trans-types.c (gfc_sym_type): Do not dereference NULL pointer.
1870
1871 2018-03-21 Janne Blomqvist <jb@gcc.gnu.org>
1872
1873 PR fortran/84615
1874 * trans-expr.c (gfc_conv_procedure_call): Convert charlen to
1875 gfc_charlen_type_node when calling procedure.
1876
1877 2018-03-20 Steven G. Kargl <kargl@gcc.gnu.org>
1878
1879 PR fortran/85001
1880 * interface.c (symbol_rank): Remove bogus null pointer check that
1881 crept in when translating a ternary operator into an if-else
1882 constructor.
1883
1884 2018-03-19 Thomas Koenig <tkoenig@gcc.gnu.org>
1885
1886 PR fortran/84931
1887 * simplify.c (gfc_convert_constant): Correctly handle iterators
1888 for type conversion.
1889
1890 2018-03-18 Steven G. Kargl <kargl@gcc.gnu.org>
1891
1892 PR fortran/77414
1893 * decl.c (get_proc_name): Check for a subroutine re-defined in
1894 the contain portion of a subroutine. Change language of existing
1895 error message to better describe the issue. While here fix whitespace
1896 issues.
1897
1898 2018-03-18 Steven G. Kargl <kargl@gcc.gnu.org>
1899
1900 PR fortran/65453
1901 * decl.c (get_proc_name): Catch clash between a procedure statement
1902 and a contained subprogram
1903
1904 2018-03-16 Steven G. Kargl <kargl@gcc.gnu.org>
1905
1906 PR fortran/69395
1907 * decl.c (merge_array_spec): Correct the error condition.
1908
1909 2018-03-15 Steven G. Kargl <kargl@gcc.gnu.org>
1910
1911 PR fortran/78741
1912 * decl.c (get_proc_name): Check for clash of entry name with
1913 subroutine name.
1914
1915 2018-03-15 Steven G. Kargl <kargl@gcc.gnu.org>
1916
1917 PR fortran/69395
1918 * decl.c (merge_array_spec): Limit the merging to maximum allowed
1919 dimensions, and issue error message if limit is exceeded.
1920
1921 2018-03-13 Steven G. Kargl <kargl@gcc.gnu.org>
1922
1923 * check.c (gfc_check_kill_sub): Remove check for INTEGER(4) or (8).
1924 * intrinsic.c (add_functions): Remove reference to gfc_resolve_kill.
1925 (add_subroutines): Remove reference to gfc_resolve_kill_sub.
1926 * intrinsic.texi: Update documentation.
1927 * iresolve.c (gfc_resolve_kill, gfc_resolve_kill_sub): Remove.
1928 * trans-decl.c (gfc_build_intrinsic_function_decls): Add
1929 gfor_fndecl_kill and gfor_fndecl_kill_sub
1930 * trans-intrinsic.c (conv_intrinsic_kill, conv_intrinsic_kill_sub): new
1931 functions.
1932 (gfc_conv_intrinsic_function): Use conv_intrinsic_kill.
1933 (gfc_conv_intrinsic_subroutine): Use conv_intrinsic_kill_sub.
1934 * trans.h: Declare gfor_fndecl_kill and gfor_fndecl_kill_sub.
1935
1936 2018-03-11 Paul Thomas <pault@gcc.gnu.org>
1937
1938 PR fortran/84546
1939 * trans-array.c (structure_alloc_comps): Make sure that the
1940 vptr is copied and that the unlimited polymorphic _len is used
1941 to compute the size to be allocated.
1942 * trans-expr.c (gfc_get_class_array_ref): If unlimited, use the
1943 unlimited polymorphic _len for the offset to the element.
1944 (gfc_copy_class_to_class): Set the new 'unlimited' argument.
1945 * trans.h : Add the boolean 'unlimited' to the prototype.
1946
1947 2018-03-11 Steven G. Kargl <kargl@gcc.gnu.org>
1948
1949 PR fortran/83939
1950 * resolve.c (resolve_fl_procedure): Enforce F2018:C15100.
1951
1952 2018-03-11 Steven G. Kargl <kargls@gcc.gnu.org>
1953
1954 * check.c (gfc_check_kill): Check pid and sig are scalar.
1955 (gfc_check_kill_sub): Restrict kind to 4 and 8.
1956 * intrinsic.c (add_function): Sort keyword list. Add pid and sig
1957 keywords for KILL. Remove redundant *back="back" in favor of the
1958 original *bck="back".
1959 (add_subroutines): Sort keyword list. Add pid and sig keywords
1960 for KILL.
1961 * intrinsic.texi: Fix documentation to consistently use pid and sig.
1962 * iresolve.c (gfc_resolve_kill): Kind can only be 4 or 8. Choose the
1963 correct function.
1964 (gfc_resolve_rename_sub): Add comment.
1965
1966 2018-03-11 Thomas Koenig <tkoenig@gcc.gnu.org>
1967
1968 PR fortran/66128
1969 * simplify.c (simplify_transformation): Return default result for
1970 empty array argument.
1971 (gfc_simplify_all): Remove special-case handling for zerosize.
1972 (gfc_simplify_any): Likewise.
1973 (gfc_simplify_count): Likewise.
1974 (gfc_simplify_iall): Likewise.
1975 (gfc_simplify_iany): Likewise.
1976 (gfc_simplify_iparity): Likewise.
1977 (gfc_simplify_minval): Likewise.
1978 (gfc_simplify_maxval): Likewise.
1979 (gfc_simplify_norm2): Likewise.
1980 (gfc_simplify_product): Likewise.
1981 (gfc_simplify_sum): Likewise.
1982
1983 2018-03-10 Steven G. Kargl <kargl@gcc.gnu.org>
1984
1985 PR fortran/84734
1986 * arith.c (check_result, eval_intrinsic): If result overflows, pass
1987 the expression up the chain instead of a NULL pointer.
1988
1989 2018-03-07 Steven G. Kargl <kargl@gcc.gnu.org>
1990
1991 PR fortran/64124
1992 PR fortran/70409
1993 * decl.c (gfc_match_char_spec): Try to reduce a charlen to a constant.
1994
1995 2017-03-06 Thomas Koenig <tkoenig@gcc.gnu.org>
1996
1997 PR fortran/84697
1998 PR fortran/66128
1999 * expr.c (simplify_parameter_variable): If p is a size zero array
2000 and not an ARRAY_EXPR insert an empty array constructor and
2001 return.
2002 * gfortran.h: Add prototype for gfc_is_size_zero_array.
2003 * simplify.c (is_size_zero_array): Make non-static and rename into
2004 (gfc_is_size_zero_array): Check for parameter arrays of zero
2005 size by comparing shape and absence of constructor.
2006 (gfc_simplify_all): Use gfc_is_size_zero_array instead of
2007 is_size_zero_array.
2008 (gfc_simplify_count): Likewise.
2009 (gfc_simplify_iall): Likewise.
2010 (gfc_simplify_iany): Likewise.
2011 (gfc_simplify_iparity): Likewise.
2012 (gfc_simplify_minval): Likewise.
2013 (gfc_simplify_maxval): Likewise.
2014 (gfc_simplify_product): Likewise.
2015 (gfc_simplify_sum): Likewise.
2016
2017 2018-03-06 Steven G. Kargl <kargl@gcc.gnu.org>
2018
2019 PR fortran/56667
2020 * primary.c (match_sym_complex_part): Give the matcher for an implied
2021 do-loop a chance to run.
2022
2023 2018-03-03 Harald Anlauf <anlauf@gmx.de>
2024
2025 PR fortran/71085
2026 * trans-expr.c (gfc_apply_interface_mapping_to_expr): Do not
2027 dereference NULL pointer.
2028
2029 2018-03-03 Steven G. Kargl <kargl@gcc.gnu.org>
2030
2031 PR fortran/66128
2032 * simplify.c (is_size_zero_array): New function to check for size
2033 zero array.
2034 (gfc_simplify_all, gfc_simplify_any, gfc_simplify_count,
2035 gfc_simplify_iall, gfc_simplify_iany, gfc_simplify_iparity,
2036 gfc_simplify_minval, gfc_simplify_maxval, gfc_simplify_norm2,
2037 gfc_simplify_product, gfc_simplify_sum): Use it, and implement
2038 requirements from F2018.
2039
2040 2018-03-03 Steven G. Kargl <kargl@gcc.gnu.org>
2041
2042 PR fortran/51434
2043 * simplify.c (gfc_simplify_transfer): Resolve mold.
2044
2045 2018-03-03 Paul Thomas <pault@gcc.gnu.org>
2046
2047 PR fortran/80965
2048 * resolve.c (build_loc_call): Change symtree name from 'loc' to
2049 '_loc'.
2050
2051 2018-03-01 Paul Thomas <pault@gcc.gnu.org>
2052
2053 PR fortran/84219
2054 * target-memory.c (gfc_interpret_derived): Assert that BT_VOID
2055 components are caf tokens.
2056 (gfc_target_interpret_expr): Treat BT_VOID expressions as
2057 integers.
2058
2059 2018-03-01 Paul Thomas <pault@gcc.gnu.org>
2060
2061 PR fortran/84538
2062 * class.c (class_array_ref_detected): Remove the condition that
2063 there be no reference after the array reference.
2064 (find_intrinsic_vtab): Remove excess whitespace.
2065 * trans-array.c (gfc_conv_scalarized_array_ref): Rename 'tmp'
2066 as 'base and call build_class_array_ref earlier.
2067
2068 2018-02-28 Paul Thomas <pault@gcc.gnu.org>
2069
2070 PR fortran/83901
2071 * trans-stmt.c (trans_associate_var): Make sure that the se
2072 expression is a pointer type before converting it to the symbol
2073 backend_decl type.
2074
2075 2018-02-25 Steven G. Kargl <kargl@gcc.gnu.org>
2076
2077 PR fortran/83633
2078 * decl.c (variable_decl): Check that an explicit-shape-array with
2079 nonconstant bounds is allowed.
2080
2081 2018-02-25 Paul Thomas <pault@gcc.gnu.org>
2082
2083 PR fortran/84523
2084 * trans-intrinsic.c (gfc_conv_allocated): If the argument se
2085 has a pre block, add it to the expression pre block.
2086
2087 2018-02-25 Thomas Koenig <tkoenig@gcc.gnu.org>
2088
2089 PR fortran/78238
2090 * gfortran.h (gfc_integer_4_kind): Define.
2091 * resolve.c (resolve_select_type): Make sure that the
2092 kind of c->high is gfc_integer_4_kind.
2093
2094 2018-02-24 Steven G. Kargl <kargl@gcc.gnu.org>
2095
2096 PR fortran/30792
2097 * decl.c (gfc_match_data): Check for invalid substring in
2098 data-implied-do
2099
2100 2018-02-23 Steven G. Kargl <kargl@gcc.gnu.org>
2101
2102 * intrinsic.texi: Arguments to MATMUL cannot both be rank one.
2103
2104 2018-02-23 Steven G. Kargl <kargl@gcc.gnu.org>
2105
2106 PR fortran/84511
2107 * trans-io.c (transfer_expr): Deal with C_LOC in transfer statement.
2108
2109 2018-02-23 Steven G. Kargl <kargl@gcc.gnu.org>
2110
2111 PR fortran/84346
2112 * interface.c (compare_actual_formal): Issue error if keyword is
2113 used in a statement function.
2114
2115 2018-02-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2116
2117 PR fortran/84506
2118 * trans-io.c (set_parameter_value_inquire): Adjust range check of
2119 negative unit values for kind=8 units to the kind=4 negative limit.
2120
2121 2018-02-23 Paul Thomas <pault@gcc.gnu.org>
2122
2123 PR fortran/83149
2124 * trans-types.c (gfc_sym_type): Test sym->ns->proc_name before
2125 accessing its components.
2126
2127 2018-02-23 Paul Thomas <pault@gcc.gnu.org>
2128
2129 PR fortran/83149
2130 * trans-decl.c (gfc_finish_var_decl): Test sym->ns->proc_name
2131 before accessing its components.
2132
2133 2018-02-23 Paul Thomas <pault@gcc.gnu.org>
2134
2135 PR fortran/83148
2136 * trans-const.c : Clean up some whitespace issues.
2137 * trans-expr.c (gfc_conv_initializer): If an iso_c_binding
2138 derived type has a kind value of zero, set it to the default
2139 integer kind.
2140
2141 2018-02-23 Janne Blomqvist <jb@gcc.gnu.org>
2142
2143 PR fortran/84519
2144 * trans-decl.c (gfc_build_builtin_function_decls): Add bool
2145 argument to stop and error stop decls.
2146 * trans-stmt.c (gfc_trans_stop): Add false value to argument
2147 lists.
2148
2149 2018-02-22 Janne Blomqvist <jb@gcc.gnu.org>
2150
2151 PR 78534
2152 PR 84509
2153 * trans-decl.c (gfc_build_builtin_function_decls): Pass
2154 gfc_int8_type node to pause_numeric, size_type_node to
2155 pause_string.
2156 * trans-stmt.c (gfc_trans_pause): Likewise.
2157
2158 2018-02-22 Janne Blomqvist <jb@gcc.gnu.org>
2159
2160 * gfortran.texi: Update Coarray API description.
2161 * trans-decl.c (gfc_build_builtin_function_decls): Use size_t for
2162 character lengths, int for exit codes.
2163 (generate_coarray_sym_init): Use size_t for character length.
2164 * trans-intrinsic.c (conv_co_collective): Likewise.
2165 * trans-stmt.c (gfc_trans_lock_unlock): Likewise.
2166 (gfc_trans_event_post_wait): Likewise.
2167 (gfc_trans_sync): Likewise.
2168 (gfc_trans_stop): Use size_t for character lengths, int for exit
2169 codes.
2170
2171 2018-02-20 Thomas Koenig <tkoenig@gcc.gnu.org>
2172
2173 PR fortran/48890
2174 PR fortran/83823
2175 * primary.c (gfc_convert_to_structure_constructor):
2176 For a constant string constructor, make sure the length
2177 is correct.
2178
2179 2018-02-19 Paul Thomas <pault@gcc.gnu.org>
2180
2181 PR fortran/83344
2182 PR fortran/83975
2183 * resolve.c (resolve_assoc_var): Rearrange the logic for the
2184 determination of the character length of associate names. If
2185 the associate name is missing a length expression or the length
2186 expression is not a constant and the target is not a variable,
2187 make the associate name allocatable and deferred length.
2188 * trans-decl.c (gfc_get_symbol_decl): Null the character length
2189 backend_decl for deferred length associate names that are not
2190 variables. Set 'length' to gfc_index_zero_node for character
2191 associate names, whose character length is a PARM_DECL.
2192
2193 2018-02-19 Thomas Koenig <tkoenig@gcc.gnu.org>
2194
2195 PR fortran/35339
2196 * frontend-passes.c (traverse_io_block): Remove workaround for
2197 PR 80945.
2198
2199 2018-02-19 Andre Vehreschild <vehre@gcc.gnu.org>
2200
2201 * gfortran.texi: Document additional src/dst_type. Fix some typos.
2202 * trans-decl.c (gfc_build_builtin_function_decls): Declare the new
2203 argument of _caf_*_by_ref () with * e { get, send, sendget }.
2204 * trans-intrinsic.c (gfc_conv_intrinsic_caf_get): Add the type of the
2205 data referenced when generating a call to caf_get_by_ref ().
2206 (conv_caf_send): Same but for caf_send_by_ref () and
2207 caf_sendget_by_ref ().
2208
2209 2018-02-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2210
2211 PR fortran/84389
2212 * io.c (check_format): Allow FMT_COLON.
2213
2214 2018-02-18 Paul Thomas <pault@gcc.gnu.org>
2215
2216 PR fortran/80945
2217 * trans-array.c (gfc_conv_expr_descriptor): Set parmtype from
2218 the typenode in the case of deferred length characters.
2219
2220 2018-02-17 Thomas Koenig <tkoenig@gcc.gnu.org>
2221
2222 PR fortran/84270
2223 * frontend-passes (scalarized_expr): If the expression
2224 is an assumed size array, leave in the last reference
2225 and pass AR_SECTION instead of AR_FULL to gfc_resolve
2226 in order to avoid an error.
2227
2228 2018-02-17 Paul Thomas <pault@gcc.gnu.org>
2229
2230 PR fortran/84115
2231 * resolve.c (resolve_assoc_var): If a non-constant target expr.
2232 has no string length expression, make the associate variable
2233 into a deferred length, allocatable symbol.
2234 * trans-decl.c (gfc_is_reallocatable_lhs): Add and use a ptr to
2235 the symbol.
2236 * trans-stmt.c (trans_associate_var): Null and free scalar
2237 associate names that are allocatable. After assignment, remove
2238 the allocatable attribute to prevent reallocation.
2239
2240 2018-02-16 Jakub Jelinek <jakub@redhat.com>
2241
2242 PR fortran/84418
2243 * trans-openmp.c (gfc_trans_omp_clauses): For OMP_CLAUSE_LINEAR_REF
2244 kind set OMP_CLAUSE_LINEAR_STEP to TYPE_SIZE_UNIT times last_step.
2245
2246 2018-02-16 Dominique d'Humieres <dominiq@gcc.gnu.org>
2247
2248 PR fortran/84354
2249 * decl.c (gfc_get_pdt_instance): Replace '%qs' with %qs.
2250
2251 2018-02-15 Janus Weil <janus@gcc.gnu.org>
2252
2253 PR fortran/84409
2254 * interface.c (check_dtio_arg_TKR_intent): Add a check for character
2255 length.
2256
2257 2018-02-14 Janus Weil <janus@gcc.gnu.org>
2258
2259 PR fortran/84385
2260 * match.c (gfc_match_select_type): Fix check for selector in
2261 SELECT TYPE statement.
2262
2263 2018-02-13 Janus Weil <janus@gcc.gnu.org>
2264
2265 PR fortran/84313
2266 * symbol.c (check_conflict): Reject procedure pointers in common blocks.
2267
2268 2018-02-13 Alastair McKinstry <alastair.mckinstry@sceal.ie>
2269 Janne Blomqvist <jb@gcc.gnu.org>
2270
2271 * module.c (dump_module): Use lbasename to ensure that module
2272 files are reproducible.
2273
2274 2018-02-12 Janus Weil <janus@gcc.gnu.org>
2275
2276 PR fortran/84273
2277 * resolve.c (resolve_component): Fix checks of passed argument in
2278 procedure-pointer components.
2279
2280 2018-02-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2281
2282 PR fortran/35299
2283 * resolve.c (resolve_formal_arglist): Update error message.
2284
2285 2018-02-11 Andre Vehreschild <vehre@gcc.gnu.org>
2286
2287 * gfortran.texi: Fix typos in documentation of caf_register ().
2288 * trans-array.c (structure_alloc_comps): Only register a component of
2289 a derived typed corray, not of an ultimate component coarray.
2290
2291 2018-02-11 Steven G. Kargl <kargl@gcc.gnu.org>
2292
2293 PR fortran/54223
2294 PR fortran/84276
2295 * interface.c (compare_actual_formal): Add in_statement_function
2296 bool parameter. Skip check of INTENT attribute for statement
2297 functions. Arguments to a statement function cannot be optional,
2298 issue error for missing argument.
2299 (gfc_procedure_use, gfc_ppc_use, gfc_arglist_matches_symbol): Use
2300 in_statement_function.
2301
2302 2018-02-11 Paul Thomas <pault@gcc.gnu.org>
2303
2304 PR fortran/84074
2305 * trans-expr.c (gfc_conv_derived_to_class): Set the use_offset
2306 flag. If the is a vector subscript or the expression is not a
2307 variable, make the descriptor one-based.
2308
2309 2018-02-10 Paul Thomas <pault@gcc.gnu.org>
2310
2311 PR fortran/84141
2312 PR fortran/84155
2313 * trans-array.c (gfc_array_init_size): Revert the change made
2314 in revision 257356 setting the dtype.
2315 * trans-types.c (gfc_get_dtype): Do not use the cached dtype.
2316 Call gfc_get_dtype_rank_type every time.
2317
2318 PR fortran/56691
2319 * trans-array.c (gfc_conv_expr_descriptor): If the source array
2320 is a descriptor type, use its offset, removing the condition
2321 that is be a class expression.
2322
2323 2018-02-07 Steven G. Kargl <kargl@gcc.gnu.org>
2324
2325 PR fortran/82994
2326 * match.c (gfc_match_deallocate): Check for NULL pointer.
2327
2328 2018-02-07 Thomas Koenig <tkoenig@gcc.gnu.org>
2329
2330 PR fortran/68560
2331 * trans-intrinsic.c (gfc_conv_intrinsic_shape): New function.
2332 (gfc_conv_intrinsic_function): Call it.
2333
2334 2018-02-07 Steven G. Kargl <kargl@gcc.gnu.org>
2335
2336 PR fortran/82049
2337 * match.c (gfc_match_type_spec): If the charlen is non-NULL, then
2338 try to resolve it. While here return early if possible.
2339
2340 2018-02-04 Paul Thomas <pault@gcc.gnu.org>
2341
2342 PR fortran/84115
2343 * trans-decl.c (gfc_get_symbol_decl): Do not finish the decl of
2344 'length' if the symbol charlen backend_decl is an indirect ref.
2345
2346 2018-02-03 Paul Thomas <pault@gcc.gnu.org>
2347
2348 PR fortran/84141
2349 PR fortran/84155
2350 * trans-array.c (gfc_array_init_size): Instead of gfc_get_dtype
2351 use gfc_get_dtype_rank_type.
2352
2353 2018-02-01 Janne Blomqvist <jb@gcc.gnu.org>
2354
2355 PR 83975
2356 PR 83344
2357 * resolve.c (resolve_assoc_var): Generate an error if
2358 target length unknown.
2359
2360 2018-02-01 Janne Blomqvist <jb@gcc.gnu.org>
2361
2362 PR fortran/83705
2363 * simplify.c (gfc_simplify_repeat): Increase limit for deferring
2364 to runtime, print a warning message.
2365
2366 2018-01-31 Jakub Jelinek <jakub@redhat.com>
2367
2368 PR fortran/84116
2369 * openmp.c (gfc_match_omp_clauses): If all the linear
2370 gfc_match_omp_variable_list calls failed, don't gfc_free_omp_namelist
2371 nor set *head = NULL. Formatting fixes.
2372
2373 2018-01-31 Paul Thomas <pault@gcc.gnu.org>
2374
2375 PR fortran/84088
2376 * trans-expr.c (gfc_conv_procedure_call): If the parm expr is
2377 an address expression passed to an assumed rank dummy, convert
2378 to an indirect reference.
2379
2380 2018-01-31 Thomas Koenig <tkoenig@gcc.gnu.org>
2381
2382 * dump-parse-tree.c (write_proc): Use sym_name (which may
2383 be sym->binding_label) instead of sym->name.
2384
2385 2018-01-31 Janne Blomqvist <jb@gcc.gnu.org>
2386
2387 * trans-const.c (gfc_conv_string_init): Use gfc_charlen_t instead
2388 of int for slen.
2389
2390 2018-01-31 Janne Blomqvist <jb@gcc.gnu.org>
2391
2392 PR fortran/78534
2393 * trans-expr.c (fill_with_spaces): Use memset instead of
2394 generating loop.
2395 (gfc_trans_string_copy): Improve opportunity to use builtins with
2396 constant lengths.
2397
2398 2018-01-30 Jakub Jelinek <jakub@redhat.com>
2399
2400 PR debug/84131
2401 * trans-array.c (gfc_get_descriptor_offsets_for_info): Set *data_off
2402 to DATA_FIELD's offset rather than OFFSET_FIELD's offset.
2403
2404 2018-01-30 Thomas Koenig <tkoenig@gcc.gnu.org>
2405
2406 PR fortran/84134
2407 * array.c (gfc_ref_dimen_size): Whitespace fixes. If stride is
2408 zero, return false.
2409
2410 2018-01-30 Thomas Koenig <tkoenig@gcc.gnu.org>
2411
2412 PR fortran/84133
2413 * frontend-passes (matmul_to_var_expr): Return early if
2414 in association list.
2415 (inline_matmul_assign): Likewise.
2416
2417 2017-01-29 Thomas Koenig <tkoenig@gcc.gnu.org>
2418
2419 PR fortran/84073
2420 * resolve.c (resolve_component): Ensure BIND(C) character
2421 components have length one.
2422 (resolve_symbol): Likewise for variables.
2423
2424 2018-01-27 Jakub Jelinek <jakub@redhat.com>
2425
2426 PR fortran/84065
2427 * decl.c (add_init_expr_to_sym): Ignore initializers for too large
2428 lengths.
2429
2430 2018-01-26 Damian Rouson <damian@sourceryinstitute.org>
2431 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
2432 Soren Rasmussen <s.c.rasmussen@gmail.com>
2433
2434 Partial support for Fortran 2018 teams features.
2435
2436 * array.c (gfc_match_array_ref): add team attribute in coarray
2437 transfers.
2438 * check.c (gfc_check_get_team, gfc_check_team_number): add new
2439 functions for get_team and team_number.
2440 * dump-parse-tree.c (show_code_node): add new statements: form team,
2441 change team, end team, and sync team.
2442 * expr.c (gfc_find_team_co): add new function.
2443 * gfortran.h: add new statements.
2444 * intrinsic.c (add_functions): add get_team and team_number functions.
2445 * intrinsic.h: add get_team and team_number prototypes for check,
2446 simplify, and resolve.
2447 * iresolve.c (gfc_resolve_get_team, gfc_resolve_team_number): add new
2448 functions.
2449 * iso-fortran-env.def: add the team_type derived type.
2450 * match.c (gfc_match_if, gfc_match_form_team, gfc_match_team_number)
2451 (gfc_match_end_team, gfc_match_sync_team, gfc_match_change_team):
2452 add change team, end team, form team, sync team match and functions.
2453 * match.h: add new prototypes for change team, end team, form team,
2454 and sync team.
2455 * parse.c (decode_statement): add cases for change team, end team,
2456 form team, and sync team.
2457 * resolve.c: add cases for exec form team, change team, end team, and
2458 sync team.
2459 * simplify.c (gfc_simplify_get_team): add new function for get team.
2460 * st.c (gfc_free_statement): add cases exec for change team, end team,
2461 form team, sync team.
2462 * trans-decl.c (gfor_fndecl_caf_form_team)
2463 (gfor_fndecl_caf_change_team, gfor_fndecl_caf_end_team)
2464 (gfor_fndecl_caf_sync_team, gfor_fndecl_caf_get_team)
2465 (gfor_fndecl_caf_team_number): add functions and definitions.
2466 * trans-intrinsic.c (conv_caf_send, conv_intrinsic_team_number): add
2467 new function and team_type argument support.
2468 * trans-stmt.c (gfc_trans_form_team, gfc_trans_change_team)
2469 (gfc_trans_end_team, gfc_trans_sync_team): add new functions.
2470 * trans-stmt.h: add new prototypes.
2471 * trans-types.c (gfc_get_derived_type): check condition for team_type.
2472 * trans.c (trans_code): new exec cases for form team, change team, end
2473 team, and sync team.
2474 * trans.h: add new prototypes.
2475
2476 2018-01-26 Steven G. Kargl <kargl@gcc.gnu.org>
2477
2478 PR fortran/83998
2479 * simplify.c (compute_dot_product): Initialize result to INTEGER(1) 0
2480 or .false. The summation does the correct type conversion.
2481 (gfc_simplify_dot_product): Special case zero-sized arrays.
2482
2483 2018-25-01 Paul Thomas <pault@gcc.gnu.org>
2484
2485 PR fortran/37577
2486 * array.c (gfc_match_array_ref): If standard earlier than F2008
2487 it is an error if the reference dimension is greater than 7.
2488 libgfortran.h : Increase GFC_MAX_DIMENSIONS to 15. Change the
2489 dtype masks and shifts accordingly.
2490 * trans-array.c (gfc_conv_descriptor_dtype): Use the dtype
2491 type node to check the field.
2492 (gfc_conv_descriptor_dtype): Access the rank field of dtype.
2493 (duplicate_allocatable_coarray): Access the rank field of the
2494 dtype descriptor rather than the dtype itself.
2495 * trans-expr.c (get_scalar_to_descriptor_type): Store the type
2496 of 'scalar' on entry and use its TREE_TYPE if it is ARRAY_TYPE
2497 (ie. a character).
2498 (gfc_conv_procedure_call): Pass TREE_OPERAND (tmp,0) to
2499 get_scalar_to_descriptor_type if the actual expression is a
2500 constant.
2501 (gfc_trans_structure_assign): Assign the rank directly to the
2502 dtype rank field.
2503 * trans-intrinsic.c (gfc_conv_intrinsic_rank): Cast the result
2504 to default integer kind.
2505 (gfc_conv_intrinsic_sizeof): Obtain the element size from the
2506 'elem_len' field of the dtype.
2507 * trans-io.c (gfc_build_io_library_fndecls): Replace
2508 gfc_int4_type_node with dtype_type_node where necessary.
2509 (transfer_namelist_element): Use gfc_get_dtype_rank_type for
2510 scalars.
2511 * trans-types.c : Provide 'get_dtype_type_node' to acces the
2512 dtype_type_node and, if necessary, build it.
2513 The maximum size of an array element is now determined by the
2514 maximum value of size_t.
2515 Update the description of the array descriptor, including the
2516 type def for the dtype_type.
2517 (gfc_get_dtype_rank_type): Build a constructor for the dtype.
2518 Distinguish RECORD_TYPEs that are BT_DERIVED or BT_CLASS.
2519 (gfc_get_array_descriptor_base): Change the type of the dtype
2520 field to dtype_type_node.
2521 (gfc_get_array_descr_info): Get the offset to the rank field of
2522 the dtype.
2523 * trans-types.h : Add a prototype for 'get_dtype_type_node ()'.
2524 * trans.h : Define the indices of the dtype fields.
2525
2526 2018-23-01 Paul Thomas <pault@gcc.gnu.org>
2527
2528 PR fortran/83866
2529 * decl.c (gfc_match_derived_decl): If eos not matched, recover
2530 and emit error about garbage after declaration.
2531
2532 2018-23-01 Paul Thomas <pault@gcc.gnu.org>
2533
2534 PR fortran/83898
2535 * trans-stmt.c (trans_associate_var): Do not set cst_array_ctor
2536 for characters.
2537
2538 2018-01-22 Janne Blomqvist <jb@gcc.gnu.org>
2539
2540 PR 78534
2541 PR 83704
2542 * arith.c (gfc_arith_concat): Use size_t for string length.
2543 (gfc_compare_string): Likewise.
2544 (gfc_compare_with_Cstring): Likewise.
2545 * array.c (gfc_resolve_character_array_constructor): Use
2546 HOST_WIDE_INT, gfc_mpz_get_hwi.
2547 * check.c (gfc_check_fe_runtime_error): Use size_t.
2548 * data.c (create_character_initializer): Use HOST_WIDE_INT,
2549 gfc_extract_hwi.
2550 * decl.c (gfc_set_constant_character_len): Use gfc_charlen_t.
2551 (add_init_expr_to_sym): Use HOST_WIDE_INT.
2552 * expr.c (gfc_build_init_expr): Use HOST_WIDE_INT,
2553 gfc_extract_hwi.
2554 (gfc_apply_init): Likewise.
2555 * match.h (gfc_set_constant_character_len): Update prototype.
2556 * primary.c (match_string_constant): Use size_t.
2557 * resolve.c (resolve_ordinary_assign): Use HOST_WIDE_INT,
2558 gfc_mpz_get_hwi.
2559 * simplify.c (init_result_expr): Likewise.
2560 (gfc_simplify_len_trim): Use size_t.
2561 * target-memory.c (gfc_encode_character): Use size_t.
2562 (gfc_target_encode_expr): Use HOST_WIDE_INT, gfc_mpz_get_hwi.
2563 (interpret_array): Use size_t.
2564 (gfc_interpret_character): Likewise.
2565 * target-memory.h (gfc_encode_character): Update prototype.
2566 (gfc_interpret_character): Likewise.
2567 (gfc_target_interpret_expr): Likewise.
2568 * trans-const.c (gfc_build_string_const): Use size_t for length
2569 argument.
2570 (gfc_build_wide_string_const): Likewise.
2571 * trans-const.h (gfc_build_string_const): Likewise.
2572 (gfc_build_wide_string_const): Likewise.
2573
2574 2018-01-20 Steven G. Kargl <kargl@gcc.gnu.org>
2575
2576 PR fortran/83900
2577 * simplify.c (gfc_simplify_matmul): Set return type correctly.
2578
2579 2018-01-19 Steven G. Kargl <kargl@gcc.gnu.org>
2580
2581 PR fortran/83900
2582 * simplify.c (gfc_simplify_matmul): Delete bogus assertion.
2583
2584 2018-01-17 Harald Anlauf <anlauf@gmx.de>
2585
2586 PR fortran/83864
2587 * expr.c (add_init_expr_to_sym): Do not dereference NULL pointer.
2588
2589 2018-01-17 Harald Anlauf <anlauf@gmx.de>
2590
2591 PR fortran/83874
2592 * decl.c (add_init_expr_to_sym): Do not dereference NULL pointer.
2593
2594 2018-01-15 Louis Krupp <louis.krupp@zoho.com>
2595
2596 PR fortran/82257
2597 * interface.c (compare_rank): Don't try to retrieve CLASS_DATA
2598 from symbol marked unlimited polymorphic.
2599 * resolve.c (resolve_structure_cons): Likewise.
2600 * misc.c (gfc_typename): Don't dereference derived->components
2601 if it's NULL.
2602
2603 2018-01-15 Thomas Koenig <tkoenig@gcc.gnu.org>
2604
2605 PR fortran/54613
2606 * gfortran.h (gfc_check_f): Rename f4ml to f5ml.
2607 (gfc_logical_4_kind): New macro
2608 * intrinsic.h (gfc_simplify_minloc): Add a gfc_expr *argument.
2609 (gfc_simplify_maxloc): Likewise.
2610 (gfc_resolve_maxloc): Likewise.
2611 (gfc_resolve_minloc): Likewise.
2612 * check.c (gfc_check_minloc_maxloc): Add checking for "back"
2613 argument; also raise error if it is used (for now). Add it
2614 if it isn't present.
2615 * intrinsic.c (add_sym_4ml): Rename to
2616 (add_sym_5ml), adjust for extra argument.
2617 (add_functions): Add "back" constant. Adjust maxloc and minloc
2618 for back argument.
2619 * iresolve.c (gfc_resolve_maxloc): Add back argument. If back is
2620 not of gfc_logical_4_kind, convert.
2621 (gfc_resolve_minloc): Likewise.
2622 * simplify.c (gfc_simplify_minloc): Add back argument.
2623 (gfc_simplify_maxloc): Likewise.
2624 * trans-intinsic.c (gfc_conv_intrinsic_minmaxloc): Rename last
2625 argument to %VAL to ensure passing by value.
2626 (gfc_conv_intrinsic_function): Call gfc_conv_intrinsic_minmaxloc
2627 also for library calls.
2628
2629 2018-01-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2630
2631 PR fortran/82007
2632 * resolve.c (resolve_transfer): Delete code looking for 'DT'
2633 format specifiers in format strings. Set formatted to true if a
2634 format string or format label is present.
2635 * trans-io.c (get_dtio_proc): Likewise. (transfer_expr): Fix
2636 whitespace.
2637
2638 2018-01-13 Thomas Koenig <tkoenig@gcc.gnu.org>
2639
2640 PR fortran/83744
2641 * dump-parse-tree.c (get_c_type_name): Remove extra line.
2642 Change for loop to use declaration in for loop. Handle BT_LOGICAL
2643 and BT_CHARACTER.
2644 (write_decl): Add where argument. Fix indentation. Replace
2645 assert with error message. Add typename to warning
2646 in comment.
2647 (write_type): Adjust locus to call of write_decl.
2648 (write_variable): Likewise.
2649 (write_proc): Likewise. Replace assert with error message.
2650
2651 2018-01-13 Paul Thomas <pault@gcc.gnu.org>
2652
2653 PR fortran/52162
2654 * trans-expr.c (gfc_trans_scalar_assign): Flag is_alloc_lhs if
2655 the rhs expression is neither an elemental nor a conversion
2656 function.
2657
2658 PR fortran/83622
2659 * trans-array.c (is_pointer_array): Remove unconditional return
2660 of false for -fopenmp.
2661
2662 2018-01-13 Thomas Koenig <tkoenig@gcc.gnu.org>
2663 <emsr@gcc.gnu.org>
2664
2665 PR fortran/83803
2666 * dump-parse-tree.c (write_proc): Always emit closing parenthesis
2667 for functions.
2668
2669 2018-01-10 Steven G. Kargl <kargl@gcc.gnu.org>
2670
2671 PR fortran/82367
2672 * resolve.c (resolve_allocate_expr): Check for NULL pointer.
2673
2674 2018-01-10 Steven G. Kargl <kargl@gcc.gnu.org>
2675
2676 PR fortran/83093
2677 * resolve.c (resolve_charlen): Check the type of cl->length
2678 after resolution.
2679
2680 2018-01-10 Janne Blomqvist <jb@gcc.gnu.org>
2681
2682 PR fortran/83740
2683 * trans-array.c (gfc_trans_array_ctor_element): Fix formatting.
2684
2685 2018-01-10 Janne Blomqvist <jb@gcc.gnu.org>
2686
2687 PR fortran/83740
2688 * trans-array.c (gfc_trans_array_ctor_element): Convert RHS to the
2689 LHS type when assigning.
2690
2691 2018-01-09 Steven G. Kargl <kargl@gcc.gnu.org>
2692
2693 PR fortran/83742
2694 * expr.c (gfc_is_simply_contiguous): Check for NULL pointer.
2695
2696 2018-01-08 Steven G. Kargl <kargl@gcc.gnu.org>
2697
2698 * match.c (gfc_match_allocate): Check for NULL pointer.
2699
2700 2018-01-08 Steven G. Kargl <kargl@gcc.gnu.org>
2701
2702 * expr.c (gfc_check_pointer_assign): Fix typo in comment.
2703
2704 2018-01-08 Paul Thomas <pault@gcc.gnu.org>
2705
2706 PR fortran/83611
2707 * decl.c (gfc_get_pdt_instance): If parameterized arrays have
2708 an initializer, convert the kind parameters and add to the
2709 component if the instance.
2710 * trans-array.c (structure_alloc_comps): Add 'is_pdt_type' and
2711 use it with case COPY_ALLOC_COMP. Call 'duplicate_allocatable'
2712 for parameterized arrays. Clean up typos in comments. Convert
2713 parameterized array initializers and copy into the array.
2714 * trans-expr.c (gfc_trans_scalar_assign): Do a deep copy for
2715 parameterized types.
2716 *trans-stmt.c (trans_associate_var): Deallocate associate vars
2717 as necessary, when they are PDT function results for example.
2718
2719 PR fortran/83731
2720 * trans-array.c (structure_alloc_comps): Only compare len parms
2721 when they are declared explicitly.
2722
2723 2018-01-06 Janne Blomqvist <jb@gcc.gnu.org>
2724
2725 PR fortran/50892
2726 * trans-expr.c (gfc_trans_pointer_assignment): fold_convert rhs to
2727 lhs type.
2728
2729 2018-01-05 Janne Blomqvist <jb@gcc.gnu.org>
2730
2731 PR fortran/78534
2732 PR fortran/66310
2733 * array.c (got_charlen): Use gfc_charlen_int_kind.
2734 * class.c (gfc_find_derived_vtab): Use gfc_size_kind instead of
2735 hardcoded kind.
2736 (find_intrinsic_vtab): Likewise.
2737 * decl.c (match_char_length): Use gfc_charlen_int_kind.
2738 (add_init_expr_to_sym): Use gfc_charlen_t and gfc_charlen_int_kind.
2739 (gfc_match_implicit): Use gfc_charlen_int_kind.
2740 * dump-parse-tree.c (show_char_const): Use gfc_charlen_t and size_t.
2741 (show_expr): Use HOST_WIDE_INT_PRINT_DEC.
2742 * expr.c (gfc_get_character_expr): Length parameter of type
2743 gfc_charlen_t.
2744 (gfc_get_int_expr): Value argument of type HOST_WIDE_INT.
2745 (gfc_extract_hwi): New function.
2746 (simplify_const_ref): Make string_len of type gfc_charlen_t.
2747 (gfc_simplify_expr): Use HOST_WIDE_INT for substring refs.
2748 * frontend-passes.c (optimize_trim): Use gfc_charlen_int_kind.
2749 * gfortran.h (gfc_mpz_get_hwi): New prototype.
2750 (gfc_mpz_set_hwi): Likewise.
2751 (gfc_charlen_t): New typedef.
2752 (gfc_expr): Use gfc_charlen_t for character lengths.
2753 (gfc_size_kind): New extern variable.
2754 (gfc_extract_hwi): New prototype.
2755 (gfc_get_character_expr): Use gfc_charlen_t for character length.
2756 (gfc_get_int_expr): Use HOST_WIDE_INT type for value argument.
2757 * gfortran.texi: Update description of hidden string length argument.
2758 * iresolve.c (check_charlen_present): Use gfc_charlen_int_kind.
2759 (gfc_resolve_char_achar): Likewise.
2760 (gfc_resolve_repeat): Pass string length directly without
2761 temporary, use gfc_charlen_int_kind.
2762 (gfc_resolve_transfer): Use gfc_charlen_int_kind.
2763 * match.c (select_intrinsic_set_tmp): Use HOST_WIDE_INT for charlen.
2764 * misc.c (gfc_mpz_get_hwi): New function.
2765 (gfc_mpz_set_hwi): New function.
2766 * module.c (atom_int): Change type from int to HOST_WIDE_INT.
2767 (parse_integer): Don't complain about large integers.
2768 (write_atom): Use HOST_WIDE_INT for integers.
2769 (mio_integer): Handle integer type mismatch.
2770 (mio_hwi): New function.
2771 (mio_intrinsic_op): Use HOST_WIDE_INT.
2772 (mio_array_ref): Likewise.
2773 (mio_expr): Likewise.
2774 * primary.c (match_substring): Use gfc_charlen_int_kind.
2775 * resolve.c (resolve_substring_charlen): Use gfc_charlen_int_kind.
2776 (resolve_character_operator): Likewise.
2777 (resolve_assoc_var): Likewise.
2778 (resolve_select_type): Use HOST_WIDE_INT for charlen, use snprintf.
2779 (resolve_charlen): Use mpz_sgn to determine sign.
2780 * simplify.c (gfc_simplify_repeat): Use HOST_WIDE_INT/gfc_charlen_t
2781 instead of long.
2782 * symbol.c (generate_isocbinding_symbol): Use gfc_charlen_int_kind.
2783 * target-memory.c (size_character): Length argument of type
2784 gfc_charlen_t.
2785 (gfc_encode_character): Likewise.
2786 (gfc_interpret_character): Use gfc_charlen_t.
2787 * target-memory.h (gfc_encode_character): Modify prototype.
2788 * trans-array.c (gfc_trans_array_ctor_element): Use existing type.
2789 (get_array_ctor_var_strlen): Use gfc_conv_mpz_to_tree_type.
2790 (trans_array_constructor): Use existing type.
2791 (get_array_charlen): Likewise.
2792 * trans-const.c (gfc_conv_mpz_to_tree_type): New function.
2793 * trans-const.h (gfc_conv_mpz_to_tree_type): New prototype.
2794 * trans-decl.c (gfc_trans_deferred_vars): Use existing type.
2795 (add_argument_checking): Likewise.
2796 * trans-expr.c (gfc_class_len_or_zero_get): Build const of type
2797 gfc_charlen_type_node.
2798 (gfc_conv_intrinsic_to_class): Use gfc_charlen_int_kind instead of
2799 4, fold_convert to correct type.
2800 (gfc_conv_class_to_class): Build const of type size_type_node for
2801 size.
2802 (gfc_copy_class_to_class): Likewise.
2803 (gfc_conv_string_length): Use same type in expression.
2804 (gfc_conv_substring): Likewise, use HOST_WIDE_INT for charlen.
2805 (gfc_conv_string_tmp): Make sure len is of the right type.
2806 (gfc_conv_concat_op): Use same type in expression.
2807 (gfc_conv_procedure_call): Likewise.
2808 (fill_with_spaces): Comment out memset() block due to spurious
2809 -Wstringop-overflow warnings.
2810 (gfc_trans_string_copy): Use gfc_charlen_type_node.
2811 (alloc_scalar_allocatable_for_subcomponent_assignment):
2812 fold_convert to right type.
2813 (gfc_trans_subcomponent_assign): Likewise.
2814 (trans_class_vptr_len_assignment): Build const of correct type.
2815 (gfc_trans_pointer_assignment): Likewise.
2816 (alloc_scalar_allocatable_for_assignment): fold_convert to right
2817 type in expr.
2818 (trans_class_assignment): Build const of correct type.
2819 * trans-intrinsic.c (gfc_conv_associated): Likewise.
2820 (gfc_conv_intrinsic_repeat): Do calculation in sizetype.
2821 * trans-io.c (gfc_build_io_library_fndecls): Use
2822 gfc_charlen_type_node for character lengths.
2823 (set_string): Convert to right type in assignment.
2824 * trans-stmt.c (gfc_trans_label_assign): Build const of
2825 gfc_charlen_type_node.
2826 (trans_associate_var): Likewise.
2827 (gfc_trans_character_select): Likewise.
2828 (gfc_trans_allocate): Likewise, don't typecast strlen result.
2829 (gfc_trans_deallocate): Don't typecast strlen result.
2830 * trans-types.c (gfc_size_kind): New variable.
2831 (gfc_init_types): Determine gfc_charlen_int_kind and gfc_size_kind
2832 from size_type_node.
2833 * trans-types.h: Fix comment.
2834
2835 2018-01-04 Thomas Koenig <tkoenig@gcc.gnu.org>
2836
2837 PR fortran/83683
2838 PR fortran/45689
2839 * check.c (gfc_check_eoshift): Check for string length and
2840 for conformance of boundary.
2841 * intrinsic.c (add_functions): Add gfc_simplify_eoshift.
2842 * intrinsic.h: Add prototype for gfc_simplify_eoshift.
2843 * simplify.c (gfc_simplify_eoshift): New function.
2844
2845 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2846 Alan Hayward <alan.hayward@arm.com>
2847 David Sherwood <david.sherwood@arm.com>
2848
2849 * trans-types.c (gfc_type_for_mode): Handle MODE_VECTOR_BOOL.
2850
2851 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2852 Alan Hayward <alan.hayward@arm.com>
2853 David Sherwood <david.sherwood@arm.com>
2854
2855 * trans-types.c (gfc_type_for_mode): Check valid_vector_subparts_p.
2856
2857 2018-01-03 Thomas Koenig <tkoenig@gcc.gnu.org>
2858
2859 PR fortran/83664
2860 * check.c (gfc_check_eoshift): Error for missing boundary if array
2861 is not one of the standard types.
2862
2863 2018-01-03 Jakub Jelinek <jakub@redhat.com>
2864
2865 Update copyright years.
2866
2867 * gfortranspec.c (lang_specific_driver): Update copyright notice
2868 dates.
2869 * gfc-internals.texi: Bump @copying's copyright year.
2870 * gfortran.texi: Ditto.
2871 * intrinsic.texi: Ditto.
2872 * invoke.texi: Ditto.
2873
2874 2017-01-02 Thomas Koenig <tkoenig@gcc.gnu.org>
2875
2876 PR fortran/45689
2877 * intrinsic.c (add_function): Add gfc_simplify_maxloc and
2878 gfc_simplify_minloc to maxloc and minloc, respectively.
2879 * intrinsic.h: Add prototypes for gfc_simplify_minloc
2880 and gfc_simplify_maxloc.
2881 * simplify.c (min_max_chose): Adjust prototype. Modify function
2882 to have a return value which indicates if the extremum was found.
2883 (is_constant_array_expr): Fix typo in comment.
2884 (simplify_minmaxloc_to_scalar): New function.
2885 (simplify_minmaxloc_nodim): New function.
2886 (new_array): New function.
2887 (simplify_minmaxloc_to_array): New function.
2888 (gfc_simplify_minmaxloc): New function.
2889 (simplify_minloc): New function.
2890 (simplify_maxloc): New function.
2891
2892 2018-01-02 Thomas Koenig <tkoenig@gcc.gnu.org>
2893
2894 PR fortran/45689
2895 PR fortran/83650
2896 * simplify.c (gfc_simplify_cshift): Re-implement to allow full
2897 range of arguments.
2898
2899 2018-01-01 Paul Thomas <pault@gcc.gnu.org>
2900
2901 PR fortran/83076
2902 * resolve.c (resolve_fl_derived0): Add caf_token fields for
2903 allocatable and pointer scalars, when -fcoarray selected.
2904 * trans-types.c (gfc_copy_dt_decls_ifequal): Copy the token
2905 field as well as the backend_decl.
2906 (gfc_get_derived_type): Flag GFC_FCOARRAY_LIB for module
2907 derived types that are not vtypes. Components with caf_token
2908 attribute are pvoid types. For a component requiring it, find
2909 the caf_token field and have the component token field point to
2910 its backend_decl.
2911
2912 PR fortran/83319
2913 *trans-types.c (gfc_get_array_descriptor_base): Add the token
2914 field to the descriptor even when codimen not set.
2915 \f
2916 Copyright (C) 2018 Free Software Foundation, Inc.
2917
2918 Copying and distribution of this file, with or without modification,
2919 are permitted in any medium without royalty provided the copyright
2920 notice and this notice are preserved.
2921
2922 PR fortran/87945
2923 * decl.c (var_element): Inquiry parameters cannit be data objects.
2924
2925 2018-12-08 Steven G. Kargl <kargl@gcc.gnu.org>
2926
2927 PR fortran/88025
2928 * expr.c (gfc_apply_init): Remove asserts that cannot trigger.
2929 Check for a NULL pointer.
2930
2931 2018-12-08 Steven G. Kargl <kargl@gcc.gnu.org>
2932
2933 PR fortran/88357
2934 * class.c (insert_component_ref): Check for NULL pointer and
2935 previous error message issued.
2936 * parse.c (parse_associate): Check for NULL pointer.
2937 * resolve.c (resolve_assoc_var): Check for NULL pointer.
2938
2939 2018-12-07 Jakub Jelinek <jakub@redhat.com>
2940
2941 PR fortran/88377
2942 * trans-openmp.c (gfc_omp_clause_default_ctor,
2943 gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op,
2944 gfc_omp_clause_linear_ctor, gfc_omp_clause_dtor): Only consider
2945 GFC_DECL_GET_SCALAR_ALLOCATABLE vars as scalar allocatables if they
2946 have pointer type.
2947
2948 2018-12-03 Fritz Reese <fritzoreese@gmail.com>
2949 Mark Eggleston <mark.eggleston@codethink.co.uk>
2950
2951 PR fortran/87919
2952 * options.c (SET_FLAG, SET_BITFLAG, SET_BITFLAG2): New macros.
2953 (set_dec_flags): Set/unset DEC and std flags according to value.
2954 (post_dec_flags, set_init_local_zero): New functions.
2955 (gfc_init_options): Use set_init_local_zero and post_dec_flags.
2956 (gfc_handle_options) <case OPT_fcheck_array_temporaries>: Use
2957 SET_BITFLAG.
2958 <case OPT_finit_local_zero>: Use set_init_local_zero.
2959 <case OPT_fdec>: Pass value to set_dec_flags.
2960 <case OPT_fdec_structure>: Remove.
2961
2962 2018-11-30 Thomas Schwinge <thomas@codesourcery.com>
2963
2964 * gfortran.h (struct gfc_omp_clauses): Remove "wait". Adjust all
2965 users.
2966
2967 * openmp.c (gfc_match_omp_clauses): Support multiple OpenACC wait
2968 clauses.
2969
2970 2018-11-27 Martin Liska <mliska@suse.cz>
2971
2972 * decl.c (gfc_match_gcc_builtin): New function.
2973 * gfortran.h (struct vect_builtin_tuple): New.
2974 (gfc_adjust_builtins): Likewise.
2975 * lang-specs.h (TARGET_F951_OPTIONS): New.
2976 (F951_OPTIONS): Use it.
2977 * lang.opt: Add new option -fpre-include.
2978 * match.h (gfc_match_gcc_builtin): Declare new function.
2979 * parse.c (decode_gcc_attribute): Handle builtin.
2980 (parse_progunit): Call gfc_adjust_builtins.
2981 * scanner.c (gfc_new_file): Load pre-included header file
2982 when provided.
2983 * trans-intrinsic.c (add_simd_flag_for_built_in): New.
2984 (gfc_adjust_builtins): Likewise.
2985
2986 2018-11-24 Paul Thomas <pault@gcc.gnu.org>
2987
2988 PR fortran/88143
2989 * resolve.c (resolve_variable): Check for associate names with
2990 NULL target.
2991
2992 2018-11-23 Jakub Jelinek <jakub@redhat.com>
2993
2994 * lang.opt (fpad-source): New option.
2995 * scanner.c (load_line): Don't pad fixed form lines if
2996 !flag_pad_source.
2997 * invoke.texi (-fno-pad-source): Document.
2998
2999 2018-11-21 Jakub Jelinek <jakub@redhat.com>
3000
3001 * invoke.texi (-fdec-include): Document.
3002
3003 2018-11-21 Jakub Jelinek <jakub@redhat.com>
3004 Mark Eggleston <mark.eggleston@codethink.com>
3005
3006 * lang.opt (fdec-include): New option.
3007 * options.c (set_dec_flags): Set also flag_dec_include.
3008 * scanner.c (include_line): Change return type from bool to int.
3009 In fixed form allow spaces in between include keyword letters.
3010 For -fdec-include, allow in fixed form 0 in column 6. With
3011 -fdec-include return -1 if the parsed line is not full include
3012 statement and it could be successfully completed on continuation
3013 lines.
3014 (include_stmt): New function.
3015 (load_file): Adjust include_line caller. If it returns -1, keep
3016 trying include_stmt until it stops returning -1 whenever adding
3017 further line of input.
3018
3019 2018-11-18 Thomas Koenig <tkoenig@gcc.gnu.org>
3020
3021 PR fortran/88073
3022 * frontend-passes.c (combine_array_constructor): Do not do
3023 anything if in a WHERE statement.
3024
3025 2018-11-18 Thomas Koenig <tkoenig@gcc.gnu.org>
3026
3027 PR fortran/70260
3028 * expr.c (gfc_check_assign): Reject assigning to an external
3029 symbol.
3030 (gfc_check_pointer_assign): Add suppress_type_test
3031 argument. Insert line after if. A non-proc pointer can not point
3032 to a constant. Only check types if suppress_type_test is false.
3033 * gfortran.h (gfc_check_pointer_assign): Add optional
3034 suppress_type_test argument.
3035 * resolve.c (gfc_resolve_code): Move up gfc_check_pointer_assign
3036 and give it the extra argument.
3037 (resolve_fl_procedure): Set error on value for a function with
3038 an inizializer.
3039
3040 2018-11-15 David Malcolm <dmalcolm@redhat.com>
3041
3042 PR other/19165
3043 * error.c (gfc_diagnostic_finalizer): Add diagnostic_t param.
3044
3045 2018-11-13 David Malcolm <dmalcolm@redhat.com>
3046
3047 * cpp.c: Replace "source_location" with "location_t".
3048 * gfortran.h: Likewise.
3049
3050 2018-11-08 Jakub Jelinek <jakub@redhat.com>
3051
3052 * trans-openmp.c (gfc_trans_omp_clauses): Use
3053 OMP_CLAUSE_DEFAULTMAP_SET_KIND.
3054 (gfc_trans_omp_atomic): Set OMP_ATOMIC_MEMORY_ORDER
3055 rather than OMP_ATOMIC_SEQ_CST.
3056 (gfc_trans_omp_taskgroup): Build OMP_TASKGROUP using
3057 make_node instead of build1_loc.
3058 * types.def (BT_FN_VOID_BOOL, BT_FN_VOID_SIZE_SIZE_PTR,
3059 BT_FN_UINT_UINT_PTR_PTR, BT_FN_UINT_OMPFN_PTR_UINT_UINT,
3060 BT_FN_BOOL_UINT_LONGPTR_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
3061 BT_FN_BOOL_UINT_ULLPTR_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR,
3062 BT_FN_BOOL_LONG_LONG_LONG_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
3063 BT_FN_BOOL_BOOL_ULL_ULL_ULL_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR): New.
3064 (BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR_PTR): Formatting fix.
3065
3066 2018-11-02 Thomas Koenig <tkoenig@gcc.gnu.org>
3067
3068 PR fortran/46020
3069 * decl.c (verify_bind_c_sym): Remove unnecessary space
3070 in error message.
3071
3072 2018-11-01 Thomas Koenig <tkoenig@gcc.gnu.org>
3073
3074 PR fortran/87782
3075 * frontend-passes.c (constant_string_length): If there is a
3076 substring with a length which cannot be reduced to a constant,
3077 return NULL.
3078
3079 2018-11-01 Paul Thomas <pault@gcc.gnu.org>
3080
3081 PR fortran/40196
3082 * dependency.c (are_identical_variables): Return false if the
3083 inquiry refs are not the same.
3084 (gfc_ref_needs_temporary_p): Break on an inquiry ref.
3085 * dump_parse_tree.c (show_ref): Show the inquiry ref type.
3086 * expr.c (gfc_free_ref_list): Break on an inquiry ref.
3087 (gfc_copy_ref): Copy the inquiry ref types.
3088 (find_inquiry_ref): New function.
3089 (simplify_const_ref, simplify_ref_chain): Call it. Add new arg
3090 to simplify_ref_chain.
3091 (gfc_simplify_expr): Use the new arg in call to
3092 simplify_ref_chain.
3093 (gfc_get_full_arrayspec_from_expr, gfc_is_coarray): Break on
3094 inquiry ref.
3095 (gfc_traverse_expr): Return true for inquiry ref.
3096 * frontend-passes.c (gfc_expr_walker): Break on inquiry ref.
3097 * gfortran.h : Add enums and union member in gfc_ref to
3098 implement inquiry refs.
3099 * intrinsic.c : Fix white nois.
3100 * match.c (gfc_match_assignment): A constant lavlue is an
3101 error.
3102 * module.c : Add DECL_MIO_NAME for inquiry_type and the mstring
3103 for inquiry_types.
3104 (mio_ref): Handle inquiry refs.
3105 * primary.c (is_inquiry_ref): New function.
3106 (gfc_match_varspec): Handle inquiry refs calling new function.
3107 (gfc_variable_attr): Detect inquiry ref for disambiguation
3108 with components.
3109 (caf_variable_attr): Treat inquiry and substring refs in the
3110 same way.
3111 * resolve.c (find_array_spec): ditto.
3112 (gfc_resolve_substring_charlen): If there is neither a charlen
3113 ref not an inquiry ref, return.
3114 (resolve_ref): Handle inqiry refs as appropriate.
3115 (resolve_allocate_expr): Entities with an inquiry ref cannot be
3116 allocated.
3117 * simplify.c (simplify_bound, simplify_cobound): Punt on
3118 inquiry refs.
3119 * trans-array.c (get_array_ctor_var_strlen): Break on inquiry
3120 ref.
3121 *trans-expr.c (conv_inquiry): New function.
3122 (gfc_conv_variable): Retain the last typespec to pass to
3123 conv_inquiry on detecting an inquiry ref.
3124
3125 2018-11-01 Thomas Koenig <tkoenig@gcc.gnu.org>
3126
3127 PR fortran/46020
3128 * decl.c (verify_bind_c_sym): Improve error message.
3129
3130 2018-11-01 Thomas Koenig <tkoenig@gcc.gnu.org>
3131
3132 PR fortran/54613
3133 * gfortran.texi (File format of unformatted sequential files):
3134 Replace random comma with period.
3135 * intrinsic.texi (Intrinsic Procedures): Add FINDLOC to menu.
3136 (FINDLOC): Document.
3137 (MAXLOC): Add refrence to FINDLOC.
3138 (MINLOC): Likewise.
3139
3140 2018-10-31 Nathan Sidwell <nathan@acm.org>
3141
3142 * cpp.c (gfc_cpp_init): Adjust cpp_force_token_locations call.
3143
3144 2018-10-31 Martin Liska <mliska@suse.cz>
3145
3146 * trans-decl.c (struct module_hasher): Call htab_hash_string
3147 for s->name and not for s.
3148
3149 2018-10-30 Thomas Koenig <tkoenig@gcc.gnu.org>
3150
3151 PR fortran/85896
3152 * simplify.c (simplify_min_max): Do not convert the type of the
3153 return expression.
3154
3155 2017-10-28 Thomas Koenig <tkoenig@gcc.gnu.org>
3156
3157 PR fortran/54613
3158 * gfortran.h (gfc_isym_id): Add GFC_ISYM_FINDLOC.
3159 (gfc_check_f): Add f6fl field.
3160 (gfc_simplify_f): Add f6 field.
3161 (gfc_resolve_f): Likewise.
3162 (gfc_type_letter): Add optional logical_equas_int flag.
3163 * check.c (intrinsic_type_check): New function.
3164 (gfc_check_findloc): New function.
3165 * intrinsics.c (gfc_type_letter): If logical_equals_int is
3166 set, act accordingly.
3167 (add_sym_5ml): Reformat comment.
3168 (add_sym_6fl): New function.
3169 (add_functions): Add findloc.
3170 (check_arglist): Add sixth argument, handle it.
3171 (resolve_intrinsic): Likewise.
3172 (check_specific): Handle findloc.
3173 * intrinsic.h (gfc_check_findloc): Add prototype.
3174 (gfc_simplify_findloc): Likewise.
3175 (gfc_resolve_findloc): Likewise.
3176 (MAX_INTRINSIC_ARGS): Adjust.
3177 * iresolve.c (gfc_resolve_findloc): New function.
3178 * simplify.c (gfc_simplify_minmaxloc): Make static.
3179 (simplify_findloc_to_scalar): New function.
3180 (simplify_findloc_nodim): New function.
3181 (simplify_findloc_to_array): New function.
3182 (gfc_simplify_findloc): New function.
3183 (gfc_conv_intrinsic_findloc): New function.
3184 (gfc_conv_intrinsic_function): Handle GFC_ISYM_FINDLOC.
3185 (gfc_is_intrinsic_libcall): Likewise.
3186
3187 2018-10-27 Thomas Koenig <tkoenig@gcc.gnu.org>
3188
3189 PR fortran/86907
3190 * frontend-passes.c (check_locus_code): Add information that
3191 warning about missing location information points to an
3192 inconsisten internal state.
3193 (check_locus_expr): Likewise.
3194
3195 2018-10-25 Jakub Jelinek <jakub@redhat.com>
3196
3197 PR fortran/87725
3198 * openmp.c (gfc_match_omp_clauses): Parse simd, monotonic and
3199 nonmonotonic modifiers regardless of if they have been parsed
3200 already or if the opposite one has. Fix up check whether
3201 comma after modifier should be parsed.
3202 (resolve_omp_clauses): Diagnose schedule modifier restrictions.
3203
3204 2018-10-23 Paul Thomas <pault@gcc.gnu.org>
3205
3206 PR fortran/85603
3207 * frontend-passes.c (get_len_call): New function to generate a
3208 call to intrinsic LEN.
3209 (create_var): Use this to make length expressions for variable
3210 rhs string lengths.
3211 Clean up some white space issues.
3212
3213 2018-10-21 Paul Thomas <pault@gcc.gnu.org>
3214
3215 PR fortran/71880
3216 * trans-expr.c (gfc_trans_pointer_assignment): Set the string
3217 length for array valued deferred length lhs.
3218
3219 2018-10-18 Tobias Burnus <burnus@net-b.de>
3220
3221 PR fortran/87625
3222 * trans-array.c (gfc_is_reallocatable_lhs): Detect allocatable
3223 polymorphic arrays.
3224
3225 2018-10-18 Paul Thomas <pault@gcc.gnu.org>
3226
3227 PR fortran/58618
3228 * trans-stmt.c (trans_associate_var): All strings that return
3229 as pointer types can be assigned directly to the associate
3230 name so remove 'attr' and the condition that uses it.
3231
3232 2018-10-18 Paul Thomas <pault@gcc.gnu.org>
3233
3234 PR fortran/58618
3235 * trans-decl.c (gfc_get_symbol_decl): Deal correctly with the
3236 initialization with NULL() of a deferred length pointer.
3237
3238 2018-10-17 Tobias Burnus <burnus@net-b.de>
3239
3240 PR fortran/87632
3241 * resolve.c (resolve_select_type): Use correct variable.
3242
3243 2018-10-17 David Malcolm <dmalcolm@redhat.com>
3244
3245 * Make-lang.in (selftest-fortran): New.
3246
3247 2018-10-17 Paul Thomas <pault@gcc.gnu.org>
3248
3249 PR fortran/56386
3250 PR fortran/58906
3251 PR fortran/77385
3252 PR fortran/80260
3253 PR fortran/82077
3254 * resolve.c (resolve_variable): Fix up expressions with array
3255 associate names, where the parser did not detect that this is
3256 array and there was no array part_ref in the expression.
3257
3258 2018-10-16 Tobias Burnus <burnus@net-b.de>
3259
3260 PR fortran/67125
3261 * trans-array.c (gfc_array_init_size, gfc_array_allocate):
3262 Rename argument e3_is_array_constr to e3_has_nodescriptor
3263 and update comments.
3264 * trans-stmt.c (gfc_trans_allocate): Also fix lower bound
3265 to 1 for nonalloc/nonpointer func results/vars besides
3266 array constructors.
3267
3268 2018-10-16 Tobias Burnus <burnus@net-b.de>
3269
3270 PR fortran/87556
3271 * trans-stmt.c (form_team, change_team, sync_team):
3272 Don't ignore argse.pre/argse.post.
3273
3274 2018-10-15 Paul Thomas <pault@gcc.gnu.org>
3275 Tobias Burnus <burnus@gcc.gnu.org>
3276
3277 PR fortran/87566
3278 * resolve.c (resolve_assoc_var): Add missing array spec for
3279 class associate names.
3280 (resolve_select_type): Handle case where last typed component
3281 of the selector has a different type to the expression.
3282 * trans-expr.c (gfc_find_and_cut_at_last_class_ref): Replace
3283 call to gfc_expr_to_initialize with call to gfc_copy_expr.
3284 (gfc_conv_class_to_class): Guard assignment to 'len' field
3285 against case where zero constant is supplied.
3286
3287 2018-10-12 Tobias Burnus <burnus@net-b.de>
3288
3289 PR fortran/87597
3290 * expr.c (gfc_simplify_expr): Avoid simplifying
3291 the 'array' argument to lbound/ubound/lcobound/
3292 ucobound.
3293
3294 2018-10-12 Tobias Burnus <burnus@net-b.de>
3295
3296 PR fortran/58787
3297 * decl.c (get_proc_name): Return with error before
3298 creating sym_tree.
3299
3300 2018-10-11 Tobias Burnus <burnus@net-b.de>
3301
3302 Revert:
3303 2018-10-09 Tobias Burnus <burnus@net-b.de>
3304
3305 PR fortran/83522
3306 * resolve.c (resolve_ref): Reject nonscalar
3307 substring references.
3308
3309 2018-10-09 David Malcolm <dmalcolm@redhat.com>
3310
3311 * cpp.c (gfc_cpp_init_0): Update for renamings.
3312 (cb_cpp_error): Rename to...
3313 (cb_cpp_diagnostic): ...this, converting level and reason to
3314 enums.
3315
3316 2018-10-09 Tobias Burnus <burnus@net-b.de>
3317
3318 PR fortran/83522
3319 * resolve.c (resolve_ref): Reject nonscalar
3320 substring references.
3321
3322 2018-10-09 Paul Thomas <pault@gcc.gnu.org>
3323
3324 PR fortran/87151
3325 * trans-array.c (gfc_get_array_span): Deal with deferred char
3326 array components having a TYPE_MAX_VALUE of zero.
3327 (gfc_array_init_size): Use the hidden string length component
3328 to build the descriptor dtype.
3329 (gfc_array_allocate): Remove the erroneous replacement of the
3330 charlen backend decl with a temporary.
3331 (gfc_conv_expr_descriptor): Use the ss_info string length in
3332 the case of deferred character components.
3333 (gfc_alloc_allocatable_for_assignment): Actually compare the
3334 string lengths for deferred characters. Make sure that kind > 1
3335 is handled correctly. Set the span field of the descriptor.
3336 * trans-intrinsic.c (gfc_conv_intrinsic_len): Remove the stupid
3337 comment.
3338
3339 PR fortran/80931
3340 * trans-array.c (gfc_array_allocate): Set the span field for
3341 variable length character arrays.
3342
3343 2018-10-08 Cesar Philippidis <cesar@codesourcery.com>
3344
3345 * expr.c (gfc_check_pointer_assign): Demote "Assignment to
3346 contiguous pointer from non-contiguous target" to a warning.
3347
3348 2018-10-08 Paul Thomas <pault@gcc.gnu.org>
3349
3350 PR fortran/86372
3351 * trans-stmt.c (trans_associate_var): Character associate names
3352 with variable string length do not have to be deferred length
3353 for the string length to be set, if variable.
3354
3355 2018-10-06 Thomas Koenig <tkoenig@gcc.gnu.org>
3356
3357 PR fortran/86111
3358 * gfortran.h (enum arith): Add ARITH_WRONGCONCAT.
3359 * arith.h (gfc_arith_error): Issue error for ARITH_WRONGCONCAT.
3360 (gfc_arith_concat): If the types of op1 and op2 are not
3361 character of if their kinds do not match, issue ARITH_WRONGCONCAT.
3362
3363 2018-10-06 Paul Thomas <pault@gcc.gnu.org>
3364
3365 PR fortran/83999
3366 * resolve.c (resolve_fl_procedure): Include class functions in
3367 the test that elemental function results be scalar.
3368
3369 2018-10-06 Thomas Koenig <tkoenig@gcc.gnu.org>
3370
3371 PR fortran/84640
3372 * simplify.c (gfc_simplify_cshift): Extend size of hs_ex and ss_ex
3373 by one. Set extents one past the array boundaries to zero to avoid
3374 warning with instrumented compiler.
3375 (gfc_simplify_eoshift): Likewise, only for ss_ex.
3376
3377 2018-10-05 Paul Thomas <pault@gcc.gnu.org>
3378
3379 PR fortran/87487
3380 * trans-decl.c (gfc_get_symbol_decl): Make sure that deferred
3381 character length pointer initializer has the right type to fix
3382 problem with deferred_character_24.f90 on big endian.
3383
3384 2018-10-03 Jeff Law <law@redhat.comg>
3385
3386 * trans-types.c (get_typenode_from_name): Moved into gcc/tree.c.
3387
3388 2018-10-01 Paul Thomas <pault@gcc.gnu.org>
3389
3390 PR fortran/65677
3391 * trans-expr.c (gfc_trans_assignment_1): Set the 'identical'
3392 flag in the call to gfc_check_dependency.
3393
3394 2018-09-30 Paul Thomas <pault@gcc.gnu.org>
3395
3396 PR fortran/87359
3397 * trans-array.c (gfc_is_reallocatable_lhs): Correct the problem
3398 introduced by r264358, which prevented components of associate
3399 names from being reallocated on assignment.
3400
3401 2018-09-30 Paul Thomas <pault@gcc.gnu.org>
3402
3403 PR fortran/70752
3404 PR fortran/72709
3405 * trans-array.c (gfc_conv_scalarized_array_ref): If this is a
3406 deferred type and the info->descriptor is present, use the
3407 info->descriptor
3408 (gfc_conv_array_ref): Is the se expr is a descriptor type, pass
3409 it as 'decl' rather than the symbol backend_decl.
3410 (gfc_array_allocate): If the se string_length is a component
3411 reference, fix it and use it for the expression string length
3412 if the latter is not a variable type. If it is a variable do
3413 an assignment. Make use of component ref string lengths to set
3414 the descriptor 'span'.
3415 (gfc_conv_expr_descriptor): For pointer assignment, do not set
3416 the span field if gfc_get_array_span returns zero.
3417 * trans.c (get_array_span): If the upper bound a character type
3418 is zero, use the descriptor span if available.
3419
3420 2018-09-30 Paul Thomas <pault@gcc.gnu.org>
3421
3422 PR fortran/70149
3423 * trans-decl.c (gfc_get_symbol_decl): A deferred character
3424 length pointer that is initialized needs the string length to
3425 be initialized as well.
3426
3427 2018-09-29 Paul Thomas <pault@gcc.gnu.org>
3428
3429 PR fortran/65677
3430 * trans-expr.c (gfc_trans_assignment_1): If there is dependency
3431 fix the rse stringlength.
3432
3433 2018-09-25 Martin Liska <mliska@suse.cz>
3434
3435 PR fortran/87394
3436 * decl.c (add_hidden_procptr_result): Simplify condition
3437 as we are in branch witch 'case1 || case2'.
3438
3439 2018-09-25 Martin Liska <mliska@suse.cz>
3440
3441 * trans.c (remove_suffix): Remove
3442 unused function.
3443
3444 2018-09-24 Thomas Koenig <tkoenig@gcc.gnu.org>
3445
3446 PR fortran/87397
3447 * gfc_conv_procedure_call: Do not add clobber on INTENT(OUT)
3448 for variables in an associate statement.
3449
3450 2018-09-24 Bernhard Reuther-Fischer <aldot@gcc.gnu.org>
3451 Cesar Philippidis <cesar@codesourcery.com>
3452
3453 * openmp.c (resolve_oacc_loop_blocks):
3454
3455 2018-09-23 Thomas Koenig <tkoenig@gcc.gnu.org>
3456
3457 PR fortran/87397
3458 * gfc_conv_procedure_call: Do not add clobber on INTENT(OUT)
3459 for variables having the dimension attribute.
3460
3461 2018-09-23 Janne Blomqvist <jb@gcc.gnu.org>
3462
3463 * trans-expr.c (gfc_caf_get_image_index): Do array index
3464 calculations in gfc_array_index_type.
3465 * trans-intrinsic.c (conv_intrinsic_event_query): Likewise.
3466 * trans-stmt.c (gfc_trans_lock_unlock): Likewise.
3467 (gfc_trans_event_post_wait): Likewise.
3468
3469 2018-09-23 Thomas Koenig <tkoenig@gcc.gnu.org>
3470
3471 PR fortran/87395
3472 * gfc_conv_procedure_call: Reformat comments slightly. Do not add
3473 clobber on INTENT(OUT) for saved variables.
3474
3475 2018-09-22 Thomas Koenig <tkoenig@gcc.gnu.org>
3476
3477 PR fortran/41453
3478 * trans.h (gfc_conv_expr_reference): Add optional argument
3479 add_clobber to prototype.
3480 (gfc_conv_procedure_call): Set add_clobber argument to
3481 gfc_conv_procedure_reference to true for scalar, INTENT(OUT),
3482 non-pointer, non-allocatable, non-dummy variables whose type
3483 is neither BT_CHARACTER, BT_DERIVED or BT_CLASS, but only if
3484 the procedure is not elemental.
3485 * trans-expr.c (gfc_conv_procedure_reference): Add clobber
3486 statement before call if add_clobber is set.
3487
3488 2018-09-22 Paul Thomas <pault@gcc.gnu.org>
3489
3490 PR fortran/85603
3491 * trans-array.c (gfc_alloc_allocatable_for_assignment): Test
3492 the charlen backend_decl before using the VAR_P macro.
3493
3494 2018-09-21 Paul Thomas <pault@gcc.gnu.org>
3495
3496 PR fortran/77325
3497 * trans-array.c (gfc_alloc_allocatable_for_assignment): If the
3498 rhs has a charlen expression, convert that and use it.
3499 * trans-expr.c (gfc_trans_assignment_1): The rse.pre for the
3500 assignment of deferred character array vars to a realocatable
3501 lhs should not be added to the exterior block since vector
3502 indices, for example, generate temporaries indexed within the
3503 loop.
3504
3505 2018-09-21 Paul Thomas <pault@gcc.gnu.org>
3506
3507 PR fortran/87359
3508 * trans-stmt.c (gfc_trans_allocate): Don't deallocate alloc
3509 components if must_finalize is set for expr3.
3510
3511 2018-09-21 Andrew Stubbs <ams@codesourcery.com>
3512 Kwok Cheung Yeung <kcy@codesourcery.com>
3513
3514 * trans-expr.c (gfc_trans_structure_assign): Ensure that the first
3515 argument of a call to _gfortran_caf_register is of size_type_node.
3516 * trans-intrinsic.c (conv_intrinsic_event_query): Convert computed
3517 index to a size_type_node type.
3518 * trans-stmt.c (gfc_trans_event_post_wait): Likewise.
3519
3520 2018-09-20 Allan Sandfeld Jensen <allan.jensen@qt.io>
3521
3522 * gfortranspec.c (lang_specific_driver): Handle -r like -nostdlib.
3523
3524 2018-09-20 Janus Weil <janus@gcc.gnu.org>
3525
3526 * gfortran.h (gfc_str_startswith): New macro.
3527 * decl.c (variable_decl, gfc_match_end): Use it.
3528 * iresolve.c (is_trig_resolved): Ditto.
3529 * module.c (load_omp_udrs, read_module): Ditto.
3530 * options.c (gfc_handle_runtime_check_option): Ditto.
3531 * primary.c (match_arg_list_function): Ditto.
3532 * trans-decl.c (gfc_get_symbol_decl): Ditto.
3533 * trans-expr.c (gfc_conv_procedure_call): Ditto.
3534 * interface.c (dtio_op): Replace strncmp by strcmp.
3535 * resolve.c (resolve_actual_arglist, resolve_function): Ditto.
3536 * trans-expr.c (conv_arglist_function): Ditto.
3537 * trans-intrinsic.c (gfc_conv_ieee_arithmetic_function): Replace macro
3538 STARTS_WITH by gfc_str_startswith.
3539
3540 2018-09-20 Cesar Philippidis <cesar@codesourcery.com>
3541
3542 * dump-parse-tree.c (show_omp_clauses): Add missing omp list_types
3543 and reorder the switch cases to match the enum in gfortran.h.
3544
3545 2018-09-19 Paul Thomas <pault@gcc.gnu.org>
3546
3547 PR fortran/84109
3548 * trans-expr.c (gfc_trans_assignment_1): The rse.pre for the
3549 assignment of deferred character intrinsic elemental function
3550 results to a realocatable lhs must not be added to the exterior
3551 block if they are array valued but must go to the loop body.
3552
3553 2018-09-18 Thomas Koenig <tkoenig@gcc.gnu.org>
3554
3555 PR fortran/29550
3556 * gfortran.h (gfc_expr): Add external_blas flag.
3557 * frontend-passes.c (matrix_case): Add case A2TB2T.
3558 (optimize_namespace): Handle flag_external_blas by
3559 calling call_external_blas.
3560 (get_array_inq_function): Add argument okind. If
3561 it is nonzero, use it as the kind of argument
3562 to be used.
3563 (inline_limit_check): Remove m_case argument, add
3564 limit argument instead. Remove assert about m_case.
3565 Set the limit for inlining from the limit argument.
3566 (matmul_lhs_realloc): Handle case A2TB2T.
3567 (inline_matmul_assign): Handle inline limit for other cases with
3568 two rank-two matrices. Remove no-op calls to inline_limit_check.
3569 (call_external_blas): New function.
3570 * trans-intrinsic.c (gfc_conv_intrinsic_funcall): Do not add
3571 argument to external BLAS if external_blas is already set.
3572
3573 2018-09-18 Paul Thomas <pault@gcc.gnu.org>
3574
3575 PR fortran/87239
3576 * trans-expr.c (gfc_trans_assignment_1): The rse.pre for the
3577 assignment of deferred character elemental function results to
3578 a realocatable lhs must not be added to the exterior block but
3579 must go to the loop body.
3580
3581 2018-09-18 Paul Thomas <pault@gcc.gnu.org>
3582
3583 PR fortran/87336
3584 * trans-array.c (gfc_get_array_span): Try to get the element
3585 length of incomplete types. Return NULL_TREE otherwise.
3586 (gfc_conv_expr_descriptor): Only set the 'span' field if the
3587 above does not return NULL_TREE. Set 'span' field if possible
3588 for all new descriptors.
3589
3590 2018-09-17 Paul Thomas <pault@gcc.gnu.org>
3591
3592 PR fortran/64120
3593 * trans-decl.c (gfc_get_symbol_decl): Flag allocatable, scalar
3594 characters with a variable length expression for deferred init.
3595 (gfc_trans_deferred_vars): Perform the assignment for these
3596 symbols by calling gfc_conv_string_length.
3597
3598 2018-09-17 Paul Thomas <pault@gcc.gnu.org>
3599
3600 PR fortran/85954
3601 * resolve.c (resolve_assoc_var): If the target expression is a
3602 deferred charlen dummy and the associate name shares the
3603 charlen, generate a new one. Make sure that new charlens are in
3604 the namespace list so that they get cleaned up.
3605 * trans-array.c (gfc_is_reallocatable_lhs): Associate names are
3606 not reallocatable.
3607 * trans-decl.c (gfc_get_symbol_decl): Put deferred character
3608 length dummy and result arrays on the deferred initialization
3609 list so that the variable length arrays can be correctly dealt
3610 with.
3611 * trans-expr.c (gfc_conv_string_length): Return if 'expr' is
3612 NULL rather than ICEing..
3613
3614 2018-09-16 Janus Weil <janus@gcc.gnu.org>
3615
3616 PR fortran/86484
3617 PR fortran/84543
3618 * match.c (gfc_match_assignment): For a polymorphic assignment,
3619 make sure that the vtab for the rhs type is generated.
3620
3621 2018-09-16 Thomas Koenig <tkoenig@gcc.gnu.org>
3622
3623 PR fortran/37802
3624 * frontend-passes.c (B_ERROR): New macro for matmul bounds
3625 checking error messages.
3626 (C_ERROR): Likewise.
3627 (inline_matmul_assign): Reorganize bounds checking, use B_ERROR
3628 and C_ERROR macros.
3629
3630 2018-09-13 Bernd Edlinger <bernd.edlinger@hotmail.de>
3631
3632 * trans-array.c (gfc_conv_array_initializer): Remove excess precision
3633 from overlength string initializers.
3634
3635 2018-09-12 Paul Thomas <pault@gcc.gnu.org>
3636
3637 PR fortran/87284
3638 * trans-expr.c (gfc_trans_class_init_assign): Access to
3639 to array elements of the dynamic type requires that the array
3640 reference be added to the class expression and not the _data
3641 component, unlike scalar expressions.
3642
3643 2018-09-11 Janus Weil <janus@gcc.gnu.org>
3644
3645 PR fortran/87172
3646 * resolve.c (resolve_fl_derived): If a type has the 'use_assoc'
3647 attribute, then it was declared in another module, so there should be
3648 no error that it has not been declared.
3649
3650 2018-09-11 Paul Thomas <pault@gcc.gnu.org>
3651
3652 PR fortran/87277
3653 * expr.c (is_subref_array): Add the check of dimensionality for
3654 class, dummy, pointer arrays.
3655
3656 2018-09-11 Janus Weil <janus@gcc.gnu.org>
3657
3658 PR fortran/86830
3659 * expr.c (gfc_is_simply_contiguous): Handle type-bound procedure calls
3660 with non-polymorphic objects.
3661
3662 2018-09-10 Janus Weil <janus@gcc.gnu.org>
3663
3664 PR fortran/85395
3665 * decl.c (match_binding_attributes): Use correct default accessibility
3666 for procedure pointer components.
3667
3668 2018-09-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3669
3670 * simplify.c (gfc_simplify_modulo): Re-arrange code to test whether
3671 'P' is zero and issue an error if it is.
3672
3673 2018-08-31 Paul Thomas <pault@gcc.gnu.org>
3674
3675 PR fortran/86328
3676 PR fortran/86760
3677 * trans-array.c (gfc_conv_scalarized_array_ref): Do not fix
3678 info->descriptor but pass it directly to gfc_build_array_ref.
3679 (gfc_conv_array_ref): Likewise for se->expr.
3680 * trans.c (gfc_build_array_ref): If 'decl' is a COMPONENT_REF
3681 obtain the span field directly from it.
3682
3683 2017-08-28 Paul Thomas <pault@gcc.gnu.org>
3684
3685 PR fortran/80477
3686 * trans-expr.c (gfc_conv_procedure_call): Allocatable class
3687 scalar results being passed to a derived type formal argument
3688 are finalized if possible. Otherwise, rely on existing code for
3689 deallocation. Make the deallocation of allocatable result
3690 components conditional on finalization not taking place. Make
3691 the freeing of data components after finalization conditional
3692 on the data being NULL.
3693 (gfc_trans_arrayfunc_assign): Change the gcc_assert to a
3694 condition to return NULL_TREE.
3695 (gfc_trans_assignment_1): If the assignment is class to class
3696 and the rhs expression must be finalized but the assignment
3697 is not marked as a polymorphic assignment, use the vptr copy
3698 function instead of gfc_trans_scalar_assign.
3699
3700 PR fortran/86481
3701 * trans-expr.c (gfc_conv_expr_reference): Do not add the post
3702 block to the pre block if the expression is to be finalized.
3703 * trans-stmt.c (gfc_trans_allocate): If the expr3 must be
3704 finalized, load the post block into a finalization block and
3705 add it right at the end of the allocation block.
3706
3707 2018-08-27 David Malcolm <dmalcolm@redhat.com>
3708
3709 PR 87091
3710 * error.c (gfc_format_decoder): Update for conversion of
3711 show_caret_p to a tri-state.
3712
3713 2018-08-25 Janus Weil <janus@gcc.gnu.org>
3714
3715 PR fortran/86545
3716 * resolve.c (resolve_transfer): Correctly determine typespec for
3717 generic function calls, in order to throw a proper error.
3718
3719 2018-08-24 Thomas Koenig <tkoenig@gcc.gnu.org>
3720
3721 PR fortran/86837
3722 * frontend-passes.c (var_in_expr_callback): New function.
3723 (var_in_expr): New function.
3724 (traverse_io_block): Use var_in_expr instead of
3725 gfc_check_dependency for checking if the variable depends on the
3726 previous interators.
3727
3728 2018-08-23 Janne Blomqvist <blomqvist.janne@gmail.com>
3729
3730 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxval): Delete
3731 HONOR_SIGNED_ZEROS checks.
3732
3733 2018-08-23 Paul Thomas <pault@gcc.gnu.org>
3734
3735 PR fortran/86863
3736 * resolve.c (resolve_typebound_call): If the TBP is not marked
3737 as a subroutine, check the specific symbol.
3738
3739 2018-08-22 Thomas Koenig <tkoenig@gcc.gnu.org>
3740
3741 * gfortran.texi: Mention that asynchronous I/O does
3742 not work on systems which lack condition variables, such
3743 as AIX.
3744
3745 2018-08-22 Janus Weil <janus@gcc.gnu.org>
3746
3747 PR fortran/86935
3748 * match.c (gfc_match_associate): Improve diagnostics for the ASSOCIATE
3749 statement.
3750
3751 2018-08-22 Andrew Benson <abensonca@gmail.com>
3752
3753 * module.c (load_generic_interfaces): Move call to find_symbol()
3754 so that only occurs if actually needed.
3755
3756 2018-08-22 Janus Weil <janus@gcc.gnu.org>
3757
3758 PR fortran/86888
3759 * decl.c (gfc_match_data_decl): Allow allocatable components of
3760 indirectly recursive type.
3761 * resolve.c (resolve_component): Remove two errors messages ...
3762 (resolve_fl_derived): ... and replace them by a new one.
3763
3764 2018-08-21 Janne Blomqvist <jb@gcc.gnu.org>
3765
3766 * trans-intrinsic.c (gfc_conv_intrinsic_minmax): Use
3767 MAX_EXPR/MIN_EXPR unconditionally for real arguments.
3768 * gfortran.texi (Compiler Characteristics): Document MAX/MIN
3769 behavior wrt NaN.
3770
3771 2018-08-21 Nicolas Koenig <koenigni@gcc.gnu.org>
3772 Thomas Koenig <tkoenig@gcc.gnu.org>
3773
3774 PR fortran/25829
3775 * gfortran.texi: Add description of asynchronous I/O.
3776 * trans-decl.c (gfc_finish_var_decl): Treat asynchronous variables
3777 as volatile.
3778 * trans-io.c (gfc_build_io_library_fndecls): Rename st_wait to
3779 st_wait_async and change argument spec from ".X" to ".w".
3780 (gfc_trans_wait): Pass ID argument via reference.
3781
3782 2018-08-16 Nathan Sidwell <nathan@acm.org>
3783
3784 * cpp.c (dump_macro): Use cpp_user_macro_p.
3785
3786 2018-08-14 Janus Weil <janus@gcc.gnu.org>
3787
3788 PR fortran/86116
3789 * interface.c (compare_type): Remove a CLASS/TYPE check.
3790 (compare_type_characteristics): New function that behaves like the old
3791 'compare_type'.
3792 (gfc_check_dummy_characteristics, gfc_check_result_characteristics):
3793 Call 'compare_type_characteristics' instead of 'compare_type'.
3794
3795 2018-08-12 Paul Thomas <pault@gcc.gnu.org>
3796
3797 PR fortran/66679
3798 * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Class array
3799 elements are returned as references to the data element. Get
3800 the class expression by stripping back the references. Use this
3801 for the element size.
3802
3803 2018-08-12 Paul Thomas <pault@gcc.gnu.org>
3804
3805 PR fortran/86906
3806 * resolve.c (resolve_fl_variable_derived): Check if the derived
3807 type is use associated before checking for the host association
3808 error.
3809
3810 2018-08-10 Janus Weil <janus@gcc.gnu.org>
3811
3812 PR fortran/57160
3813 * invoke.texi (frontend-optimize): Mention short-circuiting.
3814 * options.c (gfc_post_options): Disable -ffrontend-optimize with -Og.
3815 * resolve.c (resolve_operator): Warn about short-circuiting only with
3816 -ffrontend-optimize.
3817 * trans-expr.c (gfc_conv_expr_op): Use short-circuiting operators only
3818 with -ffrontend-optimize. Without that flag, make sure that both
3819 operands are evaluated.
3820
3821 2018-08-08 Nathan Sidwell <nathan@acm.org>
3822
3823 * cpp.c (cb_file_change): Use linemap_included_from.
3824
3825 2018-08-07 Cesar Philippidis <cesar@codesourcery.com>
3826
3827 * trans-stmt.h: Remove stale reference to trans-openacc.c.
3828
3829 2018-08-04 Janus Weil <janus@gcc.gnu.org>
3830
3831 PR fortran/45521
3832 * interface.c (gfc_compare_interfaces): Apply additional
3833 distinguishability criteria of F08 to operator interfaces.
3834
3835 2018-07-31 Andre Vieira <andre.simoesdiasvieira@arm.com>
3836
3837 Revert 'AsyncI/O patch committed'
3838 2018-07-25 Nicolas Koenig <koenigni@gcc.gnu.org>
3839 Thomas Koenig <tkoenig@gcc.gnu.org>
3840
3841 PR fortran/25829
3842 * gfortran.texi: Add description of asynchronous I/O.
3843 * trans-decl.c (gfc_finish_var_decl): Treat asynchronous variables
3844 as volatile.
3845 * trans-io.c (gfc_build_io_library_fndecls): Rename st_wait to
3846 st_wait_async and change argument spec from ".X" to ".w".
3847 (gfc_trans_wait): Pass ID argument via reference.
3848
3849 2018-07-25 Nicolas Koenig <koenigni@gcc.gnu.org>
3850 Thomas Koenig <tkoenig@gcc.gnu.org>
3851
3852 PR fortran/25829
3853 * gfortran.texi: Add description of asynchronous I/O.
3854 * trans-decl.c (gfc_finish_var_decl): Treat asynchronous variables
3855 as volatile.
3856 * trans-io.c (gfc_build_io_library_fndecls): Rename st_wait to
3857 st_wait_async and change argument spec from ".X" to ".w".
3858 (gfc_trans_wait): Pass ID argument via reference.
3859
3860 2018-07-20 Martin Sebor <msebor@redhat.com>
3861
3862 PR middle-end/82063
3863 * gfortran.h (gfc_handle_option): Change function argument
3864 to HOST_WIDE_INT.
3865 * options.c (gfc_handle_option): Same.
3866
3867 2018-07-20 Andrew Benson <abenson@carnegiescience.edu>
3868
3869 * gfortran.h (gfc_symbol): Add pointer to next derived type.
3870 (gfc_dt_list, gfc_get_dt_list): Remove.
3871 (gfc_namespace): Replace gfc_dt_list with gfc_symbol.
3872 * parse.c (resolve_all_program_units): Replace gfc_free_dt_list() with
3873 simple nullification of gfc_derived_types.
3874 * resolve.c (resolve_global_procedure): Replace gfc_dt_list with
3875 gfc_symbol.
3876 (add_dt_to_dt_list): Change derived type linked list insertion to
3877 utilize dt_next pointers in gfc_symbol.
3878 * symbol.c (gfc_new_symbol, gfc_free_dt_list, gfc_symbol_done2)
3879 (get_iso_c_binding_dt, generate_isocbinding_symbol): Remove
3880 gfc_free_dt_list as gfc_dt_list is obsoleted. Change derived type
3881 linked list search/insertion to utilize dt_next pointers in gfc_symbol.
3882 * trans-types.c (gfc_get_derived_type): Change derived type linked
3883 list search to utilize dt_next pointers in gfc_symbol.
3884
3885 2018-07-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3886
3887 * trans-intrinsic.c: (gfc_conv_intrinsic_minmax): Emit MIN_MAX_EXPR
3888 or IFN_FMIN/FMAX sequence to calculate the min/max when possible.
3889
3890 2018-07-18 Janus Weil <janus@gcc.gnu.org>
3891 Thomas Koenig <tkoenig@gcc.gnu.org>
3892
3893 PR fortran/85599
3894 * dump-parse-tree.c (show_attr): Add handling of implicit_pure.
3895 * frontend-passes.c (do_warn_function_elimination): Do not warn for
3896 pure functions.
3897 * gfortran.h: Add prototypes for gfc_pure_function and
3898 gfc_implicit_pure_function.
3899 * gfortran.texi: Add chapter on evaluation of logical expressions.
3900 * invoke.texi: Mention that -Wfunction-elimination is implied
3901 by -Wextra.
3902 * lang.opt: Make -Wextra imply -Wfunction-elimination.
3903 * resolve.c (pure_function): Rename to gfc_pure_function.
3904 (gfc_implicit_pure_function): New function.
3905 (check_pure_function): Use it here.
3906 (impure_function_callback): New function.
3907 (resolve_operator): Call it via gfc_expr_walker.
3908
3909 2018-07-16 Fritz Reese <fritzoreese@gmail.com>
3910
3911 PR fortran/83184
3912 * decl.c (match_old_style_init): Initialize locus of variable expr when
3913 creating a data variable.
3914 (match_clist_expr): Verify array is explicit shape/size before
3915 attempting to allocate constant array constructor.
3916
3917 2018-07-16 Fritz Reese <fritzoreese@gmail.com>
3918
3919 PR fortran/86417
3920 * module.c (mio_component): Set component->loc when loading from module.
3921
3922 2018-07-10 Jakub Jelinek <jakub@redhat.com>
3923
3924 PR fortran/86421
3925 * module.c (omp_declare_simd_clauses): Add LINEAR with _REF, _VAL and
3926 _UVAL suffixes.
3927 (mio_omp_declare_simd): Save and restore ref, val and uval modifiers
3928 on linear clauses. Initialize n->where to gfc_current_locus.
3929
3930 2018-07-05 Paul Thomas <pault@gcc.gnu.org>
3931
3932 PR fortran/86408
3933 * resolve.c.c (resolve_contained_fntype): Reference to C418 is
3934 in F2008 and not F2003.
3935 (resolve_function): Ditto in error message. Also, exclude
3936 deferred character length results from the error.
3937
3938 2018-07-05 Fritz Reese <fritzoreese@gmail.com>
3939
3940 PR fortran/83183
3941 PR fortran/86325
3942 * expr.c (class_allocatable, class_pointer, comp_allocatable,
3943 comp_pointer): New helpers.
3944 (component_initializer): Generate EXPR_NULL for allocatable or pointer
3945 components. Do not generate initializers for components within BT_CLASS.
3946 Do not assign to comp->initializer.
3947 (gfc_generate_initializer): Use new helpers; move code to generate
3948 EXPR_NULL for class allocatable components into component_initializer().
3949
3950 2018-07-04 Jerry DeLisle <jvdelisle@gcc.gnu.org>
3951
3952 PR fortran/82009
3953 * trans-decl.c (gfc_process_block_locals): Delete assert and set
3954 saved_local_decls = NULL_TREE.
3955
3956 2018-07-02 Richard Biener <rguenther@suse.de>
3957
3958 PR lto/86321
3959 * trans-types.c (gfc_get_array_type_bounds): Unshare TYPE_FIELDs
3960 for the distinct type copy.
3961
3962 2018-07-02 Paul Thomas <pault@gcc.gnu.org>
3963
3964 PR fortran/82969
3965 PR fortran/86242
3966 * trans-array.c (structure_alloc_comps): Do not explicitly copy
3967 procedure pointer components.
3968
3969 2018-07-02 Paul Thomas <pault@gcc.gnu.org>
3970
3971 PR fortran/45305
3972 * expr.c : Add a prototype for scalarize_intrinsic_call.
3973 (gfc_simplify_expr): Use scalarize_intrinsic_call for elemental
3974 intrinsic function calls.
3975 (scalarize_intrinsic_call): Add 'init_flag' argument. Check if
3976 the expression or any of the actual argument expressions are
3977 NULL. Before calling gfc_check_init_expr, check 'init_flag'.
3978 Only simplify the scalarized expressions if there are no errors
3979 on the stack.
3980 (gfc_check_init_expr): Set 'init_flag' true in the call to
3981 scalarize_intrinsic_call.
3982
3983 2018-06-28 Fritz Reese <fritzoreese@gmail.com>
3984
3985 PR fortran/82865
3986 * decl.c (gfc_match_type): Refactor and check for PDT declarations.
3987
3988 2018-06-28 Martin Liska <mliska@suse.cz>
3989
3990 * gfortranspec.c: Include opt-suggestions.h.
3991
3992 2018-06-25 Fritz Reese <fritzoreese@gmail.com>
3993
3994 PR fortran/82972
3995 PR fortran/83088
3996 PR fortran/85851
3997 * expr.c (component_initializer): Assign init expr to c->initializer.
3998 (generate_isocbinding_initializer): New.
3999 (gfc_generate_initializer): Call generate_isocbinding_initializer to
4000 generate initializers for c_ptr and c_funptr with -finit-derived.
4001
4002 2018-06-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
4003
4004 PR fortran/85983
4005 * interface.c (check_dtio_interface1): Delete assert.
4006
4007 2018-06-22 Paul Thomas <pault@gcc.gnu.org>
4008 Rainer Orth <ro@gcc.gnu.org>
4009
4010 PR fortran/86281
4011 * resolve.c (resolve_contained_fntype): Check for the charlen
4012 before testing the length.
4013
4014 2018-06-21 Paul Thomas <pault@gcc.gnu.org>
4015
4016 PR fortran/49630
4017 * resolve.c (resolve_contained_fntype): Change standard ref.
4018 from F95 to F2003: C418. Correct a spelling error in a comment.
4019 It is an error for an abstract interface to have an assumed
4020 character length result.
4021 * trans-expr.c (gfc_conv_procedure_call): Likewise change the
4022 standard reference.
4023
4024 2018-06-21 Paul Thomas <pault@gcc.gnu.org>
4025
4026 PR fortran/83118
4027 * resolve.c (resolve_ordinary_assign): Force the creation of a
4028 vtable for assignment of non-polymorphic expressions to an
4029 unlimited polymorphic object.
4030 * trans-array.c (gfc_alloc_allocatable_for_assignment): Use the
4031 size of the rhs type for such assignments. Set the dtype, _len
4032 and vptrs appropriately.
4033 * trans-expr.c (gfc_trans_assignment): Force the use of the
4034 _copy function for these assignments.
4035
4036 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
4037 Thomas Schwinge <thomas@codesourcery.com>
4038 Cesar Philippidis <cesar@codesourcery.com>
4039
4040 * gfortran.h (gfc_omp_clauses): Add unsigned if_present, finalize
4041 bitfields.
4042 * openmp.c (enum omp_mask2): Remove OMP_CLAUSE_PRESENT_OR_*. Add
4043 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
4044 (gfc_match_omp_clauses): Update handling of copy, copyin, copyout,
4045 create, deviceptr, present_of_*. Add support for finalize and
4046 if_present.
4047 (OACC_PARALLEL_CLAUSES): Remove PRESENT_OR_* clauses.
4048 (OACC_KERNELS_CLAUSES): Likewise.
4049 (OACC_DATA_CLAUSES): Likewise.
4050 (OACC_DECLARE_CLAUSES): Likewise.
4051 (OACC_UPDATE_CLAUSES): Add IF_PRESENT clause.
4052 (OACC_ENTER_DATA_CLAUSES): Remove PRESENT_OR_* clauses.
4053 (OACC_EXIT_DATA_CLAUSES): Add FINALIZE clause.
4054 (gfc_match_oacc_declare): Update to OpenACC 2.5 semantics.
4055 * trans-openmp.c (gfc_trans_omp_clauses): Add support for IF_PRESENT
4056 and FINALIZE.
4057
4058 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
4059
4060 * trans-decl.c (gfc_get_fake_result_decl): Revert latest change.
4061
4062 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
4063
4064 * trans-decl.c (nonlocal_dummy_decl_pset): Delete.
4065 (nonlocal_dummy_decls): Likewise.
4066 (gfc_nonlocal_dummy_array_decl): Likewise.
4067 (gfc_get_symbol_decl): Do not call gfc_nonlocal_dummy_array_decl.
4068 (gfc_get_fake_result_decl): Do not generate a new DECL if simply
4069 reusing the result of a recursive call.
4070 (gfc_generate_function_code): Do not create, insert and destroy
4071 nonlocal_dummy_decls.
4072
4073 2018-06-13 Steven G. Kargl <kargl@gcc.gnu.org>
4074
4075 PR fortran/86110
4076 * array.c (gfc_resolve_character_array_constructor): Avoid NULL
4077 pointer dereference.
4078
4079 2018-06-13 Cesar Philippidis <cesar@codesourcery.com>
4080
4081 PR fortran/85703
4082 * parse.c (decode_oacc_directive): Set gfc_matching_function
4083 to false.
4084 (decode_omp_directive): Likewise.
4085
4086 2018-06-13 Cesar Philippidis <cesar@codesourcery.com>
4087
4088 PR fortran/85702
4089 * openmp.c (gfc_match_oacc_wait): Use %C to report error location.
4090
4091 2018-06-12 David Malcolm <dmalcolm@redhat.com>
4092
4093 PR other/69968
4094 * misc.c (gfc_closest_fuzzy_match): Update for renaming of
4095 levenshtein_distance to get_edit_distance.
4096
4097 2018-06-12 Steven G. Kargl <kargl@gcc.gnu.org>
4098
4099 PR fortran/44491
4100 * expr.c (gfc_check_assign): Select non-NULL locus.
4101
4102 2018-06-11 Janus Weil <janus@gcc.gnu.org>
4103
4104 PR fortran/45521
4105 * interface.c (compare_ptr_alloc): New function.
4106 (generic_correspondence): Call it.
4107
4108 2018-06-10 Thomas Koenig <tkoenig@gcc.gnu.org>
4109
4110 * gfortran.h (gfc_expr): Add no_bounds_check field.
4111 * frontend-passes.c (get_array_inq_function): Set no_bounds_check
4112 on function and function argument.
4113 (inline_matmul_assign): Set no_bounds_check on zero expression
4114 and on lhs of zero expression.
4115 Also handle A1B2 case if realloc on assigment is active.
4116 * trans-array.c (gfc_conv_array_ref): Don't do range checking
4117 if expr has no_bounds_check set.
4118 (gfc_conv_expr_descriptor): Set no_bounds_check on ss if expr
4119 has it set.
4120 * trans-expr.c (gfc_trans_assignment_1): Set no_bounds_check
4121 on lss and lss if the corresponding expressions have it set.
4122
4123 2018-06-10 Dominique d'Humieres <dominiq@gcc.gnu.org>
4124
4125 PR fortran/79854
4126 * trans-const.c: Remove include "diagnostic-core.h".
4127 (gfc_conv_constant_to_tree): Replace fatal_error with gcc_unreachable.
4128
4129 2018-06-10 Janus Weil <janus@gcc.gnu.org>
4130
4131 PR fortran/85088
4132 * decl.c (match_attr_spec): Synchronize the DECL_* enum values with the
4133 INTENT_* values from the enum 'sym_intent'. Call 'match_intent_spec'
4134 and remove a TODO note.
4135 * gfortran.h: Add a comment to sym_intent.
4136
4137 2018-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
4138
4139 PR fortran/38351
4140 * resolve.c (resolve_operator): Provide better error message for
4141 derived type entity used in an binary intrinsic numeric operator.
4142
4143 2018-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
4144
4145 PR fortran/85138
4146 PR fortran/85996
4147 PR fortran/86051
4148 * decl.c (gfc_match_char_spec): Use private namespace in attempt to
4149 reduce a charlen to a constant.
4150
4151 2018-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
4152
4153 PR fortran/78278
4154 * data.c (gfc_assign_data_value): Re-arrange code to allow for
4155 an error for double initialization of CHARACTER entities.
4156
4157 2018-06-09 Steven G. Kargl <kargl@gcc.gnu.org>
4158
4159 PR fortran/63514
4160 * symbol.c (gfc_add_volatile): Enforce F2008:C1282 and F2018:C1588.
4161
4162 2018-06-08 Thomas Koenig <tkoenig@gcc.gnu.org>
4163
4164 PR fortran/85631
4165 * trans.h (gfc_ss): Add field no_bounds_check.
4166 * trans-array.c (gfc_conv_ss_startstride): If flag_realloc_lhs and
4167 ss->no_bounds_check is set, do not use runtime checks.
4168 * trans-expr.c (gfc_trans_assignment_1): Set lss->no_bounds_check
4169 for reallocatable lhs.
4170
4171 2018-06-08 Steven G. Kargl <kargl@gcc.gnu.org>
4172
4173 PR fortran/86059
4174 * array.c (match_array_cons_element): NULL() cannot be in an
4175 array constructor.
4176
4177 2018-06-08 Steven G. Kargl <kargl@gcc.gnu.org>
4178
4179 PR fortran/78571
4180 * data.c (create_character_initializer): Return early if type is
4181 incompatible with CHARACTER.
4182
4183 2018-06-07 Steven G. Kargl <kargl@gcc.gnu.org>
4184
4185 PR fortran/86045
4186 * simplify.c (gfc_simplify_mod): Re-arrange code to test whether
4187 'P' is zero and issue an error if it is.
4188
4189 2018-06-06 Thomas Koenig <tkoenig@gcc.gnu.org>
4190
4191 PR fortran/85641
4192 * frontend-passes.c (is_fe_temp): Add prototype.
4193 (realloc_string_callback): Early return for frontend-generated
4194 temporary.
4195
4196 2018-06-05 Cesar Philippidis <cesar@codesourcery.com>
4197
4198 PR fortran/85701
4199
4200 * openmp.c (gfc_resolve_oacc_declare): Error on functions and
4201 subroutine data clause arguments.
4202
4203 2018-06-04 Steven G. Kargl <kargl@gcc.gnu.org>
4204
4205 PR fortran/85981
4206 * resolve.c (resolve_allocate_deallocate): Check errmsg is default
4207 character kind.
4208
4209 2018-06-03 Paul Thomas <pault@gcc.gnu.org>
4210
4211 PR fortran/36497
4212 * decl.c (variable_decl): Use gfc_add_type for cray pointees.
4213
4214 2018-06-01 Steven G. Kargl <kargl@gcc.gnu.org>
4215
4216 PR fortran/63570
4217 * check.c (gfc_check_random_init): New function. Check arguments of
4218 RANDOM_INIT.
4219 * gfortran.h (GFC_ISYM_RANDOM_INIT): New enum token.
4220 * intrinsic.c (add_subroutines): Add RANDOM_INIT to list of
4221 subroutines.
4222 (gfc_check_intrinsic_standard): Introduce Fortran 2018 check.
4223 * intrinsic.h: Add prototypes for gfc_check_random_init and
4224 gfc_resolve_random_init
4225 * intrinsic.texi: Document new intrinsic subprogram.
4226 * iresolve.c (gfc_resolve_random_init): Resolve routine name.
4227 * trans-decl.c: Declare gfor_fndecl_random_init
4228 * trans-intrinsic.c (conv_intrinsic_random_init): New function.
4229 Translate call to RANDOM_INIT.
4230 (gfc_conv_intrinsic_subroutine): Call it.
4231 * trans.h: Declare gfor_fndecl_random_init
4232
4233 2018-05-27 Steven G. Kargl <kargl@gcc.gnu.org>
4234
4235 * decl.c (match_data_constant): Fortran 2018 allows pointer
4236 initialization in a data statement.
4237
4238 2018-05-25 Janus Weil <janus@gcc.gnu.org>
4239
4240 PR fortran/85839
4241 * match.c (gfc_match_block_data): Call gfc_notify_std to warn about
4242 an obsolescent feature in Fortran 2018.
4243 (gfc_match_equivalence): Ditto.
4244 * resolve.c (resolve_common_blocks): Ditto.
4245 (gfc_resolve_forall): Ditto.
4246 * symbol.c (gfc_define_st_label): Ditto.
4247
4248 2018-05-24 Steven G. Kargl <kargl@gcc.gnu.org>
4249
4250 PR fortran/85543
4251 * resolve.c (update_current_proc_array_outer_dependency): Avoid NULL
4252 pointer dereference.
4253
4254 2018-05-24 Steven G. Kargl <kargl@gcc.gnu.org>
4255
4256 PR fortran/85780
4257 * resolve.c (resolve_fl_procedure): Avoid NULL dereference.
4258
4259 2018-05-24 Steven G. Kargl <kargl@gcc.gnu.org>
4260
4261 PR fortran/85779
4262 * decl.c (gfc_match_derived_decl): Fix NULL point dereference.
4263
4264 2018-05-24 Steven G. Kargl <kargl@gcc.gnu.org>
4265
4266 PR fortran/85895
4267 * resolve.c (resolve_sync): Resolve expression before checking for
4268 an error.
4269
4270 2018-05-22 Janus Weil <janus@gcc.gnu.org>
4271
4272 PR fortran/85841
4273 * libgfortran.h: Remove the macros GFC_STD_F2008_TS and
4274 GFC_STD_OPT_F08TS.
4275 * error.c (notify_std_msg): Remove GFC_STD_F2008_TS.
4276 * options.c (set_default_std_flags): Ditto.
4277 (gfc_handle_option): Make -std=f2008ts an alias for -std=f2018.
4278 * array.c (gfc_match_array_spec): Replace GFC_STD_F2008_TS by
4279 GFC_STD_F2018.
4280 * check.c (gfc_check_atomic, gfc_check_event_query,
4281 gfc_check_c_f_pointer, gfc_check_c_f_procpointer, gfc_check_c_funloc,
4282 gfc_check_c_loc, gfc_check_num_images, gfc_check_this_image): Ditto.
4283 * decl.c (gfc_verify_c_interop_param, gfc_match_decl_type_spec): Ditto.
4284 * intrinsic.c (add_functions, add_subroutines,
4285 gfc_check_intrinsic_standard): Ditto.
4286 * iso-c-binding.def: Ditto.
4287 * iso-fortran-env.def: Ditto.
4288 * match.c (gfc_match_event_post, gfc_match_event_wait,
4289 gfc_match_fail_image, gfc_match_form_team, gfc_match_change_team,
4290 gfc_match_end_team, gfc_match_sync_team): Ditto.
4291 * gfortran.texi: Remove mention of -std=f2008ts.
4292 Move TSs into F2018 section.
4293 * invoke.texi: Update documentation of -std=f2008ts.
4294
4295 2018-05-21 Janus Weil <janus@gcc.gnu.org>
4296
4297 PR fortran/85841
4298 * libgfortran.h: New macros GFC_STD_OPT_*.
4299 * error.c (notify_std_msg): New function.
4300 (gfc_notify_std): Adjust such that it can handle combinations of
4301 GFC_STD_* flags in the 'std' argument, not just a single one.
4302 * match.c (match_arithmetic_if, gfc_match_if): Reject arithmetic if
4303 in Fortran 2018.
4304 (gfc_match_stopcode): Use GFC_STD_OPT_* macros.
4305 * options.c (set_default_std_flags): Warn for F2018 deleted features
4306 by default.
4307 (gfc_handle_option): F2018 deleted features are allowed in earlier
4308 standards.
4309 * symbol.c (gfc_define_st_label, gfc_reference_st_label): Reject
4310 nonblock do constructs in Fortran 2018.
4311
4312 2018-05-20 Paul Thomas <pault@gcc.gnu.org>
4313
4314 PR fortran/80657
4315 * resolve.c (flag_fn_result_spec): Use the 'sym' argument to
4316 test for self refs to the function result in the character len
4317 expression. If a self reference is found, emit an error and
4318 return true.
4319 (resolve_fntype): Use the function symbol in the calls to the
4320 above.
4321
4322 2018-05-20 Paul Thomas <pault@gcc.gnu.org>
4323
4324 PR fortran/49636
4325 * trans-array.c (gfc_get_array_span): Renamed from
4326 'get_array_span'.
4327 (gfc_conv_expr_descriptor): Change references to above.
4328 * trans-array.h : Add prototype for 'gfc_get_array_span'.
4329 * trans-intrinsic.c (gfc_conv_associated): Add pre and post
4330 blocks for 'arg1'.
4331 * trans-stmt.c (trans_associate_var): If the associate name is
4332 a subref array pointer, use gfc_get_array_span for the span.
4333
4334 2018-05-20 Paul Thomas <pault@gcc.gnu.org>
4335
4336 PR fortran/82275
4337 * match.c (gfc_match_type_spec): Go through the array ref and
4338 decrement 'rank' for every dimension that is an element.
4339
4340 2018-05-19 Paul Thomas <pault@gcc.gnu.org>
4341
4342 PR fortran/82923
4343 PR fortran/66694
4344 PR fortran/82617
4345 * trans-array.c (gfc_alloc_allocatable_for_assignment): Set the
4346 charlen backend_decl of the rhs expr to ss->info->string_length
4347 so that the value in the current scope is used.
4348
4349 2018-05-13 Steven G. Kargl <kargl@gcc.gnu.org>
4350
4351 PR fortran/63529
4352 * gfortran.texi: Clarify documentation for Cray pointer and
4353 assumed-sized array.
4354
4355 2018-05-13 Paul Thomas <pault@gcc.gnu.org>
4356
4357 PR fortran/85742
4358 * trans-types.c (gfc_get_dtype_rank_type): Reorder evaluation
4359 of 'size'. If the element type is a pointer use the size of the
4360 TREE_TYPE of the type, unless it is VOID_TYPE. In this latter
4361 case, set the size to zero.
4362
4363 2018-05-13 Steven G. Kargl <kargl@gcc.gnu.org>
4364
4365 * gfortran.h: Remove prototype.
4366 * symbol.c (gfc_new_undo_checkpoint): Remove unused function.
4367
4368 2018-05-11 Steven G. Kargl <kargl@gcc.gnu.org>
4369
4370 PR fortran/85542
4371 * expr.c (check_inquiry): Avoid NULL pointer dereference.
4372
4373 2018-05-10 Steven G. Kargl <kargl@gcc.gnu.org>
4374
4375 PR fortran/85687
4376 * check.c (gfc_check_rank): Check that the argument is a data object.
4377
4378 2018-05-10 Steven G. Kargl <kargl@gcc.gnu.org>
4379
4380 PR fortran/85521
4381 * array.c (gfc_resolve_character_array_constructor): Substrings
4382 with upper bound smaller than lower bound are zero length strings.
4383
4384 2018-05-10 Steven G. Kargl <kargl@gcc.gnu.org>
4385
4386 PR fortran/70870
4387 * data.c (gfc_assign_data_value): Check that a data object does
4388 not also have default initialization.
4389
4390 2018-05-10 Marek Polacek <polacek@redhat.com>
4391
4392 PR fortran/85735
4393 * options.c (gfc_post_options): Set main_input_filename.
4394
4395 2018-05-10 Thomas Koenig <tkoenig@gcc.gnu.org>
4396
4397 PR fortran/54613
4398 * intrinsic.texi: Document BACK for MINLOC and MAXLOC.
4399
4400 2018-05-10 Paul Thomas <pault@gcc.gnu.org>
4401
4402 PR fortran/68846
4403 PR fortran/70864
4404 * resolve.c (get_temp_from_expr): The temporary must not have
4405 dummy or intent attributes.
4406
4407 2018-05-08 Thomas Koenig <tkoenig@gcc.gnu.org>
4408
4409 PR fortran/54613
4410 * check.c (gfc_check_minmaxloc): Remove error for BACK not being
4411 implemented. Use gfc_logical_4_kind for BACK.
4412 * simplify.c (min_max_choose): Add optional argument back_val.
4413 Handle it.
4414 (simplify_minmaxloc_to_scalar): Add argument back_val. Pass
4415 back_val to min_max_choose.
4416 (simplify_minmaxloc_to_nodim): Likewise.
4417 (simplify_minmaxloc_to_array): Likewise.
4418 (gfc_simplify_minmaxloc): Add argument back, handle it.
4419 Pass back_val to specific simplification functions.
4420 (gfc_simplify_minloc): Remove ATTRIBUTE_UNUSED from argument back,
4421 pass it on to gfc_simplify_minmaxloc.
4422 (gfc_simplify_maxloc): Likewise.
4423 * trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc): Adjust
4424 comment. If BACK is true, use greater or equal (or lesser or
4425 equal) insteal of greater (or lesser). Mark the condition of
4426 having found a value which exceeds the limit as unlikely.
4427
4428 2018-05-07 Jeff Law <law@redhat.comg>
4429
4430 * scanner.c (preprocessor_line): Call linemap_add after a line
4431 directive that changes the current filename.
4432
4433 2018-05-06 Andre Vehreschild <vehre@gcc.gnu.org>
4434
4435 PR fortran/85507
4436 * dependency.c (gfc_dep_resolver): Revert looking at coarray dimension
4437 introduced by r259385.
4438 * trans-intrinsic.c (conv_caf_send): Always report a dependency for
4439 same variables in coarray assignments.
4440
4441 2018-05-02 Tom de Vries <tom@codesourcery.com>
4442
4443 PR libgomp/82428
4444 * f95-lang.c (DEF_GOACC_BUILTIN_ONLY): Define.
4445
4446 2018-04-24 Steven G. Kargl <kargl@gcc.gnu.org>
4447
4448 PR fortran/85520
4449 * decl.c (gfc_match_char_spec): Check for negative length and set to 0.
4450
4451 2018-04-14 Andre Vehreschild <vehre@gcc.gnu.org>
4452
4453 PR fortran/81773
4454 PR fortran/83606
4455 * dependency.c (gfc_dep_resolver): Coarray indexes are to be ignored
4456 during dependency computation. They define no data dependency.
4457 * trans-array.c (conv_array_index_offset): The stride can not be set
4458 here, prevent fail.
4459 * trans-intrinsic.c (conv_caf_send): Add creation of temporary array
4460 for caf_get's result and copying to the array with vectorial
4461 indexing.
4462
4463 2018-04-14 Thomas Koenig <tkoenig@gcc.gnu.org>
4464
4465 PR fortran/85387
4466 * frontend-passes.c (traverse_io_block): Check for start, end or
4467 stride being defined by an outer implied DO loop.
4468
4469 2018-04-12 Thomas Koenig <tkoenig@gcc.gnu.org>
4470
4471 PR fortran/83064
4472 PR testsuite/85346
4473 * trans-stmt.c (gfc_trans_forall_loop): Use annot_expr_ivdep_kind
4474 for annotation and remove dependence on -ftree-parallelize-loops.
4475
4476 2018-04-10 Jakub Jelinek <jakub@redhat.com>
4477
4478 PR fortran/85313
4479 * openmp.c (resolve_omp_do): Remove bogus if (j < i) break;.
4480 (resolve_oacc_nested_loops): Likewise. Formatting fix.
4481
4482 2018-04-09 Thomas Koenig <tkoenig@gcc.gnu.org>
4483
4484 PR fortran/83064
4485 * trans-stmt.c (gfc_trans_forall_loop): Remove annotation for
4486 parallell processing of DO CONCURRENT -ftree-parallelize-loops
4487 is set.
4488
4489 2018-04-09 Thomas Koenig <tkoenig@gcc.gnu.org>
4490
4491 PR fortran/51260
4492 * resolve.c (resolve_variable): Simplify cases where access to a
4493 parameter array results in a single constant.
4494
4495 2018-04-02 Thomas Koenig <tkoenig@gcc.gnu.org>
4496
4497 PR fortran/85102
4498 * decl.c (variable_decl): If upper or lower bounds simplify
4499 to a constant, use that.
4500
4501 2018-03-30 Paul Thomas <pault@gcc.gnu.org>
4502
4503 PR fortran/84931
4504 * simplify.c (gfc_convert_constant): Handle case of array
4505 constructors within an array that has no iterator and improve
4506 the conciseness of this section of code.
4507
4508 2017-03-30 Thomas Koenig <tkoenig@gcc.gnu.org>
4509
4510 PR fortran/85111
4511 * array.c (gfc_resolve_character_array_constructor): Early
4512 exit for zero-size arrays.
4513 * simplify.c (simplify_transformation_to_array): Exit early
4514 if the result size is zero.
4515 (simplify_minmaxloc_to_array): Likewise.
4516
4517 2018-03-28 Mikael Morin <mikael@gcc.gnu.org>
4518
4519 PR fortran/69497
4520 * symbol.c (gfc_symbol_done_2): Start freeing namespaces
4521 from the root.
4522 (gfc_free_namespace): Restore assert (revert r258839).
4523
4524 2018-03-28 Jakub Jelinek <jakub@redhat.com>
4525
4526 * gfortran.h (gfc_dt): Rename default_exp field to dec_ext.
4527 * ioparm.def (IOPARM_dt_default_exp): Rename to ...
4528 (IOPARM_dt_dec_ext): ... this.
4529 * trans-io.c (build_dt): Adjust for default_exp renaming to
4530 dec_ext and IOPARM_dt_default_exp renaming to IOPARM_dt_dec_ext.
4531 * io.c (match_io): Likewise.
4532
4533 2018-03-27 Thomas Koenig <tkoenig@gcc.gnu.org>
4534
4535 PR fortran/85084
4536 * frontend-passes.c (gfc_run_passes): Do not run front-end
4537 optimizations if a previous error occurred.
4538
4539 2018-03-27 Thomas Koenig <tkoenig@gcc.gnu.org>
4540 Harald Anlauf <anlauf@gmx.de>
4541
4542 PR fortran/85083
4543 * primary.c (gfc_convert_to_structure_constructor): Check
4544 conformance of argument types in structure constructor.
4545
4546 2018-03-26 Thomas Koenig <tkoenig@gcc.gnu.org>
4547
4548 PR fortran/66709
4549 * io.c: Include constructor.h.
4550 (resolve_tag_format): For a constant character array, concatenate
4551 into a single character expression.
4552
4553 2018-03-25 Seth Johnson <johnsonsr@ornl.gov>
4554 Dominique d'Humieres <dominiq@gcc.gnu.org>
4555
4556 PR fortran/84924
4557 * check.c (gfc_check_c_f_pointer): Allow scalar noninteroperable
4558 scalar derived type with -std=f2003 and -std=f2008.
4559
4560 2018-03-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
4561 Dominique d'Humieres <dominiq@gcc.gnu.org>
4562
4563 PR fortran/69497
4564 * symbol.c (gfc_free_namespace): Delete the assert and only if
4565 refs count is equals zero, free the namespace. Otherwise,
4566 something is halfway and other errors will resound.
4567
4568 2018-03-24 Thomas Koenig <tkoenig@gcc.gnu.org>
4569
4570 PR fortran/70068
4571 * expr.c (find_substring_ref): Change types of start, end
4572 and length variables to gfc_charlen_t. Set length to zero
4573 for empty substring.
4574
4575 2018-03-24 Steven G. Kargl <kargl@gcc.gnu.org>
4576
4577 PR fortran/42651
4578 * decl.c (check_function_name): Improved error message
4579 (gfc_match_volatile, gfc_match_asynchronous) Use check_function_name.
4580
4581 2018-03-22 Steven G. Kargl <kargl@gcc.gnu.org>
4582
4583 PR fortran/84922
4584 * decl.c (get_proc_name): If the MODULE prefix appears in interface
4585 body, then it must appear on the contained subroutine or function.
4586 While here, fix nearby mis-indented code.
4587
4588 2018-03-21 Thomas Koenig <tkoenig@gcc.gnu.org>
4589 Harald Anlauf <anlauf@gmx.de>
4590
4591 PR fortran/84957
4592 * trans-types.c (gfc_sym_type): Do not dereference NULL pointer.
4593
4594 2018-03-21 Janne Blomqvist <jb@gcc.gnu.org>
4595
4596 PR fortran/84615
4597 * trans-expr.c (gfc_conv_procedure_call): Convert charlen to
4598 gfc_charlen_type_node when calling procedure.
4599
4600 2018-03-20 Steven G. Kargl <kargl@gcc.gnu.org>
4601
4602 PR fortran/85001
4603 * interface.c (symbol_rank): Remove bogus null pointer check that
4604 crept in when translating a ternary operator into an if-else
4605 constructor.
4606
4607 2018-03-19 Thomas Koenig <tkoenig@gcc.gnu.org>
4608
4609 PR fortran/84931
4610 * simplify.c (gfc_convert_constant): Correctly handle iterators
4611 for type conversion.
4612
4613 2018-03-18 Steven G. Kargl <kargl@gcc.gnu.org>
4614
4615 PR fortran/77414
4616 * decl.c (get_proc_name): Check for a subroutine re-defined in
4617 the contain portion of a subroutine. Change language of existing
4618 error message to better describe the issue. While here fix whitespace
4619 issues.
4620
4621 2018-03-18 Steven G. Kargl <kargl@gcc.gnu.org>
4622
4623 PR fortran/65453
4624 * decl.c (get_proc_name): Catch clash between a procedure statement
4625 and a contained subprogram
4626
4627 2018-03-16 Steven G. Kargl <kargl@gcc.gnu.org>
4628
4629 PR fortran/69395
4630 * decl.c (merge_array_spec): Correct the error condition.
4631
4632 2018-03-15 Steven G. Kargl <kargl@gcc.gnu.org>
4633
4634 PR fortran/78741
4635 * decl.c (get_proc_name): Check for clash of entry name with
4636 subroutine name.
4637
4638 2018-03-15 Steven G. Kargl <kargl@gcc.gnu.org>
4639
4640 PR fortran/69395
4641 * decl.c (merge_array_spec): Limit the merging to maximum allowed
4642 dimensions, and issue error message if limit is exceeded.
4643
4644 2018-03-13 Steven G. Kargl <kargl@gcc.gnu.org>
4645
4646 * check.c (gfc_check_kill_sub): Remove check for INTEGER(4) or (8).
4647 * intrinsic.c (add_functions): Remove reference to gfc_resolve_kill.
4648 (add_subroutines): Remove reference to gfc_resolve_kill_sub.
4649 * intrinsic.texi: Update documentation.
4650 * iresolve.c (gfc_resolve_kill, gfc_resolve_kill_sub): Remove.
4651 * trans-decl.c (gfc_build_intrinsic_function_decls): Add
4652 gfor_fndecl_kill and gfor_fndecl_kill_sub
4653 * trans-intrinsic.c (conv_intrinsic_kill, conv_intrinsic_kill_sub): new
4654 functions.
4655 (gfc_conv_intrinsic_function): Use conv_intrinsic_kill.
4656 (gfc_conv_intrinsic_subroutine): Use conv_intrinsic_kill_sub.
4657 * trans.h: Declare gfor_fndecl_kill and gfor_fndecl_kill_sub.
4658
4659 2018-03-11 Paul Thomas <pault@gcc.gnu.org>
4660
4661 PR fortran/84546
4662 * trans-array.c (structure_alloc_comps): Make sure that the
4663 vptr is copied and that the unlimited polymorphic _len is used
4664 to compute the size to be allocated.
4665 * trans-expr.c (gfc_get_class_array_ref): If unlimited, use the
4666 unlimited polymorphic _len for the offset to the element.
4667 (gfc_copy_class_to_class): Set the new 'unlimited' argument.
4668 * trans.h : Add the boolean 'unlimited' to the prototype.
4669
4670 2018-03-11 Steven G. Kargl <kargl@gcc.gnu.org>
4671
4672 PR fortran/83939
4673 * resolve.c (resolve_fl_procedure): Enforce F2018:C15100.
4674
4675 2018-03-11 Steven G. Kargl <kargls@gcc.gnu.org>
4676
4677 * check.c (gfc_check_kill): Check pid and sig are scalar.
4678 (gfc_check_kill_sub): Restrict kind to 4 and 8.
4679 * intrinsic.c (add_function): Sort keyword list. Add pid and sig
4680 keywords for KILL. Remove redundant *back="back" in favor of the
4681 original *bck="back".
4682 (add_subroutines): Sort keyword list. Add pid and sig keywords
4683 for KILL.
4684 * intrinsic.texi: Fix documentation to consistently use pid and sig.
4685 * iresolve.c (gfc_resolve_kill): Kind can only be 4 or 8. Choose the
4686 correct function.
4687 (gfc_resolve_rename_sub): Add comment.
4688
4689 2018-03-11 Thomas Koenig <tkoenig@gcc.gnu.org>
4690
4691 PR fortran/66128
4692 * simplify.c (simplify_transformation): Return default result for
4693 empty array argument.
4694 (gfc_simplify_all): Remove special-case handling for zerosize.
4695 (gfc_simplify_any): Likewise.
4696 (gfc_simplify_count): Likewise.
4697 (gfc_simplify_iall): Likewise.
4698 (gfc_simplify_iany): Likewise.
4699 (gfc_simplify_iparity): Likewise.
4700 (gfc_simplify_minval): Likewise.
4701 (gfc_simplify_maxval): Likewise.
4702 (gfc_simplify_norm2): Likewise.
4703 (gfc_simplify_product): Likewise.
4704 (gfc_simplify_sum): Likewise.
4705
4706 2018-03-10 Steven G. Kargl <kargl@gcc.gnu.org>
4707
4708 PR fortran/84734
4709 * arith.c (check_result, eval_intrinsic): If result overflows, pass
4710 the expression up the chain instead of a NULL pointer.
4711
4712 2018-03-07 Steven G. Kargl <kargl@gcc.gnu.org>
4713
4714 PR fortran/64124
4715 PR fortran/70409
4716 * decl.c (gfc_match_char_spec): Try to reduce a charlen to a constant.
4717
4718 2017-03-06 Thomas Koenig <tkoenig@gcc.gnu.org>
4719
4720 PR fortran/84697
4721 PR fortran/66128
4722 * expr.c (simplify_parameter_variable): If p is a size zero array
4723 and not an ARRAY_EXPR insert an empty array constructor and
4724 return.
4725 * gfortran.h: Add prototype for gfc_is_size_zero_array.
4726 * simplify.c (is_size_zero_array): Make non-static and rename into
4727 (gfc_is_size_zero_array): Check for parameter arrays of zero
4728 size by comparing shape and absence of constructor.
4729 (gfc_simplify_all): Use gfc_is_size_zero_array instead of
4730 is_size_zero_array.
4731 (gfc_simplify_count): Likewise.
4732 (gfc_simplify_iall): Likewise.
4733 (gfc_simplify_iany): Likewise.
4734 (gfc_simplify_iparity): Likewise.
4735 (gfc_simplify_minval): Likewise.
4736 (gfc_simplify_maxval): Likewise.
4737 (gfc_simplify_product): Likewise.
4738 (gfc_simplify_sum): Likewise.
4739
4740 2018-03-06 Steven G. Kargl <kargl@gcc.gnu.org>
4741
4742 PR fortran/56667
4743 * primary.c (match_sym_complex_part): Give the matcher for an implied
4744 do-loop a chance to run.
4745
4746 2018-03-03 Harald Anlauf <anlauf@gmx.de>
4747
4748 PR fortran/71085
4749 * trans-expr.c (gfc_apply_interface_mapping_to_expr): Do not
4750 dereference NULL pointer.
4751
4752 2018-03-03 Steven G. Kargl <kargl@gcc.gnu.org>
4753
4754 PR fortran/66128
4755 * simplify.c (is_size_zero_array): New function to check for size
4756 zero array.
4757 (gfc_simplify_all, gfc_simplify_any, gfc_simplify_count,
4758 gfc_simplify_iall, gfc_simplify_iany, gfc_simplify_iparity,
4759 gfc_simplify_minval, gfc_simplify_maxval, gfc_simplify_norm2,
4760 gfc_simplify_product, gfc_simplify_sum): Use it, and implement
4761 requirements from F2018.
4762
4763 2018-03-03 Steven G. Kargl <kargl@gcc.gnu.org>
4764
4765 PR fortran/51434
4766 * simplify.c (gfc_simplify_transfer): Resolve mold.
4767
4768 2018-03-03 Paul Thomas <pault@gcc.gnu.org>
4769
4770 PR fortran/80965
4771 * resolve.c (build_loc_call): Change symtree name from 'loc' to
4772 '_loc'.
4773
4774 2018-03-01 Paul Thomas <pault@gcc.gnu.org>
4775
4776 PR fortran/84219
4777 * target-memory.c (gfc_interpret_derived): Assert that BT_VOID
4778 components are caf tokens.
4779 (gfc_target_interpret_expr): Treat BT_VOID expressions as
4780 integers.
4781
4782 2018-03-01 Paul Thomas <pault@gcc.gnu.org>
4783
4784 PR fortran/84538
4785 * class.c (class_array_ref_detected): Remove the condition that
4786 there be no reference after the array reference.
4787 (find_intrinsic_vtab): Remove excess whitespace.
4788 * trans-array.c (gfc_conv_scalarized_array_ref): Rename 'tmp'
4789 as 'base and call build_class_array_ref earlier.
4790
4791 2018-02-28 Paul Thomas <pault@gcc.gnu.org>
4792
4793 PR fortran/83901
4794 * trans-stmt.c (trans_associate_var): Make sure that the se
4795 expression is a pointer type before converting it to the symbol
4796 backend_decl type.
4797
4798 2018-02-25 Steven G. Kargl <kargl@gcc.gnu.org>
4799
4800 PR fortran/83633
4801 * decl.c (variable_decl): Check that an explicit-shape-array with
4802 nonconstant bounds is allowed.
4803
4804 2018-02-25 Paul Thomas <pault@gcc.gnu.org>
4805
4806 PR fortran/84523
4807 * trans-intrinsic.c (gfc_conv_allocated): If the argument se
4808 has a pre block, add it to the expression pre block.
4809
4810 2018-02-25 Thomas Koenig <tkoenig@gcc.gnu.org>
4811
4812 PR fortran/78238
4813 * gfortran.h (gfc_integer_4_kind): Define.
4814 * resolve.c (resolve_select_type): Make sure that the
4815 kind of c->high is gfc_integer_4_kind.
4816
4817 2018-02-24 Steven G. Kargl <kargl@gcc.gnu.org>
4818
4819 PR fortran/30792
4820 * decl.c (gfc_match_data): Check for invalid substring in
4821 data-implied-do
4822
4823 2018-02-23 Steven G. Kargl <kargl@gcc.gnu.org>
4824
4825 * intrinsic.texi: Arguments to MATMUL cannot both be rank one.
4826
4827 2018-02-23 Steven G. Kargl <kargl@gcc.gnu.org>
4828
4829 PR fortran/84511
4830 * trans-io.c (transfer_expr): Deal with C_LOC in transfer statement.
4831
4832 2018-02-23 Steven G. Kargl <kargl@gcc.gnu.org>
4833
4834 PR fortran/84346
4835 * interface.c (compare_actual_formal): Issue error if keyword is
4836 used in a statement function.
4837
4838 2018-02-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
4839
4840 PR fortran/84506
4841 * trans-io.c (set_parameter_value_inquire): Adjust range check of
4842 negative unit values for kind=8 units to the kind=4 negative limit.
4843
4844 2018-02-23 Paul Thomas <pault@gcc.gnu.org>
4845
4846 PR fortran/83149
4847 * trans-types.c (gfc_sym_type): Test sym->ns->proc_name before
4848 accessing its components.
4849
4850 2018-02-23 Paul Thomas <pault@gcc.gnu.org>
4851
4852 PR fortran/83149
4853 * trans-decl.c (gfc_finish_var_decl): Test sym->ns->proc_name
4854 before accessing its components.
4855
4856 2018-02-23 Paul Thomas <pault@gcc.gnu.org>
4857
4858 PR fortran/83148
4859 * trans-const.c : Clean up some whitespace issues.
4860 * trans-expr.c (gfc_conv_initializer): If an iso_c_binding
4861 derived type has a kind value of zero, set it to the default
4862 integer kind.
4863
4864 2018-02-23 Janne Blomqvist <jb@gcc.gnu.org>
4865
4866 PR fortran/84519
4867 * trans-decl.c (gfc_build_builtin_function_decls): Add bool
4868 argument to stop and error stop decls.
4869 * trans-stmt.c (gfc_trans_stop): Add false value to argument
4870 lists.
4871
4872 2018-02-22 Janne Blomqvist <jb@gcc.gnu.org>
4873
4874 PR 78534
4875 PR 84509
4876 * trans-decl.c (gfc_build_builtin_function_decls): Pass
4877 gfc_int8_type node to pause_numeric, size_type_node to
4878 pause_string.
4879 * trans-stmt.c (gfc_trans_pause): Likewise.
4880
4881 2018-02-22 Janne Blomqvist <jb@gcc.gnu.org>
4882
4883 * gfortran.texi: Update Coarray API description.
4884 * trans-decl.c (gfc_build_builtin_function_decls): Use size_t for
4885 character lengths, int for exit codes.
4886 (generate_coarray_sym_init): Use size_t for character length.
4887 * trans-intrinsic.c (conv_co_collective): Likewise.
4888 * trans-stmt.c (gfc_trans_lock_unlock): Likewise.
4889 (gfc_trans_event_post_wait): Likewise.
4890 (gfc_trans_sync): Likewise.
4891 (gfc_trans_stop): Use size_t for character lengths, int for exit
4892 codes.
4893
4894 2018-02-20 Thomas Koenig <tkoenig@gcc.gnu.org>
4895
4896 PR fortran/48890
4897 PR fortran/83823
4898 * primary.c (gfc_convert_to_structure_constructor):
4899 For a constant string constructor, make sure the length
4900 is correct.
4901
4902 2018-02-19 Paul Thomas <pault@gcc.gnu.org>
4903
4904 PR fortran/83344
4905 PR fortran/83975
4906 * resolve.c (resolve_assoc_var): Rearrange the logic for the
4907 determination of the character length of associate names. If
4908 the associate name is missing a length expression or the length
4909 expression is not a constant and the target is not a variable,
4910 make the associate name allocatable and deferred length.
4911 * trans-decl.c (gfc_get_symbol_decl): Null the character length
4912 backend_decl for deferred length associate names that are not
4913 variables. Set 'length' to gfc_index_zero_node for character
4914 associate names, whose character length is a PARM_DECL.
4915
4916 2018-02-19 Thomas Koenig <tkoenig@gcc.gnu.org>
4917
4918 PR fortran/35339
4919 * frontend-passes.c (traverse_io_block): Remove workaround for
4920 PR 80945.
4921
4922 2018-02-19 Andre Vehreschild <vehre@gcc.gnu.org>
4923
4924 * gfortran.texi: Document additional src/dst_type. Fix some typos.
4925 * trans-decl.c (gfc_build_builtin_function_decls): Declare the new
4926 argument of _caf_*_by_ref () with * e { get, send, sendget }.
4927 * trans-intrinsic.c (gfc_conv_intrinsic_caf_get): Add the type of the
4928 data referenced when generating a call to caf_get_by_ref ().
4929 (conv_caf_send): Same but for caf_send_by_ref () and
4930 caf_sendget_by_ref ().
4931
4932 2018-02-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
4933
4934 PR fortran/84389
4935 * io.c (check_format): Allow FMT_COLON.
4936
4937 2018-02-18 Paul Thomas <pault@gcc.gnu.org>
4938
4939 PR fortran/80945
4940 * trans-array.c (gfc_conv_expr_descriptor): Set parmtype from
4941 the typenode in the case of deferred length characters.
4942
4943 2018-02-17 Thomas Koenig <tkoenig@gcc.gnu.org>
4944
4945 PR fortran/84270
4946 * frontend-passes (scalarized_expr): If the expression
4947 is an assumed size array, leave in the last reference
4948 and pass AR_SECTION instead of AR_FULL to gfc_resolve
4949 in order to avoid an error.
4950
4951 2018-02-17 Paul Thomas <pault@gcc.gnu.org>
4952
4953 PR fortran/84115
4954 * resolve.c (resolve_assoc_var): If a non-constant target expr.
4955 has no string length expression, make the associate variable
4956 into a deferred length, allocatable symbol.
4957 * trans-decl.c (gfc_is_reallocatable_lhs): Add and use a ptr to
4958 the symbol.
4959 * trans-stmt.c (trans_associate_var): Null and free scalar
4960 associate names that are allocatable. After assignment, remove
4961 the allocatable attribute to prevent reallocation.
4962
4963 2018-02-16 Jakub Jelinek <jakub@redhat.com>
4964
4965 PR fortran/84418
4966 * trans-openmp.c (gfc_trans_omp_clauses): For OMP_CLAUSE_LINEAR_REF
4967 kind set OMP_CLAUSE_LINEAR_STEP to TYPE_SIZE_UNIT times last_step.
4968
4969 2018-02-16 Dominique d'Humieres <dominiq@gcc.gnu.org>
4970
4971 PR fortran/84354
4972 * decl.c (gfc_get_pdt_instance): Replace '%qs' with %qs.
4973
4974 2018-02-15 Janus Weil <janus@gcc.gnu.org>
4975
4976 PR fortran/84409
4977 * interface.c (check_dtio_arg_TKR_intent): Add a check for character
4978 length.
4979
4980 2018-02-14 Janus Weil <janus@gcc.gnu.org>
4981
4982 PR fortran/84385
4983 * match.c (gfc_match_select_type): Fix check for selector in
4984 SELECT TYPE statement.
4985
4986 2018-02-13 Janus Weil <janus@gcc.gnu.org>
4987
4988 PR fortran/84313
4989 * symbol.c (check_conflict): Reject procedure pointers in common blocks.
4990
4991 2018-02-13 Alastair McKinstry <alastair.mckinstry@sceal.ie>
4992 Janne Blomqvist <jb@gcc.gnu.org>
4993
4994 * module.c (dump_module): Use lbasename to ensure that module
4995 files are reproducible.
4996
4997 2018-02-12 Janus Weil <janus@gcc.gnu.org>
4998
4999 PR fortran/84273
5000 * resolve.c (resolve_component): Fix checks of passed argument in
5001 procedure-pointer components.
5002
5003 2018-02-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
5004
5005 PR fortran/35299
5006 * resolve.c (resolve_formal_arglist): Update error message.
5007
5008 2018-02-11 Andre Vehreschild <vehre@gcc.gnu.org>
5009
5010 * gfortran.texi: Fix typos in documentation of caf_register ().
5011 * trans-array.c (structure_alloc_comps): Only register a component of
5012 a derived typed corray, not of an ultimate component coarray.
5013
5014 2018-02-11 Steven G. Kargl <kargl@gcc.gnu.org>
5015
5016 PR fortran/54223
5017 PR fortran/84276
5018 * interface.c (compare_actual_formal): Add in_statement_function
5019 bool parameter. Skip check of INTENT attribute for statement
5020 functions. Arguments to a statement function cannot be optional,
5021 issue error for missing argument.
5022 (gfc_procedure_use, gfc_ppc_use, gfc_arglist_matches_symbol): Use
5023 in_statement_function.
5024
5025 2018-02-11 Paul Thomas <pault@gcc.gnu.org>
5026
5027 PR fortran/84074
5028 * trans-expr.c (gfc_conv_derived_to_class): Set the use_offset
5029 flag. If the is a vector subscript or the expression is not a
5030 variable, make the descriptor one-based.
5031
5032 2018-02-10 Paul Thomas <pault@gcc.gnu.org>
5033
5034 PR fortran/84141
5035 PR fortran/84155
5036 * trans-array.c (gfc_array_init_size): Revert the change made
5037 in revision 257356 setting the dtype.
5038 * trans-types.c (gfc_get_dtype): Do not use the cached dtype.
5039 Call gfc_get_dtype_rank_type every time.
5040
5041 PR fortran/56691
5042 * trans-array.c (gfc_conv_expr_descriptor): If the source array
5043 is a descriptor type, use its offset, removing the condition
5044 that is be a class expression.
5045
5046 2018-02-07 Steven G. Kargl <kargl@gcc.gnu.org>
5047
5048 PR fortran/82994
5049 * match.c (gfc_match_deallocate): Check for NULL pointer.
5050
5051 2018-02-07 Thomas Koenig <tkoenig@gcc.gnu.org>
5052
5053 PR fortran/68560
5054 * trans-intrinsic.c (gfc_conv_intrinsic_shape): New function.
5055 (gfc_conv_intrinsic_function): Call it.
5056
5057 2018-02-07 Steven G. Kargl <kargl@gcc.gnu.org>
5058
5059 PR fortran/82049
5060 * match.c (gfc_match_type_spec): If the charlen is non-NULL, then
5061 try to resolve it. While here return early if possible.
5062
5063 2018-02-04 Paul Thomas <pault@gcc.gnu.org>
5064
5065 PR fortran/84115
5066 * trans-decl.c (gfc_get_symbol_decl): Do not finish the decl of
5067 'length' if the symbol charlen backend_decl is an indirect ref.
5068
5069 2018-02-03 Paul Thomas <pault@gcc.gnu.org>
5070
5071 PR fortran/84141
5072 PR fortran/84155
5073 * trans-array.c (gfc_array_init_size): Instead of gfc_get_dtype
5074 use gfc_get_dtype_rank_type.
5075
5076 2018-02-01 Janne Blomqvist <jb@gcc.gnu.org>
5077
5078 PR 83975
5079 PR 83344
5080 * resolve.c (resolve_assoc_var): Generate an error if
5081 target length unknown.
5082
5083 2018-02-01 Janne Blomqvist <jb@gcc.gnu.org>
5084
5085 PR fortran/83705
5086 * simplify.c (gfc_simplify_repeat): Increase limit for deferring
5087 to runtime, print a warning message.
5088
5089 2018-01-31 Jakub Jelinek <jakub@redhat.com>
5090
5091 PR fortran/84116
5092 * openmp.c (gfc_match_omp_clauses): If all the linear
5093 gfc_match_omp_variable_list calls failed, don't gfc_free_omp_namelist
5094 nor set *head = NULL. Formatting fixes.
5095
5096 2018-01-31 Paul Thomas <pault@gcc.gnu.org>
5097
5098 PR fortran/84088
5099 * trans-expr.c (gfc_conv_procedure_call): If the parm expr is
5100 an address expression passed to an assumed rank dummy, convert
5101 to an indirect reference.
5102
5103 2018-01-31 Thomas Koenig <tkoenig@gcc.gnu.org>
5104
5105 * dump-parse-tree.c (write_proc): Use sym_name (which may
5106 be sym->binding_label) instead of sym->name.
5107
5108 2018-01-31 Janne Blomqvist <jb@gcc.gnu.org>
5109
5110 * trans-const.c (gfc_conv_string_init): Use gfc_charlen_t instead
5111 of int for slen.
5112
5113 2018-01-31 Janne Blomqvist <jb@gcc.gnu.org>
5114
5115 PR fortran/78534
5116 * trans-expr.c (fill_with_spaces): Use memset instead of
5117 generating loop.
5118 (gfc_trans_string_copy): Improve opportunity to use builtins with
5119 constant lengths.
5120
5121 2018-01-30 Jakub Jelinek <jakub@redhat.com>
5122
5123 PR debug/84131
5124 * trans-array.c (gfc_get_descriptor_offsets_for_info): Set *data_off
5125 to DATA_FIELD's offset rather than OFFSET_FIELD's offset.
5126
5127 2018-01-30 Thomas Koenig <tkoenig@gcc.gnu.org>
5128
5129 PR fortran/84134
5130 * array.c (gfc_ref_dimen_size): Whitespace fixes. If stride is
5131 zero, return false.
5132
5133 2018-01-30 Thomas Koenig <tkoenig@gcc.gnu.org>
5134
5135 PR fortran/84133
5136 * frontend-passes (matmul_to_var_expr): Return early if
5137 in association list.
5138 (inline_matmul_assign): Likewise.
5139
5140 2017-01-29 Thomas Koenig <tkoenig@gcc.gnu.org>
5141
5142 PR fortran/84073
5143 * resolve.c (resolve_component): Ensure BIND(C) character
5144 components have length one.
5145 (resolve_symbol): Likewise for variables.
5146
5147 2018-01-27 Jakub Jelinek <jakub@redhat.com>
5148
5149 PR fortran/84065
5150 * decl.c (add_init_expr_to_sym): Ignore initializers for too large
5151 lengths.
5152
5153 2018-01-26 Damian Rouson <damian@sourceryinstitute.org>
5154 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
5155 Soren Rasmussen <s.c.rasmussen@gmail.com>
5156
5157 Partial support for Fortran 2018 teams features.
5158
5159 * array.c (gfc_match_array_ref): add team attribute in coarray
5160 transfers.
5161 * check.c (gfc_check_get_team, gfc_check_team_number): add new
5162 functions for get_team and team_number.
5163 * dump-parse-tree.c (show_code_node): add new statements: form team,
5164 change team, end team, and sync team.
5165 * expr.c (gfc_find_team_co): add new function.
5166 * gfortran.h: add new statements.
5167 * intrinsic.c (add_functions): add get_team and team_number functions.
5168 * intrinsic.h: add get_team and team_number prototypes for check,
5169 simplify, and resolve.
5170 * iresolve.c (gfc_resolve_get_team, gfc_resolve_team_number): add new
5171 functions.
5172 * iso-fortran-env.def: add the team_type derived type.
5173 * match.c (gfc_match_if, gfc_match_form_team, gfc_match_team_number)
5174 (gfc_match_end_team, gfc_match_sync_team, gfc_match_change_team):
5175 add change team, end team, form team, sync team match and functions.
5176 * match.h: add new prototypes for change team, end team, form team,
5177 and sync team.
5178 * parse.c (decode_statement): add cases for change team, end team,
5179 form team, and sync team.
5180 * resolve.c: add cases for exec form team, change team, end team, and
5181 sync team.
5182 * simplify.c (gfc_simplify_get_team): add new function for get team.
5183 * st.c (gfc_free_statement): add cases exec for change team, end team,
5184 form team, sync team.
5185 * trans-decl.c (gfor_fndecl_caf_form_team)
5186 (gfor_fndecl_caf_change_team, gfor_fndecl_caf_end_team)
5187 (gfor_fndecl_caf_sync_team, gfor_fndecl_caf_get_team)
5188 (gfor_fndecl_caf_team_number): add functions and definitions.
5189 * trans-intrinsic.c (conv_caf_send, conv_intrinsic_team_number): add
5190 new function and team_type argument support.
5191 * trans-stmt.c (gfc_trans_form_team, gfc_trans_change_team)
5192 (gfc_trans_end_team, gfc_trans_sync_team): add new functions.
5193 * trans-stmt.h: add new prototypes.
5194 * trans-types.c (gfc_get_derived_type): check condition for team_type.
5195 * trans.c (trans_code): new exec cases for form team, change team, end
5196 team, and sync team.
5197 * trans.h: add new prototypes.
5198
5199 2018-01-26 Steven G. Kargl <kargl@gcc.gnu.org>
5200
5201 PR fortran/83998
5202 * simplify.c (compute_dot_product): Initialize result to INTEGER(1) 0
5203 or .false. The summation does the correct type conversion.
5204 (gfc_simplify_dot_product): Special case zero-sized arrays.
5205
5206 2018-25-01 Paul Thomas <pault@gcc.gnu.org>
5207
5208 PR fortran/37577
5209 * array.c (gfc_match_array_ref): If standard earlier than F2008
5210 it is an error if the reference dimension is greater than 7.
5211 libgfortran.h : Increase GFC_MAX_DIMENSIONS to 15. Change the
5212 dtype masks and shifts accordingly.
5213 * trans-array.c (gfc_conv_descriptor_dtype): Use the dtype
5214 type node to check the field.
5215 (gfc_conv_descriptor_dtype): Access the rank field of dtype.
5216 (duplicate_allocatable_coarray): Access the rank field of the
5217 dtype descriptor rather than the dtype itself.
5218 * trans-expr.c (get_scalar_to_descriptor_type): Store the type
5219 of 'scalar' on entry and use its TREE_TYPE if it is ARRAY_TYPE
5220 (ie. a character).
5221 (gfc_conv_procedure_call): Pass TREE_OPERAND (tmp,0) to
5222 get_scalar_to_descriptor_type if the actual expression is a
5223 constant.
5224 (gfc_trans_structure_assign): Assign the rank directly to the
5225 dtype rank field.
5226 * trans-intrinsic.c (gfc_conv_intrinsic_rank): Cast the result
5227 to default integer kind.
5228 (gfc_conv_intrinsic_sizeof): Obtain the element size from the
5229 'elem_len' field of the dtype.
5230 * trans-io.c (gfc_build_io_library_fndecls): Replace
5231 gfc_int4_type_node with dtype_type_node where necessary.
5232 (transfer_namelist_element): Use gfc_get_dtype_rank_type for
5233 scalars.
5234 * trans-types.c : Provide 'get_dtype_type_node' to acces the
5235 dtype_type_node and, if necessary, build it.
5236 The maximum size of an array element is now determined by the
5237 maximum value of size_t.
5238 Update the description of the array descriptor, including the
5239 type def for the dtype_type.
5240 (gfc_get_dtype_rank_type): Build a constructor for the dtype.
5241 Distinguish RECORD_TYPEs that are BT_DERIVED or BT_CLASS.
5242 (gfc_get_array_descriptor_base): Change the type of the dtype
5243 field to dtype_type_node.
5244 (gfc_get_array_descr_info): Get the offset to the rank field of
5245 the dtype.
5246 * trans-types.h : Add a prototype for 'get_dtype_type_node ()'.
5247 * trans.h : Define the indices of the dtype fields.
5248
5249 2018-23-01 Paul Thomas <pault@gcc.gnu.org>
5250
5251 PR fortran/83866
5252 * decl.c (gfc_match_derived_decl): If eos not matched, recover
5253 and emit error about garbage after declaration.
5254
5255 2018-23-01 Paul Thomas <pault@gcc.gnu.org>
5256
5257 PR fortran/83898
5258 * trans-stmt.c (trans_associate_var): Do not set cst_array_ctor
5259 for characters.
5260
5261 2018-01-22 Janne Blomqvist <jb@gcc.gnu.org>
5262
5263 PR 78534
5264 PR 83704
5265 * arith.c (gfc_arith_concat): Use size_t for string length.
5266 (gfc_compare_string): Likewise.
5267 (gfc_compare_with_Cstring): Likewise.
5268 * array.c (gfc_resolve_character_array_constructor): Use
5269 HOST_WIDE_INT, gfc_mpz_get_hwi.
5270 * check.c (gfc_check_fe_runtime_error): Use size_t.
5271 * data.c (create_character_initializer): Use HOST_WIDE_INT,
5272 gfc_extract_hwi.
5273 * decl.c (gfc_set_constant_character_len): Use gfc_charlen_t.
5274 (add_init_expr_to_sym): Use HOST_WIDE_INT.
5275 * expr.c (gfc_build_init_expr): Use HOST_WIDE_INT,
5276 gfc_extract_hwi.
5277 (gfc_apply_init): Likewise.
5278 * match.h (gfc_set_constant_character_len): Update prototype.
5279 * primary.c (match_string_constant): Use size_t.
5280 * resolve.c (resolve_ordinary_assign): Use HOST_WIDE_INT,
5281 gfc_mpz_get_hwi.
5282 * simplify.c (init_result_expr): Likewise.
5283 (gfc_simplify_len_trim): Use size_t.
5284 * target-memory.c (gfc_encode_character): Use size_t.
5285 (gfc_target_encode_expr): Use HOST_WIDE_INT, gfc_mpz_get_hwi.
5286 (interpret_array): Use size_t.
5287 (gfc_interpret_character): Likewise.
5288 * target-memory.h (gfc_encode_character): Update prototype.
5289 (gfc_interpret_character): Likewise.
5290 (gfc_target_interpret_expr): Likewise.
5291 * trans-const.c (gfc_build_string_const): Use size_t for length
5292 argument.
5293 (gfc_build_wide_string_const): Likewise.
5294 * trans-const.h (gfc_build_string_const): Likewise.
5295 (gfc_build_wide_string_const): Likewise.
5296
5297 2018-01-20 Steven G. Kargl <kargl@gcc.gnu.org>
5298
5299 PR fortran/83900
5300 * simplify.c (gfc_simplify_matmul): Set return type correctly.
5301
5302 2018-01-19 Steven G. Kargl <kargl@gcc.gnu.org>
5303
5304 PR fortran/83900
5305 * simplify.c (gfc_simplify_matmul): Delete bogus assertion.
5306
5307 2018-01-17 Harald Anlauf <anlauf@gmx.de>
5308
5309 PR fortran/83864
5310 * expr.c (add_init_expr_to_sym): Do not dereference NULL pointer.
5311
5312 2018-01-17 Harald Anlauf <anlauf@gmx.de>
5313
5314 PR fortran/83874
5315 * decl.c (add_init_expr_to_sym): Do not dereference NULL pointer.
5316
5317 2018-01-15 Louis Krupp <louis.krupp@zoho.com>
5318
5319 PR fortran/82257
5320 * interface.c (compare_rank): Don't try to retrieve CLASS_DATA
5321 from symbol marked unlimited polymorphic.
5322 * resolve.c (resolve_structure_cons): Likewise.
5323 * misc.c (gfc_typename): Don't dereference derived->components
5324 if it's NULL.
5325
5326 2018-01-15 Thomas Koenig <tkoenig@gcc.gnu.org>
5327
5328 PR fortran/54613
5329 * gfortran.h (gfc_check_f): Rename f4ml to f5ml.
5330 (gfc_logical_4_kind): New macro
5331 * intrinsic.h (gfc_simplify_minloc): Add a gfc_expr *argument.
5332 (gfc_simplify_maxloc): Likewise.
5333 (gfc_resolve_maxloc): Likewise.
5334 (gfc_resolve_minloc): Likewise.
5335 * check.c (gfc_check_minloc_maxloc): Add checking for "back"
5336 argument; also raise error if it is used (for now). Add it
5337 if it isn't present.
5338 * intrinsic.c (add_sym_4ml): Rename to
5339 (add_sym_5ml), adjust for extra argument.
5340 (add_functions): Add "back" constant. Adjust maxloc and minloc
5341 for back argument.
5342 * iresolve.c (gfc_resolve_maxloc): Add back argument. If back is
5343 not of gfc_logical_4_kind, convert.
5344 (gfc_resolve_minloc): Likewise.
5345 * simplify.c (gfc_simplify_minloc): Add back argument.
5346 (gfc_simplify_maxloc): Likewise.
5347 * trans-intinsic.c (gfc_conv_intrinsic_minmaxloc): Rename last
5348 argument to %VAL to ensure passing by value.
5349 (gfc_conv_intrinsic_function): Call gfc_conv_intrinsic_minmaxloc
5350 also for library calls.
5351
5352 2018-01-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
5353
5354 PR fortran/82007
5355 * resolve.c (resolve_transfer): Delete code looking for 'DT'
5356 format specifiers in format strings. Set formatted to true if a
5357 format string or format label is present.
5358 * trans-io.c (get_dtio_proc): Likewise. (transfer_expr): Fix
5359 whitespace.
5360
5361 2018-01-13 Thomas Koenig <tkoenig@gcc.gnu.org>
5362
5363 PR fortran/83744
5364 * dump-parse-tree.c (get_c_type_name): Remove extra line.
5365 Change for loop to use declaration in for loop. Handle BT_LOGICAL
5366 and BT_CHARACTER.
5367 (write_decl): Add where argument. Fix indentation. Replace
5368 assert with error message. Add typename to warning
5369 in comment.
5370 (write_type): Adjust locus to call of write_decl.
5371 (write_variable): Likewise.
5372 (write_proc): Likewise. Replace assert with error message.
5373
5374 2018-01-13 Paul Thomas <pault@gcc.gnu.org>
5375
5376 PR fortran/52162
5377 * trans-expr.c (gfc_trans_scalar_assign): Flag is_alloc_lhs if
5378 the rhs expression is neither an elemental nor a conversion
5379 function.
5380
5381 PR fortran/83622
5382 * trans-array.c (is_pointer_array): Remove unconditional return
5383 of false for -fopenmp.
5384
5385 2018-01-13 Thomas Koenig <tkoenig@gcc.gnu.org>
5386 <emsr@gcc.gnu.org>
5387
5388 PR fortran/83803
5389 * dump-parse-tree.c (write_proc): Always emit closing parenthesis
5390 for functions.
5391
5392 2018-01-10 Steven G. Kargl <kargl@gcc.gnu.org>
5393
5394 PR fortran/82367
5395 * resolve.c (resolve_allocate_expr): Check for NULL pointer.
5396
5397 2018-01-10 Steven G. Kargl <kargl@gcc.gnu.org>
5398
5399 PR fortran/83093
5400 * resolve.c (resolve_charlen): Check the type of cl->length
5401 after resolution.
5402
5403 2018-01-10 Janne Blomqvist <jb@gcc.gnu.org>
5404
5405 PR fortran/83740
5406 * trans-array.c (gfc_trans_array_ctor_element): Fix formatting.
5407
5408 2018-01-10 Janne Blomqvist <jb@gcc.gnu.org>
5409
5410 PR fortran/83740
5411 * trans-array.c (gfc_trans_array_ctor_element): Convert RHS to the
5412 LHS type when assigning.
5413
5414 2018-01-09 Steven G. Kargl <kargl@gcc.gnu.org>
5415
5416 PR fortran/83742
5417 * expr.c (gfc_is_simply_contiguous): Check for NULL pointer.
5418
5419 2018-01-08 Steven G. Kargl <kargl@gcc.gnu.org>
5420
5421 * match.c (gfc_match_allocate): Check for NULL pointer.
5422
5423 2018-01-08 Steven G. Kargl <kargl@gcc.gnu.org>
5424
5425 * expr.c (gfc_check_pointer_assign): Fix typo in comment.
5426
5427 2018-01-08 Paul Thomas <pault@gcc.gnu.org>
5428
5429 PR fortran/83611
5430 * decl.c (gfc_get_pdt_instance): If parameterized arrays have
5431 an initializer, convert the kind parameters and add to the
5432 component if the instance.
5433 * trans-array.c (structure_alloc_comps): Add 'is_pdt_type' and
5434 use it with case COPY_ALLOC_COMP. Call 'duplicate_allocatable'
5435 for parameterized arrays. Clean up typos in comments. Convert
5436 parameterized array initializers and copy into the array.
5437 * trans-expr.c (gfc_trans_scalar_assign): Do a deep copy for
5438 parameterized types.
5439 *trans-stmt.c (trans_associate_var): Deallocate associate vars
5440 as necessary, when they are PDT function results for example.
5441
5442 PR fortran/83731
5443 * trans-array.c (structure_alloc_comps): Only compare len parms
5444 when they are declared explicitly.
5445
5446 2018-01-06 Janne Blomqvist <jb@gcc.gnu.org>
5447
5448 PR fortran/50892
5449 * trans-expr.c (gfc_trans_pointer_assignment): fold_convert rhs to
5450 lhs type.
5451
5452 2018-01-05 Janne Blomqvist <jb@gcc.gnu.org>
5453
5454 PR fortran/78534
5455 PR fortran/66310
5456 * array.c (got_charlen): Use gfc_charlen_int_kind.
5457 * class.c (gfc_find_derived_vtab): Use gfc_size_kind instead of
5458 hardcoded kind.
5459 (find_intrinsic_vtab): Likewise.
5460 * decl.c (match_char_length): Use gfc_charlen_int_kind.
5461 (add_init_expr_to_sym): Use gfc_charlen_t and gfc_charlen_int_kind.
5462 (gfc_match_implicit): Use gfc_charlen_int_kind.
5463 * dump-parse-tree.c (show_char_const): Use gfc_charlen_t and size_t.
5464 (show_expr): Use HOST_WIDE_INT_PRINT_DEC.
5465 * expr.c (gfc_get_character_expr): Length parameter of type
5466 gfc_charlen_t.
5467 (gfc_get_int_expr): Value argument of type HOST_WIDE_INT.
5468 (gfc_extract_hwi): New function.
5469 (simplify_const_ref): Make string_len of type gfc_charlen_t.
5470 (gfc_simplify_expr): Use HOST_WIDE_INT for substring refs.
5471 * frontend-passes.c (optimize_trim): Use gfc_charlen_int_kind.
5472 * gfortran.h (gfc_mpz_get_hwi): New prototype.
5473 (gfc_mpz_set_hwi): Likewise.
5474 (gfc_charlen_t): New typedef.
5475 (gfc_expr): Use gfc_charlen_t for character lengths.
5476 (gfc_size_kind): New extern variable.
5477 (gfc_extract_hwi): New prototype.
5478 (gfc_get_character_expr): Use gfc_charlen_t for character length.
5479 (gfc_get_int_expr): Use HOST_WIDE_INT type for value argument.
5480 * gfortran.texi: Update description of hidden string length argument.
5481 * iresolve.c (check_charlen_present): Use gfc_charlen_int_kind.
5482 (gfc_resolve_char_achar): Likewise.
5483 (gfc_resolve_repeat): Pass string length directly without
5484 temporary, use gfc_charlen_int_kind.
5485 (gfc_resolve_transfer): Use gfc_charlen_int_kind.
5486 * match.c (select_intrinsic_set_tmp): Use HOST_WIDE_INT for charlen.
5487 * misc.c (gfc_mpz_get_hwi): New function.
5488 (gfc_mpz_set_hwi): New function.
5489 * module.c (atom_int): Change type from int to HOST_WIDE_INT.
5490 (parse_integer): Don't complain about large integers.
5491 (write_atom): Use HOST_WIDE_INT for integers.
5492 (mio_integer): Handle integer type mismatch.
5493 (mio_hwi): New function.
5494 (mio_intrinsic_op): Use HOST_WIDE_INT.
5495 (mio_array_ref): Likewise.
5496 (mio_expr): Likewise.
5497 * primary.c (match_substring): Use gfc_charlen_int_kind.
5498 * resolve.c (resolve_substring_charlen): Use gfc_charlen_int_kind.
5499 (resolve_character_operator): Likewise.
5500 (resolve_assoc_var): Likewise.
5501 (resolve_select_type): Use HOST_WIDE_INT for charlen, use snprintf.
5502 (resolve_charlen): Use mpz_sgn to determine sign.
5503 * simplify.c (gfc_simplify_repeat): Use HOST_WIDE_INT/gfc_charlen_t
5504 instead of long.
5505 * symbol.c (generate_isocbinding_symbol): Use gfc_charlen_int_kind.
5506 * target-memory.c (size_character): Length argument of type
5507 gfc_charlen_t.
5508 (gfc_encode_character): Likewise.
5509 (gfc_interpret_character): Use gfc_charlen_t.
5510 * target-memory.h (gfc_encode_character): Modify prototype.
5511 * trans-array.c (gfc_trans_array_ctor_element): Use existing type.
5512 (get_array_ctor_var_strlen): Use gfc_conv_mpz_to_tree_type.
5513 (trans_array_constructor): Use existing type.
5514 (get_array_charlen): Likewise.
5515 * trans-const.c (gfc_conv_mpz_to_tree_type): New function.
5516 * trans-const.h (gfc_conv_mpz_to_tree_type): New prototype.
5517 * trans-decl.c (gfc_trans_deferred_vars): Use existing type.
5518 (add_argument_checking): Likewise.
5519 * trans-expr.c (gfc_class_len_or_zero_get): Build const of type
5520 gfc_charlen_type_node.
5521 (gfc_conv_intrinsic_to_class): Use gfc_charlen_int_kind instead of
5522 4, fold_convert to correct type.
5523 (gfc_conv_class_to_class): Build const of type size_type_node for
5524 size.
5525 (gfc_copy_class_to_class): Likewise.
5526 (gfc_conv_string_length): Use same type in expression.
5527 (gfc_conv_substring): Likewise, use HOST_WIDE_INT for charlen.
5528 (gfc_conv_string_tmp): Make sure len is of the right type.
5529 (gfc_conv_concat_op): Use same type in expression.
5530 (gfc_conv_procedure_call): Likewise.
5531 (fill_with_spaces): Comment out memset() block due to spurious
5532 -Wstringop-overflow warnings.
5533 (gfc_trans_string_copy): Use gfc_charlen_type_node.
5534 (alloc_scalar_allocatable_for_subcomponent_assignment):
5535 fold_convert to right type.
5536 (gfc_trans_subcomponent_assign): Likewise.
5537 (trans_class_vptr_len_assignment): Build const of correct type.
5538 (gfc_trans_pointer_assignment): Likewise.
5539 (alloc_scalar_allocatable_for_assignment): fold_convert to right
5540 type in expr.
5541 (trans_class_assignment): Build const of correct type.
5542 * trans-intrinsic.c (gfc_conv_associated): Likewise.
5543 (gfc_conv_intrinsic_repeat): Do calculation in sizetype.
5544 * trans-io.c (gfc_build_io_library_fndecls): Use
5545 gfc_charlen_type_node for character lengths.
5546 (set_string): Convert to right type in assignment.
5547 * trans-stmt.c (gfc_trans_label_assign): Build const of
5548 gfc_charlen_type_node.
5549 (trans_associate_var): Likewise.
5550 (gfc_trans_character_select): Likewise.
5551 (gfc_trans_allocate): Likewise, don't typecast strlen result.
5552 (gfc_trans_deallocate): Don't typecast strlen result.
5553 * trans-types.c (gfc_size_kind): New variable.
5554 (gfc_init_types): Determine gfc_charlen_int_kind and gfc_size_kind
5555 from size_type_node.
5556 * trans-types.h: Fix comment.
5557
5558 2018-01-04 Thomas Koenig <tkoenig@gcc.gnu.org>
5559
5560 PR fortran/83683
5561 PR fortran/45689
5562 * check.c (gfc_check_eoshift): Check for string length and
5563 for conformance of boundary.
5564 * intrinsic.c (add_functions): Add gfc_simplify_eoshift.
5565 * intrinsic.h: Add prototype for gfc_simplify_eoshift.
5566 * simplify.c (gfc_simplify_eoshift): New function.
5567
5568 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
5569 Alan Hayward <alan.hayward@arm.com>
5570 David Sherwood <david.sherwood@arm.com>
5571
5572 * trans-types.c (gfc_type_for_mode): Handle MODE_VECTOR_BOOL.
5573
5574 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
5575 Alan Hayward <alan.hayward@arm.com>
5576 David Sherwood <david.sherwood@arm.com>
5577
5578 * trans-types.c (gfc_type_for_mode): Check valid_vector_subparts_p.
5579
5580 2018-01-03 Thomas Koenig <tkoenig@gcc.gnu.org>
5581
5582 PR fortran/83664
5583 * check.c (gfc_check_eoshift): Error for missing boundary if array
5584 is not one of the standard types.
5585
5586 2018-01-03 Jakub Jelinek <jakub@redhat.com>
5587
5588 Update copyright years.
5589
5590 * gfortranspec.c (lang_specific_driver): Update copyright notice
5591 dates.
5592 * gfc-internals.texi: Bump @copying's copyright year.
5593 * gfortran.texi: Ditto.
5594 * intrinsic.texi: Ditto.
5595 * invoke.texi: Ditto.
5596
5597 2017-01-02 Thomas Koenig <tkoenig@gcc.gnu.org>
5598
5599 PR fortran/45689
5600 * intrinsic.c (add_function): Add gfc_simplify_maxloc and
5601 gfc_simplify_minloc to maxloc and minloc, respectively.
5602 * intrinsic.h: Add prototypes for gfc_simplify_minloc
5603 and gfc_simplify_maxloc.
5604 * simplify.c (min_max_chose): Adjust prototype. Modify function
5605 to have a return value which indicates if the extremum was found.
5606 (is_constant_array_expr): Fix typo in comment.
5607 (simplify_minmaxloc_to_scalar): New function.
5608 (simplify_minmaxloc_nodim): New function.
5609 (new_array): New function.
5610 (simplify_minmaxloc_to_array): New function.
5611 (gfc_simplify_minmaxloc): New function.
5612 (simplify_minloc): New function.
5613 (simplify_maxloc): New function.
5614
5615 2018-01-02 Thomas Koenig <tkoenig@gcc.gnu.org>
5616
5617 PR fortran/45689
5618 PR fortran/83650
5619 * simplify.c (gfc_simplify_cshift): Re-implement to allow full
5620 range of arguments.
5621
5622 2018-01-01 Paul Thomas <pault@gcc.gnu.org>
5623
5624 PR fortran/83076
5625 * resolve.c (resolve_fl_derived0): Add caf_token fields for
5626 allocatable and pointer scalars, when -fcoarray selected.
5627 * trans-types.c (gfc_copy_dt_decls_ifequal): Copy the token
5628 field as well as the backend_decl.
5629 (gfc_get_derived_type): Flag GFC_FCOARRAY_LIB for module
5630 derived types that are not vtypes. Components with caf_token
5631 attribute are pvoid types. For a component requiring it, find
5632 the caf_token field and have the component token field point to
5633 its backend_decl.
5634
5635 PR fortran/83319
5636 *trans-types.c (gfc_get_array_descriptor_base): Add the token
5637 field to the descriptor even when codimen not set.
5638 \f
5639 Copyright (C) 2018 Free Software Foundation, Inc.
5640
5641 Copying and distribution of this file, with or without modification,
5642 are permitted in any medium without royalty provided the copyright
5643 notice and this notice are preserved.