1. 11 May, 2017 1 commit
    • dumpfle.h (dump_function): Declare here ... · c24e924f
      	* dumpfle.h (dump_function): Declare here ...
      	* tree-dump.h (dump_function): ... not here.
      	* dumpfile.c: #include tree-cfg.h.
      	(dump_function): Move here from ...
      	* tree-dump.c (dump_function): ... here.
      	* gimplify.c: #include splay-tree.h, not tree-dump.h.
      	* graphite-poly.c: Don't include tree-dump.h.
      	* cgraphclones.c: Include dumpfile.h not tree-dump.h.
      	* print-tree.c: Likewise.
      	* stor-layout.c: Likewise.
      	* tree-nested.c: Likewise.
      
      	c/
      	* gimple-parser.c: Don't #include tree-dump.h.
      
      	fortran/
      	* trans-decl.c: Include dumpfile.h not tree-dump.h,
      
      From-SVN: r247916
      Nathan Sidwell committed
  2. 01 May, 2017 1 commit
    • re PR c++/80038 (Random segfault using local vectors in Cilk function) · 815d9cc6
      2017-05-01  Xi Ruoyao  <ryxi@stu.xidian.edu.cn>
      
              PR c++/80038
      	* cilk_common.c (expand_builtin_cilk_detach): Move pedigree
      	operations here.
      	* gimplify.c (gimplify_cilk_detach): New function.
      	(gimplify_call_expr, gimplify_modify_expr): Call it as needed.
      	* tree-core.h: Document EXPR_CILK_SPAWN.
      	* tree.h (EXPR_CILK_SPAWN): Define.
      
              PR c++/80038
      	* c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
      	prototype.
      	(cilk_install_body_pedigree_operations): Likewise.
      	* cilk.c (cilk_set_spawn_marker): Mark functions that should be
      	detatched.
      	(cilk_gimplify_call_params_in_spawned_fn): Remove.
      	(cilk_install_body_pedigree_operations): Likewise.
      	(gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
      	unwrapping.
      
              PR c++/80038
      	* c-gimplify.c (c_gimplify_expr): Remove calls to
      	cilk_gimplifY_call_params_in_spawned_fn.
      
              PR c++/80038
      	* cp-cilkplus.c (cilk_install_body_with_frame_cleanup): Don't
      	add pedigree operation and detach call here.
      	* cp-gimplify.c (cp_gimplify_expr): Remove the calls to
      	cilk_cp_gimplify_call_params_in_spawned_fn.
      	(cilk_cp_gimplify_call_params_in_spawned_fn): Remove function.
      	* semantics.c (simplify_aggr_init_expr): Copy EXPR_CILK_SPAWN.
      
              PR c++/80038
      	* lto-lang.c (lto_init): Set in_lto_p earlier.
      
      	PR c++/80038
      	* g++.dg/cilk-plus/CK/pr80038.cc: New test.
      
      From-SVN: r247446
      Xi Ruoyao committed
  3. 10 Apr, 2017 1 commit
  4. 30 Mar, 2017 1 commit
    • re PR translation/80189 (gimplify.c: check whether parallel/task/teams should be translated) · 724d25f3
      	PR translation/80189
      	* gimplify.c (omp_default_clause): Use %qs instead of %s in
      	diagnostic messages.
      testsuite/
      	* g++.dg/gomp/predetermined-1.C: Adjust expected diagnostics.
      	* g++.dg/gomp/sharing-1.C: Likewise.
      	* gfortran.dg/gomp/pr44536.f90: Likewise.
      	* gfortran.dg/gomp/pr44036-1.f90: Likewise.
      	* gfortran.dg/gomp/sharing-3.f90: Likewise.
      	* gfortran.dg/gomp/crayptr3.f90: Likewise.
      	* gfortran.dg/gomp/pr33439.f90: Likewise.
      	* gfortran.dg/gomp/appendix-a/a.24.1.f90: Likewise.
      	* gfortran.dg/gomp/sharing-1.f90: Likewise.
      	* gfortran.dg/gomp/sharing-2.f90: Likewise.
      	* gcc.dg/gomp/appendix-a/a.24.1.c: Likewise.
      	* gcc.dg/gomp/sharing-1.c: Likewise.
      
      From-SVN: r246599
      Jakub Jelinek committed
  5. 23 Mar, 2017 1 commit
  6. 22 Mar, 2017 2 commits
  7. 21 Mar, 2017 1 commit
  8. 08 Mar, 2017 1 commit
  9. 20 Feb, 2017 1 commit
  10. 09 Feb, 2017 2 commits
    • re PR c/79431 (ICE in get, at cgraph.h:397) · 56f71478
      	PR c/79431
      	* gimplify.c (gimplify_adjust_omp_clauses): Ignore
      	"omp declare target link" attribute unless is_global_var.
      	* omp-offload.c (find_link_var_op): Likewise.
      c/
      	* c-parser.c (c_parser_omp_declare_target): Don't invoke
      	symtab_node::get on automatic variables.
      cp/
      	* parser.c (cp_parser_oacc_declare): Formatting fix.
      	(cp_parser_omp_declare_target): Don't invoke symtab_node::get on
      	automatic variables.
      testsuite/
      	* c-c++-common/gomp/pr79431.c: New test.
      
      From-SVN: r245302
      Jakub Jelinek committed
    • gimplify.c (gimplify_scan_omp_clauses): No special handling for OMP_CLAUSE_TILE. · 02889d23
      2017-02-09  Nathan Sidwell  <nathan@codesourcery.com>
      	    Cesar Philippidis  <cesar@codesourcery.com>
      	    Joseph Myers  <joseph@codesourcery.com>
      	    Chung-Lin Tang  <cltang@codesourcery.com>
      
      	gcc/
      	* gimplify.c (gimplify_scan_omp_clauses): No special handling for
      	OMP_CLAUSE_TILE.
      	(gimplify_adjust_omp_clauses): Don't delete TILE.
      	(gimplify_omp_for): Deal with TILE.
      	* internal-fn.c (expand_GOACC_TILE): New function.
      	* internal-fn.def (GOACC_DIM_POS): Comment may be overly conservative.
      	(GOACC_TILE): New.
      	* omp-expand.c (struct oacc_collapse): Add tile and outer fields.
      	(expand_oacc_collapse_init): Add LOC paramter.  Initialize tile
      	element fields.
      	(expand_oacc_collapse_vars): Add INNER parm, adjust for tiling,
      	avoid DIV for outermost collapse var.
      	(expand_oacc_for): Insert tile element loop as needed.  Adjust.
      	Remove out of date comments, fix whitespace.
      	* omp-general.c (omp_extract_for_data): Deal with tiling.
      	* omp-general.h (enum oacc_loop_flags): Add OLF_TILE flag,
      	adjust OLF_DIM_BASE value.
      	(struct omp_for_data): Add tiling field.
      	* omp-low.c (scan_sharing_clauses): Allow OMP_CLAUSE_TILE.
      	(lower_oacc_head_mark): Add OLF_TILE as appropriate.  Ensure 2 levels
      	for auto loops.  Remove default auto determining, moved to
      	oacc_loop_fixed_partitions.
      	* omp-offload.c (struct oacc_loop): Change 'ifns' to vector of call
      	stmts, add e_mask field.
      	(oacc_dim_call): New function, abstracted out from oacc_thread_numbers.
      	(oacc_thread_numbers): Use oacc_dim_call.
      	(oacc_xform_tile): New.
      	(new_oacc_loop_raw): Initialize e_mask, adjust for ifns vector.
      	(finish_oacc_loop): Adjust for ifns vector.
      	(oacc_loop_discover_walk): Append loop abstraction sites to list,
      	add case for GOACC_TILE fns.
      	(oacc_loop_xform_loop): Delete.
      	(oacc_loop_process): Iterate over call list directly, and add
      	handling for GOACC_TILE fns.
      	(oacc_loop_fixed_partitions): Determine default auto, deal with TILE,
      	dump partitioning.
      	(oacc_loop_auto_partitions): Add outer_assign parm. Assign all but
      	vector partitioning to outer loops.  Assign 2 partitions to loops
      	when available. Add TILE handling.
      	(oacc_loop_partition): Adjust oacc_loop_auto_partitions call.
      	(execite_oacc_device_lower): Process GOACC_TILE fns, ignore unknown specs.
      	* tree-nested.c (convert_nonlocal_omp_clauses): Allow OMP_CLAUSE_TILE.
      	* tree.c (omp_clause_num_ops): Adjust TILE ops.
      	* tree.h (OMP_CLAUSE_TILE_ITERVAR, OMP_CLAUSE_TILE_COUNT): New.
      
      	gcc/c/
      	* c-parser.c (c_parser_omp_clause_collapse): Disallow tile.
      	(c_parser_oacc_clause_tile): Disallow collapse. Fix parsing and
      	semantic checking.
      	* c-parser.c (c_parser_omp_for_loop): Accept tiling constructs.
      
      	gcc/cp/
      	* parser.c (cp_parser_oacc_clause_tile): Disallow collapse.  Fix
      	parsing.  Parse constant expression. Remove semantic checking.
      	(cp_parser_omp_clause_collapse): Disallow tile.
      	(cp_parser_omp_for_loop): Deal with tile clause.  Don't emit a parse
      	error about missing for after already emitting one.  Use more
      	conventional for idiom for unbounded loop.
      	* pt.c (tsubst_omp_clauses): Handle OMP_CLAUSE_TILE.
      	* semantics.c (finish_omp_clauses): Correct TILE semantic check.
      	(finish_omp_for): Deal with tile clause.
      
      	gcc/fortran/
      	* openmp.c (resolve_omp_clauses): Error on directives
      	containing both tile and collapse clauses.
      	(resolve_oacc_loop_blocks): Represent '*' tile arguments as zero.
      	* trans-openmp.c (gfc_trans_omp_do): Lower tiled loops like
      	collapsed loops.
      
      	gcc/testsuite/
      	* c-c++-common/goacc/combined-directives.c: Remove xfail.
      	* c-c++-common/goacc/loop-auto-1.c: Adjust and add additional case.
      	* c-c++-common/goacc/loop-auto-2.c: New.
      	* c-c++-common/goacc/tile.c: Include stdbool, fix expected errors.
      	* c-c++-common/goacc/tile-2.c: New.
      	* g++.dg/goacc/template.C: Test tile subst.  Adjust erroneous uses.
      	* g++.dg/goacc/tile-1.C: New, check tile subst.
      	* gcc.dg/goacc/loop-processing-1.c: Adjust dg-final pattern.
      	* gfortran.dg/goacc/combined-directives.f90: Remove xfail.
      	* gfortran.dg/goacc/tile-1.f90: New test.
      	* gfortran.dg/goacc/tile-2.f90: New test.
      	* gfortran.dg/goacc/tile-lowering.f95: New test.
      
      	libgomp/
      	* testsuite/libgomp.oacc-c-c++-common/tile-1.c: New.
      	* testsuite/libgomp.oacc-c-c++-common/loop-auto-1.c: Adjust and
      	add additional case.
      	* testsuite/libgomp.oacc-c-c++-common/vprop.c: XFAIL under
      	"openacc_nvidia_accel_selected".
      	* libgomp.oacc-fortran/nested-function-1.f90 (test2):
      	Add num_workers(8) clause.
      
      From-SVN: r245300
      Chung-Lin Tang committed
  11. 26 Jan, 2017 1 commit
    • re PR middle-end/79212 (internal compiler error: in… · ebff5c3f
      re PR middle-end/79212 (internal compiler error: in maybe_lookup_decl_in_outer_ctx, at omp-low.c:4134)
      
      2017-01-26  David Sherwood  <david.sherwood@arm.com>
      
          gcc/
      	PR middle-end/79212
      	* gimplify.c (omp_notice_variable): Add GOVD_SEEN flag to variables in
      	all contexts.
      
          gcc/testsuite/
      	PR middle-end/79212
      	* gfortran.dg/gomp/sharing-4.f90: New test.
      
      From-SVN: r244922
      David Sherwood committed
  12. 23 Jan, 2017 1 commit
    • use-after-scope: handle writes to a poisoned variable · f6b9f2ff
      2017-01-23  Martin Liska  <mliska@suse.cz>
      
      	* gcc.dg/asan/use-after-scope-10.c: New test.
      	* gcc.dg/asan/use-after-scope-11.c: New test.
      	* g++.dg/asan/use-after-scope-5.C: New test.
      2017-01-23  Jakub Jelinek  <jakub@redhat.com>
      	    Martin Liska  <mliska@suse.cz>
      
      	* asan.h: Define ASAN_USE_AFTER_SCOPE_ATTRIBUTE.
      	* asan.c (asan_expand_poison_ifn): Support stores and use
      	appropriate ASAN report function.
      	* internal-fn.c (expand_ASAN_POISON_USE): New function.
      	* internal-fn.def (ASAN_POISON_USE): Declare.
      	* tree-into-ssa.c (maybe_add_asan_poison_write): New function.
      	(maybe_register_def): Create ASAN_POISON_USE when sanitizing.
      	* tree-ssa-dce.c (eliminate_unnecessary_stmts): Remove
      	ASAN_POISON calls w/o LHS.
      	* tree-ssa.c (execute_update_addresses_taken): Create clobber
      	for ASAN_MARK (UNPOISON, &x, ...) in order to prevent usage of a LHS
      	from ASAN_MARK (POISON, &x, ...) coming to a PHI node.
      	* gimplify.c (asan_poison_variables): Add attribute
      	use_after_scope_memory to variables that really needs to live
      	in memory.
      	* tree-ssa.c (is_asan_mark_p): Do not rewrite into SSA when
      	having the attribute.
      
      From-SVN: r244793
      Martin Liska committed
  13. 20 Jan, 2017 1 commit
  14. 16 Jan, 2017 1 commit
  15. 05 Jan, 2017 1 commit
  16. 01 Jan, 2017 1 commit
  17. 14 Dec, 2016 1 commit
    • Split omp-low into multiple files · 629b3d75
      2016-12-14  Martin Jambor  <mjambor@suse.cz>
      
      	* omp-general.h: New file.
      	* omp-general.c: New file.
      	* omp-expand.h: Likewise.
      	* omp-expand.c: Likewise.
      	* omp-offload.h: Likewise.
      	* omp-offload.c: Likewise.
      	* omp-grid.c: Likewise.
      	* omp-grid.c: Likewise.
      	* omp-low.h: Include omp-general.h and omp-grid.h.  Removed includes
      	of params.h, symbol-summary.h, lto-section-names.h, cilk.h, tree-eh.h,
      	ipa-prop.h, tree-cfgcleanup.h, cfgloop.h, except.h, expr.h, stmt.h,
      	varasm.h, calls.h, explow.h, dojump.h, flags.h, tree-into-ssa.h,
      	tree-cfg.h, cfganal.h, alias.h, emit-rtl.h, optabs.h, expmed.h,
      	alloc-pool.h, cfghooks.h, rtl.h and memmodel.h.
      	(omp_find_combined_for): Declare.
      	(find_omp_clause): Renamed to omp_find_clause and moved to
      	omp-general.h.
      	(free_omp_regions): Renamed to omp_free_regions and moved to
      	omp-expand.h.
      	(replace_oacc_fn_attrib): Renamed to oacc_replace_fn_attrib and moved
      	to omp-general.h.
      	(set_oacc_fn_attrib): Renamed to oacc_set_fn_attrib and moved to
      	omp-general.h.
      	(build_oacc_routine_dims): Renamed to oacc_build_routine_dims and
      	moved to omp-general.h.
      	(get_oacc_fn_attrib): Renamed to oacc_get_fn_attrib and moved to
      	omp-general.h.
      	(oacc_fn_attrib_kernels_p): Moved to omp-general.h.
      	(get_oacc_fn_dim_size): Renamed to oacc_get_fn_dim_size and moved to
      	omp-general.c.
      	(omp_expand_local): Moved to omp-expand.h.
      	(make_gimple_omp_edges): Renamed to omp_make_gimple_edges and moved to
      	omp-expand.h.
      	(omp_finish_file): Moved to omp-offload.h.
      	(default_goacc_validate_dims): Renamed to
      	oacc_default_goacc_validate_dims and moved to omp-offload.h.
      	(offload_funcs, offload_vars): Moved to omp-offload.h.
      	* omp-low.c: Include omp-general.h, omp-offload.h and omp-grid.h.
      	(omp_region): Moved to omp-expand.c.
      	(omp_for_data_loop): Moved to omp-general.h.
      	(omp_for_data): Likewise.
      	(oacc_loop): Moved to omp-offload.c.
      	(oacc_loop_flags): Moved to omp-general.h.
      	(offload_funcs, offload_vars): Moved to omp-offload.c.
      	(root_omp_region): Moved to omp-expand.c.
      	(omp_any_child_fn_dumped): Likewise.
      	(find_omp_clause): Renamed to omp_find_clause and moved to
      	omp-general.c.
      	(is_combined_parallel): Moved to omp-expand.c.
      	(is_reference): Renamed to omp_is_reference and and moved to
      	omp-general.c.
      	(adjust_for_condition): Renamed to omp_adjust_for_condition and moved
      	to omp-general.c.
      	(get_omp_for_step_from_incr): Renamed to omp_get_for_step_from_incr
      	and moved to omp-general.c.
      	(extract_omp_for_data): Renamed to omp_extract_for_data and moved to
      	omp-general.c.
      	(workshare_safe_to_combine_p): Moved to omp-expand.c.
      	(omp_adjust_chunk_size): Likewise.
      	(get_ws_args_for): Likewise.
      	(get_base_type): Removed.
      	(dump_omp_region): Moved to omp-expand.c.
      	(debug_omp_region): Likewise.
      	(debug_all_omp_regions): Likewise.
      	(new_omp_region): Likewise.
      	(free_omp_region_1): Likewise.
      	(free_omp_regions): Renamed to omp_free_regions and moved to
      	omp-expand.c.
      	(find_combined_for): Renamed to omp_find_combined_for, made global.
      	(build_omp_barrier): Renamed to omp_build_barrier and moved to
      	omp-general.c.
      	(omp_max_vf): Moved to omp-general.c.
      	(omp_max_simt_vf): Likewise.
      	(gimple_build_cond_empty): Moved to omp-expand.c.
      	(parallel_needs_hsa_kernel_p): Likewise.
      	(expand_omp_build_assign): Moved declaration to omp-expand.c.
      	(expand_parallel_call): Moved to omp-expand.c.
      	(expand_cilk_for_call): Likewise.
      	(expand_task_call): Likewise.
      	(vec2chain): Likewise.
      	(remove_exit_barrier): Likewise.
      	(remove_exit_barriers): Likewise.
      	(optimize_omp_library_calls): Likewise.
      	(expand_omp_regimplify_p): Likewise.
      	(expand_omp_build_assign): Likewise.
      	(expand_omp_taskreg): Likewise.
      	(oacc_collapse): Likewise.
      	(expand_oacc_collapse_init): Likewise.
      	(expand_oacc_collapse_vars): Likewise.
      	(expand_omp_for_init_counts): Likewise.
      	(expand_omp_for_init_vars): Likewise.
      	(extract_omp_for_update_vars): Likewise.
      	(expand_omp_ordered_source): Likewise.
      	(expand_omp_ordered_sink): Likewise.
      	(expand_omp_ordered_source_sink): Likewise.
      	(expand_omp_for_ordered_loops): Likewise.
      	(expand_omp_for_generic): Likewise.
      	(expand_omp_for_static_nochunk): Likewise.
      	(find_phi_with_arg_on_edge): Likewise.
      	(expand_omp_for_static_chunk): Likewise.
      	(expand_cilk_for): Likewise.
      	(expand_omp_simd): Likewise.
      	(expand_omp_taskloop_for_outer): Likewise.
      	(expand_omp_taskloop_for_inner): Likewise.
      	(expand_oacc_for): Likewise.
      	(expand_omp_for): Likewise.
      	(expand_omp_sections): Likewise.
      	(expand_omp_single): Likewise.
      	(expand_omp_synch): Likewise.
      	(expand_omp_atomic_load): Likewise.
      	(expand_omp_atomic_store): Likewise.
      	(expand_omp_atomic_fetch_op): Likewise.
      	(expand_omp_atomic_pipeline): Likewise.
      	(expand_omp_atomic_mutex): Likewise.
      	(expand_omp_atomic): Likewise.
      	(oacc_launch_pack): and moved to omp-general.c, made public.
      	(OACC_FN_ATTRIB): Likewise.
      	(replace_oacc_fn_attrib): Renamed to oacc_replace_fn_attrib and moved
      	to omp-general.c.
      	(set_oacc_fn_attrib): Renamed to oacc_set_fn_attrib and moved to
      	omp-general.c.
      	(build_oacc_routine_dims): Renamed to oacc_build_routine_dims and
      	moved to omp-general.c.
      	(get_oacc_fn_attrib): Renamed to oacc_get_fn_attrib and moved to
      	omp-general.c.
      	(oacc_fn_attrib_kernels_p): Moved to omp-general.c.
      	(oacc_fn_attrib_level): Moved to omp-offload.c.
      	(get_oacc_fn_dim_size): Renamed to oacc_get_fn_dim_size and moved to
      	omp-general.c.
      	(get_oacc_ifn_dim_arg): Renamed to oacc_get_ifn_dim_arg and moved to
      	omp-general.c.
      	(mark_loops_in_oacc_kernels_region): Moved to omp-expand.c.
      	(grid_launch_attributes_trees): Likewise.
      	(grid_attr_trees): Likewise.
      	(grid_create_kernel_launch_attr_types): Likewise.
      	(grid_insert_store_range_dim): Likewise.
      	(grid_get_kernel_launch_attributes): Likewise.
      	(get_target_argument_identifier_1): Likewise.
      	(get_target_argument_identifier): Likewise.
      	(get_target_argument_value): Likewise.
      	(push_target_argument_according_to_value): Likewise.
      	(get_target_arguments): Likewise.
      	(expand_omp_target): Likewise.
      	(grid_expand_omp_for_loop): Moved to omp-grid.c.
      	(grid_arg_decl_map): Likewise.
      	(grid_remap_kernel_arg_accesses): Likewise.
      	(grid_expand_target_grid_body): Likewise.
      	(expand_omp): Renamed to omp_expand and moved to omp-expand.c.
      	(build_omp_regions_1): Moved to omp-expand.c.
      	(build_omp_regions_root): Likewise.
      	(omp_expand_local): Likewise.
      	(build_omp_regions): Likewise.
      	(execute_expand_omp): Likewise.
      	(pass_data_expand_omp): Likewise.
      	(pass_expand_omp): Likewise.
      	(make_pass_expand_omp): Likewise.
      	(pass_data_expand_omp_ssa): Likewise.
      	(pass_expand_omp_ssa): Likewise.
      	(make_pass_expand_omp_ssa): Likewise.
      	(grid_lastprivate_predicate): Renamed to
      	omp_grid_lastprivate_predicate and moved to omp-grid.c, made public.
      	(grid_prop): Moved to omp-grid.c.
      	(GRID_MISSED_MSG_PREFIX): Likewise.
      	(grid_safe_assignment_p): Likewise.
      	(grid_seq_only_contains_local_assignments): Likewise.
      	(grid_find_single_omp_among_assignments_1): Likewise.
      	(grid_find_single_omp_among_assignments): Likewise.
      	(grid_find_ungridifiable_statement): Likewise.
      	(grid_parallel_clauses_gridifiable): Likewise.
      	(grid_inner_loop_gridifiable_p): Likewise.
      	(grid_dist_follows_simple_pattern): Likewise.
      	(grid_gfor_follows_tiling_pattern): Likewise.
      	(grid_call_permissible_in_distribute_p): Likewise.
      	(grid_handle_call_in_distribute): Likewise.
      	(grid_dist_follows_tiling_pattern): Likewise.
      	(grid_target_follows_gridifiable_pattern): Likewise.
      	(grid_remap_prebody_decls): Likewise.
      	(grid_var_segment): Likewise.
      	(grid_mark_variable_segment): Likewise.
      	(grid_copy_leading_local_assignments): Likewise.
      	(grid_process_grid_body): Likewise.
      	(grid_eliminate_combined_simd_part): Likewise.
      	(grid_mark_tiling_loops): Likewise.
      	(grid_mark_tiling_parallels_and_loops): Likewise.
      	(grid_process_kernel_body_copy): Likewise.
      	(grid_attempt_target_gridification): Likewise.
      	(grid_gridify_all_targets_stmt): Likewise.
      	(grid_gridify_all_targets): Renamed to omp_grid_gridify_all_targets
      	and moved to omp-grid.c, made public.
      	(make_gimple_omp_edges): Renamed to omp_make_gimple_edges and moved to
      	omp-expand.c.
      	(add_decls_addresses_to_decl_constructor): Moved to omp-offload.c.
      	(omp_finish_file): Likewise.
      	(oacc_thread_numbers): Likewise.
      	(oacc_xform_loop): Likewise.
      	(oacc_default_dims, oacc_min_dims): Likewise.
      	(oacc_parse_default_dims): Likewise.
      	(oacc_validate_dims): Likewise.
      	(new_oacc_loop_raw): Likewise.
      	(new_oacc_loop_outer): Likewise.
      	(new_oacc_loop): Likewise.
      	(new_oacc_loop_routine): Likewise.
      	(finish_oacc_loop): Likewise.
      	(free_oacc_loop): Likewise.
      	(dump_oacc_loop_part): Likewise.
      	(dump_oacc_loop): Likewise.
      	(debug_oacc_loop): Likewise.
      	(oacc_loop_discover_walk): Likewise.
      	(oacc_loop_sibling_nreverse): Likewise.
      	(oacc_loop_discovery): Likewise.
      	(oacc_loop_xform_head_tail): Likewise.
      	(oacc_loop_xform_loop): Likewise.
      	(oacc_loop_process): Likewise.
      	(oacc_loop_fixed_partitions): Likewise.
      	(oacc_loop_auto_partitions): Likewise.
      	(oacc_loop_partition): Likewise.
      	(default_goacc_fork_join): Likewise.
      	(default_goacc_reduction): Likewise.
      	(execute_oacc_device_lower): Likewise.
      	(default_goacc_validate_dims): Likewise.
      	(default_goacc_dim_limit): Likewise.
      	(pass_data_oacc_device_lower): Likewise.
      	(pass_oacc_device_lower): Likewise.
      	(make_pass_oacc_device_lower): Likewise.
      	(execute_omp_device_lower): Likewise.
      	(pass_data_omp_device_lower): Likewise.
      	(pass_omp_device_lower): Likewise.
      	(make_pass_omp_device_lower): Likewise.
      	(pass_data_omp_target_link): Likewise.
      	(pass_omp_target_link): Likewise.
      	(find_link_var_op): Likewise.
      	(pass_omp_target_link::execute): Likewise.
      	(make_pass_omp_target_link): Likewise.
      
      	* Makefile.in (OBJS): Added omp-offload.o, omp-expand.o, omp-general.o
      	and omp-grid.o.
      	(GTFILES): Added omp-offload.h, omp-offload.c and omp-expand.c, removed
      	omp-low.h.
      	* gimple-fold.c: Include omp-general.h instead of omp-low.h.
      	(fold_internal_goacc_dim): Adjusted calls to
      	get_oacc_ifn_dim_arg and get_oacc_fn_dim_size to use their new names.
      	* gimplify.c: Include omp-low.h.
      	(omp_notice_variable): Adjust the call to get_oacc_fn_attrib to use
      	its new name.
      	(gimplify_omp_task): Adjusted calls to find_omp_clause to use its new
      	name.
      	(gimplify_omp_for): Likewise.
      	* lto-cgraph.c: Include omp-offload.h instead of omp-low.h.
      	* toplev.c: Include omp-offload.h instead of omp-low.h.
      	* tree-cfg.c: Include omp-general.h instead of omp-low.h.  Also
      	include omp-expand.h.
      	(make_edges_bb): Adjusted the call to make_gimple_omp_edges to use its
      	new name.
      	(make_edges): Adjust the call to free_omp_regions to use its new name.
      	* tree-parloops.c: Include omp-general.h.
      	(create_parallel_loop): Adjusted the call to set_oacc_fn_attrib to use
      	its new name.
      	(parallelize_loops): Adjusted the call to get_oacc_fn_attrib to use
      	its new name.
      	* tree-ssa-loop.c: Include omp-general.h instead of omp-low.h.
      	(gate_oacc_kernels): Adjusted the call to get_oacc_fn_attrib to use
      	its new name.
      	* tree-vrp.c: Include omp-general.h instead of omp-low.h.
      	(extract_range_basic): Adjusted calls to get_oacc_ifn_dim_arg and
      	get_oacc_fn_dim_size to use their new names.
      	* varpool.c: Include omp-offload.h instead of omp-low.h.
      	* gengtype.c (open_base_files): Replace omp-low.h with omp-offload.h in
      	ifiles.
      	* config/nvptx/nvptx.c: Include omp-general.c.
      	(nvptx_expand_call): Adjusted the call to get_oacc_fn_attrib to use
      	its new name.
      	(nvptx_reorg): Likewise.
      	(nvptx_record_offload_symbol): Likewise.
      
      gcc/c-family:
      	* c-omp.c: Include omp-general.h instead of omp-low.h.
      	(c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
      	name.
      
      gcc/c/
      	* c-parser.c: Include omp-general.h and omp-offload.h instead of
      	omp-low.h.
      	(c_finish_oacc_routine): Adjusted call to
      	get_oacc_fn_attrib, build_oacc_routine_dims and replace_oacc_fn_attrib
      	to use their new names.
      	(c_parser_oacc_enter_exit_data): Adjusted call to find_omp_clause to
      	use its new name.
      	(c_parser_oacc_update): Likewise.
      	(c_parser_omp_simd): Likewise.
      	(c_parser_omp_target_update): Likewise.
      	* c-typeck.c: Include omp-general.h instead of omp-low.h.
      	(c_finish_omp_cancel): Adjusted call to find_omp_clause to use its new
      	name.
      	(c_finish_omp_cancellation_point): Likewise.
      	* gimple-parser.c: Do not include omp-low.h
      
      gcc/cp/
      	* parser.c: Include omp-general.h and omp-offload.h instead of
      	omp-low.h.
      	(cp_parser_omp_simd): Adjusted calls to find_omp_clause to use its new
      	name.
      	(cp_parser_omp_target_update): Likewise.
      	(cp_parser_oacc_declare): Likewise.
      	(cp_parser_oacc_enter_exit_data): Likewise.
      	(cp_parser_oacc_update): Likewise.
      	(cp_finalize_oacc_routine): Adjusted call to get_oacc_fn_attrib,
      	build_oacc_routine_dims and replace_oacc_fn_attrib to use their new
      	names.
      	* semantics.c: Include omp-general insteda of omp-low.h.
      	(finish_omp_for): Adjusted calls to find_omp_clause to use its new
      	name.
      	(finish_omp_cancel): Likewise.
      	(finish_omp_cancellation_point): Likewise.
      
      fortran/
      	* trans-openmp.c: Include omp-general.h.
      
      From-SVN: r243673
      Martin Jambor committed
  18. 13 Dec, 2016 1 commit
    • Add pretty printer for ASAN_MARK and add a helper fn · 56b7aede
      	* asan.c (asan_mark_poison_p): Remove.
      	(asan_mark_p): New function.
      	(transform_statements): Use the function.
      	(asan_expand_mark_ifn): Do not use masked enum.
      	* asan.h (enum asan_mark_flags): Declare it via a macro.
      	* gimple-pretty-print.c (dump_gimple_call_args): Dump first
      	argument of ASAN_MARK.
      	* gimplify.c (build_asan_poison_call_expr): Use new enum values.
      	(asan_poison_variable): Likewise.
      	* gcc.dg/asan/use-after-scope-goto-1.c: Update first argument of
      	scanned pattern ASAN_MARK.
      	* gcc.dg/asan/use-after-scope-goto-2.c: Likewise.
      	* gcc.dg/asan/use-after-scope-switch-1.c: Likewise.
      	* gcc.dg/asan/use-after-scope-switch-2.c: Likewise.
      	* gcc.dg/asan/use-after-scope-switch-3.c: Likewise.
      
      From-SVN: r243597
      Martin Liska committed
  19. 12 Dec, 2016 1 commit
  20. 16 Nov, 2016 2 commits
  21. 10 Nov, 2016 2 commits
    • omp-low.c (lower_omp_target): Fix up argument to is_reference. · b4c3a85b
      gcc/
      	* omp-low.c (lower_omp_target): Fix up argument to is_reference.
      	(expand_omp_ordered_sink): Handle TREE_PURPOSE of deps being
      	TRUNC_DIV_EXPR.
      	* gimplify.c (gimplify_scan_omp_clauses): Likewise.  Set
      	ctx->target_map_scalars_firstprivate on OMP_TARGET even for Fortran.
      	Remove omp_no_lastprivate callers.  Propagate lastprivate on combined
      	teams distribute parallel for simd even to distribute and teams
      	construct.  For OMP_CLAUSE_DEPEND add missing break at the end of
      	OMP_CLAUSE_DEPEND_SINK case.
      	(omp_notice_variable): Use lang_hooks.decls.omp_scalar_p.
      	(omp_no_lastprivate): Removed.
      	(gimplify_adjust_omp_clauses): Remove omp_no_lastprivate callers.
      	(gimplify_omp_for): Likewise.
      	(computable_teams_clause): Fail for automatic vars from current
      	function not yet seen in bind expr.
      	* langhooks.c (lhd_omp_scalar_p): New function.
      	* langhooks.h (struct lang_hooks_for_decls): Add omp_scalar_p.
      	* varpool.c (varpool_node::get_create): Set node->offloading
      	even for DECL_EXTERNAL decls.
      	* langhooks-def.h (lhd_omp_scalar_p): New prototype.
      	(LANG_HOOKS_OMP_SCALAR_P): Define.
      	(LANG_HOOKS_DECLS): Use it.
      gcc/fortran/
      	* openmp.c (gfc_free_omp_clauses): Free critical_name, grainsize,
      	hint, num_tasks, priority and if_exprs.
      	(gfc_match_omp_to_link, gfc_match_omp_depend_sink): New functions.
      	(enum omp_mask1, enum omp_mask2): New enums.
      	Change all OMP_CLAUSE_* defines into enum values, and change their
      	values from ((uint64_t) 1 << bit) to just bit.
      	(omp_mask, omp_inv_mask): New classes.  Add ctors and operators.
      	(gfc_match_omp_clauses): Change mask argument from uint64_t to
      	const omp_mask.  Assert OMP_MASK1_LAST and OMP_MASK2_LAST are
      	at most 64.  Move delete clause handling to where it
      	alphabetically belongs.  Parse defaultmap, grainsize, hint,
      	is_device_ptr, nogroup, nowait, num_tasks, priority, simd, threads
      	and use_device_ptr clauses.  Parse if clause modifier.  Parse map
      	clause always modifier, and release and delete kinds.  Parse ordered
      	clause with argument.  Parse schedule clause modifiers.  Differentiate
      	device clause parsing based on openacc flag.  Guard link clause
      	parsing with openacc flag.  Add support for parsing
      	linear clause modifiers.  Parse depend(source) and depend(sink: ...).
      	Use gfc_match_omp_to_link for to and link clauses in declare target
      	construct.
      	(match_acc): Change mask type from uint64_t to const omp_mask.
      	(OMP_SINGLE_CLAUSES, OMP_ORDERED_CLAUSES,
      	OMP_DECLARE_TARGET_CLAUSES, OMP_TASKLOOP_CLAUSES,
      	OMP_TARGET_ENTER_DATA_CLAUSES, OMP_TARGET_EXIT_DATA_CLAUSES): Define.
      	(OACC_PARALLEL_CLAUSES, OACC_KERNELS_CLAUSES, OACC_DATA_CLAUSES,
      	OACC_LOOP_CLAUSES, OACC_HOST_DATA_CLAUSES, OACC_DECLARE_CLAUSES,
      	OACC_ENTER_DATA_CLAUSES, OACC_EXIT_DATA_CLAUSES, OACC_WAIT_CLAUSES,
      	OACC_ROUTINE_CLAUSES, OMP_PARALLEL_CLAUSES, OMP_DECLARE_SIMD_CLAUSES,
      	OMP_SECTIONS_CLAUSES, OMP_TEAMS_CLAUSES, OMP_DISTRIBUTE_CLAUSES):
      	Replace first or only OMP_CLAUSE_* value in bitset with
      	omp_mask (OMP_CLAUSE_*).
      	(OMP_DO_CLAUSES): Likewise.  Add OMP_CLAUSE_LINEAR.
      	(OMP_SIMD_CLAUSES): Replace first or only OMP_CLAUSE_* value in
      	bitset with omp_mask (OMP_CLAUSE_*).  Add OMP_CLAUSE_SIMDLEN.
      	(OACC_UPDATE_CLAUSES): Replace first or only OMP_CLAUSE_* value in
      	bitset with omp_mask (OMP_CLAUSE_*).  Replace OMP_CLAUSE_OACC_DEVICE
      	with OMP_CLAUSE_DEVICE.
      	(OMP_TASK_CLAUSES): Replace first or only OMP_CLAUSE_* value in
      	bitset with omp_mask (OMP_CLAUSE_*).  Add OMP_CLAUSE_PRIORITY.
      	(OMP_TARGET_CLAUSES): Replace first or only OMP_CLAUSE_* value in
      	bitset with omp_mask (OMP_CLAUSE_*).  Add OMP_CLAUSE_DEPEND,
      	OMP_CLAUSE_NOWAIT, OMP_CLAUSE_PRIVATE, OMP_CLAUSE_FIRSTPRIVATE,
      	OMP_CLAUSE_DEFAULTMAP and OMP_CLAUSE_IS_DEVICE_PTR.
      	(OMP_TARGET_DATA_CLAUSES): Replace first or only OMP_CLAUSE_* value in
      	bitset with omp_mask (OMP_CLAUSE_*).  Add OMP_CLAUSE_USE_DEVICE_PTR.
      	(OMP_TARGET_UPDATE_CLAUSES): Replace first or only OMP_CLAUSE_* value
      	in bitset with omp_mask (OMP_CLAUSE_*).  Add OMP_CLAUSE_DEPEND and
      	OMP_CLAUSE_NOWAIT.
      	(match_omp): Change mask argument from unsigned int to
      	const omp_mask.
      	(gfc_match_omp_critical): Parse optional clauses and use omp_clauses
      	union member instead of omp_name.
      	(gfc_match_omp_end_critical): New function.
      	(gfc_match_omp_distribute_parallel_do): Remove ordered and linear
      	clauses from the mask.
      	(gfc_match_omp_distribute_parallel_do_simd): Use
      	& ~(omp_mask (OMP_CLAUSE_*)) instead of & ~OMP_CLAUSE_*.
      	(gfc_match_omp_target_teams_distribute_parallel_do_simd): Likewise.
      	(gfc_match_omp_teams_distribute_parallel_do_simd): Likewise.
      	(gfc_match_omp_do_simd): Likewise.  Don't remove ordered clause from
      	the mask.
      	(gfc_match_omp_parallel_do_simd): Likewise.
      	(gfc_match_omp_target_teams_distribute_parallel_do): Likewise.
      	(gfc_match_omp_teams_distribute_parallel_do): Likewise.
      	(gfc_match_omp_declare_simd): If not using the form with
      	(proc-name), require space before first clause.  Make (proc-name)
      	optional.  If not present, set proc_name to NULL.
      	(gfc_match_omp_declare_target): Rewritten for OpenMP 4.5.
      	(gfc_match_omp_single): Use OMP_SINGLE_CLAUSES.
      	(gfc_match_omp_task, gfc_match_omp_taskwait, gfc_match_omp_taskyield):
      	Move around to where they belong alphabetically.
      	(gfc_match_omp_target_enter_data, gfc_match_omp_target_exit_data,
      	gfc_match_omp_target_parallel, gfc_match_omp_target_parallel_do,
      	gfc_match_omp_target_parallel_do_simd, gfc_match_omp_target_simd,
      	gfc_match_omp_taskloop, gfc_match_omp_taskloop_simd):
      	New functions.
      	(gfc_match_omp_ordered): Parse clauses.
      	(gfc_match_omp_ordered_depend): New function.
      	(gfc_match_omp_cancel, gfc_match_omp_end_single): Use
      	omp_mask (OMP_CLAUSE_*) instead of OMP_CLAUSE_*.
      	(resolve_oacc_scalar_int_expr): Renamed to ...
      	(resolve_scalar_int_expr): ... this.  Fix up formatting.
      	(resolve_oacc_positive_int_expr): Renamed to ...
      	(resolve_positive_int_expr): ... this.  Fix up formatting.
      	(resolve_nonnegative_int_expr): New function.
      	(resolve_omp_clauses): Adjust callers, use the above functions
      	even for OpenMP clauses, add handling of new OpenMP 4.5 clauses.
      	Require orderedc >= collapse if specified. Handle depend(sink:)
      	and depend(source) restrictions.  Disallow linear clause when
      	orderedc is non-zero.  Diagnose linear clause modifiers when not in
      	declare simd.  Only check for integer type if ref modifier
      	is not used.  Remove diagnostics for required VALUE attribute.
      	Diagnose VALUE attribute with ref or uval modifiers.  Allow
      	non-constant linear-step, if it is a dummy argument alone and is
      	mentioned in uniform clause.  Diagnose map kinds not allowed
      	for various constructs.  Diagnose target {enter ,exit ,}data without
      	any map clauses.  Add dummy OMP_LIST_IS_DEVICE_PTR and
      	OMP_LIST_USE_DEVICE_PTR cases.
      	(gfc_resolve_omp_do_blocks): Set omp_current_do_collapse to orderedc
      	if non-zero.
      	(gfc_resolve_omp_parallel_blocks): Handle new OpenMP 4.5 constructs,
      	replace underscores with spaces in a few construct names.
      	(resolve_omp_do): Set collapse to orderedc if non-zero.  Handle new
      	OpenMP 4.5 constructs.
      	(resolve_oacc_loop_blocks): Call resolve_positive_int_expr instead
      	of resolve_oacc_positive_int_expr.
      	(gfc_resolve_omp_directive): Handle new OpenMP 4.5 constructs.
      	(gfc_resolve_omp_declare_simd): Allow ods->proc_name to be NULL.
      	* trans-openmp.c (gfc_omp_scalar_p): New function.
      	(doacross_steps): New variable.
      	(gfc_trans_omp_clauses): Handle new OpenMP 4.5 clauses and new clause
      	modifiers.
      	(gfc_trans_omp_critical): Adjust EXEC_OMP_CRITICAL handling.
      	(gfc_trans_omp_do): Handle doacross loops.  Clear sched_simd flag.
      	Handle EXEC_OMP_TASKLOOP.
      	(gfc_trans_omp_ordered): Translate omp clauses, allow NULL
      	code->block.
      	(GFC_OMP_SPLIT_TASKLOOP, GFC_OMP_MASK_TASKLOOP): New enum constants.
      	(gfc_split_omp_clauses): Copy orderedc together with ordered.  Change
      	firstprivate and lastprivate handling for OpenMP 4.5.
      	Handle EXEC_OMP_TARGET_SIMD, EXEC_OMP_TARGET_PARALLEL{,_DO,_DO_SIMD}
      	and EXEC_OMP_TASKLOOP{,_SIMD}.  Add handling for new OpenMP 4.5
      	clauses and clause modifiers and handle if clause without/with
      	modifiers.
      	(gfc_trans_omp_teams): Add omp_clauses argument, add it to other
      	teams clauses.  Don't wrap into OMP_TEAMS if -fopenmp-simd.
      	(gfc_trans_omp_target): For -fopenmp, translate num_teams and
      	thread_limit clauses on combined target teams early and pass to
      	gfc_trans_omp_teams.  Set OMP_TARGET_COMBINED if needed.
      	Handle EXEC_OMP_TARGET_PARALLEL{,_DO,_DO_SIMD} and
      	EXEC_OMP_TARGET_SIMD.
      	(gfc_trans_omp_taskloop, gfc_trans_omp_target_enter_data,
      	gfc_trans_omp_target_exit_data): New functions.
      	(gfc_trans_omp_directive): Handle EXEC_OMP_TARGET_{ENTER,EXIT}_DATA
      	EXEC_OMP_TASKLOOP{,_SIMD}, EXEC_OMP_TARGET_PARALLEL{,_DO,_DO_SIMD}
      	and EXEC_OMP_TARGET_SIMD.  Adjust gfc_trans_omp_teams caller.
      	* symbol.c (check_conflict): Handle omp_declare_target_link.
      	(gfc_add_omp_declare_target_link): New function.
      	(gfc_copy_attr): Copy omp_declare_target_link.
      	* dump-parse-tree.c (show_omp_namelist): Handle OMP_DEPEND_SINK_FIRST
      	depend_op.  Print linear clause modifiers.
      	(show_omp_clauses): Adjust for OpenMP 4.5 clause changes.
      	(show_omp_node): Print clauses for EXEC_OMP_ORDERED.  Allow NULL
      	c->block for EXEC_OMP_ORDERED.  Formatting fixes.  Adjust handling of
      	EXEC_OMP_CRITICAL, handle new OpenMP 4.5 constructs and some
      	forgotten OpenMP 4.0 constructs.
      	(show_code_node): Handle new OpenMP 4.5 constructs and some forgotten
      	OpenMP 4.0 constructs.
      	* gfortran.h (symbol_attribute): Add omp_declare_target_link bitfield.
      	(struct gfc_omp_namelist): Add u.common and u.linear_op fields.
      	(struct gfc_common_head): Change omp_declare_target into bitfield.
      	Add omp_declare_target_link bitfield.
      	(gfc_add_omp_declare_target_link): New prototype.
      	(enum gfc_statement): Add ST_OMP_TARGET_PARALLEL,
      	ST_OMP_END_TARGET_PARALLEL, ST_OMP_TARGET_PARALLEL_DO,
      	ST_OMP_END_TARGET_PARALLEL_DO, ST_OMP_TARGET_PARALLEL_DO_SIMD,
      	ST_OMP_END_TARGET_PARALLEL_DO_SIMD, ST_OMP_TARGET_ENTER_DATA,
      	ST_OMP_TARGET_EXIT_DATA, ST_OMP_TARGET_SIMD, ST_OMP_END_TARGET_SIMD,
      	ST_OMP_TASKLOOP, ST_OMP_END_TASKLOOP, ST_OMP_TASKLOOP_SIMD,
      	ST_OMP_END_TASKLOOP_SIMD and ST_OMP_ORDERED_DEPEND.
      	(enum gfc_omp_depend_op): Add OMP_DEPEND_SINK_FIRST and
      	OMP_DEPEND_SINK.
      	(enum gfc_omp_linear_op): New.
      	(struct gfc_omp_clauses): Add critical_name, depend_source,
      	orderedc, defaultmap, nogroup, sched_simd, sched_monotonic,
      	sched_nonmonotonic, simd, threads, grainsize, hint, num_tasks,
      	priority and if_exprs fields.
      	(enum gfc_exec_op): Add EXEC_OMP_END_CRITICAL,
      	EXEC_OMP_TARGET_ENTER_DATA, EXEC_OMP_TARGET_EXIT_DATA,
      	EXEC_OMP_TARGET_PARALLEL, EXEC_OMP_TARGET_PARALLEL_DO,
      	EXEC_OMP_TARGET_PARALLEL_DO_SIMD, EXEC_OMP_TARGET_SIMD,
      	EXEC_OMP_TASKLOOP, EXEC_OMP_TASKLOOP_SIMD.
      	(enum gfc_omp_map_op): Add OMP_MAP_RELEASE,
      	OMP_MAP_ALWAYS_TO, OMP_MAP_ALWAYS_FROM and OMP_MAP_ALWAYS_TOFROM.
      	(OMP_LIST_IS_DEVICE_PTR, OMP_LIST_USE_DEVICE_PTR): New.
      	(enum gfc_omp_if_kind): New.
      	* module.c (enum ab_attribute): Add AB_OMP_DECLARE_TARGET_LINK.
      	(attr_bits): Add AB_OMP_DECLARE_TARGET_LINK entry.
      	(mio_symbol_attribute): Save and restore omp_declare_target_link bit.
      	* trans.h (gfc_omp_scalar_p): New prototype.
      	* frontend-passes.c (gfc_code_walker): Handle new OpenMP 4.5
      	expressions.
      	* trans.c (trans_code): Handle new OpenMP 4.5 constructs.
      	* resolve.c (gfc_resolve_blocks): Likewise.
      	(gfc_resolve_code): Likewise.
      	* f95-lang.c (LANG_HOOKS_OMP_SCALAR_P): Redefine to gfc_omp_scalar_p.
      	(gfc_attribute_table): Add "omp declare target link".
      	* st.c (gfc_free_statement): Handle EXEC_OMP_END_CRITICAL like
      	EXEC_OMP_CRITICAL before, free clauses for EXEC_OMP_CRITICAL
      	and new OpenMP 4.5 constructs.  Free omp clauses even for
      	EXEC_OMP_ORDERED.
      	* match.c (match_exit_cycle): Rename collapse variable to count,
      	set it to orderedc if non-zero, instead of collapse.
      	* trans-decl.c (add_attributes_to_decl): Add "omp declare target link"
      	instead of "omp declare target" for omp_declare_target_link.
      	* trans-common.c (build_common_decl): Likewise.
      	* match.h (gfc_match_omp_target_enter_data,
      	gfc_match_omp_target_exit_data, gfc_match_omp_target_parallel,
      	gfc_match_omp_target_parallel_do,
      	gfc_match_omp_target_parallel_do_simd, gfc_match_omp_target_simd,
      	gfc_match_omp_taskloop, gfc_match_omp_taskloop_simd,
      	gfc_match_omp_end_critical, gfc_match_omp_ordered_depend): New
      	prototypes.
      	* parse.c (decode_omp_directive): Use gfc_match_omp_end_critical
      	instead of gfc_match_omp_critical for !$omp end critical.
      	Handle new OpenMP 4.5 constructs.  If ordered directive has
      	depend clause as the first of the clauses, use
      	gfc_match_omp_ordered_depend and ST_OMP_ORDERED_DEPEND instead of
      	gfc_match_omp_ordered and ST_OMP_ORDERED.
      	(case_executable): Add ST_OMP_TARGET_ENTER_DATA,
      	ST_OMP_TARGET_EXIT_DATA and ST_OMP_ORDERED_DEPEND cases.
      	(case_exec_markers): Add ST_OMP_TARGET_PARALLEL,
      	ST_OMP_TARGET_PARALLEL_DO, ST_OMP_TARGET_PARALLEL_DO_SIMD,
      	ST_OMP_TARGET_SIMD, ST_OMP_TASKLOOP and ST_OMP_TASKLOOP_SIMD cases.
      	(gfc_ascii_statement): Handle new OpenMP 4.5 constructs.
      	(parse_omp_do): Handle ST_OMP_TARGET_PARALLEL_DO,
      	ST_OMP_TARGET_PARALLEL_DO_SIMD, ST_OMP_TASKLOOP and
      	ST_OMP_TASKLOOP_SIMD.
      	(parse_omp_structured_block): Handle EXEC_OMP_END_CRITICAL instead
      	of EXEC_OMP_CRITICAL, adjust for EXEC_OMP_CRITICAL having omp clauses
      	now.
      	(parse_executable): Handle ST_OMP_TARGET_PARALLEL,
      	ST_OMP_TARGET_PARALLEL_DO, ST_OMP_TARGET_PARALLEL_DO_SIMD,
      	ST_OMP_TASKLOOP and ST_OMP_TASKLOOP_SIMD.
      gcc/testsuite/
      	* gfortran.dg/gomp/pr77516.f90: Add dg-warning.
      	* gfortran.dg/gomp/target1.f90: Remove ordered clause where it is
      	no longer allowed and corresponding ordered construct.
      	* gfortran.dg/gomp/linear-1.f90: New test.
      	* gfortran.dg/gomp/declare-simd-2.f90: New test.
      	* gfortran.dg/gomp/declare-target-1.f90: New test.
      	* gfortran.dg/gomp/declare-target-2.f90: New test.
      libgomp/
      	* testsuite/libgomp.fortran/examples-4/declare_target-1.f90
      	(fib_wrapper): Add map(from: x) clause.
      	* testsuite/libgomp.fortran/examples-4/declare_target-2.f90
      	(e_53_2): Likewise.
      	* testsuite/libgomp.fortran/examples-4/declare_target-4.f90
      	(accum): Add map(tmp) clause.
      	* testsuite/libgomp.fortran/examples-4/declare_target-5.f90
      	(accum): Add map(tofrom: tmp) clause.
      	* testsuite/libgomp.fortran/examples-4/target_data-3.f90
      	(gramSchmidt): Likewise.
      	* testsuite/libgomp.fortran/examples-4/teams-2.f90 (dotprod): Add
      	map(tofrom: sum) clause.
      	* testsuite/libgomp.fortran/nestedfn5.f90 (foo): Add twice
      	map (alloc: a, l) clause.  Add defaultmap(tofrom: scalar) clause.
      	* testsuite/libgomp.fortran/pr66199-2.f90: Adjust for linear clause
      	only allowed on the loop iterator.
      	* testsuite/libgomp.fortran/target4.f90 (foo): Add map(t) clause.
      	* testsuite/libgomp.fortran/taskloop2.f90: New test.
      	* testsuite/libgomp.fortran/taskloop4.f90: New test.
      	* testsuite/libgomp.fortran/doacross1.f90: New test.
      	* testsuite/libgomp.fortran/doacross3.f90: New test.
      	* testsuite/libgomp.fortran/taskloop1.f90: New test.
      	* testsuite/libgomp.fortran/taskloop3.f90: New test.
      	* testsuite/libgomp.fortran/doacross2.f90: New test.
      	* testsuite/libgomp.c/doacross-1.c (main): Add missing
      	#pragma omp atomic read.
      	* testsuite/libgomp.c/doacross-2.c (main): Likewise.
      	* testsuite/libgomp.c/doacross-3.c (main): Likewise.
      
      From-SVN: r242037
      Jakub Jelinek committed
    • Create live_switch_vars conditionally (PR sanitizer/78270) · 86bc8506
      	PR sanitizer/78270
      	* gcc.dg/asan/pr78270.c: New test.
      	PR sanitizer/78270
      	* gimplify.c (gimplify_switch_expr): Create live_switch_vars
      	only when SWITCH_BODY is a BIND_EXPR.
      
      From-SVN: r242036
      Martin Liska committed
  22. 08 Nov, 2016 1 commit
    • use-after-scope fallout · fcd1b8df
      	PR testsuite/78242
      	* g++.dg/asan/use-after-scope-4.C: New test.
      	* g++.dg/asan/use-after-scope-types-4.C: Update scanned pattern.
      	* gcc.dg/asan/use-after-scope-8.c: Remove.
      	PR testsuite/78242
      	* dbgcnt.def: Add new debug counter asan_use_after_scope.
      	* gimplify.c (gimplify_decl_expr): Do not sanitize vars
      	with a value expr.  Do not add artificial variables to
      	live_switch_vars.  Use the debug counter.
      	(gimplify_target_expr): Use the debug counter.
      	* internal-fn.def: Remove ECF_TM_PURE from ASAN_MARK builtin.
      	* sanitizer.def: Set ATTR_NOTHROW_LEAF_LIST to
      	BUILT_IN_ASAN_CLOBBER_N and BUILT_IN_ASAN_UNCLOBBER_N.
      
      From-SVN: r241961
      Martin Liska committed
  23. 07 Nov, 2016 1 commit
    • Introduce -fsanitize-address-use-after-scope · 6dc4a604
      	* c-warn.c (warn_for_unused_label): Save all labels used
      	in goto or in &label.
      	* asan.c (enum asan_check_flags): Move the enum to header file.
      	(asan_init_shadow_ptr_types): Make type creation more generic.
      	(shadow_mem_size): New function.
      	(asan_emit_stack_protection): Use newly added ASAN_SHADOW_GRANULARITY.
      	Rewritten stack unpoisoning code.
      	(build_shadow_mem_access): Add new argument return_address.
      	(instrument_derefs): Instrument local variables if use after scope
      	sanitization is enabled.
      	(asan_store_shadow_bytes): New function.
      	(asan_expand_mark_ifn): Likewise.
      	(asan_sanitize_stack_p): Moved from asan_sanitize_stack_p.
      	* asan.h (enum asan_mark_flags): Moved here from asan.c
      	(asan_protect_stack_decl): Protect all declaration that need
      	to live in memory.
      	(asan_sanitize_use_after_scope): New function.
      	(asan_no_sanitize_address_p): Likewise.
      	* cfgexpand.c (partition_stack_vars): Consider
      	asan_sanitize_use_after_scope in condition.
      	(expand_stack_vars): Likewise.
      	* common.opt (-fsanitize-address-use-after-scope): New option.
      	* doc/invoke.texi (use-after-scope-direct-emission-threshold):
      	Explain the parameter.
      	* flag-types.h (enum sanitize_code): Define SANITIZE_USE_AFTER_SCOPE.
      	* gimplify.c (build_asan_poison_call_expr): New function.
      	(asan_poison_variable): Likewise.
      	(gimplify_bind_expr): Generate poisoning/unpoisoning for local
      	variables that have address taken.
      	(gimplify_decl_expr): Likewise.
      	(gimplify_target_expr): Likewise for C++ temporaries.
      	(sort_by_decl_uid): New function.
      	(gimplify_expr): Unpoison all variables for a label we can jump
      	from outside of a scope.
      	(gimplify_switch_expr): Unpoison variables defined in the switch
      	context.
      	(gimplify_function_tree): Clear asan_poisoned_variables.
      	(asan_poison_variables): New function.
      	(warn_switch_unreachable_r): Handle IFN_ASAN_MARK.
      	* internal-fn.c (expand_ASAN_MARK): New function.
      	* internal-fn.def (ASAN_MARK): Declare.
      	* opts.c (finish_options): Handle -fstack-reuse if
      	-fsanitize-address-use-after-scope is enabled.
      	(common_handle_option): Enable address sanitization if
      	-fsanitize-address-use-after-scope is enabled.
      	* params.def (PARAM_USE_AFTER_SCOPE_DIRECT_EMISSION_THRESHOLD):
      	New parameter.
      	* params.h: Likewise.
      	* sancov.c (pass_sanopt::execute): Handle IFN_ASAN_MARK.
      	* sanitizer.def: Define __asan_poison_stack_memory and
      	__asan_unpoison_stack_memory functions.
      	* asan.c (asan_mark_poison_p): New function.
      	(transform_statements): Handle asan_mark_poison_p calls.
      	* gimple.c (nonfreeing_call_p): Handle IFN_ASAN_MARK.
      
      From-SVN: r241896
      Martin Liska committed
  24. 28 Oct, 2016 1 commit
  25. 26 Oct, 2016 1 commit
  26. 21 Oct, 2016 1 commit
  27. 17 Oct, 2016 1 commit
  28. 11 Oct, 2016 1 commit
    • gcc/ · 70f6d5e1
      	* common.opt (Wimplicit-fallthrough) Turn into alias to
      	-Wimplicit-fallthrough=3.  Remove EnabledBy.
      	(Wimplicit-fallthrough=): New option.
      	* gimplify.c (warn_implicit_fallthrough_r): Use
      	OPT_Wimplicit_fallthrough_ instead of OPT_Wimplicit_fallthrough.
      	* doc/invoke.texi (-Wimplicit-fallthrough): Document as alias
      	to -Wimplicit-fallthrough=3.
      	(-Wimplicit-fallthrough=): Document.
      gcc/c-family/
      	* c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
      	(Wimplicit-fallthrough=): Enable for these languages by -Wextra.
      	* c-opts.c (sanitize_cpp_opts): Initialize
      	cpp_opts->cpp_warn_implicit_fallthrough.
      gcc/testsuite/
      	* c-c++-common/Wimplicit-fallthrough-25.c: New test.
      	* c-c++-common/Wimplicit-fallthrough-26.c: New test.
      	* c-c++-common/Wimplicit-fallthrough-27.c: New test.
      	* c-c++-common/Wimplicit-fallthrough-28.c: New test.
      	* c-c++-common/Wimplicit-fallthrough-29.c: New test.
      	* c-c++-common/Wimplicit-fallthrough-30.c: New test.
      	* c-c++-common/Wimplicit-fallthrough-31.c: New test.
      	* c-c++-common/Wimplicit-fallthrough-32.c: New test.
      	* c-c++-common/Wimplicit-fallthrough-33.c: New test.
      libcpp/
      	* include/cpplib.h (struct cpp_options): Add
      	cpp_warn_implicit_fallthrough.
      	* init.c (cpp_create_reader): Initialize it to 0.
      	* lex.c (fallthrough_comment_p): Handle different
      	cpp_warn_implicit_fallthrough levels.  Whitespace fixes.
      
      From-SVN: r241013
      Jakub Jelinek committed
  29. 09 Oct, 2016 1 commit
    • tree-ssa.c (target_for_debug_bind, [...]): Use VAR_P and/or VAR_OR_FUNCTION_DECL_P macros. · 8813a647
      	* tree-ssa.c (target_for_debug_bind, verify_phi_args,
      	ssa_undefined_value_p, maybe_optimize_var): Use VAR_P and/or
      	VAR_OR_FUNCTION_DECL_P macros.
      	* tree-chkp.c (chkp_register_var_initializer, chkp_make_static_bounds,
      	chkp_get_bounds_for_decl_addr, chkp_parse_array_and_component_ref,
      	chkp_find_bounds_1): Likewise.
      	* ipa-polymorphic-call.c (decl_maybe_in_construction_p): Likewise.
      	* hsa-gen.c (get_symbol_for_decl): Likewise.
      	* cgraphunit.c (check_global_declaration, analyze_functions,
      	handle_alias_pairs, thunk_adjust, cgraph_node::expand_thunk):
      	Likewise.
      	* gimple-fold.c (can_refer_decl_in_current_unit_p,
      	canonicalize_constructor_val, gimple_get_virt_method_for_vtable):
      	Likewise.
      	* tree.c (set_decl_section_name, copy_node_stat,
      	need_assembler_name_p, free_lang_data_in_decl, find_decls_types_r,
      	merge_dllimport_decl_attributes, handle_dll_attribute,
      	decl_init_priority_insert, auto_var_in_fn_p, array_at_struct_end_p,
      	verify_type): Likewise.
      	* gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior,
      	find_explicit_erroneous_behavior): Likewise.
      	* sdbout.c (sdbout_toplevel_data, sdbout_late_global_decl): Likewise.
      	* ipa.c (process_references): Likewise.
      	* tree-chkp-opt.c (chkp_get_check_result): Likewise.
      	* varasm.c (get_block_for_decl, use_blocks_for_decl_p, make_decl_rtl,
      	notice_global_symbol, assemble_variable, mark_decl_referenced,
      	build_constant_desc, output_constant_def_contents, do_assemble_alias,
      	make_decl_one_only, default_section_type_flags,
      	categorize_decl_for_section, default_encode_section_info): Likewise.
      	* trans-mem.c (requires_barrier): Likewise.
      	* gimple-expr.c (mark_addressable): Likewise.
      	* cfgexpand.c (add_scope_conflicts_1, expand_one_var,
      	expand_used_vars_for_block, clear_tree_used, stack_protect_decl_p,
      	expand_debug_expr): Likewise.
      	* tree-dump.c (dequeue_and_dump): Likewise.
      	* ubsan.c (instrument_bool_enum_load): Likewise.
      	* tree-pretty-print.c (print_declaration): Likewise.
      	* simplify-rtx.c (delegitimize_mem_from_attrs): Likewise.
      	* tree-ssa-uninit.c (warn_uninitialized_vars): Likewise.
      	* asan.c (asan_protect_global, instrument_derefs): Likewise.
      	* tree-into-ssa.c (rewrite_stmt, maybe_register_def,
      	pass_build_ssa::execute): Likewise.
      	* var-tracking.c (var_debug_decl, track_expr_p): Likewise.
      	* tree-ssa-loop-ivopts.c (force_expr_to_var_cost, split_address_cost):
      	Likewise.
      	* ipa-split.c (test_nonssa_use, consider_split, mark_nonssa_use):
      	Likewise.
      	* tree-inline.c (insert_debug_decl_map, remap_ssa_name,
      	can_be_nonlocal, remap_decls, copy_debug_stmt,
      	initialize_inlined_parameters, add_local_variables,
      	reset_debug_binding, replace_locals_op): Likewise.
      	* dse.c (can_escape): Likewise.
      	* ipa-devirt.c (compare_virtual_tables, referenced_from_vtable_p):
      	Likewise.
      	* tree-diagnostic.c (default_tree_printer): Likewise.
      	* tree-streamer-in.c (unpack_ts_decl_common_value_fields,
      	unpack_ts_decl_with_vis_value_fields,
      	lto_input_ts_decl_common_tree_pointers): Likewise.
      	* builtins.c (builtin_save_expr, fold_builtin_expect,
      	readonly_data_expr): Likewise.
      	* tree-ssa-structalias.c (new_var_info, get_constraint_for_ssa_var,
      	create_variable_info_for, set_uids_in_ptset, visit_loadstore):
      	Likewise.
      	* gimple-streamer-out.c (output_gimple_stmt): Likewise.
      	* gimplify.c (force_constant_size, gimplify_bind_expr,
      	gimplify_decl_expr, gimplify_var_or_parm_decl,
      	gimplify_compound_lval, gimplify_init_constructor,
      	gimplify_modify_expr, gimplify_asm_expr, gimplify_oacc_declare,
      	gimplify_type_sizes): Likewise.
      	* cgraphbuild.c (record_reference, record_type_list, mark_address,
      	mark_load, mark_store, pass_build_cgraph_edges::execute): Likewise.
      	* tree-ssa-live.c (mark_all_vars_used_1, remove_unused_scope_block_p,
      	remove_unused_locals): Likewise.
      	* tree-ssa-alias.c (ptr_deref_may_alias_decl_p, ptrs_compare_unequal,
      	ref_maybe_used_by_call_p_1, call_may_clobber_ref_p_1): Likewise.
      	* function.c (instantiate_expr, instantiate_decls_1,
      	setjmp_vars_warning, add_local_decl): Likewise.
      	* alias.c (ao_ref_from_mem, get_alias_set, compare_base_symbol_refs):
      	Likewise.
      	* tree-stdarg.c (find_va_list_reference, va_list_counter_struct_op,
      	va_list_ptr_read, va_list_ptr_write, check_all_va_list_escapes,
      	optimize_va_list_gpr_fpr_size): Likewise.
      	* tree-nrv.c (pass_nrv::execute): Likewise.
      	* tsan.c (instrument_expr): Likewise.
      	* tree-ssa-dce.c (remove_dead_stmt): Likewise.
      	* vtable-verify.c (verify_bb_vtables): Likewise.
      	* tree-dfa.c (ssa_default_def, set_ssa_default_def,
      	get_ref_base_and_extent): Likewise.
      	* toplev.c (wrapup_global_declaration_1, wrapup_global_declaration_2):
      	Likewise.
      	* tree-sra.c (static bool constant_decl_p, find_var_candidates,
      	analyze_all_variable_accesses): Likewise.
      	* tree-nested.c (get_nonlocal_debug_decl,
      	convert_nonlocal_omp_clauses, note_nonlocal_vla_type,
      	note_nonlocal_block_vlas, convert_nonlocal_reference_stmt,
      	get_local_debug_decl, convert_local_omp_clauses,
      	convert_local_reference_stmt, nesting_copy_decl, remap_vla_decls):
      	Likewise.
      	* tree-vect-data-refs.c (vect_can_force_dr_alignment_p): Likewise.
      	* stmt.c (decl_overlaps_hard_reg_set_p): Likewise.
      	* dbxout.c (dbxout_late_global_decl, dbxout_type_fields,
      	dbxout_symbol, dbxout_common_check): Likewise.
      	* expr.c (expand_assignment, expand_expr_real_2, expand_expr_real_1,
      	string_constant): Likewise.
      	* hsa.c (hsa_get_declaration_name): Likewise.
      	* passes.c (rest_of_decl_compilation): Likewise.
      	* tree-ssanames.c (make_ssa_name_fn): Likewise.
      	* tree-streamer-out.c (pack_ts_decl_common_value_fields,
      	pack_ts_decl_with_vis_value_fields,
      	write_ts_decl_common_tree_pointers): Likewise.
      	* stor-layout.c (place_field): Likewise.
      	* symtab.c (symtab_node::maybe_create_reference,
      	symtab_node::verify_base, symtab_node::make_decl_local,
      	symtab_node::copy_visibility_from,
      	symtab_node::can_increase_alignment_p): Likewise.
      	* dwarf2out.c (add_var_loc_to_decl, tls_mem_loc_descriptor,
      	decl_by_reference_p, reference_to_unused, rtl_for_decl_location,
      	fortran_common, add_location_or_const_value_attribute,
      	add_scalar_info, add_linkage_name, set_block_abstract_flags,
      	local_function_static, gen_variable_die, dwarf2out_late_global_decl,
      	optimize_one_addr_into_implicit_ptr,
      	optimize_location_into_implicit_ptr): Likewise.
      	* gimple-low.c (record_vars_into): Likewise.
      	* ipa-visibility.c (update_vtable_references): Likewise.
      	* tree-ssa-address.c (fixed_address_object_p, copy_ref_info):
      	Likewise.
      	* lto-streamer-out.c (tree_is_indexable, get_symbol_initial_value,
      	DFS::DFS_write_tree_body, write_symbol): Likewise.
      	* langhooks.c (lhd_warn_unused_global_decl,
      	lhd_set_decl_assembler_name): Likewise.
      	* attribs.c (decl_attributes): Likewise.
      	* except.c (output_ttype): Likewise.
      	* varpool.c (varpool_node::get_create, ctor_for_folding,
      	varpool_node::assemble_decl, varpool_node::create_alias): Likewise.
      	* fold-const.c (fold_unary_loc): Likewise.
      	* ipa-prop.c (ipa_compute_jump_functions_for_edge,
      	ipa_find_agg_cst_from_init): Likewise.
      	* omp-low.c (expand_omp_regimplify_p, expand_omp_taskreg,
      	expand_omp_target, lower_omp_regimplify_p,
      	grid_reg_assignment_to_local_var_p, grid_remap_prebody_decls,
      	find_link_var_op): Likewise.
      	* tree-chrec.c (chrec_contains_symbols): Likewise.
      	* tree-cfg.c (verify_address, verify_expr, verify_expr_location_1,
      	gimple_duplicate_bb, move_stmt_op, replace_block_vars_by_duplicates,
      	execute_fixup_cfg): Likewise.
      
      From-SVN: r240900
      Jakub Jelinek committed
  30. 07 Oct, 2016 2 commits
  31. 26 Sep, 2016 1 commit
  32. 10 Sep, 2016 1 commit
    • Make canonical_va_list_type more strict · 5b28efbb
      2016-09-10  Tom de Vries  <tom@codesourcery.com>
      
      	PR C/71602
      	* builtins.c (std_canonical_va_list_type): Strictly return non-null for
      	va_list type only.
      	* config/i386/i386.c (ix86_canonical_va_list_type): Same.
      	* gimplify.c (gimplify_va_arg_expr): Handle &va_list.
      
      	* c-common.c (build_va_arg): Handle more strict
      	targetm.canonical_va_list_type.  Replace first argument type error with
      	assert.
      
      	* c-c++-common/va-arg-va-list-type.c: New test.
      
      From-SVN: r240072
      Tom de Vries committed
  33. 02 Sep, 2016 1 commit
    • re PR c/65467 ([libgomp] sorry, unimplemented: '_Atomic' with OpenMP) · 9dc5773f
      	PR c/65467
      	* gimplify.c (gimplify_adjust_omp_clauses_1): Diagnose implicit
      	map and firstprivate clauses on target construct for _Atomic
      	qualified decls.
      	(gimplify_adjust_omp_clauses): Diagnose explicit firstprivate clauses
      	on target construct for _Atomic qualified decls.
      	* omp-low.c (use_pointer_for_field): Return true for _Atomic qualified
      	decls.
      	* omp-simd-clone.c (simd_clone_clauses_extract): Warn and give up for
      	_Atomic qualified arguments not mentioned in uniform clause.
      c/
      	* c-parser.c (c_parser_declspecs): Don't sorry about _Atomic if
      	flag_openmp.
      	(c_parser_omp_variable_list): Use convert_lvalue_to_rvalue
      	instead of mark_exp_read on low_bound/length expression.
      	(c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_threads,
      	c_parser_omp_clause_num_tasks, c_parser_omp_clause_grainsize,
      	c_parser_omp_clause_priority, c_parser_omp_clause_hint,
      	c_parser_omp_clause_num_workers, c_parser_oacc_shape_clause,
      	c_parser_oacc_clause_tile, c_parser_omp_clause_schedule,
      	c_parser_omp_clause_vector_length, c_parser_omp_clause_num_teams,
      	c_parser_omp_clause_thread_limit, c_parser_omp_clause_aligned,
      	c_parser_omp_clause_linear, c_parser_omp_clause_safelen,
      	c_parser_omp_clause_simdlen, c_parser_omp_clause_device,
      	c_parser_omp_clause_dist_schedule): Use convert_lvalue_to_rvalue
      	instead of mark_expr_read.
      	(c_parser_omp_declare_reduction): Reject _Atomic qualified types.
      	* c-objc-common.h (LANG_HOOKS_OMP_CLAUSE_COPY_CTOR,
      	LANG_HOOKS_OMP_CLAUSE_ASSIGN_OP): Redefine.
      	* c-tree.h (c_omp_clause_copy_ctor): New prototype.
      	* c-typeck.c (handle_omp_array_sections_1): Diagnose _Atomic qualified
      	array section bases outside of depend clause, for depend clause
      	use convert_lvalue_to_rvalue on the base.
      	(c_finish_omp_clauses): Reject _Atomic qualified vars in reduction,
      	linear, aligned, map, to and from clauses.
      	(c_omp_clause_copy_ctor): New function.
      c-family/
      	* c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
      	(c_finish_omp_for): Reject _Atomic qualified iterators.
      testsuite/
      	* gcc.dg/gomp/_Atomic-1.c: New test.
      	* gcc.dg/gomp/_Atomic-2.c: New test.
      	* gcc.dg/gomp/_Atomic-3.c: New test.
      	* gcc.dg/gomp/_Atomic-4.c: New test.
      	* gcc.dg/gomp/_Atomic-5.c: New test.
      
      From-SVN: r239964
      Jakub Jelinek committed
  34. 01 Sep, 2016 1 commit
    • c-ada-spec.c (dump_ada_function_declaration): Increase buffer size to guarantee… · 3d7b83b6
      c-ada-spec.c (dump_ada_function_declaration): Increase buffer size to guarantee it fits the output of the formatted function...
      
      
      gcc/c-family/ChangeLog:
      
      	* c-ada-spec.c (dump_ada_function_declaration): Increase buffer
      	size to guarantee it fits the output of the formatted function
      	regardless of its arguments.
      
      gcc/cp/ChangeLog:
      
      	* mangle.c: Increase buffer size to guarantee it fits the output
      	of the formatted function regardless of its arguments.
      
      gcc/go/ChangeLog:
      
      	* gofrontend/expressions.cc: Increase buffer size to guarantee
      	it fits the output of the formatted function regardless of its
      	arguments.
      
      gcc/java/ChangeLog:
      
      	* decl.c (give_name_to_locals): Increase buffer size to guarantee
      	it fits the output of the formatted function regardless of its
      	arguments.
      	* mangle_name.c (append_unicode_mangled_name): Same.
      
      gcc/ChangeLog:
      
      	* genmatch.c (parser::parse_expr): Increase buffer size to guarantee
      	it fits the output of the formatted function regardless of its
      	arguments.
      	* gcc/genmodes.c (parser::parse_expr): Same.
      	* gimplify.c (gimplify_asm_expr): Same.
      	* passes.c (pass_manager::register_one_dump_file): Same.
      	* print-tree.c (print_node): Same.
      
      From-SVN: r239949
      Martin Sebor committed
  35. 29 Aug, 2016 1 commit
    • Handle errors in both args of va_arg · ba9bbd6f
      2016-08-29  Tom de Vries  <tom@codesourcery.com>
      
      	PR c/77398
      	* c-common.c (build_va_arg): Add first argument error.  Build va_arg
      	with error_mark_node as va_list instead of with illegal va_list.
      
      	* gimplify.c (gimplify_va_arg_expr): Replace first argument type error
      	with assert.
      
      	* g++.dg/ext/va-arg1.C: Add error check for illegal first argument.
      
      From-SVN: r239827
      Tom de Vries committed