1 2015-11-08 Steven G. Kargl <kargl@gc.gnu.org>
4 * array.c (match_array_element_spec): Check of invalid NULL().
5 While here, fix nearby comments.
7 2015-11-08 Paul Thomas <pault@gcc.gnu.org>
10 * class.c (has_finalizer_component): Prevent infinite recursion
11 through this function if the derived type and that of its
12 component are the same.
13 * trans-types.c (gfc_get_derived_type): Do the same for proc
14 pointers by ignoring the explicit interface for the component.
17 * check.c (same_type_check): If either of the expressions is
18 BT_PROCEDURE, use the typespec from the symbol, rather than the
21 2015-11-07 Steven G. Kargl <kargl@gcc.gnu.org>
24 * check.c (gfc_check_reshape): Improve check for valid SHAPE argument.
26 2015-11-07 Steven G. Kargl <kargl@gcc.gnu.org>
29 * match.c (match_case_selector): Check for invalid type.
31 2015-11-06 David Malcolm <dmalcolm@redhat.com>
33 * cpp.c (cb_cpp_error): Convert parameter from location_t to
34 rich_location *. Eliminate the "column_override" parameter.
35 * error.c (gfc_warning): Update for change in signature of
37 (gfc_format_decoder): Update handling of %C/%L for changes
39 (gfc_diagnostic_starter): Use richloc when determining whether to
40 print one locus or two. When handling a location that will
41 involve a call to diagnostic_show_locus, only attempt to print the
42 locus for the primary location, and don't call into
43 diagnostic_print_caret_line.
44 (gfc_warning_now_at): Update for change in signature of
46 (gfc_warning_now): Likewise.
47 (gfc_error_now): Likewise.
48 (gfc_fatal_error): Likewise.
49 (gfc_error): Likewise.
50 (gfc_internal_error): Likewise.
52 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
54 * openmp.c (gfc_match_omp_clauses): Update support for the tile
55 and default clauses in OpenACC.
56 (gfc_match_oacc_update): Error when data clauses are supplied.
57 (oacc_compatible_clauses): Delete.
58 (resolve_omp_clauses): Give special care for OpenACC reductions.
59 Also update error reporting for the tile clause.
60 (resolve_oacc_loop_blocks): Update error reporting for the tile clause.
61 * trans-openmp.c (gfc_trans_omp_clauses): Update OMP_CLAUSE_SEQ. Add
62 OMP_CLAUSE_{AUTO,TILE} and add support the the gang static argument.
63 (gfc_trans_oacc_combined_directive): Update the list of clauses which
64 are split to acc loops.
66 2015-11-05 Jakub Jelinek <jakub@redhat.com>
68 * types.def (BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR): Remove.
69 (BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR_INT_INT): New.
71 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
72 Chung-Lin Tang <cltang@codesourcery.com>
74 * gfortran.h (gfc_statement): Add ST_OACC_ATOMIC,
76 (gfc_exec_op): Add EXEC_OACC_ATOMIC.
77 * match.h (gfc_match_oacc_atomic): New prototype.
78 * openmp.c (gfc_match_omp_atomic, gfc_match_oacc_atomic): New
79 wrapper functions around...
80 (gfc_match_omp_oacc_atomic): ... this new function.
81 (oacc_code_to_statement, gfc_resolve_oacc_directive): Handle
83 * parse.c (decode_oacc_directive): Handle "atomic", "end atomic".
84 (case_exec_markers): Add ST_OACC_ATOMIC.
85 (gfc_ascii_statement): Handle ST_OACC_ATOMIC, ST_OACC_END_ATOMIC.
86 (parse_omp_atomic): Rename to...
87 (parse_omp_oacc_atomic): ... this new function. Add omp_p formal
88 parameter. Adjust all users.
89 (parse_executable): Handle ST_OACC_ATOMIC.
90 (is_oacc): Handle EXEC_OACC_ATOMIC.
91 * resolve.c (gfc_resolve_blocks, gfc_resolve_code): Handle
93 * st.c (gfc_free_statement): Handle EXEC_OACC_ATOMIC.
94 * trans-openmp.c (gfc_trans_oacc_directive): Handle
96 * trans.c (trans_code): Handle EXEC_OACC_ATOMIC.
98 2015-10-31 Cesar Philippidis <cesar@codesourcery.com>
102 * openmp.c (resolve_omp_clauses): Pass &n->where when calling
105 2015-10-30 Cesar Philippidis <cesar@codesourcery.com>
107 * gfortran.h (gfc_omp_namespace): Add locus where member.
108 * openmp.c (gfc_match_omp_variable_list): Set where for each list
110 (resolve_omp_clauses): Remove where argument and use the where
111 gfc_omp_namespace member when reporting errors.
112 (resolve_omp_do): Update call to resolve_omp_clauses.
113 (resolve_oacc_loop): Likewise.
114 (gfc_resolve_oacc_directive): Likewise.
115 (gfc_resolve_omp_directive): Likewise.
116 (gfc_resolve_omp_declare_simd): Likewise.
118 2015-10-15 Steven G. Kargl <kargl@gcc.gnu.org>
121 * decl.c (gfc_set_constant_character_len): Convert gcc_assert into an
122 if-statement causing an early return leads to valid error message.
124 2015-10-30 Steven G. Kargl <kargl@gcc.gnu.org>
127 * interface.c (get_expr_storage_size): Check for INTEGER type before
128 calling gmp routines.
130 2015-10-30 Steven G. Kargl <kargl@gcc.gnu.org>
133 * decl.c (add_init_expr_to_sym): if the char length in the typespec
134 is NULL, check for and use a constructor.
136 2015-10-30 Steven G. Kargl <kargl@gcc.gnu.org>
139 * decl.c (match_attr_spec): PROTECTED can only be a module.
141 2015-10-29 Steven G. Kargl <kargl@gcc.gnu.org>
144 * trans-decl.c (generate_local_decl): Mark PARAMETER entities in
147 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
149 * array.c: Reorder #include's and remove duplicates.
150 * convert.c: Likewise.
153 * f95-lang.c: Likewise.
154 * frontend-passes.c: Likewise.
155 * iresolve.c: Likewise.
157 * module.c: Likewise.
158 * options.c: Likewise.
160 * resolve.c: Likewise.
161 * simplify.c: Likewise.
162 * target-memory.c: Likewise.
163 * trans-array.c: Likewise.
164 * trans-common.c: Likewise.
165 * trans-const.c: Likewise.
166 * trans-decl.c: Likewise.
167 * trans-expr.c: Likewise.
168 * trans-intrinsic.c: Likewise.
169 * trans-io.c: Likewise.
170 * trans-openmp.c: Likewise.
171 * trans-stmt.c: Likewise.
172 * trans-types.c: Likewise.
175 2015-10-29 Richard Biener <rguenther@suse.de>
177 * f95-lang.c: Properly build variadic types for classification
178 and comparison builtins.
180 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
181 James Norris <jnorris@codesourcery.com>
184 * openmp.c (resolve_oacc_cache): Remove function.
185 (gfc_match_oacc_cache): Enable array sections.
186 (resolve_omp_clauses, gfc_resolve_oacc_directive): Change
188 * trans-openmp.c (gfc_trans_omp_clauses): Likewise.
190 2015-10-27 Steven G. Kargl <kargl@gcc.gnu.org>
193 * decl.c (char_len_param_value): Check for REF_ARRAY.
195 2015-10-26 Louis Krupp <louis.krupp@zoho.com>
198 * fortran.h: Include namespace pointer in statement label
200 * symbol.c (gfc_get_st_label): Store pointer to namespace
201 that owns the statement label tree in each label.
202 (gfc_free_st_label): Use namespace owning statement label
203 tree when deleting statement label.
204 * io.c: Initialize format_asterisk with NULL namespace pointer.
206 2015-10-26 Steven G. Kargl <kargl@gcc.gnu.org>
209 * array.c (gfc_ref_dimen_size): Check for BT_INTEGER before calling
212 2015-10-26 Andre Vehreschild <vehre@gcc.gnu.org>
215 * trans-array.c (evaluate_bound): For deferred length arrays get the
216 bounds directly from the descriptor, i.e., prevent using constant
217 zero lower bound from the gfc_conv_array_lbound () routine.
218 (gfc_conv_section_startstride): Hand deferred array status to
220 (gfc_conv_expr_descriptor): Same.
222 2015-01-25 Paul Thomas <pault@gcc.gnu.org>
225 * trans-array.c (structure_alloc_comps): On deallocation of
226 class components, reset the vptr to the declared type vtable
227 and reset the _len field of unlimited polymorphic components.
228 *trans-expr.c (gfc_find_and_cut_at_last_class_ref): Bail out on
229 allocatable component references to the right of part reference
230 with non-zero rank and return NULL.
231 (gfc_reset_vptr): Simplify this function by using the function
232 gfc_get_vptr_from_expr. Return if the vptr is NULL_TREE.
233 (gfc_reset_len): If gfc_find_and_cut_at_last_class_ref returns
235 * trans-stmt.c (gfc_trans_allocate): Rely on the use of
236 gfc_trans_assignment if expr3 is a variable expression since
237 this deals correctly with array sections.
239 2015-10-25 Andre Vehreschild <vehre@gcc.gnu.org>
243 * trans-array.c (build_array_ref): Modified call to
244 gfc_get_class_array_ref to adhere to new interface.
245 (gfc_conv_expr_descriptor): For one-based arrays that
246 are filled by a loop starting at one the start index of the
247 source array has to be mangled into the offset.
248 * trans-expr.c (gfc_get_class_array_ref): When the tree to get
249 the _data component is present already, add a way to supply it.
250 (gfc_copy_class_to_class): Allow to copy to a derived type also.
251 * trans-stmt.c (gfc_trans_allocate): Do not conv_expr_descriptor
252 for functions returning a class or derived object. Get the
254 * trans.h: Interface change of gfc_get_class_array_ref.
256 2015-10-24 Steven G. Kargl <kargl@gcc.gnu.org>
259 * decl.c (gfc_match_decl_type_spec): Check for valid kind in old-style
262 2015-10-24 Steven G. Kargl <kargl@gcc.gnu.org>
265 * array.c (gfc_match_array_constructor): Check for error from type
267 * decl.c (char_len_param_value): Check for valid of charlen parameter.
268 Reap dead code dating to 2008.
269 match.c (gfc_match_type_spec): Special case the keyword use in REAL.
271 2015-10-23 Mikhail Maltsev <maltsevm@gmail.com>
273 * trans-common.c (create_common): Adjust to use flag_checking.
274 * trans.c (gfc_add_modify_loc): Use gcc_checking_assert.
276 2015-10-21 Martin Sebor <msebor@redhat.com>
279 * lang.opt: End each sentence that describes an option with a period.
281 2015-10-21 Steven G. Kargl <kargl@gcc.gnu.org>
284 * data.c (create_character_initializer): Deal with zero length string.
286 2015-10-19 Steven G. Kargl <kargl@gcc.gnu.org>
288 * resolve.c (gfc_verify_binding_labels): Check for NULL pointer.
290 2015-10-19 Steven G. Kargl <kargl@gcc.gnu.org>
293 * decl.c (add_init_expr_to_sym): Remove an assert() to allow an error
294 message to be issued.
296 2015-10-18 Mikael Morin <mikael@gcc.gnu.org>
299 * gfortran.h (gfc_symbol): Expand comment.
300 * match.c (gfc_match_common): Delay adding the symbol to
301 the common_block after the gfc_add_in_common call.
302 * symbol.c (gfc_free_symbol): Move common block memory handling...
303 (gfc_set_symbol_common_block): ... here as a new function.
304 (restore_old_symbol): Restore common block fields.
305 (gfc_restore_last_undo_checkpoint):
306 Check the common_block pointer instead of the in_common attribute.
307 When a symbol has been removed from the common block linked list,
308 clear its common_next pointer.
310 2015-10-18 Paul Thomas <pault@gcc.gnu.org>
314 * primary.c (match_substring): Add an argument 'deferred' to
315 flag that a substring reference with null start and end should
316 not be optimized away for deferred length strings.
317 (match_string_constant, gfc_match_rvalue): Set the argument.
318 * trans-expr.c (alloc_scalar_allocatable_for_assignment): If
319 there is a substring reference return.
320 * trans-intrinsic.c (conv_intrinsic_move_alloc): For deferred
321 characters, assign the 'from' string length to the 'to' string
322 length. If the 'from' expression is deferred, set its string
323 length to zero. If the 'to' expression has allocatable
324 components, deallocate them.
326 2015-10-17 Steven G. Kargl <kargl@gcc.gnu.org>
329 * decl.c (char_len_param_value): Unwrap unlong line. If LEN < 0,
330 force it to zero per the Fortran 90, 95, 2003, and 2008 Standards.
331 * resolve.c (gfc_resolve_substring_charlen): Unwrap unlong line.
332 If 'start' is larger than 'end', length of substring is negative,
333 so explicitly set it to zero.
334 (resolve_charlen): Remove -Wsurprising warning. Update comment to
335 reflect that the text is from the F2008 standard.
337 2015-10-16 Richard Biener <rguenther@suse.de>
339 * trans-intrinsic.c (gfc_conv_intrinsic_lib_function): Adjust
341 (gfc_conv_intrinsic_mod): Likewise.
342 (gfc_conv_intrinsic_ctime): Likewise.
343 (gfc_conv_intrinsic_fdate): Likewise.
344 (gfc_conv_intrinsic_ttynam): Likewise.
345 (gfc_conv_intrinsic_minmax_char): Likewise.
346 (gfc_conv_intrinsic_index_scan_verify): Likewise.
347 (gfc_conv_intrinsic_trim): Likewise.
349 2015-10-14 Maxim Ostapenko <m.ostapenko@partner.samsung.com>
351 * parse.c (decode_statement): Initialize M to MATCH_NO.
353 2015-10-13 Jakub Jelinek <jakub@redhat.com>
354 Ilya Verbin <ilya.verbin@intel.com>
356 * f95-lang.c (DEF_FUNCTION_TYPE_9, DEF_FUNCTION_TYPE_10,
357 DEF_FUNCTION_TYPE_11, DEF_FUNCTION_TYPE_VAR_1): Define.
358 * trans-openmp.c (gfc_trans_omp_clauses): Set
359 OMP_CLAUSE_IF_MODIFIER to ERROR_MARK, OMP_CLAUSE_ORDERED_EXPR
361 (gfc_trans_omp_critical): Adjust for addition of clauses.
362 (gfc_trans_omp_ordered): Likewise.
363 * types.def (BT_FN_BOOL_UINT_LONGPTR_LONGPTR_LONGPTR,
364 BT_FN_BOOL_UINT_ULLPTR_ULLPTR_ULLPTR,
365 BT_FN_BOOL_UINT_LONGPTR_LONG_LONGPTR_LONGPTR,
366 BT_FN_BOOL_UINT_ULLPTR_ULL_ULLPTR_ULLPTR,
367 BT_FN_VOID_INT_SIZE_PTR_PTR_PTR_UINT_PTR,
368 BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_UINT_PTR,
369 BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT_PTR_INT,
370 BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_UINT_LONG_INT_LONG_LONG_LONG,
371 BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_UINT_LONG_INT_ULL_ULL_ULL,
372 BT_FN_VOID_LONG_VAR, BT_FN_VOID_ULL_VAR): New.
373 (BT_FN_VOID_INT_PTR_SIZE_PTR_PTR_PTR,
374 BT_FN_VOID_INT_OMPFN_PTR_SIZE_PTR_PTR_PTR,
375 BT_FN_VOID_OMPFN_PTR_OMPCPYFN_LONG_LONG_BOOL_UINT_PTR): Remove.
377 2015-10-07 Andre Vehreschild <vehre@gcc.gnu.org>
380 * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): Handle pointer to and
381 on stack class objects as sizeof parameter.
383 2015-10-06 Louis Krupp <louis.krupp@zoho.com>
385 * resolve.c (gfc_resolve_substring_charlen): For derived type,
386 use typespec of string component when resolving substring length.
388 2015-10-04 Mikael Morin <mikael@gcc.gnu.org>
390 * match.c (gfc_match_common): Remove dead variable old_blank_common.
392 2015-10-04 Mikael Morin <mikael@gcc.gnu.org>
395 * match.c (gfc_match_common): Delay the common_block pointer
396 assignment after error checking.
397 Delay the call to gfc_add_in_common attribute after the handling
399 * resolve.c (resolve_common_vars): Call gfc_add_in_common again.
401 2015-10-04 Mikael Morin <mikael@gcc.gnu.org>
403 * resolve.c (resolve_common_vars): Move access to the common
404 block's head symbol inside the function.
405 (resolve_common_blocks, resolve_types): Update callers.
407 2015-10-01 Louis Krupp <louis.krupp@zoho.com>
412 (store_backend_decl): Create new gfc_charlen instance if requested
413 (get_array_ctor_all_strlen): Call store_backend_decl requesting
415 (trans_array_constructor): Call store_backend_decl requesting
416 new gfc_charlen if get_array_ctor_strlen was called
417 (gfc_add_loop_ss_code): Don't try to convert non-constant length
419 2015-10-01 Steven G. Kargl <kargl@gcc.gnu.org>
422 * decl.c (add_init_expr_to_sym): Numeric constant for character
423 length must be an INTEGER.
425 2015-10-01 Steven G. Kargl <kargl@gcc.gnu.org>
428 * io.c (gfc_resolve_filepos): Check for a UNIT number. Add a nearby
429 missing 'return false'.
431 2015-10-01 Steven G. Kargl <kargl@gcc.gnu.org>
434 * primary.c (gfc_match_structure_constructor): Use a possibly
435 host-associated symtree to prevent ICE.
437 2015-09-28 Paul Thomas <pault@gcc.gnu.org>
441 * decl.c (get_proc_name): Return if statement function is
443 * expr.c (gfc_check_vardef_context): Add error return for
444 derived type expression lacking the derived type itself.
445 * match.c (gfc_match_ptr_fcn_assign): New function.
446 * match.h : Add prototype for gfc_match_ptr_fcn_assign.
447 * parse.c : Add static flag 'in_specification_block'.
448 (decode_statement): If in specification block match a statement
449 function, then, if no error arising from statement function
450 matching, try to match pointer function assignment.
451 (parse_interface): Set 'in_specification_block' on exiting from
453 (parse_spec): Set and then reset 'in_specification_block'.
454 (gfc_parse_file): Set 'in_specification_block'.
455 * resolve.c (get_temp_from_expr): Extend to include functions
456 and array constructors as rvalues..
457 (resolve_ptr_fcn_assign): New function.
458 (gfc_resolve_code): Call it on finding a pointer function as an
459 lvalue. If valid or on error, go back to start of resolve_code.
460 * symbol.c (gfc_add_procedure): Add a sentence to the error to
461 flag up the ambiguity between a statement function and pointer
462 function assignment at the end of the specification block.
464 2015-09-28 Nathan Sidwell <nathan@codesourcery.com>
466 * f95-lang.c (DEF_FUNCTION_TYPE_VAR_6): New.
467 (DEF_FUNCTION_TYPE_VAR_11): Delete.
468 * types.def (DEF_FUNCTION_TYPE_VAR_6): New.
469 (DEF_FUNCTION_TYPE_VAR_11): Delete.
471 2015-09-26 Mikael Morin <mikael@gcc.gnu.org>
474 * trans-expr.c (gfc_trans_assignment_1): Remove the non-constantness
475 condition guarding deep copy.
477 2013-09-26 Paul Thomas <pault@gcc.gnu.org>
480 * resolve.c (resolve_fl_procedure): For module procedures, take
481 the parent module name and the submodule name from the name of
484 2015-09-25 Steven G. Kargl <kargl@gcc.gnu.org>
487 * resolve.c (gfc_resolve_code): Prevent ICE for invalid EXPR_NULL.
489 2015-09-25 Steven G. Kargl <kargl@gcc.gnu.org>
492 * parse.c (match_deferred_characteristics): Remove an assert, which
493 allows an invalid SELECT TYPE selector to be detected.
495 2015-09-25 Manuel López-Ibáñez <manu@gcc.gnu.org>
497 PR pretty-print/67567
498 * resolve.c (resolve_fl_procedure): Work-around when iface->module
501 2015-09-21 Steven G. Kargl <kargl@gcc.gnu.org>
503 * resolve.c (nonscalar_typebound_assign): Fix typos in comment.
505 2015-09-21 Steven G. Kargl <kargl@gcc.gnu.org>
508 * resolve.c (gfc_resolve_code): Check for scalar expression in
511 2015-09-17 Paul Thomas <pault@gcc.gnu.org>
515 * module.c : Add static no_module_procedures.
516 (gfc_match_submodule): Correct memory leakage caused during the
517 freeing of use_lists.
518 (mio_symbol_attribute): Reset above if module procedure is
520 (gfc_dump_module): Set above and exit without writing smod file
522 * gfortran.texi : Add section on submodule support.
524 2015-09-10 Steven G. Kargl <kargl@gcc.gnu.org>
527 * expr.c (gfc_check_init_expr): Do not dereference a NULL pointer.
529 2015-09-10 Paul Thomas <pault@gcc.gnu.org>
532 * module.c (read_module): If a symtree exists and the symbol has
533 been associated in a submodule from a parent (sub)module, attach
534 the symbol to a 'unique symtree' and the new symbol to the
537 2015-09-04 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
539 * intrinsic.h (gfc_simplify_mvbits): Remove.
540 * simplify.c (gfc_simplify_mvbits): Remove.
541 * intrinsic.c (add_subroutines): Remove reference to
544 2015-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
547 * error.c (gfc_clear_pp_buffer): Reset last_location, otherwise
548 caret lines might be skipped when actually giving a diagnostic.
550 2015-08-31 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
553 * trans.c (gfc_call_free): Don't check if pointer is NULL.
554 * trans.h (gfc_call_free): Adjust comment.
556 2015-08-29 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
558 * trans.c (gfc_call_malloc, gfc_allocate_using_malloc,
559 gfc_allocate_using_lib, gfc_allocate_allocatable,
560 gfc_call_realloc): Simplify code.
561 * trans-array.c (gfc_trans_allocate_array_storage,
562 gfc_trans_auto_array_allocation, gfc_conv_array_parameter): Do not
563 convert gfc_call_free() argument.
564 * trans-expr.c (gfc_conv_string_tmp, gfc_conv_procedure_call,
565 fcncall_realloc_result): Likewise.
566 * trans-intrinsic.c (gfc_conv_intrinsic_transfer): Likewise.
568 2015-08-28 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
571 * intrinsic.c (add_functions, add_subroutines): Remove resolution
572 functions for FREE and MALLOC.
573 * intrinsic.h (gfc_resolve_malloc, gfc_resolve_free): Remove.
574 * iresolve.c (gfc_resolve_malloc, gfc_resolve_free): Remove.
575 * trans-intrinsic.c (conv_intrinsic_free,
576 gfc_conv_intrinsic_malloc): New functions.
578 2015-08-24 Louis Krupp <louis.krupp@zoho.com>
582 * decl.c (gfc_match_end): Clean up nested BLOCKs.
583 * parse.c (parse_block_construct): Deal gracefully with cleaned-up
586 2015-08-23 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
589 * config-lang.in: Add libbacktrace to target_libs.
591 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
593 * dependency.c, dependency.h, gfortran.h, io.c, module.c,
594 parse.h, resolve.c, trans-types.h, trans.h: remove useless typedefs.
596 2015-08-16 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
599 * trans-intrinsic.c (gfc_build_intrinsic_lib_fndecls): Add decl
600 for quadruple precision BUILT_IN_SQRT.
602 2015-08-16 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
604 * trans-intrinsic.c (conv_intrinsic_ieee_is_negative): Use type
605 generic BUILT_IN_SIGNBIT.
606 (conv_intrinsic_ieee_copy_sign): Likewise.
607 * f95-lang.c (gfc_init_builtin_functions): Add BUILT_IN_ISINF,
608 BUILT_IN_ISINF_SIGN, BUILT_IN_SIGNBIT, BUILT_IN_ISLESS,
609 BUILT_IN_ISLESSGREATER, BUILT_IN_ISGREATER. Remove non-type generic
610 variants of BUILT_IN_SIGNBIT.
611 * mathbuiltins.def: Remove SIGNBIT.
613 2015-08-16 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
616 * gfortran.texi: New section "File operations on symbolic links".
618 2015-08-08 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
621 * gfortranspec.c (lang_specific_driver): Adjust --version output.
623 2015-08-08 Bud Davis <jmdavis@link.com>
624 Mikael Morin <mikael@gcc.gnu.org>
627 * symbol.c (gfc_restore_last_undo_checkpoint): Delete a common block
628 symbol if it was put in the list.
630 2015-08-07 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
633 * expr.c (gfc_check_init_expr): Allow some IEEE functions in
634 constant expressions.
635 (external_spec_function): Allow some IEEE functions in specification
637 * simplify.c (gfc_simplify_ieee_selected_real_kind): Remove.
638 (simplify_ieee_selected_real_kind, simplify_ieee_support,
639 matches_ieee_function_name, gfc_simplify_ieee_functions): New
641 * gfortran.h (gfc_simplify_ieee_selected_real_kind): Remove
643 (gfc_simplify_ieee_functions): Add prototype.
645 2015-08-06 Mikael Morin <mikael@gcc.gnu.org>
647 * trans.h (gfc_trans_scalar_assign): Remove fourth argument.
648 * trans-expr.c (gfc_trans_scalar_assign): Merge fourth into sixth
650 (gfc_conv_subref_array_arg, gfc_trans_subarray_assign,
651 gfc_trans_subcomponent_assign, gfc_trans_assignment_1): Update callers.
652 * trans-array.c (gfc_conv_expr_descriptor): Ditto.
653 * trans-stmt.c (forall_make_variable_temp,
654 generate_loop_for_temp_to_lhs, generate_loop_for_rhs_to_temp,
655 gfc_trans_where_assign, gfc_trans_where_3): Ditto.
657 2015-08-05 Paul Thomas <pault@gcc.gnu.org>
660 * module.c (check_access): Return true if new static flag
661 'dump_smod' is true..
662 (gfc_dump_module): Rename original 'dump_module' and call from
663 new version. Use 'dump_smod' rather than the stack state to
664 determine if a submodule is being processed. The new version of
665 this procedure sets 'dump_smod' depending on the stack state and
666 then writes both the mod and smod files if a module is being
667 processed or just the smod for a submodule.
668 (gfc_use_module): Eliminate the check for module_name and
669 submodule_name being the same.
670 * trans-decl.c (gfc_finish_var_decl, gfc_build_qualified_array,
671 get_proc_pointer_decl): Set TREE_PUBLIC unconditionally and use
672 the conditions to set DECL_VISIBILITY as hidden and to set as
673 true DECL_VISIBILITY_SPECIFIED.
675 2015-08-04 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
678 * simplify.c (gfc_simplify_ieee_selected_real_kind): Extend IEEE
679 support to all real kinds.
681 2015-08-03 Steven G. Kargl <kargl@gcc.gnu.org>
684 * trans-expr.c (gfc_conv_procedure_call): Avoid NULL pointer reference
686 2015-08-03 Mikael Morin <mikael@gcc.gnu.org>
689 * class.c (generate_finalization_wrapper): Set finalization
690 procedure symbol's always_explicit attribute.
692 2015-08-01 Paul Thomas <pault@gcc.gnu.org>
695 * trans-intrinsic.c (gfc_conv_associated): Add the pre and post
696 blocks for the second argument to se.
698 2015-07-27 Thomas Schwinge <thomas@codesourcery.com>
700 * parse.c (parse_oacc_structured_block): Fix logic error.
701 Reported by Mikael Morin <mikael.morin@sfr.fr>.
703 2015-07-24 Mikael Morin <mikael@gcc.gnu.org>
706 * trans-expr.c (gfc_trans_assignment_1): Put component deallocation
707 code at the beginning of the block.
709 2015-07-22 Mikael Morin <mikael@gcc.gnu.org>
713 * trans-array.c (gfc_get_proc_ifc_for_expr): Use esym as procedure
716 2015-07-17 Paul Thomas <pault@gcc.gnu.org>
719 * decl.c (gfc_match_end): Pick out declared submodule name from
720 the composite identifier.
721 * gfortran.h : Add 'submodule_name' to gfc_use_list structure.
722 * module.c (gfc_match_submodule): Define submodule_name and add
723 static 'submodule_name'.
724 (gfc_match_submodule): Build up submodule filenames, using '@'
725 as a delimiter. Store the output filename in 'submodule_name'.
726 Similarly, the submodule identifier is built using '.' as an
728 (gfc_dump_module): If current state is COMP_SUBMODULE, write
729 to file 'submodule_name', using SUBMODULE_EXTENSION.
730 (gfc_use_module): Similarly, use the 'submodule_name' field in
731 the gfc_use_list structure and SUBMODULE_EXTENSION to read the
732 implicitly used submodule files.
734 2015-07-17 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
736 * trans-intrinsic.c (conv_co_collective): Remove redundant address
737 operator in the generated code.
739 2015-07-17 Andre Vehreschild <vehre@gcc.gnu.org>
742 * trans-expr.c (alloc_scalar_allocatable_for_subcomponent_assignment):
743 Compute the size to allocate for class and derived type objects
745 (gfc_trans_subcomponent_assign): Only allocate memory for a
746 component when the object to assign is not an allocatable class
747 object (the memory is already present for allocatable class objects).
748 Furthermore use copy_class_to_class for assigning the rhs to the
749 component (may happen for dummy class objects on the rhs).
751 2015-07-17 Mikael Morin <mikael@gcc.gnu.org>
752 Dominique d'Humieres <dominiq@lps.ens.fr>
755 * trans-array.c (gfc_conv_array_parameter): Guard allocatable
756 component deallocation code generation with descriptorless
757 calling convention flag.
758 * trans-expr.c (gfc_conv_expr_reference): Remove allocatable
759 component deallocation code generation from revision 212329.
760 (expr_may_alias_variables): New function.
761 (gfc_conv_procedure_call): New boolean elemental_proc to factor
762 check for procedure elemental-ness. Rename boolean f to nodesc_arg
763 and declare it in the outer scope. Use expr_may_alias_variables,
764 elemental_proc and nodesc_arg to decide whether generate allocatable
765 component deallocation code.
766 (gfc_trans_subarray_assign): Set deep copy flag.
768 2015-07-16 Steven G. Kargl <kargl@gcc.gnu.org>
772 * io.c (is_char_type): Call gfc_resolve_expr ().
773 (match_open_element, match_dt_element, match_inquire_element): Fix
776 2015-07-15 Andrew MacLeod <amacleod@redhat.com>
778 * trans-types.c: Remove multiline #include comment.
780 2015-07-14 Steven G. Kargl <kargl@gcc.gnu.org>
782 * simplify.c (gfc_simplify_floor): Set precision of temporary to
785 2015-07-13 Andre Vehreschild <vehre@gcc.gnu.org>
788 * class.c (find_intrinsic_vtab): Put/Search vtabs for intrinsic
789 types in the top-level namespace.
791 2015-07-12 Aldy Hernandez <aldyh@redhat.com>
793 * trans-stmt.c: Fix double word typos.
795 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
797 * arith.c: Adjust includes for flags.h changes.
803 * frontend-passes.c: Likewise.
804 * interface.c: Likewise.
805 * intrinsic.c: Likewise.
808 * openmp.c: Likewise.
810 * primary.c: Likewise.
811 * resolve.c: Likewise.
812 * scanner.c: Likewise.
813 * simplify.c: Likewise.
814 * symbol.c: Likewise.
815 * target-memory.c: Likewise.
817 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
819 * convert.c: Adjust includes.
822 * f95-lang.c: Likewise.
823 * iresolve.c: Likewise.
825 * module.c: Likewise.
826 * options.c: Likewise.
827 * target-memory.c: Likewise.
828 * trans-array.c: Likewise.
829 * trans-common.c: Likewise.
830 * trans-const.c: Likewise.
831 * trans-decl.c: Likewise.
832 * trans-expr.c: Likewise.
833 * trans-intrinsic.c: Likewise.
834 * trans-io.c: Likewise.
835 * trans-openmp.c: Likewise.
836 * trans-stmt.c: Likewise.
837 * trans-types.c: Likewise.
840 2015-07-07 Andre Vehreschild <vehre@gmx.de>
843 * trans-array.c (gfc_conv_expr_descriptor): Ensure array descriptor
844 is one-based for non-full array refs. Correct the offset when a
847 2015-07-06 Steven G. Kargl <kargl@gcc.gnu.org>
849 * io.c (check_char_variable): New function.
850 (match_open_element, match_close_element, match_file_element,
851 match_dt_element, match_inquire_element, match_wait_element): Use it.
853 2015-07-06 Andre Vehreschild <vehre@gmx.de>
856 * resolve.c (resolve_symbol): Non-private functions in modules
857 with allocatable or pointer components are marked referenced
858 now. Furthermore is the default init especially for those
859 components now done in gfc_conf_procedure_call preventing
861 * trans-decl.c (gfc_generate_function_code): Generate a fake
862 result decl for functions returning an object with allocatable
863 components and initialize them.
864 * trans-expr.c (gfc_conv_procedure_call): For value typed trees
865 use the tree without indirect ref. And for non-decl trees
866 add a temporary variable to prevent evaluating the tree
867 multiple times (prevent multiple function evaluations).
868 * trans.h: Made gfc_trans_structure_assign () protoype
869 available, which is now needed by trans-decl.c:gfc_generate_
870 function_code(), too.
872 2015-07-04 Steven G. Kargl <kargl@gcc.gnu.org>
875 * io.c (is_char_type): New function to test for BT_CHARACTER
876 (gfc_match_open, gfc_match_close, match_dt_element): Use it.
878 2015-07-02 David Edelsohn <dje.gcc@gmail.com>
880 * trans-common.c: Include <map> after system.h.
882 2015-07-02 Paul Thomas <pault@gcc.gnu.org>
885 * decl.c (get_proc_name): Make a partially populated interface
886 symbol to carry the characteristics of a module procedure and
888 (variable_decl): Declarations of dummies or results in the
889 abreviated form of module procedure is an error.
890 (gfc_match_import): IMPORT is not permitted in the interface
891 declaration of module procedures.
892 (match_attr_spec): Submodule variables have implicit save
893 attribute for F2008 onwards.
894 (gfc_match_prefix): Add 'module' as the a prefix and set the
895 module_procedure attribute.
896 (gfc_match_formal_arglist): For a module procedure keep the
897 interface formal_arglist from the interface, match new the
898 formal arguments and then compare the number and names of each.
899 (gfc_match_procedure): Add case COMP_SUBMODULE.
900 (gfc_match_function_decl, gfc_match_subroutine_decl): Set the
901 module_procedure attribute.
902 (gfc_match_entry, gfc_match_end): Add case COMP_SUBMODULE. If
903 attr abr_modproc_decl is set, switch the message accordingly
904 for subroutines and functions.
905 (gfc_match_submod_proc): New function to match the abbreviated
906 style of submodule declaration.
907 * gfortran.h : Add ST_SUBMODULE and ST_END_SUBMODULE. Add the
908 attribute bits 'used_in_submodule' and 'module_procedure'. Add
909 the bit field 'abr_modproc_decl' to gfc_symbol. Add prototypes
910 for 'gfc_copy_dummy_sym', 'gfc_check_dummy_characteristics' and
911 'gfc_check_result_characteristics'.
912 * interface.c : Add the prefix 'gfc_' to the names of functions
913 'check_dummy(result)_characteristics' and all their references.
914 * match.h : Add prototype for 'gfc_match_submod_proc' and
915 'gfc_match_submodule'.
916 (check_sym_interfaces): A module procedure is not an error in
917 a module procedure statment in a generic interface.
918 * module.c (gfc_match_submodule): New function. Add handling
919 for the 'module_procedure' attribute bit.
920 (gfc_use_module): Make sure that a submodule cannot use itself.
921 * parse.c (decode_statement): Set attr has_'import_set' for
922 the interface declaration of module procedures. Handle a match
923 occurring in 'gfc_match_submod_proc' and a match for
925 (gfc_enclosing_unit): Include the state COMP_SUBMODULE.
926 (gfc_ascii_statement): Add END SUBMODULE.
927 (accept_statement): Add ST_SUBMODULE.
928 (parse_spec): Disallow statement functions in a submodule
930 (parse_contained): Add ST_END_SUBMODULE and COMP_SUBMODULE
932 (get_modproc_result): Copy the result symbol of the interface.
933 (parse_progunit): Call it.
934 (set_syms_host_assoc): Make symbols from the ancestor module
935 and submodules use associated, as required by the standard and
936 set all private components public. Module procedures 'external'
937 attribute bit is reset and the 'used_in_submodule' bit is set.
938 (parse_module): If this is a submodule, use the ancestor module
939 and submodules. Traverse the namespace, calling
940 'set_syms_host_assoc'. Add ST_END_SUBMODULE and COMP_SUBMODULE.
941 * parse.h : Add COMP_SUBMODULE.
942 * primary.c (match_variable): Add COMP_SUBMODULE.
943 * resolve.c (compare_fsyms): New function to compare the dummy
944 characteristics of a module procedure with its interface.
945 (resolve_fl_procedure): Compare the procedure, result and dummy
946 characteristics of a module_procedure with its interface, using
947 'compare_fsyms' for the dummy arguments.
948 * symbol.c (gfc_add_procedure): Suppress the check for existing
949 procedures in the case of a module procedure.
950 (gfc_add_explicit_interface): Skip checks that must fail for
952 (gfc_add_type): Allow a new type to be added to module
953 procedures, their results or their dummy arguments.
954 (gfc_copy_dummy_sym): New function to generate new dummy args
955 and copy the characteristics from the interface.
956 * trans-decl.c (gfc_sym_mangled_function_id): Module procedures
957 must always have their names mangled as if they are symbols
958 coming from a declaration in a module.
959 (gfc_get_symbol_decl): Add 'used_in_submodule' to the assert.
960 (gfc_finish_var_decl): Symbols with the 'used_in_submodule' bit
961 set are set DECL_EXTERNAL as if they were use associated.
963 2015-07-02 Steven G. Kargl <kargl@gcc.gnu.org>
966 * match.c (gfc_match_name): Special case unary minus and plus.
968 2015-07-02 Steven G. Kargl <kargl@gcc.gnu.org>
971 * primary.c (match_sym_complex_part): Do not dereference NULL pointer.
973 2015-07-01 Thomas Koenig <tkoenig@gcc.gnu.org>
975 * arith.c (gfc_arith_divide): With -Winteger-division,
976 warn about contant integer division if there is a non-zero
978 * invoke.texi: Document -Winteger-division.
979 * lang.opt: Add -Winteger-division.
981 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
983 * f95-lang.c: Remove ipa-ref.h and plugin-api.h from include list.
984 * trans-decl.c: Likewise.
986 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
988 * trans-decl.c (module_hasher): Likewise.
989 * trans.h (module_decl_hasher): Likewise.
991 2015-06-24 Manuel López-Ibáñez <manu@gcc.gnu.org>
994 * error.c (gfc_warning_check): Restore the default output_buffer
995 before calling diagnostic_action_after_output.
996 (gfc_error_check): Likewise.
997 (gfc_diagnostics_init): Add comment.
999 2015-06-23 Andre Vehreschild <vehre@gmx.de>
1002 * parse.c (parse_associate): Figure the rank and as of a
1003 class array in an associate early.
1004 * primary.c (gfc_match_varspec): Prevent setting the
1005 dimension attribute on the sym for classes.
1006 * resolve.c (resolve_variable): Correct the component
1007 ref's type for associated variables. Add a full array ref
1008 when class array's are associated.
1009 (resolve_assoc_var): Correct the type of the symbol,
1010 when in the associate the expression's rank becomes scalar.
1011 * trans-expr.c (gfc_conv_variable): Indirect ref needed for
1012 allocatable associated objects.
1014 2015-06-19 Mikael Morin <mikael@gcc.gnu.org>
1017 * resolve.c (resolve_global_procedure): Don't save and restore
1018 OpenMP state around the call to gfc_resolve.
1019 (gfc_resolve): Save OpenMP state on entry and restore it on return.
1021 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
1023 * convert.c: Do not include input.h, line-map.h or is-a.h.
1026 * f95-lang.c: Likewise.
1027 * gfortran.h: Likewise.
1028 * iresolve.c: Likewise.
1029 * match.c: Likewise.
1030 * module.c: Likewise.
1031 * options.c: Likewise.
1032 * target-memory.c: Likewise.
1033 * trans-array.c: Likewise.
1034 * trans-common.c: Likewise.
1035 * trans-const.c: Likewise.
1036 * trans-decl.c: Likewise.
1037 * trans-expr.c: Likewise.
1038 * trans-intrinsic.c: Likewise.
1039 * trans-io.c: Likewise.
1040 * trans-openmp.c: Likewise.
1041 * trans-stmt.c: Likewise.
1042 * trans-types.c: Likewise.
1043 * trans.c: Likewise.
1045 2015-06-15 Andre Vehreschild <vehre@gmx.de>
1050 * gfortran.h: Extend gfc_code.ext.alloc to carry a
1051 flag indicating that the array specification has to be
1053 * resolve.c (resolve_allocate_expr): Add F2008 notify
1054 and flag indicating source driven array spec.
1055 (resolve_allocate_deallocate): Check for source driven
1056 array spec, when array to allocate has no explicit
1058 * trans-array.c (gfc_array_init_size): Get lower and
1059 upper bound from a tree array descriptor, except when
1060 the source expression is an array-constructor which is
1061 fixed to be one-based.
1062 (retrieve_last_ref): Extracted from gfc_array_allocate().
1063 (gfc_array_allocate): Enable allocate(array, source=
1064 array_expression) as specified by F2008:C633.
1065 (gfc_conv_expr_descriptor): Add class tree expression
1066 into the saved descriptor for class arrays.
1067 * trans-array.h: Add temporary array descriptor to
1068 gfc_array_allocate ().
1069 * trans-expr.c (gfc_conv_procedure_call): Special handling
1070 for _copy() routine translation, that comes without an
1071 interface. Third and fourth argument are now passed by value.
1072 * trans-stmt.c (gfc_trans_allocate): Get expr3 array
1073 descriptor for temporary arrays to allow allocate(array,
1074 source = array_expression) for array without array
1077 2015-06-14 Thomas Koenig <tkoenig@gcc.gnu.org>
1079 * intrinsic.texi: Change \leq to < in descrition of imaginary
1080 part in argument to log.
1082 2015-06-11 Paul Thomas <pault@gcc.gnu.org>
1085 * trans-expr.c (gfc_conv_procedure_call): Allocatable scalar
1086 function results must be freed and nullified after use. Create
1087 a temporary to hold the result to prevent duplicate calls.
1088 * trans-stmt.c (gfc_trans_allocate): Rename temporary variable
1089 as 'source'. Deallocate allocatable components of non-variable
1092 2015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
1094 * f95-lang.c (gfc_create_decls): Register the main translation unit
1095 through the new debug hook.
1097 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
1099 * convert.c : Adjust include files.
1101 * decl.c : Likewise.
1102 * f95-lang.c : Likewise.
1103 * gfortran.h : Likewise.
1104 * iresolve.c : Likewise.
1105 * match.c : Likewise.
1106 * module.c : Likewise.
1107 * openmp.c : Likewise.
1108 * options.c : Likewise.
1109 * target-memory.c : Likewise.
1110 * trans-array.c : Likewise.
1111 * trans-common.c : Likewise.
1112 * trans-const.c : Likewise.
1113 * trans-decl.c : Likewise.
1114 * trans-expr.c : Likewise.
1115 * trans-intrinsic.c : Likewise.
1116 * trans-io.c : Likewise.
1117 * trans-openmp.c : Likewise.
1118 * trans-stmt.c : Likewise.
1119 * trans-types.c : Likewise.
1120 * trans.c : Likewise.
1122 2015-06-08 Steven G. Kargl <kargl@gcc.gnu.org>
1125 * match.c (gfc_match_type_is, gfc_match_class_is): Check if the
1126 return type spec or derived type spec is validate.
1128 2015-06-06 Thomas Koenig <tkoenig@netcologne.de>
1131 * arith.c (eval_intrinsic_op): Set warn flag for
1132 gfc_type_convert_binary if -Wconversion or -Wconversion-extra
1134 (wprecision_real_real): New function.
1135 (wprecision_int_real): New function.
1136 (gfc_int2int): If -fno-range-check and -Wconversion are specified
1137 and it is a narrowing conversion, warn.
1138 (gfc_int2real): If there is a change in value for the conversion,
1140 (gfc_int2complex): Likewise.
1141 (gfc_real2int): If there is a fractional part to the real number,
1142 warn with -Wconversion, otherwise warn with -Wconversion-extra.
1143 (gfc_real2real): Emit warning if the constant was changed by
1144 conversion with either -Wconversion or -Wconversion-extra. With
1145 -Wconversion-extra, warn if no warning was issued earlier.
1146 (gfc_real2complex): Likewise.
1147 (gfc_complex2int): For -Wconversion or -Wconversion-extra, if
1148 there was an imaginary part, warn; otherwise, warn for change in
1149 value. Warn with -Wconversion-extra if no other warning was
1151 (gfc_complex2real): For -Wconversion or -Wconversion-extra, if
1152 there was an imaginary part, warn; otherwise, warn for change in
1153 value. Warn with -Wconversion-extra if no other warning was
1155 (gfc_complex2complex): For -Wconversion, warn if the value of
1156 either the real or the imaginary part was changed. Warn for
1157 -Wconversion-extra if no prior warning was issued.
1158 * expr.c (gfc_check_assign): Remove check for change in value.
1159 * primary.c (match_real_constant): For -Wconversion-extra, check
1160 against a number in which the last non-zero digit has been
1161 replaced with a zero. If the number compares equal, warn.
1162 * intrinsic.c (gfc_convert_type_warn): Do not warn about constant
1165 2015-06-05 Steven G. Kargl <kargl@gcc.gnu.org>
1168 * resolve.c (apply_default_init_local): Do not dereference a NULL
1171 2015-06-05 Thomas Koenig <tkoenig@gcc.gnu.org>
1174 * frontend-passes.c (combine_array_constructor): Return early if
1175 inside a FORALL loop.
1177 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
1179 * f95-lang.c (gfc_write_global_declarations): Remove.
1180 (LANG_HOOKS_WRITE_GLOBALS): Remove.
1181 (gfc_write_global_declarations): Move code from here to...
1182 (gfc_be_parse_file): ...here.
1183 Call global_decl_processing.
1184 * trans-decl.c (gfc_emit_parameter_debug_info): Rename global_decl
1185 to early_global_decl.
1187 2015-06-05 Russell Whitesides <russelldub@gmail.com>
1188 Steven G. Kargl <kargl@gcc.gnu.org>
1193 * module.c (load_equiv): Add check for loading duplicate EQUIVALENCEs
1194 from different modules. Eliminate the pruning of unused
1197 2015-06-04 Thomas Koenig <tkoenig@netcologne.de>
1200 * iresolve.c (gfc_resolve_adjustl): If string has a charlen,
1201 copy it to the function.
1202 (gfc_resolve_adjustr): Likewise.
1204 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
1206 * convert.c: Adjust includes for restructured coretypes.h.
1209 * f95-lang.c: Likewise.
1210 * iresolve.c: Likewise.
1211 * match.c: Likewise.
1212 * module.c: Likewise.
1213 * options.c: Likewise.
1214 * target-memory.c: Likewise.
1215 * trans-array.c: Likewise.
1216 * trans-common.c: Likewise.
1217 * trans-const.c: Likewise.
1218 * trans-decl.c: Likewise.
1219 * trans-expr.c: Likewise.
1220 * trans-intrinsic.c: Likewise.
1221 * trans-io.c: Likewise.
1222 * trans-openmp.c: Likewise.
1223 * trans-stmt.c: Likewise.
1224 * trans-types.c: Likewise.
1225 * trans.c: Likewise.
1227 2015-06-02 Steven G. Kargl <kargl@gcc.gnu.org>
1230 * simplify.c (gfc_simplify_reshape): Convert assert into returning
1231 NULL, which triggers an error condition.
1233 2015-05-27 Andre Vehreschild <vehre@gmx.de>
1236 * trans-stmt.c (gfc_trans_allocate): Add missing location
1237 information for e3rhs.
1239 2015-05-26 Paul Thomas <pault@gcc.gnu.org>
1242 * trans-array.c (gfc_conv_array_parameter): Ensure that all
1243 non-variable arrays with allocatable components have the
1244 components deallocated after the procedure call.
1246 2015-05-24 Mikael Morin <mikael@gcc.gnu.org>
1249 * resolve.c (resolve_actual_arglist): Don't throw an error
1250 if the argument with procedure pointer component is not a variable.
1252 2015-05-24 Manuel López-Ibáñez <manu@gcc.gnu.org>
1255 * gfortran.h (struct gfc_error_buf): Rename as
1256 gfc_error_buffer. Move closer to push, pop and free
1257 methods. Reimplement using an output_buffer.
1258 * error.c (errors, warnings, warning_buffer, cur_error_buffer):
1259 Delete everywhere in this file.
1260 (error_char): Delete all contents.
1261 (gfc_increment_error_count): Delete.
1262 (gfc_error_now): Update comment. Set error_buffer.flag.
1263 (gfc_warning_check): Do not handle warning_buffer.
1264 (gfc_error_1): Delete.
1265 (gfc_error_now_1): Delete.
1266 (gfc_error_check): Simplify.
1267 (gfc_move_error_buffer_from_to): Renamed from
1268 gfc_move_output_buffer_from_to.
1269 (gfc_push_error): Handle only gfc_error_buffer.
1270 (gfc_pop_error): Likewise.
1271 (gfc_free_error): Likewise.
1272 (gfc_get_errors): Remove warnings and errors.
1273 (gfc_diagnostics_init): Use static error_buffer.
1274 (gfc_error_1,gfc_error_now_1): Delete declarations.
1275 * symbol.c, decl.c, trans-common.c, data.c, expr.c, expr.c,
1276 frontend-passes.c, resolve.c, match.c, parse.c: Replace
1277 gfc_error_1 with gfc_error and gfc_error_now_1 with gfc_error_1
1279 * f95-lang.c (gfc_be_parse_file): Do not update errorcount and
1281 * primary.c (match_complex_constant): Replace gfc_error_buf and
1282 output_buffer with gfc_error_buffer.
1284 2015-05-22 Jim Wilson <jim.wilson@linaro.org>
1286 * Make-lang.in (check_gfortran_parallelize): Update comment.
1288 2015-05-21 Thomas Koenig <tkoenig@gcc.gnu.org>
1291 * frontend-passes.c (check_conjg_variable): New function.
1292 (inline_matmul_assign): Use it to keep track of conjugated
1295 2015-05-20 Andre Vehreschild <vehre@gmx.de>
1298 * trans-stmt.c (gfc_trans_allocate): Always retrieve the
1299 descriptor or a reference to a source= expression for
1300 arrays and non-arrays, respectively. Use a temporary
1301 symbol and gfc_trans_assignment for all source=
1302 assignments to allocated objects besides for class and
1305 2015-05-19 Jakub Jelinek <jakub@redhat.com>
1308 * trans-openmp.c (gfc_trans_omp_teams): Set OMP_TEAMS_COMBINED for
1309 combined constructs.
1310 (gfc_trans_omp_target): Make sure BIND_EXPR has non-NULL
1313 2015-05-19 David Malcolm <dmalcolm@redhat.com>
1315 * cpp.c (maybe_print_line): Strengthen local "map" from
1316 const line_map * to const line_map_ordinary *.
1317 (cb_file_change): Likewise for param "map" and local "from".
1318 (cb_line_change): Likewise for local "map".
1320 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
1322 * interface.c (compare_actual_formal): Use std::swap instead of
1324 * trans-array.c (gfc_trans_scalarized_loop_end): Likewise.
1325 * trans-intrinsic.c (walk_inline_intrinsic_transpose): Likewise.
1327 2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
1330 * interface.c(gfc_match_end_interface): Enforce F2008 C1202 (R1201).
1331 * match.c(gfc_op2string): Return 'none' for INTRINSIC_NONE.
1333 2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
1336 * decl.c(gfc_match_generic): Detected a malformed GENERIC statement.
1338 2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
1341 * gfortran.dg/storage_size_6.f90: New tests.
1343 2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
1346 * gfortran.dg/storage_size_6.f90: New tests.
1348 2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
1351 * decl.c(gfc_match_entry): Change a gfc_internal_error() into
1354 2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
1357 * gfortran.dg/storage_size_6.f90: New tests.
1359 2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
1362 * parse.c(verify_st_order): Replace a gfc_internal_error with your
1365 2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
1368 * io.c (match_filepos): Check for incomplete/mangled REWIND, FLUSH,
1369 BACKSPACE, and ENDFILE statements
1371 2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
1374 * symbol.c(check_conflict): Check for a conflict between a dummy
1375 argument and an internal procedure name.
1377 2015-05-16 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1380 * io.c (format_lex): Change to NONSTRING when checking for
1381 possible doubled quote.
1382 * scanner.c (gfc_next_char_literal): Revert change from 64506
1383 and add a check for quotes and return.
1385 2015-05-16 Thomas Koenig <tkoenig@gcc.gnu.org>
1388 * expr.c (is_parent_of_current_ns): New function.
1389 (check_restricted): Use it.
1391 2015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
1395 Replace all calls to gfc_notify_std_1 with gfc_notify_std and
1396 gfc_warning_1 with gfc_warning.
1397 * decl.c (gfc_verify_c_interop_param): Here.
1398 * resolve.c (resolve_branch): Here.
1399 (resolve_fl_derived): Here.
1400 * dependency.c (gfc_check_argument_var_dependency):
1401 * scanner.c (preprocessor_line): Use gfc_warning_now_at. Fix line
1402 counter and locations before and after warning.
1403 * gfortran.h (gfc_warning_1, gfc_warning_now_1, gfc_notify_std_1):
1405 (gfc_warning_now_at): Declare.
1406 * error.c (gfc_warning_1): Delete.
1407 (gfc_notify_std_1): Delete.
1408 (gfc_warning_now_1): Delete.
1409 (gfc_format_decoder): Handle two locations.
1410 (gfc_diagnostic_build_prefix): Rename as
1411 gfc_diagnostic_build_kind_prefix.
1412 (gfc_diagnostic_build_locus_prefix): Take an expanded_location
1413 instead of diagnostic_info.
1414 (gfc_diagnostic_build_locus_prefix): Add overload that takes two
1416 (gfc_diagnostic_starter): Handle two locations.
1417 (gfc_warning_now_at): New.
1418 (gfc_diagnostics_init): Initialize caret_chars array.
1419 (gfc_diagnostics_finish): Reset caret_chars array to default.
1421 2015-05-16 Mikael Morin <mikael@gcc.gnu.org>
1422 Paul Thomas <pault@gcc.gnu.org>
1425 * trans-expr.c (gfc_trans_subcomponent_assign): Always assign
1426 the expression component to the destination. In addition, if
1427 the component has allocatable components, copy them and
1428 deallocate those of the expression, if it is not a variable.
1429 The expression is fixed if not a variable to prevent multiple
1432 2015-05-12 Thomas Koenig <tkoenig@gcc.gnu.org>
1435 * frontend-passes.c (has_dimen_vector_ref): New function.
1436 (inline_matmul_assign): Use it to return early in case
1437 of unhandled vector subscripts.
1439 2015-05-12 Thomas Koenig <tkoenig@gcc.gnu.org>
1443 * gfortran.h (gfc_array_spec): Add field resolved.
1444 * array.c (gfc_resolve_array_spec): Resolve array spec
1447 2015-05-11 Mikael Morin <mikael@gcc.gnu.org>
1450 * simplify.c (simplify_bound): Fix assert to accept subobject arrays.
1452 2015-05-10 Thomas Koenig <tkoenig@gcc.gnu.org>
1455 * frontend-passes.c (scalarized_expr): Set correct dimension and
1456 shape for the expression to be passed to lbound. Remove trailing
1457 references after array refrence.
1458 (inline_matmul_assign): Remove gfc_copy_expr from calls
1459 to scalarized_expr().
1461 2015-05-10 Mikael Morin <mikael@gcc.gnu.org>
1463 * simplify.c (simplify_bound_dim): Don't check for emptyness
1464 in the case of cobound simplification. Factor lower/upper
1465 bound differenciation before the actual simplification.
1466 (simplify_bound): Remove assumed shape specific simplification.
1467 Don't give up early for the lbound of an assumed shape.
1469 2015-05-09 Mikael Morin <mikael@gcc.gnu.org>
1472 * trans-array.h (gfc_scalar_elemental_arg_saved_as_reference):
1474 * trans-array.c (gfc_scalar_elemental_arg_saved_as_reference):
1476 (gfc_add_loop_ss_code): Use gfc_scalar_elemental_arg_saved_as_reference
1478 (gfc_walk_elemental_function_args): Set the dummy_arg field.
1479 * trans.h (gfc_ss_info): New subfield dummy_arg.
1480 * trans-expr.c (gfc_conv_procedure_call): Revert the change
1482 (gfc_conv_expr): Use gfc_scalar_elemental_arg_saved_as_reference
1485 2015-05-08 Mikael Morin <mikael@gcc.gnu.org>
1487 * trans-array.c (gfc_walk_elemental_function_args):
1488 Don't skip the advance to the next dummy argument when skipping
1489 absent optional args.
1491 2015-05-05 David Malcolm <dmalcolm@redhat.com>
1493 * expr.c (check_inquiry): Fix indentation so that it reflects the
1495 * interface.c (compare_parameter): Likewise.
1496 * parse.c (parse_oacc_structured_block): Likewise.
1497 * target-memory.c (expr_to_char): Likewise.
1498 * trans-types.c (gfc_init_kinds): Likewise.
1500 2015-05-02 Steven G. Kargl <kargl@gcc.gnu.org>
1503 * invoke.texi: Remove 'no-' in '-fno-fixed-form'
1505 2015-05-01 Mikael Morin <mikael@gcc.gnu.org>
1507 * simplify.c (simplify_bound_dim): Tighten the check for array fullness
1508 by also checking for absence of subreference.
1509 (simplify_bound): Don't skip simplification if the array
1511 (simplify_cobound): Same.
1513 2015-04-30 Thomas Koenig <tkoenig@gcc.gnu.org>
1516 * simplify.c (simplify_bound): Get constant lower bounds of one
1517 from array spec for assumed and explicit shape shape arrays if
1518 the lower bounds are indeed one.
1520 2015-04-30 David Malcolm <dmalcolm@redhat.com>
1522 * options.c (gfc_init_options): Remove spurious second
1524 * trans-stmt.c (gfc_trans_allocate): Likewise.
1526 2015-04-28 Andre Vehreschild <vehre@gmx.de>
1528 * interface.c (gfc_compare_types): Check for unlimited
1529 polymorphism flag in the correct position indepent of the _data
1530 component being present or not. This prevents a segfault, when
1531 the _data component is not present.
1532 * symbol.c (gfc_type_compatible): Same.
1534 2015-04-27 Jim Wilson <jim.wilson@linaro.org>
1536 * Make-lang.in (fortran.mostlyclean): Remove gfortran and
1539 2015-04-27 Andre Vehreschild <vehre@gmx.de>
1543 * trans-array.c (duplicate_allocatable): Fixed deep copy of
1544 allocatable components, which are liable for copy only, when
1546 (gfc_duplicate_allocatable): Add deep-copy code into if
1547 component allocated block. Needed interface change for that.
1548 (gfc_copy_allocatable_data): Supplying NULL_TREE for code to
1549 add into if-block for checking whether a component was
1551 (gfc_duplicate_allocatable_nocopy): Likewise.
1552 (structure_alloc_comps): Likewise.
1553 * trans-array.h: Likewise.
1554 * trans-expr.c (gfc_trans_alloc_subarray_assign): Likewise.
1555 * trans-openmp.c (gfc_walk_alloc_comps): Likewise.
1557 2015-04-23 Andre Vehreschild <vehre@gmx.de>
1560 * expr.c (gfc_lval_expr_from_sym): Code to select the regular
1561 or class array added.
1562 * gfortran.h: Add IS_CLASS_ARRAY macro.
1563 * trans-array.c (gfc_add_loop_ss_code): Treat class objects
1564 to be referenced always.
1565 (build_class_array_ref): Adapt retrieval of array descriptor.
1566 (build_array_ref): Likewise.
1567 (gfc_conv_array_ref): Hand the vptr or the descriptor to
1568 build_array_ref depending whether the sym is class or not.
1569 (gfc_trans_array_cobounds): Select correct gfc_array_spec for
1570 regular and class arrays.
1571 (gfc_trans_array_bounds): Likewise.
1572 (gfc_trans_dummy_array_bias): Likewise.
1573 (gfc_get_dataptr_offset): Correcting call of build_array_ref.
1574 (gfc_conv_expr_descriptor): Set the array's offset to -1 when
1575 lbound in inner most dim is 1 and symbol non-pointer/assoc.
1576 * trans-decl.c (gfc_build_qualified_array): Select correct
1577 gfc_array_spec for regular and class arrays.
1578 (gfc_build_dummy_array_decl): Likewise.
1579 (gfc_get_symbol_decl): Get a dummy array for class arrays.
1580 (gfc_trans_deferred_vars): Tell conv_expr that the descriptor
1582 * trans-expr.c (gfc_class_vptr_get): Get the class descriptor
1583 from the correct location for class arrays.
1584 (gfc_class_len_get): Likewise.
1585 (gfc_conv_intrinsic_to_class): Add handling of _len component.
1586 (gfc_conv_class_to_class): Prevent access to unset array data
1587 when the array is an optional argument. Add handling of _len
1589 (gfc_copy_class_to_class): Check that _def_init is non-NULL
1590 when used in _vptr->copy()
1591 (gfc_trans_class_init_assign): Ensure that the rank of
1593 (gfc_conv_component_ref): Get the _vptr along with _data refs.
1594 (gfc_conv_variable): Make sure the temp array descriptor is
1595 returned for class arrays, too, and that class arrays are
1596 dereferenced correctly.
1597 (gfc_conv_procedure_call): For polymorphic type initialization
1598 the initializer has to be a pointer to _def_init stored in a
1599 dummy variable, which then needs to be used by value.
1600 * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): Use the
1601 temporary array descriptor for class arrays, too.
1602 (gfc_conv_intrinsic_storage_size): Likewise.
1603 (gfc_conv_intrinsic_loc): Add ref to _data for BT_CLASS
1605 * trans-stmt.c (trans_associate_var): Use a temporary array for
1606 the associate variable of class arrays, too, making the array
1607 one-based (lbound == 1).
1608 * trans-types.c (gfc_is_nodesc_array): Use the correct
1610 * trans.c (gfc_build_array_ref): Use the dummy array descriptor
1612 * trans.h: Add class_vptr to gfc_se for storing a class ref's
1615 2015-04-22 Steven G. Kargl <kargl@gcc.gnu.org>
1618 * decl.c (add_init_expr_to_sym): Set the length type parameter.
1620 2015-04-10 Tobias Burnus <burnus@net-b.de>
1622 * trans-stmt.c (gfc_trans_lock_unlock): Implement -fcoarray=lib
1623 version; reject not-yet-implemented variants.
1624 * trans-types.c (gfc_get_derived_type): For lock_type with
1625 -fcoarray=lib, use a void pointer as type.
1626 * trans.c (gfc_allocate_using_lib, gfc_allocate_allocatable):
1627 Handle lock_type with -fcoarray=lib.
1629 2015-04-10 Mikael Morin <mikael@gcc.gnu.org>
1635 * symbol.c (save_symbol_data, gfc_save_symbol_data): Rename the
1636 former to the latter and make it non-static. Update callers.
1637 * gfortran.h (gfc_save_symbol_data): New prototype.
1638 * decl.c (gfc_match_decl_type_spec): Call 'gfc_save_symbol_data'
1639 before modifying symbols 'sym' and 'dt_sym'.
1641 2013-04-09 Paul Thomas <pault@gcc.gnu.org>
1644 * primary.c (gfc_variable_attr): Avoid ICE on AR_UNKNOWN if any
1645 of the index variables are untyped and errors are present.
1647 2015-04-07 Andre Vehreschild <vehre@gmx.de>
1650 * trans-stmt.c (gfc_trans_allocate): For intrinsic functions
1651 use conv_expr_descriptor() instead of conv_expr_reference().
1653 2015-03-30 Jakub Jelinek <jakub@redhat.com>
1656 * trans-openmp.c (gfc_trans_omp_do): For !simple simd with explicit
1657 linear clause for the iterator set OMP_CLAUSE_LINEAR_NO_COPYIN.
1658 For implcitly added !simple OMP_CLAUSE_LINEAR set it too. Use step 1
1659 instead of the original step on the new iterator - count.
1661 2015-03-25 Mikael Morin <mikael@gcc.gnu.org>
1665 * gfortran.h (struct gfc_namespace): New field 'types_resolved'.
1666 * resolve.c (resolve_types): Return early if field 'types_resolved'
1667 is set. Set 'types_resolved' at the end.
1669 2015-03-24 Andre Vehreschild <vehre@gmx.de>
1672 * trans-expr.c (gfc_conv_structure): Fixed indendation.
1673 Using integer_zero_node now instead of explicitly
1674 constructing a integer constant zero node.
1675 (gfc_conv_derived_to_class): Add handling of _len component,
1676 i.e., when the rhs has a string_length then assign that to
1677 class' _len, else assign 0.
1678 (gfc_conv_intrinsic_to_class): Likewise.
1680 2015-03-24 Andre Vehreschild <vehre@gmx.de>
1685 * class.c (gfc_add_component_ref): Free no longer needed
1686 ref-chains to prevent memory loss.
1687 (find_intrinsic_vtab): For deferred length char arrays or
1688 unlimited polymorphic objects, store the size in bytes of one
1689 character in the size component of the vtab.
1690 * gfortran.h: Added gfc_add_len_component () define.
1691 * trans-array.c (gfc_trans_create_temp_array): Switched to new
1692 function name for getting a class' vtab's field.
1693 (build_class_array_ref): Likewise.
1694 (gfc_array_init_size): Using the size information from allocate
1695 more consequently now, i.e., the typespec of the entity to
1696 allocate is no longer needed. This is to address the last open
1697 comment in PR fortran/57456.
1698 (gfc_array_allocate): Likewise.
1699 (structure_alloc_comps): gfc_copy_class_to_class () needs to
1700 know whether the class is unlimited polymorphic.
1701 * trans-array.h: Changed interface of gfc_array_allocate () to
1702 reflect the no longer needed typespec.
1703 * trans-expr.c (gfc_find_and_cut_at_last_class_ref): New.
1704 (gfc_reset_len): New.
1705 (gfc_get_class_array_ref): Switch to new function name for
1706 getting a class' vtab's field.
1707 (gfc_copy_class_to_class): Added flag to know whether the class
1708 to copy is unlimited polymorphic. Adding _len dependent code
1709 then, which calls ->vptr->copy () with four arguments adding
1710 the length information ->vptr->copy(from, to, from_len, to_cap).
1711 (gfc_conv_procedure_call): Switch to new function name for
1712 getting a class' vtab's field.
1713 (alloc_scalar_allocatable_for_assignment): Use the string_length
1714 as computed by gfc_conv_expr and not the statically backend_decl
1715 which may be incorrect when ref-ing.
1716 (gfc_trans_assignment_1): Use the string_length variable and
1717 not the rse.string_length. The former has been computed more
1719 * trans-intrinsic.c (gfc_conv_intrinsic_sizeof): Switch to new
1720 function name for getting a class' vtab's field.
1721 (gfc_conv_intrinsic_storage_size): Likewise.
1722 (gfc_conv_intrinsic_transfer): Likewise.
1723 * trans-stmt.c (gfc_trans_allocate): Restructured to evaluate
1724 source=expr3 only once before the loop over the objects to
1725 allocate, when the objects are not arrays. Doing correct _len
1726 initialization and calling of vptr->copy () fixing PR 64787.
1727 (gfc_trans_deallocate): Reseting _len to 0, preventing future
1729 * trans.c (gfc_build_array_ref): Switch to new function name
1730 for getting a class' vtab's field.
1731 (gfc_add_comp_finalizer_call): Likewise.
1732 * trans.h: Define the prototypes for the gfc_class_vtab_*_get ()
1733 and gfc_vptr_*_get () functions.
1734 Added gfc_find_and_cut_at_last_class_ref () and
1735 gfc_reset_len () routine prototype. Added flag to
1736 gfc_copy_class_to_class () prototype to signal an unlimited
1737 polymorphic entity to copy.
1739 2015-03-24 Iain Sandoe <iain@codesourcery.com>
1740 Tobias Burnus <burnus@net-b.de>
1742 * gfortran.texi (_gfortran_caf_sync_memory): Improve wording.
1744 2015-03-23 Paul Thomas <pault@gcc.gnu.org>
1745 Mikael Morin <mikael@gcc.gnu.org>
1748 * gfortran.h (struct symbol_attribute) : New field
1749 'array_outer_dependency'.
1750 * trans.h (struct gfc_ss_info): New field 'array_outer_dependency'.
1751 * module.c (enum ab_attribute): New value AB_ARRAY_OUTER_DEPENDENCY.
1752 (attr_bits): Append same value to initializer.
1753 (mio_symbol_attribute): Handle 'array_outer_dependency' attr
1754 in module read and write.
1755 * resolve.c (update_current_proc_outer_array_dependency): New function.
1756 (resolve_function, resolve_call): Add code to update current procedure's
1757 'array_outer_dependency' attribute.
1758 (resolve_variable): Mark current procedure with attribute
1759 array_outer_dependency if the variable is an array coming from outside
1760 the current namespace.
1761 (resolve_fl_procedure): Mark a procedure without body with attribute
1762 'array_outer_dependency'.
1763 * trans-array.c (gfc_conv_resolve_dependencies): If any ss is
1764 marked as 'array_outer_dependency' generate a temporary.
1765 (gfc_walk_function_expr): If the function may reference external arrays,
1766 mark the head gfc_ss with flag 'array_outer_dependency'.
1768 2015-03-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1770 PR libgfortran/59513
1771 * gfortran.texi (Read/Write after EOF marker): New information.
1773 2015-03-21 H.J. Lu <hongjiu.lu@intel.com>
1775 * gfortran.texi (_gfortran_caf_sync_memory): Put @{xxx} in one
1778 2015-03-21 Tobias Burnus <burnus@net-b.de>
1780 * gfortran.texi (_gfortran_caf_sync_all, _gfortran_caf_sync_images,
1781 _gfortran_caf_sync_memory, _gfortran_caf_error_stop,
1782 _gfortran_caf_error_stop_str, _gfortran_caf_atomic_define,
1783 _gfortran_caf_atomic_ref, _gfortran_caf_atomic_cas,
1784 _gfortran_caf_atomic_op): New sections.
1786 2015-03-21 Tobias Burnus <burnus@net-b.de>
1788 * trans-expr.c (gfc_get_tree_for_caf_expr): Reject unimplemented
1789 coindexed coarray accesses.
1791 2015-03-17 Paul Thomas <pault@gcc.gnu.org>
1794 * trans-types.c (gfc_get_derived_type): If an abstract derived
1795 type with procedure pointer components has no other type of
1796 component, return the backend_decl. Otherwise build the
1797 components if any of the non-procedure pointer components have
1800 2015-03-16 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1803 *trans-intrinisic.c (conv_intrinsic_system_clock): Check the
1804 smallest kind passed in user arguments and hardcode tesults for
1805 KIND=1 or KIND=2 to indicate no clock available.
1807 2015-03-16 Andre Vehreschild <vehre@gmx.de>
1809 * resolve.c: Prevent segfault on illegal input.
1811 2015-03-14 Mikael Morin <mikael@gcc.gnu.org>
1814 * trans-expr.c (gfc_trans_pointer_assignment): Clear DESCRIPTOR_ONLY
1815 field before reusing LSE.
1817 2015-03-11 Janne Blomqvist <jb@gcc.gnu.org>
1820 * gfortran.texi: Document behavior when opening files without
1821 explicit ACTION= specifier.
1823 2015-03-10 Paul Thomas <pault@gcc.gnu.org>
1826 * trans-expr.c (gfc_conv_component_ref): If the component
1827 backend declaration is missing and the derived type symbol is
1828 available in the reference, call gfc_build_derived_type.
1830 2015-03-10 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
1831 Tobias Burnus <burnus@net-b.de>
1833 * trans.h (caf_sync_memory): New function decl tree.
1834 * trans-decl.c (gfc_build_builtin_function_decls): Define it.
1835 (create_main_function): Don't call sync_synchronize and leave
1836 it to the CAF library.
1837 * trans-stmt.c (gfc_trans_stop): Ditto.
1838 (gfc_trans_sync): Ditto; add call library call for sync memory.
1840 2015-03-08 Mikael Morin <mikael@gcc.gnu.org>
1843 * resolve.c (resolve_symbol): Check that the symbol found by
1844 name lookup really is the current symbol being resolved.
1846 2015-03-02 Tobias Burnus <burnus@net-b.de>
1848 * check.c (gfc_check_atomic): Properly check for coarrayness
1849 and for being coindexed.
1851 2015-02-26 Martin Liska <mliska@suse.cz>
1853 * resolve.c: Rename enum 'comparison' to 'compare_result' as
1854 solution for -Wodr issue.
1856 2015-02-24 Thomas Schwinge <thomas@codesourcery.com>
1859 * f95-lang.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
1861 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
1862 * types.def (BT_FN_VOID_INT_PTR_SIZE_PTR_PTR_PTR_INT_INT_VAR)
1863 (BT_FN_VOID_INT_OMPFN_PTR_SIZE_PTR_PTR_PTR_INT_INT_INT_INT_INT_VAR):
1864 Remove function types.
1865 (BT_FN_VOID_INT_SIZE_PTR_PTR_PTR)
1866 (BT_FN_VOID_INT_SIZE_PTR_PTR_PTR_INT_INT_VAR)
1867 (BT_FN_VOID_INT_OMPFN_SIZE_PTR_PTR_PTR_INT_INT_INT_INT_INT_VAR):
1870 2015-02-22 Bernd Edlinger <bernd.edlinger@hotmail.de>
1874 * trans-expr.c (gfc_apply_interface_mapping_to_expr): Remove mapping
1875 for component references to class objects.
1876 (gfc_conv_procedure_call): Compare the class by name.
1878 2015-02-13 Jerry DeLisle <jvdelisle@gcc.gnu.org>
1881 * scanner.c (gfc_next_char_literal): For free form source,
1882 check for '!' and if found, clear the comment and go back
1883 and get the next character. For fixed form source, skip the
1886 2015-02-12 Paul Thomas <pault@gcc.gnu.org>
1889 * trans-stmt.c (gfc_trans_deallocate): If a component array
1890 expression is not a descriptor type and it is a derived type
1891 that has allocatable components and is not finalizable, then
1892 deallocate the allocatable components.
1894 2015-02-08 Mikael Morin <mikael@gcc.gnu.org>
1897 * module.c (check_for_ambiguous): Change argument type
1898 from gfc_symbol to gfc_symtree. Check local (symtree) name
1899 instead of original (symbol) name.
1900 (read_module): Update caller.
1902 2015-02-06 Paul Thomas <pault@gcc.gnu.org>
1905 * gfortran.h: Add 'must finalize' field to gfc_expr and
1906 prototypes for gfc_is_alloc_class_scalar_function and for
1907 gfc_is_alloc_class_array_function.
1908 * expr.c (gfc_is_alloc_class_scalar_function,
1909 gfc_is_alloc_class_array_function): New functions.
1910 * trans-array.c (gfc_add_loop_ss_code): Do not move the
1911 expression for allocatable class scalar functions outside the
1913 (conv_array_index_offset): Cope with deltas being NULL_TREE.
1914 (build_class_array_ref): Do not return with allocatable class
1915 array functions. Add code to pick out the returned class array.
1916 Dereference if necessary and return if not a class object.
1917 (gfc_conv_scalarized_array_ref): Cope with offsets being NULL.
1918 (gfc_walk_function_expr): Return an array ss for the result of
1919 an allocatable class array function.
1920 * trans-expr.c (gfc_conv_subref_array_arg): Remove the assert
1921 that the argument should be a variable. If an allocatable class
1922 array function, set the offset to zero and skip the write-out
1924 (gfc_conv_procedure_call): Add allocatable class array function
1925 to the assert. Call gfc_conv_subref_array_arg for allocatable
1926 class array function arguments with derived type formal arg..
1927 Add the code for handling allocatable class functions, including
1928 finalization calls to prevent memory leaks.
1929 (arrayfunc_assign_needs_temporary): Return if an allocatable
1930 class array function.
1931 (gfc_trans_assignment_1): Set must_finalize to rhs expression
1932 for allocatable class functions. Set scalar_to_array as needed
1933 for scalar class allocatable functions assigned to an array.
1934 Nullify the allocatable components corresponding the the lhs
1935 derived type so that the finalization does not free them.
1937 2015-01-29 Andre Vehreschild <vehre@gmx.de>
1938 Janus Weil <janus@gcc.gnu.org>
1941 Initial patch by Janus Weil
1942 * resolve.c (resolve_allocate_expr): Add check for comp. only
1943 when target is not unlimited polymorphic.
1944 * trans-stmt.c (gfc_trans_allocate): Assign correct value to
1945 _len component of unlimited polymorphic entities.
1947 2015-02-05 Tobias Burnus <burnus@net-b.de>
1950 * resolve.c (resolve_transfer): Also check structure
1953 2015-02-05 Paul Thomas <pault@gcc.gnu.org>
1956 * resolve.c (resolve_structure_cons): Obtain the rank of class
1958 * trans-expr.c (gfc_trans_alloc_subarray_assign): Do the
1959 assignment to allocatable class array components.
1960 (alloc_scalar_allocatable_for_subcomponent_assignment): If comp
1961 is a class component, allocate to the _data field.
1962 (gfc_trans_subcomponent_assign): If a class component with a
1963 derived type expression set the _vptr field and for array
1964 components, call gfc_trans_alloc_subarray_assign. For scalars,
1965 the assignment is performed here.
1967 2015-02-04 Jakub Jelinek <jakub@redhat.com>
1969 * options.c: Include langhooks.h.
1970 (gfc_post_options): Change lang_hooks.name based on
1971 selected -std= mode.
1973 2015-02-03 Steven G. Kargl <kargl@gcc.gnu.org>
1975 * intrinsic.texi (CO_ASSOCIATED): c_prt_1 should be c_ptr_1.
1977 2015-01-30 Andre Vehreschild <vehre@gmx.de>
1979 * trans-decl.c (gfc_get_symbol_decl): Removed duplicate code.
1980 * trans-expr.c (gfc_conv_intrinsic_to_class): Fixed indentation.
1981 Fixed datatype of charlen to be a 32-bit int.
1983 2015-02-01 Joseph Myers <joseph@codesourcery.com>
1985 * error.c (gfc_warning (const char *, ...), gfc_warning_now (const
1986 char *, ...)): Remove functions.
1987 * gfortran.h (gfc_warning (const char *, ...), gfc_warning_now
1988 (const char *, ...)): Remove declarations.
1989 * arith.c, check.c, data.c, decl.c, frontend-passes.c,
1990 interface.c, intrinsic.c, io.c, matchexp.c, module.c, openmp.c,
1991 options.c, parse.c, primary.c, resolve.c, scanner.c, symbol.c,
1992 trans-common.c, trans-const.c, trans-stmt.c: All callers of
1993 gfc_warning and gfc_warning_now changed to pass 0 or option number
1996 2015-01-30 Joseph Myers <joseph@codesourcery.com>
1998 * f95-lang.c, gfortranspec.c, trans-const.c, trans-expr.c: All
1999 callers of fatal_error changed to pass input_location as first
2002 2015-01-28 Tobias Burnus <burnus@net-b.de>
2004 * intrinsic.texi (CO_BROADCAST): Correct argument description.
2006 2015-01-27 Tobias Burnus <burnus@net-b.de>
2009 * trans-openmp.c (gfc_has_alloc_comps, gfc_trans_omp_clauses):
2010 Fix handling for scalar coarrays.
2011 * trans-types.c (gfc_get_element_type): Add comment.
2013 2015-01-27 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2016 * interface.c: Remove <algorithm>.
2017 (check_dummy_characteristics): Use MAX instead of std::max.
2019 2015-01-26 Paul Thomas <pault@gcc.gnu.org>
2022 * resolve.c (resolve_allocate_expr): If the default initializer
2023 is NULL, keep the original MOLD expression so that the correct
2024 typespec is available.
2026 2015-01-26 Tobias Burnus <burnus@net-b.de>
2029 * interface.c (check_dummy_characteristics): Fix coarray handling.
2031 2015-01-26 Tobias Burnus <burnus@net-b.de>
2033 * io.c (gfc_match_inquire): Replace "-1" by a defined constant.
2035 2015-01-26 Janus Weil <janus@gcc.gnu.org>
2038 * class.c (finalize_component): New argument 'sub_ns'. Insert code to
2039 check if 'expr' is associated.
2040 (generate_finalization_wrapper): Rename 'ptr' symbols to 'ptr1' and
2041 'ptr2'. Pass 'sub_ns' to finalize_component.
2043 2015-01-25 Mikael Morin <mikael@gcc.gnu.org>
2046 * decl.c (gfc_match_derived_decl): Don't insert a new symtree element.
2047 * module.c (MOD_VERSION): Bump.
2048 (write_module): Don't write list of extensions.
2049 (read_module): Don't jump over list of extensions;
2050 don't load list of extensions.
2051 (load_derived_extensions, write_dt_extensions,
2052 write_derived_extensions): Remove.
2054 2015-01-24 Tobias Burnus <burnus@net-b.de>
2056 * parse.c (gfc_parse_file): Fix two-location gfc_error call.
2058 2015-01-23 Martin Liska <mliska@suse.cz>
2060 * decl.c (attr_decl1): Workaround -Wmaybe-uninitialized
2061 false positive during profiledbootstrap by initializing them.
2062 * matchexp.c (match_mult_operand): Likewise.
2063 * module.c (write_atom): Likewise.
2064 (read_module): Likewise.
2066 2015-01-23 Tom de Vries <tom@codesourcery.com>
2069 * lang.opt (fopenacc): Mark as LTO option.
2071 2015-01-23 Tom de Vries <tom@codesourcery.com>
2074 * lang.opt (fopenmp): Mark as LTO option.
2076 2015-01-23 Andre Vehreschild <vehre@gmx.de>
2078 * trans-decl.c (gfc_finish_var_decl): Fixed moved comment.
2079 * trans-stmt.c (gfc_trans_allocate): Fixed indentation.
2081 2015-01-23 Jakub Jelinek <jakub@redhat.com>
2083 * gfc-diagnostic.def (DK_ICE_NOBT): New kind.
2085 2015-01-23 Janus Weil <janus@gcc.gnu.org>
2088 * class.c (finalize_component): Apply the check for 'fini_coarray' only
2089 to coarray components.
2091 2015-01-23 Tobias Burnus <burnus@net-b.de>
2094 * trans-openmp.c (gfc_trans_oacc_combined_directive): Fix
2097 2015-01-22 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2101 * trans-io.c (set_parameter_value): Delete use of has_iostat.
2102 Redefine to not generate any runtime error check calls.
2103 (set_parameter_value_chk): Rename of the former
2104 set_parameter_value with the runtime error checks and fix
2105 whitespace. (set_parameter_value_inquire): New function that
2106 builds a runtime conditional block to set the INQUIRE
2107 common parameter block unit number to -2 when unit numbers
2108 exceed positive KIND=4 limits. (gfc_trans_open): Whitespace.
2109 For unit, use the renamed set_parameter_value_chk.
2110 (gfc_trans_close): Likewise use renamed function.
2111 (build_filepos): Whitespace and use renamed function.
2112 (gfc_trans_inquire): Whitespace and for unit use
2113 set_parameter_value and set_parameter_value_inquire.
2114 (gfc_trans_wait): Remove p->iostat from call to
2115 set_parameter_value. Use new set_parameter_value_chk for unit.
2116 (build_dt): Use the new set_parameter_value without p->iostat
2117 and fix whitespace. Use set_parameter_value_chk for unit.
2119 2015-01-21 Thomas Koenig <tkoenig@netcologne.de>
2122 * dependency.c (callback_dummy_intent_not_int): New function.
2123 (dummy_intent_not_in): New function.
2124 (gfc_full_array_ref_p): Use dummy_intent_not_in.
2126 2015-01-18 Andre Vehreschild <vehre@gmx.de>
2127 Janus Weil <janus@gcc.gnu.org>
2130 * class.c (gfc_get_len_component): New.
2131 (gfc_build_class_symbol): Add _len component to unlimited
2132 polymorphic entities.
2133 (find_intrinsic_vtab): Removed emitting of error message.
2134 * gfortran.h: Added prototype for gfc_get_len_component.
2135 * simplify.c (gfc_simplify_len): Use _len component where
2137 * trans-expr.c (gfc_class_len_get): New.
2138 (gfc_conv_intrinsic_to_class): Add handling for deferred
2140 (gfc_conv_structure): Treat _len component correctly.
2141 (gfc_conv_expr): Prevent bind_c handling when not required.
2142 (gfc_trans_pointer_assignment): Propagate _len component.
2143 * trans-stmt.c (class_has_len_component): New.
2144 (trans_associate_var): _len component treatment for associate
2146 (gfc_trans_allocate): Same as for trans_associate_var()
2147 * trans.h: Added prototype for gfc_class_len_get.
2149 2015-01-18 Paul Thomas <pault@gcc.gnu.org>
2152 * trans-expr.c (gfc_trans_subcomponent_assign): Use a deep copy
2153 for allocatable components, where the source is a variable.
2155 2015-01-18 Paul Thomas <pault@gcc.gnu.org>
2158 * primary.c (gfc_match_varspec): Exclude dangling associate-
2159 names with dimension 0 from being counted as arrays.
2160 * resolve.c (resolve_assoc_var): Sub-strings are permissible
2161 for associate-names, so exclude characters from the test for
2163 * trans-decl.c (gfc_get_symbol_decl): Associate-names can use
2164 the hidden string length variable of their associated target.
2165 Signal this by setting 'length' to a constant, if the decl for
2166 the string length is a variable.
2168 2015-01-17 Paul Thomas <pault@gcc.gnu.org>
2171 * trans-expr.c (gfc_trans_pointer_assignment): Make sure that
2172 before reinitializing rse, to add the rse.pre to block before
2174 * trans-intrinsic.c (gfc_conv_associated): Deal with the class
2175 data being a descriptor.
2177 2015-01-17 Andre Vehreschild <vehre@gmx.de>
2180 * primary.c (build_actual_constructor): Prevent warning.
2181 * trans-expr.c (alloc_scalar_allocatable_for_subcomponent_
2182 assignment): New function encapsulates treatment of allocatable
2184 (gfc_trans_subcomponent_assign): Needed to distinguish between
2185 regular assignment and initilization.
2186 (gfc_trans_structure_assign): Same.
2187 (gfc_conv_structure): Same.
2190 * gfortran.h: deferred_parameter is not needed, because
2191 it artificial does the trick completely.
2192 * primary.c (build_actual_constructor): Same.
2193 (gfc_convert_to_structure_constructor): Same.
2194 * resolve.c (resolve_fl_derived0): Same.
2195 * trans-expr.c (gfc_conv_component_ref): Prevent treating
2196 allocatable deferred length char arrays here.
2197 (gfc_trans_subcomponent_assign): Same as above.
2198 * trans-types.c (gfc_sym_type): This is done in
2199 gfc_get_derived_type already.
2201 2015-01-17 Andre Vehreschild <vehre@gmx.de>
2204 * trans-decl.c (gfc_get_symbol_decl):Use a ref on the string
2205 length when the symbol is declared to be a result.
2206 * trans-expr.c (gfc_conv_procedure_call): Strip deref on the
2207 string length when functions are nested and the string length
2208 is a reference already.
2210 2015-01-16 Janus Weil <janus@gcc.gnu.org>
2213 * decl.c (match_pointer_init): Error out if resolution of init expr
2216 2015-01-15 Tobias Burnus <burnus@net-b.de>
2218 * openmp.c (check_symbol_not_pointer, resolve_oacc_data_clauses,
2219 resolve_oacc_deviceptr_clause, resolve_omp_clauses,
2220 gfc_resolve_oacc_declare): Replace '%s' by %qs.
2222 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
2223 Cesar Philippidis <cesar@codesourcery.com>
2224 James Norris <jnorris@codesourcery.com>
2225 Ilmir Usmanov <i.usmanov@samsung.com>
2226 Tobias Burnus <burnus@net-b.de>
2228 * lang.opt (fopenacc): New option.
2229 * cpp.c (cpp_define_builtins): Conditionally define _OPENACC.
2230 * dump-parse-tree.c (show_omp_node): Split part of it into...
2231 (show_omp_clauses): ... this new function.
2232 (show_omp_node, show_code_node): Handle EXEC_OACC_PARALLEL_LOOP,
2233 EXEC_OACC_PARALLEL, EXEC_OACC_KERNELS_LOOP, EXEC_OACC_KERNELS,
2234 EXEC_OACC_DATA, EXEC_OACC_HOST_DATA, EXEC_OACC_LOOP,
2235 EXEC_OACC_UPDATE, EXEC_OACC_WAIT, EXEC_OACC_CACHE,
2236 EXEC_OACC_ENTER_DATA, EXEC_OACC_EXIT_DATA.
2237 (show_namespace): Update for OpenACC.
2238 * f95-lang.c (DEF_FUNCTION_TYPE_VAR_2, DEF_FUNCTION_TYPE_VAR_8)
2239 (DEF_FUNCTION_TYPE_VAR_12, DEF_GOACC_BUILTIN)
2240 (DEF_GOACC_BUILTIN_COMPILER): New macros.
2241 * types.def (BT_FN_VOID_INT_INT_VAR)
2242 (BT_FN_VOID_INT_PTR_SIZE_PTR_PTR_PTR_INT_INT_VAR)
2243 (BT_FN_VOID_INT_OMPFN_PTR_SIZE_PTR_PTR_PTR_INT_INT_INT_INT_INT_VAR):
2245 * gfortran.h (gfc_statement): Add ST_OACC_PARALLEL_LOOP,
2246 ST_OACC_END_PARALLEL_LOOP, ST_OACC_PARALLEL, ST_OACC_END_PARALLEL,
2247 ST_OACC_KERNELS, ST_OACC_END_KERNELS, ST_OACC_DATA,
2248 ST_OACC_END_DATA, ST_OACC_HOST_DATA, ST_OACC_END_HOST_DATA,
2249 ST_OACC_LOOP, ST_OACC_END_LOOP, ST_OACC_DECLARE, ST_OACC_UPDATE,
2250 ST_OACC_WAIT, ST_OACC_CACHE, ST_OACC_KERNELS_LOOP,
2251 ST_OACC_END_KERNELS_LOOP, ST_OACC_ENTER_DATA, ST_OACC_EXIT_DATA,
2253 (struct gfc_expr_list): New data type.
2254 (gfc_get_expr_list): New macro.
2255 (gfc_omp_map_op): Add OMP_MAP_FORCE_ALLOC, OMP_MAP_FORCE_DEALLOC,
2256 OMP_MAP_FORCE_TO, OMP_MAP_FORCE_FROM, OMP_MAP_FORCE_TOFROM,
2257 OMP_MAP_FORCE_PRESENT, OMP_MAP_FORCE_DEVICEPTR.
2258 (OMP_LIST_FIRST, OMP_LIST_DEVICE_RESIDENT, OMP_LIST_USE_DEVICE)
2259 (OMP_LIST_CACHE): New enumerators.
2260 (struct gfc_omp_clauses): Add async_expr, gang_expr, worker_expr,
2261 vector_expr, num_gangs_expr, num_workers_expr, vector_length_expr,
2262 wait_list, tile_list, async, gang, worker, vector, seq,
2263 independent, wait, par_auto, gang_static, and loc members.
2264 (struct gfc_namespace): Add oacc_declare_clauses member.
2265 (gfc_exec_op): Add EXEC_OACC_KERNELS_LOOP,
2266 EXEC_OACC_PARALLEL_LOOP, EXEC_OACC_PARALLEL, EXEC_OACC_KERNELS,
2267 EXEC_OACC_DATA, EXEC_OACC_HOST_DATA, EXEC_OACC_LOOP,
2268 EXEC_OACC_UPDATE, EXEC_OACC_WAIT, EXEC_OACC_CACHE,
2269 EXEC_OACC_ENTER_DATA, EXEC_OACC_EXIT_DATA.
2270 (gfc_free_expr_list, gfc_resolve_oacc_directive)
2271 (gfc_resolve_oacc_declare, gfc_resolve_oacc_parallel_loop_blocks)
2272 (gfc_resolve_oacc_blocks): New prototypes.
2273 * match.c (match_exit_cycle): Handle EXEC_OACC_LOOP and
2274 EXEC_OACC_PARALLEL_LOOP.
2275 * match.h (gfc_match_oacc_cache, gfc_match_oacc_wait)
2276 (gfc_match_oacc_update, gfc_match_oacc_declare)
2277 (gfc_match_oacc_loop, gfc_match_oacc_host_data)
2278 (gfc_match_oacc_data, gfc_match_oacc_kernels)
2279 (gfc_match_oacc_kernels_loop, gfc_match_oacc_parallel)
2280 (gfc_match_oacc_parallel_loop, gfc_match_oacc_enter_data)
2281 (gfc_match_oacc_exit_data, gfc_match_oacc_routine): New
2283 * openmp.c: Include "diagnostic.h" and "gomp-constants.h".
2284 (gfc_free_omp_clauses): Update for members added to struct
2286 (gfc_match_omp_clauses): Change mask paramter to uint64_t. Add
2288 (resolve_omp_clauses): Add openacc parameter. Update for OpenACC.
2289 (struct fortran_omp_context): Add is_openmp member.
2290 (gfc_resolve_omp_parallel_blocks): Initialize it.
2291 (gfc_resolve_do_iterator): Update for OpenACC.
2292 (gfc_resolve_omp_directive): Call
2293 resolve_omp_directive_inside_oacc_region.
2294 (OMP_CLAUSE_PRIVATE, OMP_CLAUSE_FIRSTPRIVATE)
2295 (OMP_CLAUSE_LASTPRIVATE, OMP_CLAUSE_COPYPRIVATE)
2296 (OMP_CLAUSE_SHARED, OMP_CLAUSE_COPYIN, OMP_CLAUSE_REDUCTION)
2297 (OMP_CLAUSE_IF, OMP_CLAUSE_NUM_THREADS, OMP_CLAUSE_SCHEDULE)
2298 (OMP_CLAUSE_DEFAULT, OMP_CLAUSE_ORDERED, OMP_CLAUSE_COLLAPSE)
2299 (OMP_CLAUSE_UNTIED, OMP_CLAUSE_FINAL, OMP_CLAUSE_MERGEABLE)
2300 (OMP_CLAUSE_ALIGNED, OMP_CLAUSE_DEPEND, OMP_CLAUSE_INBRANCH)
2301 (OMP_CLAUSE_LINEAR, OMP_CLAUSE_NOTINBRANCH, OMP_CLAUSE_PROC_BIND)
2302 (OMP_CLAUSE_SAFELEN, OMP_CLAUSE_SIMDLEN, OMP_CLAUSE_UNIFORM)
2303 (OMP_CLAUSE_DEVICE, OMP_CLAUSE_MAP, OMP_CLAUSE_TO)
2304 (OMP_CLAUSE_FROM, OMP_CLAUSE_NUM_TEAMS, OMP_CLAUSE_THREAD_LIMIT)
2305 (OMP_CLAUSE_DIST_SCHEDULE): Use uint64_t.
2306 (OMP_CLAUSE_ASYNC, OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS)
2307 (OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_COPY, OMP_CLAUSE_COPYOUT)
2308 (OMP_CLAUSE_CREATE, OMP_CLAUSE_PRESENT)
2309 (OMP_CLAUSE_PRESENT_OR_COPY, OMP_CLAUSE_PRESENT_OR_COPYIN)
2310 (OMP_CLAUSE_PRESENT_OR_COPYOUT, OMP_CLAUSE_PRESENT_OR_CREATE)
2311 (OMP_CLAUSE_DEVICEPTR, OMP_CLAUSE_GANG, OMP_CLAUSE_WORKER)
2312 (OMP_CLAUSE_VECTOR, OMP_CLAUSE_SEQ, OMP_CLAUSE_INDEPENDENT)
2313 (OMP_CLAUSE_USE_DEVICE, OMP_CLAUSE_DEVICE_RESIDENT)
2314 (OMP_CLAUSE_HOST_SELF, OMP_CLAUSE_OACC_DEVICE, OMP_CLAUSE_WAIT)
2315 (OMP_CLAUSE_DELETE, OMP_CLAUSE_AUTO, OMP_CLAUSE_TILE): New macros.
2316 (gfc_match_omp_clauses): Handle those.
2317 (OACC_PARALLEL_CLAUSES, OACC_KERNELS_CLAUSES, OACC_DATA_CLAUSES)
2318 (OACC_LOOP_CLAUSES, OACC_PARALLEL_LOOP_CLAUSES)
2319 (OACC_KERNELS_LOOP_CLAUSES, OACC_HOST_DATA_CLAUSES)
2320 (OACC_DECLARE_CLAUSES, OACC_UPDATE_CLAUSES)
2321 (OACC_ENTER_DATA_CLAUSES, OACC_EXIT_DATA_CLAUSES)
2322 (OACC_WAIT_CLAUSES): New macros.
2323 (gfc_free_expr_list, match_oacc_expr_list, match_oacc_clause_gang)
2324 (gfc_match_omp_map_clause, gfc_match_oacc_parallel_loop)
2325 (gfc_match_oacc_parallel, gfc_match_oacc_kernels_loop)
2326 (gfc_match_oacc_kernels, gfc_match_oacc_data)
2327 (gfc_match_oacc_host_data, gfc_match_oacc_loop)
2328 (gfc_match_oacc_declare, gfc_match_oacc_update)
2329 (gfc_match_oacc_enter_data, gfc_match_oacc_exit_data)
2330 (gfc_match_oacc_wait, gfc_match_oacc_cache)
2331 (gfc_match_oacc_routine, oacc_is_loop)
2332 (resolve_oacc_scalar_int_expr, resolve_oacc_positive_int_expr)
2333 (check_symbol_not_pointer, check_array_not_assumed)
2334 (resolve_oacc_data_clauses, resolve_oacc_deviceptr_clause)
2335 (oacc_compatible_clauses, oacc_is_parallel, oacc_is_kernels)
2336 (omp_code_to_statement, oacc_code_to_statement)
2337 (resolve_oacc_directive_inside_omp_region)
2338 (resolve_omp_directive_inside_oacc_region)
2339 (resolve_oacc_nested_loops, resolve_oacc_params_in_parallel)
2340 (resolve_oacc_loop_blocks, gfc_resolve_oacc_blocks)
2341 (resolve_oacc_loop, resolve_oacc_cache, gfc_resolve_oacc_declare)
2342 (gfc_resolve_oacc_directive): New functions.
2343 * parse.c (next_free): Update for OpenACC. Move some code into...
2344 (verify_token_free): ... this new function.
2345 (next_fixed): Update for OpenACC. Move some code into...
2346 (verify_token_fixed): ... this new function.
2347 (case_executable): Add ST_OACC_UPDATE, ST_OACC_WAIT,
2348 ST_OACC_CACHE, ST_OACC_ENTER_DATA, and ST_OACC_EXIT_DATA.
2349 (case_exec_markers): Add ST_OACC_PARALLEL_LOOP, ST_OACC_PARALLEL,
2350 ST_OACC_KERNELS, ST_OACC_DATA, ST_OACC_HOST_DATA, ST_OACC_LOOP,
2351 ST_OACC_KERNELS_LOOP.
2352 (case_decl): Add ST_OACC_ROUTINE.
2353 (push_state, parse_critical_block, parse_progunit): Update for
2355 (gfc_ascii_statement): Handle ST_OACC_PARALLEL_LOOP,
2356 ST_OACC_END_PARALLEL_LOOP, ST_OACC_PARALLEL, ST_OACC_END_PARALLEL,
2357 ST_OACC_KERNELS, ST_OACC_END_KERNELS, ST_OACC_KERNELS_LOOP,
2358 ST_OACC_END_KERNELS_LOOP, ST_OACC_DATA, ST_OACC_END_DATA,
2359 ST_OACC_HOST_DATA, ST_OACC_END_HOST_DATA, ST_OACC_LOOP,
2360 ST_OACC_END_LOOP, ST_OACC_DECLARE, ST_OACC_UPDATE, ST_OACC_WAIT,
2361 ST_OACC_CACHE, ST_OACC_ENTER_DATA, ST_OACC_EXIT_DATA,
2363 (verify_st_order, parse_spec): Handle ST_OACC_DECLARE.
2364 (parse_executable): Handle ST_OACC_PARALLEL_LOOP,
2365 ST_OACC_KERNELS_LOOP, ST_OACC_LOOP, ST_OACC_PARALLEL,
2366 ST_OACC_KERNELS, ST_OACC_DATA, ST_OACC_HOST_DATA.
2367 (decode_oacc_directive, parse_oacc_structured_block)
2368 (parse_oacc_loop, is_oacc): New functions.
2369 * parse.h (struct gfc_state_data): Add oacc_declare_clauses
2371 (is_oacc): New prototype.
2372 * resolve.c (gfc_resolve_blocks, gfc_resolve_code): Handle
2373 EXEC_OACC_PARALLEL_LOOP, EXEC_OACC_PARALLEL,
2374 EXEC_OACC_KERNELS_LOOP, EXEC_OACC_KERNELS, EXEC_OACC_DATA,
2375 EXEC_OACC_HOST_DATA, EXEC_OACC_LOOP, EXEC_OACC_UPDATE,
2376 EXEC_OACC_WAIT, EXEC_OACC_CACHE, EXEC_OACC_ENTER_DATA,
2377 EXEC_OACC_EXIT_DATA.
2378 (resolve_codes): Call gfc_resolve_oacc_declare.
2379 * scanner.c (openacc_flag, openacc_locus): New variables.
2380 (skip_free_comments): Update for OpenACC. Move some code into...
2381 (skip_omp_attribute): ... this new function.
2382 (skip_oacc_attribute): New function.
2383 (skip_fixed_comments, gfc_next_char_literal): Update for OpenACC.
2384 * st.c (gfc_free_statement): Handle EXEC_OACC_PARALLEL_LOOP,
2385 EXEC_OACC_PARALLEL, EXEC_OACC_KERNELS_LOOP, EXEC_OACC_KERNELS,
2386 EXEC_OACC_DATA, EXEC_OACC_HOST_DATA, EXEC_OACC_LOOP,
2387 EXEC_OACC_UPDATE, EXEC_OACC_WAIT, EXEC_OACC_CACHE,
2388 EXEC_OACC_ENTER_DATA, EXEC_OACC_EXIT_DATA.
2389 * trans-decl.c (gfc_generate_function_code): Update for OpenACC.
2390 * trans-openmp.c: Include "gomp-constants.h".
2391 (gfc_omp_finish_clause, gfc_trans_omp_clauses): Use GOMP_MAP_*
2392 instead of OMP_CLAUSE_MAP_*. Use OMP_CLAUSE_SET_MAP_KIND.
2393 (gfc_trans_omp_clauses): Handle OMP_LIST_USE_DEVICE,
2394 OMP_LIST_DEVICE_RESIDENT, OMP_LIST_CACHE, and OMP_MAP_FORCE_ALLOC,
2395 OMP_MAP_FORCE_DEALLOC, OMP_MAP_FORCE_TO, OMP_MAP_FORCE_FROM,
2396 OMP_MAP_FORCE_TOFROM, OMP_MAP_FORCE_PRESENT,
2397 OMP_MAP_FORCE_DEVICEPTR, and gfc_omp_clauses' async, seq,
2398 independent, wait_list, num_gangs_expr, num_workers_expr,
2399 vector_length_expr, vector, vector_expr, worker, worker_expr,
2400 gang, gang_expr members.
2401 (gfc_trans_omp_do): Handle EXEC_OACC_LOOP.
2402 (gfc_convert_expr_to_tree, gfc_trans_oacc_construct)
2403 (gfc_trans_oacc_executable_directive)
2404 (gfc_trans_oacc_wait_directive, gfc_trans_oacc_combined_directive)
2405 (gfc_trans_oacc_declare, gfc_trans_oacc_directive): New functions.
2406 * trans-stmt.c (gfc_trans_block_construct): Update for OpenACC.
2407 * trans-stmt.h (gfc_trans_oacc_directive, gfc_trans_oacc_declare):
2409 * trans.c (tranc_code): Handle EXEC_OACC_CACHE, EXEC_OACC_WAIT,
2410 EXEC_OACC_UPDATE, EXEC_OACC_LOOP, EXEC_OACC_HOST_DATA,
2411 EXEC_OACC_DATA, EXEC_OACC_KERNELS, EXEC_OACC_KERNELS_LOOP,
2412 EXEC_OACC_PARALLEL, EXEC_OACC_PARALLEL_LOOP, EXEC_OACC_ENTER_DATA,
2413 EXEC_OACC_EXIT_DATA.
2414 * gfortran.texi: Update for OpenACC.
2415 * intrinsic.texi: Likewise.
2416 * invoke.texi: Likewise.
2418 2015-01-15 Janus Weil <janus@gcc.gnu.org>
2421 * resolve.c (resolve_fl_derived0): Continue resolving next component
2424 2015-01-14 Jerry DeLisle <jvdelisle@gcc.gnu.org>
2427 * io.c (gfc_match_inquire): Generate error if unit number in
2428 inquire statement is a constant -1. All other values allowed.
2429 * trans-io.c (gfc_trans_inquire): Delete dummy iostat variable.
2430 (create_dummy_iostat): Delete function no longer used.
2432 2015-01-13 Jakub Jelinek <jakub@redhat.com>
2435 * trans-decl.c (create_function_arglist): Don't set TREE_READONLY
2436 on dummy args with VALUE attribute.
2438 2015-01-11 Janus Weil <janus@gcc.gnu.org>
2441 * interface.c (gfc_extend_expr): Look for type-bound operators before
2444 2015-01-11 Janus Weil <janus@gcc.gnu.org>
2447 * resolve.c (resolve_fl_derived0): Set error flag if problems with the
2448 interface of a procedure-pointer component were detected.
2450 2015-01-11 Janus Weil <janus@gcc.gnu.org>
2453 * interface.c (compare_parameter): Interface check for
2454 procedure-pointer component as actual argument.
2456 2015-01-10 Thomas Schwinge <thomas@codesourcery.com>
2458 * gfortran.texi: Update for libgomp being renamed from "GNU OpenMP
2459 Runtime Library" to "GNU Offloading and Multi Processing Runtime
2461 * intrinsic.texi: Likewise.
2463 2015-01-10 Tobias Burnus <burnus@net-b.de>
2466 * invoke.texi (Wline-truncation): Document new behaviour.
2467 * lang.opt (Wline-truncation): Add Init(-1).
2468 * options.c (gfc_post_options): If -Wline-truncation is unset,
2469 enable it for free-form source files; for the latter, also use
2470 -Werror=line-truncation, unless -Wno-error has been specified.
2472 2015-01-09 Michael Collison <michael.collison@linaro.org>
2474 * convert.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
2475 input.h, alias.h, symtab.h, options.h, fold-const.h,
2476 wide-int.h, and inchash.h due to flattening of tree.h.
2477 * cpp.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
2478 input.h, alias.h, symtab.h, fold-const.h,
2479 wide-int.h, and inchash.h due to flattening of tree.h.
2481 * f95.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
2482 input.h, alias.h, symtab.h, options.h, fold-const.h,
2483 wide-int.h, and inchash.h due to flattening of tree.h.
2484 * iresolve.c: Ditto.
2485 * match.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
2486 input.h, alias.h, symtab.h, fold-const.h,
2487 wide-int.h, and inchash.h due to flattening of tree.h.
2488 * module.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
2489 input.h, alias.h, symtab.h, options.h, fold-const.h,
2490 wide-int.h, and inchash.h due to flattening of tree.h.
2492 * target-memory.c: Include hash-set.h, vec.h,
2493 double-int.h, input.h, alias.h, symtab.h, fold-const.h,
2494 wide-int.h, and inchash.h due to flattening of tree.h.
2495 * trans-array.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
2496 input.h, alias.h, symtab.h, options.h, fold-const.h,
2497 wide-int.h, and inchash.h due to flattening of tree.h.
2498 * trans.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
2499 input.h, alias.h, symtab.h, options.h, fold-const.h,
2500 wide-int.h, and inchash.h due to flattening of tree.h.
2501 * trans-common.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
2502 input.h, alias.h, symtab.h, fold-const.h,
2503 wide-int.h, and inchash.h due to flattening of tree.h.
2504 * trans-const.c: Ditto.
2505 * trans-decl.c: Ditto.
2506 * trans-expr.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
2507 input.h, alias.h, symtab.h, options.h, fold-const.h,
2508 wide-int.h, and inchash.h due to flattening of tree.h.
2509 * trans-intrinsic.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
2510 input.h, alias.h, symtab.h, fold-const.h,
2511 wide-int.h, inchash.h and real.h due to flattening of tree.h.
2512 * trans-io.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
2513 input.h, alias.h, symtab.h, options.h, fold-const.h,
2514 wide-int.h, and inchash.h due to flattening of tree.h.
2515 * trans-openmp.c: Ditto.
2516 * trans-stmt.c: Ditto.
2517 * trans-types.c: Include hash-set.h, machmode.h, vec.h, double-int.h,
2518 input.h, alias.h, symtab.h, fold-const.h,
2519 wide-int.h, inchash.h and real.h due to flattening of tree.h.
2521 2015-01-08 Tobias Burnus <burnus@net-b.de>
2523 * trans-decl.c (gfc_build_qualified_array): Fix coarray tokens
2524 for module coarrays with -fcoarray=lib.
2525 (get_proc_pointer_decl): As module variable, make only public
2526 when not marked as private.
2528 2015-01-05 Thomas Koenig <tkoenig@gcc.gnu.org>
2531 * dependency.h: Actually commit changes.
2533 2015-01-05 Thomas Koenig <tkoenig@gcc.gnu.org>
2536 * dependency.c: Update copyright years.
2537 (gfc_discard_nops): Add prototype.
2538 * dependency.c (discard_nops): Rename to gfc_discard_nops,
2540 (gfc_discard_nops): Use gfc_discard_nops.
2541 (gfc_dep_difference): Likewise.
2542 * frontend-passes.c Update copyright years.
2543 (realloc_strings): New function. Add prototype.
2544 (gfc_run_passes): Call realloc_strings.
2545 (realloc_string_callback): New function.
2546 (create_var): Add prototype. Handle case of a
2547 scalar character variable.
2548 (optimize_trim): Do not handle allocatable variables.
2550 2015-01-05 Jakub Jelinek <jakub@redhat.com>
2552 Update copyright years.
2554 * gfortranspec.c (lang_specific_driver): Update copyright notice
2556 * gfc-internals.texi: Bump @copying's copyright year.
2557 * gfortran.texi: Ditto.
2558 * intrinsic.texi: Ditto.
2559 * invoke.texi: Ditto.
2561 2015-01-02 Janus Weil <janus@gcc.gnu.org>
2564 * expr.c (find_component_ref): Deal with extended types.
2566 2015-01-02 Tobias Burnus <burnus@net-b.de>
2568 * trans-decl.c (gfc_build_qualified_array): Fix coarray tokens
2569 for module coarrays with -fcoarray=lib.
2571 2015-01-02 Janus Weil <janus@gcc.gnu.org>
2574 * interface.c (is_procptr_result): New function to check if an
2575 expression is a procedure-pointer result.
2576 (compare_actual_formal): Use it.
2578 Copyright (C) 2015 Free Software Foundation, Inc.
2580 Copying and distribution of this file, with or without modification,
2581 are permitted in any medium without royalty provided the copyright
2582 notice and this notice are preserved.