2015-12-18 Paul Thomas <pault@gcc.gnu.org>
[official-gcc.git] / gcc / fortran / ChangeLog
blobeeb79d9c8149a354a950576dc4c34a3f25b864cd
1 2015-12-18  Paul Thomas  <pault@gcc.gnu.org>
3         PR fortran/68196
4         *expr.c (gfc_has_default_initializer): Prevent infinite recursion
5         through this function for procedure pointer components.
6         * trans-array.c (structure_alloc_comps): Ditto twice.
8 2015-12-15  Alessandro Fanfarillo  <fanfarillo.gcc@gmail.com>
10         * resolve.c (resolve_critical): Committing symbols of
11         lock variables.
13 2014-12-14  Tobias Burnus  <burnus@net-b.de>
15         PR fortran/68850
16         * gfortran.texi (Standards): Mention TS 18508.
17         (Fortran 2003 and 2008 Status): Add section on TS 18508 status.
18         * intrinsic.texi (EVENT_QUERY): Add.
20 2014-12-12  Tobias Burnus  <burnus@net-b.de>
22         PR fortran/45859
23         * expr.c (gfc_is_simply_contiguous): Optionally permit array elements.
24         (gfc_check_pointer_assign): Update call.
25         * interface.c (compare_parameter): Ditto.
26         * trans-array.c (gfc_conv_array_parameter): Ditto.
27         * trans-intrinsic.c (gfc_conv_intrinsic_transfer,
28         conv_isocbinding_function): Ditto.
29         * gfortran.h (gfc_is_simply_contiguous): Update prototype.
31 2014-12-12  Tobias Burnus  <burnus@net-b.de>
33         PR fortran/68815
34         * check.c (gfc_check_reshape): Replace %<%d%> by %qd.
35         * matchexp.c (gfc_match_defined_op_name): Use %qc.
36         * symbol.c (gfc_add_new_implicit_range,
37         gfc_merge_new_implicit): Ditto.
39 2015-12-10  David Malcolm  <dmalcolm@redhat.com>
41         * io.c (gfc_match_open): Fix indentation.
43 2015-12-09  Tobias Burnus  <burnus@net-b.de>
44             Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
46         * trans.c (gfc_allocate_using_lib,gfc_deallocate_with_status):
47         Introducing __asm__ __volatile__ ("":::"memory")
48         after image control statements.
49         * trans-stmt.c  (gfc_trans_sync, gfc_trans_event_post_wait,
50         gfc_trans_lock_unlock, gfc_trans_critical): Ditto.
51         * trans-intrinsic.c (gfc_conv_intrinsic_caf_get,
52         conv_caf_send): Introducing __asm__ __volatile__ ("":::"memory")
53         after send, before get and around sendget.
55 2015-12-09  Tobias Burnus  <burnus@net-b.de>
57         PR fortran/68815
58         * decl.c (gfc_verify_c_interop_param, variable_decl): Use
59         %< ... %> for quoting in diagnostics.
60         * io.c (check_format): Ditto.
61         * resolve.c (resolve_operator): Ditto.
62         * symbol.c (check_conflict): Ditto.
63         * trans-common.c (translate_common): Ditto.
65 2015-12-07  David Malcolm  <dmalcolm@redhat.com>
67         * error.c (gfc_format_decoder): Update for change of
68         text_info::set_range to text_info::set_location.
70 2015-12-05  Paul Thomas  <pault@gcc.gnu.org>
72         PR fortran/68676
73         * decl.c (gfc_match_formal_arglist): Correct error, where 'sym'
74         was used instead of 'progname'.
76 2015-12-02  Tobias Burnus  <burnus@net-b.de>
77             Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
79         * check.c (gfc_check_event_query): New function.
80         * dump-parse-tree.c (show_code_node): Handle EXEC_EVENT_POST,
81         EXEC_EVENT_WAIT.
82         * expr.c (gfc_check_vardef_context): New check for event variables
83         definition.
84         * gfortran.h (gfc_statement): Add ST_EVENT_POST, ST_EVENT_WAIT.
85         (gfc_isym_id): GFC_ISYM_EVENT_QUERY.
86         (struct symbol_attribute): New field.
87         (gfc_exec_op): Add EXEC_EVENT_POST and EXEC_EVENT_WAIT.
88         * gfortran.texi: Document about new events functions and minor
89         changes.
90         * interface.c (compare_parameter): New check.
91         (gfc_procedure_use): New check for explicit procedure interface.
92         (add_subroutines): Add event_query.
93         * intrinsic.h (gfc_check_event_query,gfc_resolve_event_query):
94         New prototypes.
95         * iresolve.c (gfc_resolve_event_query): New function.
96         * iso-fortran-env.def (event_type): New type.
97         * match.c (event_statement,gfc_match_event_post,gfc_match_event_wait):
98         New functions.
99         (gfc_match_name): New event post and event wait.
100         * match.h (gfc_match_event_post,gfc_match_event_wait):
101         New prototypes.
102         * module.c (ab_attribute): Add AB_EVENT_COMP.
103         (attr_bits): Likewise.
104         (mio_symbol_attribute): Handle event_comp attribute.
105         * parse.c (decode_statement): Add ST_EVENT_POST, ST_EVENT_WAIT.
106         (next_statement): Add ST_EVENT_POST, ST_EVENT_WAIT.
107         (gfc_ascii_statement): Add ST_EVENT_POST, ST_EVENT_WAIT.
108         (parse_derived): Check for event_type components.
109         * resolve.c (resolve_allocate_expr): Check for event variable def.
110         (resolve_lock_unlock): Renamed to resolve_lock_unlock_event. It
111         includes logic for locks and events.
112         (gfc_resolve_code): Call it.
113         (gfc_resolve_symbol): New check for event variable to be a corray.
114         * st.c (gfc_free_statement): Handle new EXEC_EVENT_POST and
115         EXEC_EVENT_WAIT.
116         * trans-decl.c (gfor_fndecl_caf_event_post,gfor_fndecl_caf_event_wait,
117         gfor_fndecl_caf_event_query): New global variables.
118         (generate_coarray_sym_init): Checking for event_type.
119         (gfc_conv_procedure_call): Check for C bind attribute.
120         * trans-intrinsic.c (conv_intrinsic_event_query): New function.
121         (conv_intrinsic_move_alloc): Call it.
122         * trans-stmt.c (gfc_trans_lock_unlock): Passing address
123         of actual argument.
124         (gfc_trans_sync): Likewise.
125         (gfc_trans_event_post_wait): New function.
126         * trans-stmt.h (gfc_trans_event_post_wait): New prototype.
127         * trans-types.c (gfc_get_derived_type): Integer_kind as event_type.
128         * trans.c (gfc_allocate_using_lib): New argument and logic for events.
129         (gfc_allocate_allocatable): Passing new argument.
130         (trans_code): Handle EXEC_EVENT_POST, EXEC_EVENT_WAIT.
131         * trans.h (gfc_coarray_type): New elements.
132         (gfor_fndecl_caf_event_post,gfor_fndecl_caf_event_wait,
133         gfor_fndecl_caf_event_query): Declare them.
135 2015-12-02  Cesar Philippidis  <cesar@codesourcery.com>
137         PR fortran/63861
138         * openmp.c (gfc_match_omp_clauses): Allow subarrays for acc reductions.
139         (resolve_omp_clauses): Error on any acc reductions on arrays.
141 2015-12-01  Cesar Philippidis  <cesar@codesourcery.com>
143         * dump-parse-tree.c (show_omp_clauses): Handle optional num and static
144         arguments for the gang clause.
145         * gfortran.h (gfc_omp_clauses): Rename gang_expr as gang_num_expr.
146         Add gang_static_expr.
147         * openmp.c (gfc_free_omp_clauses): Update to free gang_num_expr and
148         gang_static_expr.
149         (match_oacc_clause_gang): Update to support both num and static in
150         the same clause.
151         (resolve_omp_clauses): Formatting.  Also handle gang_num_expr and
152         gang_static_expr.
153         (resolve_oacc_params_in_parallel): New const char arg argument.
154         Use it to report more accurate gang, worker and vector clause errors.
155         (resolve_oacc_loop_blocks): Update calls to
156         resolve_oacc_params_in_parallel.
157         * trans-openmp.c (gfc_trans_omp_clauses): Update the gimplification of
158         the gang clause.
159         (gfc_trans_oacc_combined_directive): Make use of gang_num_expr and
160         gang_static_expr.  Remove OMP_LIST_REDUCTION from construct_clauses.
162 2015-11-30  Cesar Philippidis  <cesar@codesourcery.com>
163             James Norris  <jnorris@codesourcery.com>
164             Nathan Sidwell  <nathan@codesourcery.com>
166         * f95-lang.c (gfc_attribute_table): Add an "oacc function"
167         attribute.
168         * gfortran.h (symbol_attribute): Add an oacc_function bit-field.
169         (gfc_oacc_routine_name): New struct;
170         (gfc_get_oacc_routine_name): New macro.
171         (gfc_namespace): Add oacc_routine_clauses, oacc_routine_names and
172         oacc_routine fields.
173         (gfc_exec_op): Add EXEC_OACC_ROUTINE.
174         * openmp.c (OACC_ROUTINE_CLAUSES): New mask.
175         (gfc_oacc_routine_dims): New function.
176         (gfc_match_oacc_routine): Add support for named routines and the
177         gang, worker vector and seq clauses.
178         * parse.c (is_oacc): Add EXEC_OACC_ROUTINE.
179         * resolve.c (gfc_resolve_blocks): Likewise.
180         * st.c (gfc_free_statement): Likewise.
181         * trans-decl.c (add_attributes_to_decl): Attach an 'oacc function'
182         attribute and shape geometry for acc routine.
184 2015-11-30  Paul Thomas  <pault@gcc.gnu.org>
186         PR fortran/68534
187         * decl.c (gfc_match_formal_arglist): Cope with zero formal args
188         either in interface declaration or in procedure declaration in
189         submodule.
191 2015-11-25  Steven G. Kargl  <kargl@gcc.gnu.org>
193         PR fortran/68227
194         * trans-stmt.c (gfc_do_allocate): Convert gcc_assert argument into
195         into part of conditional statement.
197 2015-11-25  Ilmir Usmanov <me@ilmir.us>
198             Cesar Philippidis  <cesar@codesourcery.com>
200         PR fortran/63858
201         * scanner.c (skip_oacc_attribute): Remove continue_flag parameter.
202         Rename as ...
203         (skip_free_oacc_sentinel): ... this.
204         (skip_omp_attribute): Remove continue_flag parameter. Rename as ...
205         (skip_free_omp_sentinel): ... this.
206         (skip_free_comments): Update to call skip_free_oacc_sentinel and
207         skip_free_omp_sentinel.
208         (skip_fixed_omp_sentinel): New function.
209         (skip_fixed_oacc_sentinel): New function.
210         (skip_fixed_comments): Fix mix of OpenACC and OpenMP sentinels in
211         continuation.
213 2015-11-24  Steven G. Kargl  <kargl@gcc.gnu.org>
215         PR fortran/68486
216         * simplify.c (gfc_simplify_cshift): Allow all EXPR_*.
218 2015-11-22  Steven G. Kargl  <kargl@gcc.gnu.org>
220         PR fortran/68486
221         * simplify.c (gfc_simplify_cshift):  Add EXPR_OP to mix.
223 2015-11-22  James Norris  <jnorris@codesourcery.com>
224             Steven G. Kargl  <kargl@gcc.gnu.org>
226         * openmp.c (match_oacc_clause_gang): Fix uninitialized variable.
227         (gfc_resolve_oacc_declare): Fix comparision.
229 2015-11-22  James Norris  <jnorris@codesourcery.com>
230             Cesar Philippidis  <cesar@codesourcery.com>
232         * dump-parse-tree.c (show_namespace): Handle declares.
233         * gfortran.h (struct symbol_attribute): New fields.
234         (enum gfc_omp_map_map): Add OMP_MAP_DEVICE_RESIDENT and OMP_MAP_LINK.
235         (OMP_LIST_LINK): New enum.
236         (struct gfc_oacc_declare): New structure.
237         (gfc_get_oacc_declare): New definition.
238         (struct gfc_namespace): Change type.
239         (enum gfc_exec_op): Add EXEC_OACC_DECLARE.
240         (struct gfc_code): New field.
241         * module.c (enum ab_attribute): Add AB_OACC_DECLARE_CREATE,
242         AB_OACC_DECLARE_COPYIN, AB_OACC_DECLARE_DEVICEPTR,
243         AB_OACC_DECLARE_DEVICE_RESIDENT, AB_OACC_DECLARE_LINK
244         (attr_bits): Add new initializers.
245         (mio_symbol_attribute): Handle new atributes.
246         * openmp.c (gfc_free_oacc_declare_clauses): New function.
247         (gfc_match_oacc_clause_link: Likewise.
248         (OMP_CLAUSE_LINK): New definition.
249         (gfc_match_omp_clauses): Handle OMP_CLAUSE_LINK.
250         (OACC_DECLARE_CLAUSES): Add OMP_CLAUSE_LINK
251         (gfc_match_oacc_declare): Add checking and module handling.
252         (resolve_omp_clauses): Add array initializer.
253         (gfc_resolve_oacc_declare): Reimplement.
254         * parse.c (case_decl): Add ST_OACC_DECLARE.
255         (parse_spec): Remove handling.
256         (parse_progunit): Remove handling.
257         * parse.h (struct gfc_state_data): Change type.
258         * resolve.c (gfc_resolve_blocks): Handle EXEC_OACC_DECLARE.
259         * st.c (gfc_free_statement): Handle EXEC_OACC_DECLARE.
260         * symbol.c (check_conflict): Add conflict checks.
261         (gfc_add_oacc_declare_create, gfc_add_oacc_declare_copyin,
262         gfc_add_oacc_declare_deviceptr, gfc_add_oacc_declare_device_resident):
263         New functions.
264         (gfc_copy_attr): Handle new symbols.
265         * trans-decl.c (add_clause, find_module_oacc_declare_clauses,
266         finish_oacc_declare): New functions.
267         (gfc_generate_function_code): Replace with call.
268         * trans-openmp.c (gfc_trans_oacc_declare): Reimplement.
269         (gfc_trans_oacc_directive): Handle EXEC_OACC_DECLARE.
270         * trans-stmt.c (gfc_trans_block_construct): Replace with call.
271         * trans-stmt.h (gfc_trans_oacc_declare): Remove argument.
272         * trans.c (trans_code): Handle EXEC_OACC_DECLARE.
274 2015-11-21  Steven G. Kargl  <kargl@gcc.gnu.org>
276         * simplify.c (gfc_simplify_cshift): Work around bootstrap issues
277         due to inappropriate warning options.
279 2015-11-21  Steven G. Kargl  <kargl@gcc.gnu.org>
281         * simplify.c (gfc_simplify_cshift): Implement simplification of
282         CSHIFT for rank=1 arrays.
283         (gfc_simplify_spread): Remove a FIXME and add error condition.
284         * intrinsic.h: Prototype for gfc_simplify_cshift
285         * intrinsic.c (add_functions): Use gfc_simplify_cshift.
287 2015-11-20  Steven G. Kargl  <kargl@gcc.gnu.org>
289         PR fortran/68237
290         * decl.c (gfc_match_submod_proc): Test the interface symbol
291         before accessing its attributes.
293 2015-11-20  Paul Thomas  <pault@gcc.gnu.org>
295         PR fortran/66762
296         (gfc_get_symbol_decl): Test for attr.used_in_submodule as well
297         as attr.use_assoc (twice).
298         (gfc_create_module_variable): Ditto.
300 2015-11-18  Steven G. Kargl  <kargl@gcc.gnu.org>
302         PR fortran/59910
303         * primary.c (gfc_match_structure_constructor): Reduce a structure
304         constructor in a DATA statement.
306 2015-11-18  Steven G. Kargl  <kargl@gcc.gnu.org>
308         PR fortran/43996
309         * simplify.c (gfc_simplify_spread): Issue error for too large array
310         constructor in a PARAMETER statement.
312 2015-11-17  Steven G. Kargl  <kargl@gcc.gnu.org>
314         * primary.c (gfc_match_structure_constructor): Fix whitespace.
316 2015-11-17  Dominique d'Humieres <dominiq@lps.ens.fr>
318         PR fortran/65751
319         * expr.c (gfc_check_pointer_assign): Fix error message.
321 2015-11-16  Steven G. Kargl  <kargl@gcc.gnu.org>
323         PR fortran/58027
324         PR fortran/60993
325         * expr.c (gfc_check_init_expr): Prevent a redundant check when a
326         __convert_* function was inserted into an array constructor.
327         (gfc_check_assign_symbol): Check for an initialization expression
328         when a __convert_* was inserted.
330 2015-11-15  Paul Thomas  <pault@gcc.gnu.org>
332         PR fortran/50221
333         PR fortran/68216
334         PR fortran/63932
335         PR fortran/66408
336         * trans_array.c (gfc_conv_scalarized_array_ref): Pass the
337         symbol decl for deferred character length array references.
338         * trans-stmt.c (gfc_trans_allocate): Keep the string lengths
339         to update deferred length character string lengths.
340         * trans-types.c (gfc_get_dtype_rank_type); Use the string
341         length of deferred character types for the dtype size.
342         * trans.c (gfc_build_array_ref): For references to deferred
343         character arrays, use the domain max value, if it is a variable
344         to set the 'span' and use pointer arithmetic for acces to the
345         element.
346         (trans_code): Set gfc_current_locus for diagnostic purposes.
348         PR fortran/67674
349         * trans-expr.c (gfc_conv_procedure_call): Do not fix deferred
350         string lengths of components.
352         PR fortran/49954
353         * resolve.c (deferred_op_assign): New function.
354         (gfc_resolve_code): Call it.
355         * trans-array.c (concat_str_length): New function.
356         (gfc_alloc_allocatable_for_assignment): Jump directly to alloc/
357         realloc blocks for deferred character length arrays because the
358         string length might change, even if the shape is the same. Call
359         concat_str_length to obtain the string length for concatenation
360         since it is needed to compute the lhs string length.
361         Set the descriptor dtype appropriately for the new string
362         length.
363         * trans-expr.c (gfc_trans_assignment_1): Use the rse string
364         length for all characters, other than deferred types. For
365         concatenation operators, push the rse.pre block to the inner
366         most loop so that the temporary pointer and the assignments
367         are properly placed.
369 2015-11-14  Steven G. Kargl  <kargl@gcc.gnu.org>
371         PR fortran/67803
372         * array.c (gfc_match_array_constructor): If array constructor included
373         a CHARACTER typespec, check array elements for compatible type.
375 2015-11-13  Steven G. Kargl  <kargl@gccc.gnu.org>
377         PR fortran/68319
378         * decl.c (gfc_match_data, gfc_match_entry): Enforce F2008:C1206.
379         * io.c (gfc_match_format): Ditto.
380         * match.c (gfc_match_st_function): Ditto.
382 2015-11-13  David Malcolm  <dmalcolm@redhat.com>
384         * error.c (gfc_warning): Pass line_table to rich_location ctor.
385         (gfc_warning_now_at): Likewise.
386         (gfc_warning_now): Likewise.
387         (gfc_error_now): Likewise.
388         (gfc_fatal_error): Likewise.
389         (gfc_error): Likewise.
390         (gfc_internal_error): Likewise.
392 2015-11-12  Steven G. Kargl  <kargl@gcc.gnu.org>
394         PR fortran/68318
395         * decl.c (get_proc_name): Increment reference count for ENTRY.
396         While here, fix comment and use postfix ++ for consistency.
398 2015-11-11  Andrew MacLeod  <amacleod@redhat.com>
400         * array.c: Remove unused header files.
401         * convert.c: Likewise.
402         * cpp.c: Likewise.
403         * decl.c: Likewise.
404         * f95-lang.c: Likewise.
405         * frontend-passes.c: Likewise.
406         * iresolve.c: Likewise.
407         * match.c: Likewise.
408         * module.c: Likewise.
409         * options.c: Likewise.
410         * parse.c: Likewise.
411         * target-memory.c: Likewise.
412         * trans-array.c: Likewise.
413         * trans-common.c: Likewise.
414         * trans-const.c: Likewise.
415         * trans-decl.c: Likewise.
416         * trans-expr.c: Likewise.
417         * trans-intrinsic.c: Likewise.
418         * trans-io.c: Likewise.
419         * trans-openmp.c: Likewise.
420         * trans-stmt.c: Likewise.
421         * trans-types.c: Likewise.
422         * trans.c: Likewise.
424 2015-11-11  Dominique d'Humieres <dominiq@lps.ens.fr>
426         PR fortran/67826
427         * openmp.c (gfc_omp_udr_find): Fix typo.
429 2015-11-08  Steven g. Kargl  <kargl@gcc.gnu.org>
431         PR fortran/68053
432         * decl.c (add_init_expr_to_sym):  Try to reduce initialization expression
433         before testing for a constant value.
435 2015-11-08  Andre Vehreschild  <vehre@gcc.gnu.org>
437         PR fortran/68218
438         * trans-array.c (gfc_array_init_size): Add gfc_evaluate_now() when
439         array spec in allocate is a function call.
441 2015-11-08  Steven G. Kargl  <kargl@gc.gnu.org>
443         PR fortran/68224
444         * array.c (match_array_element_spec): Check of invalid NULL().
445         While here, fix nearby comments.
447 2015-11-08  Paul Thomas  <pault@gcc.gnu.org>
449         PR fortran/68196
450         * class.c (has_finalizer_component): Prevent infinite recursion
451         through this function if the derived type and that of its
452         component are the same.
453         * trans-types.c (gfc_get_derived_type): Do the same for proc
454         pointers by ignoring the explicit interface for the component.
456         PR fortran/66465
457         * check.c (same_type_check): If either of the expressions is
458         BT_PROCEDURE, use the typespec from the symbol, rather than the
459         expression.
461 2015-11-07  Steven G. Kargl  <kargl@gcc.gnu.org>
463         PR fortran/68153
464         * check.c (gfc_check_reshape): Improve check for valid SHAPE argument.
466 2015-11-07  Steven G. Kargl  <kargl@gcc.gnu.org>
468         PR fortran/68151
469         * match.c (match_case_selector):  Check for invalid type.
471 2015-11-06  David Malcolm  <dmalcolm@redhat.com>
473         * cpp.c (cb_cpp_error): Convert parameter from location_t to
474         rich_location *.  Eliminate the "column_override" parameter.
475         * error.c (gfc_warning): Update for change in signature of
476         diagnostic_set_info.
477         (gfc_format_decoder): Update handling of %C/%L for changes
478         to struct text_info.
479         (gfc_diagnostic_starter): Use richloc when determining whether to
480         print one locus or two.  When handling a location that will
481         involve a call to diagnostic_show_locus, only attempt to print the
482         locus for the primary location, and don't call into
483         diagnostic_print_caret_line.
484         (gfc_warning_now_at): Update for change in signature of
485         diagnostic_set_info.
486         (gfc_warning_now): Likewise.
487         (gfc_error_now): Likewise.
488         (gfc_fatal_error): Likewise.
489         (gfc_error): Likewise.
490         (gfc_internal_error): Likewise.
492 2015-11-05  Cesar Philippidis  <cesar@codesourcery.com>
494         * openmp.c (gfc_match_omp_clauses): Update support for the tile
495         and default clauses in OpenACC.
496         (gfc_match_oacc_update): Error when data clauses are supplied.
497         (oacc_compatible_clauses): Delete.
498         (resolve_omp_clauses): Give special care for OpenACC reductions.
499         Also update error reporting for the tile clause.
500         (resolve_oacc_loop_blocks): Update error reporting for the tile clause.
501         * trans-openmp.c (gfc_trans_omp_clauses): Update OMP_CLAUSE_SEQ. Add
502         OMP_CLAUSE_{AUTO,TILE} and add support the the gang static argument.
503         (gfc_trans_oacc_combined_directive): Update the list of clauses which
504         are split to acc loops.
506 2015-11-05  Jakub Jelinek  <jakub@redhat.com>
508         * types.def (BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR): Remove.
509         (BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR_INT_INT): New.
511 2015-11-03  Thomas Schwinge  <thomas@codesourcery.com>
512             Chung-Lin Tang  <cltang@codesourcery.com>
514         * gfortran.h (gfc_statement): Add ST_OACC_ATOMIC,
515         ST_OACC_END_ATOMIC.
516         (gfc_exec_op): Add EXEC_OACC_ATOMIC.
517         * match.h (gfc_match_oacc_atomic): New prototype.
518         * openmp.c (gfc_match_omp_atomic, gfc_match_oacc_atomic): New
519         wrapper functions around...
520         (gfc_match_omp_oacc_atomic): ... this new function.
521         (oacc_code_to_statement, gfc_resolve_oacc_directive): Handle
522         EXEC_OACC_ATOMIC.
523         * parse.c (decode_oacc_directive): Handle "atomic", "end atomic".
524         (case_exec_markers): Add ST_OACC_ATOMIC.
525         (gfc_ascii_statement): Handle ST_OACC_ATOMIC, ST_OACC_END_ATOMIC.
526         (parse_omp_atomic): Rename to...
527         (parse_omp_oacc_atomic): ... this new function.  Add omp_p formal
528         parameter.  Adjust all users.
529         (parse_executable): Handle ST_OACC_ATOMIC.
530         (is_oacc): Handle EXEC_OACC_ATOMIC.
531         * resolve.c (gfc_resolve_blocks, gfc_resolve_code): Handle
532         EXEC_OACC_ATOMIC.
533         * st.c (gfc_free_statement): Handle EXEC_OACC_ATOMIC.
534         * trans-openmp.c (gfc_trans_oacc_directive): Handle
535         EXEC_OACC_ATOMIC.
536         * trans.c (trans_code): Handle EXEC_OACC_ATOMIC.
538 2015-10-31  Cesar Philippidis  <cesar@codesourcery.com>
540         PR Bootstrap/68168
542         * openmp.c (resolve_omp_clauses): Pass &n->where when calling
543         gfc_error.
545 2015-10-30  Cesar Philippidis  <cesar@codesourcery.com>
547         * gfortran.h (gfc_omp_namespace): Add locus where member.
548         * openmp.c (gfc_match_omp_variable_list): Set where for each list
549         item found.
550         (resolve_omp_clauses): Remove where argument and use the where
551         gfc_omp_namespace member when reporting errors.
552         (resolve_omp_do):  Update call to resolve_omp_clauses.
553         (resolve_oacc_loop): Likewise.
554         (gfc_resolve_oacc_directive): Likewise.
555         (gfc_resolve_omp_directive): Likewise.
556         (gfc_resolve_omp_declare_simd): Likewise.
558 2015-10-15  Steven G. Kargl  <kargl@gcc.gnu.org>
560         PR fortran/51993
561         * decl.c (gfc_set_constant_character_len): Convert gcc_assert into an
562         if-statement causing an early return leads to valid error message.
564 2015-10-30  Steven G. Kargl  <kargl@gcc.gnu.org>
566         PR fortran/36192
567         * interface.c (get_expr_storage_size):  Check for INTEGER type before
568         calling gmp routines.
570 2015-10-30  Steven G. Kargl  <kargl@gcc.gnu.org>
572         PR fortran/68154
573         * decl.c (add_init_expr_to_sym): if the char length in the typespec
574         is NULL, check for and use a constructor.
576 2015-10-30  Steven G. Kargl  <kargl@gcc.gnu.org>
578         PR fortran/68054
579         * decl.c (match_attr_spec): PROTECTED can only be a module.
581 2015-10-29  Steven G. Kargl  <kargl@gcc.gnu.org>
583         PR fortran/67885
584         * trans-decl.c (generate_local_decl): Mark PARAMETER entities in
585         BLOCK construct.
587 2015-10-29  Andrew MacLeod  <amacleod@redhat.com>
589         * array.c: Reorder #include's and remove duplicates.
590         * convert.c: Likewise.
591         * cpp.c: Likewise.
592         * decl.c: Likewise.
593         * f95-lang.c: Likewise.
594         * frontend-passes.c: Likewise.
595         * iresolve.c: Likewise.
596         * match.c: Likewise.
597         * module.c: Likewise.
598         * options.c: Likewise.
599         * parse.c: Likewise.
600         * resolve.c: Likewise.
601         * simplify.c: Likewise.
602         * target-memory.c: Likewise.
603         * trans-array.c: Likewise.
604         * trans-common.c: Likewise.
605         * trans-const.c: Likewise.
606         * trans-decl.c: Likewise.
607         * trans-expr.c: Likewise.
608         * trans-intrinsic.c: Likewise.
609         * trans-io.c: Likewise.
610         * trans-openmp.c: Likewise.
611         * trans-stmt.c: Likewise.
612         * trans-types.c: Likewise.
613         * trans.c: Likewise.
615 2015-10-29  Richard Biener  <rguenther@suse.de>
617         * f95-lang.c: Properly build variadic types for classification
618         and comparison builtins.
620 2015-10-27  Thomas Schwinge  <thomas@codesourcery.com>
621             James Norris  <jnorris@codesourcery.com>
623         PR fortran/63865
624         * openmp.c (resolve_oacc_cache): Remove function.
625         (gfc_match_oacc_cache): Enable array sections.
626         (resolve_omp_clauses, gfc_resolve_oacc_directive): Change
627         accordingly.
628         * trans-openmp.c (gfc_trans_omp_clauses): Likewise.
630 2015-10-27  Steven G. Kargl  <kargl@gcc.gnu.org>
632         PR fortran/68108
633         * decl.c (char_len_param_value): Check for REF_ARRAY.
635 2015-10-26  Louis Krupp  <louis.krupp@zoho.com>
637         PR fortran/66056
638         * fortran.h: Include namespace pointer in statement label
639         structure.
640         * symbol.c (gfc_get_st_label): Store pointer to namespace
641         that owns the statement label tree in each label.
642         (gfc_free_st_label): Use namespace owning statement label
643         tree when deleting statement label.
644         * io.c: Initialize format_asterisk with NULL namespace pointer.
646 2015-10-26  Steven G. Kargl  <kargl@gcc.gnu.org>
648         PR fortran/36192
649         * array.c (gfc_ref_dimen_size): Check for BT_INTEGER before calling
650         mpz_set.
652 2015-10-26  Andre Vehreschild  <vehre@gcc.gnu.org>
654         PR fortran/66927
655         * trans-array.c (evaluate_bound): For deferred length arrays get the
656         bounds directly from the descriptor, i.e., prevent using constant
657         zero lower bound from the gfc_conv_array_lbound () routine.
658         (gfc_conv_section_startstride): Hand deferred array status to
659         evaluate_bound ().
660         (gfc_conv_expr_descriptor): Same.
662 2015-01-25  Paul Thomas  <pault@gcc.gnu.org>
664         PR fortran/67171
665         * trans-array.c (structure_alloc_comps): On deallocation of
666         class components, reset the vptr to the declared type vtable
667         and reset the _len field of unlimited polymorphic components.
668         *trans-expr.c (gfc_find_and_cut_at_last_class_ref): Bail out on
669         allocatable component references to the right of part reference
670         with non-zero rank and return NULL.
671         (gfc_reset_vptr): Simplify this function by using the function
672         gfc_get_vptr_from_expr. Return if the vptr is NULL_TREE.
673         (gfc_reset_len): If gfc_find_and_cut_at_last_class_ref returns
674         NULL return.
675         * trans-stmt.c (gfc_trans_allocate): Rely on the use of
676         gfc_trans_assignment if expr3 is a variable expression since
677         this deals correctly with array sections.
679 2015-10-25  Andre Vehreschild  <vehre@gcc.gnu.org>
681         PR fortran/66927
682         PR fortran/67044
683         * trans-array.c (build_array_ref): Modified call to
684         gfc_get_class_array_ref to adhere to new interface.
685         (gfc_conv_expr_descriptor): For one-based arrays that
686         are filled by a loop starting at one the start index of the
687         source array has to be mangled into the offset.
688         * trans-expr.c (gfc_get_class_array_ref): When the tree to get
689         the _data component is present already, add a way to supply it.
690         (gfc_copy_class_to_class): Allow to copy to a derived type also.
691         * trans-stmt.c (gfc_trans_allocate): Do not conv_expr_descriptor
692         for functions returning a class or derived object. Get the
693         reference instead.
694         * trans.h: Interface change of gfc_get_class_array_ref.
696 2015-10-24  Steven G. Kargl  <kargl@gcc.gnu.org>
698         PR fortran/68055
699         * decl.c (gfc_match_decl_type_spec): Check for valid kind in old-style
700         declarations.
702 2015-10-24  Steven G. Kargl  <kargl@gcc.gnu.org>
704         PR fortran/67805
705         * array.c (gfc_match_array_constructor): Check for error from type
706         spec matching.
707         * decl.c (char_len_param_value): Check for valid of charlen parameter.
708         Reap dead code dating to 2008.
709         match.c (gfc_match_type_spec): Special case the keyword use in REAL.
711 2015-10-23  Mikhail Maltsev  <maltsevm@gmail.com>
713         * trans-common.c (create_common): Adjust to use flag_checking.
714         * trans.c (gfc_add_modify_loc): Use gcc_checking_assert.
716 2015-10-21  Martin Sebor  <msebor@redhat.com>
718         PR driver/68043
719         * lang.opt: End each sentence that describes an option with a period.
721 2015-10-21  Steven G. Kargl  <kargl@gcc.gnu.org>
723         PR fortran/67939
724         * data.c (create_character_initializer): Deal with zero length string.
726 2015-10-19  Steven G. Kargl  <kargl@gcc.gnu.org>
728         * resolve.c (gfc_verify_binding_labels): Check for NULL pointer.
730 2015-10-19  Steven G. Kargl  <kargl@gcc.gnu.org>
732         PR fortran/68019
733         * decl.c (add_init_expr_to_sym): Remove an assert() to allow an error
734         message to be issued.
736 2015-10-18  Mikael Morin  <mikael@gcc.gnu.org>
738         PR fortran/67758
739         * gfortran.h (gfc_symbol): Expand comment.
740         * match.c (gfc_match_common): Delay adding the symbol to
741         the common_block after the gfc_add_in_common call.
742         * symbol.c (gfc_free_symbol): Move common block memory handling...
743         (gfc_set_symbol_common_block): ... here as a new function.
744         (restore_old_symbol): Restore common block fields.
745         (gfc_restore_last_undo_checkpoint):
746         Check the common_block pointer instead of the in_common attribute.
747         When a symbol has been removed from the common block linked list,
748         clear its common_next pointer.
750 2015-10-18  Paul Thomas  <pault@gcc.gnu.org>
752         PR fortran/67177
753         PR fortran/67977
754         * primary.c (match_substring): Add an argument 'deferred' to
755         flag that a substring reference with null start and end should
756         not be optimized away for deferred length strings.
757         (match_string_constant, gfc_match_rvalue): Set the argument.
758         * trans-expr.c (alloc_scalar_allocatable_for_assignment): If
759         there is a substring reference return.
760         * trans-intrinsic.c (conv_intrinsic_move_alloc): For deferred
761         characters, assign the 'from' string length to the 'to' string
762         length. If the 'from' expression is deferred, set its string
763         length to zero. If the 'to' expression has allocatable
764         components, deallocate them.
766 2015-10-17  Steven G. Kargl  <kargl@gcc.gnu.org>
768         PR fortran/67987
769         * decl.c (char_len_param_value): Unwrap unlong line.  If LEN < 0,
770         force it to zero per the Fortran 90, 95, 2003, and 2008 Standards.
771         * resolve.c (gfc_resolve_substring_charlen): Unwrap unlong line.
772         If 'start' is larger than 'end', length of substring is negative,
773         so explicitly set it to zero.
774         (resolve_charlen): Remove -Wsurprising warning.  Update comment to
775         reflect that the text is from the F2008 standard.
777 2015-10-16  Richard Biener  <rguenther@suse.de>
779         * trans-intrinsic.c (gfc_conv_intrinsic_lib_function): Adjust
780         calls to build_addr.
781         (gfc_conv_intrinsic_mod): Likewise.
782         (gfc_conv_intrinsic_ctime): Likewise.
783         (gfc_conv_intrinsic_fdate): Likewise.
784         (gfc_conv_intrinsic_ttynam): Likewise.
785         (gfc_conv_intrinsic_minmax_char): Likewise.
786         (gfc_conv_intrinsic_index_scan_verify): Likewise.
787         (gfc_conv_intrinsic_trim): Likewise.
789 2015-10-14  Maxim Ostapenko  <m.ostapenko@partner.samsung.com>
791         * parse.c (decode_statement): Initialize M to MATCH_NO.
793 2015-10-13  Jakub Jelinek  <jakub@redhat.com>
794             Ilya Verbin  <ilya.verbin@intel.com>
796         * f95-lang.c (DEF_FUNCTION_TYPE_9, DEF_FUNCTION_TYPE_10,
797         DEF_FUNCTION_TYPE_11, DEF_FUNCTION_TYPE_VAR_1): Define.
798         * trans-openmp.c (gfc_trans_omp_clauses): Set
799         OMP_CLAUSE_IF_MODIFIER to ERROR_MARK, OMP_CLAUSE_ORDERED_EXPR
800         to NULL.
801         (gfc_trans_omp_critical): Adjust for addition of clauses.
802         (gfc_trans_omp_ordered): Likewise.
803         * types.def (BT_FN_BOOL_UINT_LONGPTR_LONGPTR_LONGPTR,
804         BT_FN_BOOL_UINT_ULLPTR_ULLPTR_ULLPTR,
805         BT_FN_BOOL_UINT_LONGPTR_LONG_LONGPTR_LONGPTR,
806         BT_FN_BOOL_UINT_ULLPTR_ULL_ULLPTR_ULLPTR,
807         BT_FN_VOID_INT_SIZE_PTR_PTR_PTR_UINT_PTR,
808         BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR,
809         BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT_PTR_INT,
810         BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_UINT_LONG_INT_LONG_LONG_LONG,
811         BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_UINT_LONG_INT_ULL_ULL_ULL,
812         BT_FN_VOID_LONG_VAR, BT_FN_VOID_ULL_VAR): New.
813         (BT_FN_VOID_INT_PTR_SIZE_PTR_PTR_PTR,
814         BT_FN_VOID_INT_OMPFN_PTR_SIZE_PTR_PTR_PTR,
815         BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT_PTR): Remove.
817 2015-10-07  Andre Vehreschild  <vehre@gcc.gnu.org>
819         PR fortran/65889
820         * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): Handle pointer to and
821         on stack class objects as sizeof parameter.
823 2015-10-06  Louis Krupp <louis.krupp@zoho.com>
824         PR fortran/65766
825         * resolve.c (gfc_resolve_substring_charlen): For derived type,
826         use typespec of string component when resolving substring length.
828 2015-10-04  Mikael Morin  <mikael@gcc.gnu.org>
830         * match.c (gfc_match_common): Remove dead variable old_blank_common.
832 2015-10-04  Mikael Morin  <mikael@gcc.gnu.org>
834         PR fortran/67758
835         * match.c (gfc_match_common): Delay the common_block pointer
836         assignment after error checking.
837         Delay the call to gfc_add_in_common attribute after the handling
838         of array specs.
839         * resolve.c (resolve_common_vars): Call gfc_add_in_common again.
841 2015-10-04  Mikael Morin  <mikael@gcc.gnu.org>
843         * resolve.c (resolve_common_vars): Move access to the common
844         block's head symbol inside the function.
845         (resolve_common_blocks, resolve_types): Update callers.
847 2015-10-01  Louis Krupp <louis.krupp@zoho.com>
849         PR fortran/62242
850         PR fortran/52332
851         * trans-array.c
852         (store_backend_decl): Create new gfc_charlen instance if requested
853         (get_array_ctor_all_strlen): Call store_backend_decl requesting
854         new gfc_charlen
855         (trans_array_constructor): Call store_backend_decl requesting
856         new gfc_charlen if get_array_ctor_strlen was called
857         (gfc_add_loop_ss_code): Don't try to convert non-constant length
859 2015-10-01  Steven G. Kargl  <kargl@gcc.gnu.org>
861         PR fortran.67802
862         * decl.c (add_init_expr_to_sym): Numeric constant for character
863         length must be an INTEGER.
865 2015-10-01  Steven G. Kargl  <kargl@gcc.gnu.org>
867         PR fortran/66979
868         * io.c (gfc_resolve_filepos): Check for a UNIT number.  Add a nearby
869         missing 'return false'.
871 2015-10-01  Steven G. Kargl  <kargl@gcc.gnu.org>
873         PR fortran/67616
874         * primary.c (gfc_match_structure_constructor): Use a possibly
875         host-associated symtree to prevent ICE.
877 2015-09-28  Paul Thomas  <pault@gcc.gnu.org>
879         PR fortran/40054
880         PR fortran/63921
881         * decl.c (get_proc_name): Return if statement function is
882         found.
883         * expr.c (gfc_check_vardef_context): Add error return for
884         derived type expression lacking the derived type itself.
885         * match.c (gfc_match_ptr_fcn_assign): New function.
886         * match.h : Add prototype for gfc_match_ptr_fcn_assign.
887         * parse.c : Add static flag 'in_specification_block'.
888         (decode_statement): If in specification block match a statement
889         function, then, if no error arising from statement function
890         matching, try to match pointer function assignment.
891         (parse_interface): Set 'in_specification_block' on exiting from
892         parse_spec.
893         (parse_spec): Set and then reset 'in_specification_block'.
894         (gfc_parse_file): Set 'in_specification_block'.
895         * resolve.c (get_temp_from_expr): Extend to include functions
896         and array constructors as rvalues..
897         (resolve_ptr_fcn_assign): New function.
898         (gfc_resolve_code): Call it on finding a pointer function as an
899         lvalue. If valid or on error, go back to start of resolve_code.
900         * symbol.c (gfc_add_procedure): Add a sentence to the error to
901         flag up the ambiguity between a statement function and pointer
902         function assignment at the end of the specification block.
904 2015-09-28  Nathan Sidwell  <nathan@codesourcery.com>
906         * f95-lang.c (DEF_FUNCTION_TYPE_VAR_6): New.
907         (DEF_FUNCTION_TYPE_VAR_11): Delete.
908         * types.def (DEF_FUNCTION_TYPE_VAR_6): New.
909         (DEF_FUNCTION_TYPE_VAR_11): Delete.
911 2015-09-26  Mikael Morin  <mikael@gcc.gnu.org>
913         PR fortran/67721
914         * trans-expr.c (gfc_trans_assignment_1): Remove the non-constantness
915         condition guarding deep copy.
917 2013-09-26  Paul Thomas  <pault@gcc.gnu.org>
919         PR fortran/67567
920         * resolve.c (resolve_fl_procedure): For module procedures, take
921         the parent module name and the submodule name from the name of
922         the namespace.
924 2015-09-25  Steven G. Kargl  <kargl@gcc.gnu.org>
926         PR fortran/67614
927         * resolve.c (gfc_resolve_code): Prevent ICE for invalid EXPR_NULL.
929 2015-09-25  Steven G. Kargl  <kargl@gcc.gnu.org>
931         PR fortran/67525
932         * parse.c (match_deferred_characteristics): Remove an assert, which
933         allows an invalid SELECT TYPE selector to be detected.
935 2015-09-25  Manuel López-Ibáñez  <manu@gcc.gnu.org>
937         PR pretty-print/67567
938         * resolve.c (resolve_fl_procedure): Work-around when iface->module
939         == NULL.
941 2015-09-21  Steven G. Kargl  <kargl@gcc.gnu.org>
943         * resolve.c (nonscalar_typebound_assign): Fix typos in comment.
945 2015-09-21  Steven G. Kargl  <kargl@gcc.gnu.org>
947         PR fortran/67615
948         * resolve.c (gfc_resolve_code): Check for scalar expression in
949         arithmetic-if.
951 2015-09-17  Paul Thomas  <pault@gcc.gnu.org>
953         PR fortran/52846
954         PR fortran/67588
955         * module.c : Add static no_module_procedures.
956         (gfc_match_submodule): Correct memory leakage caused during the
957         freeing of use_lists.
958         (mio_symbol_attribute): Reset above if module procedure is
959         encountered.
960         (gfc_dump_module): Set above and exit without writing smod file
961         if it reset.
962         * gfortran.texi : Add section on submodule support.
964 2015-09-10  Steven G. Kargl  <kargl@gcc.gnu.org>
966         PR fortran/67526
967         * expr.c (gfc_check_init_expr): Do not dereference a NULL pointer.
969 2015-09-10  Paul Thomas  <pault@gcc.gnu.org>
971         PR fortran/66993
972         * module.c (read_module): If a symtree exists and the symbol has
973         been associated in a submodule from a parent (sub)module, attach
974         the symbol to a 'unique symtree' and the new symbol to the
975         existing symtree.
977 2015-09-04  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
979         * intrinsic.h (gfc_simplify_mvbits): Remove.
980         * simplify.c (gfc_simplify_mvbits): Remove.
981         * intrinsic.c (add_subroutines): Remove reference to
982         gfc_simplify_mvbits.
984 2015-09-04  Manuel López-Ibáñez  <manu@gcc.gnu.org>
986         PR fortran/67429
987         * error.c (gfc_clear_pp_buffer): Reset last_location, otherwise
988         caret lines might be skipped when actually giving a diagnostic.
990 2015-08-31  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
992         PR fortran/54833
993         * trans.c (gfc_call_free): Don't check if pointer is NULL.
994         * trans.h (gfc_call_free): Adjust comment.
996 2015-08-29  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
998         * trans.c (gfc_call_malloc, gfc_allocate_using_malloc,
999         gfc_allocate_using_lib, gfc_allocate_allocatable,
1000         gfc_call_realloc): Simplify code.
1001         * trans-array.c (gfc_trans_allocate_array_storage,
1002         gfc_trans_auto_array_allocation, gfc_conv_array_parameter): Do not
1003         convert gfc_call_free() argument.
1004         * trans-expr.c (gfc_conv_string_tmp, gfc_conv_procedure_call,
1005         fcncall_realloc_result): Likewise.
1006         * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Likewise.
1008 2015-08-28  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1010         PR fortran/53668
1011         * intrinsic.c (add_functions, add_subroutines): Remove resolution
1012         functions for FREE and MALLOC.
1013         * intrinsic.h (gfc_resolve_malloc, gfc_resolve_free): Remove.
1014         * iresolve.c (gfc_resolve_malloc, gfc_resolve_free): Remove.
1015         * trans-intrinsic.c (conv_intrinsic_free,
1016         gfc_conv_intrinsic_malloc): New functions.
1018 2015-08-24  Louis Krupp <louis.krupp@zoho.com>
1020         PR fortran/62536
1021         PR fortran/66175
1022         * decl.c (gfc_match_end): Clean up nested BLOCKs.
1023         * parse.c (parse_block_construct): Deal gracefully with cleaned-up
1024         BLOCKs.
1026 2015-08-23  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1028         PR libfortran/54572
1029         * config-lang.in: Add libbacktrace to target_libs.
1031 2015-08-18  Trevor Saunders  <tbsaunde@tbsaunde.org>
1033         * dependency.c, dependency.h, gfortran.h, io.c, module.c,
1034         parse.h, resolve.c, trans-types.h, trans.h: remove useless typedefs.
1036 2015-08-16  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1038         PR fortran/54656
1039         * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Add decl
1040         for quadruple precision BUILT_IN_SQRT.
1042 2015-08-16  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1044         * trans-intrinsic.c (conv_intrinsic_ieee_is_negative): Use type
1045         generic BUILT_IN_SIGNBIT.
1046         (conv_intrinsic_ieee_copy_sign): Likewise.
1047         * f95-lang.c (gfc_init_builtin_functions): Add BUILT_IN_ISINF,
1048         BUILT_IN_ISINF_SIGN, BUILT_IN_SIGNBIT, BUILT_IN_ISLESS,
1049         BUILT_IN_ISLESSGREATER, BUILT_IN_ISGREATER. Remove non-type generic
1050         variants of BUILT_IN_SIGNBIT.
1051         * mathbuiltins.def: Remove SIGNBIT.
1053 2015-08-16  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1055         PR fortran/41387
1056         * gfortran.texi: New section "File operations on symbolic links".
1058 2015-08-08  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1060         PR fortran/67059
1061         * gfortranspec.c (lang_specific_driver): Adjust --version output.
1063 2015-08-08  Bud Davis  <jmdavis@link.com>
1064             Mikael Morin  <mikael@gcc.gnu.org>
1066         PR fortran/59746
1067         * symbol.c (gfc_restore_last_undo_checkpoint): Delete a common block
1068         symbol if it was put in the list.
1070 2015-08-07  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1072         PR fortran/64104
1073         * expr.c (gfc_check_init_expr): Allow some IEEE functions in
1074         constant expressions.
1075         (external_spec_function): Allow some IEEE functions in specification
1076         expressions.
1077         * simplify.c (gfc_simplify_ieee_selected_real_kind): Remove.
1078         (simplify_ieee_selected_real_kind, simplify_ieee_support,
1079         matches_ieee_function_name, gfc_simplify_ieee_functions): New
1080         functions.
1081         * gfortran.h (gfc_simplify_ieee_selected_real_kind): Remove
1082         prototype.
1083         (gfc_simplify_ieee_functions): Add prototype.
1085 2015-08-06  Mikael Morin  <mikael@gcc.gnu.org>
1087         * trans.h (gfc_trans_scalar_assign): Remove fourth argument.
1088         * trans-expr.c (gfc_trans_scalar_assign): Merge fourth into sixth
1089         argument.
1090         (gfc_conv_subref_array_arg, gfc_trans_subarray_assign,
1091          gfc_trans_subcomponent_assign, gfc_trans_assignment_1): Update callers.
1092         * trans-array.c (gfc_conv_expr_descriptor): Ditto.
1093         * trans-stmt.c (forall_make_variable_temp,
1094         generate_loop_for_temp_to_lhs, generate_loop_for_rhs_to_temp,
1095         gfc_trans_where_assign, gfc_trans_where_3): Ditto.
1097 2015-08-05  Paul Thomas  <pault@gcc.gnu.org>
1099         PR fortran/52846
1100         * module.c (check_access): Return true if new static flag
1101         'dump_smod' is true..
1102         (gfc_dump_module): Rename original 'dump_module' and call from
1103         new version. Use 'dump_smod' rather than the stack state to
1104         determine if a submodule is being processed. The new version of
1105         this procedure sets 'dump_smod' depending on the stack state and
1106         then writes both the mod and smod files if a module is being
1107         processed or just the smod for a submodule.
1108         (gfc_use_module): Eliminate the check for module_name and
1109         submodule_name being the same.
1110         * trans-decl.c (gfc_finish_var_decl, gfc_build_qualified_array,
1111         get_proc_pointer_decl): Set TREE_PUBLIC unconditionally and use
1112         the conditions to set DECL_VISIBILITY as hidden and to set as
1113         true DECL_VISIBILITY_SPECIFIED.
1115 2015-08-04  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
1117         PR fortran/64022
1118         * simplify.c (gfc_simplify_ieee_selected_real_kind): Extend IEEE
1119         support to all real kinds.
1121 2015-08-03  Steven G. Kargl  <kargl@gcc.gnu.org>
1123         PR fortran/66942
1124         * trans-expr.c (gfc_conv_procedure_call): Avoid NULL pointer reference
1126 2015-08-03  Mikael Morin  <mikael@gcc.gnu.org>
1128         PR fortran/64921
1129         * class.c (generate_finalization_wrapper): Set finalization
1130         procedure symbol's always_explicit attribute.
1132 2015-08-01  Paul Thomas  <pault@gcc.gnu.org>
1134         PR fortran/67091
1135         * trans-intrinsic.c (gfc_conv_associated): Add the pre and post
1136         blocks for the second argument to se.
1138 2015-07-27  Thomas Schwinge  <thomas@codesourcery.com>
1140         * parse.c (parse_oacc_structured_block): Fix logic error.
1141         Reported by Mikael Morin <mikael.morin@sfr.fr>.
1143 2015-07-24  Mikael Morin  <mikael@gcc.gnu.org>
1145         PR fortran/64986
1146         * trans-expr.c (gfc_trans_assignment_1): Put component deallocation
1147         code at the beginning of the block.
1149 2015-07-22  Mikael Morin  <mikael@gcc.gnu.org>
1151         PR fortran/61831
1152         PR fortran/66929
1153         * trans-array.c (gfc_get_proc_ifc_for_expr): Use esym as procedure
1154         symbol if available.
1156 2015-07-17  Paul Thomas  <pault@gcc.gnu.org>
1158         PR fortran/52846
1159         * decl.c (gfc_match_end): Pick out declared submodule name from
1160         the composite identifier.
1161         * gfortran.h : Add 'submodule_name' to gfc_use_list structure.
1162         * module.c (gfc_match_submodule): Define submodule_name and add
1163         static 'submodule_name'.
1164         (gfc_match_submodule): Build up submodule filenames, using '@'
1165         as a delimiter. Store the output filename in 'submodule_name'.
1166         Similarly, the submodule identifier is built using '.' as an
1167         identifier.
1168         (gfc_dump_module): If current state is COMP_SUBMODULE, write
1169         to file 'submodule_name', using SUBMODULE_EXTENSION.
1170         (gfc_use_module): Similarly, use the 'submodule_name' field in
1171         the gfc_use_list structure and SUBMODULE_EXTENSION to read the
1172         implicitly used submodule files.
1174 2015-07-17  Alessandro Fanfarillo  <fanfarillo.gcc@gmail.com>
1176         * trans-intrinsic.c (conv_co_collective): Remove redundant address
1177         operator in the generated code.
1179 2015-07-17  Andre Vehreschild  <vehre@gcc.gnu.org>
1181         PR fortran/66035
1182         * trans-expr.c (alloc_scalar_allocatable_for_subcomponent_assignment):
1183         Compute the size to allocate for class and derived type objects
1184         correclty.
1185         (gfc_trans_subcomponent_assign): Only allocate memory for a
1186         component when the object to assign is not an allocatable class
1187         object (the memory is already present for allocatable class objects).
1188         Furthermore use copy_class_to_class for assigning the rhs to the
1189         component (may happen for dummy class objects on the rhs).
1191 2015-07-17  Mikael Morin  <mikael@gcc.gnu.org>
1192             Dominique d'Humieres  <dominiq@lps.ens.fr>
1194         PR fortran/61831
1195         * trans-array.c (gfc_conv_array_parameter): Guard allocatable
1196         component deallocation code generation with descriptorless
1197         calling convention flag.
1198         * trans-expr.c (gfc_conv_expr_reference): Remove allocatable
1199         component deallocation code generation from revision 212329.
1200         (expr_may_alias_variables): New function.
1201         (gfc_conv_procedure_call): New boolean elemental_proc to factor
1202         check for procedure elemental-ness.  Rename boolean f to nodesc_arg
1203         and declare it in the outer scope.  Use expr_may_alias_variables,
1204         elemental_proc and nodesc_arg to decide whether generate allocatable
1205         component deallocation code.
1206         (gfc_trans_subarray_assign): Set deep copy flag.
1208 2015-07-16  Steven G. Kargl  <kargl@gcc.gnu.org>
1210         PR fortran/66724
1211         PR fortran/66724
1212         * io.c (is_char_type): Call gfc_resolve_expr ().
1213         (match_open_element, match_dt_element, match_inquire_element): Fix
1214         ASYNCHRONOUS case.
1216 2015-07-15  Andrew MacLeod  <amacleod@redhat.com>
1218         * trans-types.c: Remove multiline #include comment.
1220 2015-07-14  Steven G. Kargl  <kargl@gcc.gnu.org>
1222         * simplify.c (gfc_simplify_floor): Set precision of temporary to
1223         that of arg.
1225 2015-07-13  Andre Vehreschild  <vehre@gcc.gnu.org>
1227         PR fortran/64589
1228         * class.c (find_intrinsic_vtab): Put/Search vtabs for intrinsic
1229         types in the top-level namespace.
1231 2015-07-12  Aldy Hernandez  <aldyh@redhat.com>
1233         * trans-stmt.c: Fix double word typos.
1235 2015-07-09  Andrew MacLeod  <amacleod@redhat.com>
1237         * arith.c: Adjust includes for flags.h changes.
1238         * array.c: Likewise.
1239         * check.c: Likewise.
1240         * decl.c: Likewise.
1241         * error.c: Likewise.
1242         * expr.c: Likewise.
1243         * frontend-passes.c: Likewise.
1244         * interface.c: Likewise.
1245         * intrinsic.c: Likewise.
1246         * io.c: Likewise.
1247         * match.c: Likewise.
1248         * openmp.c: Likewise.
1249         * parse.c: Likewise.
1250         * primary.c: Likewise.
1251         * resolve.c: Likewise.
1252         * scanner.c: Likewise.
1253         * simplify.c: Likewise.
1254         * symbol.c: Likewise.
1255         * target-memory.c: Likewise.
1257 2015-07-07  Andrew MacLeod  <amacleod@redhat.com>
1259         * convert.c: Adjust includes.
1260         * cpp.c: Likewise.
1261         * decl.c: Likewise.
1262         * f95-lang.c: Likewise.
1263         * iresolve.c: Likewise.
1264         * match.c: Likewise.
1265         * module.c: Likewise.
1266         * options.c: Likewise.
1267         * target-memory.c: Likewise.
1268         * trans-array.c: Likewise.
1269         * trans-common.c: Likewise.
1270         * trans-const.c: Likewise.
1271         * trans-decl.c: Likewise.
1272         * trans-expr.c: Likewise.
1273         * trans-intrinsic.c: Likewise.
1274         * trans-io.c: Likewise.
1275         * trans-openmp.c: Likewise.
1276         * trans-stmt.c: Likewise.
1277         * trans-types.c: Likewise.
1278         * trans.c: Likewise.
1280 2015-07-07  Andre Vehreschild  <vehre@gmx.de>
1282         PR fortran/66578
1283         * trans-array.c (gfc_conv_expr_descriptor): Ensure array descriptor
1284         is one-based for non-full array refs. Correct the offset when a
1285         rank_remap occurs.
1287 2015-07-06  Steven G. Kargl  <kargl@gcc.gnu.org>
1289         * io.c (check_char_variable): New function.
1290         (match_open_element, match_close_element, match_file_element,
1291         match_dt_element, match_inquire_element, match_wait_element): Use it.
1293 2015-07-06  Andre Vehreschild  <vehre@gmx.de>
1295         PR fortran/58586
1296         * resolve.c (resolve_symbol): Non-private functions in modules
1297         with allocatable or pointer components are marked referenced
1298         now. Furthermore is the default init especially for those
1299         components now done in gfc_conf_procedure_call preventing
1300         duplicate code.
1301         * trans-decl.c (gfc_generate_function_code): Generate a fake
1302         result decl for functions returning an object with allocatable
1303         components and initialize them.
1304         * trans-expr.c (gfc_conv_procedure_call): For value typed trees
1305         use the tree without indirect ref. And for non-decl trees
1306         add a temporary variable to prevent evaluating the tree
1307         multiple times (prevent multiple function evaluations).
1308         * trans.h: Made gfc_trans_structure_assign () protoype
1309         available, which is now needed by trans-decl.c:gfc_generate_
1310         function_code(), too.
1312 2015-07-04  Steven G. Kargl  <kargl@gcc.gnu.org>
1314         PR fortran/66725
1315         * io.c (is_char_type): New function to test for BT_CHARACTER
1316         (gfc_match_open, gfc_match_close, match_dt_element): Use it.
1318 2015-07-02  David Edelsohn  <dje.gcc@gmail.com>
1320         * trans-common.c: Include <map> after system.h.
1322 2015-07-02  Paul Thomas  <pault@gcc.gnu.org>
1324         PR fortran/52846
1325         * decl.c (get_proc_name): Make a partially populated interface
1326         symbol to carry the characteristics of a module procedure and
1327         its result.
1328         (variable_decl): Declarations of dummies or results in the
1329         abreviated form of module procedure is an error.
1330         (gfc_match_import): IMPORT is not permitted in the interface
1331         declaration of module procedures.
1332         (match_attr_spec): Submodule variables have implicit save
1333         attribute for F2008 onwards.
1334         (gfc_match_prefix): Add 'module' as the a prefix and set the
1335         module_procedure attribute.
1336         (gfc_match_formal_arglist): For a module procedure keep the
1337         interface formal_arglist from the interface, match new the
1338         formal arguments and then compare the number and names of each.
1339         (gfc_match_procedure): Add case COMP_SUBMODULE.
1340         (gfc_match_function_decl, gfc_match_subroutine_decl): Set the
1341         module_procedure attribute.
1342         (gfc_match_entry, gfc_match_end):  Add case COMP_SUBMODULE. If
1343         attr abr_modproc_decl is set, switch the message accordingly
1344         for subroutines and functions.
1345         (gfc_match_submod_proc): New function to match the abbreviated
1346         style of submodule declaration.
1347         * gfortran.h : Add ST_SUBMODULE and ST_END_SUBMODULE. Add the
1348         attribute bits 'used_in_submodule' and 'module_procedure'. Add
1349         the bit field 'abr_modproc_decl' to gfc_symbol. Add prototypes
1350         for 'gfc_copy_dummy_sym', 'gfc_check_dummy_characteristics' and
1351         'gfc_check_result_characteristics'.
1352         * interface.c : Add the prefix 'gfc_' to the names of functions
1353         'check_dummy(result)_characteristics' and all their references.
1354         * match.h : Add prototype for 'gfc_match_submod_proc' and
1355         'gfc_match_submodule'.
1356         (check_sym_interfaces): A module procedure is not an error in
1357         a module procedure statment in a generic interface.
1358         * module.c (gfc_match_submodule): New function. Add handling
1359         for the 'module_procedure' attribute bit.
1360         (gfc_use_module): Make sure that a submodule cannot use itself.
1361         * parse.c (decode_statement): Set attr has_'import_set' for
1362         the interface declaration of module procedures. Handle a match
1363         occurring in 'gfc_match_submod_proc' and a match for
1364         'submodule'.
1365         (gfc_enclosing_unit): Include the state COMP_SUBMODULE.
1366         (gfc_ascii_statement): Add END SUBMODULE.
1367         (accept_statement): Add ST_SUBMODULE.
1368         (parse_spec): Disallow statement functions in a submodule
1369         specification part.
1370         (parse_contained): Add ST_END_SUBMODULE and COMP_SUBMODULE
1371         twice each.
1372         (get_modproc_result): Copy the result symbol of the interface.
1373         (parse_progunit): Call it.
1374         (set_syms_host_assoc): Make symbols from the ancestor module
1375         and submodules use associated, as required by the standard and
1376         set all private components public. Module procedures 'external'
1377         attribute bit is reset and the 'used_in_submodule' bit is set.
1378         (parse_module): If this is a submodule, use the ancestor module
1379         and submodules. Traverse the namespace, calling
1380         'set_syms_host_assoc'. Add ST_END_SUBMODULE and COMP_SUBMODULE.
1381         * parse.h : Add COMP_SUBMODULE.
1382         * primary.c (match_variable): Add COMP_SUBMODULE.
1383         * resolve.c (compare_fsyms): New function to compare the dummy
1384         characteristics of a module procedure with its interface.
1385         (resolve_fl_procedure): Compare the procedure, result and dummy
1386         characteristics of a module_procedure with its interface, using
1387         'compare_fsyms' for the dummy arguments.
1388         * symbol.c (gfc_add_procedure): Suppress the check for existing
1389         procedures in the case of a module procedure.
1390         (gfc_add_explicit_interface): Skip checks that must fail for
1391         module procedures.
1392         (gfc_add_type): Allow a new type to be added to module
1393         procedures, their results or their dummy arguments.
1394         (gfc_copy_dummy_sym): New function to generate new dummy args
1395         and copy the characteristics from the interface.
1396         * trans-decl.c (gfc_sym_mangled_function_id): Module procedures
1397         must always have their names mangled as if they are symbols
1398         coming from a declaration in a module.
1399         (gfc_get_symbol_decl): Add 'used_in_submodule' to the assert.
1400         (gfc_finish_var_decl): Symbols with the 'used_in_submodule' bit
1401         set are set DECL_EXTERNAL as if they were use associated.
1403 2015-07-02  Steven G. Kargl  <kargl@gcc.gnu.org>
1405         PR fortran/56520
1406         * match.c (gfc_match_name): Special case unary minus and plus.
1408 2015-07-02  Steven G. Kargl   <kargl@gcc.gnu.org>
1410         PR fortran/66545
1411         * primary.c (match_sym_complex_part): Do not dereference NULL pointer.
1413 2015-07-01  Thomas Koenig  <tkoenig@gcc.gnu.org>
1415         * arith.c (gfc_arith_divide):  With -Winteger-division,
1416         warn about contant integer division if there is a non-zero
1417         remainder.
1418         * invoke.texi:  Document -Winteger-division.
1419         * lang.opt:  Add -Winteger-division.
1421 2015-06-25  Andrew MacLeod  <amacleod@redhat.com>
1423         * f95-lang.c: Remove ipa-ref.h and plugin-api.h from include list.
1424         * trans-decl.c: Likewise.
1426 2015-06-25  Richard Sandiford  <richard.sandiford@arm.com>
1428         * trans-decl.c (module_hasher): Likewise.
1429         * trans.h (module_decl_hasher): Likewise.
1431 2015-06-24  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1433         PR fortran/66528
1434         * error.c (gfc_warning_check): Restore the default output_buffer
1435         before calling diagnostic_action_after_output.
1436         (gfc_error_check): Likewise.
1437         (gfc_diagnostics_init): Add comment.
1439 2015-06-23  Andre Vehreschild  <vehre@gmx.de>
1441         PR fortran/64674
1442         * parse.c (parse_associate): Figure the rank and as of a
1443         class array in an associate early.
1444         * primary.c (gfc_match_varspec): Prevent setting the
1445         dimension attribute on the sym for classes.
1446         * resolve.c (resolve_variable): Correct the component
1447         ref's type for associated variables.  Add a full array ref
1448         when class array's are associated.
1449         (resolve_assoc_var): Correct the type of the symbol,
1450         when in the associate the expression's rank becomes scalar.
1451         * trans-expr.c (gfc_conv_variable): Indirect ref needed for
1452         allocatable associated objects.
1454 2015-06-19  Mikael Morin  <mikael@gcc.gnu.org>
1456         PR fortran/66549
1457         * resolve.c (resolve_global_procedure): Don't save and restore
1458         OpenMP state around the call to gfc_resolve.
1459         (gfc_resolve): Save OpenMP state on entry and restore it on return.
1461 2015-06-17  Andrew MacLeod  <amacleod@redhat.com>
1463         * convert.c: Do not include input.h, line-map.h or is-a.h.
1464         * cpp.c: Likewise.
1465         * decl.c: Likewise.
1466         * f95-lang.c: Likewise.
1467         * gfortran.h: Likewise.
1468         * iresolve.c: Likewise.
1469         * match.c: Likewise.
1470         * module.c: Likewise.
1471         * options.c: Likewise.
1472         * target-memory.c: Likewise.
1473         * trans-array.c: Likewise.
1474         * trans-common.c: Likewise.
1475         * trans-const.c: Likewise.
1476         * trans-decl.c: Likewise.
1477         * trans-expr.c: Likewise.
1478         * trans-intrinsic.c: Likewise.
1479         * trans-io.c: Likewise.
1480         * trans-openmp.c: Likewise.
1481         * trans-stmt.c: Likewise.
1482         * trans-types.c: Likewise.
1483         * trans.c: Likewise.
1485 2015-06-15  Andre Vehreschild  <vehre@gmx.de>
1487         PR fortran/44672
1488         PR fortran/45440
1489         PR fortran/57307
1490         * gfortran.h: Extend gfc_code.ext.alloc to carry a
1491         flag indicating that the array specification has to be
1492         taken from expr3.
1493         * resolve.c (resolve_allocate_expr): Add F2008 notify
1494         and flag indicating source driven array spec.
1495         (resolve_allocate_deallocate): Check for source driven
1496         array spec, when array to allocate has no explicit
1497         array spec.
1498         * trans-array.c (gfc_array_init_size): Get lower and
1499         upper bound from a tree array descriptor, except when
1500         the source expression is an array-constructor which is
1501         fixed to be one-based.
1502         (retrieve_last_ref): Extracted from gfc_array_allocate().
1503         (gfc_array_allocate): Enable allocate(array, source=
1504         array_expression) as specified by F2008:C633.
1505         (gfc_conv_expr_descriptor): Add class tree expression
1506         into the saved descriptor for class arrays.
1507         * trans-array.h: Add temporary array descriptor to
1508         gfc_array_allocate ().
1509         * trans-expr.c (gfc_conv_procedure_call): Special handling
1510         for _copy() routine translation, that comes without an
1511         interface. Third and fourth argument are now passed by value.
1512         * trans-stmt.c (gfc_trans_allocate): Get expr3 array
1513         descriptor for temporary arrays to allow allocate(array,
1514         source = array_expression) for array without array
1515         specification.
1517 2015-06-14  Thomas Koenig  <tkoenig@gcc.gnu.org>
1519         * intrinsic.texi:  Change \leq to < in descrition of imaginary
1520         part in argument to log.
1522 2015-06-11  Paul Thomas  <pault@gcc.gnu.org>
1524         PR fortran/66079
1525         * trans-expr.c (gfc_conv_procedure_call): Allocatable scalar
1526         function results must be freed and nullified after use. Create
1527         a temporary to hold the result to prevent duplicate calls.
1528         * trans-stmt.c (gfc_trans_allocate): Rename temporary variable
1529         as 'source'. Deallocate allocatable components of non-variable
1530         'source's.
1532 2015-06-11  Pierre-Marie de Rodat  <derodat@adacore.com>
1534         * f95-lang.c (gfc_create_decls): Register the main translation unit
1535         through the new debug hook.
1537 2015-06-08  Andrew MacLeod  <amacleod@redhat.com>
1539         * convert.c : Adjust include files.
1540         * cpp.c : Likewise.
1541         * decl.c : Likewise.
1542         * f95-lang.c : Likewise.
1543         * gfortran.h : Likewise.
1544         * iresolve.c : Likewise.
1545         * match.c : Likewise.
1546         * module.c : Likewise.
1547         * openmp.c : Likewise.
1548         * options.c : Likewise.
1549         * target-memory.c : Likewise.
1550         * trans-array.c : Likewise.
1551         * trans-common.c : Likewise.
1552         * trans-const.c : Likewise.
1553         * trans-decl.c : Likewise.
1554         * trans-expr.c : Likewise.
1555         * trans-intrinsic.c : Likewise.
1556         * trans-io.c : Likewise.
1557         * trans-openmp.c : Likewise.
1558         * trans-stmt.c : Likewise.
1559         * trans-types.c : Likewise.
1560         * trans.c : Likewise.
1562 2015-06-08  Steven G. Kargl  <kargl@gcc.gnu.org>
1564         PR fortran/66245
1565         * match.c (gfc_match_type_is, gfc_match_class_is):  Check if the
1566         return type spec or derived type spec is validate.
1568 2015-06-06  Thomas Koenig  <tkoenig@netcologne.de>
1570         PR fortran/47659
1571         * arith.c (eval_intrinsic_op): Set warn flag for
1572         gfc_type_convert_binary if -Wconversion or -Wconversion-extra
1573         are set.
1574         (wprecision_real_real): New function.
1575         (wprecision_int_real): New function.
1576         (gfc_int2int): If -fno-range-check and -Wconversion are specified
1577         and it is a narrowing conversion, warn.
1578         (gfc_int2real): If there is a change in value for the conversion,
1579         warn.
1580         (gfc_int2complex):  Likewise.
1581         (gfc_real2int): If there is a fractional part to the real number,
1582         warn with -Wconversion, otherwise warn with -Wconversion-extra.
1583         (gfc_real2real): Emit warning if the constant was changed by
1584         conversion with either -Wconversion or -Wconversion-extra.  With
1585         -Wconversion-extra, warn if no warning was issued earlier.
1586         (gfc_real2complex):  Likewise.
1587         (gfc_complex2int): For -Wconversion or -Wconversion-extra, if
1588         there was an imaginary part, warn; otherwise, warn for change in
1589         value.  Warn with -Wconversion-extra if no other warning was
1590         issued.
1591         (gfc_complex2real): For -Wconversion or -Wconversion-extra, if
1592         there was an imaginary part, warn; otherwise, warn for change in
1593         value. Warn with -Wconversion-extra if no other warning was
1594         issued.
1595         (gfc_complex2complex):  For -Wconversion, warn if the value of
1596         either the real or the imaginary part was changed.  Warn for
1597         -Wconversion-extra if no prior warning was issued.
1598         * expr.c (gfc_check_assign):  Remove check for change in value.
1599         * primary.c (match_real_constant): For -Wconversion-extra, check
1600         against a number in which the last non-zero digit has been
1601         replaced with a zero.  If the number compares equal, warn.
1602         * intrinsic.c (gfc_convert_type_warn):  Do not warn about constant
1603         conversions.
1605 2015-06-05  Steven G. Kargl  <kargl@gcc.gnu.org>
1607         PR fortran/66347
1608         * resolve.c (apply_default_init_local): Do not dereference a NULL
1609         pointer.
1611 2015-06-05  Thomas Koenig  <tkoenig@gcc.gnu.org>
1613         PR fortran/66385
1614         * frontend-passes.c (combine_array_constructor): Return early if
1615         inside a FORALL loop.
1617 2015-06-05  Aldy Hernandez  <aldyh@redhat.com>
1619         * f95-lang.c (gfc_write_global_declarations): Remove.
1620         (LANG_HOOKS_WRITE_GLOBALS): Remove.
1621         (gfc_write_global_declarations): Move code from here to...
1622         (gfc_be_parse_file): ...here.
1623         Call global_decl_processing.
1624         * trans-decl.c (gfc_emit_parameter_debug_info): Rename global_decl
1625         to early_global_decl.
1627 2015-06-05  Russell Whitesides  <russelldub@gmail.com>
1628             Steven G. Kargl  <kargl@gcc.gnu.org>
1630         PR fortran/40958
1631         PR fortran/60780
1632         PR fortran/66377
1633         * module.c (load_equiv): Add check for loading duplicate EQUIVALENCEs
1634         from different modules.  Eliminate the pruning of unused
1635         equivalence-objects
1637 2015-06-04  Thomas Koenig  <tkoenig@netcologne.de>
1639         PR fortran/58749
1640         * iresolve.c (gfc_resolve_adjustl):  If string has a charlen,
1641         copy it to the function.
1642         (gfc_resolve_adjustr):  Likewise.
1644 2015-06-04  Andrew MacLeod  <amacleod@redhat.com>
1646         * convert.c: Adjust includes for restructured coretypes.h.
1647         * cpp.c: Likewise.
1648         * decl.c: Likewise.
1649         * f95-lang.c: Likewise.
1650         * iresolve.c: Likewise.
1651         * match.c: Likewise.
1652         * module.c: Likewise.
1653         * options.c: Likewise.
1654         * target-memory.c: Likewise.
1655         * trans-array.c: Likewise.
1656         * trans-common.c: Likewise.
1657         * trans-const.c: Likewise.
1658         * trans-decl.c: Likewise.
1659         * trans-expr.c: Likewise.
1660         * trans-intrinsic.c: Likewise.
1661         * trans-io.c: Likewise.
1662         * trans-openmp.c: Likewise.
1663         * trans-stmt.c: Likewise.
1664         * trans-types.c: Likewise.
1665         * trans.c: Likewise.
1667 2015-06-02  Steven G. Kargl  <kargl@gcc.gnu.org>
1669         PR fortran/66380
1670         * simplify.c (gfc_simplify_reshape): Convert assert into returning
1671         NULL, which triggers an error condition.
1673 2015-05-27  Andre Vehreschild  <vehre@gmx.de>
1675         PR fortran/65548
1676         * trans-stmt.c (gfc_trans_allocate): Add missing location
1677         information for e3rhs.
1679 2015-05-26  Paul Thomas  <pault@gcc.gnu.org>
1681         PR fortran/66082
1682         * trans-array.c (gfc_conv_array_parameter): Ensure that all
1683         non-variable arrays with allocatable components have the
1684         components deallocated after the procedure call.
1686 2015-05-24  Mikael Morin  <mikael@gcc.gnu.org>
1688         PR fortran/66257
1689         * resolve.c (resolve_actual_arglist): Don't throw an error
1690         if the argument with procedure pointer component is not a variable.
1692 2015-05-24  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1694         PR fortran/44054
1695         * gfortran.h (struct gfc_error_buf): Rename as
1696         gfc_error_buffer. Move closer to push, pop and free
1697         methods. Reimplement using an output_buffer.
1698         * error.c (errors, warnings, warning_buffer, cur_error_buffer):
1699         Delete everywhere in this file.
1700         (error_char): Delete all contents.
1701         (gfc_increment_error_count): Delete.
1702         (gfc_error_now): Update comment. Set error_buffer.flag.
1703         (gfc_warning_check): Do not handle warning_buffer.
1704         (gfc_error_1): Delete.
1705         (gfc_error_now_1): Delete.
1706         (gfc_error_check): Simplify.
1707         (gfc_move_error_buffer_from_to): Renamed from
1708         gfc_move_output_buffer_from_to.
1709         (gfc_push_error): Handle only gfc_error_buffer.
1710         (gfc_pop_error): Likewise.
1711         (gfc_free_error): Likewise.
1712         (gfc_get_errors): Remove warnings and errors.
1713         (gfc_diagnostics_init): Use static error_buffer.
1714         (gfc_error_1,gfc_error_now_1): Delete declarations.
1715         * symbol.c, decl.c, trans-common.c, data.c, expr.c, expr.c,
1716         frontend-passes.c, resolve.c, match.c, parse.c: Replace
1717         gfc_error_1 with gfc_error and gfc_error_now_1 with gfc_error_1
1718         everywhere.
1719         * f95-lang.c (gfc_be_parse_file): Do not update errorcount and
1720         warningcount here.
1721         * primary.c (match_complex_constant): Replace gfc_error_buf and
1722         output_buffer with gfc_error_buffer.
1724 2015-05-22  Jim Wilson  <jim.wilson@linaro.org>
1726         * Make-lang.in (check_gfortran_parallelize): Update comment.
1728 2015-05-21  Thomas Koenig  <tkoenig@gcc.gnu.org>
1730         PR fortran/66176
1731         * frontend-passes.c (check_conjg_variable):  New function.
1732         (inline_matmul_assign):  Use it to keep track of conjugated
1733         variables.
1735 2015-05-20  Andre Vehreschild  <vehre@gmx.de>
1737         PR fortran/65548
1738         * trans-stmt.c (gfc_trans_allocate): Always retrieve the
1739         descriptor or a reference to a source= expression for
1740         arrays and non-arrays, respectively.  Use a temporary
1741         symbol and gfc_trans_assignment for all source=
1742         assignments to allocated objects besides for class and
1743         derived types.
1745 2015-05-19  Jakub Jelinek  <jakub@redhat.com>
1747         PR middle-end/66199
1748         * trans-openmp.c (gfc_trans_omp_teams): Set OMP_TEAMS_COMBINED for
1749         combined constructs.
1750         (gfc_trans_omp_target): Make sure BIND_EXPR has non-NULL
1751         BIND_EXPR_BLOCK.
1753 2015-05-19  David Malcolm  <dmalcolm@redhat.com>
1755         * cpp.c (maybe_print_line): Strengthen local "map" from
1756         const line_map * to const line_map_ordinary *.
1757         (cb_file_change): Likewise for param "map" and local "from".
1758         (cb_line_change): Likewise for local "map".
1760 2015-05-19  Mikhail Maltsev  <maltsevm@gmail.com>
1762         * interface.c (compare_actual_formal): Use std::swap instead of
1763         explicit swaps.
1764         * trans-array.c (gfc_trans_scalarized_loop_end): Likewise.
1765         * trans-intrinsic.c (walk_inline_intrinsic_transpose): Likewise.
1767 2015-05-18  Steven G. Kargl  <kargl@gcc.gnu.org>
1769         PR fortran/66106
1770         * interface.c(gfc_match_end_interface): Enforce F2008 C1202 (R1201).
1771         * match.c(gfc_op2string): Return 'none' for INTRINSIC_NONE.
1773 2015-05-18  Steven G. Kargl  <kargl@gcc.gnu.org>
1775         PR fortran/66057
1776         * decl.c(gfc_match_generic):  Detected a malformed GENERIC statement.
1778 2015-05-18  Steven G. Kargl  <kargl@gcc.gnu.org>
1780         PR fortran/66043
1781         * gfortran.dg/storage_size_6.f90: New tests.
1783 2015-05-18  Steven G. Kargl  <kargl@gcc.gnu.org>
1785         PR fortran/66043
1786         * gfortran.dg/storage_size_6.f90: New tests.
1788 2015-05-18  Steven G. Kargl  <kargl@gcc.gnu.org>
1790         PR fortran/66044
1791         * decl.c(gfc_match_entry):  Change a gfc_internal_error() into
1792         a gfc_error()
1794 2015-05-18  Steven G. Kargl  <kargl@gcc.gnu.org>
1796         PR fortran/66043
1797         * gfortran.dg/storage_size_6.f90: New tests.
1799 2015-05-18  Steven G. Kargl  <kargl@gcc.gnu.org>
1801         PR fortran/66040
1802         * parse.c(verify_st_order): Replace a gfc_internal_error with your
1803         generic gfc_error.
1805 2015-05-18  Steven G. Kargl  <kargl@gcc.gnu.org>
1807         PR fortran/66039
1808         * io.c (match_filepos): Check for incomplete/mangled REWIND, FLUSH,
1809         BACKSPACE, and ENDFILE statements
1811 2015-05-18  Steven G. Kargl  <kargl@gcc.gnu.org>
1813         PR fortran/64925
1814         * symbol.c(check_conflict):  Check for a conflict between a dummy
1815         argument and an internal procedure name.
1817 2015-05-16  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
1819         PR fortran/65903
1820         * io.c (format_lex): Change to NONSTRING when checking for
1821         possible doubled quote.
1822         * scanner.c (gfc_next_char_literal): Revert change from 64506
1823         and add a check for quotes and return.
1825 2015-05-16  Thomas Koenig  <tkoenig@gcc.gnu.org>
1827         PR fortran/66113
1828         * expr.c (is_parent_of_current_ns):  New function.
1829         (check_restricted):  Use it.
1831 2015-05-16  Manuel López-Ibáñez  <manu@gcc.gnu.org>
1833         PR fortran/44054
1835         Replace all calls to gfc_notify_std_1 with gfc_notify_std and
1836         gfc_warning_1 with gfc_warning.
1837         * decl.c (gfc_verify_c_interop_param): Here.
1838         * resolve.c (resolve_branch): Here.
1839         (resolve_fl_derived): Here.
1840         * dependency.c (gfc_check_argument_var_dependency):
1841         * scanner.c (preprocessor_line): Use gfc_warning_now_at. Fix line
1842         counter and locations before and after warning.
1843         * gfortran.h (gfc_warning_1, gfc_warning_now_1, gfc_notify_std_1):
1844         Delete.
1845         (gfc_warning_now_at): Declare.
1846         * error.c (gfc_warning_1): Delete.
1847         (gfc_notify_std_1): Delete.
1848         (gfc_warning_now_1): Delete.
1849         (gfc_format_decoder): Handle two locations.
1850         (gfc_diagnostic_build_prefix): Rename as
1851         gfc_diagnostic_build_kind_prefix.
1852         (gfc_diagnostic_build_locus_prefix): Take an expanded_location
1853         instead of diagnostic_info.
1854         (gfc_diagnostic_build_locus_prefix): Add overload that takes two
1855         expanded_location.
1856         (gfc_diagnostic_starter): Handle two locations.
1857         (gfc_warning_now_at): New.
1858         (gfc_diagnostics_init): Initialize caret_chars array.
1859         (gfc_diagnostics_finish): Reset caret_chars array to default.
1861 2015-05-16  Mikael Morin  <mikael@gcc.gnu.org>
1862             Paul Thomas  <pault@gcc.gnu.org>
1864         PR fortran/65792
1865         * trans-expr.c (gfc_trans_subcomponent_assign): Always assign
1866         the expression component to the destination. In addition, if
1867         the component has allocatable components, copy them and
1868         deallocate those of the expression, if it is not a variable.
1869         The expression is fixed if not a variable to prevent multiple
1870         evaluations.
1872 2015-05-12  Thomas Koenig  <tkoenig@gcc.gnu.org>
1874         PR fortran/66111
1875         * frontend-passes.c (has_dimen_vector_ref):  New function.
1876         (inline_matmul_assign):  Use it to return early in case
1877         of unhandled vector subscripts.
1879 2015-05-12  Thomas Koenig  <tkoenig@gcc.gnu.org>
1881         PR fortran/66041
1882         PR fortran/37131
1883         * gfortran.h (gfc_array_spec):  Add field resolved.
1884         * array.c (gfc_resolve_array_spec):  Resolve array spec
1885         only once.
1887 2015-05-11  Mikael Morin  <mikael@gcc.gnu.org>
1889         PR fortran/66100
1890         * simplify.c (simplify_bound): Fix assert to accept subobject arrays.
1892 2015-05-10  Thomas Koenig  <tkoenig@gcc.gnu.org>
1894         PR fortran/66041
1895         * frontend-passes.c (scalarized_expr): Set correct dimension and
1896         shape for the expression to be passed to lbound. Remove trailing
1897         references after array refrence.
1898         (inline_matmul_assign):  Remove gfc_copy_expr from calls
1899         to scalarized_expr().
1901 2015-05-10  Mikael Morin  <mikael@gcc.gnu.org>
1903         * simplify.c (simplify_bound_dim): Don't check for emptyness
1904         in the case of cobound simplification.  Factor lower/upper
1905         bound differenciation before the actual simplification.
1906         (simplify_bound): Remove assumed shape specific simplification.
1907         Don't give up early for the lbound of an assumed shape.
1909 2015-05-09  Mikael Morin  <mikael@gcc.gnu.org>
1911         PR fortran/65894
1912         * trans-array.h (gfc_scalar_elemental_arg_saved_as_reference):
1913         New prototype.
1914         * trans-array.c (gfc_scalar_elemental_arg_saved_as_reference):
1915         New function.
1916         (gfc_add_loop_ss_code): Use gfc_scalar_elemental_arg_saved_as_reference
1917         as conditional.
1918         (gfc_walk_elemental_function_args): Set the dummy_arg field.
1919         * trans.h (gfc_ss_info): New subfield dummy_arg.
1920         * trans-expr.c (gfc_conv_procedure_call): Revert the change
1921         of revision 222361.
1922         (gfc_conv_expr): Use gfc_scalar_elemental_arg_saved_as_reference
1923         as conditional.
1925 2015-05-08  Mikael Morin  <mikael@gcc.gnu.org>
1927         * trans-array.c (gfc_walk_elemental_function_args):
1928         Don't skip the advance to the next dummy argument when skipping
1929         absent optional args.
1931 2015-05-05  David Malcolm  <dmalcolm@redhat.com>
1933         * expr.c (check_inquiry): Fix indentation so that it reflects the
1934         block structure.
1935         * interface.c (compare_parameter): Likewise.
1936         * parse.c (parse_oacc_structured_block): Likewise.
1937         * target-memory.c (expr_to_char): Likewise.
1938         * trans-types.c (gfc_init_kinds): Likewise.
1940 2015-05-02  Steven G. Kargl  <kargl@gcc.gnu.org>
1942         PR fortran/65976
1943         * invoke.texi:  Remove 'no-' in '-fno-fixed-form'
1945 2015-05-01  Mikael Morin  <mikael@gcc.gnu.org>
1947         * simplify.c (simplify_bound_dim): Tighten the check for array fullness
1948         by also checking for absence of subreference.
1949         (simplify_bound): Don't skip simplification if the array
1950         has subreferences.
1951         (simplify_cobound): Same.
1953 2015-04-30  Thomas Koenig  <tkoenig@gcc.gnu.org>
1955         PR fortran/37131
1956         * simplify.c (simplify_bound): Get constant lower bounds of one
1957         from array spec for assumed and explicit shape shape arrays if
1958         the lower bounds are indeed one.
1960 2015-04-30  David Malcolm  <dmalcolm@redhat.com>
1962         * options.c (gfc_init_options): Remove spurious second
1963         semicolon.
1964         * trans-stmt.c (gfc_trans_allocate): Likewise.
1966 2015-04-28  Andre Vehreschild  <vehre@gmx.de>
1968         * interface.c (gfc_compare_types): Check for unlimited
1969         polymorphism flag in the correct position indepent of the _data
1970         component being present or not.  This prevents a segfault, when
1971         the _data component is not present.
1972         * symbol.c (gfc_type_compatible): Same.
1974 2015-04-27  Jim Wilson  <jim.wilson@linaro.org>
1976         * Make-lang.in (fortran.mostlyclean): Remove gfortran and
1977         gfortran-cross.
1979 2015-04-27  Andre Vehreschild  <vehre@gmx.de>
1981         PR fortran/59678
1982         PR fortran/65841
1983         * trans-array.c (duplicate_allocatable): Fixed deep copy of
1984         allocatable components, which are liable for copy only, when
1985         they are allocated.
1986         (gfc_duplicate_allocatable): Add deep-copy code into if
1987         component allocated block. Needed interface change for that.
1988         (gfc_copy_allocatable_data): Supplying NULL_TREE for code to
1989         add into if-block for checking whether a component was
1990         allocated.
1991         (gfc_duplicate_allocatable_nocopy): Likewise.
1992         (structure_alloc_comps): Likewise.
1993         * trans-array.h: Likewise.
1994         * trans-expr.c (gfc_trans_alloc_subarray_assign): Likewise.
1995         * trans-openmp.c (gfc_walk_alloc_comps): Likewise.
1997 2015-04-23  Andre Vehreschild  <vehre@gmx.de>
1999         PR fortran/60322
2000         * expr.c (gfc_lval_expr_from_sym): Code to select the regular
2001         or class array added.
2002         * gfortran.h: Add IS_CLASS_ARRAY macro.
2003         * trans-array.c (gfc_add_loop_ss_code): Treat class objects
2004         to be referenced always.
2005         (build_class_array_ref): Adapt retrieval of array descriptor.
2006         (build_array_ref): Likewise.
2007         (gfc_conv_array_ref): Hand the vptr or the descriptor to
2008         build_array_ref depending whether the sym is class or not.
2009         (gfc_trans_array_cobounds):  Select correct gfc_array_spec for
2010         regular and class arrays.
2011         (gfc_trans_array_bounds): Likewise.
2012         (gfc_trans_dummy_array_bias): Likewise.
2013         (gfc_get_dataptr_offset): Correcting call of build_array_ref.
2014         (gfc_conv_expr_descriptor): Set the array's offset to -1 when
2015         lbound in inner most dim is 1 and symbol non-pointer/assoc.
2016         * trans-decl.c (gfc_build_qualified_array): Select correct
2017         gfc_array_spec for regular and class arrays.
2018         (gfc_build_dummy_array_decl): Likewise.
2019         (gfc_get_symbol_decl): Get a dummy array for class arrays.
2020         (gfc_trans_deferred_vars): Tell conv_expr that the descriptor
2021         is desired.
2022         * trans-expr.c (gfc_class_vptr_get): Get the class descriptor
2023         from the correct location for class arrays.
2024         (gfc_class_len_get): Likewise.
2025         (gfc_conv_intrinsic_to_class): Add handling of _len component.
2026         (gfc_conv_class_to_class):  Prevent access to unset array data
2027         when the array is an optional argument. Add handling of _len
2028         component.
2029         (gfc_copy_class_to_class): Check that _def_init is non-NULL
2030         when used in _vptr->copy()
2031         (gfc_trans_class_init_assign): Ensure that the rank of
2032         _def_init is zero.
2033         (gfc_conv_component_ref): Get the _vptr along with _data refs.
2034         (gfc_conv_variable): Make sure the temp array descriptor is
2035         returned for class arrays, too, and that class arrays are
2036         dereferenced correctly.
2037         (gfc_conv_procedure_call): For polymorphic type initialization
2038         the initializer has to be a pointer to _def_init stored in a
2039         dummy variable, which then needs to be used by value.
2040         * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): Use the
2041         temporary array descriptor for class arrays, too.
2042         (gfc_conv_intrinsic_storage_size): Likewise.
2043         (gfc_conv_intrinsic_loc): Add ref to _data for BT_CLASS
2044         expressions.
2045         * trans-stmt.c (trans_associate_var): Use a temporary array for
2046         the associate variable of class arrays, too, making the array
2047         one-based (lbound == 1).
2048         * trans-types.c (gfc_is_nodesc_array): Use the correct
2049         array data.
2050         * trans.c (gfc_build_array_ref): Use the dummy array descriptor
2051         when present.
2052         * trans.h: Add class_vptr to gfc_se for storing a class ref's
2053         vptr.
2055 2015-04-22  Steven G. Kargl  <kargl@gcc.gnu.org>
2057         PR fortran/65429
2058         * decl.c (add_init_expr_to_sym): Set the length type parameter.
2060 2015-04-10  Tobias Burnus  <burnus@net-b.de>
2062         * trans-stmt.c (gfc_trans_lock_unlock): Implement -fcoarray=lib
2063         version; reject not-yet-implemented variants.
2064         * trans-types.c (gfc_get_derived_type): For lock_type with
2065         -fcoarray=lib, use a void pointer as type.
2066         * trans.c (gfc_allocate_using_lib, gfc_allocate_allocatable):
2067         Handle lock_type with -fcoarray=lib.
2069 2015-04-10  Mikael Morin  <mikael@gcc.gnu.org>
2071         PR fortran/56674
2072         PR fortran/58813
2073         PR fortran/59016
2074         PR fortran/59024
2075         * symbol.c (save_symbol_data, gfc_save_symbol_data): Rename the
2076         former to the latter and make it non-static.  Update callers.
2077         * gfortran.h (gfc_save_symbol_data): New prototype.
2078         * decl.c (gfc_match_decl_type_spec): Call 'gfc_save_symbol_data'
2079         before modifying symbols 'sym' and 'dt_sym'.
2081 2013-04-09  Paul Thomas  <pault@gcc.gnu.org>
2083         PR fortran/56852
2084         * primary.c (gfc_variable_attr): Avoid ICE on AR_UNKNOWN if any
2085         of the index variables are untyped and errors are present.
2087 2015-04-07  Andre Vehreschild  <vehre@gmx.de>
2089         PR fortran/65548
2090         * trans-stmt.c (gfc_trans_allocate): For intrinsic functions
2091         use conv_expr_descriptor() instead of conv_expr_reference().
2093 2015-03-30  Jakub Jelinek  <jakub@redhat.com>
2095         PR fortran/65597
2096         * trans-openmp.c (gfc_trans_omp_do): For !simple simd with explicit
2097         linear clause for the iterator set OMP_CLAUSE_LINEAR_NO_COPYIN.
2098         For implcitly added !simple OMP_CLAUSE_LINEAR set it too.  Use step 1
2099         instead of the original step on the new iterator - count.
2101 2015-03-25  Mikael Morin  <mikael@gcc.gnu.org>
2103         PR fortran/64952
2104         PR fortran/65532
2105         * gfortran.h (struct gfc_namespace): New field 'types_resolved'.
2106         * resolve.c (resolve_types): Return early if field 'types_resolved'
2107         is set.  Set 'types_resolved' at the end.
2109 2015-03-24  Andre Vehreschild  <vehre@gmx.de>
2111         PR fortran/55901
2112         * trans-expr.c (gfc_conv_structure): Fixed indendation.
2113         Using integer_zero_node now instead of explicitly
2114         constructing a integer constant zero node.
2115         (gfc_conv_derived_to_class): Add handling of _len component,
2116         i.e., when the rhs has a string_length then assign that to
2117         class' _len, else assign 0.
2118         (gfc_conv_intrinsic_to_class): Likewise.
2120 2015-03-24  Andre Vehreschild  <vehre@gmx.de>
2122         PR fortran/64787
2123         PR fortran/57456
2124         PR fortran/63230
2125         * class.c (gfc_add_component_ref):  Free no longer needed
2126         ref-chains to prevent memory loss.
2127         (find_intrinsic_vtab): For deferred length char arrays or
2128         unlimited polymorphic objects, store the size in bytes of one
2129         character in the size component of the vtab.
2130         * gfortran.h: Added gfc_add_len_component () define.
2131         * trans-array.c (gfc_trans_create_temp_array): Switched to new
2132         function name for getting a class' vtab's field.
2133         (build_class_array_ref): Likewise.
2134         (gfc_array_init_size): Using the size information from allocate
2135         more consequently now, i.e., the typespec of the entity to
2136         allocate is no longer needed.  This is to address the last open
2137         comment in PR fortran/57456.
2138         (gfc_array_allocate): Likewise.
2139         (structure_alloc_comps): gfc_copy_class_to_class () needs to
2140         know whether the class is unlimited polymorphic.
2141         * trans-array.h: Changed interface of gfc_array_allocate () to
2142         reflect the no longer needed typespec.
2143         * trans-expr.c (gfc_find_and_cut_at_last_class_ref): New.
2144         (gfc_reset_len): New.
2145         (gfc_get_class_array_ref): Switch to new function name for
2146         getting a class' vtab's field.
2147         (gfc_copy_class_to_class):  Added flag to know whether the class
2148         to copy is unlimited polymorphic.  Adding _len dependent code
2149         then, which calls ->vptr->copy () with four arguments adding
2150         the length information ->vptr->copy(from, to, from_len, to_cap).
2151         (gfc_conv_procedure_call): Switch to new function name for
2152         getting a class' vtab's field.
2153         (alloc_scalar_allocatable_for_assignment): Use the string_length
2154         as computed by gfc_conv_expr and not the statically backend_decl
2155         which may be incorrect when ref-ing.
2156         (gfc_trans_assignment_1): Use the string_length variable and
2157         not the rse.string_length.  The former has been computed more
2158         generally.
2159         * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): Switch to new
2160         function name for getting a class' vtab's field.
2161         (gfc_conv_intrinsic_storage_size): Likewise.
2162         (gfc_conv_intrinsic_transfer): Likewise.
2163         * trans-stmt.c (gfc_trans_allocate): Restructured to evaluate
2164         source=expr3 only once before the loop over the objects to
2165         allocate, when the objects are not arrays. Doing correct _len
2166         initialization and calling of vptr->copy () fixing PR 64787.
2167         (gfc_trans_deallocate): Reseting _len to 0, preventing future
2168         errors.
2169         * trans.c (gfc_build_array_ref): Switch to new function name
2170         for getting a class' vtab's field.
2171         (gfc_add_comp_finalizer_call): Likewise.
2172         * trans.h: Define the prototypes for the gfc_class_vtab_*_get ()
2173         and gfc_vptr_*_get () functions.
2174         Added gfc_find_and_cut_at_last_class_ref () and
2175         gfc_reset_len () routine prototype.  Added flag to
2176         gfc_copy_class_to_class () prototype to signal an unlimited
2177         polymorphic entity to copy.
2179 2015-03-24  Iain Sandoe  <iain@codesourcery.com>
2180             Tobias Burnus  <burnus@net-b.de>
2182         * gfortran.texi (_gfortran_caf_sync_memory): Improve wording.
2184 2015-03-23  Paul Thomas  <pault@gcc.gnu.org>
2185             Mikael Morin  <mikael@gcc.gnu.org>
2187         PR fortran/64952
2188         * gfortran.h (struct symbol_attribute) : New field
2189         'array_outer_dependency'.
2190         * trans.h (struct gfc_ss_info): New field 'array_outer_dependency'.
2191         * module.c (enum ab_attribute): New value AB_ARRAY_OUTER_DEPENDENCY.
2192         (attr_bits): Append same value to initializer.
2193         (mio_symbol_attribute): Handle 'array_outer_dependency' attr
2194         in module read and write.
2195         * resolve.c (update_current_proc_outer_array_dependency): New function.
2196         (resolve_function, resolve_call): Add code to update current procedure's
2197         'array_outer_dependency' attribute.
2198         (resolve_variable): Mark current procedure with attribute
2199         array_outer_dependency if the variable is an array coming from outside
2200         the current namespace.
2201         (resolve_fl_procedure): Mark a procedure without body with attribute
2202         'array_outer_dependency'.
2203         * trans-array.c (gfc_conv_resolve_dependencies): If any ss is
2204         marked as 'array_outer_dependency' generate a temporary.
2205         (gfc_walk_function_expr): If the function may reference external arrays,
2206         mark the head gfc_ss with flag 'array_outer_dependency'.
2208 2015-03-22 Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2210         PR libgfortran/59513
2211         * gfortran.texi (Read/Write after EOF marker): New information.
2213 2015-03-21  H.J. Lu  <hongjiu.lu@intel.com>
2215         * gfortran.texi (_gfortran_caf_sync_memory): Put @{xxx} in one
2216         line.
2218 2015-03-21  Tobias Burnus  <burnus@net-b.de>
2220         * gfortran.texi (_gfortran_caf_sync_all, _gfortran_caf_sync_images,
2221         _gfortran_caf_sync_memory, _gfortran_caf_error_stop,
2222         _gfortran_caf_error_stop_str, _gfortran_caf_atomic_define,
2223         _gfortran_caf_atomic_ref, _gfortran_caf_atomic_cas,
2224         _gfortran_caf_atomic_op): New sections.
2226 2015-03-21  Tobias Burnus  <burnus@net-b.de>
2228         * trans-expr.c (gfc_get_tree_for_caf_expr): Reject unimplemented
2229         coindexed coarray accesses.
2231 2015-03-17  Paul Thomas  <pault@gcc.gnu.org>
2233         PR fortran/59198
2234         * trans-types.c (gfc_get_derived_type): If an abstract derived
2235         type with procedure pointer components has no other type of
2236         component, return the backend_decl. Otherwise build the
2237         components if any of the non-procedure pointer components have
2238         no backend_decl.
2240 2015-03-16  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2242         PR fortran/64432
2243         *trans-intrinisic.c (conv_intrinsic_system_clock): Check the
2244         smallest kind passed in user arguments and hardcode tesults for
2245         KIND=1 or KIND=2 to indicate no clock available.
2247 2015-03-16  Andre Vehreschild  <vehre@gmx.de>
2249         * resolve.c: Prevent segfault on illegal input.
2251 2015-03-14  Mikael Morin  <mikael@gcc.gnu.org>
2253         PR fortran/61138
2254         * trans-expr.c (gfc_trans_pointer_assignment): Clear DESCRIPTOR_ONLY
2255         field before reusing LSE.
2257 2015-03-11  Janne Blomqvist  <jb@gcc.gnu.org>
2259         PR libfortran/65200
2260         * gfortran.texi: Document behavior when opening files without
2261         explicit ACTION= specifier.
2263 2015-03-10  Paul Thomas  <pault@gcc.gnu.org>
2265         PR fortran/65024
2266         * trans-expr.c (gfc_conv_component_ref): If the component
2267         backend declaration is missing and the derived type symbol is
2268         available in the reference, call gfc_build_derived_type.
2270 2015-03-10  Alessandro Fanfarillo  <fanfarillo.gcc@gmail.com>
2271             Tobias Burnus  <burnus@net-b.de>
2273         * trans.h (caf_sync_memory): New function decl tree.
2274         * trans-decl.c (gfc_build_builtin_function_decls): Define it.
2275         (create_main_function): Don't call sync_synchronize and leave
2276         it to the CAF library.
2277         * trans-stmt.c (gfc_trans_stop): Ditto.
2278         (gfc_trans_sync): Ditto; add call library call for sync memory.
2280 2015-03-08  Mikael Morin  <mikael@gcc.gnu.org>
2282         PR fortran/60898
2283         * resolve.c (resolve_symbol): Check that the symbol found by
2284         name lookup really is the current symbol being resolved.
2286 2015-03-02  Tobias Burnus  <burnus@net-b.de>
2288         * check.c (gfc_check_atomic): Properly check for coarrayness
2289         and for being coindexed.
2291 2015-02-26  Martin Liska  <mliska@suse.cz>
2293         * resolve.c: Rename enum 'comparison' to 'compare_result' as
2294         solution for -Wodr issue.
2296 2015-02-24  Thomas Schwinge  <thomas@codesourcery.com>
2298         PR libgomp/64625
2299         * f95-lang.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
2300         Remove macros.
2301         (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
2302         * types.def (BT_FN_VOID_INT_PTR_SIZE_PTR_PTR_PTR_INT_INT_VAR)
2303         (BT_FN_VOID_INT_OMPFN_PTR_SIZE_PTR_PTR_PTR_INT_INT_INT_INT_INT_VAR):
2304         Remove function types.
2305         (BT_FN_VOID_INT_SIZE_PTR_PTR_PTR)
2306         (BT_FN_VOID_INT_SIZE_PTR_PTR_PTR_INT_INT_VAR)
2307         (BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_INT_INT_INT_INT_INT_VAR):
2308         New function types.
2310 2015-02-22  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2312         PR fortran/64980
2313         PR fortran/61960
2314         * trans-expr.c (gfc_apply_interface_mapping_to_expr): Remove mapping
2315         for component references to class objects.
2316         (gfc_conv_procedure_call): Compare the class by name.
2318 2015-02-13  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2320         PR fortran/64506
2321         * scanner.c (gfc_next_char_literal): For free form source,
2322         check for '!' and if found, clear the comment and go back
2323         and get the next character. For fixed form source, skip the
2324         rest of the line.
2326 2015-02-12  Paul Thomas  <pault@gcc.gnu.org>
2328         PR fortran/64932
2329         * trans-stmt.c (gfc_trans_deallocate): If a component array
2330         expression is not a descriptor type and it is a derived type
2331         that has allocatable components and is not finalizable, then
2332         deallocate the allocatable components.
2334 2015-02-08  Mikael Morin  <mikael@gcc.gnu.org>
2336         PR fortran/63744
2337         * module.c (check_for_ambiguous): Change argument type
2338         from gfc_symbol to gfc_symtree.  Check local (symtree) name
2339         instead of original (symbol) name.
2340         (read_module): Update caller.
2342 2015-02-06  Paul Thomas  <pault@gcc.gnu.org>
2344         PR fortran/63205
2345         * gfortran.h: Add 'must finalize' field to gfc_expr and
2346         prototypes for gfc_is_alloc_class_scalar_function and for
2347         gfc_is_alloc_class_array_function.
2348         * expr.c (gfc_is_alloc_class_scalar_function,
2349         gfc_is_alloc_class_array_function): New functions.
2350         * trans-array.c (gfc_add_loop_ss_code): Do not move the
2351         expression for allocatable class scalar functions outside the
2352         loop.
2353         (conv_array_index_offset): Cope with deltas being NULL_TREE.
2354         (build_class_array_ref): Do not return with allocatable class
2355         array functions. Add code to pick out the returned class array.
2356         Dereference if necessary and return if not a class object.
2357         (gfc_conv_scalarized_array_ref): Cope with offsets being NULL.
2358         (gfc_walk_function_expr): Return an array ss for the result of
2359         an allocatable class array function.
2360         * trans-expr.c (gfc_conv_subref_array_arg): Remove the assert
2361         that the argument should be a variable. If an allocatable class
2362         array function, set the offset to zero and skip the write-out
2363         loop in this case.
2364         (gfc_conv_procedure_call): Add allocatable class array function
2365         to the assert. Call gfc_conv_subref_array_arg for allocatable
2366         class array function arguments with derived type formal arg..
2367         Add the code for handling allocatable class functions, including
2368         finalization calls to prevent memory leaks.
2369         (arrayfunc_assign_needs_temporary): Return if an allocatable
2370         class array function.
2371         (gfc_trans_assignment_1): Set must_finalize to rhs expression
2372         for allocatable class functions. Set scalar_to_array as needed
2373         for scalar class allocatable functions assigned to an array.
2374         Nullify the allocatable components corresponding the the lhs
2375         derived type so that the finalization does not free them.
2377 2015-01-29  Andre Vehreschild  <vehre@gmx.de>
2378             Janus Weil  <janus@gcc.gnu.org>
2380         PR fortran/60289
2381         Initial patch by Janus Weil
2382         * resolve.c (resolve_allocate_expr): Add check for comp. only
2383         when target is not unlimited polymorphic.
2384         * trans-stmt.c (gfc_trans_allocate): Assign correct value to
2385         _len component of unlimited polymorphic entities.
2387 2015-02-05  Tobias Burnus  <burnus@net-b.de>
2389         PR fortran/64943
2390         * resolve.c (resolve_transfer): Also check structure
2391         constructors.
2393 2015-02-05  Paul Thomas  <pault@gcc.gnu.org>
2395         PR fortran/64757
2396         * resolve.c (resolve_structure_cons): Obtain the rank of class
2397         components.
2398         * trans-expr.c (gfc_trans_alloc_subarray_assign): Do the
2399         assignment to allocatable class array components.
2400         (alloc_scalar_allocatable_for_subcomponent_assignment): If comp
2401         is a class component, allocate to the _data field.
2402         (gfc_trans_subcomponent_assign): If a class component with a
2403         derived type expression set the _vptr field and for array
2404         components, call gfc_trans_alloc_subarray_assign. For scalars,
2405         the assignment is performed here.
2407 2015-02-04  Jakub Jelinek  <jakub@redhat.com>
2409         * options.c: Include langhooks.h.
2410         (gfc_post_options): Change lang_hooks.name based on
2411         selected -std= mode.
2413 2015-02-03  Steven G. Kargl  <kargl@gcc.gnu.org>
2415         * intrinsic.texi (CO_ASSOCIATED): c_prt_1 should be c_ptr_1.
2417 2015-01-30  Andre Vehreschild  <vehre@gmx.de>
2419         * trans-decl.c (gfc_get_symbol_decl): Removed duplicate code.
2420         * trans-expr.c (gfc_conv_intrinsic_to_class): Fixed indentation.
2421         Fixed datatype of charlen to be a 32-bit int.
2423 2015-02-01  Joseph Myers  <joseph@codesourcery.com>
2425         * error.c (gfc_warning (const char *, ...), gfc_warning_now (const
2426         char *, ...)): Remove functions.
2427         * gfortran.h (gfc_warning (const char *, ...), gfc_warning_now
2428         (const char *, ...)): Remove declarations.
2429         * arith.c, check.c, data.c, decl.c, frontend-passes.c,
2430         interface.c, intrinsic.c, io.c, matchexp.c, module.c, openmp.c,
2431         options.c, parse.c, primary.c, resolve.c, scanner.c, symbol.c,
2432         trans-common.c, trans-const.c, trans-stmt.c: All callers of
2433         gfc_warning and gfc_warning_now changed to pass 0 or option number
2434         as first argument.
2436 2015-01-30  Joseph Myers  <joseph@codesourcery.com>
2438         * f95-lang.c, gfortranspec.c, trans-const.c, trans-expr.c: All
2439         callers of fatal_error changed to pass input_location as first
2440         argument.
2442 2015-01-28  Tobias Burnus  <burnus@net-b.de>
2444         * intrinsic.texi (CO_BROADCAST): Correct argument description.
2446 2015-01-27  Tobias Burnus  <burnus@net-b.de>
2448         PR fortran/63861
2449         * trans-openmp.c (gfc_has_alloc_comps, gfc_trans_omp_clauses):
2450         Fix handling for scalar coarrays.
2451         * trans-types.c (gfc_get_element_type): Add comment.
2453 2015-01-27  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2455         PR fortran/64771
2456         * interface.c: Remove <algorithm>.
2457         (check_dummy_characteristics): Use MAX instead of std::max.
2459 2015-01-26  Paul Thomas  <pault@gcc.gnu.org>
2461         PR fortran/62044
2462         * resolve.c (resolve_allocate_expr): If the default initializer
2463         is NULL, keep the original MOLD expression so that the correct
2464         typespec is available.
2466 2015-01-26  Tobias Burnus  <burnus@net-b.de>
2468         PR fortran/64771
2469         * interface.c (check_dummy_characteristics): Fix coarray handling.
2471 2015-01-26  Tobias Burnus  <burnus@net-b.de>
2473         * io.c (gfc_match_inquire): Replace "-1" by a defined constant.
2475 2015-01-26  Janus Weil  <janus@gcc.gnu.org>
2477         PR fortran/64230
2478         * class.c (finalize_component): New argument 'sub_ns'. Insert code to
2479         check if 'expr' is associated.
2480         (generate_finalization_wrapper): Rename 'ptr' symbols to 'ptr1' and
2481         'ptr2'. Pass 'sub_ns' to finalize_component.
2483 2015-01-25  Mikael Morin  <mikael@gcc.gnu.org>
2485         PR fortran/62044
2486         * decl.c (gfc_match_derived_decl): Don't insert a new symtree element.
2487         * module.c (MOD_VERSION): Bump.
2488         (write_module): Don't write list of extensions.
2489         (read_module): Don't jump over list of extensions;
2490         don't load list of extensions.
2491         (load_derived_extensions, write_dt_extensions,
2492          write_derived_extensions): Remove.
2494 2015-01-24  Tobias Burnus  <burnus@net-b.de>
2496         * parse.c (gfc_parse_file): Fix two-location gfc_error call.
2498 2015-01-23  Martin Liska  <mliska@suse.cz>
2500         * decl.c (attr_decl1): Workaround -Wmaybe-uninitialized
2501         false positive during profiledbootstrap by initializing them.
2502         * matchexp.c (match_mult_operand): Likewise.
2503         * module.c (write_atom): Likewise.
2504         (read_module): Likewise.
2506 2015-01-23  Tom de Vries  <tom@codesourcery.com>
2508         PR libgomp/64672
2509         * lang.opt (fopenacc): Mark as LTO option.
2511 2015-01-23  Tom de Vries  <tom@codesourcery.com>
2513         PR libgomp/64707
2514         * lang.opt (fopenmp): Mark as LTO option.
2516 2015-01-23  Andre Vehreschild  <vehre@gmx.de>
2518         * trans-decl.c (gfc_finish_var_decl): Fixed moved comment.
2519         * trans-stmt.c (gfc_trans_allocate): Fixed indentation.
2521 2015-01-23  Jakub Jelinek  <jakub@redhat.com>
2523         * gfc-diagnostic.def (DK_ICE_NOBT): New kind.
2525 2015-01-23  Janus Weil  <janus@gcc.gnu.org>
2527         PR fortran/60922
2528         * class.c (finalize_component): Apply the check for 'fini_coarray' only
2529         to coarray components.
2531 2015-01-23  Tobias Burnus  <burnus@net-b.de>
2533         PR fortran/64726
2534         * trans-openmp.c (gfc_trans_oacc_combined_directive): Fix
2535         loop generation.
2537 2015-01-22  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2539         PR fortran/61933
2540         * libgfortran.h:
2541         * trans-io.c (set_parameter_value): Delete use of has_iostat.
2542         Redefine to not generate any runtime error check calls.
2543         (set_parameter_value_chk): Rename of the former
2544         set_parameter_value with the runtime error checks and fix
2545         whitespace. (set_parameter_value_inquire): New function that
2546         builds a runtime conditional block to set the INQUIRE
2547         common parameter block unit number to -2 when unit numbers
2548         exceed positive KIND=4 limits. (gfc_trans_open): Whitespace.
2549         For unit, use the renamed set_parameter_value_chk.
2550         (gfc_trans_close): Likewise use renamed function.
2551         (build_filepos): Whitespace and use renamed function.
2552         (gfc_trans_inquire): Whitespace and for unit use
2553         set_parameter_value and set_parameter_value_inquire.
2554         (gfc_trans_wait): Remove p->iostat from call to
2555         set_parameter_value. Use new set_parameter_value_chk for unit.
2556         (build_dt): Use the new set_parameter_value without p->iostat
2557         and fix whitespace. Use set_parameter_value_chk for unit.
2559 2015-01-21  Thomas Koenig  <tkoenig@netcologne.de>
2561         PR fortran/57023
2562         * dependency.c (callback_dummy_intent_not_int):  New function.
2563         (dummy_intent_not_in):  New function.
2564         (gfc_full_array_ref_p):  Use dummy_intent_not_in.
2566 2015-01-18  Andre Vehreschild  <vehre@gmx.de>
2567             Janus Weil <janus@gcc.gnu.org>
2569         PR fortran/60255
2570         * class.c (gfc_get_len_component): New.
2571         (gfc_build_class_symbol): Add _len component to unlimited
2572         polymorphic entities.
2573         (find_intrinsic_vtab): Removed emitting of error message.
2574         * gfortran.h: Added prototype for gfc_get_len_component.
2575         * simplify.c (gfc_simplify_len): Use _len component where
2576         available.
2577         * trans-expr.c (gfc_class_len_get): New.
2578         (gfc_conv_intrinsic_to_class): Add handling for deferred
2579         character arrays.
2580         (gfc_conv_structure): Treat _len component correctly.
2581         (gfc_conv_expr): Prevent bind_c handling when not required.
2582         (gfc_trans_pointer_assignment): Propagate _len component.
2583         * trans-stmt.c (class_has_len_component): New.
2584         (trans_associate_var): _len component treatment for associate
2585         context.
2586         (gfc_trans_allocate): Same as for trans_associate_var()
2587         * trans.h: Added prototype for gfc_class_len_get.
2589 2015-01-18  Paul Thomas  <pault@gcc.gnu.org>
2591         PR fortran/57959
2592         * trans-expr.c (gfc_trans_subcomponent_assign): Use a deep copy
2593         for allocatable components, where the source is a variable.
2595 2015-01-18  Paul Thomas  <pault@gcc.gnu.org>
2597         PR fortran/55901
2598         * primary.c (gfc_match_varspec): Exclude dangling associate-
2599         names with dimension 0 from being counted as arrays.
2600         * resolve.c (resolve_assoc_var): Sub-strings are permissible
2601         for associate-names, so exclude characters from the test for
2602         misuse as arrays.
2603         * trans-decl.c (gfc_get_symbol_decl): Associate-names can use
2604         the hidden string length variable of their associated target.
2605         Signal this by setting 'length' to a constant, if the decl for
2606         the string length is a variable.
2608 2015-01-17  Paul Thomas  <pault@gcc.gnu.org>
2610         PR fortran/64578
2611         * trans-expr.c (gfc_trans_pointer_assignment): Make sure that
2612         before reinitializing rse, to add the rse.pre to block before
2613         creating 'ptrtemp'.
2614         * trans-intrinsic.c (gfc_conv_associated): Deal with the class
2615         data being a descriptor.
2617 2015-01-17  Andre Vehreschild  <vehre@gmx.de>
2619         PR fortran/60357
2620         * primary.c (build_actual_constructor): Prevent warning.
2621         * trans-expr.c (alloc_scalar_allocatable_for_subcomponent_
2622         assignment): New function encapsulates treatment of allocatable
2623         components.
2624         (gfc_trans_subcomponent_assign): Needed to distinguish between
2625         regular assignment and initilization.
2626         (gfc_trans_structure_assign): Same.
2627         (gfc_conv_structure): Same.
2629         PR fortran/61275
2630         * gfortran.h: deferred_parameter is not needed, because
2631         it artificial does the trick completely.
2632         * primary.c (build_actual_constructor): Same.
2633         (gfc_convert_to_structure_constructor): Same.
2634         * resolve.c (resolve_fl_derived0): Same.
2635         * trans-expr.c (gfc_conv_component_ref): Prevent treating
2636         allocatable deferred length char arrays here.
2637         (gfc_trans_subcomponent_assign): Same as above.
2638         * trans-types.c (gfc_sym_type): This is done in
2639         gfc_get_derived_type already.
2641 2015-01-17  Andre Vehreschild  <vehre@gmx.de>
2643         PR fortran/60334
2644         * trans-decl.c (gfc_get_symbol_decl):Use a ref on the string
2645         length when the symbol is declared to be a result.
2646         * trans-expr.c (gfc_conv_procedure_call): Strip deref on the
2647         string length when functions are nested and the string length
2648         is a reference already.
2650 2015-01-16  Janus Weil  <janus@gcc.gnu.org>
2652         PR fortran/45290
2653         * decl.c (match_pointer_init): Error out if resolution of init expr
2654         failed.
2656 2015-01-15  Tobias Burnus  <burnus@net-b.de>
2658         * openmp.c (check_symbol_not_pointer, resolve_oacc_data_clauses,
2659         resolve_oacc_deviceptr_clause, resolve_omp_clauses,
2660         gfc_resolve_oacc_declare): Replace '%s' by %qs.
2662 2015-01-15  Thomas Schwinge  <thomas@codesourcery.com>
2663             Cesar Philippidis  <cesar@codesourcery.com>
2664             James Norris  <jnorris@codesourcery.com>
2665             Ilmir Usmanov  <i.usmanov@samsung.com>
2666             Tobias Burnus  <burnus@net-b.de>
2668         * lang.opt (fopenacc): New option.
2669         * cpp.c (cpp_define_builtins): Conditionally define _OPENACC.
2670         * dump-parse-tree.c (show_omp_node): Split part of it into...
2671         (show_omp_clauses): ... this new function.
2672         (show_omp_node, show_code_node): Handle EXEC_OACC_PARALLEL_LOOP,
2673         EXEC_OACC_PARALLEL, EXEC_OACC_KERNELS_LOOP, EXEC_OACC_KERNELS,
2674         EXEC_OACC_DATA, EXEC_OACC_HOST_DATA, EXEC_OACC_LOOP,
2675         EXEC_OACC_UPDATE, EXEC_OACC_WAIT, EXEC_OACC_CACHE,
2676         EXEC_OACC_ENTER_DATA, EXEC_OACC_EXIT_DATA.
2677         (show_namespace): Update for OpenACC.
2678         * f95-lang.c (DEF_FUNCTION_TYPE_VAR_2, DEF_FUNCTION_TYPE_VAR_8)
2679         (DEF_FUNCTION_TYPE_VAR_12, DEF_GOACC_BUILTIN)
2680         (DEF_GOACC_BUILTIN_COMPILER): New macros.
2681         * types.def (BT_FN_VOID_INT_INT_VAR)
2682         (BT_FN_VOID_INT_PTR_SIZE_PTR_PTR_PTR_INT_INT_VAR)
2683         (BT_FN_VOID_INT_OMPFN_PTR_SIZE_PTR_PTR_PTR_INT_INT_INT_INT_INT_VAR):
2684         New function types.
2685         * gfortran.h (gfc_statement): Add ST_OACC_PARALLEL_LOOP,
2686         ST_OACC_END_PARALLEL_LOOP, ST_OACC_PARALLEL, ST_OACC_END_PARALLEL,
2687         ST_OACC_KERNELS, ST_OACC_END_KERNELS, ST_OACC_DATA,
2688         ST_OACC_END_DATA, ST_OACC_HOST_DATA, ST_OACC_END_HOST_DATA,
2689         ST_OACC_LOOP, ST_OACC_END_LOOP, ST_OACC_DECLARE, ST_OACC_UPDATE,
2690         ST_OACC_WAIT, ST_OACC_CACHE, ST_OACC_KERNELS_LOOP,
2691         ST_OACC_END_KERNELS_LOOP, ST_OACC_ENTER_DATA, ST_OACC_EXIT_DATA,
2692         ST_OACC_ROUTINE.
2693         (struct gfc_expr_list): New data type.
2694         (gfc_get_expr_list): New macro.
2695         (gfc_omp_map_op): Add OMP_MAP_FORCE_ALLOC, OMP_MAP_FORCE_DEALLOC,
2696         OMP_MAP_FORCE_TO, OMP_MAP_FORCE_FROM, OMP_MAP_FORCE_TOFROM,
2697         OMP_MAP_FORCE_PRESENT, OMP_MAP_FORCE_DEVICEPTR.
2698         (OMP_LIST_FIRST, OMP_LIST_DEVICE_RESIDENT, OMP_LIST_USE_DEVICE)
2699         (OMP_LIST_CACHE): New enumerators.
2700         (struct gfc_omp_clauses): Add async_expr, gang_expr, worker_expr,
2701         vector_expr, num_gangs_expr, num_workers_expr, vector_length_expr,
2702         wait_list, tile_list, async, gang, worker, vector, seq,
2703         independent, wait, par_auto, gang_static, and loc members.
2704         (struct gfc_namespace): Add oacc_declare_clauses member.
2705         (gfc_exec_op): Add EXEC_OACC_KERNELS_LOOP,
2706         EXEC_OACC_PARALLEL_LOOP, EXEC_OACC_PARALLEL, EXEC_OACC_KERNELS,
2707         EXEC_OACC_DATA, EXEC_OACC_HOST_DATA, EXEC_OACC_LOOP,
2708         EXEC_OACC_UPDATE, EXEC_OACC_WAIT, EXEC_OACC_CACHE,
2709         EXEC_OACC_ENTER_DATA, EXEC_OACC_EXIT_DATA.
2710         (gfc_free_expr_list, gfc_resolve_oacc_directive)
2711         (gfc_resolve_oacc_declare, gfc_resolve_oacc_parallel_loop_blocks)
2712         (gfc_resolve_oacc_blocks): New prototypes.
2713         * match.c (match_exit_cycle): Handle EXEC_OACC_LOOP and
2714         EXEC_OACC_PARALLEL_LOOP.
2715         * match.h (gfc_match_oacc_cache, gfc_match_oacc_wait)
2716         (gfc_match_oacc_update, gfc_match_oacc_declare)
2717         (gfc_match_oacc_loop, gfc_match_oacc_host_data)
2718         (gfc_match_oacc_data, gfc_match_oacc_kernels)
2719         (gfc_match_oacc_kernels_loop, gfc_match_oacc_parallel)
2720         (gfc_match_oacc_parallel_loop, gfc_match_oacc_enter_data)
2721         (gfc_match_oacc_exit_data, gfc_match_oacc_routine): New
2722         prototypes.
2723         * openmp.c: Include "diagnostic.h" and "gomp-constants.h".
2724         (gfc_free_omp_clauses): Update for members added to struct
2725         gfc_omp_clauses.
2726         (gfc_match_omp_clauses): Change mask paramter to uint64_t.  Add
2727         openacc parameter.
2728         (resolve_omp_clauses): Add openacc parameter.  Update for OpenACC.
2729         (struct fortran_omp_context): Add is_openmp member.
2730         (gfc_resolve_omp_parallel_blocks): Initialize it.
2731         (gfc_resolve_do_iterator): Update for OpenACC.
2732         (gfc_resolve_omp_directive): Call
2733         resolve_omp_directive_inside_oacc_region.
2734         (OMP_CLAUSE_PRIVATE, OMP_CLAUSE_FIRSTPRIVATE)
2735         (OMP_CLAUSE_LASTPRIVATE, OMP_CLAUSE_COPYPRIVATE)
2736         (OMP_CLAUSE_SHARED, OMP_CLAUSE_COPYIN, OMP_CLAUSE_REDUCTION)
2737         (OMP_CLAUSE_IF, OMP_CLAUSE_NUM_THREADS, OMP_CLAUSE_SCHEDULE)
2738         (OMP_CLAUSE_DEFAULT, OMP_CLAUSE_ORDERED, OMP_CLAUSE_COLLAPSE)
2739         (OMP_CLAUSE_UNTIED, OMP_CLAUSE_FINAL, OMP_CLAUSE_MERGEABLE)
2740         (OMP_CLAUSE_ALIGNED, OMP_CLAUSE_DEPEND, OMP_CLAUSE_INBRANCH)
2741         (OMP_CLAUSE_LINEAR, OMP_CLAUSE_NOTINBRANCH, OMP_CLAUSE_PROC_BIND)
2742         (OMP_CLAUSE_SAFELEN, OMP_CLAUSE_SIMDLEN, OMP_CLAUSE_UNIFORM)
2743         (OMP_CLAUSE_DEVICE, OMP_CLAUSE_MAP, OMP_CLAUSE_TO)
2744         (OMP_CLAUSE_FROM, OMP_CLAUSE_NUM_TEAMS, OMP_CLAUSE_THREAD_LIMIT)
2745         (OMP_CLAUSE_DIST_SCHEDULE): Use uint64_t.
2746         (OMP_CLAUSE_ASYNC, OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS)
2747         (OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_COPY, OMP_CLAUSE_COPYOUT)
2748         (OMP_CLAUSE_CREATE, OMP_CLAUSE_PRESENT)
2749         (OMP_CLAUSE_PRESENT_OR_COPY, OMP_CLAUSE_PRESENT_OR_COPYIN)
2750         (OMP_CLAUSE_PRESENT_OR_COPYOUT, OMP_CLAUSE_PRESENT_OR_CREATE)
2751         (OMP_CLAUSE_DEVICEPTR, OMP_CLAUSE_GANG, OMP_CLAUSE_WORKER)
2752         (OMP_CLAUSE_VECTOR, OMP_CLAUSE_SEQ, OMP_CLAUSE_INDEPENDENT)
2753         (OMP_CLAUSE_USE_DEVICE, OMP_CLAUSE_DEVICE_RESIDENT)
2754         (OMP_CLAUSE_HOST_SELF, OMP_CLAUSE_OACC_DEVICE, OMP_CLAUSE_WAIT)
2755         (OMP_CLAUSE_DELETE, OMP_CLAUSE_AUTO, OMP_CLAUSE_TILE): New macros.
2756         (gfc_match_omp_clauses): Handle those.
2757         (OACC_PARALLEL_CLAUSES, OACC_KERNELS_CLAUSES, OACC_DATA_CLAUSES)
2758         (OACC_LOOP_CLAUSES, OACC_PARALLEL_LOOP_CLAUSES)
2759         (OACC_KERNELS_LOOP_CLAUSES, OACC_HOST_DATA_CLAUSES)
2760         (OACC_DECLARE_CLAUSES, OACC_UPDATE_CLAUSES)
2761         (OACC_ENTER_DATA_CLAUSES, OACC_EXIT_DATA_CLAUSES)
2762         (OACC_WAIT_CLAUSES): New macros.
2763         (gfc_free_expr_list, match_oacc_expr_list, match_oacc_clause_gang)
2764         (gfc_match_omp_map_clause, gfc_match_oacc_parallel_loop)
2765         (gfc_match_oacc_parallel, gfc_match_oacc_kernels_loop)
2766         (gfc_match_oacc_kernels, gfc_match_oacc_data)
2767         (gfc_match_oacc_host_data, gfc_match_oacc_loop)
2768         (gfc_match_oacc_declare, gfc_match_oacc_update)
2769         (gfc_match_oacc_enter_data, gfc_match_oacc_exit_data)
2770         (gfc_match_oacc_wait, gfc_match_oacc_cache)
2771         (gfc_match_oacc_routine, oacc_is_loop)
2772         (resolve_oacc_scalar_int_expr, resolve_oacc_positive_int_expr)
2773         (check_symbol_not_pointer, check_array_not_assumed)
2774         (resolve_oacc_data_clauses, resolve_oacc_deviceptr_clause)
2775         (oacc_compatible_clauses, oacc_is_parallel, oacc_is_kernels)
2776         (omp_code_to_statement, oacc_code_to_statement)
2777         (resolve_oacc_directive_inside_omp_region)
2778         (resolve_omp_directive_inside_oacc_region)
2779         (resolve_oacc_nested_loops, resolve_oacc_params_in_parallel)
2780         (resolve_oacc_loop_blocks, gfc_resolve_oacc_blocks)
2781         (resolve_oacc_loop, resolve_oacc_cache, gfc_resolve_oacc_declare)
2782         (gfc_resolve_oacc_directive): New functions.
2783         * parse.c (next_free): Update for OpenACC.  Move some code into...
2784         (verify_token_free): ... this new function.
2785         (next_fixed): Update for OpenACC.  Move some code into...
2786         (verify_token_fixed): ... this new function.
2787         (case_executable): Add ST_OACC_UPDATE, ST_OACC_WAIT,
2788         ST_OACC_CACHE, ST_OACC_ENTER_DATA, and ST_OACC_EXIT_DATA.
2789         (case_exec_markers): Add ST_OACC_PARALLEL_LOOP, ST_OACC_PARALLEL,
2790         ST_OACC_KERNELS, ST_OACC_DATA, ST_OACC_HOST_DATA, ST_OACC_LOOP,
2791         ST_OACC_KERNELS_LOOP.
2792         (case_decl): Add ST_OACC_ROUTINE.
2793         (push_state, parse_critical_block, parse_progunit): Update for
2794         OpenACC.
2795         (gfc_ascii_statement): Handle ST_OACC_PARALLEL_LOOP,
2796         ST_OACC_END_PARALLEL_LOOP, ST_OACC_PARALLEL, ST_OACC_END_PARALLEL,
2797         ST_OACC_KERNELS, ST_OACC_END_KERNELS, ST_OACC_KERNELS_LOOP,
2798         ST_OACC_END_KERNELS_LOOP, ST_OACC_DATA, ST_OACC_END_DATA,
2799         ST_OACC_HOST_DATA, ST_OACC_END_HOST_DATA, ST_OACC_LOOP,
2800         ST_OACC_END_LOOP, ST_OACC_DECLARE, ST_OACC_UPDATE, ST_OACC_WAIT,
2801         ST_OACC_CACHE, ST_OACC_ENTER_DATA, ST_OACC_EXIT_DATA,
2802         ST_OACC_ROUTINE.
2803         (verify_st_order, parse_spec): Handle ST_OACC_DECLARE.
2804         (parse_executable): Handle ST_OACC_PARALLEL_LOOP,
2805         ST_OACC_KERNELS_LOOP, ST_OACC_LOOP, ST_OACC_PARALLEL,
2806         ST_OACC_KERNELS, ST_OACC_DATA, ST_OACC_HOST_DATA.
2807         (decode_oacc_directive, parse_oacc_structured_block)
2808         (parse_oacc_loop, is_oacc): New functions.
2809         * parse.h (struct gfc_state_data): Add oacc_declare_clauses
2810         member.
2811         (is_oacc): New prototype.
2812         * resolve.c (gfc_resolve_blocks, gfc_resolve_code): Handle
2813         EXEC_OACC_PARALLEL_LOOP, EXEC_OACC_PARALLEL,
2814         EXEC_OACC_KERNELS_LOOP, EXEC_OACC_KERNELS, EXEC_OACC_DATA,
2815         EXEC_OACC_HOST_DATA, EXEC_OACC_LOOP, EXEC_OACC_UPDATE,
2816         EXEC_OACC_WAIT, EXEC_OACC_CACHE, EXEC_OACC_ENTER_DATA,
2817         EXEC_OACC_EXIT_DATA.
2818         (resolve_codes): Call gfc_resolve_oacc_declare.
2819         * scanner.c (openacc_flag, openacc_locus): New variables.
2820         (skip_free_comments): Update for OpenACC.  Move some code into...
2821         (skip_omp_attribute): ... this new function.
2822         (skip_oacc_attribute): New function.
2823         (skip_fixed_comments, gfc_next_char_literal): Update for OpenACC.
2824         * st.c (gfc_free_statement): Handle EXEC_OACC_PARALLEL_LOOP,
2825         EXEC_OACC_PARALLEL, EXEC_OACC_KERNELS_LOOP, EXEC_OACC_KERNELS,
2826         EXEC_OACC_DATA, EXEC_OACC_HOST_DATA, EXEC_OACC_LOOP,
2827         EXEC_OACC_UPDATE, EXEC_OACC_WAIT, EXEC_OACC_CACHE,
2828         EXEC_OACC_ENTER_DATA, EXEC_OACC_EXIT_DATA.
2829         * trans-decl.c (gfc_generate_function_code): Update for OpenACC.
2830         * trans-openmp.c: Include "gomp-constants.h".
2831         (gfc_omp_finish_clause, gfc_trans_omp_clauses): Use GOMP_MAP_*
2832         instead of OMP_CLAUSE_MAP_*.  Use OMP_CLAUSE_SET_MAP_KIND.
2833         (gfc_trans_omp_clauses): Handle OMP_LIST_USE_DEVICE,
2834         OMP_LIST_DEVICE_RESIDENT, OMP_LIST_CACHE, and OMP_MAP_FORCE_ALLOC,
2835         OMP_MAP_FORCE_DEALLOC, OMP_MAP_FORCE_TO, OMP_MAP_FORCE_FROM,
2836         OMP_MAP_FORCE_TOFROM, OMP_MAP_FORCE_PRESENT,
2837         OMP_MAP_FORCE_DEVICEPTR, and gfc_omp_clauses' async, seq,
2838         independent, wait_list, num_gangs_expr, num_workers_expr,
2839         vector_length_expr, vector, vector_expr, worker, worker_expr,
2840         gang, gang_expr members.
2841         (gfc_trans_omp_do): Handle EXEC_OACC_LOOP.
2842         (gfc_convert_expr_to_tree, gfc_trans_oacc_construct)
2843         (gfc_trans_oacc_executable_directive)
2844         (gfc_trans_oacc_wait_directive, gfc_trans_oacc_combined_directive)
2845         (gfc_trans_oacc_declare, gfc_trans_oacc_directive): New functions.
2846         * trans-stmt.c (gfc_trans_block_construct): Update for OpenACC.
2847         * trans-stmt.h (gfc_trans_oacc_directive, gfc_trans_oacc_declare):
2848         New prototypes.
2849         * trans.c (tranc_code): Handle EXEC_OACC_CACHE, EXEC_OACC_WAIT,
2850         EXEC_OACC_UPDATE, EXEC_OACC_LOOP, EXEC_OACC_HOST_DATA,
2851         EXEC_OACC_DATA, EXEC_OACC_KERNELS, EXEC_OACC_KERNELS_LOOP,
2852         EXEC_OACC_PARALLEL, EXEC_OACC_PARALLEL_LOOP, EXEC_OACC_ENTER_DATA,
2853         EXEC_OACC_EXIT_DATA.
2854         * gfortran.texi: Update for OpenACC.
2855         * intrinsic.texi: Likewise.
2856         * invoke.texi: Likewise.
2858 2015-01-15  Janus Weil  <janus@gcc.gnu.org>
2860         PR fortran/58023
2861         * resolve.c (resolve_fl_derived0): Continue resolving next component
2862         after error.
2864 2015-01-14  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
2866         PR fortran/61933
2867         * io.c (gfc_match_inquire): Generate error if unit number in
2868         inquire statement is a constant -1.  All other values allowed.
2869         * trans-io.c (gfc_trans_inquire): Delete dummy iostat variable.
2870         (create_dummy_iostat): Delete function no longer used.
2872 2015-01-13  Jakub Jelinek  <jakub@redhat.com>
2874         PR fortran/64528
2875         * trans-decl.c (create_function_arglist): Don't set TREE_READONLY
2876         on dummy args with VALUE attribute.
2878 2015-01-11  Janus Weil  <janus@gcc.gnu.org>
2880         PR fortran/63733
2881         * interface.c (gfc_extend_expr): Look for type-bound operators before
2882         non-typebound ones.
2884 2015-01-11  Janus Weil  <janus@gcc.gnu.org>
2886         PR fortran/58023
2887         * resolve.c (resolve_fl_derived0): Set error flag if problems with the
2888         interface of a procedure-pointer component were detected.
2890 2015-01-11  Janus Weil  <janus@gcc.gnu.org>
2892         PR fortran/64508
2893         * interface.c (compare_parameter): Interface check for
2894         procedure-pointer component as actual argument.
2896 2015-01-10  Thomas Schwinge  <thomas@codesourcery.com>
2898         * gfortran.texi: Update for libgomp being renamed from "GNU OpenMP
2899         Runtime Library" to "GNU Offloading and Multi Processing Runtime
2900         Library".
2901         * intrinsic.texi: Likewise.
2903 2015-01-10  Tobias Burnus  <burnus@net-b.de>
2905         PR fortran/64522
2906         * invoke.texi (Wline-truncation): Document new behaviour.
2907         * lang.opt (Wline-truncation): Add Init(-1).
2908         * options.c (gfc_post_options): If -Wline-truncation is unset,
2909         enable it for free-form source files; for the latter, also use
2910         -Werror=line-truncation, unless -Wno-error has been specified.
2912 2015-01-09  Michael Collison  <michael.collison@linaro.org>
2914         * convert.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
2915         input.h, alias.h, symtab.h, options.h, fold-const.h,
2916         wide-int.h, and inchash.h due to flattening of tree.h.
2917         * cpp.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
2918         input.h, alias.h, symtab.h, fold-const.h,
2919         wide-int.h, and inchash.h due to flattening of tree.h.
2920         * decl.c: Ditto.
2921         * f95.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
2922         input.h, alias.h, symtab.h, options.h, fold-const.h,
2923         wide-int.h, and inchash.h due to flattening of tree.h.
2924         * iresolve.c: Ditto.
2925         * match.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
2926         input.h, alias.h, symtab.h, fold-const.h,
2927         wide-int.h, and inchash.h due to flattening of tree.h.
2928         * module.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
2929         input.h, alias.h, symtab.h, options.h, fold-const.h,
2930         wide-int.h, and inchash.h due to flattening of tree.h.
2931         * options.c: Ditto.
2932         * target-memory.c: Include hash-set.h, vec.h,
2933         double-int.h, input.h, alias.h, symtab.h, fold-const.h,
2934         wide-int.h, and inchash.h due to flattening of tree.h.
2935         * trans-array.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
2936         input.h, alias.h, symtab.h, options.h, fold-const.h,
2937         wide-int.h, and inchash.h due to flattening of tree.h.
2938         * trans.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
2939         input.h, alias.h, symtab.h, options.h, fold-const.h,
2940         wide-int.h, and inchash.h due to flattening of tree.h.
2941         * trans-common.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
2942         input.h, alias.h, symtab.h, fold-const.h,
2943         wide-int.h, and inchash.h due to flattening of tree.h.
2944         * trans-const.c: Ditto.
2945         * trans-decl.c: Ditto.
2946         * trans-expr.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
2947         input.h, alias.h, symtab.h, options.h, fold-const.h,
2948         wide-int.h, and inchash.h due to flattening of tree.h.
2949         * trans-intrinsic.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
2950         input.h, alias.h, symtab.h, fold-const.h,
2951         wide-int.h, inchash.h and real.h due to flattening of tree.h.
2952         * trans-io.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
2953         input.h, alias.h, symtab.h, options.h, fold-const.h,
2954         wide-int.h, and inchash.h due to flattening of tree.h.
2955         * trans-openmp.c: Ditto.
2956         * trans-stmt.c: Ditto.
2957         * trans-types.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
2958         input.h, alias.h, symtab.h, fold-const.h,
2959         wide-int.h, inchash.h and real.h due to flattening of tree.h.
2961 2015-01-08  Tobias Burnus  <burnus@net-b.de>
2963         * trans-decl.c (gfc_build_qualified_array): Fix coarray tokens
2964         for module coarrays with -fcoarray=lib.
2965         (get_proc_pointer_decl): As module variable, make only public
2966         when not marked as private.
2968 2015-01-05  Thomas Koenig  <tkoenig@gcc.gnu.org>
2970         PR fortran/47674
2971         * dependency.h:  Actually commit changes.
2973 2015-01-05  Thomas Koenig  <tkoenig@gcc.gnu.org>
2975         PR fortran/47674
2976         * dependency.c:  Update copyright years.
2977         (gfc_discard_nops):  Add prototype.
2978         * dependency.c (discard_nops):  Rename to gfc_discard_nops,
2979         make non-static.
2980         (gfc_discard_nops):  Use gfc_discard_nops.
2981         (gfc_dep_difference):  Likewise.
2982         * frontend-passes.c  Update copyright years.
2983         (realloc_strings):  New function.  Add prototype.
2984         (gfc_run_passes):  Call realloc_strings.
2985         (realloc_string_callback):  New function.
2986         (create_var):  Add prototype.  Handle case of a
2987         scalar character variable.
2988         (optimize_trim):  Do not handle allocatable variables.
2990 2015-01-05  Jakub Jelinek  <jakub@redhat.com>
2992         Update copyright years.
2994         * gfortranspec.c (lang_specific_driver): Update copyright notice
2995         dates.
2996         * gfc-internals.texi: Bump @copying's copyright year.
2997         * gfortran.texi: Ditto.
2998         * intrinsic.texi: Ditto.
2999         * invoke.texi: Ditto.
3001 2015-01-02  Janus Weil  <janus@gcc.gnu.org>
3003         PR fortran/57562
3004         * expr.c (find_component_ref): Deal with extended types.
3006 2015-01-02  Tobias Burnus  <burnus@net-b.de>
3008         * trans-decl.c (gfc_build_qualified_array): Fix coarray tokens
3009         for module coarrays with -fcoarray=lib.
3011 2015-01-02  Janus Weil  <janus@gcc.gnu.org>
3013         PR fortran/60507
3014         * interface.c (is_procptr_result): New function to check if an
3015         expression is a procedure-pointer result.
3016         (compare_actual_formal): Use it.
3018 Copyright (C) 2015 Free Software Foundation, Inc.
3020 Copying and distribution of this file, with or without modification,
3021 are permitted in any medium without royalty provided the copyright
3022 notice and this notice are preserved.