12016-12-27  Jakub Jelinek  <jakub@redhat.com>
2
3	* gfortran.h (gfc_error): Rename overload with OPT argument to...
4	(gfc_error_opt): ... this.
5	* error.c (gfc_error): Rename overloads with OPT argument to...
6	(gfc_error_opt): ... this.  Adjust callers.
7	(gfc_notify_std, gfc_error): Adjust callers.
8	* resolve.c (resolve_structure_cons, resolve_global_procedure): Use
9	gfc_error_opt instead of gfc_error.
10	* interface.c (argument_rank_mismatch, compare_parameter,
11	gfc_check_typebound_override): Likewise.  Fix up formatting.
12
132016-12-23  Andre Vehreschild  <vehre@gcc.gnu.org>
14
15	* trans-expr.c (trans_class_assignment): Allocate memory of _vptr->size
16        before assigning an allocatable class object.
17	(gfc_trans_assignment_1): Flag that (re-)alloc of the class object
18	shall be done.
19
202016-12-21  Jakub Jelinek  <jakub@redhat.com>
21
22	PR fortran/78866
23	* openmp.c (resolve_omp_clauses): Diagnose assumed size arrays in
24	OpenMP map, to and from clauses.
25	* trans-openmp.c: Include diagnostic-core.h, temporarily redefining
26	GCC_DIAG_STYLE to __gcc_tdiag__.
27	(gfc_omp_finish_clause): Diagnose implicitly mapped assumed size
28	arrays.
29
302016-12-21  Janne Blomqvist  <jb@gcc.gnu.org>
31
32	PR fortran/78867
33	* trans-expr.c (gfc_conv_procedure_call): Emit DECL_EXPR also for
34	non-pointer character results.
35
362016-12-21  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
37
38	* iresolve.c (gfc_resolve_ftell): Call "ftell" instead of "ftell2".
39
402016-12-20  Janne Blomqvist  <jb@gcc.gnu.org>
41
42	* trans-types.c (gfc_init_types): Don't redefine boolean type node.
43
442016-12-19  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
45
46	* trans-decl.c (create_main_function): Remove unused elements to
47	the set_options call.
48
492016-12-19  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
50
51	* trans.h: Remove gfor_fndecl_stop_numeric_f08.
52	* trans-decl.c: Remove gfor_fndecl_stop_numeric_f08.
53	* trans-stmt.c (gfc_trans_stop): Use gfor_fndecl_stop_numeric
54	instead of gfor_fndecl_stop_numeric_f08.
55
562016-12-19  Janus Weil  <janus@gcc.gnu.org>
57
58	PR fortran/78545
59	* intrinsic.texi: Minor documentation fixes for non-standard
60	time-related intrinsics. Add references to standard intrinsics and
61	linkify some existing references.
62
632016-12-18  Dominique d'Humieres  <dominiq@lps.ens.fr>
64
65	PR fortran/78545
66	* intrinsic.texi: Fix documentation for GMTIME and LTIME.
67
682016-12-18  Janus Weil  <janus@gcc.gnu.org>
69
70	PR fortran/78848
71	* trans-io.c (get_dtio_proc): Generate non-typebound DTIO call for class
72	variables, if no typebound DTIO procedure is available.
73
742016-12-18  Janus Weil  <janus@gcc.gnu.org>
75
76	PR fortran/78592
77	* interfac.c (gfc_find_specific_dtio_proc): Fixup for r243005, making
78	sure that the generic list is followed through until the end.
79
802016-12-17  Thomas Koenig  <tkoenig@gcc.gnu.org>
81
82	PR fortran/78239
83	* decl.c (char_len_param_value): Actually commit previous change.
84
852016-12-17  Thomas Koenig  <tkoenig@gcc.gnu.org>
86
87	PR fortran/78239
88	* decl.c( char_len_param_value): Also check for -fimplicit-none
89	when determining if implicit none is in force.
90
912016-12-16  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
92
93	PR fortran/78622
94	* io.c (format_lex): Continue of string delimiter seen.
95
962016-12-16  Jakub Jelinek  <jakub@redhat.com>
97
98	PR fortran/78757
99	* trans-expr.c (gfc_conv_procedure_call): Emit DECL_EXPR for the
100	type pstr var points to.
101
1022016-12-15  Janus Weil  <janus@gcc.gnu.org>
103
104	PR fortran/78798
105	* gfortran.h (gfc_compare_derived_types,gfc_compare_types,
106	gfc_compare_interfaces,gfc_has_vector_subscript): Return bool instead
107	of int.
108	* interface.c (compare_components): Ditto.
109	(gfc_compare_union_types): Rename to compare_union_types, declare as
110	static, return bool.
111	(gfc_compare_derived_types): Return bool instead of int.
112	(gfc_compare_types): Ditto.
113	(compare_type): Ditto.
114	(compare_rank): Ditto.
115	(compare_type_rank): Ditto.
116	(compare_type_rank_if): Ditto.
117	(count_types_test): Ditto.
118	(generic_correspondence): Ditto.
119	(gfc_compare_interfaces): Ditto.
120	(check_interface0): Ditto.
121	(check_interface1): Ditto.
122	(compare_allocatable): Ditto.
123	(compare_parameter): Ditto.
124	(gfc_has_vector_subscript): Ditto.
125	(compare_actual_formal): Ditto.
126
1272016-12-15  Janus Weil  <janus@gcc.gnu.org>
128
129	PR fortran/78800
130	* interface.c (compare_allocatable): Avoid additional errors on bad
131	class declarations.
132	(compare_parameter): Put the result of gfc_expr_attr into a variable,
133	in order to avoid calling it multiple times. Exit early on bad class
134	declarations to avoid ICE.
135
1362016-12-14  Martin Jambor  <mjambor@suse.cz>
137
138	* trans-openmp.c: Include omp-general.h.
139
1402016-12-14  Andre Vehreschild  <vehre@gcc.gnu.org>
141
142	PR fortran/78780
143	* trans-expr.c (gfc_trans_assignment_1): Improve check whether detour
144	caf-runtime routines is needed.
145
1462016-12-14  Andre Vehreschild  <vehre@gcc.gnu.org>
147
148	PR fortran/78672
149	* array.c (gfc_find_array_ref): Add flag to return NULL when no ref is
150	found instead of erroring out.
151	* data.c (gfc_assign_data_value): Only constant expressions are valid
152	for initializers.
153	* gfortran.h: Reflect change of gfc_find_array_ref's signature.
154	* interface.c (compare_actual_formal): Access the non-elemental
155	array-ref.  Prevent taking a REF_COMPONENT for a REF_ARRAY.  Correct
156	indentation.
157	* module.c (load_omp_udrs): Clear typespec before reading into it.
158	* trans-decl.c (gfc_build_qualified_array): Prevent accessing the array
159	when it is a coarray.
160	* trans-expr.c (gfc_conv_cst_int_power): Use wi::abs()-function instead
161	of crutch preventing sanitizer's bickering here.
162	* trans-stmt.c (gfc_trans_deallocate): Only get data-component when it
163	is a descriptor-array here.
164
1652016-12-13  Janus Weil  <janus@gcc.gnu.org>
166
167	PR fortran/78798
168	* gfortran.h (gfc_is_constant_expr, gfc_is_formal_arg,
169	gfc_is_compile_time_shape): Return bool instead of int.
170	* array.c (gfc_is_compile_time_shape): Ditto.
171	* expr.c (gfc_is_constant_expr): Ditto.
172	* resolve.c (gfc_is_formal_arg): Ditto. Make formal_arg_flag bool.
173
1742016-12-13  Andre Vehreschild  <vehre@gcc.gnu.org>
175
176	PR fortran/77785
177	* resolve.c (resolve_symbol): Correct attr lookup to the _data
178	component.
179	* trans-array.c (gfc_alloc_allocatable_for_assignment): Indirect ref
180	pointers and references before retrieving the caf-token.
181
1822016-12-13  Janus Weil  <janus@gcc.gnu.org>
183	    Paul Thomas  <pault@gcc.gnu.org>
184
185	PR fortran/78737
186	* gfortran.h (gfc_find_typebound_dtio_proc): New prototype.
187	* interface.c (gfc_compare_interfaces): Whitespace fix.
188	(gfc_find_typebound_dtio_proc): New function.
189	(gfc_find_specific_dtio_proc): Use it. Improve error recovery.
190	* trans-io.c (get_dtio_proc): Implement polymorphic calls to DTIO
191	procedures.
192
1932016-12-12  Janus Weil  <janus@gcc.gnu.org>
194
195	PR fortran/78392
196	* expr.c (gfc_is_constant_expr): Specification functions are not
197	compile-time constants. Update documentation (add reference to F08
198	standard), add a FIXME.
199	(external_spec_function): Add reference to F08 standard.
200	* resolve.c (resolve_fl_variable): Ditto.
201
2022016-12-10  Thomas Koenig  <tkoenig@gcc.gnu.org>
203
204	PR fortran/78226
205	* error.c (gfc_warning_internal):  New function.
206	* frontend-passes.c (gfc_run_passes):  Call check_locus if
207	CHECKING_P is defined.
208	(check_locus_code):  New function.
209	(check_locus_expr):  New function.
210	(check_locus):  New function.
211	* gfortran.h:  Add prototype for gfc_warning_internal.
212
2132016-12-10 Paul Thomas  <pault@gcc.gnu.org>
214
215	PR fortran/78350
216	* resolve.c (resolve_structure_cons): Remove the block that
217	tried to remove a charlen and rely on namespace cleanup.
218
2192016-12-09  Paul Thomas  <pault@gcc.gnu.org>
220
221	PR fortran/77903
222	* decl.c (get_proc_name): Use the symbol tlink field instead of
223	the typespec interface field.
224	(gfc_match_function_decl, gfc_match_submod_proc): Ditto.
225	* gfortran.h : Since the symbol tlink field is no longer used
226	by the frontend for change management, change the comment to
227	reflect its current uses.
228	* parse.c (get_modproc_result): Same as decl.c changes.
229	* resolve.c (resolve_fl_procedure): Ditto.
230
2312016-12-09  Janus Weil  <janus@gcc.gnu.org>
232
233	PR fortran/61767
234	* class.c (has_finalizer_component): Fix this function to detect only
235	non-pointer non-allocatable components which have a finalizer.
236
2372016-12-09  Andre Vehreschild  <vehre@gcc.gnu.org>
238
239	PR fortran/78505
240	* trans-stmt.c (gfc_trans_allocate): Add sync all after the execution
241	of the whole allocate-statement to adhere to the standard.
242
2432016-12-09  Andre Vehreschild  <vehre@gcc.gnu.org>
244
245	* trans-array.c (gfc_array_deallocate): Remove wrapper.
246	(gfc_trans_dealloc_allocated): Same.
247	(structure_alloc_comps): Restructure deallocation of (nested)
248	allocatable components.  Insert dealloc of sub-component into the block
249	guarded by the if != NULL for the component.
250	(gfc_trans_deferred_array): Use the almightly deallocate_with_status.
251	* trans-array.h: Remove prototypes.
252	* trans-expr.c (gfc_conv_procedure_call): Use the almighty deallocate_
253	with_status.
254	* trans-openmp.c (gfc_walk_alloc_comps): Likewise.
255	(gfc_omp_clause_assign_op): Likewise.
256	(gfc_omp_clause_dtor): Likewise.
257	* trans-stmt.c (gfc_trans_deallocate): Likewise.
258	* trans.c (gfc_deallocate_with_status): Allow deallocation of scalar
259	and arrays as well as coarrays.
260	(gfc_deallocate_scalar_with_status): Get the data member for coarrays
261	only when freeing an array with descriptor.  And set correct caf_mode
262	when freeing components of coarrays.
263	* trans.h: Change prototype of gfc_deallocate_with_status to allow
264	adding statements into the block guarded by the if (pointer != 0) and
265	supply a coarray handle.
266
2672016-12-09  Paul Thomas  <pault@gcc.gnu.org>
268
269	PR fortran/44265
270	* gfortran.h : Add fn_result_spec bitfield to gfc_symbol.
271	* resolve.c (flag_fn_result_spec): New function.
272	(resolve_fntype): Call it for character result lengths.
273	* symbol.c (gfc_new_symbol): Set fn_result_spec to zero.
274	* trans-decl.c (gfc_sym_mangled_identifier): Include the
275	procedure name in the mangled name for symbols with the
276	fn_result_spec bit set.
277	(gfc_finish_var_decl): Mark the decls of these symbols
278	appropriately for the case where the function is external.
279	(gfc_get_symbol_decl): Mangle the name of these symbols.
280	(gfc_create_module_variable): Allow them through the assert.
281	(gfc_generate_function_code): Remove the assert before the
282	initialization of sym->tlink because the frontend no longer
283	uses this field.
284	* trans-expr.c (gfc_map_intrinsic_function): Add a case to
285	treat the LEN_TRIM intrinsic.
286	(gfc_trans_string_copy): Deal with Wstringop-overflow warning
287	that can occur with constant source lengths at -O3.
288
2892016-12-08  Steven G. Kargl  <kargl@gcc.gnu.org>
290
291	PR fortran/65173
292	PR fortran/69064
293	PR fortran/69859
294	PR fortran/78350
295	* gfortran.h (gfc_namespace): Remove old_cl_list member.
296	* parse.c (use_modules, next_statement): old_cl_list is gone.
297	(clear_default_charlen): Remove no longer used function.
298	(reject_statement): Do not try ot clean up gfc_charlen structure(s)
299	that may have been added to a cl_list list.
300	* symbol.c (gfc_new_charlen): old_cl_list structure is gone.
301
3022016-12-06  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
303
304	PR fortran/78659
305	* resolve.c (resolve_fl_namelist): Remove unneeded error.
306
3072016-12-06  Andre Vehreschild  <vehre@gcc.gnu.org>
308
309	PR fortran/78226
310	* class.c (finalize_component): Add missing locus information.
311	(finalization_scalarizer): Likewise.
312	(finalization_get_offset): Likewise.
313	(finalizer_insert_packed_call): Likewise.
314	(generate_finalization_wrapper): Likewise.
315
3162016-12-05  Nathan Sidwell  <nathan@acm.org>
317
318	* error.c (gfc_warning_check): Call diagnostic_check_max_errors.
319	(gfc_error_check): Likewise.
320
3212016-12-04  Janus Weil  <janus@gcc.gnu.org>
322
323	PR fortran/78618
324	* intrinsic.c (gfc_convert_type_warn): Do not set the full typespec for
325	the conversion symbol, but only type and kind. Set the full typespec
326	for the expression.
327	(gfc_convert_chartype): Ditto.
328
3292016-12-03  Janus Weil  <janus@gcc.gnu.org>
330
331	PR fortran/43207
332	* primary.c (gfc_match_varspec): Reject nonpolymorphic references to
333	abstract types.
334
3352016-12-03  Janus Weil  <janus@gcc.gnu.org>
336
337	PR fortran/42188
338	* primary.c (gfc_match_rvalue): Add a new check that gives better error
339	messages.
340
3412016-12-03  Janus Weil  <janus@gcc.gnu.org>
342
343	PR fortran/58175
344	* resolve.c (gfc_resolve_finalizers): Prevent bogus warning.
345
3462016-12-02  Steven G. Kargl  <kargl@gcc.gnu.org>
347
348	* simplify.c (gfc_convert_char_constant): Free result on error.
349
3502016-12-02  Janus Weil  <janus@gcc.gnu.org>
351	    Steven G. Kargl  <kargl@gcc.gnu.org>
352
353	PR fortran/78618
354	* check.c (gfc_check_rank): Remove ATTRIBUTE_UNUSED.
355	* expr.c (gfc_check_assign): Fix error propagation.
356
3572016-12-01  Elizebeth Punnoose  <elizebeth.punnoose@hpe.com>
358
359	PR fortran/77505
360	* trans-array.c (trans_array_constructor): Treat negative character
361	length as LEN = 0.
362
3632016-12-01  Steven G. Kargl  <kargl@gcc.gnu.org>
364
365	PR fortran/78279
366	* dependency.c (identical_array_ref): Convert gcc_assert to conditional
367	and gfc_internal_error.
368
3692016-11-30  Andre Vehreschild  <vehre@gcc.gnu.org>
370
371	* check.c (gfc_check_allocated): By pass the caf_get call and check on
372	the array.
373	* gfortran.h: Add optional flag to gfc_caf_attr.
374	* gfortran.texi: Document new enum values and _caf_is_present function.
375	* primary.c (caf_variable_attr): Add optional flag to indicate that the
376	expression is reffing a component.
377	(gfc_caf_attr): Likewise.
378	* trans-array.c (gfc_array_deallocate): Handle deallocation mode for
379	coarray deregistration.
380	(gfc_trans_dealloc_allocated): Likewise.
381	(duplicate_allocatable): Use constants instead of
382        creating custom constant tree node of zero or one.  Use gfc_add_modify
383        convenience function.
384	(duplicate_allocatable_coarray): This function is similar to
385	duplicate_allocatable but tailored to handle coarrays.
386	(caf_enabled): Check whether in-derived-type coarray processing is
387	enabled.
388	(caf_in_coarray): Check that in-derived-type coarray processing is
389	enabled and currently in a derived-typed coarray.
390	(gfc_caf_is_dealloc_only): Return true, when deallocate only is
391	desired for components in derived typed coarrays.
392	(structure_alloc_comps): A mode for handling coarrays, that is no
393	longer encode in the purpose.  This makes the use cases of the
394	routine more flexible without repeating.  Allocatable components in
395	derived type coarrays are now registered only when nullifying an
396	object and allocated before copying data into them.
397	(gfc_nullify_alloc_comp): Use the caf_mode of structure_alloc_comps
398	now.
399	(gfc_deallocate_alloc_comp): Likewise.
400	(gfc_deallocate_alloc_comp_no_caf): Likewise.
401	(gfc_reassign_alloc_comp_caf): Likewise.
402	(gfc_copy_alloc_comp): Likewise.
403	(gfc_copy_only_alloc_comp): Likewise.
404	(gfc_alloc_allocatable_for_assignment): Make use to the cheaper way of
405	reallocating a coarray without deregistering and reregistering it.
406	(gfc_trans_deferred_array): Initialize the coarray token correctly for
407	deferred variables and tear them down on exit.
408	* trans-array.h: Change some prototypes to add the coarray (de-)
409	registration modes.  Add prototype for checking if deallocate only is
410	selected for components in derived typed coarrays.
411	* trans-decl.c (gfc_build_builtin_function_decls): Generate the
412	declarations for the changed/new caf-lib routines.
413	(gfc_trans_deferred_vars): Ensure deferred variables are (de-)
414	registered correctly on procedure entry/exit.
415	(generate_coarray_sym_init): Use constants.
416	* trans-expr.c (gfc_conv_procedure_call): Propagate coarray allocation
417	modes accordingly.
418	(gfc_trans_alloc_subarray_assign): Likewise.
419	(gfc_trans_subcomponent_assign): Likewise.
420	(gfc_trans_structure_assign): Generate code to register the components
421	of a derived type coarray prior to initialization.
422	(gfc_conv_structure): Set flag that the structure is in a coarray.
423	(gfc_trans_scalar_assign): Add flag to indicate being in a coarray and
424	set the structure_alloc_comps modes correctly.
425	(gfc_trans_assignment_1): Figure being in a coarray expression.
426	* trans-intrinsic.c (gfc_conv_intrinsic_caf_get): Adapt to new
427	structure_alloc_comps interface.
428	(conv_caf_send): Use the old API as long as possible.
429	(trans_caf_is_present): Generate code to check whether an allocatable
430	component in a derived typed coarray is allocated on a remote image.
431	(caf_this_image_ref): Return true, when only reffing this image.
432	(gfc_conv_allocated): Convert allocated queries on allocatable
433	components to the library API.
434	(conv_intrinsic_move_alloc): Adapt to new interface of
435	structure_alloc_comps.
436	* trans-openmp.c (gfc_walk_alloc_comps): Likewise.
437	(gfc_omp_clause_assign_op): Likewise.
438	(gfc_omp_clause_dtor): Likewise.
439	* trans-stmt.c (gfc_trans_deallocate): Figure which mode to use when
440	deallocating allocatable components in derived type coarras.
441	* trans.c (gfc_allocate_using_lib): Renamed to
442	gfc_allcate_using_caf_lib.
443	(gfc_allocate_allocatable): Set the registration mode/type of caf-
444	register calls adapting to all the possible allocatable objects.
445	(gfc_deallocate_with_status): Add deregistration mode for allocatable
446	components in derived type coarrays.
447	(gfc_deallocate_scalar_with_status): Likewise.
448	* trans.h (enum gfc_coarray_type): Renamed to gfc_coarray_regtype to
449	avoid collision with gfc_coarray_deregtype.
450
4512016-11-30  Janus Weil  <janus@gcc.gnu.org>
452
453	PR fortran/78593
454	* primary.c (gfc_match_varspec): Check if sym is non-null to avoid ICE.
455
4562016-11-30  Janus Weil  <janus@gcc.gnu.org>
457
458	PR fortran/78592
459	* interface.c (gfc_find_specific_dtio_proc): Rearrange code to avoid
460	dereferencing a null pointer.
461
4622016-11-30  Janus Weil  <janus@gcc.gnu.org>
463
464	PR fortran/78573
465	* decl.c (build_struct): On error, return directly and do not build
466	class symbol.
467
4682016-11-29  Tobias Burnus  <burnus@net-b.de>
469
470	PR fortran/58175
471	* resolve.c (gfc_resolve_finalizers): Properly detect scalar finalizers.
472
4732016-11-27  Paul Thomas  <pault@gcc.gnu.org>
474
475	PR fortran/78474
476	* module.c (gfc_match_submodule): If there is more than one
477	colon, it is a syntax error.
478
479	PR fortran/78331
480	* module.c (gfc_use_module): If an smod file does not exist it
481	is either because the module does not have a module procedure
482	interface or there is an error in the module.
483
4842016-11-25  Janne Blomqvist  <jb@gcc.gnu.org>
485
486	* intrinsic.texi: Fix ptrdiff_t typo in ISO_C_BINDING constants
487	table.
488
4892016-11-25  Janus Weil  <janus@gcc.gnu.org>
490
491	PR fortran/60853
492	* interface.c (gfc_compare_interfaces): Remove bad special case for
493	unlimited polymorphism. Refactor for loop.
494
4952016-11-25  Andre Vehreschild  <vehre@gcc.gnu.org>
496	    Paul Thomas  <pault@gcc.gnu.org>
497
498	PR fortran/78293
499	* trans-expr.c (gfc_conv_procedure_call): Prepend deallocation
500	of alloctable components to post, rather than adding to
501	se->post.
502	* trans-stmt.c (gfc_trans_allocate): Move deallocation of expr3
503	allocatable components so that all expr3s are visited.
504
5052016-11-25  Paul Thomas  <pault@gcc.gnu.org>
506
507	PR fortran/78293
508	* gfortran.dg/allocatable_function_10.f90: New test.
509	* gfortran.dg/class_array_15.f03: Increase builtin_free count
510	from 11 to 12.
511
5122016-11-24  Steven G. Kargl  <kargl@gcc.gnu.org>
513
514	PR fortran/78500
515	* expr.c (gfc_check_vardef_contextm): Fix NULL pointer dereference.
516	* interface.c (matching_typebound_op): Ditto.
517
5182016-11-23  Steven G. Kargl  <kargl@gcc.gnu.org>
519
520	PR fortran/78297
521	* trans-common.c (finish_equivalences): Do not dereference a NULL pointer.
522
5232016-11-23  Martin Jambor  <mjambor@suse.cz>
524
525	* f95-lang.c (DEF_HSA_BUILTIN): New macro.
526
5272016-11-22  Steven G. Kargl  <kargl@gcc.gnu.org>
528
529	PR fortran/78479
530	* expr.c (gfc_apply_init):  Allocate a charlen if needed.
531
5322016-11-22  Janus Weil  <janus@gcc.gnu.org>
533
534	PR fortran/78443
535	* class.c (add_proc_comp): Add a vtype component for non-overridable
536	procedures that are overriding.
537
5382016-11-20  Harald Anlauf  <anlauf@gmx.de>
539
540	PR fortran/69741
541	* resolve.c (gfc_resolve_forall): Check for nonscalar index variables.
542
5432016-11-20  Andre Vehreschild  <vehre@gcc.gnu.org>
544
545	PR fortran/78395
546	* resolve.c (resolve_typebound_function): Prevent stripping of refs,
547	when the base-expression is a class' typed one.
548
5492016-11-18  Richard Sandiford  <richard.sandiford@arm.com>
550 	    Alan Hayward  <alan.hayward@arm.com>
551 	    David Sherwood  <david.sherwood@arm.com>
552
553	* trans-common.c (build_common_decl): Use SET_DECL_MODE.
554	* trans-decl.c (gfc_build_label_decl): Likewise.
555	* trans-types.c (gfc_get_array_descr_info): Likewise.
556
5572016-11-17  Janus Weil  <janus@gcc.gnu.org>
558
559	PR fortran/66227
560	* simplify.c (gfc_simplify_extends_type_of): Fix missed optimization.
561	Prevent over-simplification. Fix a comment. Add a comment.
562
5632016-11-16  Steven G. Kargl  <kargl@gcc.gnu.org>
564
565	PR fortran/58001
566	* io.c (next_char_not_space): Update handling of a 'tab' in a FORMAT.
567 	(format_lex): Adjust invocations of next_char_not_space().
568
5692016-11-16  Andre Vehreschild  <vehre@gcc.gnu.org>
570
571	PR fortran/78356
572	* class.c (gfc_is_class_scalar_expr): Prevent taking an array ref for
573	a component ref.
574	* trans-expr.c (gfc_trans_assignment_1): Ensure a reference to the
575	object to copy is generated, when assigning class objects.
576
5772016-11-14  Thomas Koenig  <tkoenig@gcc.gnu.org>
578
579	* dump-parse-tree.c (show_code):  Add prototype.
580	(gfc_debug_code):  New function.
581	(show_code_node):  Add space after SELECT TYPE.
582
5832016-11-14  Janus Weil  <janus@gcc.gnu.org>
584
585	PR fortran/78300
586	* resolve.c (resolve_procedure_interface): Properly handle CLASS-valued
587	function results.
588
5892016-11-13  Janus Weil  <janus@gcc.gnu.org>
590
591	PR fortran/60952
592	* decl.c (match_procedure_in_type): Apply the FL_PROCEDURE attribute
593	to the target procedure.
594
5952016-11-13  Janus Weil  <janus@gcc.gnu.org>
596
597	PR fortran/66366
598	* resolve.c (resolve_component): Move check for C437
599	to ...
600	* decl.c (build_struct): ... here. Fix indentation.
601
6022016-11-12  Janus Weil  <janus@gcc.gnu.org>
603
604	PR fortran/77501
605	* class.c (gfc_find_typebound_intrinsic_op): Remove an unnecessary
606	assert and nullification.
607	* decl.c (gfc_match_decl_type_spec): Use gfc_get_tbp_symtree,
608	fix indentation.
609	(gfc_match_generic): Remove an unnecessary assert.
610	Use gfc_get_tbp_symtree to avoid ICE.
611
6122016-11-10  Fritz O. Reese <fritzoreese@gmail.com>
613
614	PR fortran/78277
615	* gcc/fortran/decl.c (gfc_match_data_decl): Gracefully handle bad
616	anonymous structure declarations.
617
6182016-11-10  Fritz O. Reese <fritzoreese@gmail.com>
619
620	* decl.c (get_struct_decl, gfc_match_map, gfc_match_union): Fix
621	whitespace.
622	* interface.c (gfc_compare_union_types): Likewise.
623
6242016-11-10  Jakub Jelinek  <jakub@redhat.com>
625
626	* cpp.c (cpp_define_builtins): Define _OPENMP to 201511 instead
627	of 201307.
628	* gfortran.texi: Mention partial OpenMP 4.5 support.
629	* intrinsic.texi: Update for OpenMP 4.5.
630
631	* openmp.c (gfc_free_omp_clauses): Free critical_name, grainsize,
632	hint, num_tasks, priority and if_exprs.
633	(gfc_match_omp_to_link, gfc_match_omp_depend_sink): New functions.
634	(enum omp_mask1, enum omp_mask2): New enums.
635	Change all OMP_CLAUSE_* defines into enum values, and change their
636	values from ((uint64_t) 1 << bit) to just bit.
637	(omp_mask, omp_inv_mask): New classes.  Add ctors and operators.
638	(gfc_match_omp_clauses): Change mask argument from uint64_t to
639	const omp_mask.  Assert OMP_MASK1_LAST and OMP_MASK2_LAST are
640	at most 64.  Move delete clause handling to where it
641	alphabetically belongs.  Parse defaultmap, grainsize, hint,
642	is_device_ptr, nogroup, nowait, num_tasks, priority, simd, threads
643	and use_device_ptr clauses.  Parse if clause modifier.  Parse map
644	clause always modifier, and release and delete kinds.  Parse ordered
645	clause with argument.  Parse schedule clause modifiers.  Differentiate
646	device clause parsing based on openacc flag.  Guard link clause
647	parsing with openacc flag.  Add support for parsing
648	linear clause modifiers.  Parse depend(source) and depend(sink: ...).
649	Use gfc_match_omp_to_link for to and link clauses in declare target
650	construct.
651	(match_acc): Change mask type from uint64_t to const omp_mask.
652	(OMP_SINGLE_CLAUSES, OMP_ORDERED_CLAUSES,
653	OMP_DECLARE_TARGET_CLAUSES, OMP_TASKLOOP_CLAUSES,
654	OMP_TARGET_ENTER_DATA_CLAUSES, OMP_TARGET_EXIT_DATA_CLAUSES): Define.
655	(OACC_PARALLEL_CLAUSES, OACC_KERNELS_CLAUSES, OACC_DATA_CLAUSES,
656	OACC_LOOP_CLAUSES, OACC_HOST_DATA_CLAUSES, OACC_DECLARE_CLAUSES,
657	OACC_ENTER_DATA_CLAUSES, OACC_EXIT_DATA_CLAUSES, OACC_WAIT_CLAUSES,
658	OACC_ROUTINE_CLAUSES, OMP_PARALLEL_CLAUSES, OMP_DECLARE_SIMD_CLAUSES,
659	OMP_SECTIONS_CLAUSES, OMP_TEAMS_CLAUSES, OMP_DISTRIBUTE_CLAUSES):
660	Replace first or only OMP_CLAUSE_* value in bitset with
661	omp_mask (OMP_CLAUSE_*).
662	(OMP_DO_CLAUSES): Likewise.  Add OMP_CLAUSE_LINEAR.
663	(OMP_SIMD_CLAUSES): Replace first or only OMP_CLAUSE_* value in
664	bitset with omp_mask (OMP_CLAUSE_*).  Add OMP_CLAUSE_SIMDLEN.
665	(OACC_UPDATE_CLAUSES): Replace first or only OMP_CLAUSE_* value in
666	bitset with omp_mask (OMP_CLAUSE_*).  Replace OMP_CLAUSE_OACC_DEVICE
667	with OMP_CLAUSE_DEVICE.
668	(OMP_TASK_CLAUSES): Replace first or only OMP_CLAUSE_* value in
669	bitset with omp_mask (OMP_CLAUSE_*).  Add OMP_CLAUSE_PRIORITY.
670	(OMP_TARGET_CLAUSES): Replace first or only OMP_CLAUSE_* value in
671	bitset with omp_mask (OMP_CLAUSE_*).  Add OMP_CLAUSE_DEPEND,
672	OMP_CLAUSE_NOWAIT, OMP_CLAUSE_PRIVATE, OMP_CLAUSE_FIRSTPRIVATE,
673	OMP_CLAUSE_DEFAULTMAP and OMP_CLAUSE_IS_DEVICE_PTR.
674	(OMP_TARGET_DATA_CLAUSES): Replace first or only OMP_CLAUSE_* value in
675	bitset with omp_mask (OMP_CLAUSE_*).  Add OMP_CLAUSE_USE_DEVICE_PTR.
676	(OMP_TARGET_UPDATE_CLAUSES): Replace first or only OMP_CLAUSE_* value
677	in bitset with omp_mask (OMP_CLAUSE_*).  Add OMP_CLAUSE_DEPEND and
678	OMP_CLAUSE_NOWAIT.
679	(match_omp): Change mask argument from unsigned int to
680	const omp_mask.
681	(gfc_match_omp_critical): Parse optional clauses and use omp_clauses
682	union member instead of omp_name.
683	(gfc_match_omp_end_critical): New function.
684	(gfc_match_omp_distribute_parallel_do): Remove ordered and linear
685	clauses from the mask.
686	(gfc_match_omp_distribute_parallel_do_simd): Use
687	& ~(omp_mask (OMP_CLAUSE_*)) instead of & ~OMP_CLAUSE_*.
688	(gfc_match_omp_target_teams_distribute_parallel_do_simd): Likewise.
689	(gfc_match_omp_teams_distribute_parallel_do_simd): Likewise.
690	(gfc_match_omp_do_simd): Likewise.  Don't remove ordered clause from
691	the mask.
692	(gfc_match_omp_parallel_do_simd): Likewise.
693	(gfc_match_omp_target_teams_distribute_parallel_do): Likewise.
694	(gfc_match_omp_teams_distribute_parallel_do): Likewise.
695	(gfc_match_omp_declare_simd): If not using the form with
696	(proc-name), require space before first clause.  Make (proc-name)
697	optional.  If not present, set proc_name to NULL.
698	(gfc_match_omp_declare_target): Rewritten for OpenMP 4.5.
699	(gfc_match_omp_single): Use OMP_SINGLE_CLAUSES.
700	(gfc_match_omp_task, gfc_match_omp_taskwait, gfc_match_omp_taskyield):
701	Move around to where they belong alphabetically.
702	(gfc_match_omp_target_enter_data, gfc_match_omp_target_exit_data,
703	gfc_match_omp_target_parallel, gfc_match_omp_target_parallel_do,
704	gfc_match_omp_target_parallel_do_simd, gfc_match_omp_target_simd,
705	gfc_match_omp_taskloop, gfc_match_omp_taskloop_simd):
706	New functions.
707	(gfc_match_omp_ordered): Parse clauses.
708	(gfc_match_omp_ordered_depend): New function.
709	(gfc_match_omp_cancel, gfc_match_omp_end_single): Use
710	omp_mask (OMP_CLAUSE_*) instead of OMP_CLAUSE_*.
711	(resolve_oacc_scalar_int_expr): Renamed to ...
712	(resolve_scalar_int_expr): ... this.  Fix up formatting.
713	(resolve_oacc_positive_int_expr): Renamed to ...
714	(resolve_positive_int_expr): ... this.  Fix up formatting.
715	(resolve_nonnegative_int_expr): New function.
716	(resolve_omp_clauses): Adjust callers, use the above functions
717	even for OpenMP clauses, add handling of new OpenMP 4.5 clauses.
718	Require orderedc >= collapse if specified. Handle depend(sink:)
719	and depend(source) restrictions.  Disallow linear clause when
720	orderedc is non-zero.  Diagnose linear clause modifiers when not in
721	declare simd.  Only check for integer type if ref modifier
722	is not used.  Remove diagnostics for required VALUE attribute.
723	Diagnose VALUE attribute with ref or uval modifiers.  Allow
724	non-constant linear-step, if it is a dummy argument alone and is
725	mentioned in uniform clause.  Diagnose map kinds not allowed
726	for various constructs.  Diagnose target {enter ,exit ,}data without
727	any map clauses.  Add dummy OMP_LIST_IS_DEVICE_PTR and
728	OMP_LIST_USE_DEVICE_PTR cases.
729	(gfc_resolve_omp_do_blocks): Set omp_current_do_collapse to orderedc
730	if non-zero.
731	(gfc_resolve_omp_parallel_blocks): Handle new OpenMP 4.5 constructs,
732	replace underscores with spaces in a few construct names.
733	(resolve_omp_do): Set collapse to orderedc if non-zero.  Handle new
734	OpenMP 4.5 constructs.
735	(resolve_oacc_loop_blocks): Call resolve_positive_int_expr instead
736	of resolve_oacc_positive_int_expr.
737	(gfc_resolve_omp_directive): Handle new OpenMP 4.5 constructs.
738	(gfc_resolve_omp_declare_simd): Allow ods->proc_name to be NULL.
739	* trans-openmp.c (gfc_omp_scalar_p): New function.
740	(doacross_steps): New variable.
741	(gfc_trans_omp_clauses): Handle new OpenMP 4.5 clauses and new clause
742	modifiers.
743	(gfc_trans_omp_critical): Adjust EXEC_OMP_CRITICAL handling.
744	(gfc_trans_omp_do): Handle doacross loops.  Clear sched_simd flag.
745	Handle EXEC_OMP_TASKLOOP.
746	(gfc_trans_omp_ordered): Translate omp clauses, allow NULL
747	code->block.
748	(GFC_OMP_SPLIT_TASKLOOP, GFC_OMP_MASK_TASKLOOP): New enum constants.
749	(gfc_split_omp_clauses): Copy orderedc together with ordered.  Change
750	firstprivate and lastprivate handling for OpenMP 4.5.
751	Handle EXEC_OMP_TARGET_SIMD, EXEC_OMP_TARGET_PARALLEL{,_DO,_DO_SIMD}
752	and EXEC_OMP_TASKLOOP{,_SIMD}.  Add handling for new OpenMP 4.5
753	clauses and clause modifiers and handle if clause without/with
754	modifiers.
755	(gfc_trans_omp_teams): Add omp_clauses argument, add it to other
756	teams clauses.  Don't wrap into OMP_TEAMS if -fopenmp-simd.
757	(gfc_trans_omp_target): For -fopenmp, translate num_teams and
758	thread_limit clauses on combined target teams early and pass to
759	gfc_trans_omp_teams.  Set OMP_TARGET_COMBINED if needed.
760	Handle EXEC_OMP_TARGET_PARALLEL{,_DO,_DO_SIMD} and
761	EXEC_OMP_TARGET_SIMD.
762	(gfc_trans_omp_taskloop, gfc_trans_omp_target_enter_data,
763	gfc_trans_omp_target_exit_data): New functions.
764	(gfc_trans_omp_directive): Handle EXEC_OMP_TARGET_{ENTER,EXIT}_DATA
765	EXEC_OMP_TASKLOOP{,_SIMD}, EXEC_OMP_TARGET_PARALLEL{,_DO,_DO_SIMD}
766	and EXEC_OMP_TARGET_SIMD.  Adjust gfc_trans_omp_teams caller.
767	* symbol.c (check_conflict): Handle omp_declare_target_link.
768	(gfc_add_omp_declare_target_link): New function.
769	(gfc_copy_attr): Copy omp_declare_target_link.
770	* dump-parse-tree.c (show_omp_namelist): Handle OMP_DEPEND_SINK_FIRST
771	depend_op.  Print linear clause modifiers.
772	(show_omp_clauses): Adjust for OpenMP 4.5 clause changes.
773	(show_omp_node): Print clauses for EXEC_OMP_ORDERED.  Allow NULL
774	c->block for EXEC_OMP_ORDERED.  Formatting fixes.  Adjust handling of
775	EXEC_OMP_CRITICAL, handle new OpenMP 4.5 constructs and some
776	forgotten OpenMP 4.0 constructs.
777	(show_code_node): Handle new OpenMP 4.5 constructs and some forgotten
778	OpenMP 4.0 constructs.
779	* gfortran.h (symbol_attribute): Add omp_declare_target_link bitfield.
780	(struct gfc_omp_namelist): Add u.common and u.linear_op fields.
781	(struct gfc_common_head): Change omp_declare_target into bitfield.
782	Add omp_declare_target_link bitfield.
783	(gfc_add_omp_declare_target_link): New prototype.
784	(enum gfc_statement): Add ST_OMP_TARGET_PARALLEL,
785	ST_OMP_END_TARGET_PARALLEL, ST_OMP_TARGET_PARALLEL_DO,
786	ST_OMP_END_TARGET_PARALLEL_DO, ST_OMP_TARGET_PARALLEL_DO_SIMD,
787	ST_OMP_END_TARGET_PARALLEL_DO_SIMD, ST_OMP_TARGET_ENTER_DATA,
788	ST_OMP_TARGET_EXIT_DATA, ST_OMP_TARGET_SIMD, ST_OMP_END_TARGET_SIMD,
789	ST_OMP_TASKLOOP, ST_OMP_END_TASKLOOP, ST_OMP_TASKLOOP_SIMD,
790	ST_OMP_END_TASKLOOP_SIMD and ST_OMP_ORDERED_DEPEND.
791	(enum gfc_omp_depend_op): Add OMP_DEPEND_SINK_FIRST and
792	OMP_DEPEND_SINK.
793	(enum gfc_omp_linear_op): New.
794	(struct gfc_omp_clauses): Add critical_name, depend_source,
795	orderedc, defaultmap, nogroup, sched_simd, sched_monotonic,
796	sched_nonmonotonic, simd, threads, grainsize, hint, num_tasks,
797	priority and if_exprs fields.
798	(enum gfc_exec_op): Add EXEC_OMP_END_CRITICAL,
799	EXEC_OMP_TARGET_ENTER_DATA, EXEC_OMP_TARGET_EXIT_DATA,
800	EXEC_OMP_TARGET_PARALLEL, EXEC_OMP_TARGET_PARALLEL_DO,
801	EXEC_OMP_TARGET_PARALLEL_DO_SIMD, EXEC_OMP_TARGET_SIMD,
802	EXEC_OMP_TASKLOOP, EXEC_OMP_TASKLOOP_SIMD.
803	(enum gfc_omp_map_op): Add OMP_MAP_RELEASE,
804	OMP_MAP_ALWAYS_TO, OMP_MAP_ALWAYS_FROM and OMP_MAP_ALWAYS_TOFROM.
805	(OMP_LIST_IS_DEVICE_PTR, OMP_LIST_USE_DEVICE_PTR): New.
806	(enum gfc_omp_if_kind): New.
807	* module.c (enum ab_attribute): Add AB_OMP_DECLARE_TARGET_LINK.
808	(attr_bits): Add AB_OMP_DECLARE_TARGET_LINK entry.
809	(mio_symbol_attribute): Save and restore omp_declare_target_link bit.
810	* trans.h (gfc_omp_scalar_p): New prototype.
811	* frontend-passes.c (gfc_code_walker): Handle new OpenMP 4.5
812	expressions.
813	* trans.c (trans_code): Handle new OpenMP 4.5 constructs.
814	* resolve.c (gfc_resolve_blocks): Likewise.
815	(gfc_resolve_code): Likewise.
816	* f95-lang.c (LANG_HOOKS_OMP_SCALAR_P): Redefine to gfc_omp_scalar_p.
817	(gfc_attribute_table): Add "omp declare target link".
818	* st.c (gfc_free_statement): Handle EXEC_OMP_END_CRITICAL like
819	EXEC_OMP_CRITICAL before, free clauses for EXEC_OMP_CRITICAL
820	and new OpenMP 4.5 constructs.  Free omp clauses even for
821	EXEC_OMP_ORDERED.
822	* match.c (match_exit_cycle): Rename collapse variable to count,
823	set it to orderedc if non-zero, instead of collapse.
824	* trans-decl.c (add_attributes_to_decl): Add "omp declare target link"
825	instead of "omp declare target" for omp_declare_target_link.
826	* trans-common.c (build_common_decl): Likewise.
827	* match.h (gfc_match_omp_target_enter_data,
828	gfc_match_omp_target_exit_data, gfc_match_omp_target_parallel,
829	gfc_match_omp_target_parallel_do,
830	gfc_match_omp_target_parallel_do_simd, gfc_match_omp_target_simd,
831	gfc_match_omp_taskloop, gfc_match_omp_taskloop_simd,
832	gfc_match_omp_end_critical, gfc_match_omp_ordered_depend): New
833	prototypes.
834	* parse.c (decode_omp_directive): Use gfc_match_omp_end_critical
835	instead of gfc_match_omp_critical for !$omp end critical.
836	Handle new OpenMP 4.5 constructs.  If ordered directive has
837	depend clause as the first of the clauses, use
838	gfc_match_omp_ordered_depend and ST_OMP_ORDERED_DEPEND instead of
839	gfc_match_omp_ordered and ST_OMP_ORDERED.
840	(case_executable): Add ST_OMP_TARGET_ENTER_DATA,
841	ST_OMP_TARGET_EXIT_DATA and ST_OMP_ORDERED_DEPEND cases.
842	(case_exec_markers): Add ST_OMP_TARGET_PARALLEL,
843	ST_OMP_TARGET_PARALLEL_DO, ST_OMP_TARGET_PARALLEL_DO_SIMD,
844	ST_OMP_TARGET_SIMD, ST_OMP_TASKLOOP and ST_OMP_TASKLOOP_SIMD cases.
845	(gfc_ascii_statement): Handle new OpenMP 4.5 constructs.
846	(parse_omp_do): Handle ST_OMP_TARGET_PARALLEL_DO,
847	ST_OMP_TARGET_PARALLEL_DO_SIMD, ST_OMP_TASKLOOP and
848	ST_OMP_TASKLOOP_SIMD.
849	(parse_omp_structured_block): Handle EXEC_OMP_END_CRITICAL instead
850	of EXEC_OMP_CRITICAL, adjust for EXEC_OMP_CRITICAL having omp clauses
851	now.
852	(parse_executable): Handle ST_OMP_TARGET_PARALLEL,
853	ST_OMP_TARGET_PARALLEL_DO, ST_OMP_TARGET_PARALLEL_DO_SIMD,
854	ST_OMP_TASKLOOP and ST_OMP_TASKLOOP_SIMD.
855
8562016-11-09  Mikael Morin  <mikael@gcc.gnu.org>
857	    Janus Weil  <janus@gcc.gnu.org>
858
859	PR fortran/46459
860	* interface.c (compare_actual_formal): Add safety checks to avoid ICE.
861
8622016-11-09  Fritz O. Reese <fritzoreese@gmail.com>
863
864	PR fortran/78259
865	* trans-expr.c (gfc_trans_subcomponent_assign): Guard against NULL
866	values.
867
8682016-11-09  Steven G. Kargl  <kargl@gcc.gnu.org>
869	    Janus Weil  <janus@gcc.gnu.org>
870
871	PR fortran/60777
872	* expr.c (external_spec_function): Allow recursive specification
873	functions in F03.
874
8752016-11-09  Paul Thomas  <pault@gcc.gnu.org>
876
877	* check.c (gfc_check_move_alloc): Prevent error that avoids
878	aliasing between to and from arguments from rejecting valid
879	code.
880
8812016-11-09  Janus Weil  <janus@gcc.gnu.org>
882
883	PR fortran/71894
884	* class.c (gfc_add_component_ref): Add safety checks to avoid ICE.
885
8862016-11-08  Janus Weil  <janus@gcc.gnu.org>
887
888	PR fortran/68440
889	* expr.c (check_alloc_comp_init): Loosen an assert.
890	* resolve.c (resolve_fl_parameter): Reject class parameters.
891
8922016-11-08  Janus Weil  <janus@gcc.gnu.org>
893
894	PR fortran/77596
895	* expr.c (gfc_check_pointer_assign): Add special check for procedure-
896	pointer component with absent interface.
897
8982016-11-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
899
900	PR fortran/78226
901	* expr.c (gfc_generate_initializer):  Add where to EXPR_NULL
902	statement.
903	* iresolve.c (gfc_resolve_extends_type_of):  Add where to
904	both arguments of the function.
905	* resolve.c (resolve_select_type):  Add where to the
906	second argument of the new statement.
907
9082016-11-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
909
910	PR fortran/78226
911	* match.c (gfc_match_select_type):  Add where for expr1.
912	* resolve.c (resolev_select_type): Add where for expr1 of new
913	statement.
914
9152016-11-06  Thomas Koenig  <tkoenig@gcc.gnu.org>
916
917	PR fortran/78226
918	resolve.c (build_loc_call): Add location to return value.
919
9202016-11-06  Andre Vehreschild  <vehre@gcc.gnu.org>
921
922	* expr.c (is_non_empty_structure_constructor): New function to detect
923	non-empty structure constructor.
924	(gfc_has_default_initializer): Analyse initializers.
925	* resolve.c (cond_init): Removed.
926	(resolve_allocate_expr): Removed dead code.  Moved invariant code out
927	of the loop over all objects to allocate.
928	(resolve_allocate_deallocate): Added the invariant code remove from
929	resolve_allocate_expr.
930	* trans-array.c (gfc_array_allocate): Removed nullify of structure
931	components in favour of doing this in gfc_trans_allocate for both
932	scalars and arrays in the same place.
933	* trans-expr.c (gfc_trans_init_assign): Always using _vptr->copy for
934	class objects.
935	* trans-stmt.c (allocate_get_initializer): Get the initializer
936	expression for object allocated.
937	(gfc_trans_allocate): Nullify a derived type only, when no SOURCE=
938	or MOLD= is present preventing duplicate work.  Moved the creation
939	of the init-expression here to prevent code for conditions that
940	can not occur on freshly allocated object, like checking for the need
941	to free allocatable components.
942
9432016-11-06  Thomas Koenig  <tkoenig@gcc.gnu.org>
944
945	PR fortran/78221
946	* arith.c (gfc_complex2real):  Change gfc_warning_now to
947	gfc_warning.
948
9492016-11-05  Paul Thomas  <pault@gcc.gnu.org>
950
951	* check.c (gfc_check_move_alloc): Introduce error to prevent
952	aliasing between to and from arguments.
953
9542016-11-05  Janus Weil  <janus@gcc.gnu.org>
955	    Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
956
957	PR fortran/69495
958	* invoke.texi: Mention -Wpedantic as an alias of -pedantic.
959	* check.c (gfc_check_transfer): Mention responsible flag in warning
960	message.
961	* frontend-passes.c (do_warn_function_elimination): Ditto.
962	* resolve.c (resolve_elemental_actual): Ditto.
963	(resolve_operator): Ditto.
964	(warn_unused_fortran_label): Ditto.
965	* trans-common.c (translate_common): Ditto.
966
9672016-11-05  Paul Thomas  <pault@gcc.gnu.org>
968
969	PR fortran/67564
970	* trans-expr.c (gfc_conv_class_to_class): Return _len component
971	of unlimited polymorphic entities.
972
9732016-11-04  Paul Thomas  <pault@gcc.gnu.org>
974
975	PR fortran/64933
976	* primary.c (gfc_match_varspec): If selector expression is
977	unambiguously an array, make sure that the associate name
978	is an array and has an array spec. Modify the original
979	condition for doing this to exclude character types.
980
9812016-11-03  Fritz Reese <fritzoreese@gmail.com>
982
983	* gfortran.texi: Document.
984	* gfortran.h (gfc_dt): New field default_exp.
985	* primary.c (match_real_constant): Default exponent with -fdec.
986	* io.c (match_io): Set dt.default_exp with -fdec.
987	* ioparm.def (IOPARM_dt_default_exp): New.
988	* trans-io.c (build_dt): Set IOPARM_dt_default_exp with -fdec.
989
9902016-11-03  Fritz O. Reese <fritzoreese@gmail.com>
991
992	* decl.c (gfc_match_parameter): Allow omitted '()' with -std=legacy.
993	* parse.c (decode_statement): Match "parameter" before assignments.
994	* gfortran.texi: Document.
995
9962016-11-02  Fritz O. Reese <fritzoreese@gmail.com>
997
998	* lang.opt, invoke.texi: New argument -Wargument-mismatch.
999	* interface.c (compare_parameter, compare_actual_formal,
1000	gfc_check_typebound_override, argument_rank_mismatch): Control argument
1001	mismatch warnings with -Wargument-mismatch.
1002	* resolve.c (resolve_structure_cons, resolve_global_procedure): Ditto.
1003
10042016-11-02  Fritz Reese <fritzoreese@gmail.com>
1005
1006	* gfortran.h (gfc_error): New declaration for gfc_error with 'opt'.
1007	* error.c (gfc_error): Add optional 'opt' argument.
1008	* error.c (gfc_notify_std): Call fully-qualified gfc_error.
1009
10102016-11-01  Thomas Koenig  <tkoenig@gcc.gnu.org>
1011
1012	PR fortran/78178
1013	* match.c (match_simple_where):  Fill in locus for assigment
1014	in simple WHERE statement.
1015
10162016-11-01  Thomas Koenig  <tkoenig@gcc.gnu.org>
1017
1018	PR fortran/69544
1019	* match.c (gfc_match_where):  Fill in locus for assigment
1020	in simple WHERE statement.
1021
10222016-10-31  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1023
1024	PR fortran/54679
1025	* io.c (check_format): Adjust checks for FMT_L to treat a zero
1026	width as an extension, giving warnings or error as appropriate.
1027	Improve messages.
1028
10292016-10-31  Jakub Jelinek  <jakub@redhat.com>
1030
1031	* trans-types.c (gfc_get_array_descr_info): For -gdwarf-5 or
1032	-gno-strict-dwarf, handle assumed rank arrays the way dwarf2out
1033	expects.
1034
10352016-10-30  Thomas Koenig  <tkoenig@gcc.gnu.org>
1036
1037	PR fortran/67219
1038	* arith.c (gfc_int2real):  Change gfc_warning_now
1039	to gfc_warning.
1040	* primary.c (match_complex_constant):  If there
1041	is no comma, throw away any warning which might have
1042	been issued by gfc_int2real.
1043
10442016-10-28  Steven G. Kargl <kargl@gcc.gnu.org>
1045
1046	PR fortran/71891
1047	* symbol.c (gfc_type_compatible): Fix typo.
1048
10492016-10-27  Jakub Jelinek  <jakub@redhat.com>
1050
1051	PR fortran/78026
1052	* parse.c (decode_statement): Don't create namespace for possible
1053	select type here and destroy it afterwards.
1054	(parse_select_type_block): Set gfc_current_ns to new_st.ext.block.ns.
1055	(parse_executable, gfc_parse_file): Formatting fixes.
1056	* match.c (gfc_match_select_type): Create namespace for select type
1057	here, only after matching select type.  Formatting fixes.  Free that
1058	namespace if not returning MATCH_YES, after gfc_undo_symbols,
1059	otherwise remember it in new_st.ext.block.ns and switch to parent
1060	namespace anyway.
1061
10622016-10-27  Fritz Reese  <fritzoreese@gmail.com>
1063
1064	* expr.c (generate_union_initializer, get_union_initializer): New.
1065	* expr.c (component_initializer): Consider BT_UNION specially.
1066	* resolve.c (resolve_structure_cons): Hack for BT_UNION.
1067	* trans-expr.c (gfc_trans_subcomponent_assign): Ditto.
1068	* trans-expr.c (gfc_conv_union_initializer): New.
1069	* trans-expr.c (gfc_conv_structure): Replace UNION handling code with
1070	new function gfc_conv_union_initializer.
1071
10722016-10-26  Steven G. Kargl <kargl@gcc.gnu.org>
1073
1074	PR fortran/78092
1075	* trans-intrinsic.c (gfc_conv_intrinsic_sizeof):  Fix reference to an
1076	array element of type CLASS.
1077
10782016-10-26  Paul Thomas  <pault@gcc.gnu.org>
1079
1080	PR fortran/78108
1081	* resolve.c (resolve_typebound_intrinsic_op): For submodules
1082	suppress the error and return if the same procedure symbol
1083	is added more than once to the interface.
1084
10852016-10-26  Fritz Reese  <fritzoreese@gmail.com>
1086
1087	* frontend-passes.c (gfc_code_walker): Add SHARE and CARRIAGECONTROL.
1088	* io.c (gfc_free_open, gfc_resolve_open, gfc_match_open): Ditto.
1089	* gfortran.h (gfc_open): Add SHARE, CARRIAGECONTROL, and READONLY.
1090	* io.c (io_tag, match_open_element): Ditto.
1091	* ioparm.def: Ditto.
1092	* trans-io.c (gfc_trans_open): Ditto.
1093	* io.c (match_dec_etag, match_dec_ftag): New functions.
1094	* gfortran.texi: Document.
1095
10962016-10-25  Fritz Reese  <fritzoreese@gmail.com>
1097
1098	* gfortran.texi: Document.
1099	* resolve.c (logical_to_bitwise): New function.
1100	* resolve.c (resolve_operator): Wrap operands with logical_to_bitwise.
1101
11022016-10-25  Andre Vehreschild  <vehre@gcc.gnu.org>
1103
1104	PR fortran/72770
1105	* class.c (find_intrinsic_vtab): No longer encode the string length
1106	into vtype's name and use the char's kind for the size instead of
1107	the string_length time the size.
1108	* trans-array.c (gfc_conv_ss_descriptor): For deferred length char
1109	arrays the dynamically sized type needs to be declared.
1110	(build_class_array_ref): Address the i-th array element by multiplying
1111	it with the _vptr->_size and the _len to make sure char arrays are
1112	addressed correctly.
1113	* trans-expr.c (gfc_conv_intrinsic_to_class): Made comment more
1114	precise.
1115
11162016-10-25  Cesar Philippidis  <cesar@codesourcery.com>
1117
1118	* intrinsic.texi (cosd): New mathop.
1119
11202016-10-25  Fritz Reese  <fritzoreese@gmail.com>
1121
1122	* match.c (gfc_match_intrinsic_op): Match ".XOR." with -std=legacy.
1123	* gfortran.texi: Document.
1124
11252016-10-25  Fritz Reese  <fritzoreese@gmail.com>
1126
1127	* primary.c (gfc_match_rvalue): Match %LOC as LOC with -std=legacy.
1128	* gfortran.texi: Document.
1129
11302016-10-25  Fritz Reese  <fritzoreese@gmail.com>
1131
1132	* decl.c (gfc_match_type): New function.
1133	* match.h (gfc_match_type): New function.
1134	* match.c (gfc_match_if): Special case for one-line IFs.
1135	* gfortran.texi: Update documentation.
1136	* parse.c (decode_statement): Invoke gfc_match_type.
1137
11382016-10-25  Fritz Reese  <fritzoreese@gmail.com>
1139
1140	* gfortran.texi: Document.
1141	* gfortran.h (gfc_is_whitespace): Include form feed ('\f').
1142
11432016-10-25  Fritz Reese  <fritzoreese@gmail.com>
1144
1145	* invoke.texi, gfortran.texi: Touch up documentation of -fdec.
1146	* gfortran.h (gfc_option): Move flag_dec_structure out of gfc_option.
1147	* decl.c (match_record_decl, gfc_match_decl_type_spec,
1148	gfc_match_structure_decl): Ditto.
1149	* match.c (gfc_match_member_sep): Ditto.
1150	* options.c (gfc_handle_option): Ditto.
1151	* lang.opt (fdec-structure): Use Fortran Var for flag_dec_structure.
1152	* lang.opt (fdec): Use Fortran Var to create flag_dec.
1153	* options.c (set_dec_flags): With -fdec enable -fcray-pointer,
1154	-fd-lines-as-comments (default), -fdollar-ok, and legacy std flags.
1155
11562016-10-24  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1157
1158	PR fortran/77828
1159	* ioparm.def: Reorder dt parameters to match libgfortran.
1160	* libgfortran.h: Swap definitions of GFC_INTERNAL_UNIT and
1161	GFC_INTERNAL_UNIT4.
1162
11632016-10-24  Steven G. Kargl  <kargl@gcc.gnu.org>
1164
1165	PR fortran/71895
1166	* interface.c (gfc_compare_derived_types):  Convert gcc_assert()
1167	to a gfc_internal_error() to prevent an ICE.
1168
11692016-10-24  Jakub Jelinek  <jakub@redhat.com>
1170
1171	* trans-intrinsic.c (gfc_conv_intrinsic_minmax): Use VAR_P (x)
1172	instead of TREE_CODE (x) == VAR_DECL.
1173	* trans-expr.c (gfc_class_vptr_get, gfc_class_len_get,
1174	gfc_class_len_or_zero_get, gfc_get_vptr_from_expr,
1175	gfc_conv_string_length, conv_base_obj_fcn_val,
1176	gfc_conv_procedure_call, gfc_trans_assignment_1): Likewise.
1177	* trans-openmp.c (gfc_omp_predetermined_sharing,
1178	gfc_omp_disregard_value_expr, gfc_omp_private_debug_clause,
1179	gfc_trans_omp_atomic, gfc_trans_omp_do): Likewise.
1180	* trans-io.c (nml_get_addr_expr): Likewise.
1181	* trans-decl.c (gfc_finish_decl, gfc_build_qualified_array,
1182	gfc_get_symbol_decl, gfc_get_fake_result_decl,
1183	gfc_trans_deferred_vars, gfc_trans_use_stmts,
1184	generate_local_decl): Likewise.
1185	* trans-array.c (trans_array_constructor, trans_array_bound_check,
1186	build_class_array_ref, gfc_array_init_size,
1187	gfc_trans_auto_array_allocation, gfc_trans_g77_array,
1188	gfc_trans_dummy_array_bias, gfc_alloc_allocatable_for_assignment,
1189	gfc_trans_deferred_array): Likewise.
1190	* trans.c (gfc_build_array_ref): Likewise.  Use
1191	VAR_OR_FUNCTION_DECL_P (x) instead of TREE_CODE (x) == VAR_DECL
1192	|| TREE_CODE (x) == FUNCTION_DECL.
1193
11942016-10-23  Steven G. Kargl  <kargl@gcc.gnu.org>
1195
1196	PR fortran/77763
1197	* parse.c (parse_spec): Allow STRUCTURE in BLOCK DATA.  Sort
1198	case labels.
1199
12002016-10-23  Steven G. Kargl  <kargl@gcc.gnu.org>
1201
1202	PR fortran/54730
1203	PR fortran/78033
1204	* array.c (gfc_match_array_constructor): Remove checkpointing
1205	introduced in r196416 (original fix for PR fortran/54730).  Move
1206	initialization to top of function.
1207	* match.c (gfc_match_type_spec): Special case matching for REAL.
1208
12092016-10-23  Paul Thomas  <pault@gcc.gnu.org>
1210
1211	PR fortran/69834
1212	* class.c (gfc_find_derived_vtab): Obtain the gsymbol for the
1213	derived type's module. If the gsymbol is present and the top
1214	level namespace corresponds to a module, use the gsymbol name
1215	space. In the search to see if the vtable exists, try the gsym
1216	namespace first.
1217	* dump-parse-tree (show_code_node): Modify select case dump to
1218	show select type construct.
1219	* resolve.c (build_loc_call): New function.
1220	(resolve_select_type): Add check for repeated type is cases.
1221	Retain selector expression and use it later instead of expr1.
1222	Exclude deferred length TYPE IS cases and emit error message.
1223	Store the address for the vtable in the 'low' expression and
1224	the hash value in the 'high' expression, for each case. Do not
1225	call resolve_select.
1226	* trans.c(trans_code) : Call gfc_trans_select_type.
1227	* trans-stmt.c (gfc_trans_select_type_cases): New function.
1228	(gfc_trans_select_type): New function.
1229	* trans-stmt.h : Add prototype for gfc_trans_select_type.
1230
12312016-10-22  Thomas Koenig  <tkoenig@gcc.gnu.org>
1232
1233	PR fortran/78021
1234	* gfc_compare_functions:  Strings with different lengths in
1235	argument lists compare unequal.
1236
12372016-10-22  Andre Vehreschild  <vehre@gcc.gnu.org>
1238
1239	PR fortran/43366
1240	PR fortran/51864
1241	PR fortran/57117
1242	PR fortran/61337
1243	PR fortran/61376
1244	* primary.c (gfc_expr_attr): For transformational functions on classes
1245	get the attrs from the class argument.
1246	* resolve.c (resolve_ordinary_assign): Remove error message due to
1247	feature implementation.  Rewrite POINTER_ASSIGNS to ordinary ones when
1248	the right-hand side is scalar class object (with some restrictions).
1249	* trans-array.c (trans_array_constructor): Create the temporary from
1250	class' inner type, i.e., the derived type.
1251	(build_class_array_ref): Add support for class array's storage of the
1252	class object or the array descriptor in the decl saved descriptor.
1253	(gfc_conv_expr_descriptor): When creating temporaries for class objects
1254	add the class object's handle into the decl saved descriptor.
1255	(structure_alloc_comps): Use the common way to get the _data component.
1256	(gfc_is_reallocatable_lhs): Add notion of allocatable class objects.
1257	* trans-expr.c (gfc_find_and_cut_at_last_class_ref): Remove the only ref
1258	only when the expression's type is BT_CLASS.
1259	(gfc_trans_class_init_assign): Correctly handle class arrays.
1260	(gfc_trans_class_assign): Joined into gfc_trans_assignment_1.
1261	(gfc_conv_procedure_call): Support for class types as arguments.
1262	(trans_get_upoly_len): For unlimited polymorphics retrieve the _len
1263	component's tree.
1264	(trans_class_vptr_len_assignment): Catch all ways to assign the _vptr
1265	and _len components of a class object correctly.
1266	(pointer_assignment_is_proc_pointer): Identify assignments of
1267	procedure pointers.
1268	(gfc_trans_pointer_assignment): Enhance support for class object pointer
1269	assignments.
1270	(gfc_trans_scalar_assign): Removed assert.
1271	(trans_class_assignment): Assign to a class object.
1272	(gfc_trans_assignment_1): Treat class objects correctly.
1273	(gfc_trans_assignment): Propagate flags to trans_assignment_1.
1274	* trans-stmt.c (gfc_trans_allocate): Use gfc_trans_assignment now
1275	instead of copy_class_to_class.
1276	* trans-stmt.h: Function prototype removed.
1277	* trans.c (trans_code): Less special casing for class objects.
1278	* trans.h: Added flags to gfc_trans_assignment () prototype.
1279
12802016-10-21  Paul Thomas  <pault@gcc.gnu.org>
1281
1282	PR fortran/69566
1283	* resolve.c (fixup_array_ref): New function.
1284	(resolve_select_type): Gather up the rank and array reference,
1285	if any, from the selector. Fix up the 'associate name' and the
1286	'associate entities' as necessary.
1287	* trans-expr.c (gfc_conv_class_to_class): If the symbol backend
1288	decl is a FUNCTION_DECL, use the 'fake_result_decl' instead.
1289
12902016-10-20  Steven G. Kargl  <kargl@gcc.gnu.org>
1291
1292	* array.c (gfc_match_array_constructor): Remove set, but unused
1293	variable.
1294
12952016-10-20  Andre Vehreschild  <vehre@gcc.gnu.org>
1296
1297	* class.c (gfc_build_class_symbol): Set the kind of _len to
1298	gfc_charlen_int_kind to catch changes of the charlen kind.
1299
13002016-10-17  Steven G. Kargl  <kargl@gcc.gnu.org>
1301
1302	PR fortran/77978
1303	* match.c (gfc_match_stopcode): Fix error reporting for several
1304	deficiencies in matching stop-codes.
1305
13062016-10-17  Paul Thomas  <pault@gcc.gnu.org>
1307
1308	PR fortran/61420
1309	PR fortran/78013
1310	* resolve.c (resolve_variable): Obtain the typespec for a
1311	variable expression, when the variable is a function result
1312	that is a procedure pointer.
1313
13142016-10-16  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1315
1316	PR fortran/48298
1317	* trans-io.c (transfer_expr): Ignore dtio procedures for inquire
1318	with iolength.
1319
13202016-10-15  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1321
1322	PR fortran/77972
1323	* scanner.c (gfc_next_char_literal): If nextc is null do not
1324	decrement the pointer and call the diagnostics.
1325
13262016-10-14  Andre Vehreschild  <vehre@gcc.gnu.org>
1327
1328	* resolve.c (resolve_symbol): Add unimplemented message for
1329	polymorphic types with allocatable/pointer components and coarray=lib.
1330
13312016-10-13  Thomas Preud'homme  <thomas.preudhomme@arm.com>
1332
1333	* trans-intrinsic.c: Include memmodel.h.
1334
13352016-10-13  Andre Vehreschild  <vehre@gcc.gnu.org>
1336
1337	PR fortran/72832
1338	* trans-expr.c (gfc_copy_class_to_class): Add generation of
1339	runtime array bounds check.
1340	* trans-intrinsic.c (gfc_conv_intrinsic_size): Add a crutch to
1341	get the descriptor of a function returning a class object.
1342	* trans-stmt.c (gfc_trans_allocate): Use the array spec on the
1343	array to allocate instead of the array spec from source=.
1344
13452016-10-12  Andre Vehreschild  <vehre@gcc.gnu.org>
1346
1347	* trans-expr.c (gfc_find_and_cut_at_last_class_ref): Fixed style.
1348	(gfc_trans_class_init_assign): Same.
1349	(gfc_conv_procedure_call): Same.
1350	(gfc_trans_assignment_1): Same.
1351	* trans-stmt.c (gfc_trans_allocate): Same.
1352
13532016-10-11  Jakub Jelinek  <jakub@redhat.com>
1354
1355	* iresolve.c (is_trig_resolved, resolve_trig_call): Formatting fixes.
1356	* simplify.c (simplify_trig_call, degrees_f, radians_f,
1357	gfc_simplify_atrigd, gfc_simplify_cotan): Likewise.
1358
13592016-10-11  Steven G. Kargl  <kargl@gcc.gnu.org>
1360
1361	PR fortran/77942
1362	* simplify.c (gfc_simplify_cshift): Check for zero.
1363
13642016-10-11  Fritz Reese  <fritzoreese@gmail.com>
1365
1366	* iresolve.c (get_radians, get_degrees): Fix sloppy commit.
1367	* simplify.c (degrees_f, radians_f): Ditto.
1368
13692016-10-11  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1370
1371	* simplify.c (radians_f): Fix mpfr_mod.
1372	* ireolce.c (get_degrees): Declare tmp.
1373
13742016-10-11  Fritz Reese  <fritzoreese@gmail.com>
1375
1376	* lang.opt: New flag -fdec-math.
1377	* options.c (set_dec_flags): Enable with -fdec.
1378	* invoke.texi, gfortran.texi, intrinsic.texi: Update documentation.
1379	* intrinsics.c (add_functions, do_simplify): New intrinsics
1380	with -fdec-math.
1381	* gfortran.h (gfc_isym_id): New isym GFC_ISYM_COTAN.
1382	* gfortran.h (gfc_resolve_atan2d, gfc_resolve_cotan,
1383	gfc_resolve_trigd, gfc_resolve_atrigd): New prototypes.
1384	* iresolve.c (resolve_trig_call, get_degrees, get_radians,
1385	is_trig_resolved, gfc_resolve_cotan, gfc_resolve_trigd,
1386	gfc_resolve_atrigd, gfc_resolve_atan2d): New functions.
1387	* intrinsics.h (gfc_simplify_atan2d, gfc_simplify_atrigd,
1388	gfc_simplify_cotan, gfc_simplify_trigd): New prototypes.
1389	* simplify.c (simplify_trig_call, degrees_f, radians_f,
1390	gfc_simplify_cotan, gfc_simplify_trigd, gfc_simplify_atrigd,
1391	gfc_simplify_atan2d): New functions.
1392
13932016-10-10  Thomas Koenig  <tkoenig@gcc.gnu.org>
1394
1395	PR fortran/77915
1396	* frontend-passes.c (inline_matmul_assign):  Return early if
1397	inside a FORALL statement.
1398
13992016-10-07  Fritz Reese  <fritzoreese@gmail.com>
1400
1401	* interface.c (compare_components): Check charlen for BT_CHAR.
1402
14032016-10-07  Steven G. Kargl  <kargl@gcc.gnu.org>
1404
1405	PR fortran/77406
1406	* interface.c (gfc_compare_interfaces): Fix detection of ambiguous
1407	interface involving alternate return.
1408	(check_interface1): Improve error message and loci.
1409
14102016-10-06  Louis Krupp  <louis.krupp@zoho.com>
1411
1412	PR fortran/69955
1413	* trans-array.c (gfc_conv_expr_descriptor): Don't allocate
1414	components if it's not necessary.
1415
14162016-10-05  Louis Krupp  <louis.krupp@zoho.com>
1417
1418	PR fortran/57910
1419	* trans-expr.c (gfc_add_interface_mapping): Don't try to
1420	dereference call-by-value scalar argument.
1421
14222016-10-05  Steven G. Kargl  <kargls@gcc.gnu.org>
1423
1424	PR fortran/58991
1425	PR fortran/58992
1426	* resolve.c (resolve_assoc_var):  Fix CHARACTER type-spec for a
1427	selector in ASSOCIATE.
1428	(resolve_fl_variable): Skip checks for an ASSOCIATE variable.
1429
14302016-10-05  Fritz Reese  <fritzoreese@gmail.com>
1431
1432	* interface.c (gfc_compare_types): Don't compare BT_UNION components
1433	until we know they're both UNIONs.
1434	* interface.c (gfc_compare_union_types): Guard against empty
1435	components.
1436
14372016-10-05  Louis Krupp  <louis.krupp@zoho.com>
1438
1439	PR fortran/67524
1440	* resolve.c (resolve_symbol): Don't apply default type rules to
1441	mixed-entry master created for function entry points.
1442
14432016-09-30  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1444
1445	PR fortran/66643
1446	* io.c (match_dt_unit): Peek check for missing format.
1447
14482016-09-30  Fritz Reese  <fritzoreese@gmail.com>
1449
1450	PR fortran/77764
1451	* interface.c (gfc_compare_union_types): Null-guard map components.
1452
14532016-09-30  Fritz Reese  <fritzoreese@gmail.com>
1454
1455	PR fortran/77782
1456	* interface.c (gfc_compare_derived_types): Use gfc_compare_union_types
1457	to compare union types.
1458
14592016-09-30  Andre Vehreschild  <vehre@gcc.gnu.org>
1460
1461	* trans-array.c (gfc_array_allocate): Use the token from coarray's
1462	.token member.
1463	* trans-intrinsic.c (conv_expr_ref_to_caf_ref): Only generate
1464	caf-reference chains from the first coarray references on.
1465	* trans-types.c (gfc_get_derived_type): Switch on mandatory .token
1466	member generation for allocatable arrays in coarrays in derived types.
1467
14682016-09-29  James Greenhalgh  <james.greenhalgh@arm.com>
1469
1470	* options.c (gfc_post_options): Remove special case for
1471	TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard.
1472
14732016-09-27  Jakub Jelinek  <jakub@redhat.com>
1474
1475	* dependency.c (gfc_dep_compare_expr): Remove break after return.
1476	* frontend-passes.c (optimize_op): Likewise.
1477	* interface.c (gfc_current_interface_head): Likewise.
1478	* symbol.c (check_conflict): Likewise.
1479	* trans-intrinsic.c (build_fix_expr): Likewise.
1480
1481	PR fortran/77666
1482	* trans-openmp.c (gfc_omp_private_outer_ref): Return true even for
1483	references to allocatable arrays.
1484
14852016-09-26  Steven G. Kargl  <kargl@gcc.gnu.org>
1486
1487	PR fortran/77420
1488	* trans-common.c:  Handle array elements in equivalence when
1489	the lower and upper bounds of array spec are NULL.
1490
14912016-09-26  Paul Thomas  <pault@gcc.gnu.org>
1492
1493	PR fortran/48298
1494	* interface.c (gfc_find_specific_dtio_proc) : Return NULL if
1495	the derived type is broken, as indicated by a flavor other than
1496	FL_DERIVED.
1497
14982016-09-26  Marek Polacek  <polacek@redhat.com>
1499
1500	PR c/7652
1501	* arith.c (eval_intrinsic): Add gcc_fallthrough.
1502	* frontend-passes.c (optimize_op): Likewise.
1503	(gfc_expr_walker): Likewise.
1504	* parse.c (next_fixed): Likewise.
1505	* primary.c (match_variable): Likewise.
1506	* trans-array.c: Likewise.
1507	* trans-expr.c (flatten_array_ctors_without_strlen): Likewise.
1508	* trans-io.c (transfer_expr): Likewise.
1509
15102016-09-25  Steven G. Kargl  <kargl@gcc.gnu.org>
1511
1512	PR fortran/77429
1513	* dependency.c (gfc_check_dependency):  Convert gcc_assert() to
1514	a conditional and possible call to  gfc_internal_error().
1515
15162016-09-25  Steven G. Kargl  <kargl@gcc.gnu.org>
1517
1518	PR fortran/77694
1519	* frontend-passes.c (optimize_binop_array_assignment): Check pointer
1520	for NULL.
1521
15222016-09-23  Fritz Reese  <fritzoreese@gmail.com>
1523
1524	* lang.opt, invoke.texi, gfortran.texi: New flag -fdec-static.
1525	* options.c (set_dec_flags): Set -fdec-static with -fdec.
1526	* gfortran.h (symbol_attribute): New attribute automatic.
1527	* gfortran.h (gfc_add_automatic): New prototype.
1528	* match.h (gfc_match_automatic, gfc_match_static): New functions.
1529	* decl.c (gfc_match_automatic, gfc_match_static): Ditto.
1530	* symbol.c (gfc_add_automatic): Ditto.
1531	* decl.c (match_attr_spec): Match AUTOMATIC and STATIC decls.
1532	* parse.c (decode_specification_statement, decode_statement): Ditto.
1533	* resolve.c (apply_default_init_local, resolve_fl_variable_derived,
1534	resolve_symbol): Support for automatic attribute.
1535	* symbol.c (check_conflict, gfc_copy_attr, gfc_is_var_automatic):
1536	Ditto.
1537	* trans-decl.c (gfc_finish_var_decl): Ditto.
1538
15392016-09-23  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1540
1541	PR fortran/48298
1542	* gfortran.h (gfc_dt): Add *udtio.
1543	* ioparm.def: Add bit IOPARM_dt_f2003 to align with library use of bit
1544	25. Add IOPARM_dt_dtio bit to common flags.
1545	* resolve.c (resolve_transfer): Set dt->udtio to expression.
1546	* io.c (gfc_match_inquire): Adjust error message for internal
1547	unit KIND.
1548	* libgfortran.h: Adjust defines for GFC_INTERNAL_UNIT4,
1549	GFC_INTERNAL_UNIT, and GFC_INVALID_UNIT.
1550	* trans-io.c (build_dt): Set common_unit to reflect the KIND of
1551	the internal unit. Set mask bit for presence of dt->udtio.
1552
15532016-09-22  Andre Vehreschild  <vehre@gcc.gnu.org>
1554
1555	* trans-intrinsic.c (gfc_conv_intrinsic_caf_get): Use the old caf-
1556	interface where possible.
1557
15582016-09-22  Paul Thomas  <pault@gcc.gnu.org>
1559
1560	* interface.c (check_dtio_interface1): Introduce errors for
1561	alternate returns and incorrect numbers of arguments.
1562	(gfc_find_specific_dtio_proc): Return cleanly if the derived
1563	type either doesn't exist or has no namespace.
1564
15652016-09-21  Louis Krupp  <louis.krupp@zoho.com>
1566
1567	PR fortran/66107
1568	* decl.c (add_init_expr_to_sym): Catch variable character length
1569	in parameter array.
1570
15712016-09-21  Paul Thomas  <pault@gcc.gnu.org>
1572
1573	PR fortran/77657
1574
1575	* interface.c (gfc_find_specific_dtio_proc): Borrow trick from
1576	resolve_typebound_generic_call to find dtio procedures that
1577	over-ride those in the declared type.
1578
15792016-09-20  Marek Polacek  <polacek@redhat.com>
1580
1581	* trans-intrinsic.c (conv_expr_ref_to_caf_ref): Adjust fall through
1582	comment.
1583
15842016-09-19  Andre Vehreschild  <vehre@gcc.gnu.org>
1585
1586	PR fortran/71952
1587	* expr.c (gfc_check_assign): Added flag to control whether datatype
1588	conversion is allowed.
1589	* gfortran.h: Added caf-token-tree to gfc_component.  Changed
1590	prototypes mostly to add whether datatype conversion is allowed.
1591	* gfortran.texi: Added documentation for the caf_reference_t and the
1592	caf_*_by_ref function.
1593	* primary.c (caf_variable_attr): Similar to gfc_variable_attr but
1594	focused on the needs of coarrays.
1595	(gfc_caf_attr): Same.
1596	* resolve.c (resolve_ordinary_assign): Set the conversion allowed
1597	flag when not in a coarray.
1598	* trans-array.c (gfc_array_init_size): Moved setting of array
1599	descriptor's datatype before the alloc, because caf_register needs it.
1600	(gfc_array_allocate): Changed notion of whether an array is a coarray.
1601	(gfc_array_deallocate): Same.
1602	(gfc_alloc_allocatable_for_assignment): Added setting of coarray's
1603	array descriptor datatype before the register.  And using deregister/
1604	register to mimmick a realloc for coarrays.
1605	* trans-decl.c (gfc_build_builtin_function_decls): Corrected signatures
1606	of old caf-functions and added signature definitions of the _by_ref
1607	ones.
1608	(generate_coarray_sym_init): Adapted to new caf_register signature.
1609	* trans-expr.c (gfc_conv_scalar_to_descriptor): Make sure a constant
1610	is translated to an lvalue expression before use in an array
1611	descriptor.
1612	(gfc_get_ultimate_alloc_ptr_comps_caf_token): New function.  Get the
1613	last allocatable component's coarray token.
1614	(gfc_get_tree_for_caf_expr): For top-level object get the coarray
1615	token and check for unsupported features.
1616	(gfc_get_caf_token_offset): Getting the offset might procude new
1617	statements, which now are stored in the pre and post of the current se.
1618	(gfc_caf_get_image_index): For this image return a call to
1619	caf_this_image.
1620	(expr_may_alias_variables): Check that the result is set for testing
1621	its properties.
1622	(alloc_scalar_allocatable_for_assignment): Added auto allocation of
1623	coarray components.
1624	(gfc_trans_assignment_1): Rewrite an assign to a coarray object to
1625	be a sendget.
1626	* trans-intrinsic.c (conv_caf_vector_subscript_elem): Corrected
1627	wrong comment.
1628	(compute_component_offset): Compute the correct offset a structure
1629	member.
1630	(conv_expr_ref_to_caf_ref): Convert to a chain of refs into
1631	caf_references.
1632	(gfc_conv_intrinsic_caf_get): Call caf_get_by_ref instead of caf_get.
1633	(conv_caf_send): Call caf_*_by_ref for coarrays that need
1634	reallocation.
1635	(gfc_conv_intrinsic_function): Adapted to new signuature of the caf
1636	drivers.
1637	(conv_intrinsic_atomic_op): Add pre and post statements correctly.
1638	(conv_intrinsic_atomic_ref): Same.
1639	(conv_intrinsic_atomic_cas): Same.
1640	(conv_intrinsic_event_query): Same.
1641	* trans-stmt.c (gfc_trans_lock_unlock): Same.
1642	(gfc_trans_event_post_wait): Same.
1643	(gfc_trans_allocate): Support allocation of allocatable coarrays.
1644	(gfc_trans_deallocate): And there deallocation.
1645	* trans-types.c (gfc_typenode_for_spec): Added flag to control whether
1646	a component is part of coarray.  When so, then add space to store a
1647	coarray token.
1648	(gfc_build_array_type): Same.
1649	(gfc_get_array_descriptor_base): Same.
1650	(gfc_get_array_type_bounds): Same.
1651	(gfc_sym_type): Same.
1652	(gfc_get_derived_type): Same.
1653	(gfc_get_caf_reference_type): Declare the caf_reference_type.
1654	* trans-types.h: Prototype changes only.
1655	* trans.c (gfc_allocate_using_lib): Use the updated caf_register
1656	signature.
1657	(gfc_allocate_allocatable): Same.
1658	(gfc_deallocate_with_status): Same.
1659	* trans.h: Defined the runtime types for caf_reference_t and the enums.
1660
16612016-09-19  Fritz Reese  <fritzoreese@gmail.com>
1662
1663	PR fortran/77584
1664	* decl.c (match_record_decl, gfc_match_decl_type_spec): Fixes to
1665	handling of structure/record from declaration-type-spec.
1666
16672016_09_17  Louis Krupp  <louis.krupp@zoho.com>
1668
1669	PR fortran/68078
1670	* resolve.c (resolve_allocate_expr): Check that derived type
1671	pointer, object or array has been successfully allocated before
1672	initializing.
1673
16742016-09-16  Steven G. Kargl  <kargl@gcc.gnu.org>
1675
1676	PR fortran/77612
1677	* decl.c (char_len_param_value): Check parent namespace for
1678	seen_implicit_none.
1679
16802016-09-15  Louis Krupp  <louis.krupp@zoho.com>
1681
1682	PR fortran/69963
1683	* parse.c (reject_statement): Clear charlen pointers in implicit
1684	character typespecs before those charlen structures are freed.
1685
16862016-09-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1687
1688	* simplify.c (gfc_simplify_repeat): Fix a misplaced closing ')'.
1689
16902016-09-13  Steven G. Kargl  <kargl@gcc.gnu.org>
1691
1692	PR fortran/77420
1693	* module.c (load_equiv):  Revert revision 240063.
1694
16952016-09-10  Paul Thomas  <pault@gcc.gnu.org>
1696	    Steven G. Kargl  <kargl@gcc.gnu.org>
1697
1698	PR fortran/77532
1699	* interface.c (check_dtio_arg_TKR_intent): Return after error.
1700	(check_dtio_interface1): Remove asserts, test for NULL and return
1701	if found.
1702
17032016-09-09  Steven G. Kargl  <kargl@gcc.gnu.org>
1704
1705	PR fortran/77420
1706	* module.c (load_equiv): If the current namespace has a list of
1707	equivalence statements, initialize duplicate to false and then
1708	look for duplicates; otherwise, initialize it to true.
1709
17102016-09-09  Steven G. Kargl  <kargl@gcc.gnu.org>
1711
1712	PR fortran/77506
1713	* array.c (gfc_match_array_constructor): CHARACTER(len=*) cannot
1714	appear in an array constructor.
1715
17162016-09-09  Steven G. Kargl  <kargl@gcc.gnu.org>
1717
1718	PR fortran/77507
1719	* intrinsic.c (add_functions):  Use correct keyword.
1720
17212016-09-08  Steven G. Kargl  <kargl@gcc.gnu.org>
1722
1723	PR fortran/69514
1724	* array.c (gfc_match_array_constructor):  If type-spec is present,
1725	walk the array constructor performing possible conversions for
1726	numeric types.
1727
17282016-09-08  Jakub Jelinek  <jakub@redhat.com>
1729
1730	PR fortran/77500
1731	* trans-openmp.c (gfc_trans_omp_atomic): For atomic write or
1732	swap, don't try to look through GFC_ISYM_CONVERSION.  In other cases,
1733	check that value.function.isym is non-NULL before dereferencing it.
1734
17352016-09-04  Steven G. Kargl  <kargl@gcc.gnu.org>
1736
1737	PR fortran/77391
1738	* resolve.c (deferred_requirements): New function to check F2008:C402.
1739	(resolve_fl_variable,resolve_fl_parameter): Use it.
1740
17412016-09-04  Steven G. Kargl  <kargl@gcc.gnu.org>
1742
1743	PR fortran/77460
1744	* simplify.c (simplify_transformation_to_scalar):  On error, result
1745	may be NULL, simply return.
1746
17472016-08-31  Jakub Jelinek  <jakub@redhat.com>
1748
1749	PR fortran/77352
1750	* trans-openmp.c (gfc_trans_omp_parallel_workshare): Always add a
1751	BIND_EXPR with BLOCK around what gfc_trans_omp_workshare returns.
1752
1753	PR fortran/77374
1754	* parse.c (parse_omp_oacc_atomic): Copy over cp->ext.omp_atomic
1755	to cp->block->ext.omp_atomic.
1756	* resolve.c (gfc_resolve_blocks): Assert block with one or two
1757	EXEC_ASSIGNs for EXEC_*_ATOMIC.
1758	* openmp.c (resolve_omp_atomic): Don't assert one or two
1759	EXEC_ASSIGNs, instead return quietly for EXEC_NOPs and otherwise
1760	error unexpected statements.
1761
17622016-08-31  Paul Thomas  <pault@gcc.gnu.org>
1763	    Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1764
1765	PR fortran/48298
1766	* decl.c (access_attr_decl): Include case INTERFACE_DTIO as
1767	appropriate.
1768	* gfortran.h : Add INTRINSIC_FORMATTED and
1769	INTRINSIC_UNFORMATTED to gfc_intrinsic_op. Add INTERFACE_DTIO
1770	to interface type. Add new enum 'dtio_codes'. Add bitfield
1771	'has_dtio_procs' to symbol_attr. Add prototypes
1772	'gfc_check_dtio_interfaces' and 'gfc_find_specific_dtio_proc'.
1773	* interface.c (dtio_op): New function.
1774	(gfc_match_generic_spec): Match generic DTIO interfaces.
1775	(gfc_match_interface): Treat DTIO interfaces in the same way as
1776	(gfc_current_interface_head): Add INTERFACE_DTIO appropriately.
1777	(check_dtio_arg_TKR_intent): New function.
1778	(check_dtio_interface1): New function.
1779	(gfc_check_dtio_interfaces): New function.
1780	(gfc_find_specific_dtio_proc): New function.
1781	* io.c : Add FMT_DT to format_token.
1782	(format_lex): Handle DTIO formatting.
1783	* match.c (gfc_op2string): Add DTIO operators.
1784	* resolve.c (derived_inaccessible): Ignore pointer components
1785	to enclosing derived type.
1786	(resolve_transfer): Resolve transfers that involve DTIO.
1787	procedures. Find the specific subroutine for the transfer and
1788	use its existence to over-ride some of the constraints on
1789	derived types. If the transfer is recursive, require that the
1790	subroutine be so qualified.
1791	(dtio_procs_present): New function.
1792	(resolve_fl_namelist): Remove inhibition of polymorphic objects
1793	in namelists if DTIO read and write subroutines exist. Likewise
1794	for derived types.
1795	(resolve_types): Invoke 'gfc_verify_dtio_procedures'.
1796	* symbol.c : Set 'dtio_procs' using 'minit'.
1797	* trans-decl.c (gfc_finish_var_decl): If a derived-type/class
1798	object is associated with DTIO procedures, make it TREE_STATIC.
1799	* trans-expr.c (gfc_get_vptr_from_expr): If the expression
1800	drills down to a PARM_DECL, extract the vptr correctly.
1801	(gfc_conv_derived_to_class): Check 'info' in the test for
1802	'useflags'. If the se expression exists and is a pointer, use
1803	it as the class _data.
1804	* trans-io.c : Add IOCALL_X_DERIVED to iocall and the function
1805	prototype. Likewise for IOCALL_SET_NML_DTIO_VAL.
1806	(set_parameter_tree): Renamed from 'set_parameter_const', now
1807	returns void and has new tree argument. Calls modified to match
1808	new interface.
1809	(transfer_namelist_element): Transfer DTIO procedure pointer
1810	and vpointer using the new function IOCALL_SET_NML_DTIO_VAL.
1811	(get_dtio_proc): New function.
1812	(transfer_expr): Add new argument for the vptr field of class
1813	objects. Add the code to call the specific DTIO proc, convert
1814	derived types to class and call IOCALL_X_DERIVED.
1815	(trans_transfer): Add BT_CLASS to structures for treatment by
1816	the scalarizer. Obtain the vptr for the dynamic type, both for
1817	scalar and array transfer.
1818
18192016-08-30  Fritz Reese  <fritzoreese@gmail.com>
1820
1821	* gfortran.texi: Fix typo in STRUCTURE documentation.
1822
18232016-08-29  Fritz Reese  <fritzoreese@gmail.com>
1824
1825	Fix, reorganize, and clarify comparisons of anonymous types/components.
1826
1827	PR fortran/77327
1828	* interface.c (is_anonymous_component, is_anonymous_dt): New functions.
1829	* interface.c (compare_components, gfc_compare_derived_types): Use new
1830	functions.
1831
18322016-08-27  Steven G. Kargl  <kargl@gcc.gnu.org>
1833
1834	PR fortran/77380
1835	* dependency.c (gfc_check_dependency): Do not assert with
1836	-fcoarray=lib.
1837
18382016-08-27  Steven G. Kargl  <kargl@gcc.gnu.org>
1839
1840	PR fortran/77372
1841	simplify.c (simplify_ieee_selected_real_kind): Check for NULL pointers.
1842
18432016-08-25  Steven g. Kargl  <kargl@gcc.gnu.org>
1844
1845	PR fortran/77351
1846	* frontend-passes.c (remove_trim,combine_array_constructor): Check for
1847	NULL pointer.
1848
18492016-08-24  Paul Thomas  <pault@gcc.gnu.org>
1850
1851	PR fortran/77358
1852	* resolve.c (resolve_fl_procedure): Use the correct gfc_charlen
1853	for deferred character length module procedures.
1854
18552016-08-23  Fritz Reese  <fritzoreese@gmail.com>
1856
1857	* decl.c (gfc_match_structure_decl): Make gfc_structure_id static.
1858
18592016-08-23  Fritz Reese  <fritzoreese@gmail.com>
1860
1861	* interface.c (compare_components): Fix typo in name check conditional.
1862
18632016-08-22  Steven G. Kargl  <kargl@gcc.gnu.org>
1864	    Bud Davis  <jmdavis@link.com>
1865
1866	PR fortran/60774
1867	* parse.c (next_free,next_fixed): Issue error for statement label
1868	without a statement.
1869
18702016-08-22  Steven G. Kargl  <kargl@gcc.gnu.org>
1871
1872	PR fortran/61318
1873	* interface.c (compare_parameter): Use better locus for error message.
1874
18752016-08-22  Steven G. Kargl  <kargl@gcc.gnu.org>
1876
1877	PR fortran/77260
1878	* gcc/fortran/trans-decl.c (generate_local_decl): Suppress warning
1879	for unused variable if symbol is entry point.
1880
18812016-08-19  Joseph Myers  <joseph@codesourcery.com>
1882
1883	PR c/32187
1884	* trans-types.h (float128_type_node): Rename to
1885	gfc_float128_type_node.
1886	(complex_float128_type_node): Rename to
1887	gfc_complex_float128_type_node.
1888	* iso-c-binding.def, trans-intrinsic.c, trans-types.c: All users
1889	changed.
1890
18912016-08-19  Jakub Jelinek  <jakub@redhat.com>
1892
1893	PR fortran/71014
1894	* resolve.c (gfc_resolve): For ns->construct_entities don't save, clear
1895	and restore omp state around the resolving.
1896
1897	PR fortran/69281
1898	* trans-openmp.c (gfc_trans_omp_parallel, gfc_trans_omp_task,
1899	gfc_trans_omp_target): Wrap gfc_trans_omp_code result in an extra
1900	BIND_EXPR with its own forced BLOCK.
1901
19022016-08-19  Janne Blomqvist  <jb@gcc.gnu.org>
1903
1904        * intrinsics.texi (RANDOM_NUMBER): Remove reference to
1905        init_random_seed in example.
1906        (RANDOM_SEED): Remove warning to not set all seed values to 0.
1907
19082016-08-18  David Malcolm  <dmalcolm@redhat.com>
1909
1910	* error.c (gfc_diagnostic_starter): Update for change to
1911	diagnostic_show_locus.
1912
19132016-08-17  Jakub Jelinek  <jakub@redhat.com>
1914
1915	PR fortran/67496
1916	* trans-array.c (trans_array_constructor): Load
1917	expr->ts.u.cl->length_from_typespec only if expr->ts.type is
1918	BT_CHARACTER.
1919
19202016-08-15  Fritz Reese  <fritzoreese@gmail.com>
1921
1922	* lang.opt, invoke.texi: New flag -finit-derived.
1923	* gfortran.h (gfc_build_default_init_expr, gfc_apply_init,
1924	gfc_generate_initializer): New prototypes.
1925	* expr.c (gfc_build_default_init_expr, gfc_apply_init,
1926	component_initializer, gfc_generate_initializer): New functions.
1927	* expr.c (gfc_default_initializer): Wrap gfc_generate_initializer.
1928	* decl.c (build_struct): Move common code to gfc_apply_init.
1929	* resolve.c (can_generate_init): New function.
1930	* resolve.c (build_default_init_expr): Wrap gfc_build_default_init_expr.
1931	* resolve.c (apply_default_init, resolve_fl_variable_derived): Use
1932	gfc_generate_initializer.
1933	* trans-decl.c (gfc_generate_function_code): Use
1934	gfc_generate_initializer.
1935
19362016-08-15  Thomas Koenig  <tkoenig@gcc.gnu.org>
1937
1938	* frontend-passes.c (create_var):  Set ts.deferred for
1939	deferred-length character variables.
1940	* dump-parse-tree.c (show_typespec):  Also dump
1941	is_c_interop, is_iso_c and deferred flags.
1942
19432016-08-15  Jakub Jelinek  <jakub@redhat.com>
1944
1945	PR debug/71906
1946	* trans-decl.c (gfc_get_symbol_decl): Call gfc_finish_var_decl
1947	for decl's character length before gfc_finish_var_decl on the
1948	decl itself.
1949
19502016-08-14  Chung-Lin Tang  <cltang@codesourcery.com>
1951
1952	PR fortran/70598
1953	* openmp.c (resolve_omp_clauses): Adjust use_device clause
1954	handling to only allow pointers and arrays.
1955
19562016-08-12  Marek Polacek  <polacek@redhat.com>
1957
1958	PR c/7652
1959	* decl.c (match_attr_spec): Add FALLTHRU.
1960	* primary.c (match_arg_list_function): Likewise.
1961	* resolve.c (resolve_operator): Adjust fall through comment.
1962	(fixup_charlen): Add FALLTHRU.
1963	(resolve_allocate_expr): Adjust fall through comment.
1964	* trans-array.c (gfc_conv_ss_startstride): Add FALLTHRU.
1965	* trans-intrinsic.c (gfc_conv_intrinsic_len): Adjust fall through
1966	comment.
1967
19682016-08-11  Janne Blomqvist  <jb@gcc.gnu.org>
1969
1970	* check.c (gfc_check_random_seed): Use new seed size in check.
1971	* intrinsic.texi (RANDOM_NUMBER): Updated documentation.
1972	(RANDOM_SEED): Likewise.
1973
19742016-08-08  Jakub Jelinek  <jakub@redhat.com>
1975
1976	PR fortran/72716
1977	* openmp.c (gfc_match_omp_declare_simd): Don't stick anything into
1978	BLOCK DATA ns, it will be rejected later.
1979
19802016-08-08  Andre Vehreschild  <vehre@gcc.gnu.org>
1981
1982	PR fortran/71936
1983	* trans-array.c (gfc_array_allocate): When SOURCE= is a function
1984	stick with the ref of the object to allocate.
1985
19862016-08-08  Andre Vehreschild  <vehre@gcc.gnu.org>
1987
1988	PR fortran/72698
1989	* trans-stmt.c (gfc_trans_allocate): Prevent generating code for
1990	copy of zero sized string and with it an ICE.
1991
19922016-08-08  Andre Vehreschild  <vehre@gcc.gnu.org>
1993
1994	PR fortran/70524
1995	* trans-array.c (gfc_trans_dummy_array_bias): Ensure that the
1996	location information is correctly set.
1997	* trans-decl.c (gfc_trans_deferred_vars): Set the locus of the
1998	current construct early.
1999
20002016-08-03  Fritz Reese  <fritzoreese@gmail.com>
2001
2002	* lang.opt: New option -fdec-intrinsic-ints.
2003	* options.c (set_dec_flags): Enable with -fdec.
2004	* gfortran.texi, invoke.texi, intrinsics.texi: Update documentation.
2005	* intrinsic.c (add_function, add_subroutine): New B/I/J/K intrinsic
2006	variants.
2007
20082016-07-30  Steven G. Kargl  <kargl@gcc.gnu.org>
2009
2010	PR fortran/41922
2011	* target-memory.c (expr_to_char): Pass in locus and use it in error
2012	messages.
2013	(gfc_merge_initializers): Ditto.
2014	* target-memory.h: Update prototype for gfc_merge_initializers ().
2015	* trans-common.c (get_init_field): Use the correct locus.
2016
20172016-07-30  Steven G. Kargl  <kargl@gcc.gnu.org>
2018
2019	PR fortran/68566
2020	* check.c (gfc_check_reshape): Check for constant expression.
2021
20222016-07-30  Steven G. Kargl  <kargl@gcc.gnu.org>
2023
2024	PR fortran/69867
2025	* decl.c (build_struct): Ensure that pointers point to something.
2026
20272016-07-30  Steven G. Kargl  <kargl@gcc.gnu.org>
2028
2029	PR fortran/69962
2030	* decl.c (gfc_set_constant_character_len):  if expr is not
2031	constant issue an error instead of an ICE.
2032
20332016-07-30  Steven G. Kargl  <kargl@gcc.gnu.org>
2034
2035	PR fortran/70006
2036	* io.c (gfc_resolve_dt): Use correct locus.
2037	* resolve.c (resolve_branch): Ditto.
2038
20392016-07-30  Steven G. Kargl  <kargl@gcc.gnu.org>
2040
2041	PR fortran/71730
2042	* decl.c (char_len_param_value): Check return value of
2043	gfc_reduce_init_expr().
2044
20452016-07-29  Dominik Vogt  <vogt@linux.vnet.ibm.com>
2046
2047	* trans-array.c (gfc_conv_array_ref): Fix allocation of diagnostic
2048	message (was too small).
2049
20502016-07-28  Steven G. Kargl  <kargl@gcc.gnu.org>
2051
2052	PR fortran/71067
2053	* decl.c (match_data_constant): On error, set 'result' to NULL.
2054
20552016-07-28  Steven G. Kargl  <kargl@gcc.gnu.org>
2056
2057	PR fortran/71799
2058	* resolve.c(gfc_resolve_iterator): Failure of type conversion need
2059	not ICE.
2060
20612016-07-28  Steven G. Kargl  <kargl@gcc.gnu.org>
2062
2063	PR fortran/71859
2064	* check.c(numeric_check): Prevent ICE.  Issue error for invalid
2065	subroutine as an actual argument when numeric argument is expected.
2066
20672016-07-28  Steven G. Kargl  <kargl@gcc.gnu.org>
2068	    Thomas Koenig  <tkoenig@gcc.gnu.org>
2069
2070	PR fortran/71883
2071	* frontend-passes.c (gfc_run_passes): Bail out if there are any
2072	errors.
2073	* error.c (gfc_internal_error): If there are any errors in the
2074	buffer, exit with EXIT_FAILURE.
2075
20762016-07-28  Renlin Li  <renlin.li@arm.com>
2077
2078	Revert
2079	2016-07-19  Thomas Koenig  <tkoenig@gcc.gnu.org>
2080
2081	PR fortran/71902
2082	* dependency.c (gfc_check_dependency): Use dep_ref.  Handle case
2083	if identical is true and two array element references differ.
2084	(gfc_dep_resovler):  Move most of the code to dep_ref.
2085	(dep_ref):  New function.
2086	* frontend-passes.c (realloc_string_callback):  Name temporary
2087	variable "realloc_string".
2088
20892016-07-26  Steven G. Kargl  <kargl@gcc.gnu.org>
2090
2091	PR fortran/71862
2092	* class.c: Remove assert.  Iterate over component only if non-null.
2093
20942016-07-22  Steven G. Kargl  <kargl@gcc.gnu.org>
2095
2096	PR fortran/71935
2097	* check.c (is_c_interoperable): Simplify right expression.
2098
20992016-07-22  Thomas Koenig  <tkoenig@gcc.gnu.org>
2100
2101	PR fortran/71795
2102	* frontend-passes.c (combine_array_constructor):  Don't
2103	do anything if the expression is inside an array iterator.
2104
21052016-07-22  Andre Vehreschild  <vehre@gcc.gnu.org>
2106
2107	* expr.c (gfc_find_stat_co): Fixed whitespaces.
2108	* gfortran.texi: Fixed typos and reversed meaning of caf_get()'s
2109	src and dst description.
2110	* trans-decl.c (gfc_build_builtin_function_decls): Fixed style
2111	and corrected fnspec for caf functions.
2112	* trans-intrinsic.c (gfc_conv_intrinsic_caf_get): Fixed style.
2113	(conv_caf_send): Dito.
2114
21152016-07-19  Thomas Koenig  <tkoenig@gcc.gnu.org>
2116
2117	PR fortran/71902
2118	* dependency.c (gfc_check_dependency): Use dep_ref.  Handle case
2119	if identical is true and two array element references differ.
2120	(gfc_dep_resovler):  Move most of the code to dep_ref.
2121	(dep_ref):  New function.
2122	* frontend-passes.c (realloc_string_callback):  Name temporary
2123	variable "realloc_string".
2124
21252016-07-17  Fritz Reese  <fritzoreese@gmail.com>
2126
2127	PR fortran/71523
2128	* trans-decl.c (gfc_finish_var_decl): Replace automatic initializer with
2129	a static one.
2130
21312016-07-15  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2132	    Marco Restelli  <mrestelli@gmail.com>
2133
2134	PR fortran/62125
2135	* symbol.c (select_type_insert_tmp): Recursively call self to take care
2136	of nested select type.
2137
21382016-07-15  Cesar Philippidis  <cesar@codesourcery.com>
2139
2140	* openmp.c (gfc_match_omp_clauses): Scan for clause vector_length
2141	before vector.
2142
21432016-07-15  Andre Vehreschild  <vehre@gcc.gnu.org>
2144
2145	PR fortran/71807
2146	* trans-expr.c (gfc_trans_subcomponent_assign): Special casing
2147	when allocatable component is set to null() in initializer.
2148
21492016-07-14  Steven G. Kargl  <kargl@gcc.gnu.org>
2150
2151	PR fortran/29819
2152	* parse.c (parse_contained): Use proper locus.
2153
21542016-07-14  Andre Vehreschild  <vehre@gcc.gnu.org>
2155
2156	PR fortran/70842
2157	* simplify.c (gfc_simplify_len): Only for unlimited polymorphic
2158	types replace the expression's _data ref with a _len ref.
2159
21602016-07-09  Thomas Koenig  <tkoenig@gcc.gnu.org>
2161
2162	PR fortran/71783
2163	* frontend-passes.c (create_var):  Always allocate a charlen
2164	for character variables.
2165
21662016-07-08  Steven G. Kargl  <kargl@gcc.gnu.org>
2167
2168	PR fortran/68426
2169	* simplify (gfc_simplify_spread): Adjust locus.
2170
21712016-07-08  Cesar Philippidis  <cesar@codesourcery.com>
2172
2173	* parse.c (matcha): Define.
2174	(decode_oacc_directive): Add spec_only local var and set it.  Use
2175	matcha to parse acc directives except for routine and declare.  Return
2176	ST_GET_FCN_CHARACTERISTICS if a non-declarative directive could be
2177	matched.
2178
21792016-07-08  Martin Liska  <mliska@suse.cz>
2180
2181	* invoke.texi (Wundefined-do-loop): Enhance documentation.
2182
21832016-07-07  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2184
2185	PR fortran/71764
2186	* trans-expr.c (gfc_trans_structure_assign): Remove assert.
2187
21882016-07-07  Martin Liska  <mliska@suse.cz>
2189
2190	* lang.opt (Wundefined-do-loop): New option.
2191        * resolve.c (gfc_resolve_iterator): Warn for Wundefined-do-loop.
2192	(gfc_trans_simple_do): Generate a c-style loop.
2193	(gfc_trans_do): Fix GNU coding style.
2194	* invoke.texi: Mention the new warning.
2195
21962016-07-07  Martin Liska  <mliska@suse.cz>
2197
2198	* trans-stmt.c (gfc_trans_do): Add expect builtin for DO
2199	loops with step bigger than +-1.
2200
22012016-07-05  Alessandro Fanfarillo  <fanfarillo.gcc@gmail.com>
2202
2203	* array.c (gfc_match_array_ref): Add parsing support for
2204	STAT= attribute in CAF reference.
2205	* expr.c (gfc_find_stat_co): New function that returns
2206	the STAT= assignment.
2207	* gfortran.h (gfc_array_ref): New member.
2208	* trans-decl.c (gfc_build_builtin_function_decls):
2209	new attribute for caf_get and caf_send functions.
2210	* trans-intrinsic.c (gfc_conv_intrinsic_caf_get): Passing
2211	the stat attribute to external function.
2212	(gfc_conv_intrinsic_caf_send): Ditto.
2213
22142016-07-05  Andre Vehreschild  <vehre@gcc.gnu.org>
2215
2216	PR fortran/71623
2217	* trans-stmt.c (gfc_trans_allocate): Add code of pre block of typespec
2218	in allocate to parent block.
2219
22202016-07-04  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2221
2222	PR fortran/66575
2223	* decl.c (match_procedure_interface): Exit loop if procedure
2224	interface refers to itself.
2225
22262016-07-04  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2227	    Steven G. Kargl  <kargl@gcc.gnu.org>
2228
2229	PR fortran/35849
2230	* simplify.c (gfc_simplify_ishftc): Check that absolute value of
2231	SHIFT is less than or equal to SIZE.
2232
22332016-07-01  Jakub Jelinek  <jakub@redhat.com>
2234
2235	PR fortran/71687
2236	* f95-lang.c (struct binding_level): Add reversed field.
2237	(clear_binding_level): Adjust initializer.
2238	(getdecls): If reversed is clear, set it and nreverse the names
2239	chain before returning it.
2240	(poplevel): Use getdecls.
2241	* trans-decl.c (gfc_generate_function_code, gfc_process_block_locals):
2242	Use nreverse to pushdecl decls in the declaration order.
2243
2244	PR fortran/71717
2245	* trans-openmp.c (gfc_omp_privatize_by_reference): Return false
2246	for GFC_DECL_ASSOCIATE_VAR_P with POINTER_TYPE.
2247
22482016-06-30  Jakub Jelinek  <jakub@redhat.com>
2249
2250	PR fortran/71704
2251	* parse.c (matchs, matcho): Move right before decode_omp_directive.
2252	If spec_only, only gfc_match the keyword and if successful, goto
2253	do_spec_only.
2254	(matchds, matchdo): Define.
2255	(decode_omp_directive): Add spec_only local var and set it.
2256	Use matchds or matchdo macros instead of matchs or matcho
2257	for declare target, declare simd, declare reduction and threadprivate
2258	directives.  Return ST_GET_FCN_CHARACTERISTICS if a non-declarative
2259	directive could be matched.
2260	(next_statement): For ST_GET_FCN_CHARACTERISTICS restore
2261	gfc_current_locus from old_locus even if there is no label.
2262
2263	PR fortran/71705
2264	* trans-openmp.c (gfc_trans_omp_clauses): Set TREE_ADDRESSABLE on
2265	decls in to/from clauses.
2266
22672016-06-29  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2268
2269	PR fortran/71686
2270	* scanner.c (gfc_next_char_literal): Only decrement nextc if it
2271	is not NULL.
2272
22732016-06-29  Cesar Philippidis  <cesar@codesourcery.com>
2274
2275	* openmp.c (match_oacc_clause_gang): Rename to ...
2276	(match_oacc_clause_gwv): this.  Add support for OpenACC worker and
2277	vector clauses.
2278	(gfc_match_omp_clauses): Use match_oacc_clause_gwv for
2279	OMP_CLAUSE_{GANG,WORKER,VECTOR}.  Propagate any MATCH_ERRORs for
2280	invalid OMP_CLAUSE_{ASYNC,WAIT,GANG,WORKER,VECTOR} clauses.
2281	(gfc_match_oacc_wait): Propagate MATCH_ERROR for invalid
2282	oacc_expr_lists.  Adjust the first and needs_space arguments to
2283	gfc_match_omp_clauses.
2284
22852016-06-29  Richard Biener  <rguenther@suse.de>
2286
2287	PR middle-end/71002
2288	* f95-lang.c (LANG_HOOKS_GET_ALIAS_SET): Remove (un-)define.
2289	(gfc_get_alias_set): Remove.
2290
22912016-06-25  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2292
2293	PR fortran/71649
2294	* module.c (create_intrinsic_function): Check for NULL values and
2295	return after giving error.
2296
22972016-06-21  Michael Meissner  <meissner@linux.vnet.ibm.com>
2298
2299	* trans-types.c (gfc_build_complex_type): Move setting complex
2300	MODE to layout_type, instead of setting it ahead of time by the
2301	caller.
2302
23032016-06-21  Tobias Burnus  <burnus@net-b.de>
2304
2305	PR fortran/71068
2306	* resolve.c (resolve_function): Don't resolve caf_get/caf_send.
2307	(check_data_variable): Strip-off caf_get before checking.
2308
23092016-06-20  Tobias Burnus  <burnus@net-b.de>
2310
2311	PR fortran/71194
2312	* trans-expr.c (gfc_trans_pointer_assignment): Correctly handle
2313	RHS pointer functions.
2314
23152016-06-19  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
2316
2317	* class.c (gfc_add_class_array_ref): Call gfc_add_data_component()
2318	instead of gfc_add_component_ref().
2319	(gfc_get_len_component): Call gfc_add_len_component() instead of
2320	gfc_add_component_ref().
2321	* trans-intrinsic.c (gfc_conv_intrinsic_loc): Call
2322	gfc_add_data_component() instead of gfc_add_component_ref().
2323	* trans.c (gfc_add_finalizer_call): Call
2324	gfc_add_final_component() and gfc_add_size_component() instead
2325	of gfc_add_component_ref.
2326
23272016-06-18  Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>
2328
2329	* trans-types.c (gfc_typenode_for_spec): Commentary typo fix.
2330
23312016-06-17  Cesar Philippidis  <cesar@codesourcery.com>
2332
2333	* openmp.c (match_acc): New generic function to parse OpenACC
2334	directives.
2335	(gfc_match_oacc_parallel_loop): Use it.
2336	(gfc_match_oacc_parallel): Likewise.
2337	(gfc_match_oacc_kernels_loop): Likewise.
2338	(gfc_match_oacc_kernels): Likewise.
2339	(gfc_match_oacc_data): Likewise.
2340	(gfc_match_oacc_host_data): Likewise.
2341	(gfc_match_oacc_loop): Likewise.
2342	(gfc_match_oacc_enter_data): Likewise.
2343	(gfc_match_oacc_exit_data): Likewise.
2344
23452016-06-16  Martin Liska  <mliska@suse.cz>
2346
2347	* trans-stmt.c (gfc_trans_simple_do): Predict the edge.
2348
23492016-06-16  Martin Liska  <mliska@suse.cz>
2350
2351	* trans-array.c (gfc_array_allocate): Do not generate expect
2352	stmt.
2353	* trans.c (gfc_allocate_using_malloc): Properly set FAIL_ALLOC
2354	predictor for malloc return value.
2355	(gfc_allocate_allocatable): Use REALLOC predictor instead of
2356	FAIL_ALLOC.
2357	(gfc_deallocate_with_status): Likewise.
2358
23592016-06-13  Paul Thomas  <pault@gcc.gnu.org>
2360
2361	PR fortran/70673
2362	* frontend-passes.c (realloc_string_callback): Add a call to
2363	gfc_dep_compare_expr.
2364
23652016-06-11  Dominique d'Humieres  <dominiq@lps.ens.fr>
2366
2367	PR fortran/60751
2368	* io.c (gfc_resolve_dt): Replace GFC_STD_GNU with GFC_STD_LEGACY.
2369
23702016-06-10  Thomas Schwinge  <thomas@codesourcery.com>
2371
2372	PR c/71381
2373	* openmp.c (gfc_match_oacc_cache): Add comment.
2374
23752016-06-05  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2376
2377	PR fortran/71404
2378	* io.c (match_io): For READ, commit in pending symbols in the
2379	current statement before trying to match an expression so that
2380	if the match fails and we undo symbols we dont toss good symbols.
2381
23822016-06-05  Andre Vehreschild  <vehre@gcc.gnu.org>
2383
2384	PR fortran/69659
2385	* trans-array.c (gfc_trans_dummy_array_bias): For class arrays use
2386	the address of the _data component to reference the arrays data
2387	component.
2388
23892016-06-03  Chung-Lin Tang  <cltang@codesourcery.com>
2390
2391	* trans-openmp.c (gfc_trans_omp_reduction_list): Add mark_addressable
2392	bool parameter, set reduction clause DECLs as addressable when true.
2393	(gfc_trans_omp_clauses): Pass clauses->async to
2394	gfc_trans_omp_reduction_list, add comment describing OpenACC situation.
2395
23962016-06-01  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2397
2398	PR fortran/52393
2399	* io.c (match_io): For READ, try to match a default character
2400	expression. If found, set the dt format expression to this,
2401	otherwise go back and try control list.
2402
24032016-06-01  Paul Thomas  <pault@gcc.gnu.org>
2404
2405	PR fortran/71156
2406	* decl.c (copy_prefix): Add checks that the module procedure
2407	declaration prefixes are compliant with the interface. Invert
2408	order of existing elemental and pure checks.
2409	* resolve.c (resolve_fl_procedure): Invert order of elemental
2410	and pure errors.
2411
24122016-06-01  Jakub Jelinek  <jakub@redhat.com>
2413
2414	* parse.c (case_decl): Move ST_OMP_* to ...
2415	(case_omp_decl): ... here, new macro.
2416	(verify_st_order): For case_omp_decl, complain about
2417	p->state >= ORDER_EXEC, but don't change p->state otherwise.
2418
24192016-05-26  Jakub Jelinek  <jakub@redhat.com>
2420
2421	* openmp.c (resolve_omp_clauses): Warn if chunk_size is known not to
2422	be positive.
2423
24242016-05-23  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2425
2426	PR fortran/66461
2427	* scanner.c (gfc_next_char_literal): Clear end_flag when adjusting
2428	current locus back to old_locus.
2429
24302016-05-20  Jakub Jelinek  <jakub@redhat.com>
2431
2432	PR fortran/71204
2433	* frontend-passes.c (realloc_string_callback): Clear inserted_block
2434	and changed_statement before calling create_var.
2435
24362016-05-15  Harald Anlauf  <anlauf@gmx.de>
2437
2438	PR fortran/69603
2439	* interface.c (compare_parameter): Check for non-NULL pointer.
2440
24412016-05-14  Fritz Reese  <fritzoreese@gmail.com>
2442
2443	* gfortran.texi: Update example of DEC UNION extension.
2444
24452016-05-14  Fritz Reese  <fritzoreese@gmail.com>
2446
2447	PR fortran/71047
2448	* expr.c (gfc_default_initializer): Avoid extra component refs in
2449	constructors for derived types and classes.
2450
24512016-05-11  Jakub Jelinek  <jakub@redhat.com>
2452
2453	PR fortran/70855
2454	* frontend-passes.c (inline_matmul_assign): Disable in !$omp workshare.
2455
24562016-05-09  Richard Biener  <rguenther@suse.de>
2457
2458	PR fortran/70937
2459	* trans-decl.c: Include gimplify.h for unshare_expr.
2460	(gfc_trans_vla_one_sizepos): Unshare exprs before inserting
2461	them into the IL.
2462
24632016-05-07  Fritz Reese  <fritzoreese@gmail.com>
2464
2465	PR fortran/56226
2466	* module.c (dt_upper_string): Rename to gfc_dt_upper_string
2467	(dt_lower_string): Likewise.
2468	* gfortran.h: Make new gfc_dt_upper/lower_string global.
2469	* class.c: Use gfc_dt_upper_string.
2470	* decl.c: Likewise.
2471	* symbol.c: Likewise.
2472	* resolve.c (resolve_component): New function.
2473	(resolve_fl_derived0): Move component loop code to resolve_component.
2474	* parse.c (check_component): New function.
2475	(parse_derived): Move loop code to check_component.
2476	* lang.opt, invoke.texi, options.c : New option -fdec-structure.
2477	* libgfortran.h (bt): New basic type BT_UNION.
2478	* gfortran.h (gfc_option): New option -fdec-structure.
2479	(gfc_get_union_type, gfc_compare_union_types): New prototypes.
2480	(gfc_bt_struct, gfc_fl_struct, case_bt_struct, case_fl_struct): New
2481	macros.
2482	(gfc_find_component): Change prototype.
2483	* match.h (gfc_match_member_sep, gfc_match_map, gfc_match_union,
2484	gfc_match_structure_decl): New prototypes.
2485	* parse.h (gfc_comp_struct): New macro.
2486	* symbol.c (gfc_find_component): Search for components in nested unions
2487	* class.c (insert_component_ref, gfc_add_component_ref, add_proc_comp,
2488	copy_vtab_proc_comps): Update calls to gfc_find_component.
2489	* primary.c (gfc_convert_to_structure_constructor): Likewise.
2490	* symbol.c (gfc_add_component): Likewise.
2491	* resolve.c (resolve_typebound_function, resolve_typebound_subroutine,
2492	resolve_typebound_procedure, resolve_component, resolve_fl_derived):
2493	Likewise.
2494	* expr.c (get_union_init, component_init): New functions.
2495	* decl.c (match_clist_expr, match_record_decl, get_struct_decl,
2496	gfc_match_map, gfc_match_union, gfc_match_structure_decl): Likewise.
2497	* interface.c (compare_components, gfc_compare_union_types): Likewise.
2498	* match.c (gfc_match_member_sep): Likewise.
2499	* parse.c (check_component, parse_union, parse_struct_map): Likewise.
2500	* resolve.c (resolve_fl_struct): Likewise.
2501	* symbol.c (find_union_component): Likewise.
2502	* trans-types.c (gfc_get_union_type): Likewise.
2503	* parse.c (parse_derived): Use new functions.
2504	* interface.c (gfc_compare_derived_types, gfc_compare_types): Likewise.
2505	* expr.c (gfc_default_initializer): Likewise.
2506	* gfortran.texi: Support for DEC structures, unions, and maps.
2507	* gfortran.h (gfc_statement, sym_flavor): Likewise.
2508	* check.c (gfc_check_kill_sub): Likewise.
2509	* expr.c (gfc_copy_expr, simplify_const_ref,
2510	gfc_has_default_initializer): Likewise.
2511	* decl.c (build_sym, match_data_constant, add_init_expr_to_sym,
2512	match_pointer_init, build_struct, variable_decl,
2513	gfc_match_decl_type_spec, gfc_mach_data-decl, gfc_match_entry,
2514	gfc_match_end, gfc_match_derived_decl): Likewise.
2515	* interface.c (check_interface0, check_interface1,
2516	gfc_search_interface): Likewise.
2517	* misc.c (gfc_basic_typename, gfc_typename): Likewise.
2518	* module.c (add_true_name, build_tnt, bt_types, mio_typespec,
2519	fix_mio_expr, load_needed, mio_symbol, read_module, write_symbol,
2520	gfc_get_module_backend_decl): Likewise.
2521	* parse.h (gfc_compile_state): Likewise.
2522	* parse.c (decode_specification_statement, decode_statement,
2523	gfc_ascii_statement, verify_st_order, parse_spec): Likewise.
2524	* primary.c (gfc_match_varspec, gfc_match_structure_constructor,
2525	gfc_match_rvalue, match_variable): Likewise.
2526	* resolve.c (find_arglists, resolve_structure_cons,
2527	is_illegal_recursion, resolve_generic_f, get_declared_from_expr,
2528	resolve_typebound_subroutine, resolve_allocate_expr,
2529	nonscalar_typebound_assign, generate_component_assignments,
2530	resolve_fl_variable_derived, check_defined_assignments,
2531	resolve_component, resolve_symbol, resolve_equivalence_derived):
2532	Likewise.
2533	* symbol.c (flavors, check_conflict, gfc_add_flavor, gfc_use_derived,
2534	gfc_restore_last_undo_checkpoint, gfc_type_compatible,
2535	gfc_find_dt_in_generic): Likewise.
2536	* trans-decl.c (gfc_get_module_backend_decl, create_function_arglist,
2537	gfc_create_module_variable, check_constant_initializer): Likewise.
2538	* trans-expr.c (gfc_conv_component_ref, gfc_conv_initializer,
2539	gfc_trans_alloc_subarray_assign, gfc_trans_subcomponent_assign,
2540	gfc_conv_structure, gfc_trans_scalar_assign, copyable_array_p):
2541	Likewise.
2542	* trans-io.c (transfer_namelist_element, transfer_expr,
2543	gfc_trans_transfer): Likewise.
2544	* trans-stmt.c (gfc_trans_deallocate): Likewise.
2545	* trans-types.c (gfc_typenode_for_spec, gfc_copy_dt_decls_ifequal,
2546	gfc_get_derived_type): Likewise.
2547
25482016-05-05  Jakub Jelinek  <jakub@redhat.com>
2549
2550	* openmp.c (gfc_match_omp_clauses): Restructuralize, so that clause
2551	parsing is done in a big switch based on gfc_peek_ascii_char and
2552	individual clauses under their first letters are sorted too.
2553
25542016-05-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
2555
2556	* trans-types.c (gfc_build_complex_type):
2557
25582016-05-02  Richard Biener  <rguenther@suse.de>
2559
2560	* trans-array.c (gfc_trans_create_temp_array): Properly
2561	create a DECL_EXPR for the anonymous VLA array type.
2562
25632016-04-29  Cesar Philippidis  <cesar@codesourcery.com>
2564
2565	PR middle-end/70626
2566	* trans-openmp.c (gfc_trans_oacc_combined_directive): Duplicate
2567	the reduction clause in both parallel and loop directives.
2568
25692016-04-18  Michael Matz  <matz@suse.de>
2570
2571	* trans-io.c (gfc_build_io_library_fndecls): Use SET_TYPE_ALIGN.
2572	* trans-common.c (build_common_decl): Use SET_DECL_ALIGN.
2573	* trans-types.c (gfc_add_field_to_struct): Use SET_DECL_ALIGN.
2574
25752016-04-13  Dominique d'Humieres  <dominiq@lps.ens.fr>
2576
2577	PR fortran/67039
2578	* intrinsic.texi: Correct the documentation of pseudorandom
2579	number intrinsics.
2580
25812016-04-13  Dominique d'Humieres  <dominiq@lps.ens.fr>
2582
2583	PR fortran/58000
2584	* gfortran.texi: Document OPEN( ... NAME=) as not implemented
2585	in GNU Fortran
2586
25872016-04-09  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2588
2589	PR fortran/68566
2590	* array.c (match_array_element_spec): Add check for non-integer.
2591	* simplify.c (gfc_simplify_reshape): If source shape is NULL return.
2592
25932016-04-06  Patrick Palka  <ppalka@gcc.gnu.org>
2594
2595	PR c/70436
2596	* openmp.c (gfc_find_omp_udr): Add explicit braces to resolve a
2597	future -Wparentheses warning.
2598
25992016-04-04  Andre Vehreschild  <vehre@gcc.gnu.org>
2600
2601	PR fortran/67538
2602	* resolve.c (resolve_allocate_expr): Emit error message when no
2603	array spec and no array valued source= expression is given in an
2604	F2008 allocate() for an array to allocate.
2605
26062016-04-04  Andre Vehreschild  <vehre@gcc.gnu.org>
2607
2608	PR fortran/65795
2609	* trans-array.c (gfc_array_allocate): When the array is a coarray,
2610	do not nullyfing its allocatable components in array_allocate, because
2611	the nullify missed the array ref and nullifies the wrong component.
2612	Cosmetics.
2613
26142016-03-29  Andre Vehreschild  <vehre@gcc.gnu.org>
2615
2616	PR fortran/70397
2617	* trans-expr.c (gfc_class_len_or_zero_get): Add function to return a
2618	constant zero tree, when the class to get the _len component from is
2619	not unlimited polymorphic.
2620	(gfc_copy_class_to_class): Use the new function.
2621	* trans.h: Added interface of new function gfc_class_len_or_zero_get.
2622
26232016-03-28  Alessandro Fanfarillo  <fanfarillo.gcc@gmail.com>
2624
2625	* trans-decl.c (gfc_build_builtin_function_decls):
2626	caf_stop_numeric and caf_stop_str definition.
2627	* trans-stmt.c (gfc_trans_stop): invoke external functions
2628	for stop and stop_str when coarrays are used.
2629	* trans.h: extern for new functions.
2630
26312016-03-19  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2632
2633	PR fortran/69043
2634	* scanner.c (load_file): Update to use S_ISREG macro.
2635
26362016-03-17  Thomas Schwinge  <thomas@codesourcery.com>
2637
2638	* gfortran.h (enum gfc_omp_map_op): Rename OMP_MAP_FORCE_DEALLOC
2639	to OMP_MAP_DELETE.  Adjust all users.
2640
26412016-03-13  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2642	    Jim MacArthur  <jim.macarthur@codethink.co.uk>
2643
2644	PR fortran/69043
2645	* scanner.c (load_file): Check that included file is regular.
2646
26472016-03-12  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2648	    Harold Anlauf  <anlauf@gmx.de>
2649
2650	PR fortran/69520
2651	* invoke.texi: Explain use of the 'no-' construct within the
2652	-fcheck= option.
2653	* options.c (gfc_handle_runtime_check_option): Enable use of
2654	'no-' prefix for the various options with -fcheck= to allow
2655	negating previously enabled check options.
2656
26572016-03-12  Paul Thomas  <pault@gcc.gnu.org>
2658
2659	PR fortran/70031
2660	* decl.c (gfc_match_prefix): Treat the 'module' prefix in the
2661	same way as the others, rather than fixing it to come last.
2662	(gfc_match_function_decl, gfc_match_subroutine): After errors
2663	in 'copy_prefix', emit them immediately in the case of module
2664	procedures to prevent a later ICE.
2665
2666	PR fortran/69524
2667	* decl.c (gfc_match_submod_proc): Permit 'module procedure'
2668	declarations within the contains section of modules as well as
2669	submodules.
2670	* resolve.c (resolve_fl_procedure): Likewise.
2671	*trans-decl.c (build_function_decl): Change the gcc_assert to
2672	allow all forms of module procedure declarations within module
2673	contains sections.
2674
26752016-02-28  Thomas Koenig  <tkoenig@gcc.gnu.org>
2676
2677	PR fortran/68147
2678	PR fortran/47674
2679	* frontend-passes.c (realloc_string_callback): Don't set
2680	walk_subtrees.
2681
26822016-02-28  Thomas Koenig  <tkoenig@gcc.gnu.org>
2683
2684	* dump-parse-tree.c (show_code_node):  Print association
2685	list of a block if present.  Handle EXEC_END_BLOCK.
2686
26872016-02-28  Harald Anlauf  <anlauf@gmx.de>
2688	    Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2689
2690	PR fortran/56007
2691	* match.c (gfc_match_iterator): Add diagnostic for array variable
2692	as do loop index.
2693
26942016-02-27  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2695	    Steven G. Kargl  <kargl@gcc.gnu.org>
2696
2697	PR fortran/69910
2698	* io.c (gfc_match_open): Check that open status is an expression
2699	constant before comparing string to 'scratch' with NEWUNIT.
2700
27012016-02-27  Alessandro Fanfarillo  <fanfarillo.gcc@gmail.com>
2702
2703	* trans.c (gfc_allocate_allocatable): size conversion
2704	from byte to number of elements for event variables.
2705	* trans-types.c (gfc_get_derived_type): event variables
2706	represented as a pointer (like lock variable).
2707
27082016-02-23  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2709
2710	PR fortran/61156
2711	* scanner.c (add_path_to_list): If include path is not a directory,
2712	issue a fatal error.
2713
27142016-02-23  Andre Vehreschild  <vehre@gcc.gnu.org>
2715
2716	PR fortran/67451
2717	* trans-array.c (gfc_array_allocate): Take the attributes from the
2718	expression to allocate and not from the source=-expression.
2719
27202016-02-20  Paul Thomas  <pault@gcc.gnu.org>
2721
2722	PR fortran/69423
2723	* trans-decl.c (create_function_arglist): Deferred character
2724	length functions, with and without declared results, address
2725	the passed reference type as '.result' and the local string
2726	length as '..result'.
2727	(gfc_null_and_pass_deferred_len): Helper function to null and
2728	return deferred string lengths, as needed.
2729	(gfc_trans_deferred_vars): Call it, thereby reducing repeated
2730	code, add call for deferred arrays and reroute pointer function
2731	results. Avoid using 'tmp' for anything other that a temporary
2732	tree by introducing 'type_of_array' for the arrayspec type.
2733
27342015-02-16  Thomas Koenig  <tkoenig@gcc.gnu.org>
2735
2736	PR fortran/69742
2737	* frontend-passes.c (cfe-expr_0):  Don't register functions
2738	from within an ASSOCIATE statement.
2739
27402016-02-14  Thomas Koenig  <tkoenig@gcc.gnu.org>
2741
2742	PR fortran/60526
2743	* decl.c (build_sym):  If the name has already been defined as a
2744	type, it has a symtree with an upper case letter at the beginning.
2745	If such a symtree exists, issue an error and exit.  Don't do
2746	this if there is no corresponding upper case letter.
2747
27482016-02-14  Thomas Koenig  <tkoenig@gcc.gnu.org>
2749
2750	PR fortran/60526
2751	PR bootstrap/69816
2752	* decl.c (build_sym):  Reverted previous patch.
2753
27542016-02-14  Thomas Koenig  <tkoenig@gcc.gnu.org>
2755
2756	PR fortran/60526
2757	* decl.c (build_sym):  If the name has already been defined as a
2758	type, issue error and return false.
2759
27602016-02-12  David Malcolm  <dmalcolm@redhat.com>
2761
2762	PR other/69554
2763	* error.c (gfc_diagnostic_start_span): New function.
2764	(gfc_diagnostics_init): Initialize global_dc's start_span.
2765
27662016-02-11  Andre Vehreschild  <vehre@gcc.gnu.org>
2767
2768	PR fortran/69296
2769	* gfortran.h: Added flag to gfc_association_list indicating that
2770	the rank of an associate variable has been guessed only.
2771	* parse.c (parse_associate): Set the guess flag mentioned above
2772	when guessing the rank of an expression.
2773	* resolve.c (resolve_assoc_var): When the rank has been guessed,
2774	make sure, that the guess was correct else overwrite with the actual
2775	rank.
2776	* trans-stmt.c (trans_associate_var): For subref_array_pointers in
2777	class objects, take the span from the _data component.
2778
27792016-02-07  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2780
2781	PR fortran/50555
2782	* primary.c (match_actual_arg): If symbol has attribute flavor of
2783	namelist, generate an error. (gfc_match_rvalue): Likewise return
2784	MATCH_ERROR.
2785	* resolve.c (resolve_symbol): Scan arument list of procedures and
2786	generate an error if a namelist is found.
2787
27882016-02-05  Mikael Morin  <mikael@gcc.gnu.org>
2789
2790	PR fortran/66089
2791	* trans-expr.c (expr_is_variable, gfc_expr_is_variable): Rename
2792	the former to the latter and make it non-static.  Update callers.
2793	* gfortran.h (gfc_expr_is_variable): New declaration.
2794	(struct gfc_ss_info): Add field needs_temporary.
2795	* trans-array.c (gfc_scalar_elemental_arg_saved_as_argument):
2796	Tighten the condition on aggregate expressions with a check
2797	that the expression is a variable and doesn't need a temporary.
2798	(gfc_conv_resolve_dependency): Add intermediary reference variable.
2799	Set the needs_temporary field.
2800
28012016-02-03  Andre Vehreschild  <vehre@gcc.gnu.org>
2802
2803	PR fortran/67451
2804	PR fortran/69418
2805	* trans-expr.c (gfc_copy_class_to_class): For coarrays just the
2806	pointer is passed.  Take it as is without trying to deref the
2807	_data component.
2808	* trans-stmt.c (gfc_trans_allocate): Take care of coarrays as
2809	argument to source=-expression.
2810
28112016-02-02  Nathan Sidwell  <nathan@codesourcery.com>
2812
2813	* lang.opt (fopenacc-dim=): New option.
2814
28152016-01-31  Paul Thomas  <pault@gcc.gnu.org>
2816
2817	PR fortran/67564
2818	* trans-expr.c (gfc_conv_procedure_call): For the vtable copy
2819	subroutines, add a string length argument, when the actual
2820	argument is an unlimited polymorphic class object.
2821
28222016-01-30  Paul Thomas  <pault@gcc.gnu.org>
2823
2824	PR fortran/69566
2825	* trans-expr.c (gfc_conv_procedure_call): Correct expression
2826	for 'ulim_copy', which was missing a test for 'comp'.
2827
28282016-01-28  Andre Vehreschild  <vehre@gcc.gnu.org>
2829
2830	PR fortran/62536
2831	* decl.c (gfc_match_end): Only unnest and remove BLOCK namespaces
2832	when the END encountered does not match a BLOCK's end.
2833
28342016-01-27  Janus Weil  <janus@gcc.gnu.org>
2835
2836	PR fortran/69484
2837	* invoke.texi: Fix documentation of -Wall with respect to -Wtabs.
2838
28392016-01-27  Paul Thomas  <pault@gcc.gnu.org>
2840
2841	PR fortran/69422
2842	* trans-expr.c (is_scalar_reallocatable_lhs): Remove the check
2843	for allocatable components, whilst checking if the symbol is a
2844	derived or class entity..
2845
28462016-01-26  Paul Thomas  <pault@gcc.gnu.org>
2847
2848	PR fortran/69385
2849	* trans-expr.c (gfc_trans_assignment_1): Exclude initialization
2850	assignments from check on assignment of scalars to unassigned
2851	arrays and correct wrong code within the corresponding block.
2852
28532016-01-26  David Malcolm  <dmalcolm@redhat.com>
2854
2855	PR other/69006
2856	* error.c (gfc_diagnostic_starter): Delete use of pp_newline.
2857
28582016-01-23  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2859
2860	PR fortran/69397
2861	PR fortran/68442
2862	* interface.c (gfc_arglist_matches_symbol): Replace assert with
2863	a return false if not a procedure.
2864	* resolve.c (resolve_generic_f): Test if we are resolving an
2865	initialization expression and adjust error message accordingly.
2866
28672016-01-24  Thomas Koenig  <tkoenig@gcc.gnu.org>
2868
2869	PR fortran/66094
2870	* frontend-passes.c (matmul_lhs_realloc):  Add
2871	forgotten break statement.
2872
28732016-01-24  Dominique d'Humieres  <dominiq@lps.ens.fr>
2874
2875	PR fortran/68283
2876	* primary.c (gfc_variable_attr): revert revision r221955,
2877	call gfc_internal_error only if there is no error.
2878
28792016-01-24  Thomas Koenig  <tkoenig@gcc.gnu.org>
2880
2881	PR fortran/66094
2882	* frontend-passes.c (enum matrix_case):  Add case A2B2T for
2883	MATMUL(A,TRANSPoSE(B)) where A and B are rank 2.
2884	(inline_limit_check):  Also add A2B2T.
2885	(matmul_lhs_realloc):  Handle A2B2T.
2886	(check_conjg_variable):  Rename to
2887	(check_conjg_transpose_variable):  and also count TRANSPOSE.
2888	(inline_matmul_assign):  Handle A2B2T.
2889
28902016-01-21  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2891
2892	PR fortran/65996
2893	* error.c (gfc_error): Save the state of abort_on_error and set
2894	it to false for buffered errors to allow normal processing.
2895	Restore the state before leaving.
2896
28972016-01-19  Martin Jambor  <mjambor@suse.cz>
2898
2899	* types.def (BT_FN_VOID_UINT_PTR_INT_PTR): New.
2900	(BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR_INT_INT): Removed.
2901	(BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR_PTR): New.
2902
29032016-01-15  Paul Thomas  <pault@gcc.gnu.org>
2904
2905	PR fortran/64324
2906	* resolve.c (check_uop_procedure): Prevent deferred length
2907	characters from being trapped by assumed length error.
2908
2909	PR fortran/49630
2910	PR fortran/54070
2911	PR fortran/60593
2912	PR fortran/60795
2913	PR fortran/61147
2914	PR fortran/64324
2915	* trans-array.c (gfc_conv_scalarized_array_ref): Pass decl for
2916	function as well as variable expressions.
2917	(gfc_array_init_size): Add 'expr' as an argument. Use this to
2918	correctly set the descriptor dtype for deferred characters.
2919	(gfc_array_allocate): Add 'expr' to the call to
2920	'gfc_array_init_size'.
2921	* trans.c (gfc_build_array_ref): Expand logic for setting span
2922	to include indirect references to character lengths.
2923	* trans-decl.c (gfc_get_symbol_decl): Ensure that deferred
2924	result char lengths that are PARM_DECLs are indirectly
2925	referenced both for directly passed and by reference.
2926	(create_function_arglist): If the length type is a pointer type
2927	then store the length as the 'passed_length' and make the char
2928	length an indirect reference to it.
2929	(gfc_trans_deferred_vars): If a character length has escaped
2930	being set as an indirect reference, return it via the 'passed
2931	length'.
2932	* trans-expr.c (gfc_conv_procedure_call): The length of
2933	deferred character length results is set TREE_STATIC and set to
2934	zero.
2935	(gfc_trans_assignment_1): Do not fix the rse string_length if
2936	it is a variable, a parameter or an indirect reference. Add the
2937	code to trap assignment of scalars to unallocated arrays.
2938	* trans-stmt.c (gfc_trans_allocate): Remove 'def_str_len' and
2939	all references to it. Instead, replicate the code to obtain a
2940	explicitly defined string length and provide a value before
2941	array allocation so that the dtype is correctly set.
2942	trans-types.c (gfc_get_character_type): If the character length
2943	is a pointer, use the indirect reference.
2944
29452016-01-10  Thomas Koenig  <tkoenig@gcc.gnu.org>
2946
2947	PR fortran/69154
2948	* frontend-passes.c (in_where):  New variable.
2949	(inline_matmul_assign):  Don't try this if we are within
2950	a WHERE statement.
2951	(gfc_code_walker):  Keep track of in_where.
2952
29532016-01-10  Paul Thomas  <pault@gcc.gnu.org>
2954
2955	PR fortran/67779
2956	* trans_array.c (gfc_conv_scalarized_array_ref): Add missing
2957	se->use_offset from condition for calculation of 'base'.
2958
29592016-01-08  Jakub Jelinek  <jakub@redhat.com>
2960
2961	PR fortran/69128
2962	* trans.h (OMPWS_SCALARIZER_BODY): Define.
2963	(OMPWS_NOWAIT): Renumber.
2964	* trans-stmt.c (gfc_trans_where_3): Only set OMPWS_SCALARIZER_WS
2965	if OMPWS_SCALARIZER_BODY is not set already, and set also
2966	OMPWS_SCALARIZER_BODY until the final loop creation.
2967	* trans-expr.c (gfc_trans_assignment_1): Likewise.
2968	* trans-openmp.c (gfc_trans_omp_workshare): Also clear
2969	OMPWS_SCALARIZER_BODY.
2970	* trans-array.c (gfc_trans_scalarized_loop_end): Don't create
2971	OMP_FOR if OMPWS_SCALARIZER_BODY is set.
2972
29732016-01-04  Jakub Jelinek  <jakub@redhat.com>
2974
2975	Update copyright years.
2976
2977	* gfortranspec.c (lang_specific_driver): Update copyright notice
2978	dates.
2979	* gfc-internals.texi: Bump @copying's copyright year.
2980	* gfortran.texi: Ditto.
2981	* intrinsic.texi: Ditto.
2982	* invoke.texi: Ditto.
2983
29842016-01-01  Paul Thomas  <pault@gcc.gnu.org>
2985
2986	PR fortran/68864
2987	* trans-array.c (evaluate_bound): If deferred, test that 'desc'
2988	is an array descriptor before using gfc_conv_descriptor_xxx.
2989
2990Copyright (C) 2016 Free Software Foundation, Inc.
2991
2992Copying and distribution of this file, with or without modification,
2993are permitted in any medium without royalty provided the copyright
2994notice and this notice are preserved.
2995