12021-05-14  Release Manager
2
3	* GCC 8.5.0 released.
4
52021-04-02  Harald Anlauf  <anlauf@gmx.de>
6
7	Backported from master:
8	2021-04-01  Harald Anlauf  <anlauf@gmx.de>
9
10	PR fortran/99840
11	* simplify.c (gfc_simplify_transpose): Properly initialize
12	resulting shape.
13
142021-01-28  Harald Anlauf  <anlauf@gmx.de>
15
16	Backported from master:
17	2021-01-28  Harald Anlauf  <anlauf@gmx.de>
18
19	PR fortran/86470
20	* trans.c (gfc_call_malloc): Allocate area of size 1 if passed
21	size is NULL (as documented).
22
232020-12-23  Harald Anlauf  <anlauf@gmx.de>
24
25	Backported from master:
26	2020-12-17  Harald Anlauf  <anlauf@gmx.de>
27
28	PR fortran/98307
29	* trans-stmt.c (check_forall_dependencies): Extend dependency
30	check to allocatable components of derived types.
31
322020-12-11  Harald Anlauf  <anlauf@gmx.de>
33
34	Backported from master:
35	2020-11-29  Harald Anlauf  <anlauf@gmx.de>
36
37	* expr.c (simplify_parameter_variable): Fix up character length
38	after copying an array-valued expression.
39
402020-09-28  Mark Eggleston  <markeggleston@gcc.gnu.org>
41
42	Revert:
43	2020-09-27  Steven G. Kargl  <kargl@gcc.gnu.org>
44		    Mark Eggleston  <markeggleston@gcc.gnu.org>
45
46	PR fortran/95614
47	* decl.c (gfc_get_common): Use gfc_match_common_name instead
48	of match_common_name.
49	* decl.c (gfc_bind_idents): Use gfc_match_common_name instead
50	of match_common_name.
51	* match.c : Rename match_common_name to gfc_match_common_name.
52	* match.c (gfc_match_common): Use gfc_match_common_name instead
53	of match_common_name.
54	* match.h : Rename match_common_name to gfc_match_common_name.
55	* resolve.c (resolve_common_vars): Check each symbol in a
56	common block has a global symbol.  If there is a global symbol
57	issue an error if the symbol type is known as is not a common
58	block name.
59
602020-09-27  Mark Eggleston  <markeggleston@gcc.gnu.org>
61
62	Backported from master:
63	2020-09-27  Steven G. Kargl  <kargl@gcc.gnu.org>
64		    Mark Eggleston  <markeggleston@gcc.gnu.org>
65
66	PR fortran/95614
67	* decl.c (gfc_get_common): Use gfc_match_common_name instead
68	of match_common_name.
69	* decl.c (gfc_bind_idents): Use gfc_match_common_name instead
70	of match_common_name.
71	* match.c : Rename match_common_name to gfc_match_common_name.
72	* match.c (gfc_match_common): Use gfc_match_common_name instead
73	of match_common_name.
74	* match.h : Rename match_common_name to gfc_match_common_name.
75	* resolve.c (resolve_common_vars): Check each symbol in a
76	common block has a global symbol.  If there is a global symbol
77	issue an error if the symbol type is known as is not a common
78	block name.
79
802020-09-19  Tobias Burnus  <tobias@codesourcery.com>
81
82	Backported from master:
83	2020-09-17  Tobias Burnus  <tobias@codesourcery.com>
84
85	PR fortran/96041
86	PR fortran/93423
87	* decl.c (gfc_match_submod_proc): Avoid later double-free
88	in the error case.
89
902020-09-19  Harald Anlauf  <anlauf@gmx.de>
91
92	Backported from master:
93	2020-07-02  Harald Anlauf  <anlauf@gmx.de>
94
95	PR fortran/93423
96	* resolve.c (resolve_symbol): Avoid NULL pointer dereference.
97
982020-07-23  Harald Anlauf  <anlauf@gmx.de>
99
100	Backported from master:
101	2020-07-21  Harald Anlauf  <anlauf@gmx.de>
102
103	PR fortran/89574
104	* trans-decl.c (gfc_get_extern_function_decl): Check whether a
105	symbol belongs to a different module.
106
1072020-07-05  Harald Anlauf  <anlauf@gmx.de>
108
109	Backported from master:
110	2020-06-30  Harald Anlauf  <anlauf@gmx.de>
111
112	PR fortran/88379
113	* resolve.c (resolve_assoc_var): Avoid NULL pointer dereference.
114
1152020-07-02  Harald Anlauf  <anlauf@gmx.de>
116
117	Backported from master:
118	2020-06-29  Harald Anlauf  <anlauf@gmx.de>
119
120	PR fortran/71706
121	* trans-stmt.c (gfc_trans_sync): Do proper kind conversion in
122	bounds-checking code.
123
1242020-07-01  Mark Eggleston  <markeggleston@gcc.gnu.org>
125
126	Backported from master:
127	2020-07-01  Steven G. Kargl  <kargl@gcc.gnu.org>
128		    Mark Eggleston  <markeggleston@gcc.gnu.org>
129
130	PR fortran/95829
131	* decl.c (gfc_match_decl_type_spec): Compare with "* ) " instead
132	of "*)".
133
1342020-06-24  Harald Anlauf  <anlauf@gmx.de>
135
136	PR fortran/95689
137	* interface.c (check_sym_interfaces): Enlarge temporary buffer,
138	and add check on length on mangled name to prevent overflow.
139
1402020-06-23  Harald Anlauf  <anlauf@gmx.de>
141
142	Backported from master:
143	2020-06-20  Harald Anlauf  <anlauf@gmx.de>
144
145	PR fortran/95689
146	* interface.c (check_sym_interfaces): Enlarge temporary buffer,
147	and add check on length on mangled name to prevent overflow.
148
1492020-06-14  Thomas Koenig  <tkoenig@gcc.gnu.org>
150
151	PR fortran/94109
152	* class.c (finalize_component): Return early if finalization has
153	already happened for expression and component within namespace.
154	* gfortran.h (gfc_was_finalized): New type.
155	(gfc_namespace): Add member was_finalzed.
156	(gfc_expr): Remove finalized.
157	* symbol.c (gfc_free_namespace): Free was_finalized.
158
1592020-06-01  Thomas Koenig  <tkoenig@gcc.gnu.org>
160
161	PR fortran/94361
162	* class.c (finalize_component): Use expr->finalized instead of
163	comp->finalized.
164	* gfortran.h (gfc_component): Remove finalized member.
165	(gfc_expr): Add it here instead.
166
1672020-05-28  Tobias Burnus  <tobias@codesourcery.com>
168	    Mark Eggleston  <markeggleston@gnu.gcc.org>
169
170	PR fortran/50392
171	* trans-decl.c (gfc_get_symbol_decl): Remove unnecessary block
172	delimiters.  Add auxiliary variables if a label is assigned to
173	a return variable. (gfc_gat_fake_result): If the symbol has an
174	assign attribute set declaration from the symbol's backend
175	declaration.
176
1772020-05-20  Mark Eggleston  <markeggleston@gcc.gnu.org>
178
179	Backport from master
180	2020-05-20  Mark Eggleston  <markeggleston@gcc.gnu.org>
181
182	PR fortran/39695
183	* resolve.c (resolve_fl_procedure): Set name depending on
184	whether the result attribute is set.  For PROCEDURE/RESULT
185	conflict use the name in sym->ns->proc_name->name.
186	* symbol.c (gfc_add_type): Add check for function and result
187	attributes use sym->ns->proc_name->name if both are set.
188	Where the symbol cannot have a type use the name in
189	sym->ns->proc_name->name.
190
1912020-05-11  Mark Eggleston  <markeggleston@gcc.gnu.org>
192
193	Backported from mainline
194	2020-05-11  Janus Weil  <janus@gcc.gnu.org>
195		    Dominique d'Humieres  <dominiq@lps.ens.fr>
196
197	PR fortran/59107
198	* gfortran.h: Rename field resolved as resolve_symbol_called
199	and assign two 2 bits instead of 1.
200	* interface.c (gfc_find_typebound_dtio_proc): Use new field name.
201	* resolve.c (gfc_resolve_intrinsic): Replace check of the formal
202	field with resolve_symbol_called is at least 2, if it is not
203	set the field to 2.  (resolve_symbol): Use new field name and
204	check whether it is at least 1, if it is not set the field to 1.
205
2062020-04-27  Thomas Koenig  <tkoenig@gcc.gnu.org>
207
208	PR fortran/93956
209	PR fortran/94788
210	* expr.c (gfc_check_pointer_assign): Revert patch for PR 93956.
211	* interface.c: Likewise.
212
2132020-04-24  Thomas Koenig  <tkoenig@gcc.gnu.org>
214
215	Backport from trunk.
216	PR fortran/93956
217	* expr.c (gfc_check_pointer_assign): Also set subref_array_pointer
218	when a function returns a pointer.
219	* interface.c (gfc_set_subref_array_pointer_arg): New function.
220	(gfc_procedure_use): Call it.
221
2222020-04-14  Thomas Koenig  <tkoenig@gcc.gnu.org>
223
224	Backport from trunk.
225	PR fortran/94270
226	* trans-decl.c (generate_local_decl): Do not warn if the
227	symbol is artifical.
228
2292020-04-02  Mark Eggleston <markeggleston@gcc.gnu.org>
230
231	Backport from master
232	2020-04-02  Mark Eggleston <markeggleston@gcc.gnu.org>
233	Steven G. Kargl  <kargl@gcc.gnu.org>
234
235	PR fortran/94030
236	* gfortran.dg/pr94030_1.f90: New test.
237	* gfortran.dg/pr94030_2.f90: New test.
238
2392020-03-30  Jakub Jelinek  <jakub@redhat.com>
240
241	Backported from mainline
242	2019-12-06  Jakub Jelinek  <jakub@redhat.com>
243
244	PR fortran/92775
245	* trans.h (struct lang_type, struct lang_decl): Remove span member.
246	(GFC_DECL_SPAN, GFC_TYPE_ARRAY_SPAN): Remove macros.
247	* trans-array.h (gfc_get_descriptor_offsets_for_info): Add another
248	argument.
249	* trans-array.c (gfc_get_descriptor_offsets_for_info): Add SPAN_OFF
250	argument and initialize *SPAN_OFF to the offset of span field.
251	* trans-types.c (gfc_get_array_descr_info): Adjust
252	gfc_get_descriptor_offsets_for_info caller.  Compute elem_size
253	as base->span instead of TYPE_SIZE_UNIT (etype) constant.
254
2552020-03-25  Mark Eggleston <markeggleston@gcc.gnu.org>
256
257	Backport from master
258	2020-03-25  Mark Eggleston <markeggleston@gcc.gnu.org>
259
260	PR fortran/93484
261	* match.c (gfc_match_type_spec): Replace gfc_match_init_expr with
262	gfc_match_expr. Return m if m is MATCH_NO or MATCH_ERROR.
263
2642020-02-04  Tobias Burnus  <tobias@codesourcery.com>
265
266	Backported from mainline
267	2020-01-31  Tobias Burnus  <tobias@codesourcery.com>
268
269	PR fortran/93462
270	* frontend-passes.c (gfc_code_walker): For EXEC_OACC_ATOMIC, set
271	in_omp_atomic to true prevent front-end optimization.
272
2732020-03-04  Release Manager
274
275	* GCC 8.4.0 released.
276
2772020-02-19  Mark Eggleston  <markeggleston@gcc.gnu.org>
278
279	Backported from mainline
280	2020-02-18  Mark Eggleston  <markeggleston@gcc.gnu.org>
281
282	PR fortran/93714
283	* expr.c (gfc_check_pointer_assign): Move check for
284	matching character length to after checking the lvalue
285	attributes for target or pointer.
286
2872020-02-14  Jakub Jelinek  <jakub@redhat.com>
288
289	Backported from mainline
290	2020-01-29  Jakub Jelinek  <jakub@redhat.com>
291
292	PR fortran/93463
293	* openmp.c (oacc_code_to_statement): Handle
294	EXEC_OACC_{ROUTINE,UPDATE,WAIT,CACHE,{ENTER,EXIT}_DATA,DECLARE}.
295
296	2020-01-22  Jakub Jelinek  <jakub@redhat.com>
297
298	* parse.c (parse_omp_structured_block): Handle ST_OMP_TARGET_PARALLEL.
299	* trans-openmp.c (gfc_trans_omp_target)
300	<case EXEC_OMP_TARGET_PARALLEL>: Call pushlevel first.
301
302	PR fortran/93329
303	* openmp.c (omp_code_to_statement): Handle remaining EXEC_OMP_*
304	cases.
305
306	2019-12-19  Jakub Jelinek  <jakub@redhat.com>
307
308	PR fortran/92977
309	* frontend-passes.c (in_omp_atomic): New variable.
310	(cfe_expr_0, matmul_to_var_expr, matmul_temp_args,
311	inline_matmul_assign): Don't optimize in EXEC_OMP_ATOMIC.
312	(optimize_namespace): Clear in_omp_atomic.
313	(gfc_code_walker): Set in_omp_atomic for EXEC_OMP_ATOMIC, save/restore
314	it around.
315
316	2019-12-11  Jakub Jelinek  <jakub@redhat.com>
317
318	PR fortran/92899
319	* trans-openmp.c (gfc_trans_omp_atomic): For GFC_OMP_ATOMIC_SWAP,
320	do look through conversion on expr2 if any.
321
322	2019-12-05  Jakub Jelinek  <jakub@redhat.com>
323
324	PR fortran/92781
325	* trans-decl.c (gfc_get_symbol_decl): If sym->backend_decl is
326	current_function_decl, add length to current rather than parent
327	function and expect DECL_CONTEXT (length) to be current_function_decl.
328
329	2019-11-27  Jakub Jelinek  <jakub@redhat.com>
330
331	PR fortran/91944
332	* simplify.c (gfc_simplify_spread): Check gfc_init_expr_flag instead
333	of gfc_current_ns->sym_root->n.sym->attr.flavor == FL_PARAMETER.
334
3352020-02-03  Tobias Burnus  <tobias@codesourcery.com>
336
337	Backported from mainline
338	2020-02-03  Tobias Burnus  <tobias@codesourcery.com>
339
340	PR fortran/93541
341	* intrinisic.texi (OpenMP Modules OMP_LIB and OMP_LIB_KINDS):
342	Add undocumented parameters from omp_lib.f90.in.
343
3442020-01-10  Tobias Burnus  <tobias@codesourcery.com>
345
346	Backported from mainline
347	2020-01-09  Tobias Burnus  <tobias@codesourcery.com>
348
349	PR fortran/84135
350	* array.c (gfc_set_array_spec): Fix shifting of codimensions
351	when adding a dimension.
352	* decl.c (merge_array_spec): Ditto. Fix using correct codimensions.
353
3542019-12-30  Thomas Koenig  <tkoenig@gcc.gnu.org>
355
356	Backport from trunk
357	PR fortran/92961
358	* gfortran.h (gfc_seen_div0): Add declaration.
359	* arith.h (gfc_seen_div0): Add definition.
360	(eval_intrinsic): For integer division by zero, set gfc_seen_div0.
361	* decl.c (variable_decl):  If resolution resp. simplification
362	fails for array spec and a division of zero error has been
363	seen, return MATCH_ERROR.
364
3652019-11-29  Harald Anlauf  <anlauf@gmx.de>
366
367	Backport from mainline
368	PR fortran/92629
369	* simplify.c (convert_mpz_to_unsigned): Skip assert for argument
370	range when -fno-range-check is specified.
371
3722019-11-10  Thomas Koenig  <tkoenig@gcc.gnu.org>
373
374	Backport from trunk
375	PR fortran/92113
376	* trans-decl.c (gfc_get_symbol_decl): If __def_init actually
377	contains a value, put it into  the read-only section.
378
3792019-10-27  Paul Thomas  <pault@gcc.gnu.org>
380
381	Backport from mainline
382	PR fortran/86248
383	* resolve.c (flag_fn_result_spec): Correct a typo before the
384	function declaration.
385	* trans-decl.c (gfc_sym_identifier): Boost the length of 'name'
386	to allow for all variants. Simplify the code by using a pointer
387	to the symbol's proc_name and taking the return out of each of
388	the conditional branches. Allow symbols with fn_result_spec set
389	that do not come from a procedure namespace and have a module
390	name to go through the non-fn_result_spec branch.
391
3922019-10-18  Steven G. Kargl  <kargl@gcc.gnu.org>
393
394	PR fortran/69455
395	* trans-decl.c (generate_local_decl): Avoid misconstructed
396	intrinsic modules in a BLOCK construct.
397
3982019-10-07  Thomas Koenig <tkoenig@gcc.gnu.org>
399
400	Backport from trunk
401	PR fortran/84487
402	* trans-decl.c (gfc_get_symbol_decl): For __def_init, set
403	DECL_ARTIFICAL and do not set TREE_READONLY.
404
4052019-09-28  Paul Thomas  <pault@gcc.gnu.org>
406
407	Backport from mainline
408	PR fortran/91588
409	* expr.c (check_inquiry): Remove extended component refs by
410	using symbol pointers. If a function argument is an associate
411	variable with a constant target, copy the target expression in
412	place of the argument expression. Check that the charlen is not
413	NULL before using the string length.
414
4152019-09-18  Thomas Koenig  <tkoenig@gcc.gnu.org>
416
417	Backport from trunk
418	PR fortran/91550
419	* frontend-passes.c (do_subscript): If step equals
420	zero, a previuos error has been reported; do nothing
421	in this case.
422	* resolve.c (gfc_resolve_iterator): Move error checking
423	after type conversion.
424
4252019-09-15  Thomas Koenig  <tkoenig@gcc.gnu.org>
426
427	Backport from trunk
428	PR fortran/91557
429	* trans-decl.c (generate_local_decl): Do not warn if the symbol
430	is artificial.
431	* trans-types.c (get_formal_from_actual_arglist): Set artificial
432	attribute on dummy arguments.
433
4342013-08-13  Thomas Koenig  <tkoenig@gcc.gnu.org>
435
436	Backport from trunk
437	PR fortran/90563
438	* frontend-passes.c (insert_index): Suppress errors while
439	simplifying the resulting expression.
440
4412019-08-02  Thomas Koenig  <tkoenig@gcc.gnu.org>
442	Paul Thomas <pault@gcc.gnu.org>
443
444	Backport from trunk
445	PR fortran/90786
446	PR fortran/90813
447	* trans-expr.c (pointer_assignment_is_proc_pointer) Remove as
448	it is very simple and only called from one place.
449	(gfc_trans_pointer_assignment): Rename non_proc_pointer_assign
450	as non_proc_ptr_assign. Assign to it directly, rather than call
451	to above, deleted function and use gfc_expr_attr instead of
452	only checking the reference chain.
453	* trans-decl.c (sym_identifier): New function.
454	(mangled_identifier): New function, doing most of the work
455	of gfc_sym_mangled_identifier.
456	(gfc_sym_mangled_identifier): Use mangled_identifier.  Add mangled
457	identifier to global symbol table.
458	(get_proc_pointer_decl): Use backend decl from global identifier
459	if present.
460
4612019-07-07  Paul Thomas  <pault@gcc.gnu.org>
462
463	Backport from trunk
464	PR fortran/91077
465	* trans-array.c (gfc_conv_scalarized_array_ref) Delete code
466	that gave symbol backend decl for subref arrays.
467
4682019-06-21  Thomas Koenig  <tkoenig@gcc.gnu.org>
469
470	Backport from trunk
471	PR fortran/90937
472	* trans-types.c (get_formal_from_actual_arglist): Get symbol from
473	current namespace so it will be freed later.  If symbol is of type
474	character, get an empty character length.
475
4762019-06-12  Thomas Koenig  <tkoenig@gcc.gnu.org>
477	Tomáš Trnka  <trnka@scm.com>
478
479	Backport from trunk
480	PR fortran/90744
481	* trans-types.c (get_formal_from_actual_arglist): Unset typespec
482	flags which make no sense for procedures without explicit
483	interface.
484
4852019-06-10  Paul Thomas  <pault@gcc.gnu.org>
486
487	Backport from trunk
488	PR fortran/90498
489	* trans-stmt.c (trans_associate_var) Do not use the saved
490	descriptor if the expression is a COMPONENT_REF.
491
4922019-06-09  Paul Thomas  <pault@gcc.gnu.org>
493
494	Backport from trunk
495	PR fortran/57284
496	* resolve.c (find_array_spec): If this is a class expression
497	and the symbol and component array specs are the same, this is
498	not an error.
499	*trans-intrinsic.c (gfc_conv_intrinsic_size): If a class symbol
500	argument, has no namespace, it has come from the interface
501	mapping and the _data component must be accessed directly.
502
5032019-05-30  Marek Polacek  <polacek@redhat.com>
504
505	* lang.opt (ftail-call-workaround): Fix a typo.
506
5072019-05-30  Jakub Jelinek  <jakub@redhat.com>
508
509	* lang.opt (ftail-call-workaround=): Fix a typo - lenghts to lengths.
510
5112019-05-29  Jakub Jelinek  <jakub@redhat.com>
512
513	PR fortran/90329
514	Backported from mainline
515	2019-05-29  Jakub Jelinek  <jakub@redhat.com>
516
517	PR fortran/90329
518	* lang.opt (fbroken-callers): Remove.
519	(ftail-call-workaround, ftail-call-workaround=): New options.
520	* gfortran.h (struct gfc_namespace): Add implicit_interface_calls.
521	* interface.c (gfc_procedure_use): Set implicit_interface_calls
522	for calls to implicit interface procedures.
523	* trans-decl.c (create_function_arglist): Use flag_tail_call_workaround
524	instead of flag_broken_callers.  If it is not 2, also require
525	sym->ns->implicit_interface_calls.
526	* invoke.texi (fbroken-callers): Remove documentation.
527	(ftail-call-workaround, ftail-call-workaround=): Document.
528
529	2019-05-19  Thomas Koenig  <tkoenig@gcc.gnu.org>
530
531	PR fortran/90329
532	* invoke.texi: Document -fbroken-callers.
533	* lang.opt: Add -fbroken-callers.
534	* trans-decl.c (create_function_arglist): Only set
535	DECL_HIDDEN_STRING_LENGTH if flag_broken_callers is set.
536
537	2019-05-16  Jakub Jelinek  <jakub@redhat.com>
538
539	PR fortran/90329
540	* trans-decl.c (create_function_arglist): Set
541	DECL_HIDDEN_STRING_LENGTH on hidden string length PARM_DECLs if
542	len is constant.
543
5442019-04-30  Jakub Jelinek  <jakub@redhat.com>
545
546	Backported from mainline
547	2019-03-11  Jakub Jelinek  <jakub@redhat.com>
548
549	PR fortran/89651
550	* trans-openmp.c (gfc_omp_clause_default_ctor): Set TREE_NO_WARNING
551	on decl if adding COND_EXPR for allocatable.
552	(gfc_omp_clause_copy_ctor): Set TREE_NO_WARNING on dest.
553
5542019-04-24  Paul Thomas  <pault@gcc.gnu.org>
555
556	Backport from mainline
557	PR fortran/87127
558	* resolve.c (check_host_association): If an external function
559	is typed but not declared explicitly to be external, change the
560	old symbol from a variable to an external function.
561
5622019-04-14  Thomas Koenig  <tkoenig@gcc.gnu.org>
563
564	Backport from trunk
565	PR fortran/87352
566	* gfortran.h (gfc_component): Add finalized field.
567	* class.c (finalize_component): If the component is already
568	finalized, return early.  Set component->finalized on exit.
569
5702019-04-14  Thomas Koenig  <tkoenig@gcc.gnu.org>
571
572	Backport from trunk
573	PR fortran/89981
574	* resolve.c (resolve_global_procedure): If the global symbol is an
575	ENTRY, also look up its name among the entries.
576
5772019-04-10  Harald Anlauf  <anlauf@gmx.de>
578
579	Backport from trunk
580	PR fortran/89904
581	* check.c (gfc_check_transfer): Reject procedures as actual
582	arguments for SOURCE and MOLD of TRANSFER intrinsic.
583
5842019-03-31  Harald Anlauf  <anlauf@gmx.de>
585
586	PR fortran/83515
587	PR fortran/85797
588	* trans-types.c (gfc_typenode_for_spec): Handle conversion for
589	procedure pointers.
590	* target-memory.c (gfc_element_size): Handle size determination
591	for procedure pointers.
592
5932019-03-30  Thomas Koenig  <tkoenig@gcc.gnu.org>
594
595	PR fortran/78865
596	Backport from trunk
597	* interface.c (compare_actual_formal): Change errors about
598	missing or extra to gfc_error_now to make sure they are issued.
599	Change "spec" to "specifier" in message.
600	* resolve.c (resolve_global_procedure): Also check for mismatching
601	interface with global symbols if the namespace has already been
602	resolved.
603
6042019-03-24  Janus Weil  <janus@gcc.gnu.org>
605
606	PR fortran/71861
607	Backport from trunk
608	* symbol.c (check_conflict): ABSTRACT attribute conflicts with
609	INTRINSIC attribute.
610
6112019-03-23  Thomas Koenig  <tkoeng@gcc.gnu.org>
612
613	PR fortran/68009
614	Backport from trunk
615	* iresolve.c: Include trans.h.
616	(gfc_resolve_fe_runtine_error): Set backend_decl on
617	resolved_sym.
618
6192019-03-17  Thomas Koenig  <tkoenig@gcc.gnu.org>
620
621	PR fortran/84394
622	Backport from trunk
623	* symbol.c (gfc_add_subroutine): If we are encountering a
624	subrtoutine within a BLOCK DATA and the name starts with an
625	underscore, do not check.
626
6272019-03-16  Thomas Koenig  <tkoenig@gcc.gnu.org>
628
629	PR fortran/66089
630	Backport from trunk
631	* trans-array.c (gfc_scalar_elemental_arg_saved_as_reference):
632	Return false if a scalar tempoary is needed.
633	(gfc_walk_variable_expr): Fix up class refs.
634
6352019-03-16  Thomas Koenig  <tkoenig@gcc.gnu.org>
636
637	PR fortran/66695
638	PR fortran/77746
639	PR fortran/79485
640	Backport from trunk
641	* gfortran.h (gfc_symbol): Add bind_c component.
642	(gfc_get_gsymbol): Add argument bind_c.
643	* decl.c (add_global_entry): Add bind_c argument to
644	gfc_get_symbol.
645	* parse.c (parse_block_data): Likewise.
646	(parse_module): Likewise.
647	(add_global_procedure): Likewise.
648	(add_global_program): Likewise.
649	* resolve.c (resolve_common_blocks): Likewise.
650	(resolve_global_procedure): Likewise.
651	(gfc_verify_binding_labels): Likewise.
652	* symbol.c (gfc_get_gsymbol): Add argument bind_c. Set bind_c
653	in gsym.
654	* trans-decl.c (gfc_get_module_backend_decl): Add bind_c argument
655	to gfc_get_symbol.
656	(gfc_get_extern_function_decl): If the sym has a binding label
657	and it cannot be found in the global symbol tabel, it is the wrong
658	one and vice versa.
659
6602019-03-13  Thomas Koenig  <tkoenig@gcc.gnu.org>
661
662	PR fortran/87673
663	Backport from trunk
664	* match.c (gfc_match_type_spec): Remove call to
665	gfc_resolve_expr for character length.
666
6672019-03-10  Thomas Koenig  <tkoenig@gcc.gnu.org>
668
669	PR fortran/71544
670	Backport from trunk
671	* trans-types.c (gfc_typenode_for_spec) Set ts->is_c_interop of
672	C_PTR and C_FUNPTR.
673	(create_fn_spec): Mark argument as escaping if ts->is_c_interop is set.
674
6752019-03-10  Thomas Koenig  <tkoenig@gcc.gnu.org>
676	Steven G. Kargl  <kargl@gcc.gnu.org>
677
678	PR fortran/87734
679	Backort from trunk
680	* symbol.c (gfc_add_procedure): Only throw an error if the
681	procedure has not been declared either PUBLIC or PRIVATE.
682	* resolve.c (is_illegal_recursion): Remove an assert().
683
6842019-03-06  Harald Anlauf  <anlauf@gmx.de>
685
686	Backport from trunk
687	PR fortran/71203
688	* expr.c (simplify_const_ref): Avoid null pointer dereference.
689
6902019-03-06  Thomas Koenig  <tkoenig@gcc.gnu.org>
691
692	PR fortran/72714
693	Backport from trunk
694	* resolve.c (resolve_allocate_expr): Add some tests for coarrays.
695
6962019-03-03  Harald Anlauf  <anlauf@gmx.de>
697
698	Backport from trunk
699	PR fortran/89077
700	* decl.c (gfc_set_constant_character_len): Clear original string
701	representation after padding has been performed to target length.
702	* resolve.c (gfc_resolve_substring_charlen): Check substring
703	length for constantness prior to general calculation of length.
704
7052019-03-03  Harald Anlauf  <anlauf@gmx.de>
706	    Steven G. Kargl  <kargl@gcc.gnu.org>
707
708	Backport from trunk
709	PR fortran/77583
710	* symbol.c (check_conflict): Check for valid procedure name
711	passed to error reporting routine.
712
7132019-03-03  Thomas Koenig  <tkoenig@gcc.gnu.org>
714
715	PR fortran/89174
716	Backport from trunk
717	* trans-expr.c (gfc_find_and_cut_at_last_class_ref): Add is_mold
718	to garguments. If we are dealing with a MOLD, call
719	gfc_expr_to_initialize().
720	* trans-stmt.c (gfc_trans_allocate): For MOLD, pass is_mold=true
721	to gfc_find_and_cut_at_last_class_ref.
722	* trans.h (gfc_find_and_cut_at_last_class_ref): Add optional
723	argument is_mold with default false.
724
7252019-03-03  Thomas Koenig  <tkoenig@gcc.gnu.org>
726
727	PR fortran/87689
728	Backport from trunk
729	* gfortran.dg/lto/20091028-1_0.f90: Add -Wno-lto-type-mismatch to
730	options.
731	* gfortran.dg/lto/20091028-2_0.f90: Likewise.
732	* gfortran.dg/lto/pr87689_0.f: New file.
733	* gfortran.dg/lto/pr87689_1.f: New file.
734	* gfortran.dg/altreturn_9_0.f90: New file.
735	* gfortran.dg/altreturn_9_1.f90: New file.
736
7372019-03-02  Jerry DeLisle <jvdelisle@gcc.gnu.org>
738
739	Backport from trunk
740	PR fortran/84387
741	* trans-io.c (transfer_expr): Do not return if there are no
742	components to the derived type or class.
743
7442019-03-02  Harald Anlauf  <anlauf@gmx.de>
745
746	Backport from trunk
747	PR fortran/89516
748	* check.c (gfc_calculate_transfer_sizes): Correct checks for cases
749	where storage size of elements of MOLD is 0.
750
751	PR fortran/89492
752	* check.c (gfc_calculate_transfer_sizes): Handle cases where
753	storage size of elements of MOLD is 0.
754
755	PR fortran/89266
756	PR fortran/88326
757	* target-memory.c (gfc_element_size): Return false if element size
758	cannot be determined; element size is returned separately.
759	(gfc_target_expr_size): Return false if expression size cannot be
760	determined; expression size is returned separately.
761	* target-memory.h: Adjust prototypes.
762	* check.c (gfc_calculate_transfer_sizes): Adjust references to
763	gfc_target_expr_size, gfc_element_size.
764	* arith.c (hollerith2representation): Likewise.
765	* class.c (find_intrinsic_vtab): Likewise.
766	* simplify.c (gfc_simplify_sizeof): Likewise.
767
7682019-02-23  Thomas Koenig  <tkoenig@gcc.gnu.org>
769
770	PR fortran/86119
771	Backport from trunk
772	* class.c (gfc_get_len_component): Add argument k for kind.
773	If the kind of the resulting expression is not equal to k,
774	convert it.
775	* gfortran.h (gfc_len_component): Adjust prototype.
776	* simplify.c (gfc_simplify_len): Pass kind to
777	gfc_get_len_component.
778
7792019-02-23  Paul Thomas  <pault@gcc.gnu.org>
780
781	Backport from trunk
782	PR fortran/88117
783	* resolve.c (deferred_op_assign): Return if the lhs expression
784	has the pointer attribute.
785
7862019-02-22  Thomas Koenig  <tkoenig@gcc.gnu.org>
787
788	PR fortran/71066
789	Backport from trunk
790	* trans-decl.c (generate_coarray_sym_init):  For an array
791	constructor in a DATA statement of a coarray variable, set the
792	rank to 1 to avoid confusion later on.  If the constructor
793	contains only one value, use that for initiailizig.
794
7952019-02-22  Release Manager
796
797	* GCC 8.3.0 released.
798
7992019-02-10  Harald Anlauf  <anlauf@gmx.de>
800
801	Backport from trunk
802	PR fortran/89077
803	* decl.c (add_init_expr_to_sym): Copy length of string initializer
804	to declared symbol.
805
8062019-02-10  Thomas Koenig  <tkoenig@gcc.gnu.org>
807
808	PR fortran/71237
809	Backport from trunk
810	* expr.c (gfc_check_assign): Add argument is_init_expr.  If we are
811	looking at an init expression, issue error if the target is not a
812	TARGET and we are not looking at a procedure pointer.
813	* gfortran.h (gfc_check_assign): Add optional argument
814	is_init_expr.
815
8162019-02-07  Jakub Jelinek  <jakub@redhat.com>
817
818	Backported from mainline
819	2019-02-01  Jakub Jelinek  <jakub@redhat.com>
820
821	PR fortran/83246
822	PR fortran/89084
823	* trans-decl.c (generate_local_decl): Add referenced FL_PARAMETERs
824	if sym->ns->construct_entities rather than if
825	sym->ns->parent->code->op == EXEC_BLOCK.
826
827	2019-01-19  Jakub Jelinek  <jakub@redhat.com>
828
829	PR fortran/88902
830	* trans-decl.c (gfc_get_symbol_decl): Don't add length to function
831	or parent function if it has been added there already.
832
8332019-02-05  Thomas Koenig  <tkoenig@gcc.gnu.org>
834
835	PR fortran/67679
836	Backport from trunk
837	* trans-array.c (gfc_array_allocate):  For setting the bounds on
838	the new array, add a condition for a not previously allocated
839	variable.
840
8412019-02-03  Paul Thomas  <pault@gcc.gnu.org>
842
843	Backport from trunk
844	PR fortran/88393
845	* trans-expr.c (gfc_conv_procedure_call): For derived entities,
846	passed in parentheses to class formals, invert the order of
847	copying allocatable components to taking the _data of the
848	class expression.
849
8502019-02-03  Paul Thomas  <pault@gcc.gnu.org>
851
852	Backport from trunk
853	PR fortran/88980
854	* trans-array.c (gfc_array_init_size): Add element_size to the
855	arguments.
856	(gfc_array_allocate): Remove the recalculation of the size of
857	the element and use element_size from the call to the above.
858	Unconditionally set the span field of the descriptor.
859
8602019-02-03  Paul Thomas  <pault@gcc.gnu.org>
861
862	Backport from trunk
863	PR fortran/88685
864	* expr.c (is_subref_array): Move the check for class pointer
865	dummy arrays to after the reference check. If we haven't seen
866	an array reference other than an element and a component is not
867	class or derived, return false.
868
8692019-02-02  Thomas Koenig  <tkoenig@gcc.gnu.org>
870
871	PR fortran/88298
872	Backport from trunk
873	* arith.c (gfc_int2int): Do not warn if src->do_not_warn is set.
874	* gfortran.h (gfc_expr): Add flag do_not_warn.
875	* intrinsic.c (gfc_convert_type_warn): Set expr->do_not_warn if
876	no warning is desired.
877
8782019-02-02  Thomas Koenig  <tkoenig@gcc.gnu.org>
879
880	PR fortran/57048
881	Backport from trunk
882	* interface.c (gfc_compare_types): If a derived type and an
883	integer both have a derived type, and they are identical,
884	this is a C binding type and compares equal.
885
8862019-01-27  Paul Thomas  <pault@gcc.gnu.org>
887
888	Backport from trunk
889	PR fortran/56386
890	PR fortran/58906
891	PR fortran/77385
892	PR fortran/80260
893	PR fortran/82077
894	* resolve.c (resolve_variable): Fix up expressions with array
895	associate names, where the parser did not detect that this is
896	array and there was no array part_ref in the expression.
897	* trans-expr.c (gfc_find_and_cut_at_last_class_ref): base_expr
898	should be a copy of e and not the initialization expr.
899
9002019-01-25  Paul Thomas  <pault@gcc.gnu.org>
901
902	PR fortran/87336
903	* trans-array.c (gfc_get_array_span): Try to get the element
904	length of incomplete types. Return NULL_TREE otherwise.
905	(gfc_conv_expr_descriptor): Only set the 'span' field if the
906	above does not return NULL_TREE. Set 'span' field if possible
907	for all new descriptors.
908
9092019-01-15  Steven G. Kargl  <kargl@gcc.gnu.org>
910
911	PR fortran/81849
912	* resolve.c (resolve_symbol): Host associated varaibles can appear
913	in the specification statement of a RESULT array.
914
9152019-01-15  Dominique d'Humieres  <dominiq@gcc.gnu.org>
916
917	PR fortran/88803
918	* gfortran.texi: Replace @xref with @ref and adjust the sentence.
919
9202019-01-11  Steven G. Kargl  <kargl@gcc.gnu.org>
921
922	PR fortran/35031
923	* decl.c (gfc_match_entry): Check for F2018:C1546.  Fix nearby
924	mis-indentation.
925
9262019-01-08  Jakub Jelinek  <jakub@redhat.com>
927
928	Backported from mainline
929	2018-12-12  Jakub Jelinek  <jakub@redhat.com>
930
931	PR fortran/88463
932	* trans-openmp.c (gfc_omp_predetermined_sharing): Handle TREE_READONLY
933	VAR_DECLs with DECL_EXTERNAL like those with TREE_STATIC.
934
935	2018-12-07  Jakub Jelinek  <jakub@redhat.com>
936
937	PR fortran/88377
938	* trans-openmp.c (gfc_omp_clause_default_ctor,
939	gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op,
940	gfc_omp_clause_linear_ctor, gfc_omp_clause_dtor): Only consider
941	GFC_DECL_GET_SCALAR_ALLOCATABLE vars as scalar allocatables if they
942	have pointer type.
943
9442018-12-23  Paul Thomas  <pault@gcc.gnu.org>
945
946	Backport from trunk
947	PR fortran/77703
948	* resolve.c (get_temp_from_expr): Use the string length of
949	constant character expressions.
950
9512018-12-23  Paul Thomas  <pault@gcc.gnu.org>
952
953	Backport from trunk
954	PR fortran/77325
955	* trans-array.c (gfc_alloc_allocatable_for_assignment): If the
956	rhs has a charlen expression, convert that and use it.
957	* trans-expr.c (gfc_trans_assignment_1): The rse.pre for the
958	assignment of deferred character array vars to a realocatable
959	lhs should not be added to the exterior block since vector
960	indices, for example, generate temporaries indexed within the
961	loop.
962
9632018-12-22  Steven G . Kargl  <kargl@gcc.gnu.org>
964
965	PR fortran/85798
966	* decl.c (gfc_match_data): If a component of a derived type entity
967	appears in data statement, check that does not have the allocatable
968	attribute.
969
9702018-12-22  Thomas Koenig  <tkoenig@gcc.gnu.org>
971
972	Backport from trunk
973	PR fortran/85544
974	* frontend-passes.c (optimize_power): Remove.
975	(optimize_op): Remove call to optimize_power.
976	* trans-expr.c (gfc_conv_power_op): Handle cases of 1**integer,
977	(2|4|8|16) ** integer and (-1) ** integer.
978
9792018-12-22  Steven G. Kargl  <kargl@gcc.gnu.org>
980
981	PR fortran/88169
982	* module.c (mio_namelist): Remove an error condition/message that
983	is contrary to the Fortran standard.
984
9852018-12-21  Paul Thomas  <pault@gcc.gnu.org>
986
987	PR fortran/87359
988	* trans-array.c (gfc_is_reallocatable_lhs): Correct the problem
989	introduced by r264358, which prevented components of associate
990	names from being reallocated on assignment.
991
9922018-12-16  Steven G. Kargl  <kargl@gcc.gnu.org>
993
994	PR fortran/88116
995	PR fortran/88467
996	* array.c (gfc_match_array_constructor): Check return value of
997	gfc_convert_type().  Skip constructor elements with BT_UNKNOWN,
998	which need to go through resolution.
999	* intrinsic.c (gfc_convert_type_warn): Return early if the types
1000	martch (i.e., no conversion is required).
1001	* simplify.c (gfc_convert_constant): Remove a gfc_internal_error,
1002	and return gfc_bad_expr.
1003
10042018-12-15  Steven G. Kargl  <kargl@gcc.gnu.org>
1005
1006	PR fortran/88138
1007	* decl.c (variable_decl): Check that a derived isn't being assigned
1008	an incompatible entity in an initialization.
1009
10102018-12-11  Steven G. Kargl  <kargl@gcc.gnu.org>
1011
1012	PR fortran/88155
1013	* primary.c (gfc_match_structure_constructor):  Set the locus of
1014	an expression to avoid a NULL pointer dereference.
1015
10162018-12-11  Steven G. Kargl  <kargl@gcc.gnu.org>
1017
1018	PR fortran/88249
1019	* gfortran.h: Update prototype for gfc_resolve_filepos().
1020	* io.c (gfc_resolve_filepos): Check for UNIT number if ERR= is present.
1021	Use passed in locus for error message.
1022	* resolve.c (gfc_resolve_code): Pass locus in gfc_resolve_filepos()
1023	call.
1024
10252018-12-10  Steven G. Kargl  <kargl@gcc.gnu.org>
1026
1027	PR fortran/87922
1028	* io.c (gfc_match_open): Additional checks on ASYNCHRONOUS.
1029
10302018-12-10  Steven G. Kargl  <kargl@gcc.gnu.org>
1031
1032	PR fortran/88269
1033	* io.c (io_constraint): Update macro. If locus line buffer is NULL,
1034	use gfc_current_locus in error messages.
1035	(check_io_constraints): Catch missing IO UNIT in write and read
1036	statements.  io_constraint macro is incompatible here.
1037
10382018-12-09  Steven G. Kargl  <kargl@gcc.gnu.org>
1039
1040	PR fortran/88205
1041	* io.c (gfc_match_open): Move NEWUNIT checks to after STATUS checks.
1042
10432018-12-09  Steven G. Kargl  <kargl@gcc.gnu.org>
1044
1045	PR fortran/88206
1046	* match.c (gfc_match_type_spec): REAL can be an intrinsic function.
1047
10482018-12-09  Fritz Reese  <fritzoreese@gmail.com>
1049
1050	PR fortran/88228
1051	* resolve.c (resolve_operator):  Do not call resolve_function.
1052	Break like other cases.
1053
10542018-12-08  Steven G. Kargl  <kargl@gcc.gnu.org>
1055
1056	PR fortran/88048
1057	* resolve.c (check_data_variable): Named constant cannot be a
1058	data object.
1059
10602018-12-08  Steven G. Kargl  <kargl@gcc.gnu.org>
1061
1062	PR fortran/88025
1063	* expr.c (gfc_apply_init):  Remove asserts that cannot trigger.
1064	Check for a NULL pointer.
1065
10662018-11-25  Thomas Koenig  <tkoenig@gcc.gnu.org>
1067
1068	Backport from trunk
1069	PR fortran/88073
1070	* frontend-passes.c (combine_array_constructor): Do not do
1071	anything if in a WHERE statement.
1072
10732018-11-24  Paul Thomas  <pault@gcc.gnu.org>
1074
1075	Backport from trunk
1076	PR fortran/88143
1077	* resolve.c (resolve_variable): Check for associate names with
1078	NULL target.
1079
10802018-11-05  Jakub Jelinek  <jakub@redhat.com>
1081
1082	Backported from mainline
1083	2018-10-25  Jakub Jelinek  <jakub@redhat.com>
1084
1085	PR fortran/87725
1086	* openmp.c (gfc_match_omp_clauses): Parse simd, monotonic and
1087	nonmonotonic modifiers regardless of if they have been parsed
1088	already or if the opposite one has.  Fix up check whether
1089	comma after modifier should be parsed.
1090	(resolve_omp_clauses): Diagnose schedule modifier restrictions.
1091
10922019-11-03  Tobias Burnus  <burnus@net-b.de>
1093	    Thomas Koenig  <tkoenig@gcc.gnu.org>
1094
1095	Backport from trunk
1096	PR fortran/87597
1097	* expr.c (gfc_simplify_expr): Avoid simplifying
1098	the 'array' argument to lbound/ubound/lcobound/
1099	ucobound.
1100
11012018-10-08  Paul Thomas  <pault@gcc.gnu.org>
1102
1103	PR fortran/83999
1104	Backport from trunk
1105	* resolve.c (resolve_fl_procedure): Include class functions in
1106	the test that elemental function results be scalar.
1107
11082018-10-08  Paul Thomas  <pault@gcc.gnu.org>
1109
1110	Backport from trunk
1111	PR fortran/86372
1112	* trans-stmt.c (trans_associate_var): Character associate names
1113	with variable string length do not have to be deferred length
1114	for the string length to be set, if variable.
1115
11162018-10-06  Thomas Koenig  <tkoenig@gcc.gnu.org>
1117
1118	PR fortran/86111
1119	Backport from trunk
1120	* gfortran.h (enum arith): Add ARITH_WRONGCONCAT.
1121	* arith.h (gfc_arith_error): Issue error for ARITH_WRONGCONCAT.
1122	(gfc_arith_concat):  If the types of op1 and op2 are not
1123	character of if their kinds do not match, issue ARITH_WRONGCONCAT.
1124
11252018-09-18  Janus Weil  <janus@gcc.gnu.org>
1126
1127	Backport from trunk
1128	PR fortran/85395
1129	* decl.c (match_binding_attributes): Use correct default accessibility
1130	for procedure pointer components.
1131
11322018-09-18  Janus Weil  <janus@gcc.gnu.org>
1133
1134	Backport from trunk
1135	PR fortran/86830
1136	* expr.c (gfc_is_simply_contiguous): Handle type-bound procedure calls
1137	with non-polymorphic objects.
1138
11392018-09-18  Paul Thomas  <pault@gcc.gnu.org>
1140
1141	Backported from trunk
1142	PR fortran/85954
1143	* resolve.c (resolve_assoc_var): If the target expression is a
1144	deferred charlen dummy and the associate name shares the
1145	charlen, generate a new one. Make sure that new charlens are in
1146	the namespace list so that they get cleaned up.
1147	* trans-array.c (gfc_is_reallocatable_lhs): Associate names are
1148	not reallocatable.
1149	* trans-decl.c (gfc_get_symbol_decl): Put deferred character
1150	length dummy and result arrays on the deferred initialization
1151	list so that the variable length arrays can be correctly dealt
1152	with.
1153	* trans-expr.c (gfc_conv_string_length): Return if 'expr' is
1154	NULL rather than ICEing.
1155
11562018-09-12  Paul Thomas  <pault@gcc.gnu.org>
1157
1158	Backported from trunk
1159	PR fortran/87284
1160	* trans-expr.c (gfc_trans_class_init_assign): Access to
1161	to array elements of the dynamic type requires that the array
1162	reference be added to the class expression and not the _data
1163	component, unlike scalar expressions.
1164
11652018-09-11  Paul Thomas  <pault@gcc.gnu.org>
1166
1167	Backported from trunk
1168	PR fortran/87277
1169	* expr.c (is_subref_array): Add the check of dimensionality for
1170	class, dummy, pointer arrays.
1171
11722018-09-05  Janus Weil  <janus@gcc.gnu.org>
1173
1174	Backported from trunk
1175	PR fortran/86116
1176	* interface.c (compare_type): Remove a CLASS/TYPE check.
1177	(compare_type_characteristics): New function that behaves like the old
1178	'compare_type'.
1179	(gfc_check_dummy_characteristics, gfc_check_result_characteristics):
1180	Call 'compare_type_characteristics' instead of 'compare_type'.
1181
11822018-09-04  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1183
1184	* simplify.c (gfc_simplify_modulo): Re-arrange code to test
1185	whether 'P' is zero and issue an error if it is.
1186
11872018-09-01  Paul Thomas  <pault@gcc.gnu.org>
1188
1189	PR fortran/86328
1190	PR fortran/86760
1191	* trans-array.c (gfc_conv_scalarized_array_ref): Do not fix
1192	info->descriptor but pass it directly to gfc_build_array_ref.
1193	(gfc_conv_array_ref): Likewise for se->expr.
1194	* trans.c (gfc_build_array_ref): If 'decl' is a COMPONENT_REF
1195	obtain the span field directly from it.
1196
11972018-08-24  Thomas Koenig  <tkoenig@gcc.gnu.org>
1198
1199	Backport from trunk
1200	PR fortran/86837
1201	* frontend-passes.c (var_in_expr_callback): New function.
1202	(var_in_expr): New function.
1203	(traverse_io_block): Use var_in_expr instead of
1204	gfc_check_dependency for checking if the variable depends on the
1205	previous interators.
1206
12072018-08-12  Paul Thomas  <pault@gcc.gnu.org>
1208
1209	Backported from trunk
1210	PR fortran/86906
1211	* resolve.c (resolve_fl_variable_derived): Check if the derived
1212	type is use associated before checking for the host association
1213	error.
1214
12152018-07-26  Jakub Jelinek  <jakub@redhat.com>
1216
1217	Backported from mainline
1218	2018-07-10  Jakub Jelinek  <jakub@redhat.com>
1219
1220	PR fortran/86421
1221	* module.c (omp_declare_simd_clauses): Add LINEAR with _REF, _VAL and
1222	_UVAL suffixes.
1223	(mio_omp_declare_simd): Save and restore ref, val and uval modifiers
1224	on linear clauses.  Initialize n->where to gfc_current_locus.
1225
12262018-07-26  Release Manager
1227
1228	* GCC 8.2.0 released.
1229
12302018-07-16  Fritz Reese  <fritzoreese@gmail.com>
1231
1232	PR fortran/83184
1233	Backport from trunk.
1234	* decl.c (match_old_style_init): Initialize locus of variable expr when
1235	creating a data variable.
1236	(match_clist_expr): Verify array is explicit shape/size before
1237	attempting to allocate constant array constructor.
1238
12392018-07-16  Fritz Reese  <fritzoreese@gmail.com>
1240
1241	Backport from trunk:
1242
1243	PR fortran/86417
1244	* module.c (mio_component): Set component->loc when loading from module.
1245
1246	PR fortran/83183
1247	PR fortran/86325
1248	* expr.c (class_allocatable, class_pointer, comp_allocatable,
1249	comp_pointer): New helpers.
1250	(component_initializer): Generate EXPR_NULL for allocatable or pointer
1251	components. Do not generate initializers for components within BT_CLASS.
1252	Do not assign to comp->initializer.
1253	(gfc_generate_initializer): Use new helpers; move code to generate
1254	EXPR_NULL for class allocatable components into component_initializer().
1255
12562018-07-02  Paul Thomas  <pault@gcc.gnu.org>
1257
1258	PR fortran/82969
1259	PR fortran/86242
1260	* trans-array.c (structure_alloc_comps): Do not explicitly copy
1261	procedure pointer components.
1262
12632018-06-28  Fritz Reese  <fritzoreese@gmail.com>
1264
1265	PR fortran/82865
1266	Backport from trunk.
1267	* decl.c (gfc_match_type): Refactor and check for PDT declarations.
1268
12692018-06-25  Fritz Reese  <fritzoreese@gmail.com>
1270
1271	PR fortran/82972
1272	PR fortran/83088
1273	PR fortran/85851
1274	Backport from trunk.
1275	* expr.c (component_initializer): Assign init expr to c->initializer.
1276	(generate_isocbinding_initializer): New.
1277	(gfc_generate_initializer): Call generate_isocbinding_initializer to
1278	generate initializers for c_ptr and c_funptr with -finit-derived.
1279
12802018-06-25  Paul Thomas  <pault@gcc.gnu.org>
1281
1282	PR fortran/83118
1283	Back port from trunk
1284	* resolve.c (resolve_ordinary_assign): Force the creation of a
1285	vtable for assignment of non-polymorphic expressions to an
1286	unlimited polymorphic object.
1287	* trans-array.c (gfc_alloc_allocatable_for_assignment): Use the
1288	size of the rhs type for such assignments. Set the dtype, _len
1289	and vptrs appropriately.
1290	* trans-expr.c (gfc_trans_assignment): Force the use of the
1291	_copy function for these assignments.
1292
12932018-06-15  Cesar Philippidis  <cesar@codesourcery.com>
1294
1295	Backport from mainline
1296	2018-06-13  Cesar Philippidis  <cesar@codesourcery.com>
1297
1298	PR fortran/85703
1299	* parse.c (decode_oacc_directive): Set gfc_matching_function
1300	to false.
1301	(decode_omp_directive): Likewise.
1302
13032018-06-15  Cesar Philippidis  <cesar@codesourcery.com>
1304
1305	Backport from mainline
1306	2018-06-13  Cesar Philippidis  <cesar@codesourcery.com>
1307
1308	PR fortran/85702
1309	* openmp.c (gfc_match_oacc_wait): Use %C to report error location.
1310
13112018-06-15  Cesar Philippidis  <cesar@codesourcery.com>
1312
1313	Backport from mainline
1314	2018-06-05  Cesar Philippidis  <cesar@codesourcery.com>
1315
1316	PR fortran/85701
1317	* openmp.c (gfc_resolve_oacc_declare): Error on functions and
1318	subroutine data clause arguments.
1319
13202018-06-13  Steven G. Kargl  <kargl@gcc.gnu.org>
1321
1322	PR fortran/86110
1323	* array.c (gfc_resolve_character_array_constructor): Avoid NULL
1324	pointer dereference.
1325
13262018-06-12  Steven G. Kargl  <kargl@gcc.gnu.org>
1327
1328	PR fortran/44491
1329	* expr.c (gfc_check_assign): Select non-NULL locus.
1330
13312018-06-09  Steven G. Kargl  <kargl@gcc.gnu.org>
1332
1333	PR fortran/85138
1334	PR fortran/85996
1335	PR fortran/86051
1336	* decl.c (gfc_match_char_spec): Use private namespace in attempt to
1337	reduce a charlen to a constant.
1338
13392018-06-09  Steven G. Kargl  <kargl@gcc.gnu.org>
1340
1341	PR fortran/86059
1342	* array.c (match_array_cons_element): NULL() cannot be in an
1343	array constructor.
1344
13452018-06-09  Steven G. Kargl  <kargl@gcc.gnu.org>
1346
1347	PR fortran/63514
1348	* symbol.c (gfc_add_volatile): Enforce F2008:C1282 and F2018:C1588.
1349
13502018-06-09  Steven G. Kargl  <kargl@gcc.gnu.org>
1351
1352	PR fortran/78278
1353	Committed as part of r261364
1354	* data.c (gfc_assign_data_value): Re-arrange code to allow for
1355	an error for double initialization of CHARACTER entities.
1356
13572018-06-09  Steven G. Kargl  <kargl@gcc.gnu.org>
1358
1359	PR fortran/38351
1360	* resolve.c (resolve_operator): Provide better error message for
1361	derived type entity used in an binary intrinsic numeric operator.
1362
13632018-06-09  Steven G. Kargl  <kargl@gcc.gnu.org>
1364
1365	PR fortran/78571
1366	* data.c (create_character_initializer): Return early if type is
1367	incompatible with CHARACTER.
1368
13692018-06-09  Thomas Koenig  <tkoenig@gcc.gnu.org>
1370
1371	PR fortran/85631
1372	Backport from trunk.
1373	* trans.h (gfc_ss): Add field no_bounds_check.
1374	* trans-array.c (gfc_conv_ss_startstride): If flag_realloc_lhs and
1375	ss->no_bounds_check is set, do not use runtime checks.
1376	* trans-expr.c (gfc_trans_assignment_1): Set lss->no_bounds_check
1377	for reallocatable lhs.
1378
13792018-06-07  Steven G. Kargl  <kargl@gcc.gnu.org>
1380
1381	PR fortran/86045
1382	Backport from trunk.
1383	* simplify.c (gfc_simplify_mod): Re-arrange code to test whether
1384	'P' is zero and issue an error if it is.
1385
13862018-06-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
1387
1388	PR fortran/85641
1389	Backport from trunk.
1390	* frontend-passes.c (is_fe_temp): Add prototype.
1391	(realloc_string_callback): Early return for frontend-generated
1392	temporary.
1393
13942018-06-04  Steven G. Kargl  <kargl@gcc.gnu.org>
1395
1396	PR fortran/85981
1397	* resolve.c (resolve_allocate_deallocate): Check errmsg is default
1398	character kind.
1399
14002018-05-25  Steven G. Kargl  <kargl@gcc.gnu.org>
1401
1402	PR fortran/85786
1403	* trans-intrinsic.c (gfc_conv_associated): Add arg1se to the block.
1404
14052018-05-25  Steven G. Kargl  <kargl@gcc.gnu.org>
1406
1407	PR fortran/85895
1408	Backport from trunk
1409	* resolve.c (resolve_sync): Resolve expression before checking for
1410	an error.
1411
14122018-05-25  Steven G. Kargl  <kargl@gcc.gnu.org>
1413
1414	PR fortran/85780
1415	Backport from trunk
1416	* resolve.c (resolve_fl_procedure): Avoid NULL dereference.
1417
14182018-05-25  Steven G. Kargl  <kargl@gcc.gnu.org>
1419
1420	PR fortran/85779
1421	Backport from trunk
1422	* decl.c (gfc_match_derived_decl): Fix NULL point dereference.
1423
14242018-05-25  Steven G. Kargl  <kargl@gcc.gnu.org>
1425
1426	PR fortran/85543
1427	Backport from trunk
1428	* resolve.c (update_current_proc_array_outer_dependency): Avoid NULL
1429	pointer dereference.
1430
14312018-05-20  Paul Thomas  <pault@gcc.gnu.org>
1432
1433	PR fortran/80657
1434	Backport from trunk
1435	* resolve.c (flag_fn_result_spec): Use the 'sym' argument to
1436	test for self refs to the function result in the character len
1437	expression. If a self reference is found, emit an error and
1438	return true.
1439	(resolve_fntype): Use the function symbol in the calls to the
1440	above.
1441
14422018-05-20  Paul Thomas  <pault@gcc.gnu.org>
1443
1444	PR fortran/49636
1445	Backport from trunk
1446	* trans-array.c (gfc_get_array_span): Renamed from
1447	'get_array_span'.
1448	(gfc_conv_expr_descriptor): Change references to above.
1449	* trans-array.h : Add prototype for 'gfc_get_array_span'.
1450	* trans-stmt.c (trans_associate_var): If the associate name is
1451	a subref array pointer, use gfc_get_array_span for the span.
1452
14532018-05-20  Paul Thomas  <pault@gcc.gnu.org>
1454
1455	PR fortran/82275
1456	Backport from trunk
1457	* match.c (gfc_match_type_spec): Go through the array ref and
1458	decrement 'rank' for every dimension that is an element.
1459
14602018-05-19  Paul Thomas  <pault@gcc.gnu.org>
1461
1462	PR fortran/82923
1463	PR fortran/66694
1464	PR fortran/82617
1465	Backport from trunk
1466	* trans-array.c (gfc_alloc_allocatable_for_assignment): Set the
1467	charlen backend_decl of the rhs expr to ss->info->string_length
1468	so that the value in the current scope is used.
1469
14702018-05-13  Paul Thomas  <pault@gcc.gnu.org>
1471
1472	PR fortran/85742
1473	* trans-types.c (gfc_get_dtype_rank_type): Reorder evaluation
1474	of 'size'. If the element type is a pointer use the size of the
1475	TREE_TYPE of the type, unless it is VOID_TYPE. In this latter
1476	case, set the size to zero.
1477
14782018-05-12  Steven G. Kargl  <kargl@gcc.gnu.org>
1479
1480	PR fortran/85542
1481	Backport from trunk
1482	* expr.c (check_inquiry): Avoid NULL pointer dereference.
1483
14842018-05-11  Steven G. Kargl  <kargl@gcc.gnu.org>
1485
1486	PR fortran/70870
1487	Backport from trunk
1488	* data.c (gfc_assign_data_value): Check that a data object does
1489	not also have default initialization.
1490
14912018-05-11  Steven G. Kargl  <kargl@gcc.gnu.org>
1492
1493	PR fortran/85521
1494	Backport from trunk
1495	* array.c (gfc_resolve_character_array_constructor): Substrings
1496	with upper bound smaller than lower bound are zero length strings.
1497
14982018-05-11  Steven G. Kargl  <kargl@gcc.gnu.org>
1499
1500	PR fortran/85687
1501	Backport from trunk
1502	* check.c (gfc_check_rank): Check that the argument is a data object.
1503
15042018-05-11  Paul Thomas  <pault@gcc.gnu.org>
1505
1506	PR fortran/68846
1507	PR fortran/70864
1508	Backport from trunk
1509	* resolve.c (get_temp_from_expr): The temporary must not have
1510	dummy or intent attributes.
1511
15122018-05-06  Andre Vehreschild  <vehre@gcc.gnu.org>
1513
1514	PR fortran/85507
1515	Backport from trunk.
1516	* dependency.c (gfc_dep_resolver): Revert looking at coarray dimension
1517	introduced by r259385.
1518	* trans-intrinsic.c (conv_caf_send): Always report a dependency for
1519	same variables in coarray assignments.
1520
15212018-05-02  Release Manager
1522
1523	* GCC 8.1.0 released.
1524
15252018-04-24  Steven G. Kargl  <kargl@gcc.gnu.org>
1526
1527	PR fortran/85520
1528	* decl.c (gfc_match_char_spec): Check for negative length and set to 0.
1529
15302018-04-14  Andre Vehreschild  <vehre@gcc.gnu.org>
1531
1532	PR fortran/81773
1533	PR fortran/83606
1534	* dependency.c (gfc_dep_resolver): Coarray indexes are to be ignored
1535	during dependency computation.  They define no data dependency.
1536	* trans-array.c (conv_array_index_offset): The stride can not be set
1537	here, prevent fail.
1538	* trans-intrinsic.c (conv_caf_send): Add creation of temporary array
1539	for caf_get's result and copying to the array with vectorial
1540	indexing.
1541
15422018-04-14  Thomas Koenig  <tkoenig@gcc.gnu.org>
1543
1544	PR fortran/85387
1545	* frontend-passes.c (traverse_io_block): Check for start, end or
1546	stride being defined by an outer implied DO loop.
1547
15482018-04-12  Thomas Koenig  <tkoenig@gcc.gnu.org>
1549
1550	PR fortran/83064
1551	PR testsuite/85346
1552	* trans-stmt.c (gfc_trans_forall_loop): Use annot_expr_ivdep_kind
1553	for annotation and remove dependence on -ftree-parallelize-loops.
1554
15552018-04-10  Jakub Jelinek  <jakub@redhat.com>
1556
1557	PR fortran/85313
1558	* openmp.c (resolve_omp_do): Remove bogus if (j < i) break;.
1559	(resolve_oacc_nested_loops): Likewise.  Formatting fix.
1560
15612018-04-09  Thomas Koenig  <tkoenig@gcc.gnu.org>
1562
1563	PR fortran/83064
1564	* trans-stmt.c (gfc_trans_forall_loop): Remove annotation for
1565	parallell processing of DO CONCURRENT -ftree-parallelize-loops
1566	is set.
1567
15682018-04-09  Thomas Koenig  <tkoenig@gcc.gnu.org>
1569
1570	PR fortran/51260
1571	* resolve.c (resolve_variable): Simplify cases where access to a
1572	parameter array results in a single constant.
1573
15742018-04-02  Thomas Koenig  <tkoenig@gcc.gnu.org>
1575
1576	PR fortran/85102
1577	* decl.c (variable_decl): If upper or lower bounds simplify
1578	to a constant, use that.
1579
15802018-03-30  Paul Thomas  <pault@gcc.gnu.org>
1581
1582	PR fortran/84931
1583	* simplify.c (gfc_convert_constant): Handle case of array
1584	constructors within an array that has no iterator and improve
1585	the conciseness of this section of code.
1586
15872017-03-30  Thomas Koenig  <tkoenig@gcc.gnu.org>
1588
1589	PR fortran/85111
1590	* array.c (gfc_resolve_character_array_constructor): Early
1591	exit for zero-size arrays.
1592	* simplify.c (simplify_transformation_to_array): Exit early
1593	if the result size is zero.
1594	(simplify_minmaxloc_to_array): Likewise.
1595
15962018-03-28  Mikael Morin  <mikael@gcc.gnu.org>
1597
1598	PR fortran/69497
1599	* symbol.c (gfc_symbol_done_2): Start freeing namespaces
1600	from the root.
1601	(gfc_free_namespace): Restore assert (revert r258839).
1602
16032018-03-28  Jakub Jelinek  <jakub@redhat.com>
1604
1605	* gfortran.h (gfc_dt): Rename default_exp field to dec_ext.
1606	* ioparm.def (IOPARM_dt_default_exp): Rename to ...
1607	(IOPARM_dt_dec_ext): ... this.
1608	* trans-io.c (build_dt): Adjust for default_exp renaming to
1609	dec_ext and IOPARM_dt_default_exp renaming to IOPARM_dt_dec_ext.
1610	* io.c (match_io): Likewise.
1611
16122018-03-27  Thomas Koenig  <tkoenig@gcc.gnu.org>
1613
1614	PR fortran/85084
1615	* frontend-passes.c (gfc_run_passes): Do not run front-end
1616	optimizations if a previous error occurred.
1617
16182018-03-27  Thomas Koenig  <tkoenig@gcc.gnu.org>
1619	Harald Anlauf  <anlauf@gmx.de>
1620
1621	PR fortran/85083
1622	* primary.c (gfc_convert_to_structure_constructor): Check
1623	conformance of argument types in structure constructor.
1624
16252018-03-26  Thomas Koenig  <tkoenig@gcc.gnu.org>
1626
1627	PR fortran/66709
1628	* io.c: Include constructor.h.
1629	(resolve_tag_format): For a constant character array, concatenate
1630	into a single character expression.
1631
16322018-03-25  Seth Johnson <johnsonsr@ornl.gov>
1633	Dominique d'Humieres  <dominiq@gcc.gnu.org>
1634
1635	PR fortran/84924
1636	* check.c (gfc_check_c_f_pointer): Allow scalar noninteroperable
1637	scalar derived type with -std=f2003 and -std=f2008.
1638
16392018-03-24  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1640	    Dominique d'Humieres  <dominiq@gcc.gnu.org>
1641
1642	PR fortran/69497
1643	* symbol.c (gfc_free_namespace): Delete the assert and only if
1644	refs count is equals zero, free the namespace. Otherwise,
1645	something is halfway and other errors will resound.
1646
16472018-03-24  Thomas Koenig  <tkoenig@gcc.gnu.org>
1648
1649	PR fortran/70068
1650	* expr.c (find_substring_ref): Change types of start, end
1651	and length variables to gfc_charlen_t. Set length to zero
1652	for empty substring.
1653
16542018-03-24  Steven G. Kargl  <kargl@gcc.gnu.org>
1655
1656	PR fortran/42651
1657	* decl.c (check_function_name): Improved error message
1658	(gfc_match_volatile, gfc_match_asynchronous) Use check_function_name.
1659
16602018-03-22  Steven G. Kargl  <kargl@gcc.gnu.org>
1661
1662	PR fortran/84922
1663	* decl.c (get_proc_name): If the MODULE prefix appears in interface
1664	body, then it must appear on the contained subroutine or function.
1665	While here, fix nearby mis-indented code.
1666
16672018-03-21  Thomas Koenig  <tkoenig@gcc.gnu.org>
1668	Harald Anlauf  <anlauf@gmx.de>
1669
1670	PR fortran/84957
1671	* trans-types.c (gfc_sym_type): Do not dereference NULL pointer.
1672
16732018-03-21  Janne Blomqvist  <jb@gcc.gnu.org>
1674
1675	PR fortran/84615
1676	* trans-expr.c (gfc_conv_procedure_call): Convert charlen to
1677	gfc_charlen_type_node when calling procedure.
1678
16792018-03-20  Steven G. Kargl  <kargl@gcc.gnu.org>
1680
1681	PR fortran/85001
1682	* interface.c (symbol_rank): Remove bogus null pointer check that
1683	crept in when translating a ternary operator into an if-else
1684	constructor.
1685
16862018-03-19  Thomas Koenig  <tkoenig@gcc.gnu.org>
1687
1688	PR fortran/84931
1689	* simplify.c (gfc_convert_constant): Correctly handle iterators
1690	for type conversion.
1691
16922018-03-18  Steven G. Kargl  <kargl@gcc.gnu.org>
1693
1694	PR fortran/77414
1695	* decl.c (get_proc_name):  Check for a subroutine re-defined in
1696	the contain portion of a subroutine.  Change language of existing
1697	error message to better describe the issue. While here fix whitespace
1698	issues.
1699
17002018-03-18  Steven G. Kargl  <kargl@gcc.gnu.org>
1701
1702	PR fortran/65453
1703	* decl.c (get_proc_name): Catch clash between a procedure statement
1704	and a contained subprogram
1705
17062018-03-16  Steven G. Kargl  <kargl@gcc.gnu.org>
1707
1708	PR fortran/69395
1709	* decl.c (merge_array_spec): Correct the error condition.
1710
17112018-03-15  Steven G. Kargl  <kargl@gcc.gnu.org>
1712
1713	PR fortran/78741
1714	* decl.c (get_proc_name):  Check for clash of entry name with
1715	subroutine name.
1716
17172018-03-15  Steven G. Kargl  <kargl@gcc.gnu.org>
1718
1719	PR fortran/69395
1720	* decl.c (merge_array_spec): Limit the merging to maximum allowed
1721	dimensions, and issue error message if limit is exceeded.
1722
17232018-03-13  Steven G. Kargl  <kargl@gcc.gnu.org>
1724
1725	* check.c (gfc_check_kill_sub):  Remove check for INTEGER(4) or (8).
1726	* intrinsic.c (add_functions): Remove reference to gfc_resolve_kill.
1727	(add_subroutines): Remove reference to gfc_resolve_kill_sub.
1728	* intrinsic.texi: Update documentation.
1729	* iresolve.c (gfc_resolve_kill, gfc_resolve_kill_sub): Remove.
1730	* trans-decl.c (gfc_build_intrinsic_function_decls):  Add
1731	gfor_fndecl_kill and gfor_fndecl_kill_sub
1732	* trans-intrinsic.c (conv_intrinsic_kill, conv_intrinsic_kill_sub): new
1733	functions.
1734	(gfc_conv_intrinsic_function): Use conv_intrinsic_kill.
1735        (gfc_conv_intrinsic_subroutine): Use conv_intrinsic_kill_sub.
1736	* trans.h: Declare gfor_fndecl_kill and gfor_fndecl_kill_sub.
1737
17382018-03-11  Paul Thomas  <pault@gcc.gnu.org>
1739
1740	PR fortran/84546
1741	* trans-array.c (structure_alloc_comps): Make sure that the
1742	vptr is copied and that the unlimited polymorphic _len is used
1743	to compute the size to be allocated.
1744	* trans-expr.c (gfc_get_class_array_ref): If unlimited, use the
1745	unlimited polymorphic _len for the offset to the element.
1746	(gfc_copy_class_to_class): Set the new 'unlimited' argument.
1747	* trans.h : Add the boolean 'unlimited' to the prototype.
1748
17492018-03-11  Steven G. Kargl  <kargl@gcc.gnu.org>
1750
1751	PR fortran/83939
1752	* resolve.c (resolve_fl_procedure): Enforce F2018:C15100.
1753
17542018-03-11  Steven G. Kargl  <kargls@gcc.gnu.org>
1755
1756	* check.c (gfc_check_kill):  Check pid and sig are scalar.
1757	(gfc_check_kill_sub): Restrict kind to 4 and 8.
1758	* intrinsic.c (add_function): Sort keyword list.  Add pid and sig
1759	keywords for KILL.  Remove redundant *back="back" in favor of the
1760	original *bck="back".
1761	(add_subroutines): Sort keyword list.  Add pid and sig keywords
1762	for KILL.
1763	* intrinsic.texi: Fix documentation to consistently use pid and sig.
1764	* iresolve.c (gfc_resolve_kill): Kind can only be 4 or 8.  Choose the
1765	correct function.
1766	(gfc_resolve_rename_sub): Add comment.
1767
17682018-03-11  Thomas Koenig  <tkoenig@gcc.gnu.org>
1769
1770	PR fortran/66128
1771	* simplify.c (simplify_transformation): Return default result for
1772	empty array argument.
1773	(gfc_simplify_all): Remove special-case handling for zerosize.
1774	(gfc_simplify_any): Likewise.
1775	(gfc_simplify_count): Likewise.
1776	(gfc_simplify_iall): Likewise.
1777	(gfc_simplify_iany): Likewise.
1778	(gfc_simplify_iparity): Likewise.
1779	(gfc_simplify_minval): Likewise.
1780	(gfc_simplify_maxval): Likewise.
1781	(gfc_simplify_norm2): Likewise.
1782	(gfc_simplify_product): Likewise.
1783	(gfc_simplify_sum): Likewise.
1784
17852018-03-10  Steven G. Kargl  <kargl@gcc.gnu.org>
1786
1787	PR fortran/84734
1788	* arith.c (check_result, eval_intrinsic):  If result overflows, pass
1789	the expression up the chain instead of a NULL pointer.
1790
17912018-03-07  Steven G. Kargl  <kargl@gcc.gnu.org>
1792
1793	PR fortran/64124
1794	PR fortran/70409
1795	* decl.c (gfc_match_char_spec): Try to reduce a charlen to a constant.
1796
17972017-03-06  Thomas Koenig  <tkoenig@gcc.gnu.org>
1798
1799	PR fortran/84697
1800	PR fortran/66128
1801	* expr.c (simplify_parameter_variable): If p is a size zero array
1802	and not an ARRAY_EXPR insert an empty array constructor and
1803	return.
1804	* gfortran.h: Add prototype for gfc_is_size_zero_array.
1805	* simplify.c (is_size_zero_array): Make non-static and rename into
1806	(gfc_is_size_zero_array):  Check for parameter arrays of zero
1807	size by comparing shape and absence of constructor.
1808	(gfc_simplify_all): Use gfc_is_size_zero_array instead of
1809	is_size_zero_array.
1810	(gfc_simplify_count): Likewise.
1811	(gfc_simplify_iall): Likewise.
1812	(gfc_simplify_iany): Likewise.
1813	(gfc_simplify_iparity): Likewise.
1814	(gfc_simplify_minval): Likewise.
1815	(gfc_simplify_maxval): Likewise.
1816	(gfc_simplify_product): Likewise.
1817	(gfc_simplify_sum): Likewise.
1818
18192018-03-06  Steven G. Kargl  <kargl@gcc.gnu.org>
1820
1821	PR fortran/56667
1822	* primary.c (match_sym_complex_part): Give the matcher for an implied
1823	do-loop a chance to run.
1824
18252018-03-03  Harald Anlauf  <anlauf@gmx.de>
1826
1827	PR fortran/71085
1828	* trans-expr.c (gfc_apply_interface_mapping_to_expr): Do not
1829	dereference NULL pointer.
1830
18312018-03-03  Steven G. Kargl  <kargl@gcc.gnu.org>
1832
1833	PR fortran/66128
1834	* simplify.c (is_size_zero_array): New function to check for size
1835	zero array.
1836	(gfc_simplify_all, gfc_simplify_any, gfc_simplify_count,
1837	 gfc_simplify_iall, gfc_simplify_iany, gfc_simplify_iparity,
1838	 gfc_simplify_minval, gfc_simplify_maxval, gfc_simplify_norm2,
1839	 gfc_simplify_product, gfc_simplify_sum): Use it, and implement
1840	requirements from F2018.
1841
18422018-03-03  Steven G. Kargl  <kargl@gcc.gnu.org>
1843
1844	PR fortran/51434
1845	* simplify.c (gfc_simplify_transfer): Resolve mold.
1846
18472018-03-03  Paul Thomas  <pault@gcc.gnu.org>
1848
1849	PR fortran/80965
1850	* resolve.c (build_loc_call): Change symtree name from 'loc' to
1851	'_loc'.
1852
18532018-03-01  Paul Thomas  <pault@gcc.gnu.org>
1854
1855	PR fortran/84219
1856	* target-memory.c (gfc_interpret_derived): Assert that BT_VOID
1857	components are caf tokens.
1858	(gfc_target_interpret_expr): Treat BT_VOID expressions as
1859	integers.
1860
18612018-03-01  Paul Thomas  <pault@gcc.gnu.org>
1862
1863	PR fortran/84538
1864	* class.c (class_array_ref_detected): Remove the condition that
1865	there be no reference after the array reference.
1866	(find_intrinsic_vtab): Remove excess whitespace.
1867	* trans-array.c (gfc_conv_scalarized_array_ref): Rename 'tmp'
1868	as 'base and call build_class_array_ref earlier.
1869
18702018-02-28  Paul Thomas  <pault@gcc.gnu.org>
1871
1872	PR fortran/83901
1873	* trans-stmt.c (trans_associate_var): Make sure that the se
1874	expression is a pointer type before converting it to the symbol
1875	backend_decl type.
1876
18772018-02-25  Steven G. Kargl  <kargl@gcc.gnu.org>
1878
1879	PR fortran/83633
1880	* decl.c (variable_decl): Check that an explicit-shape-array with
1881	nonconstant bounds is allowed.
1882
18832018-02-25  Paul Thomas  <pault@gcc.gnu.org>
1884
1885	PR fortran/84523
1886	* trans-intrinsic.c (gfc_conv_allocated): If the argument se
1887	has a pre block, add it to the expression pre block.
1888
18892018-02-25  Thomas Koenig  <tkoenig@gcc.gnu.org>
1890
1891	PR fortran/78238
1892	* gfortran.h (gfc_integer_4_kind): Define.
1893	* resolve.c (resolve_select_type): Make sure that the
1894	kind of c->high is gfc_integer_4_kind.
1895
18962018-02-24  Steven G. Kargl <kargl@gcc.gnu.org>
1897
1898	PR fortran/30792
1899	* decl.c (gfc_match_data): Check for invalid substring in
1900	data-implied-do
1901
19022018-02-23  Steven G. Kargl  <kargl@gcc.gnu.org>
1903
1904	* intrinsic.texi: Arguments to MATMUL cannot both be rank one.
1905
19062018-02-23  Steven G. Kargl  <kargl@gcc.gnu.org>
1907
1908	PR fortran/84511
1909	* trans-io.c (transfer_expr): Deal with C_LOC in transfer statement.
1910
19112018-02-23  Steven G. Kargl  <kargl@gcc.gnu.org>
1912
1913	PR fortran/84346
1914	* interface.c (compare_actual_formal): Issue error if keyword is
1915	used in a statement function.
1916
19172018-02-23  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1918
1919	PR fortran/84506
1920	* trans-io.c (set_parameter_value_inquire): Adjust range check of
1921	negative unit values for kind=8 units to the kind=4 negative limit.
1922
19232018-02-23  Paul Thomas  <pault@gcc.gnu.org>
1924
1925	PR fortran/83149
1926	* trans-types.c (gfc_sym_type): Test sym->ns->proc_name before
1927	accessing its components.
1928
19292018-02-23  Paul Thomas  <pault@gcc.gnu.org>
1930
1931	PR fortran/83149
1932	* trans-decl.c (gfc_finish_var_decl): Test sym->ns->proc_name
1933	before accessing its components.
1934
19352018-02-23  Paul Thomas  <pault@gcc.gnu.org>
1936
1937	PR fortran/83148
1938	* trans-const.c : Clean up some whitespace issues.
1939	* trans-expr.c (gfc_conv_initializer): If an iso_c_binding
1940	derived type has a kind value of zero, set it to the default
1941	integer kind.
1942
19432018-02-23  Janne Blomqvist  <jb@gcc.gnu.org>
1944
1945	PR fortran/84519
1946	* trans-decl.c (gfc_build_builtin_function_decls): Add bool
1947	argument to stop and error stop decls.
1948	* trans-stmt.c (gfc_trans_stop): Add false value to argument
1949	lists.
1950
19512018-02-22  Janne Blomqvist  <jb@gcc.gnu.org>
1952
1953	PR 78534
1954	PR 84509
1955	* trans-decl.c (gfc_build_builtin_function_decls): Pass
1956	gfc_int8_type node to pause_numeric, size_type_node to
1957	pause_string.
1958	* trans-stmt.c (gfc_trans_pause): Likewise.
1959
19602018-02-22  Janne Blomqvist  <jb@gcc.gnu.org>
1961
1962	* gfortran.texi: Update Coarray API description.
1963	* trans-decl.c (gfc_build_builtin_function_decls): Use size_t for
1964	character lengths, int for exit codes.
1965	(generate_coarray_sym_init): Use size_t for character length.
1966	* trans-intrinsic.c (conv_co_collective): Likewise.
1967	* trans-stmt.c (gfc_trans_lock_unlock): Likewise.
1968	(gfc_trans_event_post_wait): Likewise.
1969	(gfc_trans_sync): Likewise.
1970        (gfc_trans_stop): Use size_t for character lengths, int for exit
1971	codes.
1972
19732018-02-20  Thomas Koenig  <tkoenig@gcc.gnu.org>
1974
1975	PR fortran/48890
1976	PR fortran/83823
1977	* primary.c (gfc_convert_to_structure_constructor):
1978	For a constant string constructor, make sure the length
1979	is correct.
1980
19812018-02-19  Paul Thomas  <pault@gcc.gnu.org>
1982
1983	PR fortran/83344
1984	PR fortran/83975
1985	* resolve.c (resolve_assoc_var): Rearrange the logic for the
1986	determination of the character length of associate names. If
1987	the associate name is missing a length expression or the length
1988	expression is not a constant and the target is not a variable,
1989	make the associate name allocatable and deferred length.
1990	* trans-decl.c (gfc_get_symbol_decl): Null the character length
1991	backend_decl for deferred length associate names that are not
1992	variables. Set 'length' to gfc_index_zero_node for character
1993	associate names, whose character length is a PARM_DECL.
1994
19952018-02-19  Thomas Koenig  <tkoenig@gcc.gnu.org>
1996
1997	PR fortran/35339
1998	* frontend-passes.c (traverse_io_block): Remove workaround for
1999	PR 80945.
2000
20012018-02-19  Andre Vehreschild  <vehre@gcc.gnu.org>
2002
2003	* gfortran.texi: Document additional src/dst_type.  Fix some typos.
2004	* trans-decl.c (gfc_build_builtin_function_decls): Declare the new
2005	argument of _caf_*_by_ref () with * e { get, send, sendget }.
2006	* trans-intrinsic.c (gfc_conv_intrinsic_caf_get): Add the type of the
2007	data referenced when generating a call to caf_get_by_ref ().
2008	(conv_caf_send): Same but for caf_send_by_ref () and
2009	caf_sendget_by_ref ().
2010
20112018-02-18  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2012
2013	PR fortran/84389
2014	* io.c (check_format): Allow FMT_COLON.
2015
20162018-02-18  Paul Thomas  <pault@gcc.gnu.org>
2017
2018	PR fortran/80945
2019	* trans-array.c (gfc_conv_expr_descriptor): Set parmtype from
2020	the typenode in the case of deferred length characters.
2021
20222018-02-17  Thomas Koenig  <tkoenig@gcc.gnu.org>
2023
2024	PR fortran/84270
2025	* frontend-passes (scalarized_expr):  If the expression
2026	is an assumed size array, leave in the last reference
2027	and pass AR_SECTION instead of AR_FULL to gfc_resolve
2028	in order to avoid an error.
2029
20302018-02-17  Paul Thomas  <pault@gcc.gnu.org>
2031
2032	PR fortran/84115
2033	* resolve.c (resolve_assoc_var): If a non-constant target expr.
2034	has no string length expression, make the associate variable
2035	into a deferred length, allocatable symbol.
2036	* trans-decl.c (gfc_is_reallocatable_lhs): Add and use a ptr to
2037	the symbol.
2038	* trans-stmt.c (trans_associate_var): Null and free scalar
2039	associate names that are allocatable. After assignment, remove
2040	the allocatable attribute to prevent reallocation.
2041
20422018-02-16  Jakub Jelinek  <jakub@redhat.com>
2043
2044	PR fortran/84418
2045	* trans-openmp.c (gfc_trans_omp_clauses): For OMP_CLAUSE_LINEAR_REF
2046	kind set OMP_CLAUSE_LINEAR_STEP to TYPE_SIZE_UNIT times last_step.
2047
20482018-02-16  Dominique d'Humieres  <dominiq@gcc.gnu.org>
2049
2050	PR fortran/84354
2051	* decl.c (gfc_get_pdt_instance): Replace '%qs' with %qs.
2052
20532018-02-15  Janus Weil  <janus@gcc.gnu.org>
2054
2055	PR fortran/84409
2056	* interface.c (check_dtio_arg_TKR_intent): Add a check for character
2057	length.
2058
20592018-02-14  Janus Weil  <janus@gcc.gnu.org>
2060
2061	PR fortran/84385
2062	* match.c (gfc_match_select_type): Fix check for selector in
2063	SELECT TYPE statement.
2064
20652018-02-13  Janus Weil  <janus@gcc.gnu.org>
2066
2067	PR fortran/84313
2068	* symbol.c (check_conflict): Reject procedure pointers in common blocks.
2069
20702018-02-13  Alastair McKinstry  <alastair.mckinstry@sceal.ie>
2071	    Janne Blomqvist  <jb@gcc.gnu.org>
2072
2073	* module.c (dump_module): Use lbasename to ensure that module
2074	files are reproducible.
2075
20762018-02-12  Janus Weil  <janus@gcc.gnu.org>
2077
2078	PR fortran/84273
2079	* resolve.c (resolve_component): Fix checks of passed argument in
2080	procedure-pointer components.
2081
20822018-02-11  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
2083
2084	PR fortran/35299
2085	* resolve.c (resolve_formal_arglist): Update error message.
2086
20872018-02-11  Andre Vehreschild  <vehre@gcc.gnu.org>
2088
2089	* gfortran.texi: Fix typos in documentation of caf_register ().
2090	* trans-array.c (structure_alloc_comps): Only register a component of
2091	a derived typed corray, not of an ultimate component coarray.
2092
20932018-02-11  Steven G. Kargl  <kargl@gcc.gnu.org>
2094
2095	PR fortran/54223
2096	PR fortran/84276
2097	* interface.c (compare_actual_formal): Add in_statement_function
2098	bool parameter.  Skip check of INTENT attribute for statement
2099	functions.  Arguments to a statement function cannot be optional,
2100	issue error for missing argument.
2101	(gfc_procedure_use, gfc_ppc_use, gfc_arglist_matches_symbol): Use
2102	 in_statement_function.
2103
21042018-02-11  Paul Thomas  <pault@gcc.gnu.org>
2105
2106	PR fortran/84074
2107	* trans-expr.c (gfc_conv_derived_to_class): Set the use_offset
2108	flag. If the is a vector subscript or the expression is not a
2109	variable, make the descriptor one-based.
2110
21112018-02-10  Paul Thomas  <pault@gcc.gnu.org>
2112
2113	PR fortran/84141
2114	PR fortran/84155
2115	* trans-array.c (gfc_array_init_size): Revert the change made
2116	in revision 257356 setting the dtype.
2117	* trans-types.c (gfc_get_dtype): Do not use the cached dtype.
2118	Call gfc_get_dtype_rank_type every time.
2119
2120	PR fortran/56691
2121	* trans-array.c (gfc_conv_expr_descriptor): If the source array
2122	is a descriptor type, use its offset, removing the condition
2123	that is be a class expression.
2124
21252018-02-07  Steven G. Kargl  <kargl@gcc.gnu.org>
2126
2127	PR fortran/82994
2128	* match.c (gfc_match_deallocate): Check for NULL pointer.
2129
21302018-02-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
2131
2132	PR fortran/68560
2133	* trans-intrinsic.c (gfc_conv_intrinsic_shape): New function.
2134	(gfc_conv_intrinsic_function): Call it.
2135
21362018-02-07  Steven G. Kargl  <kargl@gcc.gnu.org>
2137
2138	PR fortran/82049
2139	* match.c (gfc_match_type_spec): If the charlen is non-NULL, then
2140	try to resolve it.  While here return early if possible.
2141
21422018-02-04  Paul Thomas  <pault@gcc.gnu.org>
2143
2144	PR fortran/84115
2145	* trans-decl.c (gfc_get_symbol_decl): Do not finish the decl of
2146	'length' if the symbol charlen backend_decl is an indirect ref.
2147
21482018-02-03  Paul Thomas  <pault@gcc.gnu.org>
2149
2150	PR fortran/84141
2151	PR fortran/84155
2152	* trans-array.c (gfc_array_init_size): Instead of gfc_get_dtype
2153	use gfc_get_dtype_rank_type.
2154
21552018-02-01  Janne Blomqvist  <jb@gcc.gnu.org>
2156
2157	PR 83975
2158	PR 83344
2159	* resolve.c (resolve_assoc_var): Generate an error if
2160	target length unknown.
2161
21622018-02-01  Janne Blomqvist  <jb@gcc.gnu.org>
2163
2164	PR fortran/83705
2165	* simplify.c (gfc_simplify_repeat): Increase limit for deferring
2166	to runtime, print a warning message.
2167
21682018-01-31  Jakub Jelinek  <jakub@redhat.com>
2169
2170	PR fortran/84116
2171	* openmp.c (gfc_match_omp_clauses): If all the linear
2172	gfc_match_omp_variable_list calls failed, don't gfc_free_omp_namelist
2173	nor set *head = NULL.  Formatting fixes.
2174
21752018-01-31  Paul Thomas  <pault@gcc.gnu.org>
2176
2177	PR fortran/84088
2178	* trans-expr.c (gfc_conv_procedure_call): If the parm expr is
2179	an address expression passed to an assumed rank dummy, convert
2180	to an indirect reference.
2181
21822018-01-31  Thomas Koenig  <tkoenig@gcc.gnu.org>
2183
2184	* dump-parse-tree.c (write_proc): Use sym_name (which may
2185	be sym->binding_label) instead of sym->name.
2186
21872018-01-31  Janne Blomqvist  <jb@gcc.gnu.org>
2188
2189	* trans-const.c (gfc_conv_string_init): Use gfc_charlen_t instead
2190	of int for slen.
2191
21922018-01-31  Janne Blomqvist  <jb@gcc.gnu.org>
2193
2194	PR fortran/78534
2195	* trans-expr.c (fill_with_spaces): Use memset instead of
2196	generating loop.
2197	(gfc_trans_string_copy): Improve opportunity to use builtins with
2198	constant lengths.
2199
22002018-01-30  Jakub Jelinek  <jakub@redhat.com>
2201
2202	PR debug/84131
2203	* trans-array.c (gfc_get_descriptor_offsets_for_info): Set *data_off
2204	to DATA_FIELD's offset rather than OFFSET_FIELD's offset.
2205
22062018-01-30  Thomas Koenig  <tkoenig@gcc.gnu.org>
2207
2208	PR fortran/84134
2209	* array.c (gfc_ref_dimen_size): Whitespace fixes.  If stride is
2210	zero, return false.
2211
22122018-01-30  Thomas Koenig  <tkoenig@gcc.gnu.org>
2213
2214	PR fortran/84133
2215	* frontend-passes (matmul_to_var_expr): Return early if
2216	in association list.
2217	(inline_matmul_assign): Likewise.
2218
22192017-01-29  Thomas Koenig  <tkoenig@gcc.gnu.org>
2220
2221	PR fortran/84073
2222	* resolve.c (resolve_component): Ensure BIND(C) character
2223	components have length one.
2224	(resolve_symbol): Likewise for variables.
2225
22262018-01-27  Jakub Jelinek  <jakub@redhat.com>
2227
2228	PR fortran/84065
2229	* decl.c (add_init_expr_to_sym): Ignore initializers for too large
2230	lengths.
2231
22322018-01-26  Damian Rouson  <damian@sourceryinstitute.org>
2233	    Alessandro Fanfarillo  <fanfarillo.gcc@gmail.com>
2234	    Soren Rasmussen  <s.c.rasmussen@gmail.com>
2235
2236	Partial support for Fortran 2018 teams features.
2237
2238	* array.c (gfc_match_array_ref): add team attribute in coarray
2239	transfers.
2240	* check.c (gfc_check_get_team, gfc_check_team_number): add new
2241	functions for get_team and team_number.
2242	* dump-parse-tree.c (show_code_node): add new statements: form team,
2243	change team, end team, and sync team.
2244	* expr.c (gfc_find_team_co): add new function.
2245	* gfortran.h: add new statements.
2246	* intrinsic.c (add_functions): add get_team and team_number functions.
2247	* intrinsic.h: add get_team and team_number prototypes for check,
2248	simplify, and resolve.
2249	* iresolve.c (gfc_resolve_get_team, gfc_resolve_team_number): add new
2250	functions.
2251	* iso-fortran-env.def: add the team_type derived type.
2252	* match.c (gfc_match_if, gfc_match_form_team, gfc_match_team_number)
2253	(gfc_match_end_team, gfc_match_sync_team, gfc_match_change_team):
2254	add change team, end team, form team, sync team match and functions.
2255	* match.h: add new prototypes for change team, end team, form team,
2256	and sync team.
2257	* parse.c (decode_statement): add cases for change team, end team,
2258	form team, and sync team.
2259	* resolve.c: add cases for exec form team, change team, end team, and
2260	sync team.
2261	* simplify.c (gfc_simplify_get_team): add new function for get team.
2262	* st.c (gfc_free_statement): add cases exec for change team, end team,
2263	form team, sync team.
2264	* trans-decl.c (gfor_fndecl_caf_form_team)
2265	(gfor_fndecl_caf_change_team, gfor_fndecl_caf_end_team)
2266	(gfor_fndecl_caf_sync_team, gfor_fndecl_caf_get_team)
2267	(gfor_fndecl_caf_team_number): add functions and definitions.
2268	* trans-intrinsic.c (conv_caf_send, conv_intrinsic_team_number): add
2269	new function and team_type argument support.
2270	* trans-stmt.c (gfc_trans_form_team, gfc_trans_change_team)
2271	(gfc_trans_end_team, gfc_trans_sync_team): add new functions.
2272	* trans-stmt.h: add new prototypes.
2273	* trans-types.c (gfc_get_derived_type): check condition for team_type.
2274	* trans.c (trans_code): new exec cases for form team, change team, end
2275	team, and sync team.
2276	* trans.h: add new prototypes.
2277
22782018-01-26  Steven G. Kargl  <kargl@gcc.gnu.org>
2279
2280	PR fortran/83998
2281	* simplify.c (compute_dot_product):  Initialize result to INTEGER(1) 0
2282	or .false.  The summation does the correct type conversion.
2283	(gfc_simplify_dot_product): Special case zero-sized arrays.
2284
22852018-25-01  Paul Thomas  <pault@gcc.gnu.org>
2286
2287	PR fortran/37577
2288	* array.c (gfc_match_array_ref): If standard earlier than F2008
2289	it is an error if the reference dimension is greater than 7.
2290	libgfortran.h : Increase GFC_MAX_DIMENSIONS to 15. Change the
2291	dtype masks and shifts accordingly.
2292	* trans-array.c (gfc_conv_descriptor_dtype): Use the dtype
2293	type node to check the field.
2294	(gfc_conv_descriptor_dtype): Access the rank field of dtype.
2295	(duplicate_allocatable_coarray): Access the rank field of the
2296	dtype descriptor rather than the dtype itself.
2297	* trans-expr.c (get_scalar_to_descriptor_type): Store the type
2298	of 'scalar' on entry and use its TREE_TYPE if it is ARRAY_TYPE
2299	(ie. a character).
2300	(gfc_conv_procedure_call): Pass TREE_OPERAND (tmp,0) to
2301	get_scalar_to_descriptor_type if the actual expression is a
2302	constant.
2303	(gfc_trans_structure_assign): Assign the rank directly to the
2304	dtype rank field.
2305	* trans-intrinsic.c (gfc_conv_intrinsic_rank): Cast the result
2306	to default integer kind.
2307	(gfc_conv_intrinsic_sizeof): Obtain the element size from the
2308	'elem_len' field of the dtype.
2309	* trans-io.c (gfc_build_io_library_fndecls): Replace
2310	gfc_int4_type_node with dtype_type_node where necessary.
2311	(transfer_namelist_element): Use gfc_get_dtype_rank_type for
2312	scalars.
2313	* trans-types.c : Provide 'get_dtype_type_node' to acces the
2314	dtype_type_node and, if necessary, build it.
2315	The maximum size of an array element is now determined by the
2316	maximum value of size_t.
2317	Update the description of the array descriptor, including the
2318	type def for the dtype_type.
2319	(gfc_get_dtype_rank_type): Build a constructor for the dtype.
2320	Distinguish RECORD_TYPEs that are BT_DERIVED or BT_CLASS.
2321	(gfc_get_array_descriptor_base): Change the type of the dtype
2322	field to dtype_type_node.
2323	(gfc_get_array_descr_info): Get the offset to the rank field of
2324	the dtype.
2325	* trans-types.h : Add a prototype for 'get_dtype_type_node ()'.
2326	* trans.h : Define the indices of the dtype fields.
2327
23282018-23-01  Paul Thomas  <pault@gcc.gnu.org>
2329
2330	PR fortran/83866
2331	* decl.c (gfc_match_derived_decl): If eos not matched, recover
2332	and emit error about garbage after declaration.
2333
23342018-23-01  Paul Thomas  <pault@gcc.gnu.org>
2335
2336	PR fortran/83898
2337	* trans-stmt.c (trans_associate_var): Do not set cst_array_ctor
2338	for characters.
2339
23402018-01-22  Janne Blomqvist  <jb@gcc.gnu.org>
2341
2342	PR 78534
2343	PR 83704
2344	* arith.c (gfc_arith_concat): Use size_t for string length.
2345	(gfc_compare_string): Likewise.
2346	(gfc_compare_with_Cstring): Likewise.
2347	* array.c (gfc_resolve_character_array_constructor): Use
2348	HOST_WIDE_INT, gfc_mpz_get_hwi.
2349	* check.c (gfc_check_fe_runtime_error): Use size_t.
2350	* data.c (create_character_initializer): Use HOST_WIDE_INT,
2351	gfc_extract_hwi.
2352	* decl.c (gfc_set_constant_character_len): Use gfc_charlen_t.
2353	(add_init_expr_to_sym): Use HOST_WIDE_INT.
2354	* expr.c (gfc_build_init_expr): Use HOST_WIDE_INT,
2355	gfc_extract_hwi.
2356	(gfc_apply_init): Likewise.
2357	* match.h (gfc_set_constant_character_len): Update prototype.
2358	* primary.c (match_string_constant): Use size_t.
2359	* resolve.c (resolve_ordinary_assign): Use HOST_WIDE_INT,
2360	gfc_mpz_get_hwi.
2361	* simplify.c (init_result_expr): Likewise.
2362	(gfc_simplify_len_trim): Use size_t.
2363	* target-memory.c (gfc_encode_character): Use size_t.
2364	(gfc_target_encode_expr): Use HOST_WIDE_INT, gfc_mpz_get_hwi.
2365	(interpret_array): Use size_t.
2366	(gfc_interpret_character): Likewise.
2367	* target-memory.h (gfc_encode_character): Update prototype.
2368	(gfc_interpret_character): Likewise.
2369	(gfc_target_interpret_expr): Likewise.
2370	* trans-const.c (gfc_build_string_const): Use size_t for length
2371	argument.
2372	(gfc_build_wide_string_const): Likewise.
2373	* trans-const.h (gfc_build_string_const): Likewise.
2374	(gfc_build_wide_string_const): Likewise.
2375
23762018-01-20  Steven G. Kargl  <kargl@gcc.gnu.org>
2377
2378	PR fortran/83900
2379    * simplify.c (gfc_simplify_matmul): Set return type correctly.
2380
23812018-01-19  Steven G. Kargl  <kargl@gcc.gnu.org>
2382
2383	PR fortran/83900
2384	* simplify.c (gfc_simplify_matmul): Delete bogus assertion.
2385
23862018-01-17  Harald Anlauf  <anlauf@gmx.de>
2387
2388	PR fortran/83864
2389	* expr.c (add_init_expr_to_sym): Do not dereference NULL pointer.
2390
23912018-01-17  Harald Anlauf  <anlauf@gmx.de>
2392
2393	PR fortran/83874
2394	* decl.c (add_init_expr_to_sym): Do not dereference NULL pointer.
2395
23962018-01-15  Louis Krupp  <louis.krupp@zoho.com>
2397
2398	PR fortran/82257
2399	* interface.c (compare_rank): Don't try to retrieve CLASS_DATA
2400	from symbol marked unlimited polymorphic.
2401	* resolve.c (resolve_structure_cons): Likewise.
2402	* misc.c (gfc_typename): Don't dereference derived->components
2403	if it's NULL.
2404
24052018-01-15  Thomas Koenig  <tkoenig@gcc.gnu.org>
2406
2407	PR fortran/54613
2408	* gfortran.h (gfc_check_f): Rename f4ml to f5ml.
2409	(gfc_logical_4_kind): New macro
2410	* intrinsic.h (gfc_simplify_minloc): Add a gfc_expr *argument.
2411	(gfc_simplify_maxloc): Likewise.
2412	(gfc_resolve_maxloc): Likewise.
2413	(gfc_resolve_minloc): Likewise.
2414	* check.c (gfc_check_minloc_maxloc): Add checking for "back"
2415	argument; also raise error if it is used (for now). Add it
2416	if it isn't present.
2417	* intrinsic.c (add_sym_4ml): Rename to
2418	(add_sym_5ml), adjust for extra argument.
2419	(add_functions): Add "back" constant. Adjust maxloc and minloc
2420	for back argument.
2421	* iresolve.c (gfc_resolve_maxloc): Add back argument. If back is
2422	not of gfc_logical_4_kind, convert.
2423	(gfc_resolve_minloc): Likewise.
2424	* simplify.c (gfc_simplify_minloc): Add back argument.
2425	(gfc_simplify_maxloc): Likewise.
2426	* trans-intinsic.c (gfc_conv_intrinsic_minmaxloc): Rename last
2427	argument to %VAL to ensure passing by value.
2428	(gfc_conv_intrinsic_function): Call gfc_conv_intrinsic_minmaxloc
2429	also for library calls.
2430
24312018-01-13  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2432
2433	PR fortran/82007
2434	* resolve.c (resolve_transfer): Delete code looking for 'DT'
2435	format specifiers in format strings. Set formatted to true if a
2436	format string or format label is present.
2437	* trans-io.c (get_dtio_proc): Likewise. (transfer_expr): Fix
2438	whitespace.
2439
24402018-01-13  Thomas Koenig  <tkoenig@gcc.gnu.org>
2441
2442	PR fortran/83744
2443	* dump-parse-tree.c (get_c_type_name): Remove extra line.
2444	Change for loop to use declaration in for loop. Handle BT_LOGICAL
2445	and BT_CHARACTER.
2446	(write_decl): Add where argument. Fix indentation. Replace
2447	assert with error message. Add typename to warning
2448	in comment.
2449	(write_type): Adjust locus to call of write_decl.
2450	(write_variable): Likewise.
2451	(write_proc): Likewise. Replace assert with error message.
2452
24532018-01-13  Paul Thomas  <pault@gcc.gnu.org>
2454
2455	PR fortran/52162
2456	* trans-expr.c (gfc_trans_scalar_assign): Flag is_alloc_lhs if
2457	the rhs expression is neither an elemental nor a conversion
2458	function.
2459
2460	PR fortran/83622
2461	* trans-array.c (is_pointer_array): Remove unconditional return
2462	of false for -fopenmp.
2463
24642018-01-13  Thomas Koenig  <tkoenig@gcc.gnu.org>
2465	<emsr@gcc.gnu.org>
2466
2467	PR fortran/83803
2468	* dump-parse-tree.c (write_proc): Always emit closing parenthesis
2469	for functions.
2470
24712018-01-10  Steven G. Kargl  <kargl@gcc.gnu.org>
2472
2473	PR fortran/82367
2474	* resolve.c (resolve_allocate_expr): Check for NULL pointer.
2475
24762018-01-10  Steven G. Kargl  <kargl@gcc.gnu.org>
2477
2478	PR fortran/83093
2479	* resolve.c (resolve_charlen): Check the type of cl->length
2480	after resolution.
2481
24822018-01-10  Janne Blomqvist  <jb@gcc.gnu.org>
2483
2484	PR fortran/83740
2485	* trans-array.c (gfc_trans_array_ctor_element): Fix formatting.
2486
24872018-01-10  Janne Blomqvist  <jb@gcc.gnu.org>
2488
2489	PR fortran/83740
2490	* trans-array.c (gfc_trans_array_ctor_element): Convert RHS to the
2491	LHS type when assigning.
2492
24932018-01-09  Steven G. Kargl  <kargl@gcc.gnu.org>
2494
2495	PR fortran/83742
2496	* expr.c (gfc_is_simply_contiguous): Check for NULL pointer.
2497
24982018-01-08  Steven G. Kargl  <kargl@gcc.gnu.org>
2499
2500	* match.c (gfc_match_allocate): Check for NULL pointer.
2501
25022018-01-08  Steven G. Kargl  <kargl@gcc.gnu.org>
2503
2504	* expr.c (gfc_check_pointer_assign): Fix typo in comment.
2505
25062018-01-08  Paul Thomas  <pault@gcc.gnu.org>
2507
2508	PR fortran/83611
2509	* decl.c (gfc_get_pdt_instance): If parameterized arrays have
2510	an initializer, convert the kind parameters and add to the
2511	component if the instance.
2512	* trans-array.c (structure_alloc_comps): Add 'is_pdt_type' and
2513	use it with case COPY_ALLOC_COMP. Call 'duplicate_allocatable'
2514	for parameterized arrays. Clean up typos in comments. Convert
2515	parameterized array initializers and copy into the array.
2516	* trans-expr.c (gfc_trans_scalar_assign): Do a deep copy for
2517	parameterized types.
2518	*trans-stmt.c (trans_associate_var): Deallocate associate vars
2519	as necessary, when they are PDT function results for example.
2520
2521	PR fortran/83731
2522	* trans-array.c (structure_alloc_comps): Only compare len parms
2523	when they are declared explicitly.
2524
25252018-01-06  Janne Blomqvist  <jb@gcc.gnu.org>
2526
2527	PR fortran/50892
2528	* trans-expr.c (gfc_trans_pointer_assignment): fold_convert rhs to
2529	lhs type.
2530
25312018-01-05  Janne Blomqvist  <jb@gcc.gnu.org>
2532
2533	PR fortran/78534
2534	PR fortran/66310
2535	* array.c (got_charlen): Use gfc_charlen_int_kind.
2536	* class.c (gfc_find_derived_vtab): Use gfc_size_kind instead of
2537	hardcoded kind.
2538	(find_intrinsic_vtab): Likewise.
2539	* decl.c (match_char_length): Use gfc_charlen_int_kind.
2540	(add_init_expr_to_sym): Use gfc_charlen_t and gfc_charlen_int_kind.
2541	(gfc_match_implicit): Use gfc_charlen_int_kind.
2542	* dump-parse-tree.c (show_char_const): Use gfc_charlen_t and size_t.
2543	(show_expr): Use HOST_WIDE_INT_PRINT_DEC.
2544	* expr.c (gfc_get_character_expr): Length parameter of type
2545	gfc_charlen_t.
2546	(gfc_get_int_expr): Value argument of type HOST_WIDE_INT.
2547	(gfc_extract_hwi): New function.
2548	(simplify_const_ref): Make string_len of type gfc_charlen_t.
2549	(gfc_simplify_expr): Use HOST_WIDE_INT for substring refs.
2550	* frontend-passes.c (optimize_trim): Use gfc_charlen_int_kind.
2551	* gfortran.h (gfc_mpz_get_hwi): New prototype.
2552	(gfc_mpz_set_hwi): Likewise.
2553	(gfc_charlen_t): New typedef.
2554	(gfc_expr): Use gfc_charlen_t for character lengths.
2555	(gfc_size_kind): New extern variable.
2556	(gfc_extract_hwi): New prototype.
2557	(gfc_get_character_expr): Use gfc_charlen_t for character length.
2558	(gfc_get_int_expr): Use HOST_WIDE_INT type for value argument.
2559	* gfortran.texi: Update description of hidden string length argument.
2560	* iresolve.c (check_charlen_present): Use gfc_charlen_int_kind.
2561	(gfc_resolve_char_achar): Likewise.
2562	(gfc_resolve_repeat): Pass string length directly without
2563	temporary, use gfc_charlen_int_kind.
2564	(gfc_resolve_transfer): Use gfc_charlen_int_kind.
2565	* match.c (select_intrinsic_set_tmp): Use HOST_WIDE_INT for charlen.
2566	* misc.c (gfc_mpz_get_hwi): New function.
2567	(gfc_mpz_set_hwi): New function.
2568	* module.c (atom_int): Change type from int to HOST_WIDE_INT.
2569	(parse_integer): Don't complain about large integers.
2570	(write_atom): Use HOST_WIDE_INT for integers.
2571	(mio_integer): Handle integer type mismatch.
2572	(mio_hwi): New function.
2573	(mio_intrinsic_op): Use HOST_WIDE_INT.
2574	(mio_array_ref): Likewise.
2575	(mio_expr): Likewise.
2576	* primary.c (match_substring): Use gfc_charlen_int_kind.
2577	* resolve.c (resolve_substring_charlen): Use gfc_charlen_int_kind.
2578	(resolve_character_operator): Likewise.
2579	(resolve_assoc_var): Likewise.
2580	(resolve_select_type): Use HOST_WIDE_INT for charlen, use snprintf.
2581	(resolve_charlen): Use mpz_sgn to determine sign.
2582	* simplify.c (gfc_simplify_repeat): Use HOST_WIDE_INT/gfc_charlen_t
2583	instead of long.
2584	* symbol.c (generate_isocbinding_symbol): Use gfc_charlen_int_kind.
2585	* target-memory.c (size_character): Length argument of type
2586	gfc_charlen_t.
2587	(gfc_encode_character): Likewise.
2588	(gfc_interpret_character): Use gfc_charlen_t.
2589	* target-memory.h (gfc_encode_character): Modify prototype.
2590	* trans-array.c (gfc_trans_array_ctor_element): Use existing type.
2591        (get_array_ctor_var_strlen): Use gfc_conv_mpz_to_tree_type.
2592	(trans_array_constructor): Use existing type.
2593	(get_array_charlen): Likewise.
2594	* trans-const.c (gfc_conv_mpz_to_tree_type): New function.
2595	* trans-const.h (gfc_conv_mpz_to_tree_type): New prototype.
2596	* trans-decl.c (gfc_trans_deferred_vars): Use existing type.
2597	(add_argument_checking): Likewise.
2598	* trans-expr.c (gfc_class_len_or_zero_get): Build const of type
2599	gfc_charlen_type_node.
2600	(gfc_conv_intrinsic_to_class): Use gfc_charlen_int_kind instead of
2601	4, fold_convert to correct type.
2602	(gfc_conv_class_to_class): Build const of type size_type_node for
2603	size.
2604	(gfc_copy_class_to_class): Likewise.
2605	(gfc_conv_string_length): Use same type in expression.
2606	(gfc_conv_substring): Likewise, use HOST_WIDE_INT for charlen.
2607	(gfc_conv_string_tmp): Make sure len is of the right type.
2608	(gfc_conv_concat_op): Use same type in expression.
2609	(gfc_conv_procedure_call): Likewise.
2610	(fill_with_spaces): Comment out memset() block due to spurious
2611	-Wstringop-overflow warnings.
2612	(gfc_trans_string_copy): Use gfc_charlen_type_node.
2613	(alloc_scalar_allocatable_for_subcomponent_assignment):
2614	fold_convert to right type.
2615	(gfc_trans_subcomponent_assign): Likewise.
2616	(trans_class_vptr_len_assignment): Build const of correct type.
2617	(gfc_trans_pointer_assignment): Likewise.
2618	(alloc_scalar_allocatable_for_assignment): fold_convert to right
2619	type in expr.
2620	(trans_class_assignment): Build const of correct type.
2621	* trans-intrinsic.c (gfc_conv_associated): Likewise.
2622	(gfc_conv_intrinsic_repeat): Do calculation in sizetype.
2623	* trans-io.c (gfc_build_io_library_fndecls): Use
2624	gfc_charlen_type_node for character lengths.
2625	(set_string): Convert to right type in assignment.
2626	* trans-stmt.c (gfc_trans_label_assign): Build const of
2627	gfc_charlen_type_node.
2628	(trans_associate_var): Likewise.
2629	(gfc_trans_character_select): Likewise.
2630	(gfc_trans_allocate): Likewise, don't typecast strlen result.
2631	(gfc_trans_deallocate): Don't typecast strlen result.
2632	* trans-types.c (gfc_size_kind): New variable.
2633	(gfc_init_types): Determine gfc_charlen_int_kind and gfc_size_kind
2634	from size_type_node.
2635	* trans-types.h: Fix comment.
2636
26372018-01-04  Thomas Koenig  <tkoenig@gcc.gnu.org>
2638
2639	PR fortran/83683
2640	PR fortran/45689
2641	* check.c (gfc_check_eoshift): Check for string length and
2642	for conformance of boundary.
2643	* intrinsic.c (add_functions): Add gfc_simplify_eoshift.
2644	* intrinsic.h: Add prototype for gfc_simplify_eoshift.
2645	* simplify.c (gfc_simplify_eoshift): New function.
2646
26472018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
2648	    Alan Hayward  <alan.hayward@arm.com>
2649	    David Sherwood  <david.sherwood@arm.com>
2650
2651	* trans-types.c (gfc_type_for_mode): Handle MODE_VECTOR_BOOL.
2652
26532018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
2654	    Alan Hayward  <alan.hayward@arm.com>
2655	    David Sherwood  <david.sherwood@arm.com>
2656
2657	* trans-types.c (gfc_type_for_mode): Check valid_vector_subparts_p.
2658
26592018-01-03  Thomas Koenig  <tkoenig@gcc.gnu.org>
2660
2661	PR fortran/83664
2662	* check.c (gfc_check_eoshift): Error for missing boundary if array
2663	is not one of the standard types.
2664
26652018-01-03  Jakub Jelinek  <jakub@redhat.com>
2666
2667	Update copyright years.
2668
2669	* gfortranspec.c (lang_specific_driver): Update copyright notice
2670	dates.
2671	* gfc-internals.texi: Bump @copying's copyright year.
2672	* gfortran.texi: Ditto.
2673	* intrinsic.texi: Ditto.
2674	* invoke.texi: Ditto.
2675
26762017-01-02  Thomas Koenig  <tkoenig@gcc.gnu.org>
2677
2678	PR fortran/45689
2679	* intrinsic.c (add_function): Add gfc_simplify_maxloc and
2680	gfc_simplify_minloc to maxloc and minloc, respectively.
2681	* intrinsic.h: Add prototypes for gfc_simplify_minloc
2682	and gfc_simplify_maxloc.
2683	* simplify.c (min_max_chose): Adjust prototype.  Modify function
2684	to have a return value which indicates if the extremum was found.
2685	(is_constant_array_expr): Fix typo in comment.
2686	(simplify_minmaxloc_to_scalar): New function.
2687	(simplify_minmaxloc_nodim): New function.
2688	(new_array): New function.
2689	(simplify_minmaxloc_to_array): New function.
2690	(gfc_simplify_minmaxloc): New function.
2691	(simplify_minloc): New function.
2692	(simplify_maxloc): New function.
2693
26942018-01-02  Thomas Koenig  <tkoenig@gcc.gnu.org>
2695
2696	PR fortran/45689
2697	PR fortran/83650
2698	* simplify.c (gfc_simplify_cshift): Re-implement to allow full
2699	range of arguments.
2700
27012018-01-01  Paul Thomas  <pault@gcc.gnu.org>
2702
2703	PR fortran/83076
2704	* resolve.c (resolve_fl_derived0): Add caf_token fields for
2705	allocatable and pointer scalars, when -fcoarray selected.
2706	* trans-types.c (gfc_copy_dt_decls_ifequal): Copy the token
2707	field as well as the backend_decl.
2708	(gfc_get_derived_type): Flag GFC_FCOARRAY_LIB for module
2709	derived types that are not vtypes. Components with caf_token
2710	attribute are pvoid types. For a component requiring it, find
2711	the caf_token field and have the component token field point to
2712	its backend_decl.
2713
2714	PR fortran/83319
2715	*trans-types.c (gfc_get_array_descriptor_base): Add the token
2716	field to the descriptor even when codimen not set.
2717
2718Copyright (C) 2018 Free Software Foundation, Inc.
2719
2720Copying and distribution of this file, with or without modification,
2721are permitted in any medium without royalty provided the copyright
2722notice and this notice are preserved.
2723