1 2014-12-12 Tobias Burnus <burnus@net-b.de>
4 * expr.c (gfc_is_simply_contiguous): Optionally permit array elements.
5 (gfc_check_pointer_assign): Update call.
6 * interface.c (compare_parameter): Ditto.
7 * trans-array.c (gfc_conv_array_parameter): Ditto.
8 * trans-intrinsic.c (gfc_conv_intrinsic_transfer,
9 conv_isocbinding_function): Ditto.
10 * gfortran.h (gfc_is_simply_contiguous): Update prototype.
12 2014-12-12 Tobias Burnus <burnus@net-b.de>
15 * check.c (gfc_check_reshape): Replace %<%d%> by %qd.
16 * matchexp.c (gfc_match_defined_op_name): Use %qc.
17 * symbol.c (gfc_add_new_implicit_range,
18 gfc_merge_new_implicit): Ditto.
20 2015-12-10 David Malcolm <dmalcolm@redhat.com>
22 * io.c (gfc_match_open): Fix indentation.
24 2015-12-09 Tobias Burnus <burnus@net-b.de>
25 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
27 * trans.c (gfc_allocate_using_lib,gfc_deallocate_with_status):
28 Introducing __asm__ __volatile__ ("":::"memory")
29 after image control statements.
30 * trans-stmt.c (gfc_trans_sync, gfc_trans_event_post_wait,
31 gfc_trans_lock_unlock, gfc_trans_critical): Ditto.
32 * trans-intrinsic.c (gfc_conv_intrinsic_caf_get,
33 conv_caf_send): Introducing __asm__ __volatile__ ("":::"memory")
34 after send, before get and around sendget.
36 2015-12-09 Tobias Burnus <burnus@net-b.de>
39 * decl.c (gfc_verify_c_interop_param, variable_decl): Use
40 %< ... %> for quoting in diagnostics.
41 * io.c (check_format): Ditto.
42 * resolve.c (resolve_operator): Ditto.
43 * symbol.c (check_conflict): Ditto.
44 * trans-common.c (translate_common): Ditto.
46 2015-12-07 David Malcolm <dmalcolm@redhat.com>
48 * error.c (gfc_format_decoder): Update for change of
49 text_info::set_range to text_info::set_location.
51 2015-12-05 Paul Thomas <pault@gcc.gnu.org>
54 * decl.c (gfc_match_formal_arglist): Correct error, where 'sym'
55 was used instead of 'progname'.
57 2015-12-02 Tobias Burnus <burnus@net-b.de>
58 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
60 * check.c (gfc_check_event_query): New function.
61 * dump-parse-tree.c (show_code_node): Handle EXEC_EVENT_POST,
63 * expr.c (gfc_check_vardef_context): New check for event variables
65 * gfortran.h (gfc_statement): Add ST_EVENT_POST, ST_EVENT_WAIT.
66 (gfc_isym_id): GFC_ISYM_EVENT_QUERY.
67 (struct symbol_attribute): New field.
68 (gfc_exec_op): Add EXEC_EVENT_POST and EXEC_EVENT_WAIT.
69 * gfortran.texi: Document about new events functions and minor
71 * interface.c (compare_parameter): New check.
72 (gfc_procedure_use): New check for explicit procedure interface.
73 (add_subroutines): Add event_query.
74 * intrinsic.h (gfc_check_event_query,gfc_resolve_event_query):
76 * iresolve.c (gfc_resolve_event_query): New function.
77 * iso-fortran-env.def (event_type): New type.
78 * match.c (event_statement,gfc_match_event_post,gfc_match_event_wait):
80 (gfc_match_name): New event post and event wait.
81 * match.h (gfc_match_event_post,gfc_match_event_wait):
83 * module.c (ab_attribute): Add AB_EVENT_COMP.
84 (attr_bits): Likewise.
85 (mio_symbol_attribute): Handle event_comp attribute.
86 * parse.c (decode_statement): Add ST_EVENT_POST, ST_EVENT_WAIT.
87 (next_statement): Add ST_EVENT_POST, ST_EVENT_WAIT.
88 (gfc_ascii_statement): Add ST_EVENT_POST, ST_EVENT_WAIT.
89 (parse_derived): Check for event_type components.
90 * resolve.c (resolve_allocate_expr): Check for event variable def.
91 (resolve_lock_unlock): Renamed to resolve_lock_unlock_event. It
92 includes logic for locks and events.
93 (gfc_resolve_code): Call it.
94 (gfc_resolve_symbol): New check for event variable to be a corray.
95 * st.c (gfc_free_statement): Handle new EXEC_EVENT_POST and
97 * trans-decl.c (gfor_fndecl_caf_event_post,gfor_fndecl_caf_event_wait,
98 gfor_fndecl_caf_event_query): New global variables.
99 (generate_coarray_sym_init): Checking for event_type.
100 (gfc_conv_procedure_call): Check for C bind attribute.
101 * trans-intrinsic.c (conv_intrinsic_event_query): New function.
102 (conv_intrinsic_move_alloc): Call it.
103 * trans-stmt.c (gfc_trans_lock_unlock): Passing address
105 (gfc_trans_sync): Likewise.
106 (gfc_trans_event_post_wait): New function.
107 * trans-stmt.h (gfc_trans_event_post_wait): New prototype.
108 * trans-types.c (gfc_get_derived_type): Integer_kind as event_type.
109 * trans.c (gfc_allocate_using_lib): New argument and logic for events.
110 (gfc_allocate_allocatable): Passing new argument.
111 (trans_code): Handle EXEC_EVENT_POST, EXEC_EVENT_WAIT.
112 * trans.h (gfc_coarray_type): New elements.
113 (gfor_fndecl_caf_event_post,gfor_fndecl_caf_event_wait,
114 gfor_fndecl_caf_event_query): Declare them.
116 2015-12-02 Cesar Philippidis <cesar@codesourcery.com>
119 * openmp.c (gfc_match_omp_clauses): Allow subarrays for acc reductions.
120 (resolve_omp_clauses): Error on any acc reductions on arrays.
122 2015-12-01 Cesar Philippidis <cesar@codesourcery.com>
124 * dump-parse-tree.c (show_omp_clauses): Handle optional num and static
125 arguments for the gang clause.
126 * gfortran.h (gfc_omp_clauses): Rename gang_expr as gang_num_expr.
127 Add gang_static_expr.
128 * openmp.c (gfc_free_omp_clauses): Update to free gang_num_expr and
130 (match_oacc_clause_gang): Update to support both num and static in
132 (resolve_omp_clauses): Formatting. Also handle gang_num_expr and
134 (resolve_oacc_params_in_parallel): New const char arg argument.
135 Use it to report more accurate gang, worker and vector clause errors.
136 (resolve_oacc_loop_blocks): Update calls to
137 resolve_oacc_params_in_parallel.
138 * trans-openmp.c (gfc_trans_omp_clauses): Update the gimplification of
140 (gfc_trans_oacc_combined_directive): Make use of gang_num_expr and
141 gang_static_expr. Remove OMP_LIST_REDUCTION from construct_clauses.
143 2015-11-30 Cesar Philippidis <cesar@codesourcery.com>
144 James Norris <jnorris@codesourcery.com>
145 Nathan Sidwell <nathan@codesourcery.com>
147 * f95-lang.c (gfc_attribute_table): Add an "oacc function"
149 * gfortran.h (symbol_attribute): Add an oacc_function bit-field.
150 (gfc_oacc_routine_name): New struct;
151 (gfc_get_oacc_routine_name): New macro.
152 (gfc_namespace): Add oacc_routine_clauses, oacc_routine_names and
154 (gfc_exec_op): Add EXEC_OACC_ROUTINE.
155 * openmp.c (OACC_ROUTINE_CLAUSES): New mask.
156 (gfc_oacc_routine_dims): New function.
157 (gfc_match_oacc_routine): Add support for named routines and the
158 gang, worker vector and seq clauses.
159 * parse.c (is_oacc): Add EXEC_OACC_ROUTINE.
160 * resolve.c (gfc_resolve_blocks): Likewise.
161 * st.c (gfc_free_statement): Likewise.
162 * trans-decl.c (add_attributes_to_decl): Attach an 'oacc function'
163 attribute and shape geometry for acc routine.
165 2015-11-30 Paul Thomas <pault@gcc.gnu.org>
168 * decl.c (gfc_match_formal_arglist): Cope with zero formal args
169 either in interface declaration or in procedure declaration in
172 2015-11-25 Steven G. Kargl <kargl@gcc.gnu.org>
175 * trans-stmt.c (gfc_do_allocate): Convert gcc_assert argument into
176 into part of conditional statement.
178 2015-11-25 Ilmir Usmanov <me@ilmir.us>
179 Cesar Philippidis <cesar@codesourcery.com>
182 * scanner.c (skip_oacc_attribute): Remove continue_flag parameter.
184 (skip_free_oacc_sentinel): ... this.
185 (skip_omp_attribute): Remove continue_flag parameter. Rename as ...
186 (skip_free_omp_sentinel): ... this.
187 (skip_free_comments): Update to call skip_free_oacc_sentinel and
188 skip_free_omp_sentinel.
189 (skip_fixed_omp_sentinel): New function.
190 (skip_fixed_oacc_sentinel): New function.
191 (skip_fixed_comments): Fix mix of OpenACC and OpenMP sentinels in
194 2015-11-24 Steven G. Kargl <kargl@gcc.gnu.org>
197 * simplify.c (gfc_simplify_cshift): Allow all EXPR_*.
199 2015-11-22 Steven G. Kargl <kargl@gcc.gnu.org>
202 * simplify.c (gfc_simplify_cshift): Add EXPR_OP to mix.
204 2015-11-22 James Norris <jnorris@codesourcery.com>
205 Steven G. Kargl <kargl@gcc.gnu.org>
207 * openmp.c (match_oacc_clause_gang): Fix uninitialized variable.
208 (gfc_resolve_oacc_declare): Fix comparision.
210 2015-11-22 James Norris <jnorris@codesourcery.com>
211 Cesar Philippidis <cesar@codesourcery.com>
213 * dump-parse-tree.c (show_namespace): Handle declares.
214 * gfortran.h (struct symbol_attribute): New fields.
215 (enum gfc_omp_map_map): Add OMP_MAP_DEVICE_RESIDENT and OMP_MAP_LINK.
216 (OMP_LIST_LINK): New enum.
217 (struct gfc_oacc_declare): New structure.
218 (gfc_get_oacc_declare): New definition.
219 (struct gfc_namespace): Change type.
220 (enum gfc_exec_op): Add EXEC_OACC_DECLARE.
221 (struct gfc_code): New field.
222 * module.c (enum ab_attribute): Add AB_OACC_DECLARE_CREATE,
223 AB_OACC_DECLARE_COPYIN, AB_OACC_DECLARE_DEVICEPTR,
224 AB_OACC_DECLARE_DEVICE_RESIDENT, AB_OACC_DECLARE_LINK
225 (attr_bits): Add new initializers.
226 (mio_symbol_attribute): Handle new atributes.
227 * openmp.c (gfc_free_oacc_declare_clauses): New function.
228 (gfc_match_oacc_clause_link: Likewise.
229 (OMP_CLAUSE_LINK): New definition.
230 (gfc_match_omp_clauses): Handle OMP_CLAUSE_LINK.
231 (OACC_DECLARE_CLAUSES): Add OMP_CLAUSE_LINK
232 (gfc_match_oacc_declare): Add checking and module handling.
233 (resolve_omp_clauses): Add array initializer.
234 (gfc_resolve_oacc_declare): Reimplement.
235 * parse.c (case_decl): Add ST_OACC_DECLARE.
236 (parse_spec): Remove handling.
237 (parse_progunit): Remove handling.
238 * parse.h (struct gfc_state_data): Change type.
239 * resolve.c (gfc_resolve_blocks): Handle EXEC_OACC_DECLARE.
240 * st.c (gfc_free_statement): Handle EXEC_OACC_DECLARE.
241 * symbol.c (check_conflict): Add conflict checks.
242 (gfc_add_oacc_declare_create, gfc_add_oacc_declare_copyin,
243 gfc_add_oacc_declare_deviceptr, gfc_add_oacc_declare_device_resident):
245 (gfc_copy_attr): Handle new symbols.
246 * trans-decl.c (add_clause, find_module_oacc_declare_clauses,
247 finish_oacc_declare): New functions.
248 (gfc_generate_function_code): Replace with call.
249 * trans-openmp.c (gfc_trans_oacc_declare): Reimplement.
250 (gfc_trans_oacc_directive): Handle EXEC_OACC_DECLARE.
251 * trans-stmt.c (gfc_trans_block_construct): Replace with call.
252 * trans-stmt.h (gfc_trans_oacc_declare): Remove argument.
253 * trans.c (trans_code): Handle EXEC_OACC_DECLARE.
255 2015-11-21 Steven G. Kargl <kargl@gcc.gnu.org>
257 * simplify.c (gfc_simplify_cshift): Work around bootstrap issues
258 due to inappropriate warning options.
260 2015-11-21 Steven G. Kargl <kargl@gcc.gnu.org>
262 * simplify.c (gfc_simplify_cshift): Implement simplification of
263 CSHIFT for rank=1 arrays.
264 (gfc_simplify_spread): Remove a FIXME and add error condition.
265 * intrinsic.h: Prototype for gfc_simplify_cshift
266 * intrinsic.c (add_functions): Use gfc_simplify_cshift.
268 2015-11-20 Steven G. Kargl <kargl@gcc.gnu.org>
271 * decl.c (gfc_match_submod_proc): Test the interface symbol
272 before accessing its attributes.
274 2015-11-20 Paul Thomas <pault@gcc.gnu.org>
277 (gfc_get_symbol_decl): Test for attr.used_in_submodule as well
278 as attr.use_assoc (twice).
279 (gfc_create_module_variable): Ditto.
281 2015-11-18 Steven G. Kargl <kargl@gcc.gnu.org>
284 * primary.c (gfc_match_structure_constructor): Reduce a structure
285 constructor in a DATA statement.
287 2015-11-18 Steven G. Kargl <kargl@gcc.gnu.org>
290 * simplify.c (gfc_simplify_spread): Issue error for too large array
291 constructor in a PARAMETER statement.
293 2015-11-17 Steven G. Kargl <kargl@gcc.gnu.org>
295 * primary.c (gfc_match_structure_constructor): Fix whitespace.
297 2015-11-17 Dominique d'Humieres <dominiq@lps.ens.fr>
300 * expr.c (gfc_check_pointer_assign): Fix error message.
302 2015-11-16 Steven G. Kargl <kargl@gcc.gnu.org>
306 * expr.c (gfc_check_init_expr): Prevent a redundant check when a
307 __convert_* function was inserted into an array constructor.
308 (gfc_check_assign_symbol): Check for an initialization expression
309 when a __convert_* was inserted.
311 2015-11-15 Paul Thomas <pault@gcc.gnu.org>
317 * trans_array.c (gfc_conv_scalarized_array_ref): Pass the
318 symbol decl for deferred character length array references.
319 * trans-stmt.c (gfc_trans_allocate): Keep the string lengths
320 to update deferred length character string lengths.
321 * trans-types.c (gfc_get_dtype_rank_type); Use the string
322 length of deferred character types for the dtype size.
323 * trans.c (gfc_build_array_ref): For references to deferred
324 character arrays, use the domain max value, if it is a variable
325 to set the 'span' and use pointer arithmetic for acces to the
327 (trans_code): Set gfc_current_locus for diagnostic purposes.
330 * trans-expr.c (gfc_conv_procedure_call): Do not fix deferred
331 string lengths of components.
334 * resolve.c (deferred_op_assign): New function.
335 (gfc_resolve_code): Call it.
336 * trans-array.c (concat_str_length): New function.
337 (gfc_alloc_allocatable_for_assignment): Jump directly to alloc/
338 realloc blocks for deferred character length arrays because the
339 string length might change, even if the shape is the same. Call
340 concat_str_length to obtain the string length for concatenation
341 since it is needed to compute the lhs string length.
342 Set the descriptor dtype appropriately for the new string
344 * trans-expr.c (gfc_trans_assignment_1): Use the rse string
345 length for all characters, other than deferred types. For
346 concatenation operators, push the rse.pre block to the inner
347 most loop so that the temporary pointer and the assignments
350 2015-11-14 Steven G. Kargl <kargl@gcc.gnu.org>
353 * array.c (gfc_match_array_constructor): If array constructor included
354 a CHARACTER typespec, check array elements for compatible type.
356 2015-11-13 Steven G. Kargl <kargl@gccc.gnu.org>
359 * decl.c (gfc_match_data, gfc_match_entry): Enforce F2008:C1206.
360 * io.c (gfc_match_format): Ditto.
361 * match.c (gfc_match_st_function): Ditto.
363 2015-11-13 David Malcolm <dmalcolm@redhat.com>
365 * error.c (gfc_warning): Pass line_table to rich_location ctor.
366 (gfc_warning_now_at): Likewise.
367 (gfc_warning_now): Likewise.
368 (gfc_error_now): Likewise.
369 (gfc_fatal_error): Likewise.
370 (gfc_error): Likewise.
371 (gfc_internal_error): Likewise.
373 2015-11-12 Steven G. Kargl <kargl@gcc.gnu.org>
376 * decl.c (get_proc_name): Increment reference count for ENTRY.
377 While here, fix comment and use postfix ++ for consistency.
379 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
381 * array.c: Remove unused header files.
382 * convert.c: Likewise.
385 * f95-lang.c: Likewise.
386 * frontend-passes.c: Likewise.
387 * iresolve.c: Likewise.
389 * module.c: Likewise.
390 * options.c: Likewise.
392 * target-memory.c: Likewise.
393 * trans-array.c: Likewise.
394 * trans-common.c: Likewise.
395 * trans-const.c: Likewise.
396 * trans-decl.c: Likewise.
397 * trans-expr.c: Likewise.
398 * trans-intrinsic.c: Likewise.
399 * trans-io.c: Likewise.
400 * trans-openmp.c: Likewise.
401 * trans-stmt.c: Likewise.
402 * trans-types.c: Likewise.
405 2015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
408 * openmp.c (gfc_omp_udr_find): Fix typo.
410 2015-11-08 Steven g. Kargl <kargl@gcc.gnu.org>
413 * decl.c (add_init_expr_to_sym): Try to reduce initialization expression
414 before testing for a constant value.
416 2015-11-08 Andre Vehreschild <vehre@gcc.gnu.org>
419 * trans-array.c (gfc_array_init_size): Add gfc_evaluate_now() when
420 array spec in allocate is a function call.
422 2015-11-08 Steven G. Kargl <kargl@gc.gnu.org>
425 * array.c (match_array_element_spec): Check of invalid NULL().
426 While here, fix nearby comments.
428 2015-11-08 Paul Thomas <pault@gcc.gnu.org>
431 * class.c (has_finalizer_component): Prevent infinite recursion
432 through this function if the derived type and that of its
433 component are the same.
434 * trans-types.c (gfc_get_derived_type): Do the same for proc
435 pointers by ignoring the explicit interface for the component.
438 * check.c (same_type_check): If either of the expressions is
439 BT_PROCEDURE, use the typespec from the symbol, rather than the
442 2015-11-07 Steven G. Kargl <kargl@gcc.gnu.org>
445 * check.c (gfc_check_reshape): Improve check for valid SHAPE argument.
447 2015-11-07 Steven G. Kargl <kargl@gcc.gnu.org>
450 * match.c (match_case_selector): Check for invalid type.
452 2015-11-06 David Malcolm <dmalcolm@redhat.com>
454 * cpp.c (cb_cpp_error): Convert parameter from location_t to
455 rich_location *. Eliminate the "column_override" parameter.
456 * error.c (gfc_warning): Update for change in signature of
458 (gfc_format_decoder): Update handling of %C/%L for changes
460 (gfc_diagnostic_starter): Use richloc when determining whether to
461 print one locus or two. When handling a location that will
462 involve a call to diagnostic_show_locus, only attempt to print the
463 locus for the primary location, and don't call into
464 diagnostic_print_caret_line.
465 (gfc_warning_now_at): Update for change in signature of
467 (gfc_warning_now): Likewise.
468 (gfc_error_now): Likewise.
469 (gfc_fatal_error): Likewise.
470 (gfc_error): Likewise.
471 (gfc_internal_error): Likewise.
473 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
475 * openmp.c (gfc_match_omp_clauses): Update support for the tile
476 and default clauses in OpenACC.
477 (gfc_match_oacc_update): Error when data clauses are supplied.
478 (oacc_compatible_clauses): Delete.
479 (resolve_omp_clauses): Give special care for OpenACC reductions.
480 Also update error reporting for the tile clause.
481 (resolve_oacc_loop_blocks): Update error reporting for the tile clause.
482 * trans-openmp.c (gfc_trans_omp_clauses): Update OMP_CLAUSE_SEQ. Add
483 OMP_CLAUSE_{AUTO,TILE} and add support the the gang static argument.
484 (gfc_trans_oacc_combined_directive): Update the list of clauses which
485 are split to acc loops.
487 2015-11-05 Jakub Jelinek <jakub@redhat.com>
489 * types.def (BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR): Remove.
490 (BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR_INT_INT): New.
492 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
493 Chung-Lin Tang <cltang@codesourcery.com>
495 * gfortran.h (gfc_statement): Add ST_OACC_ATOMIC,
497 (gfc_exec_op): Add EXEC_OACC_ATOMIC.
498 * match.h (gfc_match_oacc_atomic): New prototype.
499 * openmp.c (gfc_match_omp_atomic, gfc_match_oacc_atomic): New
500 wrapper functions around...
501 (gfc_match_omp_oacc_atomic): ... this new function.
502 (oacc_code_to_statement, gfc_resolve_oacc_directive): Handle
504 * parse.c (decode_oacc_directive): Handle "atomic", "end atomic".
505 (case_exec_markers): Add ST_OACC_ATOMIC.
506 (gfc_ascii_statement): Handle ST_OACC_ATOMIC, ST_OACC_END_ATOMIC.
507 (parse_omp_atomic): Rename to...
508 (parse_omp_oacc_atomic): ... this new function. Add omp_p formal
509 parameter. Adjust all users.
510 (parse_executable): Handle ST_OACC_ATOMIC.
511 (is_oacc): Handle EXEC_OACC_ATOMIC.
512 * resolve.c (gfc_resolve_blocks, gfc_resolve_code): Handle
514 * st.c (gfc_free_statement): Handle EXEC_OACC_ATOMIC.
515 * trans-openmp.c (gfc_trans_oacc_directive): Handle
517 * trans.c (trans_code): Handle EXEC_OACC_ATOMIC.
519 2015-10-31 Cesar Philippidis <cesar@codesourcery.com>
523 * openmp.c (resolve_omp_clauses): Pass &n->where when calling
526 2015-10-30 Cesar Philippidis <cesar@codesourcery.com>
528 * gfortran.h (gfc_omp_namespace): Add locus where member.
529 * openmp.c (gfc_match_omp_variable_list): Set where for each list
531 (resolve_omp_clauses): Remove where argument and use the where
532 gfc_omp_namespace member when reporting errors.
533 (resolve_omp_do): Update call to resolve_omp_clauses.
534 (resolve_oacc_loop): Likewise.
535 (gfc_resolve_oacc_directive): Likewise.
536 (gfc_resolve_omp_directive): Likewise.
537 (gfc_resolve_omp_declare_simd): Likewise.
539 2015-10-15 Steven G. Kargl <kargl@gcc.gnu.org>
542 * decl.c (gfc_set_constant_character_len): Convert gcc_assert into an
543 if-statement causing an early return leads to valid error message.
545 2015-10-30 Steven G. Kargl <kargl@gcc.gnu.org>
548 * interface.c (get_expr_storage_size): Check for INTEGER type before
549 calling gmp routines.
551 2015-10-30 Steven G. Kargl <kargl@gcc.gnu.org>
554 * decl.c (add_init_expr_to_sym): if the char length in the typespec
555 is NULL, check for and use a constructor.
557 2015-10-30 Steven G. Kargl <kargl@gcc.gnu.org>
560 * decl.c (match_attr_spec): PROTECTED can only be a module.
562 2015-10-29 Steven G. Kargl <kargl@gcc.gnu.org>
565 * trans-decl.c (generate_local_decl): Mark PARAMETER entities in
568 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
570 * array.c: Reorder #include's and remove duplicates.
571 * convert.c: Likewise.
574 * f95-lang.c: Likewise.
575 * frontend-passes.c: Likewise.
576 * iresolve.c: Likewise.
578 * module.c: Likewise.
579 * options.c: Likewise.
581 * resolve.c: Likewise.
582 * simplify.c: Likewise.
583 * target-memory.c: Likewise.
584 * trans-array.c: Likewise.
585 * trans-common.c: Likewise.
586 * trans-const.c: Likewise.
587 * trans-decl.c: Likewise.
588 * trans-expr.c: Likewise.
589 * trans-intrinsic.c: Likewise.
590 * trans-io.c: Likewise.
591 * trans-openmp.c: Likewise.
592 * trans-stmt.c: Likewise.
593 * trans-types.c: Likewise.
596 2015-10-29 Richard Biener <rguenther@suse.de>
598 * f95-lang.c: Properly build variadic types for classification
599 and comparison builtins.
601 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
602 James Norris <jnorris@codesourcery.com>
605 * openmp.c (resolve_oacc_cache): Remove function.
606 (gfc_match_oacc_cache): Enable array sections.
607 (resolve_omp_clauses, gfc_resolve_oacc_directive): Change
609 * trans-openmp.c (gfc_trans_omp_clauses): Likewise.
611 2015-10-27 Steven G. Kargl <kargl@gcc.gnu.org>
614 * decl.c (char_len_param_value): Check for REF_ARRAY.
616 2015-10-26 Louis Krupp <louis.krupp@zoho.com>
619 * fortran.h: Include namespace pointer in statement label
621 * symbol.c (gfc_get_st_label): Store pointer to namespace
622 that owns the statement label tree in each label.
623 (gfc_free_st_label): Use namespace owning statement label
624 tree when deleting statement label.
625 * io.c: Initialize format_asterisk with NULL namespace pointer.
627 2015-10-26 Steven G. Kargl <kargl@gcc.gnu.org>
630 * array.c (gfc_ref_dimen_size): Check for BT_INTEGER before calling
633 2015-10-26 Andre Vehreschild <vehre@gcc.gnu.org>
636 * trans-array.c (evaluate_bound): For deferred length arrays get the
637 bounds directly from the descriptor, i.e., prevent using constant
638 zero lower bound from the gfc_conv_array_lbound () routine.
639 (gfc_conv_section_startstride): Hand deferred array status to
641 (gfc_conv_expr_descriptor): Same.
643 2015-01-25 Paul Thomas <pault@gcc.gnu.org>
646 * trans-array.c (structure_alloc_comps): On deallocation of
647 class components, reset the vptr to the declared type vtable
648 and reset the _len field of unlimited polymorphic components.
649 *trans-expr.c (gfc_find_and_cut_at_last_class_ref): Bail out on
650 allocatable component references to the right of part reference
651 with non-zero rank and return NULL.
652 (gfc_reset_vptr): Simplify this function by using the function
653 gfc_get_vptr_from_expr. Return if the vptr is NULL_TREE.
654 (gfc_reset_len): If gfc_find_and_cut_at_last_class_ref returns
656 * trans-stmt.c (gfc_trans_allocate): Rely on the use of
657 gfc_trans_assignment if expr3 is a variable expression since
658 this deals correctly with array sections.
660 2015-10-25 Andre Vehreschild <vehre@gcc.gnu.org>
664 * trans-array.c (build_array_ref): Modified call to
665 gfc_get_class_array_ref to adhere to new interface.
666 (gfc_conv_expr_descriptor): For one-based arrays that
667 are filled by a loop starting at one the start index of the
668 source array has to be mangled into the offset.
669 * trans-expr.c (gfc_get_class_array_ref): When the tree to get
670 the _data component is present already, add a way to supply it.
671 (gfc_copy_class_to_class): Allow to copy to a derived type also.
672 * trans-stmt.c (gfc_trans_allocate): Do not conv_expr_descriptor
673 for functions returning a class or derived object. Get the
675 * trans.h: Interface change of gfc_get_class_array_ref.
677 2015-10-24 Steven G. Kargl <kargl@gcc.gnu.org>
680 * decl.c (gfc_match_decl_type_spec): Check for valid kind in old-style
683 2015-10-24 Steven G. Kargl <kargl@gcc.gnu.org>
686 * array.c (gfc_match_array_constructor): Check for error from type
688 * decl.c (char_len_param_value): Check for valid of charlen parameter.
689 Reap dead code dating to 2008.
690 match.c (gfc_match_type_spec): Special case the keyword use in REAL.
692 2015-10-23 Mikhail Maltsev <maltsevm@gmail.com>
694 * trans-common.c (create_common): Adjust to use flag_checking.
695 * trans.c (gfc_add_modify_loc): Use gcc_checking_assert.
697 2015-10-21 Martin Sebor <msebor@redhat.com>
700 * lang.opt: End each sentence that describes an option with a period.
702 2015-10-21 Steven G. Kargl <kargl@gcc.gnu.org>
705 * data.c (create_character_initializer): Deal with zero length string.
707 2015-10-19 Steven G. Kargl <kargl@gcc.gnu.org>
709 * resolve.c (gfc_verify_binding_labels): Check for NULL pointer.
711 2015-10-19 Steven G. Kargl <kargl@gcc.gnu.org>
714 * decl.c (add_init_expr_to_sym): Remove an assert() to allow an error
715 message to be issued.
717 2015-10-18 Mikael Morin <mikael@gcc.gnu.org>
720 * gfortran.h (gfc_symbol): Expand comment.
721 * match.c (gfc_match_common): Delay adding the symbol to
722 the common_block after the gfc_add_in_common call.
723 * symbol.c (gfc_free_symbol): Move common block memory handling...
724 (gfc_set_symbol_common_block): ... here as a new function.
725 (restore_old_symbol): Restore common block fields.
726 (gfc_restore_last_undo_checkpoint):
727 Check the common_block pointer instead of the in_common attribute.
728 When a symbol has been removed from the common block linked list,
729 clear its common_next pointer.
731 2015-10-18 Paul Thomas <pault@gcc.gnu.org>
735 * primary.c (match_substring): Add an argument 'deferred' to
736 flag that a substring reference with null start and end should
737 not be optimized away for deferred length strings.
738 (match_string_constant, gfc_match_rvalue): Set the argument.
739 * trans-expr.c (alloc_scalar_allocatable_for_assignment): If
740 there is a substring reference return.
741 * trans-intrinsic.c (conv_intrinsic_move_alloc): For deferred
742 characters, assign the 'from' string length to the 'to' string
743 length. If the 'from' expression is deferred, set its string
744 length to zero. If the 'to' expression has allocatable
745 components, deallocate them.
747 2015-10-17 Steven G. Kargl <kargl@gcc.gnu.org>
750 * decl.c (char_len_param_value): Unwrap unlong line. If LEN < 0,
751 force it to zero per the Fortran 90, 95, 2003, and 2008 Standards.
752 * resolve.c (gfc_resolve_substring_charlen): Unwrap unlong line.
753 If 'start' is larger than 'end', length of substring is negative,
754 so explicitly set it to zero.
755 (resolve_charlen): Remove -Wsurprising warning. Update comment to
756 reflect that the text is from the F2008 standard.
758 2015-10-16 Richard Biener <rguenther@suse.de>
760 * trans-intrinsic.c (gfc_conv_intrinsic_lib_function): Adjust
762 (gfc_conv_intrinsic_mod): Likewise.
763 (gfc_conv_intrinsic_ctime): Likewise.
764 (gfc_conv_intrinsic_fdate): Likewise.
765 (gfc_conv_intrinsic_ttynam): Likewise.
766 (gfc_conv_intrinsic_minmax_char): Likewise.
767 (gfc_conv_intrinsic_index_scan_verify): Likewise.
768 (gfc_conv_intrinsic_trim): Likewise.
770 2015-10-14 Maxim Ostapenko <m.ostapenko@partner.samsung.com>
772 * parse.c (decode_statement): Initialize M to MATCH_NO.
774 2015-10-13 Jakub Jelinek <jakub@redhat.com>
775 Ilya Verbin <ilya.verbin@intel.com>
777 * f95-lang.c (DEF_FUNCTION_TYPE_9, DEF_FUNCTION_TYPE_10,
778 DEF_FUNCTION_TYPE_11, DEF_FUNCTION_TYPE_VAR_1): Define.
779 * trans-openmp.c (gfc_trans_omp_clauses): Set
780 OMP_CLAUSE_IF_MODIFIER to ERROR_MARK, OMP_CLAUSE_ORDERED_EXPR
782 (gfc_trans_omp_critical): Adjust for addition of clauses.
783 (gfc_trans_omp_ordered): Likewise.
784 * types.def (BT_FN_BOOL_UINT_LONGPTR_LONGPTR_LONGPTR,
785 BT_FN_BOOL_UINT_ULLPTR_ULLPTR_ULLPTR,
786 BT_FN_BOOL_UINT_LONGPTR_LONG_LONGPTR_LONGPTR,
787 BT_FN_BOOL_UINT_ULLPTR_ULL_ULLPTR_ULLPTR,
788 BT_FN_VOID_INT_SIZE_PTR_PTR_PTR_UINT_PTR,
789 BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR,
790 BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT_PTR_INT,
791 BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_UINT_LONG_INT_LONG_LONG_LONG,
792 BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_UINT_LONG_INT_ULL_ULL_ULL,
793 BT_FN_VOID_LONG_VAR, BT_FN_VOID_ULL_VAR): New.
794 (BT_FN_VOID_INT_PTR_SIZE_PTR_PTR_PTR,
795 BT_FN_VOID_INT_OMPFN_PTR_SIZE_PTR_PTR_PTR,
796 BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT_PTR): Remove.
798 2015-10-07 Andre Vehreschild <vehre@gcc.gnu.org>
801 * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): Handle pointer to and
802 on stack class objects as sizeof parameter.
804 2015-10-06 Louis Krupp <louis.krupp@zoho.com>
806 * resolve.c (gfc_resolve_substring_charlen): For derived type,
807 use typespec of string component when resolving substring length.
809 2015-10-04 Mikael Morin <mikael@gcc.gnu.org>
811 * match.c (gfc_match_common): Remove dead variable old_blank_common.
813 2015-10-04 Mikael Morin <mikael@gcc.gnu.org>
816 * match.c (gfc_match_common): Delay the common_block pointer
817 assignment after error checking.
818 Delay the call to gfc_add_in_common attribute after the handling
820 * resolve.c (resolve_common_vars): Call gfc_add_in_common again.
822 2015-10-04 Mikael Morin <mikael@gcc.gnu.org>
824 * resolve.c (resolve_common_vars): Move access to the common
825 block's head symbol inside the function.
826 (resolve_common_blocks, resolve_types): Update callers.
828 2015-10-01 Louis Krupp <louis.krupp@zoho.com>
833 (store_backend_decl): Create new gfc_charlen instance if requested
834 (get_array_ctor_all_strlen): Call store_backend_decl requesting
836 (trans_array_constructor): Call store_backend_decl requesting
837 new gfc_charlen if get_array_ctor_strlen was called
838 (gfc_add_loop_ss_code): Don't try to convert non-constant length
840 2015-10-01 Steven G. Kargl <kargl@gcc.gnu.org>
843 * decl.c (add_init_expr_to_sym): Numeric constant for character
844 length must be an INTEGER.
846 2015-10-01 Steven G. Kargl <kargl@gcc.gnu.org>
849 * io.c (gfc_resolve_filepos): Check for a UNIT number. Add a nearby
850 missing 'return false'.
852 2015-10-01 Steven G. Kargl <kargl@gcc.gnu.org>
855 * primary.c (gfc_match_structure_constructor): Use a possibly
856 host-associated symtree to prevent ICE.
858 2015-09-28 Paul Thomas <pault@gcc.gnu.org>
862 * decl.c (get_proc_name): Return if statement function is
864 * expr.c (gfc_check_vardef_context): Add error return for
865 derived type expression lacking the derived type itself.
866 * match.c (gfc_match_ptr_fcn_assign): New function.
867 * match.h : Add prototype for gfc_match_ptr_fcn_assign.
868 * parse.c : Add static flag 'in_specification_block'.
869 (decode_statement): If in specification block match a statement
870 function, then, if no error arising from statement function
871 matching, try to match pointer function assignment.
872 (parse_interface): Set 'in_specification_block' on exiting from
874 (parse_spec): Set and then reset 'in_specification_block'.
875 (gfc_parse_file): Set 'in_specification_block'.
876 * resolve.c (get_temp_from_expr): Extend to include functions
877 and array constructors as rvalues..
878 (resolve_ptr_fcn_assign): New function.
879 (gfc_resolve_code): Call it on finding a pointer function as an
880 lvalue. If valid or on error, go back to start of resolve_code.
881 * symbol.c (gfc_add_procedure): Add a sentence to the error to
882 flag up the ambiguity between a statement function and pointer
883 function assignment at the end of the specification block.
885 2015-09-28 Nathan Sidwell <nathan@codesourcery.com>
887 * f95-lang.c (DEF_FUNCTION_TYPE_VAR_6): New.
888 (DEF_FUNCTION_TYPE_VAR_11): Delete.
889 * types.def (DEF_FUNCTION_TYPE_VAR_6): New.
890 (DEF_FUNCTION_TYPE_VAR_11): Delete.
892 2015-09-26 Mikael Morin <mikael@gcc.gnu.org>
895 * trans-expr.c (gfc_trans_assignment_1): Remove the non-constantness
896 condition guarding deep copy.
898 2013-09-26 Paul Thomas <pault@gcc.gnu.org>
901 * resolve.c (resolve_fl_procedure): For module procedures, take
902 the parent module name and the submodule name from the name of
905 2015-09-25 Steven G. Kargl <kargl@gcc.gnu.org>
908 * resolve.c (gfc_resolve_code): Prevent ICE for invalid EXPR_NULL.
910 2015-09-25 Steven G. Kargl <kargl@gcc.gnu.org>
913 * parse.c (match_deferred_characteristics): Remove an assert, which
914 allows an invalid SELECT TYPE selector to be detected.
916 2015-09-25 Manuel López-Ibáñez <manu@gcc.gnu.org>
918 PR pretty-print/67567
919 * resolve.c (resolve_fl_procedure): Work-around when iface->module
922 2015-09-21 Steven G. Kargl <kargl@gcc.gnu.org>
924 * resolve.c (nonscalar_typebound_assign): Fix typos in comment.
926 2015-09-21 Steven G. Kargl <kargl@gcc.gnu.org>
929 * resolve.c (gfc_resolve_code): Check for scalar expression in
932 2015-09-17 Paul Thomas <pault@gcc.gnu.org>
936 * module.c : Add static no_module_procedures.
937 (gfc_match_submodule): Correct memory leakage caused during the
938 freeing of use_lists.
939 (mio_symbol_attribute): Reset above if module procedure is
941 (gfc_dump_module): Set above and exit without writing smod file
943 * gfortran.texi : Add section on submodule support.
945 2015-09-10 Steven G. Kargl <kargl@gcc.gnu.org>
948 * expr.c (gfc_check_init_expr): Do not dereference a NULL pointer.
950 2015-09-10 Paul Thomas <pault@gcc.gnu.org>
953 * module.c (read_module): If a symtree exists and the symbol has
954 been associated in a submodule from a parent (sub)module, attach
955 the symbol to a 'unique symtree' and the new symbol to the
958 2015-09-04 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
960 * intrinsic.h (gfc_simplify_mvbits): Remove.
961 * simplify.c (gfc_simplify_mvbits): Remove.
962 * intrinsic.c (add_subroutines): Remove reference to
965 2015-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
968 * error.c (gfc_clear_pp_buffer): Reset last_location, otherwise
969 caret lines might be skipped when actually giving a diagnostic.
971 2015-08-31 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
974 * trans.c (gfc_call_free): Don't check if pointer is NULL.
975 * trans.h (gfc_call_free): Adjust comment.
977 2015-08-29 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
979 * trans.c (gfc_call_malloc, gfc_allocate_using_malloc,
980 gfc_allocate_using_lib, gfc_allocate_allocatable,
981 gfc_call_realloc): Simplify code.
982 * trans-array.c (gfc_trans_allocate_array_storage,
983 gfc_trans_auto_array_allocation, gfc_conv_array_parameter): Do not
984 convert gfc_call_free() argument.
985 * trans-expr.c (gfc_conv_string_tmp, gfc_conv_procedure_call,
986 fcncall_realloc_result): Likewise.
987 * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Likewise.
989 2015-08-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
992 * intrinsic.c (add_functions, add_subroutines): Remove resolution
993 functions for FREE and MALLOC.
994 * intrinsic.h (gfc_resolve_malloc, gfc_resolve_free): Remove.
995 * iresolve.c (gfc_resolve_malloc, gfc_resolve_free): Remove.
996 * trans-intrinsic.c (conv_intrinsic_free,
997 gfc_conv_intrinsic_malloc): New functions.
999 2015-08-24 Louis Krupp <louis.krupp@zoho.com>
1003 * decl.c (gfc_match_end): Clean up nested BLOCKs.
1004 * parse.c (parse_block_construct): Deal gracefully with cleaned-up
1007 2015-08-23 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1010 * config-lang.in: Add libbacktrace to target_libs.
1012 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
1014 * dependency.c, dependency.h, gfortran.h, io.c, module.c,
1015 parse.h, resolve.c, trans-types.h, trans.h: remove useless typedefs.
1017 2015-08-16 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1020 * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Add decl
1021 for quadruple precision BUILT_IN_SQRT.
1023 2015-08-16 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1025 * trans-intrinsic.c (conv_intrinsic_ieee_is_negative): Use type
1026 generic BUILT_IN_SIGNBIT.
1027 (conv_intrinsic_ieee_copy_sign): Likewise.
1028 * f95-lang.c (gfc_init_builtin_functions): Add BUILT_IN_ISINF,
1029 BUILT_IN_ISINF_SIGN, BUILT_IN_SIGNBIT, BUILT_IN_ISLESS,
1030 BUILT_IN_ISLESSGREATER, BUILT_IN_ISGREATER. Remove non-type generic
1031 variants of BUILT_IN_SIGNBIT.
1032 * mathbuiltins.def: Remove SIGNBIT.
1034 2015-08-16 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1037 * gfortran.texi: New section "File operations on symbolic links".
1039 2015-08-08 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1042 * gfortranspec.c (lang_specific_driver): Adjust --version output.
1044 2015-08-08 Bud Davis <jmdavis@link.com>
1045 Mikael Morin <mikael@gcc.gnu.org>
1048 * symbol.c (gfc_restore_last_undo_checkpoint): Delete a common block
1049 symbol if it was put in the list.
1051 2015-08-07 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1054 * expr.c (gfc_check_init_expr): Allow some IEEE functions in
1055 constant expressions.
1056 (external_spec_function): Allow some IEEE functions in specification
1058 * simplify.c (gfc_simplify_ieee_selected_real_kind): Remove.
1059 (simplify_ieee_selected_real_kind, simplify_ieee_support,
1060 matches_ieee_function_name, gfc_simplify_ieee_functions): New
1062 * gfortran.h (gfc_simplify_ieee_selected_real_kind): Remove
1064 (gfc_simplify_ieee_functions): Add prototype.
1066 2015-08-06 Mikael Morin <mikael@gcc.gnu.org>
1068 * trans.h (gfc_trans_scalar_assign): Remove fourth argument.
1069 * trans-expr.c (gfc_trans_scalar_assign): Merge fourth into sixth
1071 (gfc_conv_subref_array_arg, gfc_trans_subarray_assign,
1072 gfc_trans_subcomponent_assign, gfc_trans_assignment_1): Update callers.
1073 * trans-array.c (gfc_conv_expr_descriptor): Ditto.
1074 * trans-stmt.c (forall_make_variable_temp,
1075 generate_loop_for_temp_to_lhs, generate_loop_for_rhs_to_temp,
1076 gfc_trans_where_assign, gfc_trans_where_3): Ditto.
1078 2015-08-05 Paul Thomas <pault@gcc.gnu.org>
1081 * module.c (check_access): Return true if new static flag
1082 'dump_smod' is true..
1083 (gfc_dump_module): Rename original 'dump_module' and call from
1084 new version. Use 'dump_smod' rather than the stack state to
1085 determine if a submodule is being processed. The new version of
1086 this procedure sets 'dump_smod' depending on the stack state and
1087 then writes both the mod and smod files if a module is being
1088 processed or just the smod for a submodule.
1089 (gfc_use_module): Eliminate the check for module_name and
1090 submodule_name being the same.
1091 * trans-decl.c (gfc_finish_var_decl, gfc_build_qualified_array,
1092 get_proc_pointer_decl): Set TREE_PUBLIC unconditionally and use
1093 the conditions to set DECL_VISIBILITY as hidden and to set as
1094 true DECL_VISIBILITY_SPECIFIED.
1096 2015-08-04 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
1099 * simplify.c (gfc_simplify_ieee_selected_real_kind): Extend IEEE
1100 support to all real kinds.
1102 2015-08-03 Steven G. Kargl <kargl@gcc.gnu.org>
1105 * trans-expr.c (gfc_conv_procedure_call): Avoid NULL pointer reference
1107 2015-08-03 Mikael Morin <mikael@gcc.gnu.org>
1110 * class.c (generate_finalization_wrapper): Set finalization
1111 procedure symbol's always_explicit attribute.
1113 2015-08-01 Paul Thomas <pault@gcc.gnu.org>
1116 * trans-intrinsic.c (gfc_conv_associated): Add the pre and post
1117 blocks for the second argument to se.
1119 2015-07-27 Thomas Schwinge <thomas@codesourcery.com>
1121 * parse.c (parse_oacc_structured_block): Fix logic error.
1122 Reported by Mikael Morin <mikael.morin@sfr.fr>.
1124 2015-07-24 Mikael Morin <mikael@gcc.gnu.org>
1127 * trans-expr.c (gfc_trans_assignment_1): Put component deallocation
1128 code at the beginning of the block.
1130 2015-07-22 Mikael Morin <mikael@gcc.gnu.org>
1134 * trans-array.c (gfc_get_proc_ifc_for_expr): Use esym as procedure
1135 symbol if available.
1137 2015-07-17 Paul Thomas <pault@gcc.gnu.org>
1140 * decl.c (gfc_match_end): Pick out declared submodule name from
1141 the composite identifier.
1142 * gfortran.h : Add 'submodule_name' to gfc_use_list structure.
1143 * module.c (gfc_match_submodule): Define submodule_name and add
1144 static 'submodule_name'.
1145 (gfc_match_submodule): Build up submodule filenames, using '@'
1146 as a delimiter. Store the output filename in 'submodule_name'.
1147 Similarly, the submodule identifier is built using '.' as an
1149 (gfc_dump_module): If current state is COMP_SUBMODULE, write
1150 to file 'submodule_name', using SUBMODULE_EXTENSION.
1151 (gfc_use_module): Similarly, use the 'submodule_name' field in
1152 the gfc_use_list structure and SUBMODULE_EXTENSION to read the
1153 implicitly used submodule files.
1155 2015-07-17 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
1157 * trans-intrinsic.c (conv_co_collective): Remove redundant address
1158 operator in the generated code.
1160 2015-07-17 Andre Vehreschild <vehre@gcc.gnu.org>
1163 * trans-expr.c (alloc_scalar_allocatable_for_subcomponent_assignment):
1164 Compute the size to allocate for class and derived type objects
1166 (gfc_trans_subcomponent_assign): Only allocate memory for a
1167 component when the object to assign is not an allocatable class
1168 object (the memory is already present for allocatable class objects).
1169 Furthermore use copy_class_to_class for assigning the rhs to the
1170 component (may happen for dummy class objects on the rhs).
1172 2015-07-17 Mikael Morin <mikael@gcc.gnu.org>
1173 Dominique d'Humieres <dominiq@lps.ens.fr>
1176 * trans-array.c (gfc_conv_array_parameter): Guard allocatable
1177 component deallocation code generation with descriptorless
1178 calling convention flag.
1179 * trans-expr.c (gfc_conv_expr_reference): Remove allocatable
1180 component deallocation code generation from revision 212329.
1181 (expr_may_alias_variables): New function.
1182 (gfc_conv_procedure_call): New boolean elemental_proc to factor
1183 check for procedure elemental-ness. Rename boolean f to nodesc_arg
1184 and declare it in the outer scope. Use expr_may_alias_variables,
1185 elemental_proc and nodesc_arg to decide whether generate allocatable
1186 component deallocation code.
1187 (gfc_trans_subarray_assign): Set deep copy flag.
1189 2015-07-16 Steven G. Kargl <kargl@gcc.gnu.org>
1193 * io.c (is_char_type): Call gfc_resolve_expr ().
1194 (match_open_element, match_dt_element, match_inquire_element): Fix
1197 2015-07-15 Andrew MacLeod <amacleod@redhat.com>
1199 * trans-types.c: Remove multiline #include comment.
1201 2015-07-14 Steven G. Kargl <kargl@gcc.gnu.org>
1203 * simplify.c (gfc_simplify_floor): Set precision of temporary to
1206 2015-07-13 Andre Vehreschild <vehre@gcc.gnu.org>
1209 * class.c (find_intrinsic_vtab): Put/Search vtabs for intrinsic
1210 types in the top-level namespace.
1212 2015-07-12 Aldy Hernandez <aldyh@redhat.com>
1214 * trans-stmt.c: Fix double word typos.
1216 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
1218 * arith.c: Adjust includes for flags.h changes.
1219 * array.c: Likewise.
1220 * check.c: Likewise.
1222 * error.c: Likewise.
1224 * frontend-passes.c: Likewise.
1225 * interface.c: Likewise.
1226 * intrinsic.c: Likewise.
1228 * match.c: Likewise.
1229 * openmp.c: Likewise.
1230 * parse.c: Likewise.
1231 * primary.c: Likewise.
1232 * resolve.c: Likewise.
1233 * scanner.c: Likewise.
1234 * simplify.c: Likewise.
1235 * symbol.c: Likewise.
1236 * target-memory.c: Likewise.
1238 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
1240 * convert.c: Adjust includes.
1243 * f95-lang.c: Likewise.
1244 * iresolve.c: Likewise.
1245 * match.c: Likewise.
1246 * module.c: Likewise.
1247 * options.c: Likewise.
1248 * target-memory.c: Likewise.
1249 * trans-array.c: Likewise.
1250 * trans-common.c: Likewise.
1251 * trans-const.c: Likewise.
1252 * trans-decl.c: Likewise.
1253 * trans-expr.c: Likewise.
1254 * trans-intrinsic.c: Likewise.
1255 * trans-io.c: Likewise.
1256 * trans-openmp.c: Likewise.
1257 * trans-stmt.c: Likewise.
1258 * trans-types.c: Likewise.
1259 * trans.c: Likewise.
1261 2015-07-07 Andre Vehreschild <vehre@gmx.de>
1264 * trans-array.c (gfc_conv_expr_descriptor): Ensure array descriptor
1265 is one-based for non-full array refs. Correct the offset when a
1268 2015-07-06 Steven G. Kargl <kargl@gcc.gnu.org>
1270 * io.c (check_char_variable): New function.
1271 (match_open_element, match_close_element, match_file_element,
1272 match_dt_element, match_inquire_element, match_wait_element): Use it.
1274 2015-07-06 Andre Vehreschild <vehre@gmx.de>
1277 * resolve.c (resolve_symbol): Non-private functions in modules
1278 with allocatable or pointer components are marked referenced
1279 now. Furthermore is the default init especially for those
1280 components now done in gfc_conf_procedure_call preventing
1282 * trans-decl.c (gfc_generate_function_code): Generate a fake
1283 result decl for functions returning an object with allocatable
1284 components and initialize them.
1285 * trans-expr.c (gfc_conv_procedure_call): For value typed trees
1286 use the tree without indirect ref. And for non-decl trees
1287 add a temporary variable to prevent evaluating the tree
1288 multiple times (prevent multiple function evaluations).
1289 * trans.h: Made gfc_trans_structure_assign () protoype
1290 available, which is now needed by trans-decl.c:gfc_generate_
1291 function_code(), too.
1293 2015-07-04 Steven G. Kargl <kargl@gcc.gnu.org>
1296 * io.c (is_char_type): New function to test for BT_CHARACTER
1297 (gfc_match_open, gfc_match_close, match_dt_element): Use it.
1299 2015-07-02 David Edelsohn <dje.gcc@gmail.com>
1301 * trans-common.c: Include <map> after system.h.
1303 2015-07-02 Paul Thomas <pault@gcc.gnu.org>
1306 * decl.c (get_proc_name): Make a partially populated interface
1307 symbol to carry the characteristics of a module procedure and
1309 (variable_decl): Declarations of dummies or results in the
1310 abreviated form of module procedure is an error.
1311 (gfc_match_import): IMPORT is not permitted in the interface
1312 declaration of module procedures.
1313 (match_attr_spec): Submodule variables have implicit save
1314 attribute for F2008 onwards.
1315 (gfc_match_prefix): Add 'module' as the a prefix and set the
1316 module_procedure attribute.
1317 (gfc_match_formal_arglist): For a module procedure keep the
1318 interface formal_arglist from the interface, match new the
1319 formal arguments and then compare the number and names of each.
1320 (gfc_match_procedure): Add case COMP_SUBMODULE.
1321 (gfc_match_function_decl, gfc_match_subroutine_decl): Set the
1322 module_procedure attribute.
1323 (gfc_match_entry, gfc_match_end): Add case COMP_SUBMODULE. If
1324 attr abr_modproc_decl is set, switch the message accordingly
1325 for subroutines and functions.
1326 (gfc_match_submod_proc): New function to match the abbreviated
1327 style of submodule declaration.
1328 * gfortran.h : Add ST_SUBMODULE and ST_END_SUBMODULE. Add the
1329 attribute bits 'used_in_submodule' and 'module_procedure'. Add
1330 the bit field 'abr_modproc_decl' to gfc_symbol. Add prototypes
1331 for 'gfc_copy_dummy_sym', 'gfc_check_dummy_characteristics' and
1332 'gfc_check_result_characteristics'.
1333 * interface.c : Add the prefix 'gfc_' to the names of functions
1334 'check_dummy(result)_characteristics' and all their references.
1335 * match.h : Add prototype for 'gfc_match_submod_proc' and
1336 'gfc_match_submodule'.
1337 (check_sym_interfaces): A module procedure is not an error in
1338 a module procedure statment in a generic interface.
1339 * module.c (gfc_match_submodule): New function. Add handling
1340 for the 'module_procedure' attribute bit.
1341 (gfc_use_module): Make sure that a submodule cannot use itself.
1342 * parse.c (decode_statement): Set attr has_'import_set' for
1343 the interface declaration of module procedures. Handle a match
1344 occurring in 'gfc_match_submod_proc' and a match for
1346 (gfc_enclosing_unit): Include the state COMP_SUBMODULE.
1347 (gfc_ascii_statement): Add END SUBMODULE.
1348 (accept_statement): Add ST_SUBMODULE.
1349 (parse_spec): Disallow statement functions in a submodule
1351 (parse_contained): Add ST_END_SUBMODULE and COMP_SUBMODULE
1353 (get_modproc_result): Copy the result symbol of the interface.
1354 (parse_progunit): Call it.
1355 (set_syms_host_assoc): Make symbols from the ancestor module
1356 and submodules use associated, as required by the standard and
1357 set all private components public. Module procedures 'external'
1358 attribute bit is reset and the 'used_in_submodule' bit is set.
1359 (parse_module): If this is a submodule, use the ancestor module
1360 and submodules. Traverse the namespace, calling
1361 'set_syms_host_assoc'. Add ST_END_SUBMODULE and COMP_SUBMODULE.
1362 * parse.h : Add COMP_SUBMODULE.
1363 * primary.c (match_variable): Add COMP_SUBMODULE.
1364 * resolve.c (compare_fsyms): New function to compare the dummy
1365 characteristics of a module procedure with its interface.
1366 (resolve_fl_procedure): Compare the procedure, result and dummy
1367 characteristics of a module_procedure with its interface, using
1368 'compare_fsyms' for the dummy arguments.
1369 * symbol.c (gfc_add_procedure): Suppress the check for existing
1370 procedures in the case of a module procedure.
1371 (gfc_add_explicit_interface): Skip checks that must fail for
1373 (gfc_add_type): Allow a new type to be added to module
1374 procedures, their results or their dummy arguments.
1375 (gfc_copy_dummy_sym): New function to generate new dummy args
1376 and copy the characteristics from the interface.
1377 * trans-decl.c (gfc_sym_mangled_function_id): Module procedures
1378 must always have their names mangled as if they are symbols
1379 coming from a declaration in a module.
1380 (gfc_get_symbol_decl): Add 'used_in_submodule' to the assert.
1381 (gfc_finish_var_decl): Symbols with the 'used_in_submodule' bit
1382 set are set DECL_EXTERNAL as if they were use associated.
1384 2015-07-02 Steven G. Kargl <kargl@gcc.gnu.org>
1387 * match.c (gfc_match_name): Special case unary minus and plus.
1389 2015-07-02 Steven G. Kargl <kargl@gcc.gnu.org>
1392 * primary.c (match_sym_complex_part): Do not dereference NULL pointer.
1394 2015-07-01 Thomas Koenig <tkoenig@gcc.gnu.org>
1396 * arith.c (gfc_arith_divide): With -Winteger-division,
1397 warn about contant integer division if there is a non-zero
1399 * invoke.texi: Document -Winteger-division.
1400 * lang.opt: Add -Winteger-division.
1402 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
1404 * f95-lang.c: Remove ipa-ref.h and plugin-api.h from include list.
1405 * trans-decl.c: Likewise.
1407 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
1409 * trans-decl.c (module_hasher): Likewise.
1410 * trans.h (module_decl_hasher): Likewise.
1412 2015-06-24 Manuel López-Ibáñez <manu@gcc.gnu.org>
1415 * error.c (gfc_warning_check): Restore the default output_buffer
1416 before calling diagnostic_action_after_output.
1417 (gfc_error_check): Likewise.
1418 (gfc_diagnostics_init): Add comment.
1420 2015-06-23 Andre Vehreschild <vehre@gmx.de>
1423 * parse.c (parse_associate): Figure the rank and as of a
1424 class array in an associate early.
1425 * primary.c (gfc_match_varspec): Prevent setting the
1426 dimension attribute on the sym for classes.
1427 * resolve.c (resolve_variable): Correct the component
1428 ref's type for associated variables. Add a full array ref
1429 when class array's are associated.
1430 (resolve_assoc_var): Correct the type of the symbol,
1431 when in the associate the expression's rank becomes scalar.
1432 * trans-expr.c (gfc_conv_variable): Indirect ref needed for
1433 allocatable associated objects.
1435 2015-06-19 Mikael Morin <mikael@gcc.gnu.org>
1438 * resolve.c (resolve_global_procedure): Don't save and restore
1439 OpenMP state around the call to gfc_resolve.
1440 (gfc_resolve): Save OpenMP state on entry and restore it on return.
1442 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
1444 * convert.c: Do not include input.h, line-map.h or is-a.h.
1447 * f95-lang.c: Likewise.
1448 * gfortran.h: Likewise.
1449 * iresolve.c: Likewise.
1450 * match.c: Likewise.
1451 * module.c: Likewise.
1452 * options.c: Likewise.
1453 * target-memory.c: Likewise.
1454 * trans-array.c: Likewise.
1455 * trans-common.c: Likewise.
1456 * trans-const.c: Likewise.
1457 * trans-decl.c: Likewise.
1458 * trans-expr.c: Likewise.
1459 * trans-intrinsic.c: Likewise.
1460 * trans-io.c: Likewise.
1461 * trans-openmp.c: Likewise.
1462 * trans-stmt.c: Likewise.
1463 * trans-types.c: Likewise.
1464 * trans.c: Likewise.
1466 2015-06-15 Andre Vehreschild <vehre@gmx.de>
1471 * gfortran.h: Extend gfc_code.ext.alloc to carry a
1472 flag indicating that the array specification has to be
1474 * resolve.c (resolve_allocate_expr): Add F2008 notify
1475 and flag indicating source driven array spec.
1476 (resolve_allocate_deallocate): Check for source driven
1477 array spec, when array to allocate has no explicit
1479 * trans-array.c (gfc_array_init_size): Get lower and
1480 upper bound from a tree array descriptor, except when
1481 the source expression is an array-constructor which is
1482 fixed to be one-based.
1483 (retrieve_last_ref): Extracted from gfc_array_allocate().
1484 (gfc_array_allocate): Enable allocate(array, source=
1485 array_expression) as specified by F2008:C633.
1486 (gfc_conv_expr_descriptor): Add class tree expression
1487 into the saved descriptor for class arrays.
1488 * trans-array.h: Add temporary array descriptor to
1489 gfc_array_allocate ().
1490 * trans-expr.c (gfc_conv_procedure_call): Special handling
1491 for _copy() routine translation, that comes without an
1492 interface. Third and fourth argument are now passed by value.
1493 * trans-stmt.c (gfc_trans_allocate): Get expr3 array
1494 descriptor for temporary arrays to allow allocate(array,
1495 source = array_expression) for array without array
1498 2015-06-14 Thomas Koenig <tkoenig@gcc.gnu.org>
1500 * intrinsic.texi: Change \leq to < in descrition of imaginary
1501 part in argument to log.
1503 2015-06-11 Paul Thomas <pault@gcc.gnu.org>
1506 * trans-expr.c (gfc_conv_procedure_call): Allocatable scalar
1507 function results must be freed and nullified after use. Create
1508 a temporary to hold the result to prevent duplicate calls.
1509 * trans-stmt.c (gfc_trans_allocate): Rename temporary variable
1510 as 'source'. Deallocate allocatable components of non-variable
1513 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
1515 * f95-lang.c (gfc_create_decls): Register the main translation unit
1516 through the new debug hook.
1518 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
1520 * convert.c : Adjust include files.
1522 * decl.c : Likewise.
1523 * f95-lang.c : Likewise.
1524 * gfortran.h : Likewise.
1525 * iresolve.c : Likewise.
1526 * match.c : Likewise.
1527 * module.c : Likewise.
1528 * openmp.c : Likewise.
1529 * options.c : Likewise.
1530 * target-memory.c : Likewise.
1531 * trans-array.c : Likewise.
1532 * trans-common.c : Likewise.
1533 * trans-const.c : Likewise.
1534 * trans-decl.c : Likewise.
1535 * trans-expr.c : Likewise.
1536 * trans-intrinsic.c : Likewise.
1537 * trans-io.c : Likewise.
1538 * trans-openmp.c : Likewise.
1539 * trans-stmt.c : Likewise.
1540 * trans-types.c : Likewise.
1541 * trans.c : Likewise.
1543 2015-06-08 Steven G. Kargl <kargl@gcc.gnu.org>
1546 * match.c (gfc_match_type_is, gfc_match_class_is): Check if the
1547 return type spec or derived type spec is validate.
1549 2015-06-06 Thomas Koenig <tkoenig@netcologne.de>
1552 * arith.c (eval_intrinsic_op): Set warn flag for
1553 gfc_type_convert_binary if -Wconversion or -Wconversion-extra
1555 (wprecision_real_real): New function.
1556 (wprecision_int_real): New function.
1557 (gfc_int2int): If -fno-range-check and -Wconversion are specified
1558 and it is a narrowing conversion, warn.
1559 (gfc_int2real): If there is a change in value for the conversion,
1561 (gfc_int2complex): Likewise.
1562 (gfc_real2int): If there is a fractional part to the real number,
1563 warn with -Wconversion, otherwise warn with -Wconversion-extra.
1564 (gfc_real2real): Emit warning if the constant was changed by
1565 conversion with either -Wconversion or -Wconversion-extra. With
1566 -Wconversion-extra, warn if no warning was issued earlier.
1567 (gfc_real2complex): Likewise.
1568 (gfc_complex2int): For -Wconversion or -Wconversion-extra, if
1569 there was an imaginary part, warn; otherwise, warn for change in
1570 value. Warn with -Wconversion-extra if no other warning was
1572 (gfc_complex2real): For -Wconversion or -Wconversion-extra, if
1573 there was an imaginary part, warn; otherwise, warn for change in
1574 value. Warn with -Wconversion-extra if no other warning was
1576 (gfc_complex2complex): For -Wconversion, warn if the value of
1577 either the real or the imaginary part was changed. Warn for
1578 -Wconversion-extra if no prior warning was issued.
1579 * expr.c (gfc_check_assign): Remove check for change in value.
1580 * primary.c (match_real_constant): For -Wconversion-extra, check
1581 against a number in which the last non-zero digit has been
1582 replaced with a zero. If the number compares equal, warn.
1583 * intrinsic.c (gfc_convert_type_warn): Do not warn about constant
1586 2015-06-05 Steven G. Kargl <kargl@gcc.gnu.org>
1589 * resolve.c (apply_default_init_local): Do not dereference a NULL
1592 2015-06-05 Thomas Koenig <tkoenig@gcc.gnu.org>
1595 * frontend-passes.c (combine_array_constructor): Return early if
1596 inside a FORALL loop.
1598 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
1600 * f95-lang.c (gfc_write_global_declarations): Remove.
1601 (LANG_HOOKS_WRITE_GLOBALS): Remove.
1602 (gfc_write_global_declarations): Move code from here to...
1603 (gfc_be_parse_file): ...here.
1604 Call global_decl_processing.
1605 * trans-decl.c (gfc_emit_parameter_debug_info): Rename global_decl
1606 to early_global_decl.
1608 2015-06-05 Russell Whitesides <russelldub@gmail.com>
1609 Steven G. Kargl <kargl@gcc.gnu.org>
1614 * module.c (load_equiv): Add check for loading duplicate EQUIVALENCEs
1615 from different modules. Eliminate the pruning of unused
1618 2015-06-04 Thomas Koenig <tkoenig@netcologne.de>
1621 * iresolve.c (gfc_resolve_adjustl): If string has a charlen,
1622 copy it to the function.
1623 (gfc_resolve_adjustr): Likewise.
1625 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
1627 * convert.c: Adjust includes for restructured coretypes.h.
1630 * f95-lang.c: Likewise.
1631 * iresolve.c: Likewise.
1632 * match.c: Likewise.
1633 * module.c: Likewise.
1634 * options.c: Likewise.
1635 * target-memory.c: Likewise.
1636 * trans-array.c: Likewise.
1637 * trans-common.c: Likewise.
1638 * trans-const.c: Likewise.
1639 * trans-decl.c: Likewise.
1640 * trans-expr.c: Likewise.
1641 * trans-intrinsic.c: Likewise.
1642 * trans-io.c: Likewise.
1643 * trans-openmp.c: Likewise.
1644 * trans-stmt.c: Likewise.
1645 * trans-types.c: Likewise.
1646 * trans.c: Likewise.
1648 2015-06-02 Steven G. Kargl <kargl@gcc.gnu.org>
1651 * simplify.c (gfc_simplify_reshape): Convert assert into returning
1652 NULL, which triggers an error condition.
1654 2015-05-27 Andre Vehreschild <vehre@gmx.de>
1657 * trans-stmt.c (gfc_trans_allocate): Add missing location
1658 information for e3rhs.
1660 2015-05-26 Paul Thomas <pault@gcc.gnu.org>
1663 * trans-array.c (gfc_conv_array_parameter): Ensure that all
1664 non-variable arrays with allocatable components have the
1665 components deallocated after the procedure call.
1667 2015-05-24 Mikael Morin <mikael@gcc.gnu.org>
1670 * resolve.c (resolve_actual_arglist): Don't throw an error
1671 if the argument with procedure pointer component is not a variable.
1673 2015-05-24 Manuel López-Ibáñez <manu@gcc.gnu.org>
1676 * gfortran.h (struct gfc_error_buf): Rename as
1677 gfc_error_buffer. Move closer to push, pop and free
1678 methods. Reimplement using an output_buffer.
1679 * error.c (errors, warnings, warning_buffer, cur_error_buffer):
1680 Delete everywhere in this file.
1681 (error_char): Delete all contents.
1682 (gfc_increment_error_count): Delete.
1683 (gfc_error_now): Update comment. Set error_buffer.flag.
1684 (gfc_warning_check): Do not handle warning_buffer.
1685 (gfc_error_1): Delete.
1686 (gfc_error_now_1): Delete.
1687 (gfc_error_check): Simplify.
1688 (gfc_move_error_buffer_from_to): Renamed from
1689 gfc_move_output_buffer_from_to.
1690 (gfc_push_error): Handle only gfc_error_buffer.
1691 (gfc_pop_error): Likewise.
1692 (gfc_free_error): Likewise.
1693 (gfc_get_errors): Remove warnings and errors.
1694 (gfc_diagnostics_init): Use static error_buffer.
1695 (gfc_error_1,gfc_error_now_1): Delete declarations.
1696 * symbol.c, decl.c, trans-common.c, data.c, expr.c, expr.c,
1697 frontend-passes.c, resolve.c, match.c, parse.c: Replace
1698 gfc_error_1 with gfc_error and gfc_error_now_1 with gfc_error_1
1700 * f95-lang.c (gfc_be_parse_file): Do not update errorcount and
1702 * primary.c (match_complex_constant): Replace gfc_error_buf and
1703 output_buffer with gfc_error_buffer.
1705 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
1707 * Make-lang.in (check_gfortran_parallelize): Update comment.
1709 2015-05-21 Thomas Koenig <tkoenig@gcc.gnu.org>
1712 * frontend-passes.c (check_conjg_variable): New function.
1713 (inline_matmul_assign): Use it to keep track of conjugated
1716 2015-05-20 Andre Vehreschild <vehre@gmx.de>
1719 * trans-stmt.c (gfc_trans_allocate): Always retrieve the
1720 descriptor or a reference to a source= expression for
1721 arrays and non-arrays, respectively. Use a temporary
1722 symbol and gfc_trans_assignment for all source=
1723 assignments to allocated objects besides for class and
1726 2015-05-19 Jakub Jelinek <jakub@redhat.com>
1729 * trans-openmp.c (gfc_trans_omp_teams): Set OMP_TEAMS_COMBINED for
1730 combined constructs.
1731 (gfc_trans_omp_target): Make sure BIND_EXPR has non-NULL
1734 2015-05-19 David Malcolm <dmalcolm@redhat.com>
1736 * cpp.c (maybe_print_line): Strengthen local "map" from
1737 const line_map * to const line_map_ordinary *.
1738 (cb_file_change): Likewise for param "map" and local "from".
1739 (cb_line_change): Likewise for local "map".
1741 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
1743 * interface.c (compare_actual_formal): Use std::swap instead of
1745 * trans-array.c (gfc_trans_scalarized_loop_end): Likewise.
1746 * trans-intrinsic.c (walk_inline_intrinsic_transpose): Likewise.
1748 2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
1751 * interface.c(gfc_match_end_interface): Enforce F2008 C1202 (R1201).
1752 * match.c(gfc_op2string): Return 'none' for INTRINSIC_NONE.
1754 2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
1757 * decl.c(gfc_match_generic): Detected a malformed GENERIC statement.
1759 2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
1762 * gfortran.dg/storage_size_6.f90: New tests.
1764 2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
1767 * gfortran.dg/storage_size_6.f90: New tests.
1769 2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
1772 * decl.c(gfc_match_entry): Change a gfc_internal_error() into
1775 2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
1778 * gfortran.dg/storage_size_6.f90: New tests.
1780 2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
1783 * parse.c(verify_st_order): Replace a gfc_internal_error with your
1786 2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
1789 * io.c (match_filepos): Check for incomplete/mangled REWIND, FLUSH,
1790 BACKSPACE, and ENDFILE statements
1792 2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
1795 * symbol.c(check_conflict): Check for a conflict between a dummy
1796 argument and an internal procedure name.
1798 2015-05-16 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1801 * io.c (format_lex): Change to NONSTRING when checking for
1802 possible doubled quote.
1803 * scanner.c (gfc_next_char_literal): Revert change from 64506
1804 and add a check for quotes and return.
1806 2015-05-16 Thomas Koenig <tkoenig@gcc.gnu.org>
1809 * expr.c (is_parent_of_current_ns): New function.
1810 (check_restricted): Use it.
1812 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
1816 Replace all calls to gfc_notify_std_1 with gfc_notify_std and
1817 gfc_warning_1 with gfc_warning.
1818 * decl.c (gfc_verify_c_interop_param): Here.
1819 * resolve.c (resolve_branch): Here.
1820 (resolve_fl_derived): Here.
1821 * dependency.c (gfc_check_argument_var_dependency):
1822 * scanner.c (preprocessor_line): Use gfc_warning_now_at. Fix line
1823 counter and locations before and after warning.
1824 * gfortran.h (gfc_warning_1, gfc_warning_now_1, gfc_notify_std_1):
1826 (gfc_warning_now_at): Declare.
1827 * error.c (gfc_warning_1): Delete.
1828 (gfc_notify_std_1): Delete.
1829 (gfc_warning_now_1): Delete.
1830 (gfc_format_decoder): Handle two locations.
1831 (gfc_diagnostic_build_prefix): Rename as
1832 gfc_diagnostic_build_kind_prefix.
1833 (gfc_diagnostic_build_locus_prefix): Take an expanded_location
1834 instead of diagnostic_info.
1835 (gfc_diagnostic_build_locus_prefix): Add overload that takes two
1837 (gfc_diagnostic_starter): Handle two locations.
1838 (gfc_warning_now_at): New.
1839 (gfc_diagnostics_init): Initialize caret_chars array.
1840 (gfc_diagnostics_finish): Reset caret_chars array to default.
1842 2015-05-16 Mikael Morin <mikael@gcc.gnu.org>
1843 Paul Thomas <pault@gcc.gnu.org>
1846 * trans-expr.c (gfc_trans_subcomponent_assign): Always assign
1847 the expression component to the destination. In addition, if
1848 the component has allocatable components, copy them and
1849 deallocate those of the expression, if it is not a variable.
1850 The expression is fixed if not a variable to prevent multiple
1853 2015-05-12 Thomas Koenig <tkoenig@gcc.gnu.org>
1856 * frontend-passes.c (has_dimen_vector_ref): New function.
1857 (inline_matmul_assign): Use it to return early in case
1858 of unhandled vector subscripts.
1860 2015-05-12 Thomas Koenig <tkoenig@gcc.gnu.org>
1864 * gfortran.h (gfc_array_spec): Add field resolved.
1865 * array.c (gfc_resolve_array_spec): Resolve array spec
1868 2015-05-11 Mikael Morin <mikael@gcc.gnu.org>
1871 * simplify.c (simplify_bound): Fix assert to accept subobject arrays.
1873 2015-05-10 Thomas Koenig <tkoenig@gcc.gnu.org>
1876 * frontend-passes.c (scalarized_expr): Set correct dimension and
1877 shape for the expression to be passed to lbound. Remove trailing
1878 references after array refrence.
1879 (inline_matmul_assign): Remove gfc_copy_expr from calls
1880 to scalarized_expr().
1882 2015-05-10 Mikael Morin <mikael@gcc.gnu.org>
1884 * simplify.c (simplify_bound_dim): Don't check for emptyness
1885 in the case of cobound simplification. Factor lower/upper
1886 bound differenciation before the actual simplification.
1887 (simplify_bound): Remove assumed shape specific simplification.
1888 Don't give up early for the lbound of an assumed shape.
1890 2015-05-09 Mikael Morin <mikael@gcc.gnu.org>
1893 * trans-array.h (gfc_scalar_elemental_arg_saved_as_reference):
1895 * trans-array.c (gfc_scalar_elemental_arg_saved_as_reference):
1897 (gfc_add_loop_ss_code): Use gfc_scalar_elemental_arg_saved_as_reference
1899 (gfc_walk_elemental_function_args): Set the dummy_arg field.
1900 * trans.h (gfc_ss_info): New subfield dummy_arg.
1901 * trans-expr.c (gfc_conv_procedure_call): Revert the change
1903 (gfc_conv_expr): Use gfc_scalar_elemental_arg_saved_as_reference
1906 2015-05-08 Mikael Morin <mikael@gcc.gnu.org>
1908 * trans-array.c (gfc_walk_elemental_function_args):
1909 Don't skip the advance to the next dummy argument when skipping
1910 absent optional args.
1912 2015-05-05 David Malcolm <dmalcolm@redhat.com>
1914 * expr.c (check_inquiry): Fix indentation so that it reflects the
1916 * interface.c (compare_parameter): Likewise.
1917 * parse.c (parse_oacc_structured_block): Likewise.
1918 * target-memory.c (expr_to_char): Likewise.
1919 * trans-types.c (gfc_init_kinds): Likewise.
1921 2015-05-02 Steven G. Kargl <kargl@gcc.gnu.org>
1924 * invoke.texi: Remove 'no-' in '-fno-fixed-form'
1926 2015-05-01 Mikael Morin <mikael@gcc.gnu.org>
1928 * simplify.c (simplify_bound_dim): Tighten the check for array fullness
1929 by also checking for absence of subreference.
1930 (simplify_bound): Don't skip simplification if the array
1932 (simplify_cobound): Same.
1934 2015-04-30 Thomas Koenig <tkoenig@gcc.gnu.org>
1937 * simplify.c (simplify_bound): Get constant lower bounds of one
1938 from array spec for assumed and explicit shape shape arrays if
1939 the lower bounds are indeed one.
1941 2015-04-30 David Malcolm <dmalcolm@redhat.com>
1943 * options.c (gfc_init_options): Remove spurious second
1945 * trans-stmt.c (gfc_trans_allocate): Likewise.
1947 2015-04-28 Andre Vehreschild <vehre@gmx.de>
1949 * interface.c (gfc_compare_types): Check for unlimited
1950 polymorphism flag in the correct position indepent of the _data
1951 component being present or not. This prevents a segfault, when
1952 the _data component is not present.
1953 * symbol.c (gfc_type_compatible): Same.
1955 2015-04-27 Jim Wilson <jim.wilson@linaro.org>
1957 * Make-lang.in (fortran.mostlyclean): Remove gfortran and
1960 2015-04-27 Andre Vehreschild <vehre@gmx.de>
1964 * trans-array.c (duplicate_allocatable): Fixed deep copy of
1965 allocatable components, which are liable for copy only, when
1967 (gfc_duplicate_allocatable): Add deep-copy code into if
1968 component allocated block. Needed interface change for that.
1969 (gfc_copy_allocatable_data): Supplying NULL_TREE for code to
1970 add into if-block for checking whether a component was
1972 (gfc_duplicate_allocatable_nocopy): Likewise.
1973 (structure_alloc_comps): Likewise.
1974 * trans-array.h: Likewise.
1975 * trans-expr.c (gfc_trans_alloc_subarray_assign): Likewise.
1976 * trans-openmp.c (gfc_walk_alloc_comps): Likewise.
1978 2015-04-23 Andre Vehreschild <vehre@gmx.de>
1981 * expr.c (gfc_lval_expr_from_sym): Code to select the regular
1982 or class array added.
1983 * gfortran.h: Add IS_CLASS_ARRAY macro.
1984 * trans-array.c (gfc_add_loop_ss_code): Treat class objects
1985 to be referenced always.
1986 (build_class_array_ref): Adapt retrieval of array descriptor.
1987 (build_array_ref): Likewise.
1988 (gfc_conv_array_ref): Hand the vptr or the descriptor to
1989 build_array_ref depending whether the sym is class or not.
1990 (gfc_trans_array_cobounds): Select correct gfc_array_spec for
1991 regular and class arrays.
1992 (gfc_trans_array_bounds): Likewise.
1993 (gfc_trans_dummy_array_bias): Likewise.
1994 (gfc_get_dataptr_offset): Correcting call of build_array_ref.
1995 (gfc_conv_expr_descriptor): Set the array's offset to -1 when
1996 lbound in inner most dim is 1 and symbol non-pointer/assoc.
1997 * trans-decl.c (gfc_build_qualified_array): Select correct
1998 gfc_array_spec for regular and class arrays.
1999 (gfc_build_dummy_array_decl): Likewise.
2000 (gfc_get_symbol_decl): Get a dummy array for class arrays.
2001 (gfc_trans_deferred_vars): Tell conv_expr that the descriptor
2003 * trans-expr.c (gfc_class_vptr_get): Get the class descriptor
2004 from the correct location for class arrays.
2005 (gfc_class_len_get): Likewise.
2006 (gfc_conv_intrinsic_to_class): Add handling of _len component.
2007 (gfc_conv_class_to_class): Prevent access to unset array data
2008 when the array is an optional argument. Add handling of _len
2010 (gfc_copy_class_to_class): Check that _def_init is non-NULL
2011 when used in _vptr->copy()
2012 (gfc_trans_class_init_assign): Ensure that the rank of
2014 (gfc_conv_component_ref): Get the _vptr along with _data refs.
2015 (gfc_conv_variable): Make sure the temp array descriptor is
2016 returned for class arrays, too, and that class arrays are
2017 dereferenced correctly.
2018 (gfc_conv_procedure_call): For polymorphic type initialization
2019 the initializer has to be a pointer to _def_init stored in a
2020 dummy variable, which then needs to be used by value.
2021 * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): Use the
2022 temporary array descriptor for class arrays, too.
2023 (gfc_conv_intrinsic_storage_size): Likewise.
2024 (gfc_conv_intrinsic_loc): Add ref to _data for BT_CLASS
2026 * trans-stmt.c (trans_associate_var): Use a temporary array for
2027 the associate variable of class arrays, too, making the array
2028 one-based (lbound == 1).
2029 * trans-types.c (gfc_is_nodesc_array): Use the correct
2031 * trans.c (gfc_build_array_ref): Use the dummy array descriptor
2033 * trans.h: Add class_vptr to gfc_se for storing a class ref's
2036 2015-04-22 Steven G. Kargl <kargl@gcc.gnu.org>
2039 * decl.c (add_init_expr_to_sym): Set the length type parameter.
2041 2015-04-10 Tobias Burnus <burnus@net-b.de>
2043 * trans-stmt.c (gfc_trans_lock_unlock): Implement -fcoarray=lib
2044 version; reject not-yet-implemented variants.
2045 * trans-types.c (gfc_get_derived_type): For lock_type with
2046 -fcoarray=lib, use a void pointer as type.
2047 * trans.c (gfc_allocate_using_lib, gfc_allocate_allocatable):
2048 Handle lock_type with -fcoarray=lib.
2050 2015-04-10 Mikael Morin <mikael@gcc.gnu.org>
2056 * symbol.c (save_symbol_data, gfc_save_symbol_data): Rename the
2057 former to the latter and make it non-static. Update callers.
2058 * gfortran.h (gfc_save_symbol_data): New prototype.
2059 * decl.c (gfc_match_decl_type_spec): Call 'gfc_save_symbol_data'
2060 before modifying symbols 'sym' and 'dt_sym'.
2062 2013-04-09 Paul Thomas <pault@gcc.gnu.org>
2065 * primary.c (gfc_variable_attr): Avoid ICE on AR_UNKNOWN if any
2066 of the index variables are untyped and errors are present.
2068 2015-04-07 Andre Vehreschild <vehre@gmx.de>
2071 * trans-stmt.c (gfc_trans_allocate): For intrinsic functions
2072 use conv_expr_descriptor() instead of conv_expr_reference().
2074 2015-03-30 Jakub Jelinek <jakub@redhat.com>
2077 * trans-openmp.c (gfc_trans_omp_do): For !simple simd with explicit
2078 linear clause for the iterator set OMP_CLAUSE_LINEAR_NO_COPYIN.
2079 For implcitly added !simple OMP_CLAUSE_LINEAR set it too. Use step 1
2080 instead of the original step on the new iterator - count.
2082 2015-03-25 Mikael Morin <mikael@gcc.gnu.org>
2086 * gfortran.h (struct gfc_namespace): New field 'types_resolved'.
2087 * resolve.c (resolve_types): Return early if field 'types_resolved'
2088 is set. Set 'types_resolved' at the end.
2090 2015-03-24 Andre Vehreschild <vehre@gmx.de>
2093 * trans-expr.c (gfc_conv_structure): Fixed indendation.
2094 Using integer_zero_node now instead of explicitly
2095 constructing a integer constant zero node.
2096 (gfc_conv_derived_to_class): Add handling of _len component,
2097 i.e., when the rhs has a string_length then assign that to
2098 class' _len, else assign 0.
2099 (gfc_conv_intrinsic_to_class): Likewise.
2101 2015-03-24 Andre Vehreschild <vehre@gmx.de>
2106 * class.c (gfc_add_component_ref): Free no longer needed
2107 ref-chains to prevent memory loss.
2108 (find_intrinsic_vtab): For deferred length char arrays or
2109 unlimited polymorphic objects, store the size in bytes of one
2110 character in the size component of the vtab.
2111 * gfortran.h: Added gfc_add_len_component () define.
2112 * trans-array.c (gfc_trans_create_temp_array): Switched to new
2113 function name for getting a class' vtab's field.
2114 (build_class_array_ref): Likewise.
2115 (gfc_array_init_size): Using the size information from allocate
2116 more consequently now, i.e., the typespec of the entity to
2117 allocate is no longer needed. This is to address the last open
2118 comment in PR fortran/57456.
2119 (gfc_array_allocate): Likewise.
2120 (structure_alloc_comps): gfc_copy_class_to_class () needs to
2121 know whether the class is unlimited polymorphic.
2122 * trans-array.h: Changed interface of gfc_array_allocate () to
2123 reflect the no longer needed typespec.
2124 * trans-expr.c (gfc_find_and_cut_at_last_class_ref): New.
2125 (gfc_reset_len): New.
2126 (gfc_get_class_array_ref): Switch to new function name for
2127 getting a class' vtab's field.
2128 (gfc_copy_class_to_class): Added flag to know whether the class
2129 to copy is unlimited polymorphic. Adding _len dependent code
2130 then, which calls ->vptr->copy () with four arguments adding
2131 the length information ->vptr->copy(from, to, from_len, to_cap).
2132 (gfc_conv_procedure_call): Switch to new function name for
2133 getting a class' vtab's field.
2134 (alloc_scalar_allocatable_for_assignment): Use the string_length
2135 as computed by gfc_conv_expr and not the statically backend_decl
2136 which may be incorrect when ref-ing.
2137 (gfc_trans_assignment_1): Use the string_length variable and
2138 not the rse.string_length. The former has been computed more
2140 * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): Switch to new
2141 function name for getting a class' vtab's field.
2142 (gfc_conv_intrinsic_storage_size): Likewise.
2143 (gfc_conv_intrinsic_transfer): Likewise.
2144 * trans-stmt.c (gfc_trans_allocate): Restructured to evaluate
2145 source=expr3 only once before the loop over the objects to
2146 allocate, when the objects are not arrays. Doing correct _len
2147 initialization and calling of vptr->copy () fixing PR 64787.
2148 (gfc_trans_deallocate): Reseting _len to 0, preventing future
2150 * trans.c (gfc_build_array_ref): Switch to new function name
2151 for getting a class' vtab's field.
2152 (gfc_add_comp_finalizer_call): Likewise.
2153 * trans.h: Define the prototypes for the gfc_class_vtab_*_get ()
2154 and gfc_vptr_*_get () functions.
2155 Added gfc_find_and_cut_at_last_class_ref () and
2156 gfc_reset_len () routine prototype. Added flag to
2157 gfc_copy_class_to_class () prototype to signal an unlimited
2158 polymorphic entity to copy.
2160 2015-03-24 Iain Sandoe <iain@codesourcery.com>
2161 Tobias Burnus <burnus@net-b.de>
2163 * gfortran.texi (_gfortran_caf_sync_memory): Improve wording.
2165 2015-03-23 Paul Thomas <pault@gcc.gnu.org>
2166 Mikael Morin <mikael@gcc.gnu.org>
2169 * gfortran.h (struct symbol_attribute) : New field
2170 'array_outer_dependency'.
2171 * trans.h (struct gfc_ss_info): New field 'array_outer_dependency'.
2172 * module.c (enum ab_attribute): New value AB_ARRAY_OUTER_DEPENDENCY.
2173 (attr_bits): Append same value to initializer.
2174 (mio_symbol_attribute): Handle 'array_outer_dependency' attr
2175 in module read and write.
2176 * resolve.c (update_current_proc_outer_array_dependency): New function.
2177 (resolve_function, resolve_call): Add code to update current procedure's
2178 'array_outer_dependency' attribute.
2179 (resolve_variable): Mark current procedure with attribute
2180 array_outer_dependency if the variable is an array coming from outside
2181 the current namespace.
2182 (resolve_fl_procedure): Mark a procedure without body with attribute
2183 'array_outer_dependency'.
2184 * trans-array.c (gfc_conv_resolve_dependencies): If any ss is
2185 marked as 'array_outer_dependency' generate a temporary.
2186 (gfc_walk_function_expr): If the function may reference external arrays,
2187 mark the head gfc_ss with flag 'array_outer_dependency'.
2189 2015-03-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2191 PR libgfortran/59513
2192 * gfortran.texi (Read/Write after EOF marker): New information.
2194 2015-03-21 H.J. Lu <hongjiu.lu@intel.com>
2196 * gfortran.texi (_gfortran_caf_sync_memory): Put @{xxx} in one
2199 2015-03-21 Tobias Burnus <burnus@net-b.de>
2201 * gfortran.texi (_gfortran_caf_sync_all, _gfortran_caf_sync_images,
2202 _gfortran_caf_sync_memory, _gfortran_caf_error_stop,
2203 _gfortran_caf_error_stop_str, _gfortran_caf_atomic_define,
2204 _gfortran_caf_atomic_ref, _gfortran_caf_atomic_cas,
2205 _gfortran_caf_atomic_op): New sections.
2207 2015-03-21 Tobias Burnus <burnus@net-b.de>
2209 * trans-expr.c (gfc_get_tree_for_caf_expr): Reject unimplemented
2210 coindexed coarray accesses.
2212 2015-03-17 Paul Thomas <pault@gcc.gnu.org>
2215 * trans-types.c (gfc_get_derived_type): If an abstract derived
2216 type with procedure pointer components has no other type of
2217 component, return the backend_decl. Otherwise build the
2218 components if any of the non-procedure pointer components have
2221 2015-03-16 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2224 *trans-intrinisic.c (conv_intrinsic_system_clock): Check the
2225 smallest kind passed in user arguments and hardcode tesults for
2226 KIND=1 or KIND=2 to indicate no clock available.
2228 2015-03-16 Andre Vehreschild <vehre@gmx.de>
2230 * resolve.c: Prevent segfault on illegal input.
2232 2015-03-14 Mikael Morin <mikael@gcc.gnu.org>
2235 * trans-expr.c (gfc_trans_pointer_assignment): Clear DESCRIPTOR_ONLY
2236 field before reusing LSE.
2238 2015-03-11 Janne Blomqvist <jb@gcc.gnu.org>
2241 * gfortran.texi: Document behavior when opening files without
2242 explicit ACTION= specifier.
2244 2015-03-10 Paul Thomas <pault@gcc.gnu.org>
2247 * trans-expr.c (gfc_conv_component_ref): If the component
2248 backend declaration is missing and the derived type symbol is
2249 available in the reference, call gfc_build_derived_type.
2251 2015-03-10 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
2252 Tobias Burnus <burnus@net-b.de>
2254 * trans.h (caf_sync_memory): New function decl tree.
2255 * trans-decl.c (gfc_build_builtin_function_decls): Define it.
2256 (create_main_function): Don't call sync_synchronize and leave
2257 it to the CAF library.
2258 * trans-stmt.c (gfc_trans_stop): Ditto.
2259 (gfc_trans_sync): Ditto; add call library call for sync memory.
2261 2015-03-08 Mikael Morin <mikael@gcc.gnu.org>
2264 * resolve.c (resolve_symbol): Check that the symbol found by
2265 name lookup really is the current symbol being resolved.
2267 2015-03-02 Tobias Burnus <burnus@net-b.de>
2269 * check.c (gfc_check_atomic): Properly check for coarrayness
2270 and for being coindexed.
2272 2015-02-26 Martin Liska <mliska@suse.cz>
2274 * resolve.c: Rename enum 'comparison' to 'compare_result' as
2275 solution for -Wodr issue.
2277 2015-02-24 Thomas Schwinge <thomas@codesourcery.com>
2280 * f95-lang.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
2282 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
2283 * types.def (BT_FN_VOID_INT_PTR_SIZE_PTR_PTR_PTR_INT_INT_VAR)
2284 (BT_FN_VOID_INT_OMPFN_PTR_SIZE_PTR_PTR_PTR_INT_INT_INT_INT_INT_VAR):
2285 Remove function types.
2286 (BT_FN_VOID_INT_SIZE_PTR_PTR_PTR)
2287 (BT_FN_VOID_INT_SIZE_PTR_PTR_PTR_INT_INT_VAR)
2288 (BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_INT_INT_INT_INT_INT_VAR):
2291 2015-02-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
2295 * trans-expr.c (gfc_apply_interface_mapping_to_expr): Remove mapping
2296 for component references to class objects.
2297 (gfc_conv_procedure_call): Compare the class by name.
2299 2015-02-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2302 * scanner.c (gfc_next_char_literal): For free form source,
2303 check for '!' and if found, clear the comment and go back
2304 and get the next character. For fixed form source, skip the
2307 2015-02-12 Paul Thomas <pault@gcc.gnu.org>
2310 * trans-stmt.c (gfc_trans_deallocate): If a component array
2311 expression is not a descriptor type and it is a derived type
2312 that has allocatable components and is not finalizable, then
2313 deallocate the allocatable components.
2315 2015-02-08 Mikael Morin <mikael@gcc.gnu.org>
2318 * module.c (check_for_ambiguous): Change argument type
2319 from gfc_symbol to gfc_symtree. Check local (symtree) name
2320 instead of original (symbol) name.
2321 (read_module): Update caller.
2323 2015-02-06 Paul Thomas <pault@gcc.gnu.org>
2326 * gfortran.h: Add 'must finalize' field to gfc_expr and
2327 prototypes for gfc_is_alloc_class_scalar_function and for
2328 gfc_is_alloc_class_array_function.
2329 * expr.c (gfc_is_alloc_class_scalar_function,
2330 gfc_is_alloc_class_array_function): New functions.
2331 * trans-array.c (gfc_add_loop_ss_code): Do not move the
2332 expression for allocatable class scalar functions outside the
2334 (conv_array_index_offset): Cope with deltas being NULL_TREE.
2335 (build_class_array_ref): Do not return with allocatable class
2336 array functions. Add code to pick out the returned class array.
2337 Dereference if necessary and return if not a class object.
2338 (gfc_conv_scalarized_array_ref): Cope with offsets being NULL.
2339 (gfc_walk_function_expr): Return an array ss for the result of
2340 an allocatable class array function.
2341 * trans-expr.c (gfc_conv_subref_array_arg): Remove the assert
2342 that the argument should be a variable. If an allocatable class
2343 array function, set the offset to zero and skip the write-out
2345 (gfc_conv_procedure_call): Add allocatable class array function
2346 to the assert. Call gfc_conv_subref_array_arg for allocatable
2347 class array function arguments with derived type formal arg..
2348 Add the code for handling allocatable class functions, including
2349 finalization calls to prevent memory leaks.
2350 (arrayfunc_assign_needs_temporary): Return if an allocatable
2351 class array function.
2352 (gfc_trans_assignment_1): Set must_finalize to rhs expression
2353 for allocatable class functions. Set scalar_to_array as needed
2354 for scalar class allocatable functions assigned to an array.
2355 Nullify the allocatable components corresponding the the lhs
2356 derived type so that the finalization does not free them.
2358 2015-01-29 Andre Vehreschild <vehre@gmx.de>
2359 Janus Weil <janus@gcc.gnu.org>
2362 Initial patch by Janus Weil
2363 * resolve.c (resolve_allocate_expr): Add check for comp. only
2364 when target is not unlimited polymorphic.
2365 * trans-stmt.c (gfc_trans_allocate): Assign correct value to
2366 _len component of unlimited polymorphic entities.
2368 2015-02-05 Tobias Burnus <burnus@net-b.de>
2371 * resolve.c (resolve_transfer): Also check structure
2374 2015-02-05 Paul Thomas <pault@gcc.gnu.org>
2377 * resolve.c (resolve_structure_cons): Obtain the rank of class
2379 * trans-expr.c (gfc_trans_alloc_subarray_assign): Do the
2380 assignment to allocatable class array components.
2381 (alloc_scalar_allocatable_for_subcomponent_assignment): If comp
2382 is a class component, allocate to the _data field.
2383 (gfc_trans_subcomponent_assign): If a class component with a
2384 derived type expression set the _vptr field and for array
2385 components, call gfc_trans_alloc_subarray_assign. For scalars,
2386 the assignment is performed here.
2388 2015-02-04 Jakub Jelinek <jakub@redhat.com>
2390 * options.c: Include langhooks.h.
2391 (gfc_post_options): Change lang_hooks.name based on
2392 selected -std= mode.
2394 2015-02-03 Steven G. Kargl <kargl@gcc.gnu.org>
2396 * intrinsic.texi (CO_ASSOCIATED): c_prt_1 should be c_ptr_1.
2398 2015-01-30 Andre Vehreschild <vehre@gmx.de>
2400 * trans-decl.c (gfc_get_symbol_decl): Removed duplicate code.
2401 * trans-expr.c (gfc_conv_intrinsic_to_class): Fixed indentation.
2402 Fixed datatype of charlen to be a 32-bit int.
2404 2015-02-01 Joseph Myers <joseph@codesourcery.com>
2406 * error.c (gfc_warning (const char *, ...), gfc_warning_now (const
2407 char *, ...)): Remove functions.
2408 * gfortran.h (gfc_warning (const char *, ...), gfc_warning_now
2409 (const char *, ...)): Remove declarations.
2410 * arith.c, check.c, data.c, decl.c, frontend-passes.c,
2411 interface.c, intrinsic.c, io.c, matchexp.c, module.c, openmp.c,
2412 options.c, parse.c, primary.c, resolve.c, scanner.c, symbol.c,
2413 trans-common.c, trans-const.c, trans-stmt.c: All callers of
2414 gfc_warning and gfc_warning_now changed to pass 0 or option number
2417 2015-01-30 Joseph Myers <joseph@codesourcery.com>
2419 * f95-lang.c, gfortranspec.c, trans-const.c, trans-expr.c: All
2420 callers of fatal_error changed to pass input_location as first
2423 2015-01-28 Tobias Burnus <burnus@net-b.de>
2425 * intrinsic.texi (CO_BROADCAST): Correct argument description.
2427 2015-01-27 Tobias Burnus <burnus@net-b.de>
2430 * trans-openmp.c (gfc_has_alloc_comps, gfc_trans_omp_clauses):
2431 Fix handling for scalar coarrays.
2432 * trans-types.c (gfc_get_element_type): Add comment.
2434 2015-01-27 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2437 * interface.c: Remove <algorithm>.
2438 (check_dummy_characteristics): Use MAX instead of std::max.
2440 2015-01-26 Paul Thomas <pault@gcc.gnu.org>
2443 * resolve.c (resolve_allocate_expr): If the default initializer
2444 is NULL, keep the original MOLD expression so that the correct
2445 typespec is available.
2447 2015-01-26 Tobias Burnus <burnus@net-b.de>
2450 * interface.c (check_dummy_characteristics): Fix coarray handling.
2452 2015-01-26 Tobias Burnus <burnus@net-b.de>
2454 * io.c (gfc_match_inquire): Replace "-1" by a defined constant.
2456 2015-01-26 Janus Weil <janus@gcc.gnu.org>
2459 * class.c (finalize_component): New argument 'sub_ns'. Insert code to
2460 check if 'expr' is associated.
2461 (generate_finalization_wrapper): Rename 'ptr' symbols to 'ptr1' and
2462 'ptr2'. Pass 'sub_ns' to finalize_component.
2464 2015-01-25 Mikael Morin <mikael@gcc.gnu.org>
2467 * decl.c (gfc_match_derived_decl): Don't insert a new symtree element.
2468 * module.c (MOD_VERSION): Bump.
2469 (write_module): Don't write list of extensions.
2470 (read_module): Don't jump over list of extensions;
2471 don't load list of extensions.
2472 (load_derived_extensions, write_dt_extensions,
2473 write_derived_extensions): Remove.
2475 2015-01-24 Tobias Burnus <burnus@net-b.de>
2477 * parse.c (gfc_parse_file): Fix two-location gfc_error call.
2479 2015-01-23 Martin Liska <mliska@suse.cz>
2481 * decl.c (attr_decl1): Workaround -Wmaybe-uninitialized
2482 false positive during profiledbootstrap by initializing them.
2483 * matchexp.c (match_mult_operand): Likewise.
2484 * module.c (write_atom): Likewise.
2485 (read_module): Likewise.
2487 2015-01-23 Tom de Vries <tom@codesourcery.com>
2490 * lang.opt (fopenacc): Mark as LTO option.
2492 2015-01-23 Tom de Vries <tom@codesourcery.com>
2495 * lang.opt (fopenmp): Mark as LTO option.
2497 2015-01-23 Andre Vehreschild <vehre@gmx.de>
2499 * trans-decl.c (gfc_finish_var_decl): Fixed moved comment.
2500 * trans-stmt.c (gfc_trans_allocate): Fixed indentation.
2502 2015-01-23 Jakub Jelinek <jakub@redhat.com>
2504 * gfc-diagnostic.def (DK_ICE_NOBT): New kind.
2506 2015-01-23 Janus Weil <janus@gcc.gnu.org>
2509 * class.c (finalize_component): Apply the check for 'fini_coarray' only
2510 to coarray components.
2512 2015-01-23 Tobias Burnus <burnus@net-b.de>
2515 * trans-openmp.c (gfc_trans_oacc_combined_directive): Fix
2518 2015-01-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2522 * trans-io.c (set_parameter_value): Delete use of has_iostat.
2523 Redefine to not generate any runtime error check calls.
2524 (set_parameter_value_chk): Rename of the former
2525 set_parameter_value with the runtime error checks and fix
2526 whitespace. (set_parameter_value_inquire): New function that
2527 builds a runtime conditional block to set the INQUIRE
2528 common parameter block unit number to -2 when unit numbers
2529 exceed positive KIND=4 limits. (gfc_trans_open): Whitespace.
2530 For unit, use the renamed set_parameter_value_chk.
2531 (gfc_trans_close): Likewise use renamed function.
2532 (build_filepos): Whitespace and use renamed function.
2533 (gfc_trans_inquire): Whitespace and for unit use
2534 set_parameter_value and set_parameter_value_inquire.
2535 (gfc_trans_wait): Remove p->iostat from call to
2536 set_parameter_value. Use new set_parameter_value_chk for unit.
2537 (build_dt): Use the new set_parameter_value without p->iostat
2538 and fix whitespace. Use set_parameter_value_chk for unit.
2540 2015-01-21 Thomas Koenig <tkoenig@netcologne.de>
2543 * dependency.c (callback_dummy_intent_not_int): New function.
2544 (dummy_intent_not_in): New function.
2545 (gfc_full_array_ref_p): Use dummy_intent_not_in.
2547 2015-01-18 Andre Vehreschild <vehre@gmx.de>
2548 Janus Weil <janus@gcc.gnu.org>
2551 * class.c (gfc_get_len_component): New.
2552 (gfc_build_class_symbol): Add _len component to unlimited
2553 polymorphic entities.
2554 (find_intrinsic_vtab): Removed emitting of error message.
2555 * gfortran.h: Added prototype for gfc_get_len_component.
2556 * simplify.c (gfc_simplify_len): Use _len component where
2558 * trans-expr.c (gfc_class_len_get): New.
2559 (gfc_conv_intrinsic_to_class): Add handling for deferred
2561 (gfc_conv_structure): Treat _len component correctly.
2562 (gfc_conv_expr): Prevent bind_c handling when not required.
2563 (gfc_trans_pointer_assignment): Propagate _len component.
2564 * trans-stmt.c (class_has_len_component): New.
2565 (trans_associate_var): _len component treatment for associate
2567 (gfc_trans_allocate): Same as for trans_associate_var()
2568 * trans.h: Added prototype for gfc_class_len_get.
2570 2015-01-18 Paul Thomas <pault@gcc.gnu.org>
2573 * trans-expr.c (gfc_trans_subcomponent_assign): Use a deep copy
2574 for allocatable components, where the source is a variable.
2576 2015-01-18 Paul Thomas <pault@gcc.gnu.org>
2579 * primary.c (gfc_match_varspec): Exclude dangling associate-
2580 names with dimension 0 from being counted as arrays.
2581 * resolve.c (resolve_assoc_var): Sub-strings are permissible
2582 for associate-names, so exclude characters from the test for
2584 * trans-decl.c (gfc_get_symbol_decl): Associate-names can use
2585 the hidden string length variable of their associated target.
2586 Signal this by setting 'length' to a constant, if the decl for
2587 the string length is a variable.
2589 2015-01-17 Paul Thomas <pault@gcc.gnu.org>
2592 * trans-expr.c (gfc_trans_pointer_assignment): Make sure that
2593 before reinitializing rse, to add the rse.pre to block before
2595 * trans-intrinsic.c (gfc_conv_associated): Deal with the class
2596 data being a descriptor.
2598 2015-01-17 Andre Vehreschild <vehre@gmx.de>
2601 * primary.c (build_actual_constructor): Prevent warning.
2602 * trans-expr.c (alloc_scalar_allocatable_for_subcomponent_
2603 assignment): New function encapsulates treatment of allocatable
2605 (gfc_trans_subcomponent_assign): Needed to distinguish between
2606 regular assignment and initilization.
2607 (gfc_trans_structure_assign): Same.
2608 (gfc_conv_structure): Same.
2611 * gfortran.h: deferred_parameter is not needed, because
2612 it artificial does the trick completely.
2613 * primary.c (build_actual_constructor): Same.
2614 (gfc_convert_to_structure_constructor): Same.
2615 * resolve.c (resolve_fl_derived0): Same.
2616 * trans-expr.c (gfc_conv_component_ref): Prevent treating
2617 allocatable deferred length char arrays here.
2618 (gfc_trans_subcomponent_assign): Same as above.
2619 * trans-types.c (gfc_sym_type): This is done in
2620 gfc_get_derived_type already.
2622 2015-01-17 Andre Vehreschild <vehre@gmx.de>
2625 * trans-decl.c (gfc_get_symbol_decl):Use a ref on the string
2626 length when the symbol is declared to be a result.
2627 * trans-expr.c (gfc_conv_procedure_call): Strip deref on the
2628 string length when functions are nested and the string length
2629 is a reference already.
2631 2015-01-16 Janus Weil <janus@gcc.gnu.org>
2634 * decl.c (match_pointer_init): Error out if resolution of init expr
2637 2015-01-15 Tobias Burnus <burnus@net-b.de>
2639 * openmp.c (check_symbol_not_pointer, resolve_oacc_data_clauses,
2640 resolve_oacc_deviceptr_clause, resolve_omp_clauses,
2641 gfc_resolve_oacc_declare): Replace '%s' by %qs.
2643 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
2644 Cesar Philippidis <cesar@codesourcery.com>
2645 James Norris <jnorris@codesourcery.com>
2646 Ilmir Usmanov <i.usmanov@samsung.com>
2647 Tobias Burnus <burnus@net-b.de>
2649 * lang.opt (fopenacc): New option.
2650 * cpp.c (cpp_define_builtins): Conditionally define _OPENACC.
2651 * dump-parse-tree.c (show_omp_node): Split part of it into...
2652 (show_omp_clauses): ... this new function.
2653 (show_omp_node, show_code_node): Handle EXEC_OACC_PARALLEL_LOOP,
2654 EXEC_OACC_PARALLEL, EXEC_OACC_KERNELS_LOOP, EXEC_OACC_KERNELS,
2655 EXEC_OACC_DATA, EXEC_OACC_HOST_DATA, EXEC_OACC_LOOP,
2656 EXEC_OACC_UPDATE, EXEC_OACC_WAIT, EXEC_OACC_CACHE,
2657 EXEC_OACC_ENTER_DATA, EXEC_OACC_EXIT_DATA.
2658 (show_namespace): Update for OpenACC.
2659 * f95-lang.c (DEF_FUNCTION_TYPE_VAR_2, DEF_FUNCTION_TYPE_VAR_8)
2660 (DEF_FUNCTION_TYPE_VAR_12, DEF_GOACC_BUILTIN)
2661 (DEF_GOACC_BUILTIN_COMPILER): New macros.
2662 * types.def (BT_FN_VOID_INT_INT_VAR)
2663 (BT_FN_VOID_INT_PTR_SIZE_PTR_PTR_PTR_INT_INT_VAR)
2664 (BT_FN_VOID_INT_OMPFN_PTR_SIZE_PTR_PTR_PTR_INT_INT_INT_INT_INT_VAR):
2666 * gfortran.h (gfc_statement): Add ST_OACC_PARALLEL_LOOP,
2667 ST_OACC_END_PARALLEL_LOOP, ST_OACC_PARALLEL, ST_OACC_END_PARALLEL,
2668 ST_OACC_KERNELS, ST_OACC_END_KERNELS, ST_OACC_DATA,
2669 ST_OACC_END_DATA, ST_OACC_HOST_DATA, ST_OACC_END_HOST_DATA,
2670 ST_OACC_LOOP, ST_OACC_END_LOOP, ST_OACC_DECLARE, ST_OACC_UPDATE,
2671 ST_OACC_WAIT, ST_OACC_CACHE, ST_OACC_KERNELS_LOOP,
2672 ST_OACC_END_KERNELS_LOOP, ST_OACC_ENTER_DATA, ST_OACC_EXIT_DATA,
2674 (struct gfc_expr_list): New data type.
2675 (gfc_get_expr_list): New macro.
2676 (gfc_omp_map_op): Add OMP_MAP_FORCE_ALLOC, OMP_MAP_FORCE_DEALLOC,
2677 OMP_MAP_FORCE_TO, OMP_MAP_FORCE_FROM, OMP_MAP_FORCE_TOFROM,
2678 OMP_MAP_FORCE_PRESENT, OMP_MAP_FORCE_DEVICEPTR.
2679 (OMP_LIST_FIRST, OMP_LIST_DEVICE_RESIDENT, OMP_LIST_USE_DEVICE)
2680 (OMP_LIST_CACHE): New enumerators.
2681 (struct gfc_omp_clauses): Add async_expr, gang_expr, worker_expr,
2682 vector_expr, num_gangs_expr, num_workers_expr, vector_length_expr,
2683 wait_list, tile_list, async, gang, worker, vector, seq,
2684 independent, wait, par_auto, gang_static, and loc members.
2685 (struct gfc_namespace): Add oacc_declare_clauses member.
2686 (gfc_exec_op): Add EXEC_OACC_KERNELS_LOOP,
2687 EXEC_OACC_PARALLEL_LOOP, EXEC_OACC_PARALLEL, EXEC_OACC_KERNELS,
2688 EXEC_OACC_DATA, EXEC_OACC_HOST_DATA, EXEC_OACC_LOOP,
2689 EXEC_OACC_UPDATE, EXEC_OACC_WAIT, EXEC_OACC_CACHE,
2690 EXEC_OACC_ENTER_DATA, EXEC_OACC_EXIT_DATA.
2691 (gfc_free_expr_list, gfc_resolve_oacc_directive)
2692 (gfc_resolve_oacc_declare, gfc_resolve_oacc_parallel_loop_blocks)
2693 (gfc_resolve_oacc_blocks): New prototypes.
2694 * match.c (match_exit_cycle): Handle EXEC_OACC_LOOP and
2695 EXEC_OACC_PARALLEL_LOOP.
2696 * match.h (gfc_match_oacc_cache, gfc_match_oacc_wait)
2697 (gfc_match_oacc_update, gfc_match_oacc_declare)
2698 (gfc_match_oacc_loop, gfc_match_oacc_host_data)
2699 (gfc_match_oacc_data, gfc_match_oacc_kernels)
2700 (gfc_match_oacc_kernels_loop, gfc_match_oacc_parallel)
2701 (gfc_match_oacc_parallel_loop, gfc_match_oacc_enter_data)
2702 (gfc_match_oacc_exit_data, gfc_match_oacc_routine): New
2704 * openmp.c: Include "diagnostic.h" and "gomp-constants.h".
2705 (gfc_free_omp_clauses): Update for members added to struct
2707 (gfc_match_omp_clauses): Change mask paramter to uint64_t. Add
2709 (resolve_omp_clauses): Add openacc parameter. Update for OpenACC.
2710 (struct fortran_omp_context): Add is_openmp member.
2711 (gfc_resolve_omp_parallel_blocks): Initialize it.
2712 (gfc_resolve_do_iterator): Update for OpenACC.
2713 (gfc_resolve_omp_directive): Call
2714 resolve_omp_directive_inside_oacc_region.
2715 (OMP_CLAUSE_PRIVATE, OMP_CLAUSE_FIRSTPRIVATE)
2716 (OMP_CLAUSE_LASTPRIVATE, OMP_CLAUSE_COPYPRIVATE)
2717 (OMP_CLAUSE_SHARED, OMP_CLAUSE_COPYIN, OMP_CLAUSE_REDUCTION)
2718 (OMP_CLAUSE_IF, OMP_CLAUSE_NUM_THREADS, OMP_CLAUSE_SCHEDULE)
2719 (OMP_CLAUSE_DEFAULT, OMP_CLAUSE_ORDERED, OMP_CLAUSE_COLLAPSE)
2720 (OMP_CLAUSE_UNTIED, OMP_CLAUSE_FINAL, OMP_CLAUSE_MERGEABLE)
2721 (OMP_CLAUSE_ALIGNED, OMP_CLAUSE_DEPEND, OMP_CLAUSE_INBRANCH)
2722 (OMP_CLAUSE_LINEAR, OMP_CLAUSE_NOTINBRANCH, OMP_CLAUSE_PROC_BIND)
2723 (OMP_CLAUSE_SAFELEN, OMP_CLAUSE_SIMDLEN, OMP_CLAUSE_UNIFORM)
2724 (OMP_CLAUSE_DEVICE, OMP_CLAUSE_MAP, OMP_CLAUSE_TO)
2725 (OMP_CLAUSE_FROM, OMP_CLAUSE_NUM_TEAMS, OMP_CLAUSE_THREAD_LIMIT)
2726 (OMP_CLAUSE_DIST_SCHEDULE): Use uint64_t.
2727 (OMP_CLAUSE_ASYNC, OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS)
2728 (OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_COPY, OMP_CLAUSE_COPYOUT)
2729 (OMP_CLAUSE_CREATE, OMP_CLAUSE_PRESENT)
2730 (OMP_CLAUSE_PRESENT_OR_COPY, OMP_CLAUSE_PRESENT_OR_COPYIN)
2731 (OMP_CLAUSE_PRESENT_OR_COPYOUT, OMP_CLAUSE_PRESENT_OR_CREATE)
2732 (OMP_CLAUSE_DEVICEPTR, OMP_CLAUSE_GANG, OMP_CLAUSE_WORKER)
2733 (OMP_CLAUSE_VECTOR, OMP_CLAUSE_SEQ, OMP_CLAUSE_INDEPENDENT)
2734 (OMP_CLAUSE_USE_DEVICE, OMP_CLAUSE_DEVICE_RESIDENT)
2735 (OMP_CLAUSE_HOST_SELF, OMP_CLAUSE_OACC_DEVICE, OMP_CLAUSE_WAIT)
2736 (OMP_CLAUSE_DELETE, OMP_CLAUSE_AUTO, OMP_CLAUSE_TILE): New macros.
2737 (gfc_match_omp_clauses): Handle those.
2738 (OACC_PARALLEL_CLAUSES, OACC_KERNELS_CLAUSES, OACC_DATA_CLAUSES)
2739 (OACC_LOOP_CLAUSES, OACC_PARALLEL_LOOP_CLAUSES)
2740 (OACC_KERNELS_LOOP_CLAUSES, OACC_HOST_DATA_CLAUSES)
2741 (OACC_DECLARE_CLAUSES, OACC_UPDATE_CLAUSES)
2742 (OACC_ENTER_DATA_CLAUSES, OACC_EXIT_DATA_CLAUSES)
2743 (OACC_WAIT_CLAUSES): New macros.
2744 (gfc_free_expr_list, match_oacc_expr_list, match_oacc_clause_gang)
2745 (gfc_match_omp_map_clause, gfc_match_oacc_parallel_loop)
2746 (gfc_match_oacc_parallel, gfc_match_oacc_kernels_loop)
2747 (gfc_match_oacc_kernels, gfc_match_oacc_data)
2748 (gfc_match_oacc_host_data, gfc_match_oacc_loop)
2749 (gfc_match_oacc_declare, gfc_match_oacc_update)
2750 (gfc_match_oacc_enter_data, gfc_match_oacc_exit_data)
2751 (gfc_match_oacc_wait, gfc_match_oacc_cache)
2752 (gfc_match_oacc_routine, oacc_is_loop)
2753 (resolve_oacc_scalar_int_expr, resolve_oacc_positive_int_expr)
2754 (check_symbol_not_pointer, check_array_not_assumed)
2755 (resolve_oacc_data_clauses, resolve_oacc_deviceptr_clause)
2756 (oacc_compatible_clauses, oacc_is_parallel, oacc_is_kernels)
2757 (omp_code_to_statement, oacc_code_to_statement)
2758 (resolve_oacc_directive_inside_omp_region)
2759 (resolve_omp_directive_inside_oacc_region)
2760 (resolve_oacc_nested_loops, resolve_oacc_params_in_parallel)
2761 (resolve_oacc_loop_blocks, gfc_resolve_oacc_blocks)
2762 (resolve_oacc_loop, resolve_oacc_cache, gfc_resolve_oacc_declare)
2763 (gfc_resolve_oacc_directive): New functions.
2764 * parse.c (next_free): Update for OpenACC. Move some code into...
2765 (verify_token_free): ... this new function.
2766 (next_fixed): Update for OpenACC. Move some code into...
2767 (verify_token_fixed): ... this new function.
2768 (case_executable): Add ST_OACC_UPDATE, ST_OACC_WAIT,
2769 ST_OACC_CACHE, ST_OACC_ENTER_DATA, and ST_OACC_EXIT_DATA.
2770 (case_exec_markers): Add ST_OACC_PARALLEL_LOOP, ST_OACC_PARALLEL,
2771 ST_OACC_KERNELS, ST_OACC_DATA, ST_OACC_HOST_DATA, ST_OACC_LOOP,
2772 ST_OACC_KERNELS_LOOP.
2773 (case_decl): Add ST_OACC_ROUTINE.
2774 (push_state, parse_critical_block, parse_progunit): Update for
2776 (gfc_ascii_statement): Handle ST_OACC_PARALLEL_LOOP,
2777 ST_OACC_END_PARALLEL_LOOP, ST_OACC_PARALLEL, ST_OACC_END_PARALLEL,
2778 ST_OACC_KERNELS, ST_OACC_END_KERNELS, ST_OACC_KERNELS_LOOP,
2779 ST_OACC_END_KERNELS_LOOP, ST_OACC_DATA, ST_OACC_END_DATA,
2780 ST_OACC_HOST_DATA, ST_OACC_END_HOST_DATA, ST_OACC_LOOP,
2781 ST_OACC_END_LOOP, ST_OACC_DECLARE, ST_OACC_UPDATE, ST_OACC_WAIT,
2782 ST_OACC_CACHE, ST_OACC_ENTER_DATA, ST_OACC_EXIT_DATA,
2784 (verify_st_order, parse_spec): Handle ST_OACC_DECLARE.
2785 (parse_executable): Handle ST_OACC_PARALLEL_LOOP,
2786 ST_OACC_KERNELS_LOOP, ST_OACC_LOOP, ST_OACC_PARALLEL,
2787 ST_OACC_KERNELS, ST_OACC_DATA, ST_OACC_HOST_DATA.
2788 (decode_oacc_directive, parse_oacc_structured_block)
2789 (parse_oacc_loop, is_oacc): New functions.
2790 * parse.h (struct gfc_state_data): Add oacc_declare_clauses
2792 (is_oacc): New prototype.
2793 * resolve.c (gfc_resolve_blocks, gfc_resolve_code): Handle
2794 EXEC_OACC_PARALLEL_LOOP, EXEC_OACC_PARALLEL,
2795 EXEC_OACC_KERNELS_LOOP, EXEC_OACC_KERNELS, EXEC_OACC_DATA,
2796 EXEC_OACC_HOST_DATA, EXEC_OACC_LOOP, EXEC_OACC_UPDATE,
2797 EXEC_OACC_WAIT, EXEC_OACC_CACHE, EXEC_OACC_ENTER_DATA,
2798 EXEC_OACC_EXIT_DATA.
2799 (resolve_codes): Call gfc_resolve_oacc_declare.
2800 * scanner.c (openacc_flag, openacc_locus): New variables.
2801 (skip_free_comments): Update for OpenACC. Move some code into...
2802 (skip_omp_attribute): ... this new function.
2803 (skip_oacc_attribute): New function.
2804 (skip_fixed_comments, gfc_next_char_literal): Update for OpenACC.
2805 * st.c (gfc_free_statement): Handle EXEC_OACC_PARALLEL_LOOP,
2806 EXEC_OACC_PARALLEL, EXEC_OACC_KERNELS_LOOP, EXEC_OACC_KERNELS,
2807 EXEC_OACC_DATA, EXEC_OACC_HOST_DATA, EXEC_OACC_LOOP,
2808 EXEC_OACC_UPDATE, EXEC_OACC_WAIT, EXEC_OACC_CACHE,
2809 EXEC_OACC_ENTER_DATA, EXEC_OACC_EXIT_DATA.
2810 * trans-decl.c (gfc_generate_function_code): Update for OpenACC.
2811 * trans-openmp.c: Include "gomp-constants.h".
2812 (gfc_omp_finish_clause, gfc_trans_omp_clauses): Use GOMP_MAP_*
2813 instead of OMP_CLAUSE_MAP_*. Use OMP_CLAUSE_SET_MAP_KIND.
2814 (gfc_trans_omp_clauses): Handle OMP_LIST_USE_DEVICE,
2815 OMP_LIST_DEVICE_RESIDENT, OMP_LIST_CACHE, and OMP_MAP_FORCE_ALLOC,
2816 OMP_MAP_FORCE_DEALLOC, OMP_MAP_FORCE_TO, OMP_MAP_FORCE_FROM,
2817 OMP_MAP_FORCE_TOFROM, OMP_MAP_FORCE_PRESENT,
2818 OMP_MAP_FORCE_DEVICEPTR, and gfc_omp_clauses' async, seq,
2819 independent, wait_list, num_gangs_expr, num_workers_expr,
2820 vector_length_expr, vector, vector_expr, worker, worker_expr,
2821 gang, gang_expr members.
2822 (gfc_trans_omp_do): Handle EXEC_OACC_LOOP.
2823 (gfc_convert_expr_to_tree, gfc_trans_oacc_construct)
2824 (gfc_trans_oacc_executable_directive)
2825 (gfc_trans_oacc_wait_directive, gfc_trans_oacc_combined_directive)
2826 (gfc_trans_oacc_declare, gfc_trans_oacc_directive): New functions.
2827 * trans-stmt.c (gfc_trans_block_construct): Update for OpenACC.
2828 * trans-stmt.h (gfc_trans_oacc_directive, gfc_trans_oacc_declare):
2830 * trans.c (tranc_code): Handle EXEC_OACC_CACHE, EXEC_OACC_WAIT,
2831 EXEC_OACC_UPDATE, EXEC_OACC_LOOP, EXEC_OACC_HOST_DATA,
2832 EXEC_OACC_DATA, EXEC_OACC_KERNELS, EXEC_OACC_KERNELS_LOOP,
2833 EXEC_OACC_PARALLEL, EXEC_OACC_PARALLEL_LOOP, EXEC_OACC_ENTER_DATA,
2834 EXEC_OACC_EXIT_DATA.
2835 * gfortran.texi: Update for OpenACC.
2836 * intrinsic.texi: Likewise.
2837 * invoke.texi: Likewise.
2839 2015-01-15 Janus Weil <janus@gcc.gnu.org>
2842 * resolve.c (resolve_fl_derived0): Continue resolving next component
2845 2015-01-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2848 * io.c (gfc_match_inquire): Generate error if unit number in
2849 inquire statement is a constant -1. All other values allowed.
2850 * trans-io.c (gfc_trans_inquire): Delete dummy iostat variable.
2851 (create_dummy_iostat): Delete function no longer used.
2853 2015-01-13 Jakub Jelinek <jakub@redhat.com>
2856 * trans-decl.c (create_function_arglist): Don't set TREE_READONLY
2857 on dummy args with VALUE attribute.
2859 2015-01-11 Janus Weil <janus@gcc.gnu.org>
2862 * interface.c (gfc_extend_expr): Look for type-bound operators before
2865 2015-01-11 Janus Weil <janus@gcc.gnu.org>
2868 * resolve.c (resolve_fl_derived0): Set error flag if problems with the
2869 interface of a procedure-pointer component were detected.
2871 2015-01-11 Janus Weil <janus@gcc.gnu.org>
2874 * interface.c (compare_parameter): Interface check for
2875 procedure-pointer component as actual argument.
2877 2015-01-10 Thomas Schwinge <thomas@codesourcery.com>
2879 * gfortran.texi: Update for libgomp being renamed from "GNU OpenMP
2880 Runtime Library" to "GNU Offloading and Multi Processing Runtime
2882 * intrinsic.texi: Likewise.
2884 2015-01-10 Tobias Burnus <burnus@net-b.de>
2887 * invoke.texi (Wline-truncation): Document new behaviour.
2888 * lang.opt (Wline-truncation): Add Init(-1).
2889 * options.c (gfc_post_options): If -Wline-truncation is unset,
2890 enable it for free-form source files; for the latter, also use
2891 -Werror=line-truncation, unless -Wno-error has been specified.
2893 2015-01-09 Michael Collison <michael.collison@linaro.org>
2895 * convert.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
2896 input.h, alias.h, symtab.h, options.h, fold-const.h,
2897 wide-int.h, and inchash.h due to flattening of tree.h.
2898 * cpp.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
2899 input.h, alias.h, symtab.h, fold-const.h,
2900 wide-int.h, and inchash.h due to flattening of tree.h.
2902 * f95.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
2903 input.h, alias.h, symtab.h, options.h, fold-const.h,
2904 wide-int.h, and inchash.h due to flattening of tree.h.
2905 * iresolve.c: Ditto.
2906 * match.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
2907 input.h, alias.h, symtab.h, fold-const.h,
2908 wide-int.h, and inchash.h due to flattening of tree.h.
2909 * module.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
2910 input.h, alias.h, symtab.h, options.h, fold-const.h,
2911 wide-int.h, and inchash.h due to flattening of tree.h.
2913 * target-memory.c: Include hash-set.h, vec.h,
2914 double-int.h, input.h, alias.h, symtab.h, fold-const.h,
2915 wide-int.h, and inchash.h due to flattening of tree.h.
2916 * trans-array.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
2917 input.h, alias.h, symtab.h, options.h, fold-const.h,
2918 wide-int.h, and inchash.h due to flattening of tree.h.
2919 * trans.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
2920 input.h, alias.h, symtab.h, options.h, fold-const.h,
2921 wide-int.h, and inchash.h due to flattening of tree.h.
2922 * trans-common.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
2923 input.h, alias.h, symtab.h, fold-const.h,
2924 wide-int.h, and inchash.h due to flattening of tree.h.
2925 * trans-const.c: Ditto.
2926 * trans-decl.c: Ditto.
2927 * trans-expr.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
2928 input.h, alias.h, symtab.h, options.h, fold-const.h,
2929 wide-int.h, and inchash.h due to flattening of tree.h.
2930 * trans-intrinsic.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
2931 input.h, alias.h, symtab.h, fold-const.h,
2932 wide-int.h, inchash.h and real.h due to flattening of tree.h.
2933 * trans-io.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
2934 input.h, alias.h, symtab.h, options.h, fold-const.h,
2935 wide-int.h, and inchash.h due to flattening of tree.h.
2936 * trans-openmp.c: Ditto.
2937 * trans-stmt.c: Ditto.
2938 * trans-types.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
2939 input.h, alias.h, symtab.h, fold-const.h,
2940 wide-int.h, inchash.h and real.h due to flattening of tree.h.
2942 2015-01-08 Tobias Burnus <burnus@net-b.de>
2944 * trans-decl.c (gfc_build_qualified_array): Fix coarray tokens
2945 for module coarrays with -fcoarray=lib.
2946 (get_proc_pointer_decl): As module variable, make only public
2947 when not marked as private.
2949 2015-01-05 Thomas Koenig <tkoenig@gcc.gnu.org>
2952 * dependency.h: Actually commit changes.
2954 2015-01-05 Thomas Koenig <tkoenig@gcc.gnu.org>
2957 * dependency.c: Update copyright years.
2958 (gfc_discard_nops): Add prototype.
2959 * dependency.c (discard_nops): Rename to gfc_discard_nops,
2961 (gfc_discard_nops): Use gfc_discard_nops.
2962 (gfc_dep_difference): Likewise.
2963 * frontend-passes.c Update copyright years.
2964 (realloc_strings): New function. Add prototype.
2965 (gfc_run_passes): Call realloc_strings.
2966 (realloc_string_callback): New function.
2967 (create_var): Add prototype. Handle case of a
2968 scalar character variable.
2969 (optimize_trim): Do not handle allocatable variables.
2971 2015-01-05 Jakub Jelinek <jakub@redhat.com>
2973 Update copyright years.
2975 * gfortranspec.c (lang_specific_driver): Update copyright notice
2977 * gfc-internals.texi: Bump @copying's copyright year.
2978 * gfortran.texi: Ditto.
2979 * intrinsic.texi: Ditto.
2980 * invoke.texi: Ditto.
2982 2015-01-02 Janus Weil <janus@gcc.gnu.org>
2985 * expr.c (find_component_ref): Deal with extended types.
2987 2015-01-02 Tobias Burnus <burnus@net-b.de>
2989 * trans-decl.c (gfc_build_qualified_array): Fix coarray tokens
2990 for module coarrays with -fcoarray=lib.
2992 2015-01-02 Janus Weil <janus@gcc.gnu.org>
2995 * interface.c (is_procptr_result): New function to check if an
2996 expression is a procedure-pointer result.
2997 (compare_actual_formal): Use it.
2999 Copyright (C) 2015 Free Software Foundation, Inc.
3001 Copying and distribution of this file, with or without modification,
3002 are permitted in any medium without royalty provided the copyright
3003 notice and this notice are preserved.