summaryrefslogtreecommitdiffstats
path: root/gcc/fortran
Commit message (Collapse)AuthorAgeFilesLines
* Mark ChangeLoggccadmin2014-10-301-0/+4
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@216896 138bc75d-0d04-0410-961f-82ee72b054a4
* PR fortran/59488jakub2014-10-102-0/+16
| | | | | | | | | | | * trans-openmp.c (gfc_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED for parameters or vtables. * gfortran.dg/gomp/pr59488-1.f90: New test. * gfortran.dg/gomp/pr59488-2.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@216068 138bc75d-0d04-0410-961f-82ee72b054a4
* PR fortran/62270mpolacek2014-09-033-2/+9
| | | | | | | | | | * interface.c (compare_parameter): Fix condition. * trans-expr.c (gfc_conv_procedure_call): Likewise. * gfortran.dg/pointer_intent_7.f90: Adjust dg-error. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@214881 138bc75d-0d04-0410-961f-82ee72b054a4
* PR 62215 Unlink old module file before renaming.jb2014-08-292-1/+11
| | | | | | | | | | | | 2014-08-29 Jeffrey Armstrong <jeffrey.armstrong@approximatrix.com> Backport from trunk PR fortran/62215 * module.c (gfc_dump_module): Unlink old module file before renaming new one. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@214743 138bc75d-0d04-0410-961f-82ee72b054a4
* 2014-08-21 Thomas Koenig <tkoenig@gcc.gnu.org>tkoenig2014-08-212-0/+12
| | | | | | | | | | | | | | | | | | Backport from trunk PR fortran/62214 * frontend-passes.c (optimize_binop_array_assignment): Do not try to optimize the array assignment for string concatenation. 2014-08-21 Thomas Koenig <tkoenig@gcc.gnu.org> Backport from trunk PR fortran/62214 * gfortran.dg/array_assignment_5.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@214282 138bc75d-0d04-0410-961f-82ee72b054a4
* 2014-08-16 Thomas Koenig <tkoenig@gcc.gnu.org>tkoenig2014-08-162-2/+8
| | | | | | | | | | | | | | | | Backport from trunk PR fortran/62142 * trans-expr.c (is_runtime_conformable): Add NULL pointer checks. 2014-08-15 Thomas Koenig <tkoenig@gcc.gnu.org> Backport from trunk PR fortran/62142 * gfortran.dg/realloc_on_assign_24.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@214061 138bc75d-0d04-0410-961f-82ee72b054a4
* 2014-08-15 Thomas Koenig <tkoenig@gcc.gnu.org>tkoenig2014-08-153-6/+33
| | | | | | | | | | | | | | | | | | | | | Backport from trunk PR fortran/62106 * gfortran.h (symbol_attribute): Add fe_temp flag. * frontend-passes.c (is_fe_temp): New function. (create_var): Don't add a temporary for an already created variable or for a constant. (combine_ARRAY_constructor): Remove special handling for constants. 2014-08-15 Thomas Koenig <tkoenig@gcc.gnu.org> Backport from trunk PR fortran/62106 * gfortran.dg/array_constructor_49.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@214038 138bc75d-0d04-0410-961f-82ee72b054a4
* PR fortran/62131jakub2014-08-152-1/+8
| | | | | | | | | | * openmp.c (resolve_omp_atomic): Only complain if code->expr1's attr is allocatable, rather than whenever var->attr.allocatable. * gfortran.dg/gomp/pr62131.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@214011 138bc75d-0d04-0410-961f-82ee72b054a4
* PR fortran/62107jakub2014-08-152-1/+38
| | | | | | | | | * trans-openmp.c (gfc_omp_finish_clause): Handle scalar pointer or allocatable passed by reference. (gfc_trans_omp_clauses) <case OMP_LIST_MAP>: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@214004 138bc75d-0d04-0410-961f-82ee72b054a4
* PR fortran/62076jakub2014-08-142-1/+16
| | | | | | | | | | | | * openmp.c (gfc_match_omp_clauses): When failed to match operator name, defined op name or name, set buffer to empty string. Don't call gfc_find_omp_udr if buffer is empty string. (gfc_match_omp_declare_reduction): Call gfc_undo_symbols () before calling gfc_free_omp_udr. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@213972 138bc75d-0d04-0410-961f-82ee72b054a4
* 2014-08-10 Thomas Koenig <tkoenig@gcc.gnu.org>tkoenig2014-08-102-1/+17
| | | | | | | | | | | | | | | | | Backport from trunk PR fortran/61999 * simplify.c (gfc_simplify_dot_product): Convert types of vectors before calculating the result. 2014-08-10 Thomas Koenig <tkoenig@gcc.gnu.org> Backport from trunk PR fortran/61999 * gfortran.dg/dot_product_3.f90: New test case. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@213788 138bc75d-0d04-0410-961f-82ee72b054a4
* 2014-07-19 Paul Thomas <pault@gcc.gnu.org>pault2014-07-192-11/+28
| | | | | | | | | | | | | | | PR fortran/61780 * dependency.c (gfc_dep_resolver): Index the 'reverse' array so that elements are skipped. This then correctly aligns 'reverse' with the scalarizer loops. 2014-07-19 Paul Thomas <pault@gcc.gnu.org> PR fortran/61780 * gfortran.dg/dependency_44.f90 : New test git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@212846 138bc75d-0d04-0410-961f-82ee72b054a4
* Mark ChangeLoggccadmin2014-07-161-0/+4
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@212622 138bc75d-0d04-0410-961f-82ee72b054a4
* 2014-07-07 Paul Thomas <pault@gcc.gnu.org>pault2014-07-072-2/+9
| | | | | | | | | | | | | | | | PR fortran/61459 PR fortran/58883 * trans-expr.c (fcncall_realloc_result): Use the natural type for the address expression of 'res_desc'. 2014-07-07 Paul Thomas <pault@gcc.gnu.org> PR fortran/61459 PR fortran/58883 * gfortran.dg/allocatable_function_8.f90 : New test git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@212338 138bc75d-0d04-0410-961f-82ee72b054a4
* 2014-07-07 Dominique d'Humieres <dominiq@lps.ens.fr>dominiq2014-07-072-0/+21
| | | | | | | | | | | | | | | | Mikael Morin <mikael@gcc.gnu.org> PR fortran/41936 gcc/fortran/ * trans-expr.c (gfc_conv_expr_reference): Deallocate array components. gcc/testsuite/ * gfortran.dg/class_array_15.f03: Check memory leaks. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@212329 138bc75d-0d04-0410-961f-82ee72b054a4
* * decl.c (variable_decl): Reject old style initializationjakub2014-07-022-0/+13
| | | | | | | | | for derived type components. * gfortran.dg/oldstyle_5.f: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@212228 138bc75d-0d04-0410-961f-82ee72b054a4
* gcc/jakub2014-06-3026-762/+6799
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2014-06-30 Jakub Jelinek <jakub@redhat.com> Backported from mainline 2014-06-25 Jakub Jelinek <jakub@redhat.com> * langhooks-def.h (LANG_HOOKS_OMP_CLAUSE_LINEAR_CTOR): Define. (LANG_HOOKS_DECLS): Add it. * gimplify.c (gimplify_omp_for): Make sure OMP_CLAUSE_LINEAR_STEP has correct type. * tree.h (OMP_CLAUSE_LINEAR_ARRAY): Define. * langhooks.h (struct lang_hooks_for_decls): Add omp_clause_linear_ctor hook. * omp-low.c (lower_rec_input_clauses): Set max_vf even if OMP_CLAUSE_LINEAR_ARRAY is set. Don't fold_convert OMP_CLAUSE_LINEAR_STEP. For OMP_CLAUSE_LINEAR_ARRAY in combined simd loop use omp_clause_linear_ctor hook. 2014-06-24 Jakub Jelinek <jakub@redhat.com> * gimplify.c (gimplify_scan_omp_clauses) <case OMP_CLAUSE_MAP, OMP_CLAUSE_TO, OMP_CLAUSE_FROM): Make sure OMP_CLAUSE_SIZE is non-NULL. <case OMP_CLAUSE_ALIGNED>: Gimplify OMP_CLAUSE_ALIGNED_ALIGNMENT. (gimplify_adjust_omp_clauses_1): Make sure OMP_CLAUSE_SIZE is non-NULL. (gimplify_adjust_omp_clauses): Likewise. * omp-low.c (lower_rec_simd_input_clauses, lower_rec_input_clauses, expand_omp_simd): Handle non-constant safelen the same as safelen(1). * tree-nested.c (convert_nonlocal_omp_clauses, convert_local_omp_clauses): Handle OMP_CLAUSE_ALIGNED. For OMP_CLAUSE_{MAP,TO,FROM} if not decl use walk_tree. (convert_nonlocal_reference_stmt, convert_local_reference_stmt): Fixup handling of GIMPLE_OMP_TARGET. (convert_tramp_reference_stmt, convert_gimple_call): Handle GIMPLE_OMP_TARGET. 2014-06-18 Jakub Jelinek <jakub@redhat.com> * gimplify.c (omp_notice_variable): If n is non-NULL and no flags change in ORT_TARGET region, don't jump to do_outer. (struct gimplify_adjust_omp_clauses_data): New type. (gimplify_adjust_omp_clauses_1): Adjust for data being a struct gimplify_adjust_omp_clauses_data pointer instead of tree *. Pass pre_p as a new argument to lang_hooks.decls.omp_finish_clause hook. (gimplify_adjust_omp_clauses): Add pre_p argument, adjust splay_tree_foreach to pass both list_p and pre_p. (gimplify_omp_parallel, gimplify_omp_task, gimplify_omp_for, gimplify_omp_workshare, gimplify_omp_target_update): Adjust gimplify_adjust_omp_clauses callers. * langhooks.c (lhd_omp_finish_clause): New function. * langhooks-def.h (lhd_omp_finish_clause): New prototype. (LANG_HOOKS_OMP_FINISH_CLAUSE): Define to lhd_omp_finish_clause. * langhooks.h (struct lang_hooks_for_decls): Add a new gimple_seq * argument to omp_finish_clause hook. * omp-low.c (scan_sharing_clauses): Call scan_omp_op on non-DECL_P OMP_CLAUSE_DECL if ctx->outer. (scan_omp_parallel, lower_omp_for): When adding _LOOPTEMP_ clause var, add it to outer ctx's decl_map as identity. * tree-core.h (OMP_CLAUSE_MAP_TO_PSET): New map kind. * tree-nested.c (convert_nonlocal_omp_clauses, convert_local_omp_clauses): Handle various OpenMP 4.0 clauses. * tree-pretty-print.c (dump_omp_clause): Handle OMP_CLAUSE_MAP_TO_PSET. 2014-06-10 Jakub Jelinek <jakub@redhat.com> PR fortran/60928 * omp-low.c (lower_rec_input_clauses) <case OMP_CLAUSE_LASTPRIVATE>: Set lastprivate_firstprivate even if omp_private_outer_ref langhook returns true. <case OMP_CLAUSE_REDUCTION>: When calling omp_clause_default_ctor langhook, call unshare_expr on new_var and call build_outer_var_ref to get the last argument. 2014-05-11 Jakub Jelinek <jakub@redhat.com> * tree.h (OMP_CLAUSE_LINEAR_STMT): Define. * tree.c (omp_clause_num_ops): Increase OMP_CLAUSE_LINEAR number of operands to 3. (walk_tree_1): Walk all operands of OMP_CLAUSE_LINEAR. * tree-nested.c (convert_nonlocal_omp_clauses, convert_local_omp_clauses): Handle OMP_CLAUSE_DEPEND. * gimplify.c (gimplify_scan_omp_clauses): Handle OMP_CLAUSE_LINEAR_STMT. * omp-low.c (lower_rec_input_clauses): Fix typo. (maybe_add_implicit_barrier_cancel, lower_omp_1): Add cast between Fortran boolean_type_node and C _Bool if needed. gcc/c-family/ 2014-06-30 Jakub Jelinek <jakub@redhat.com> Backported from mainline 2014-06-10 Jakub Jelinek <jakub@redhat.com> PR fortran/60928 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK... (omp_pragmas): ... back here. gcc/c/ 2014-06-30 Jakub Jelinek <jakub@redhat.com> Backported from mainline 2014-06-25 Jakub Jelinek <jakub@redhat.com> * c-typeck.c (c_finish_omp_clauses): Make sure OMP_CLAUSE_LINEAR_STEP has correct type. gcc/cp/ 2014-06-30 Jakub Jelinek <jakub@redhat.com> Backported from mainline 2014-06-25 Jakub Jelinek <jakub@redhat.com> * semantics.c (finish_omp_clauses): Make sure OMP_CLAUSE_LINEAR_STEP has correct type. 2014-06-18 Jakub Jelinek <jakub@redhat.com> * cp-gimplify.c (cxx_omp_finish_clause): Add a gimple_seq * argument. * cp-tree.h (cxx_omp_finish_clause): Adjust prototype. gcc/fortran/ 2014-06-30 Jakub Jelinek <jakub@redhat.com> * module.c (MOD_VERSION): Revert back to 12. (MOD_VERSION_OMP4): Define. (module_omp4): New variable. (mio_symbol): Call mio_omp_declare_simd only if module_omp4. (read_module): Load omp udrs only if module_omp4. (write_module): Write omp udrs only if module_omp4. (find_omp_declare_simd): New function. (gfc_dump_module): Compute module_omp4. Use MOD_VERSION_OMP4 if module_omp4. (gfc_use_module): Handle MOD_VERSION_OMP4, set module_omp4. Backported from mainline 2014-06-25 Jakub Jelinek <jakub@redhat.com> * trans.h (gfc_omp_clause_linear_ctor): New prototype. * trans-openmp.c (gfc_omp_linear_clause_add_loop, gfc_omp_clause_linear_ctor): New functions. (gfc_trans_omp_clauses): Make sure OMP_CLAUSE_LINEAR_STEP has correct type. Set OMP_CLAUSE_LINEAR_ARRAY flag if needed. * f95-lang.c (LANG_HOOKS_OMP_CLAUSE_LINEAR_CTOR): Redefine. 2014-06-24 Jakub Jelinek <jakub@redhat.com> * dump-parse-tree.c (show_omp_namelist): Use n->udr->udr instead of n->udr. * f95-lang.c (gfc_init_builtin_functions): Initialize BUILT_IN_ASSUME_ALIGNED. * gfortran.h (gfc_omp_namelist): Change udr field type to struct gfc_omp_namelist_udr. (gfc_omp_namelist_udr): New type. (gfc_get_omp_namelist_udr): Define. (gfc_resolve_code): New prototype. * match.c (gfc_free_omp_namelist): Free name->udr. * module.c (intrinsics): Add INTRINSIC_USER. (fix_mio_expr): Likewise. (mio_expr): Handle INSTRINSIC_USER and non-resolved EXPR_FUNCTION. * openmp.c (gfc_match_omp_clauses): Adjust initialization of n->udr. (gfc_match_omp_declare_reduction): Treat len=: the same as len=*. Set attr.flavor on omp_{out,in,priv,orig} artificial variables. (struct resolve_omp_udr_callback_data): New type. (resolve_omp_udr_callback, resolve_omp_udr_callback2, resolve_omp_udr_clause): New functions. (resolve_omp_clauses): Adjust for n->udr changes, resolve UDR clauses here. (omp_udr_callback): Don't check for implicitly declared functions here. (gfc_resolve_omp_udr): Don't call gfc_resolve. Don't check for implicitly declared subroutines here. * resolve.c (resolve_function): If value.function.isym is non-NULL, consider it already resolved. (resolve_code): Renamed to ... (gfc_resolve_code): ... this. No longer static. (gfc_resolve_blocks, generate_component_assignments, resolve_codes): Adjust callers. * trans-openmp.c (gfc_omp_privatize_by_reference): Don't privatize by reference type (C_PTR) variables. (gfc_omp_finish_clause): Make sure OMP_CLAUSE_SIZE is non-NULL. (gfc_trans_omp_udr_expr): Remove. (gfc_trans_omp_array_reduction_or_udr): Adjust for n->udr changes. Don't call gfc_trans_omp_udr_expr, even for sym->attr.dimension expand it as assignment or subroutine call. Don't initialize value.function.isym. 2014-06-18 Tobias Burnus <burnus@net-b.de> * gfortran.texi (OpenMP): Update refs to OpenMP 4.0. * intrinsic.texi (OpenMP Modules): Ditto. 2014-06-18 Jakub Jelinek <jakub@redhat.com> * cpp.c (cpp_define_builtins): Change _OPENMP macro to 201307. * dump-parse-tree.c (show_omp_namelist): Add list_type argument. Adjust for rop being u.reduction_op now, handle depend_op or map_op. (show_omp_node): Adjust callers. Print some new OpenMP 4.0 clauses, adjust for OMP_LIST_DEPEND_{IN,OUT} becoming a single OMP_LIST_DEPEND. * f95-lang.c (gfc_handle_omp_declare_target_attribute): New function. (gfc_attribute_table): New variable. (LANG_HOOKS_OMP_FINISH_CLAUSE, LANG_HOOKS_ATTRIBUTE_TABLE): Redefine. * frontend-passes.c (gfc_code_walker): Handle new OpenMP target EXEC_OMP_* codes and new clauses. * gfortran.h (gfc_statement): Add ST_OMP_TARGET, ST_OMP_END_TARGET, ST_OMP_TARGET_DATA, ST_OMP_END_TARGET_DATA, ST_OMP_TARGET_UPDATE, ST_OMP_DECLARE_TARGET, ST_OMP_TEAMS, ST_OMP_END_TEAMS, ST_OMP_DISTRIBUTE, ST_OMP_END_DISTRIBUTE, ST_OMP_DISTRIBUTE_SIMD, ST_OMP_END_DISTRIBUTE_SIMD, ST_OMP_DISTRIBUTE_PARALLEL_DO, ST_OMP_END_DISTRIBUTE_PARALLEL_DO, ST_OMP_DISTRIBUTE_PARALLEL_DO_SIMD, ST_OMP_END_DISTRIBUTE_PARALLEL_DO_SIMD, ST_OMP_TARGET_TEAMS, ST_OMP_END_TARGET_TEAMS, ST_OMP_TEAMS_DISTRIBUTE, ST_OMP_END_TEAMS_DISTRIBUTE, ST_OMP_TEAMS_DISTRIBUTE_SIMD, ST_OMP_END_TEAMS_DISTRIBUTE_SIMD, ST_OMP_TARGET_TEAMS_DISTRIBUTE, ST_OMP_END_TARGET_TEAMS_DISTRIBUTE, ST_OMP_TARGET_TEAMS_DISTRIBUTE_SIMD, ST_OMP_END_TARGET_TEAMS_DISTRIBUTE_SIMD, ST_OMP_TEAMS_DISTRIBUTE_PARALLEL_DO, ST_OMP_END_TEAMS_DISTRIBUTE_PARALLEL_DO, ST_OMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_DO, ST_OMP_END_TARGET_TEAMS_DISTRIBUTE_PARALLEL_DO, ST_OMP_TEAMS_DISTRIBUTE_PARALLEL_DO_SIMD, ST_OMP_END_TEAMS_DISTRIBUTE_PARALLEL_DO_SIMD, ST_OMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_DO_SIMD and ST_OMP_END_TARGET_TEAMS_DISTRIBUTE_PARALLEL_DO_SIMD. (symbol_attribute): Add omp_declare_target field. (gfc_omp_depend_op, gfc_omp_map_op): New enums. (gfc_omp_namelist): Replace rop field with union containing reduction_op, depend_op and map_op. (OMP_LIST_DEPEND_IN, OMP_LIST_DEPEND_OUT): Remove. (OMP_LIST_DEPEND, OMP_LIST_MAP, OMP_LIST_TO, OMP_LIST_FROM): New. (gfc_omp_clauses): Add num_teams, device, thread_limit, dist_sched_kind, dist_chunk_size fields. (gfc_common_head): Add omp_declare_target field. (gfc_exec_op): Add EXEC_OMP_TARGET, EXEC_OMP_TARGET_DATA, EXEC_OMP_TEAMS, EXEC_OMP_DISTRIBUTE, EXEC_OMP_DISTRIBUTE_SIMD, EXEC_OMP_DISTRIBUTE_PARALLEL_DO, EXEC_OMP_DISTRIBUTE_PARALLEL_DO_SIMD, EXEC_OMP_TARGET_TEAMS, EXEC_OMP_TEAMS_DISTRIBUTE, EXEC_OMP_TEAMS_DISTRIBUTE_SIMD, EXEC_OMP_TARGET_TEAMS_DISTRIBUTE, EXEC_OMP_TARGET_TEAMS_DISTRIBUTE_SIMD, EXEC_OMP_TEAMS_DISTRIBUTE_PARALLEL_DO, EXEC_OMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_DO, EXEC_OMP_TEAMS_DISTRIBUTE_PARALLEL_DO_SIMD, EXEC_OMP_TARGET_TEAMS_DISTRIBUTE_PARALLEL_DO_SIMD and EXEC_OMP_TARGET_UPDATE. (gfc_add_omp_declare_target): New prototype. * match.h (gfc_match_omp_declare_target, gfc_match_omp_distribute, gfc_match_omp_distribute_parallel_do, gfc_match_omp_distribute_parallel_do_simd, gfc_match_omp_distribute_simd, gfc_match_omp_target, gfc_match_omp_target_data, gfc_match_omp_target_teams, gfc_match_omp_target_teams_distribute, gfc_match_omp_target_teams_distribute_parallel_do, gfc_match_omp_target_teams_distribute_parallel_do_simd, gfc_match_omp_target_teams_distribute_simd, gfc_match_omp_target_update, gfc_match_omp_teams, gfc_match_omp_teams_distribute, gfc_match_omp_teams_distribute_parallel_do, gfc_match_omp_teams_distribute_parallel_do_simd, gfc_match_omp_teams_distribute_simd): New prototypes. * module.c (ab_attribute): Add AB_OMP_DECLARE_TARGET. (attr_bits): Likewise. (mio_symbol_attribute): Handle omp_declare_target attribute. (gfc_free_omp_clauses): Free num_teams, device, thread_limit and dist_chunk_size expressions. (OMP_CLAUSE_PRIVATE, OMP_CLAUSE_FIRSTPRIVATE, OMP_CLAUSE_LASTPRIVATE, OMP_CLAUSE_COPYPRIVATE, OMP_CLAUSE_SHARED, OMP_CLAUSE_COPYIN, OMP_CLAUSE_REDUCTION, OMP_CLAUSE_IF, OMP_CLAUSE_NUM_THREADS, OMP_CLAUSE_SCHEDULE, OMP_CLAUSE_DEFAULT, OMP_CLAUSE_ORDERED, OMP_CLAUSE_COLLAPSE, OMP_CLAUSE_UNTIED, OMP_CLAUSE_FINAL, OMP_CLAUSE_MERGEABLE, OMP_CLAUSE_ALIGNED, OMP_CLAUSE_DEPEND, OMP_CLAUSE_INBRANCH, OMP_CLAUSE_LINEAR, OMP_CLAUSE_NOTINBRANCH, OMP_CLAUSE_PROC_BIND, OMP_CLAUSE_SAFELEN, OMP_CLAUSE_SIMDLEN, OMP_CLAUSE_UNIFORM): Use 1U instead of 1. (OMP_CLAUSE_DEVICE, OMP_CLAUSE_MAP, OMP_CLAUSE_TO, OMP_CLAUSE_FROM, OMP_CLAUSE_NUM_TEAMS, OMP_CLAUSE_THREAD_LIMIT, OMP_CLAUSE_DIST_SCHEDULE): Define. (gfc_match_omp_clauses): Change mask parameter to unsigned int. Adjust for rop becoming u.reduction_op. Disallow inbranch with notinbranch. For depend clause, always create OMP_LIST_DEPEND and fill in u.depend_op. Handle num_teams, device, map, to, from, thread_limit and dist_schedule clauses. (OMP_DECLARE_SIMD_CLAUSES): Or in OMP_CLAUSE_INBRANCH and OMP_CLAUSE_NOTINBRANCH. (OMP_TARGET_CLAUSES, OMP_TARGET_DATA_CLAUSES, OMP_TARGET_UPDATE_CLAUSES, OMP_TEAMS_CLAUSES, OMP_DISTRIBUTE_CLAUSES): Define. (match_omp): New function. (gfc_match_omp_do, gfc_match_omp_do_simd, gfc_match_omp_parallel, gfc_match_omp_parallel_do, gfc_match_omp_parallel_do_simd, gfc_match_omp_parallel_sections, gfc_match_omp_parallel_workshare, gfc_match_omp_sections, gfc_match_omp_simd, gfc_match_omp_single, gfc_match_omp_task): Rewritten using match_omp. (gfc_match_omp_threadprivate, gfc_match_omp_declare_reduction): Diagnose if the directives are followed by unexpected junk. (gfc_match_omp_distribute, gfc_match_omp_distribute_parallel_do, gfc_match_omp_distribute_parallel_do_simd, gfc_match_omp_distrbute_simd, gfc_match_omp_declare_target, gfc_match_omp_target, gfc_match_omp_target_data, gfc_match_omp_target_teams, gfc_match_omp_target_teams_distribute, gfc_match_omp_target_teams_distribute_parallel_do, gfc_match_omp_target_teams_distribute_parallel_do_simd, gfc_match_omp_target_teams_distrbute_simd, gfc_match_omp_target_update, gfc_match_omp_teams, gfc_match_omp_teams_distribute, gfc_match_omp_teams_distribute_parallel_do, gfc_match_omp_teams_distribute_parallel_do_simd, gfc_match_omp_teams_distrbute_simd): New functions. * openmp.c (resolve_omp_clauses): Adjust for OMP_LIST_DEPEND_{IN,OUT} being changed to OMP_LIST_DEPEND. Handle OMP_LIST_MAP, OMP_LIST_FROM, OMP_LIST_TO, num_teams, device, dist_chunk_size and thread_limit. (gfc_resolve_omp_parallel_blocks): Only put sharing clauses into ctx.sharing_clauses. Call gfc_resolve_omp_do_blocks for various new EXEC_OMP_* codes. (resolve_omp_do): Handle various new EXEC_OMP_* codes. (gfc_resolve_omp_directive): Likewise. (gfc_resolve_omp_declare_simd): Add missing space to diagnostics. * parse.c (decode_omp_directive): Handle parsing of OpenMP 4.0 offloading related directives. (case_executable): Add ST_OMP_TARGET_UPDATE. (case_exec_markers): Add ST_OMP_TARGET*, ST_OMP_TEAMS*, ST_OMP_DISTRIBUTE*. (case_decl): Add ST_OMP_DECLARE_TARGET. (gfc_ascii_statement): Handle new ST_OMP_* codes. (parse_omp_do): Handle various new ST_OMP_* codes. (parse_executable): Likewise. * resolve.c (gfc_resolve_blocks): Handle various new EXEC_OMP_* codes. (resolve_code): Likewise. (resolve_symbol): Change that !$OMP DECLARE TARGET variables are saved. * st.c (gfc_free_statement): Handle various new EXEC_OMP_* codes. * symbol.c (check_conflict): Check omp_declare_target conflicts. (gfc_add_omp_declare_target): New function. (gfc_copy_attr): Copy omp_declare_target. * trans.c (trans_code): Handle various new EXEC_OMP_* codes. * trans-common.c (build_common_decl): Add "omp declare target" attribute if needed. * trans-decl.c (add_attributes_to_decl): Likewise. * trans.h (gfc_omp_finish_clause): New prototype. * trans-openmp.c (gfc_omp_finish_clause): New function. (gfc_trans_omp_reduction_list): Adjust for rop being renamed to u.reduction_op. (gfc_trans_omp_clauses): Adjust for OMP_LIST_DEPEND_{IN,OUT} change to OMP_LIST_DEPEND and fix up depend handling. Handle OMP_LIST_MAP, OMP_LIST_TO, OMP_LIST_FROM, num_teams, thread_limit, device, dist_chunk_size and dist_sched_kind. (gfc_trans_omp_do): Handle EXEC_OMP_DISTRIBUTE. (GFC_OMP_SPLIT_DISTRIBUTE, GFC_OMP_SPLIT_TEAMS, GFC_OMP_SPLIT_TARGET, GFC_OMP_SPLIT_NUM, GFC_OMP_MASK_DISTRIBUTE, GFC_OMP_MASK_TEAMS, GFC_OMP_MASK_TARGET, GFC_OMP_MASK_NUM): New. (gfc_split_omp_clauses): Handle splitting of clauses for new EXEC_OMP_* codes. (gfc_trans_omp_do_simd): Add pblock argument, adjust for being callable for combined constructs. (gfc_trans_omp_parallel_do, gfc_trans_omp_parallel_do_simd): Likewise. (gfc_trans_omp_distribute, gfc_trans_omp_teams, gfc_trans_omp_target, gfc_trans_omp_target_data, gfc_trans_omp_target_update): New functions. (gfc_trans_omp_directive): Adjust gfc_trans_omp_* callers, handle new EXEC_OMP_* codes. 2014-06-10 Jakub Jelinek <jakub@redhat.com> PR fortran/60928 * f95-lang.c (gfc_init_builtin_functions): Handle -fopenmp-simd like -fopenmp. * openmp.c (resolve_omp_clauses): Remove allocatable components diagnostics. Add associate-name and intent(in) pointer diagnostics for various clauses, diagnose procedure pointers in reduction clause. * parse.c (match_word_omp_simd): New function. (matchs, matcho): New macros. (decode_omp_directive): Change match macros to either matchs or matcho. Handle -fopenmp-simd. (next_free, next_fixed): Handle -fopenmp-simd like -fopenmp. * scanner.c (skip_free_comments, skip_fixed_comments, include_line): Likewise. * trans-array.c (get_full_array_size): Rename to... (gfc_full_array_size): ... this. No longer static. (duplicate_allocatable): Adjust caller. Add NO_MEMCPY argument and handle it. (gfc_duplicate_allocatable, gfc_copy_allocatable_data): Adjust duplicate_allocatable callers. (gfc_duplicate_allocatable_nocopy): New function. (structure_alloc_comps): Adjust g*_full_array_size and duplicate_allocatable caller. * trans-array.h (gfc_full_array_size, gfc_duplicate_allocatable_nocopy): New prototypes. * trans-common.c (create_common): Call gfc_finish_decl_attrs. * trans-decl.c (gfc_finish_decl_attrs): New function. (gfc_finish_var_decl, create_function_arglist, gfc_get_fake_result_decl): Call it. (gfc_allocate_lang_decl): If DECL_LANG_SPECIFIC is already allocated, don't allocate it again. (gfc_get_symbol_decl): Set GFC_DECL_ASSOCIATE_VAR_P on associate-names. * trans.h (gfc_finish_decl_attrs): New prototype. (struct lang_decl): Add scalar_allocatable and scalar_pointer bitfields. (GFC_DECL_SCALAR_ALLOCATABLE, GFC_DECL_SCALAR_POINTER, GFC_DECL_GET_SCALAR_ALLOCATABLE, GFC_DECL_GET_SCALAR_POINTER, GFC_DECL_ASSOCIATE_VAR_P): Define. (GFC_POINTER_TYPE_P): Remove. * trans-openmp.c (gfc_omp_privatize_by_reference): Don't check GFC_POINTER_TYPE_P, instead test GFC_DECL_GET_SCALAR_ALLOCATABLE, GFC_DECL_GET_SCALAR_POINTER or GFC_DECL_CRAY_POINTEE on decl. (gfc_omp_predetermined_sharing): Associate-names are predetermined. (enum walk_alloc_comps): New. (gfc_has_alloc_comps, gfc_omp_unshare_expr_r, gfc_omp_unshare_expr, gfc_walk_alloc_comps): New functions. (gfc_omp_private_outer_ref): Return true for scalar allocatables or decls with allocatable components. (gfc_omp_clause_default_ctor, gfc_omp_clause_copy_ctor, gfc_omp_clause_assign_op, gfc_omp_clause_dtor): Fix up handling of allocatables, handle also OMP_CLAUSE_REDUCTION, handle scalar allocatables and decls with allocatable components. (gfc_trans_omp_array_reduction_or_udr): Don't handle allocatable arrays here. (gfc_trans_omp_reduction_list): Call gfc_trans_omp_array_reduction_or_udr even for allocatable scalars. (gfc_trans_omp_do_simd): If -fno-openmp, just expand it as OMP_SIMD. (gfc_trans_omp_parallel_do_simd): Likewise. * trans-types.c (gfc_sym_type): Don't set GFC_POINTER_TYPE_P. (gfc_get_derived_type): Call gfc_finish_decl_attrs. 2014-06-06 Jakub Jelinek <jakub@redhat.com> * dump-parse-tree.c (show_omp_namelist): Dump reduction id in each list item. (show_omp_node): Only handle OMP_LIST_REDUCTION, not OMP_LIST_REDUCTION_FIRST .. OMP_LIST_REDUCTION_LAST. Don't dump reduction id here. * frontend-passes.c (dummy_code_callback): Renamed to... (gfc_dummy_code_callback): ... this. No longer static. (optimize_reduction): Use gfc_dummy_code_callback instead of dummy_code_callback. * gfortran.h (gfc_statement): Add ST_OMP_DECLARE_REDUCTION. (symbol_attribute): Add omp_udr_artificial_var bitfield. (gfc_omp_reduction_op): New enum. (gfc_omp_namelist): Add rop and udr fields. (OMP_LIST_PLUS, OMP_LIST_REDUCTION_FIRST, OMP_LIST_MULT, OMP_LIST_SUB, OMP_LIST_AND, OMP_LIST_OR, OMP_LIST_EQV, OMP_LIST_NEQV, OMP_LIST_MAX, OMP_LIST_MIN, OMP_LIST_IAND, OMP_LIST_IOR, OMP_LIST_IEOR, OMP_LIST_REDUCTION_LAST): Removed. (OMP_LIST_REDUCTION): New. (gfc_omp_udr): New type. (gfc_get_omp_udr): Define. (gfc_symtree): Add n.omp_udr field. (gfc_namespace): Add omp_udr_root field, add omp_udr_ns bitfield. (gfc_free_omp_udr, gfc_omp_udr_find, gfc_resolve_omp_udrs, gfc_dummy_code_callback): New prototypes. * match.h (gfc_match_omp_declare_reduction): New prototype. * module.c (MOD_VERSION): Increase to 13. (omp_declare_reduction_stmt): New array. (mio_omp_udr_expr, write_omp_udr, write_omp_udrs, load_omp_udrs): New functions. (read_module): Read OpenMP user defined reductions. (write_module): Write OpenMP user defined reductions. * openmp.c: Include arith.h. (gfc_free_omp_udr, gfc_find_omp_udr): New functions. (gfc_match_omp_clauses): Handle user defined reductions. Store reduction kind into gfc_omp_namelist instead of using several OMP_LIST_* entries. (match_udr_expr, gfc_omp_udr_predef, gfc_omp_udr_find, gfc_match_omp_declare_reduction): New functions. (resolve_omp_clauses): Adjust for reduction clauses being only in OMP_LIST_REDUCTION list. Diagnose missing UDRs. (struct omp_udr_callback_data): New type. (omp_udr_callback, gfc_resolve_omp_udr, gfc_resolve_omp_udrs): New functions. * parse.c (decode_omp_directive): Handle !$omp declare reduction. (case_decl): Add ST_OMP_DECLARE_REDUCTION. (gfc_ascii_statement): Print ST_OMP_DECLARE_REDUCTION. * resolve.c (resolve_fl_variable): Allow len=: or len=* on sym->attr.omp_udr_artificial_var symbols. (resolve_types): Call gfc_resolve_omp_udrs. * symbol.c (gfc_get_uop): If gfc_current_ns->omp_udr_ns, use parent ns instead of gfc_current_ns. (gfc_get_sym_tree): Don't insert symbols into namespaces with omp_udr_ns set. (free_omp_udr_tree): New function. (gfc_free_namespace): Call it. * trans-openmp.c (struct omp_udr_find_orig_data): New type. (omp_udr_find_orig, gfc_trans_omp_udr_expr): New functions. (gfc_trans_omp_array_reduction): Renamed to... (gfc_trans_omp_array_reduction_or_udr): ... this. Remove SYM argument, instead pass gfc_omp_namelist pointer N. Handle user defined reductions. (gfc_trans_omp_reduction_list): Remove REDUCTION_CODE argument. Handle user defined reductions and reduction ops in gfc_omp_namelist. (gfc_trans_omp_clauses): Adjust for just a single OMP_LIST_REDUCTION list. (gfc_split_omp_clauses): Likewise. 2014-05-12 Tobias Burnus <burnus@net-b.de> PR fortran/60127 * openmp.c (resolve_omp_do): Reject do concurrent loops. 2014-05-11 Jakub Jelinek <jakub@redhat.com> * gfortran.h (gfc_statement): Add ST_OMP_CANCEL, ST_OMP_CANCELLATION_POINT, ST_OMP_TASKGROUP, ST_OMP_END_TASKGROUP, ST_OMP_SIMD, ST_OMP_END_SIMD, ST_OMP_DO_SIMD, ST_OMP_END_DO_SIMD, ST_OMP_PARALLEL_DO_SIMD, ST_OMP_END_PARALLEL_DO_SIMD and ST_OMP_DECLARE_SIMD. (gfc_omp_namelist): New typedef. (gfc_get_omp_namelist): Define. (OMP_LIST_UNIFORM, OMP_LIST_ALIGNED, OMP_LIST_LINEAR, OMP_LIST_DEPEND_IN, OMP_LIST_DEPEND_OUT): New clause list kinds. (gfc_omp_proc_bind_kind, gfc_omp_cancel_kind): New enums. (gfc_omp_clauses): Change type of lists to gfc_omp_namelist *. Add inbranch, notinbranch, cancel, proc_bind, safelen_expr and simdlen_expr fields. (gfc_omp_declare_simd): New typedef. (gfc_get_omp_declare_simd): Define. (gfc_namespace): Add omp_declare_simd field. (gfc_exec_op): Add EXEC_OMP_CANCEL, EXEC_OMP_CANCELLATION_POINT, EXEC_OMP_TASKGROUP, EXEC_OMP_SIMD, EXEC_OMP_DO_SIMD and EXEC_OMP_PARALLEL_DO_SIMD. (gfc_omp_atomic_op): Add GFC_OMP_ATOMIC_MASK, GFC_OMP_ATOMIC_SEQ_CST and GFC_OMP_ATOMIC_SWAP. (gfc_code): Change type of omp_namelist field to gfc_omp_namelist *. (gfc_free_omp_namelist, gfc_free_omp_declare_simd, gfc_free_omp_declare_simd_list, gfc_resolve_omp_declare_simd): New prototypes. * trans-stmt.h (gfc_trans_omp_declare_simd): New prototype. * symbol.c (gfc_free_namespace): Call gfc_free_omp_declare_simd. * openmp.c (gfc_free_omp_clauses): Free safelen_expr and simdlen_expr. Use gfc_free_omp_namelist instead of gfc_free_namelist. (gfc_free_omp_declare_simd, gfc_free_omp_declare_simd_list): New functions. (gfc_match_omp_variable_list): Add end_colon, headp and allow_sections arguments. Handle parsing of array sections. Use *omp_namelist* instead of *namelist* data structure and functions/macros. Allow termination at : character. (OMP_CLAUSE_ALIGNED, OMP_CLAUSE_DEPEND, OMP_CLAUSE_INBRANCH, OMP_CLAUSE_LINEAR, OMP_CLAUSE_NOTINBRANCH, OMP_CLAUSE_PROC_BIND, OMP_CLAUSE_SAFELEN, OMP_CLAUSE_SIMDLEN, OMP_CLAUSE_UNIFORM): Define. (gfc_match_omp_clauses): Change first and needs_space variables into arguments with default values. Parse inbranch, notinbranch, proc_bind, safelen, simdlen, uniform, linear, aligned and depend clauses. (OMP_PARALLEL_CLAUSES): Add OMP_CLAUSE_PROC_BIND. (OMP_DECLARE_SIMD_CLAUSES, OMP_SIMD_CLAUSES): Define. (OMP_TASK_CLAUSES): Add OMP_CLAUSE_DEPEND. (gfc_match_omp_do_simd): New function. (gfc_match_omp_flush): Use *omp_namelist* instead of *namelist* data structure and functions/macros. (gfc_match_omp_simd, gfc_match_omp_declare_simd, gfc_match_omp_parallel_do_simd): New functions. (gfc_match_omp_atomic): Handle seq_cst clause. Handle atomic swap. (gfc_match_omp_taskgroup, gfc_match_omp_cancel_kind, gfc_match_omp_cancel, gfc_match_omp_cancellation_point): New functions. (resolve_omp_clauses): Add where, omp_clauses and ns arguments. Use *omp_namelist* instead of *namelist* data structure and functions/macros. Resolve uniform, aligned, linear, depend, safelen and simdlen clauses. (resolve_omp_atomic): Adjust for GFC_OMP_ATOMIC_{MASK,SEQ_CST,SWAP} addition, recognize atomic swap. (gfc_resolve_omp_parallel_blocks): Use gfc_omp_namelist instead of gfc_namelist. Handle EXEC_OMP_PARALLEL_DO_SIMD the same as EXEC_OMP_PARALLEL_DO. (gfc_resolve_do_iterator): Use *omp_namelist* instead of *namelist* data structure and functions/macros. (resolve_omp_do): Likewise. Handle EXEC_OMP_SIMD, EXEC_OMP_DO_SIMD, EXEC_OMP_PARALLEL_DO_SIMD. (gfc_resolve_omp_directive): Handle EXEC_OMP_SIMD, EXEC_OMP_DO_SIMD, EXEC_OMP_PARALLEL_DO_SIMD and EXEC_OMP_CANCEL. Adjust resolve_omp_clauses caller. (gfc_resolve_omp_declare_simd): New function. * parse.c (decode_omp_directive): Parse cancellation point, cancel, declare simd, end do simd, end simd, end parallel do simd, end taskgroup, parallel do simd, simd and taskgroup directives. (case_executable): Add ST_OMP_CANCEL and ST_OMP_CANCELLATION_POINT. (case_exec_markers): Add ST_OMP_TASKGROUP, case ST_OMP_SIMD, ST_OMP_DO_SIMD and ST_OMP_PARALLEL_DO_SIMD. (case_decl): Add ST_OMP_DECLARE_SIMD. (gfc_ascii_statement): Handle ST_OMP_CANCEL, ST_OMP_CANCELLATION_POINT, ST_OMP_TASKGROUP, ST_OMP_END_TASKGROUP, ST_OMP_SIMD, ST_OMP_END_SIMD, ST_OMP_DO_SIMD, ST_OMP_END_DO_SIMD, ST_OMP_PARALLEL_DO_SIMD, ST_OMP_END_PARALLEL_DO_SIMD and ST_OMP_DECLARE_SIMD. (parse_omp_do): Handle ST_OMP_SIMD, ST_OMP_DO_SIMD and ST_OMP_PARALLEL_DO_SIMD. (parse_omp_atomic): Adjust for GFC_OMP_ATOMIC_* additions. (parse_omp_structured_block): Handle ST_OMP_TASKGROUP and ST_OMP_PARALLEL_DO_SIMD. (parse_executable): Handle ST_OMP_SIMD, ST_OMP_DO_SIMD, ST_OMP_PARALLEL_DO_SIMD and ST_OMP_TASKGROUP. * trans-decl.c (gfc_get_extern_function_decl, gfc_create_function_decl): Call gfc_trans_omp_declare_simd if needed. * frontend-passes.c (gfc_code_walker): Handle EXEC_OMP_SIMD, EXEC_OMP_DO_SIMD and EXEC_OMP_PARALLEL_DO_SIMD. Walk safelen_expr and simdlen_expr. Walk expressions in gfc_omp_namelist of depend, aligned and linear clauses. * match.c (match_exit_cycle): Handle EXEC_OMP_SIMD, EXEC_OMP_DO_SIMD and EXEC_OMP_PARALLEL_DO_SIMD. (gfc_free_omp_namelist): New function. * dump-parse-tree.c (show_namelist): Removed. (show_omp_namelist): New function. (show_omp_node): Handle OpenMP 4.0 additions. (show_code_node): Handle EXEC_OMP_CANCEL, EXEC_OMP_CANCELLATION_POINT, EXEC_OMP_DO_SIMD, EXEC_OMP_PARALLEL_DO_SIMD, EXEC_OMP_SIMD and EXEC_OMP_TASKGROUP. * match.h (gfc_match_omp_cancel, gfc_match_omp_cancellation_point, gfc_match_omp_declare_simd, gfc_match_omp_do_simd, gfc_match_omp_parallel_do_simd, gfc_match_omp_simd, gfc_match_omp_taskgroup): New prototypes. * trans-openmp.c (gfc_trans_omp_variable): Add declare_simd argument, handle it. Allow current_function_decl to be NULL. (gfc_trans_omp_variable_list): Add declare_simd argument, pass it through to gfc_trans_omp_variable and disregard whether sym is referenced if declare_simd is true. Work on gfc_omp_namelist instead of gfc_namelist. (gfc_trans_omp_reduction_list): Work on gfc_omp_namelist instead of gfc_namelist. Adjust gfc_trans_omp_variable caller. (gfc_trans_omp_clauses): Add declare_simd argument, pass it through to gfc_trans_omp_variable{,_list} callers. Work on gfc_omp_namelist instead of gfc_namelist. Handle inbranch, notinbranch, safelen, simdlen, depend, uniform, linear, proc_bind and aligned clauses. Handle cancel kind. (gfc_trans_omp_atomic): Handle seq_cst clause, handle atomic swap, adjust for GFC_OMP_ATOMIC_* changes. (gfc_trans_omp_cancel, gfc_trans_omp_cancellation_point): New functions. (gfc_trans_omp_do): Add op argument, handle simd translation into generic. (GFC_OMP_SPLIT_SIMD, GFC_OMP_SPLIT_DO, GFC_OMP_SPLIT_PARALLEL, GFC_OMP_SPLIT_NUM, GFC_OMP_MASK_SIMD, GFC_OMP_MASK_DO, GFC_OMP_MASK_PARALLEL): New. (gfc_split_omp_clauses, gfc_trans_omp_do_simd): New functions. (gfc_trans_omp_parallel_do): Rework to use gfc_split_omp_clauses. (gfc_trans_omp_parallel_do_simd, gfc_trans_omp_taskgroup): New functions. (gfc_trans_omp_directive): Handle EXEC_OMP_CANCEL, EXEC_OMP_CANCELLATION_POINT, EXEC_OMP_DO_SIMD, EXEC_OMP_PARALLEL_DO_SIMD, EXEC_OMP_SIMD and EXEC_OMP_TASKGROUP. Adjust gfc_trans_omp_do caller. (gfc_trans_omp_declare_simd): New function. * st.c (gfc_free_statement): Handle EXEC_OMP_CANCEL, EXEC_OMP_CANCELLATION_POINT, EXEC_OMP_DO_SIMD, EXEC_OMP_PARALLEL_DO_SIMD, EXEC_OMP_SIMD and EXEC_OMP_TASKGROUP. For EXEC_OMP_FLUSH call gfc_free_omp_namelist instead of gfc_free_namelist. * module.c (omp_declare_simd_clauses): New variable. (mio_omp_declare_simd): New function. (mio_symbol): Call it. * trans.c (trans_code): Handle EXEC_OMP_CANCEL, EXEC_OMP_CANCELLATION_POINT, EXEC_OMP_DO_SIMD, EXEC_OMP_PARALLEL_DO_SIMD, EXEC_OMP_SIMD and EXEC_OMP_TASKGROUP. * resolve.c (gfc_resolve_blocks): Handle EXEC_OMP_DO_SIMD, EXEC_OMP_PARALLEL_DO_SIMD, EXEC_OMP_SIMD and EXEC_OMP_TASKGROUP. (resolve_code): Handle EXEC_OMP_CANCEL, EXEC_OMP_CANCELLATION_POINT, EXEC_OMP_DO_SIMD, EXEC_OMP_PARALLEL_DO_SIMD, EXEC_OMP_SIMD and EXEC_OMP_TASKGROUP. (resolve_types): Call gfc_resolve_omp_declare_simd. gcc/testsuite/ 2014-06-30 Jakub Jelinek <jakub@redhat.com> Backported from mainline 2014-06-24 Jakub Jelinek <jakub@redhat.com> * gfortran.dg/gomp/udr2.f90 (f7, f9): Add !$omp parallel with reduction clause. * gfortran.dg/gomp/udr4.f90 (f4): Likewise. Remove Label is never defined expected error. * gfortran.dg/gomp/udr8.f90: New test. 2014-06-18 Jakub Jelinek <jakub@redhat.com> * gfortran.dg/gomp/declare-simd-1.f90: New test. * gfortran.dg/gomp/depend-1.f90: New test. * gfortran.dg/gomp/target1.f90: New test. * gfortran.dg/gomp/target2.f90: New test. * gfortran.dg/gomp/target3.f90: New test. * gfortran.dg/gomp/udr4.f90: Adjust expected diagnostics. * gfortran.dg/openmp-define-3.f90: Expect _OPENMP 201307 instead of 201107. 2014-06-10 Jakub Jelinek <jakub@redhat.com> PR fortran/60928 * gfortran.dg/gomp/allocatable_components_1.f90: Remove dg-error directives. * gfortran.dg/gomp/associate1.f90: New test. * gfortran.dg/gomp/intentin1.f90: New test. * gfortran.dg/gomp/openmp-simd-1.f90: New test. * gfortran.dg/gomp/openmp-simd-2.f90: New test. * gfortran.dg/gomp/openmp-simd-3.f90: New test. * gfortran.dg/gomp/proc_ptr_2.f90: New test. 2014-06-09 Jakub Jelinek <jakub@redhat.com> * gfortran.dg/gomp/udr6.f90 (f1, f2, f3): Use complex(kind=8) instead of complex(kind=16). 2014-06-06 Jakub Jelinek <jakub@redhat.com> * gfortran.dg/gomp/allocatable_components_1.f90: Adjust for reduction clause diagnostic changes. * gfortran.dg/gomp/appendix-a/a.31.3.f90: Likewise. * gfortran.dg/gomp/reduction1.f90: Likewise. * gfortran.dg/gomp/reduction3.f90: Likewise. * gfortran.dg/gomp/udr1.f90: New test. * gfortran.dg/gomp/udr2.f90: New test. * gfortran.dg/gomp/udr3.f90: New test. * gfortran.dg/gomp/udr4.f90: New test. * gfortran.dg/gomp/udr5.f90: New test. * gfortran.dg/gomp/udr6.f90: New test. * gfortran.dg/gomp/udr7.f90: New test. 2014-05-12 Tobias Burnus <burnus@net-b.de> PR fortran/60127 * gfortran.dg/gomp/omp_do_concurrent.f90: New. 2014-05-11 Jakub Jelinek <jakub@redhat.com> * gfortran.dg/gomp/affinity-1.f90: New test. libgomp/ 2014-06-30 Jakub Jelinek <jakub@redhat.com> Backported from mainline 2014-06-25 Jakub Jelinek <jakub@redhat.com> * testsuite/libgomp.fortran/simd5.f90: New test. * testsuite/libgomp.fortran/simd6.f90: New test. * testsuite/libgomp.fortran/simd7.f90: New test. 2014-06-24 Jakub Jelinek <jakub@redhat.com> * testsuite/libgomp.fortran/aligned1.f03: New test. * testsuite/libgomp.fortran/nestedfn5.f90: New test. * testsuite/libgomp.fortran/target7.f90: Surround loop spawning tasks with !$omp parallel !$omp single. * testsuite/libgomp.fortran/target8.f90: New test. * testsuite/libgomp.fortran/udr4.f90 (foo UDR, bar UDR): Adjust not to use trim in the combiner, instead call elemental function. (fn): New elemental function. * testsuite/libgomp.fortran/udr6.f90 (do_add, dp_add, dp_init): Make elemental. * testsuite/libgomp.fortran/udr7.f90 (omp_priv, omp_orig, omp_out, omp_in): Likewise. * testsuite/libgomp.fortran/udr12.f90: New test. * testsuite/libgomp.fortran/udr13.f90: New test. * testsuite/libgomp.fortran/udr14.f90: New test. * testsuite/libgomp.fortran/udr15.f90: New test. 2014-06-18 Jakub Jelinek <jakub@redhat.com> * omp_lib.f90.in (openmp_version): Set to 201307. * omp_lib.h.in (openmp_version): Likewise. * testsuite/libgomp.c/target-8.c: New test. * testsuite/libgomp.fortran/declare-simd-1.f90: Add notinbranch and inbranch clauses. * testsuite/libgomp.fortran/depend-3.f90: New test. * testsuite/libgomp.fortran/openmp_version-1.f: Adjust for new openmp_version. * testsuite/libgomp.fortran/openmp_version-2.f90: Likewise. * testsuite/libgomp.fortran/target1.f90: New test. * testsuite/libgomp.fortran/target2.f90: New test. * testsuite/libgomp.fortran/target3.f90: New test. * testsuite/libgomp.fortran/target4.f90: New test. * testsuite/libgomp.fortran/target5.f90: New test. * testsuite/libgomp.fortran/target6.f90: New test. * testsuite/libgomp.fortran/target7.f90: New test. 2014-06-10 Jakub Jelinek <jakub@redhat.com> PR fortran/60928 * testsuite/libgomp.fortran/allocatable9.f90: New test. * testsuite/libgomp.fortran/allocatable10.f90: New test. * testsuite/libgomp.fortran/allocatable11.f90: New test. * testsuite/libgomp.fortran/allocatable12.f90: New test. * testsuite/libgomp.fortran/alloc-comp-1.f90: New test. * testsuite/libgomp.fortran/alloc-comp-2.f90: New test. * testsuite/libgomp.fortran/alloc-comp-3.f90: New test. * testsuite/libgomp.fortran/associate1.f90: New test. * testsuite/libgomp.fortran/associate2.f90: New test. * testsuite/libgomp.fortran/procptr1.f90: New test. 2014-06-06 Jakub Jelinek <jakub@redhat.com> * testsuite/libgomp.fortran/simd1.f90: New test. * testsuite/libgomp.fortran/udr1.f90: New test. * testsuite/libgomp.fortran/udr2.f90: New test. * testsuite/libgomp.fortran/udr3.f90: New test. * testsuite/libgomp.fortran/udr4.f90: New test. * testsuite/libgomp.fortran/udr5.f90: New test. * testsuite/libgomp.fortran/udr6.f90: New test. * testsuite/libgomp.fortran/udr7.f90: New test. * testsuite/libgomp.fortran/udr8.f90: New test. * testsuite/libgomp.fortran/udr9.f90: New test. * testsuite/libgomp.fortran/udr10.f90: New test. * testsuite/libgomp.fortran/udr11.f90: New test. 2014-05-27 Uros Bizjak <ubizjak@gmail.com> * testsuite/libgomp.fortran/declare-simd-1.f90: Require vect_simd_clones effective target. * testsuite/libgomp.fortran/declare-simd-2.f90: Ditto. 2014-05-11 Jakub Jelinek <jakub@redhat.com> * testsuite/libgomp.fortran/cancel-do-1.f90: New test. * testsuite/libgomp.fortran/cancel-do-2.f90: New test. * testsuite/libgomp.fortran/cancel-parallel-1.f90: New test. * testsuite/libgomp.fortran/cancel-parallel-3.f90: New test. * testsuite/libgomp.fortran/cancel-sections-1.f90: New test. * testsuite/libgomp.fortran/cancel-taskgroup-2.f90: New test. * testsuite/libgomp.fortran/declare-simd-1.f90: New test. * testsuite/libgomp.fortran/declare-simd-2.f90: New test. * testsuite/libgomp.fortran/declare-simd-3.f90: New test. * testsuite/libgomp.fortran/depend-1.f90: New test. * testsuite/libgomp.fortran/depend-2.f90: New test. * testsuite/libgomp.fortran/omp_atomic5.f90: New test. * testsuite/libgomp.fortran/simd1.f90: New test. * testsuite/libgomp.fortran/simd2.f90: New test. * testsuite/libgomp.fortran/simd3.f90: New test. * testsuite/libgomp.fortran/simd4.f90: New test. * testsuite/libgomp.fortran/taskgroup1.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@212157 138bc75d-0d04-0410-961f-82ee72b054a4
* Backport from trunkfxcoudert2014-06-152-2/+9
| | | | | | | | | | | | PR fortran/45187 * trans-decl.c (gfc_create_module_variable): Don't create Cray-pointee decls twice. * gfortran.dg/cray_pointers_10.f90: New file. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@211687 138bc75d-0d04-0410-961f-82ee72b054a4
* 2014-06-09 Paul Thomas <pault@gcc.gnu.org>pault2014-06-092-2/+12
| | | | | | | | | | | | | | PR fortran/61406 * trans-stmt.c (trans_associate_var): Check that array constructors are constant for direct reference. 2014-06-09 Paul Thomas <pault@gcc.gnu.org> PR fortran/61406 * gfortran.dg/associate_17.f90 : New test git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@211375 138bc75d-0d04-0410-961f-82ee72b054a4
* 2014-06-05 Richard Biener <rguenther@suse.de>rguenth2014-06-052-37/+10
| | | | | | | | | | | | PR fortran/61418 * gfortranspec.c (spec_file): Remove. (find_spec_file): Likewise. (lang_specific_driver): Do not look for specs file in -L or append -specs command line argument. (lang_specific_pre_link): Always %:include libgfortran.spec. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@211281 138bc75d-0d04-0410-961f-82ee72b054a4
* 2014-05-29 Thomas Koenig <tkoenig@gcc.gnu.org>tkoenig2014-05-292-2/+31
| | | | | | | | | | | | | | | | | | PR fortran/60834 * frontend-passes.c (in_assoc_list): New variable. (optimize_namespace): Initialize in_assoc_list (combine_array_constructor): Don't try to combine assoc lists. (gfc_code_walker): Keep track of in_assoc_list. 2014-05-29 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/60834 * gfortran.dg/associate_16.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@211052 138bc75d-0d04-0410-961f-82ee72b054a4
* PR 61310 Rewrite implementation of CTIME and FDATE intrinsics.jb2014-05-262-4/+9
| | | | | | | | | | | | | | | | | | | | | | | 2014-05-26 Janne Blomqvist <jb@gcc.gnu.org> Backport from mainline PR libfortran/61310 * intrinsics.texi (CTIME): Remove mention of locale-dependent behavior. 2014-05-26 Janne Blomqvist <jb@gcc.gnu.org> Backport from mainline PR libfortran/61310 * intrinsics/ctime.c (strctime): Rename to gf_ctime, use snprintf instead of strftime. (fdate): Use gf_ctime. (fdate_sub): Likewise. (ctime): Likewise. (ctime_sub): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@210941 138bc75d-0d04-0410-961f-82ee72b054a4
* 2014-04-22 Tobias Burnus <burnus@net-b.de>burnus2014-04-222-6/+46
| | | | | | | | | | | | | | | | | | | | | | | Backport from mainline 2014-04-11 Tobias Burnus <burnus@net-b.de> PR fortran/58880 PR fortran/60495 * resolve.c (gfc_resolve_finalizers): Ensure that vtables and finalization wrappers are generated. 2014-04-22 Tobias Burnus <burnus@net-b.de> Backport from mainline 2014-04-11 Tobias Burnus <burnus@net-b.de> PR fortran/58880 PR fortran/60495 * gfortran.dg/finalize_25.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@209662 138bc75d-0d04-0410-961f-82ee72b054a4
* Mark ChangeLoggccadmin2014-04-221-0/+4
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@209598 138bc75d-0d04-0410-961f-82ee72b054a4
* 2014-04-13 Paul Thomas <pault@gcc.gnu.org>pault2014-04-135-8/+30
| | | | | | | | | | | | | | | | | | | | | | | PR fortran/58085 PR fortran/60717 * trans.h: Add 'use_offset' bitfield to gfc_se. * trans-array.c (gfc_conv_expr_descriptor): Use 'use_offset' as a trigger to unconditionally recalculate the offset for array slices and constant arrays. trans-expr.c (gfc_conv_intrinsic_to_class): Use it. trans-stmt.c (trans_associate_var): Ditto. (gfc_conv_procedure_call): Ditto. 2014-04-13 Paul Thomas <pault@gcc.gnu.org> PR fortran/60717 * gfortran.dg/unlimited_polymorphic_17.f90: New test. PR fortran/58085 * gfortran.dg/associate_15.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@209346 138bc75d-0d04-0410-961f-82ee72b054a4
* Improve RANDOM_SEED documentation example.jb2014-04-112-24/+32
| | | | | | | | | 2014-04-11 Janne Blomqvist <jb@gcc.gnu.org> * intrinsic.texi (RANDOM_SEED): Improve example. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@209301 138bc75d-0d04-0410-961f-82ee72b054a4
* moved this ChangeLog entry to fortran/ChangeLogedlinger2014-04-101-0/+7
| | | | | | | | | | | | | 2014-04-04 Bernd Edlinger <bernd.edlinger@hotmail.de> PR fortran/60191 * fortran/trans-types.c (gfc_get_function_type): In case of recursion build a variadic function type with empty argument list instead of a stdarg-like function type with incomplete argument list. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@209282 138bc75d-0d04-0410-961f-82ee72b054a4
* PR lto/60567jakub2014-04-101-0/+5
| | | | | | | | | | * ipa.c (function_and_variable_visibility): Copy forced_by_abi flag from decl_node to node. * g++.dg/lto/pr60567_0.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@209280 138bc75d-0d04-0410-961f-82ee72b054a4
* gcc:edlinger2014-04-101-2/+2
| | | | | | | | | | | | | | | | 2014-04-10 Bernd Edlinger <bernd.edlinger@hotmail.de> * fortran/class.c (gfc_build_class_symbol): Append "_t" to target class names to make the generated type names unique. testsuite: 2014-04-10 Bernd Edlinger <bernd.edlinger@hotmail.de> * gfortran.dg/class_nameclash.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@209277 138bc75d-0d04-0410-961f-82ee72b054a4
* 2014-04-04 Tobias Burnus <burnus@net-b.de>burnus2014-04-042-2/+6
| | | | | | | | * check.c (gfc_check_cmplx): Fix typo. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@209133 138bc75d-0d04-0410-961f-82ee72b054a4
* 2014-04-04 Bernd Edlinger <bernd.edlinger@hotmail.de>edlinger2014-04-041-18/+8
| | | | | | | | | | PR fortran/60191 * fortran/trans-types.c (gfc_get_function_type): In case of recursion build a variadic function type with empty argument list instead of a stdarg-like function type with incomplete argument list. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@209091 138bc75d-0d04-0410-961f-82ee72b054a4
* Add PR60576 to the ChangeLog entry.jakub2014-03-281-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208920 138bc75d-0d04-0410-961f-82ee72b054a4
* 2014-03-28 Mikael Morin <mikael@gcc.gnu.org>burnus2014-03-282-1/+12
| | | | | | | | | | | | Tobias Burnus <burnus@net-b.de> PR fortran/ * trans-expr.c (gfc_conv_derived_to_class): Avoid generation of out-of-bounds range expr. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208918 138bc75d-0d04-0410-961f-82ee72b054a4
* fortran/mikael2014-03-282-2/+8
| | | | | | | | | | PR fortran/60677 * trans-intrinsic.c (gfc_conv_intrinsic_ichar): Enlarge argument list buffer. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208913 138bc75d-0d04-0410-961f-82ee72b054a4
* 2014-04-27 Thomas Koenig <tkoenig@gcc.gnu.org>tkoenig2014-03-272-2/+31
| | | | | | | | | | | | | | | PR fortran/60522 * frontend-passes.c (cfe_code): Do not walk subtrees for WHERE. 2014-04-27 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/60522 * gfortran.dg/where_4.f90: New test case. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208883 138bc75d-0d04-0410-961f-82ee72b054a4
* 2014-03-27 Tobias Burnus <burnus@net-b.de>burnus2014-03-272-2/+10
| | | | | | | | | | | | | | | PR fortran/58880 * trans-expr.c (gfc_conv_scalar_to_descriptor): Fix handling of nonpointers. 2014-03-27 Tobias Burnus <burnus@net-b.de> PR fortran/58880 * gfortran.dg/finalize_24.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208879 138bc75d-0d04-0410-961f-82ee72b054a4
* PR fortran/34928dominiq2014-03-262-0/+18
| | | | | | | | * fortran.texi: Document Volatile COMMON as not supported. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208852 138bc75d-0d04-0410-961f-82ee72b054a4
* PR debug/60603jakub2014-03-222-0/+7
| | | | | | | | | | | | | | c-family/ * c-opts.c (c_finish_options): Restore cb_file_change call to <built-in>. fortran/ * cpp.c (gfc_cpp_init): Restore cb_change_file call to <built-in>. testsuite/ * gcc.dg/debug/dwarf2/dwarf2-macro2.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208763 138bc75d-0d04-0410-961f-82ee72b054a4
* 2014-03-21 Jerry DeLisle <jvdelisle@gcc.gnu.org>jvdelisle2014-03-212-0/+11
| | | | | | | | PR fortran/60148 * gfortran.texi: Add description of namelist DELIM= behavior. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208757 138bc75d-0d04-0410-961f-82ee72b054a4
* 2014-03-19 Tobias Burnus <burnus@net-b.>burnus2014-03-203-6/+11
| | | | | | | | | | PR fortran/60543 * io.c (check_io_constraints): Use gfc_unset_implicit_pure. * resolve.c (resolve_ordinary_assign): Ditto. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208693 138bc75d-0d04-0410-961f-82ee72b054a4
* 2014-03-18 Tobias Burnus <burnus@net-b.de>burnus2014-03-1910-58/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR fortran/60543 PR fortran/60283 * gfortran.h (gfc_unset_implicit_pure): New prototype. * resolve.c (gfc_unset_implicit_pure): New. (resolve_structure_cons, resolve_function, pure_subroutine): Use it. * decl.c (match_old_style_init, gfc_match_data, match_pointer_init, variable_decl): Ditto. * expr.c (gfc_check_pointer_assign): Ditto. * intrinsic.c (gfc_intrinsic_sub_interface): Ditto. * io.c (match_vtag, gfc_match_open, gfc_match_close, match_filepos, gfc_match_inquire, gfc_match_print, gfc_match_wait): Ditto. * match.c (gfc_match_critical, gfc_match_stopcode, lock_unlock_statement, sync_statement, gfc_match_allocate, gfc_match_deallocate): Ditto. * parse.c (decode_omp_directive): Ditto. * symbol.c (gfc_add_save): Ditto. 2014-03-18 Tobias Burnus <burnus@net-b.de> PR fortran/60543 PR fortran/60283 * gfortran.dg/implicit_pure_4.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208687 138bc75d-0d04-0410-961f-82ee72b054a4
* 2014-03-18 Janus Weil <janus@gcc.gnu.org>janus2014-03-182-5/+9
| | | | | | | | | | | | | | | | | | | | | PR fortran/55207 PR fortran/60549 * decl.c (match_attr_spec): Revert r208590. 2014-03-18 Janus Weil <janus@gcc.gnu.org> PR fortran/55207 PR fortran/60549 * gfortran.dg/assumed_rank_7.f90: Revert r208590. * gfortran.dg/c_ptr_tests_16.f90: Ditto. * gfortran.dg/inline_sum_bounds_check_1.f90: Ditto. * gfortran.dg/intent_optimize_1.f90: Ditto. * gfortran.dg/pointer_init_9.f90: Ditto. * gfortran.dg/volatile4.f90: Ditto. * gfortran.dg/volatile6.f90: Ditto. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208668 138bc75d-0d04-0410-961f-82ee72b054a4
* PR ipa/58721jakub2014-03-188-65/+131
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gcc/ * internal-fn.c: Include diagnostic-core.h. (expand_BUILTIN_EXPECT): New function. * gimplify.c (gimplify_call_expr): Use false instead of FALSE. (gimplify_modify_expr): Gimplify 3 argument __builtin_expect into IFN_BUILTIN_EXPECT call instead of __builtin_expect builtin call. * ipa-inline-analysis.c (find_foldable_builtin_expect): Handle IFN_BUILTIN_EXPECT. * predict.c (expr_expected_value_1): Handle IFN_BUILTIN_EXPECT. Revert 3 argument __builtin_expect code. (strip_predict_hints): Handle IFN_BUILTIN_EXPECT. * gimple-fold.c (gimple_fold_call): Likewise. * tree.h (fold_builtin_expect): New prototype. * builtins.c (build_builtin_expect_predicate): Add predictor argument, if non-NULL, create 3 argument __builtin_expect. (fold_builtin_expect): No longer static. Add ARG2 argument, pass it through to build_builtin_expect_predicate. (fold_builtin_2): Adjust caller. (fold_builtin_3): Handle BUILT_IN_EXPECT. * internal-fn.def (BUILTIN_EXPECT): New. gcc/fortran/ * trans.c (gfc_unlikely, gfc_likely): Don't add __builtin_expect if !optimize. 2014-03-18 Tobias Burnus <burnus@net-b.de> PR ipa/58721 gcc/ * predict.def (PRED_FORTRAN_OVERFLOW, PRED_FORTRAN_FAIL_ALLOC, PRED_FORTRAN_FAIL_IO, PRED_FORTRAN_WARN_ONCE, PRED_FORTRAN_SIZE_ZERO, PRED_FORTRAN_INVALID_BOUND, PRED_FORTRAN_ABSENT_DUMMY): Add. gcc/fortran/ * trans.h (gfc_unlikely, gfc_likely): Add predictor as argument. (gfc_trans_io_runtime_check): Remove. * trans-io.c (gfc_trans_io_runtime_check): Make static; add has_iostat as argument, add predictor to block. (set_parameter_value, gfc_trans_open, gfc_trans_close, build_filepos, gfc_trans_inquire, gfc_trans_wait, build_dt): Update calls. * trans.c (gfc_unlikely, gfc_likely): Add predictor as argument. (gfc_trans_runtime_check, gfc_allocate_using_malloc, gfc_allocate_allocatable, gfc_deallocate_with_status): Set explicitly branch predictor. * trans-expr.c (gfc_conv_procedure_call): Ditto. * trans-stmt.c (gfc_trans_allocate): Ditto. * trans-array.c (gfc_array_init_size, gfc_array_allocate): Ditto. 2014-03-18 Jan Hubicka <hubicka@ucw.cz> PR ipa/58721 gcc/ * predict.c (combine_predictions_for_bb): Fix up formatting. (expr_expected_value_1, expr_expected_value): Add predictor argument, fill what it points to if non-NULL. (tree_predict_by_opcode): Adjust caller, use the predictor. * predict.def (PRED_COMPARE_AND_SWAP): Add. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208641 138bc75d-0d04-0410-961f-82ee72b054a4
* 2014-03-15 Janus Weil <janus@gcc.gnu.org>janus2014-03-152-3/+11
| | | | | | | | | | | | | | | | | | | | | | PR fortran/55207 * decl.c (match_attr_spec): Variables in the main program implicitly get the SAVE attribute in Fortran 2008. 2014-03-15 Janus Weil <janus@gcc.gnu.org> PR fortran/55207 * gfortran.dg/assumed_rank_7.f90: Explicitly deallocate variables. * gfortran.dg/c_ptr_tests_16.f90: Put into subroutine. * gfortran.dg/inline_sum_bounds_check_1.f90: Add -Wno-aggressive-loop-optimizations and remove an unused variable. * gfortran.dg/intent_optimize_1.f90: Put into subroutine. * gfortran.dg/pointer_init_9.f90: New. * gfortran.dg/volatile4.f90: Put into subroutine. * gfortran.dg/volatile6.f90: Ditto. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208590 138bc75d-0d04-0410-961f-82ee72b054a4
* fortran/mikael2014-03-142-1/+50
| | | | | | | | | | | | | | PR fortran/60392 * trans-array.c (gfc_conv_array_parameter): Don't reuse the descriptor if it has transposed dimensions. testsuite/ PR fortran/60392 * gfortran.dg/transpose_4.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208581 138bc75d-0d04-0410-961f-82ee72b054a4
* 2014-03-08 Tobias Burnus <burnus@net-b.de>burnus2014-03-083-8/+11
| | | | | | | | | | | PR fortran/60447 * f95-lang.c (gfc_init): Return false when only preprocessing. * options.c (gfc_post_options): Ditto. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208431 138bc75d-0d04-0410-961f-82ee72b054a4
* 2014-03-08 Tobias Burnus <burnus@net-b.de>burnus2014-03-082-6/+20
| | | | | | | | | | | * gfortran.texi (Fortran 2003 Status): Mention finalization, deferred-length character support and input rounding. (Fortran 2008 Status): Mention that at termination signalling exceptions are shown. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208429 138bc75d-0d04-0410-961f-82ee72b054a4
* 2014-03-06 Paul Thomas <pault@gcc.gnu.org>janus2014-03-0611-28/+202
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Janus Weil <janus@gcc.gnu.org> PR fortran/51976 * gfortran.h (symbol_attribute): Add deferred_parameter attribute. * primary.c (build_actual_constructor): It is not an error if a missing component has the deferred_parameter attribute; equally, if one is given a value, it is an error. * resolve.c (resolve_fl_derived0): Remove error for deferred character length components. Add the hidden string length field to the structure. Give it the deferred_parameter attribute. * trans-array.c (duplicate_allocatable): Add a strlen field which is used as the element size if it is non-null. (gfc_duplicate_allocatable, gfc_copy_allocatable_data): Pass a NULL to the new argument in duplicate_allocatable. (structure_alloc_comps): Set the hidden string length as appropriate. Use it in calls to duplicate_allocatable. (gfc_alloc_allocatable_for_assignment): When a deferred length backend declaration is variable, use that; otherwise use the string length from the expression evaluation. * trans-expr.c (gfc_conv_component_ref): If this is a deferred character length component, the string length should have the value of the hidden string length field. (gfc_trans_subcomponent_assign): Set the hidden string length field for deferred character length components. Allocate the necessary memory for the string. (alloc_scalar_allocatable_for_assignment): Same change as in gfc_alloc_allocatable_for_assignment above. * trans-stmt.c (gfc_trans_allocate): Likewise. * trans-intrinsic (size_of_string_in_bytes): Make non-static. * trans-types.c (gfc_get_derived_type): Set the tree type for a deferred character length component. * trans.c (gfc_deferred_strlen): New function. * trans.h (size_of_string_in_bytes,gfc_deferred_strlen): New prototypes. 2014-03-06 Paul Thomas <pault@gcc.gnu.org> Janus Weil <janus@gcc.gnu.org> PR fortran/51976 * gfortran.dg/deferred_type_component_1.f90 : New test. * gfortran.dg/deferred_type_component_2.f90 : New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208386 138bc75d-0d04-0410-961f-82ee72b054a4
* fortran/mikael2014-03-012-0/+8
| | | | | | | | | | | | | | PR fortran/60341 * frontend-passes.c (optimize_comparison): Guard two union accesses with the corresponding tag checks. testsuite/ PR fortran/60341 * gfortran.dg/str_comp_optimize_1.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208249 138bc75d-0d04-0410-961f-82ee72b054a4
* 2014-02-28 Janus Weil <janus@gcc.gnu.org>janus2014-02-282-16/+22
| | | | | | | | | | | | | | | PR fortran/60359 * class.c (find_intrinsic_vtab): Prevent duplicate creation of copy procedure for characters. 2014-02-28 Janus Weil <janus@gcc.gnu.org> PR fortran/60359 * gfortran.dg/unlimited_polymorphic_16.f90: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208227 138bc75d-0d04-0410-961f-82ee72b054a4
OpenPOWER on IntegriCloud