139889 Commits

Author SHA1 Message Date
Marek Polacek
f68dd0a957 unpack-be-order.c: Use -Wno-shift-overflow.
* gcc.dg/vmx/unpack-be-order.c: Use -Wno-shift-overflow.
	* gcc.dg/vmx/unpack.c: Likewise.
	* gcc.target/powerpc/quad-atomic.c: Likewise.

From-SVN: r226032
2015-07-21 10:01:53 +00:00
Kyrylo Tkachov
e4e96a4f37 [match.pd] PR middle-end/66915 Restrict A - B -> A + (-B) to non-fixed-point types
PR middle-end/66915
	* match.pd (A - B -> A + (-B)): Don't allow folding
	when type if a fixed-point type.

From-SVN: r226028
2015-07-21 08:26:32 +00:00
GCC Administrator
2ac74346d8 Daily bump.
From-SVN: r226026
2015-07-21 00:16:11 +00:00
DJ Delorie
840cdb80d6 rl78-real.md (andqi3_real): Expand operands for clr1.
* config/rl78/rl78-real.md (andqi3_real): Expand operands for clr1.
(iorqi3_real): Likewise for set1.

From-SVN: r226023
2015-07-20 19:21:43 -04:00
Jason Merrill
3a353ff584 * include/bits/c++config: Fix abi_tag in special modes.
From-SVN: r226022
2015-07-20 18:39:54 -04:00
Uros Bizjak
73c581fbd1 i386.c (ix86_md_asm_adjust): Handle DImode dest_mode for !TARGET_64BIT.
* config/i386/i386.c (ix86_md_asm_adjust): Handle DImode dest_mode
	for !TARGET_64BIT.

testsuite/ChangeLog:

	* gcc.target/i386/asm-flag-5.c (f_ll): New.

From-SVN: r226017
2015-07-20 20:52:12 +02:00
Aditya Kumar
236d2dc4b8 add missing changelog
From-SVN: r226015
2015-07-20 18:05:16 +00:00
Aditya Kumar
050e1371a1 Refactor graphite-isl-ast-to-gimple.c
Refactor graphite-isl-ast-to-gimple.c:
Refactor so that each function can access 'region'. This will help
maintain a parameter rename_map within a region. No functional change intended.
This patch will be followed by another set of patches
where translate_isl_ast_to_gimple::region is used to keep parameters which need
renaming. Since we are planning to remove limit_scops, we now have to maintain a
set of parameters which needs renaming. This refactoring helps avoid passing
`region' to all the functions in this file.

It passes bootstrap and regtest.

gcc/ChangeLog:

2015-07-19  Aditya Kumar  <hiraditya@msn.com>

        * graphite-isl-ast-to-gimple.c:
	Refactor so that each function can access 'region'. This will help
	maintain a parameter rename_map within a region.

From-SVN: r226014
2015-07-20 18:02:49 +00:00
Nathan Sidwell
a051317b73 Missed a difference between gomp4 and trunk
From-SVN: r226012
2015-07-20 17:38:49 +00:00
Nathan Sidwell
a091118d2c oacc-parallel.c (GOACC_parallel): Move variadic handling into wait=-specific if.
* oacc-parallel.c (GOACC_parallel): Move variadic handling into
	wait=-specific if.
	(GOACC_enter_exit_data, GOACC_update): Use consistent num_waits
	!=0 condition.
	(goacc_waits): Move !num_waits handling to ...
	(GOACC_wait): ... here, the only caller that might have zero waits.

From-SVN: r226011
2015-07-20 17:31:46 +00:00
Ian Lance Taylor
53c1201606 compiler: Create dummy labels for blank labels.
Fixes golang/go#11591.
    
    Reviewed-on: https://go-review.googlesource.com/12043

From-SVN: r226009
2015-07-20 17:25:24 +00:00
Ian Lance Taylor
57c7a33b97 compiler: Remove unnecessary check for GCC-specific issue.
Reviewed-on: https://go-review.googlesource.com/11800

    compiler: remove name of unused parameter to avoid warning
    
    Reviewed-on: https://go-review.googlesource.com/12367

From-SVN: r226007
2015-07-20 16:47:24 +00:00
Segher Boessenkool
824478c04c * config/rs6000/rs6000.md (*lt0_disi): New.
From-SVN: r226006
2015-07-20 18:32:55 +02:00
Segher Boessenkool
7fc5cca388 re PR target/66217 (PowerPC rotate/shift/mask instructions not optimal)
PR target/66217
	* config/rs6000/constraints.md ("S", "T", "t"): Delete.  Update
	"available letters" comment.
	* config/rs6000/predicates.md (mask_operand, mask_operand_wrap,
	mask64_operand, mask64_2_operand, any_mask_operand, and64_2_operand,
	and_2rld_operand):  Delete.
	(and_operand): Adjust.
	(rotate_mask_operator): New.
	* config/rs6000/rs6000-protos.h (build_mask64_2_operands,
	includes_lshift_p, includes_rshift_p, includes_rldic_lshift_p,
	includes_rldicr_lshift_p, insvdi_rshift_rlwimi_p, extract_MB,
	extract_ME): Delete.
	(rs6000_is_valid_mask, rs6000_is_valid_and_mask,
	rs6000_is_valid_shift_mask, rs6000_is_valid_insert_mask,
	rs6000_insn_for_and_mask, rs6000_insn_for_shift_mask,
	rs6000_insn_for_insert_mask, rs6000_is_valid_2insn_and,
	rs6000_emit_2insn_and): New.
	* config/rs6000/rs6000.c (num_insns_constant): Adjust.
	(build_mask64_2_operands, includes_lshift_p, includes_rshift_p,
	includes_rldic_lshift_p, includes_rldicr_lshift_p,
	insvdi_rshift_rlwimi_p, extract_MB, extract_ME): Delete.
	(rs6000_is_valid_mask, rs6000_is_valid_and_mask,
	rs6000_insn_for_and_mask, rs6000_is_valid_shift_mask,
	s6000_insn_for_shift_mask, rs6000_is_valid_insert_mask,
	rs6000_insn_for_insert_mask, rs6000_is_valid_2insn_and,
	rs6000_emit_2insn_and): New.
	(print_operand) <'b', 'B', 'm', 'M', 's', 'S', 'W'>: Delete.
	(rs6000_rtx_costs) <CONST_INT>: Delete mask_operand and mask64_operand
	handling.
	<NOT>: Don't fall through to next case.
	<AND>: Handle the various rotate-and-mask cases directly.
	<IOR>: Always cost as one insn.
	* config/rs6000/rs6000.md (splitter for bswap:SI): Adjust.
	(and<mode>3): Adjust expander for the new patterns.
	(and<mode>3_imm, and<mode>3_imm_dot, and<mode>3_imm_dot2,
	and<mode>3_imm_mask_dot, and<mode>3_imm_mask_dot2): Adjust condition.
	(*and<mode>3_imm_dot_shifted): New.
	(*and<mode>3_mask): Delete, rewrite as ...
	(and<mode>3_mask): ... New.
	(*and<mode>3_mask_dot, *and<mode>3_mask_dot): Rewrite.
	(andsi3_internal0_nomc): Delete.
	(*andsi3_internal6): Delete.
	(*and<mode>3_2insn): New.
	(insv, insvsi_internal, *insvsi_internal1, *insvsi_internal2,
	*insvsi_internal3, *insvsi_internal4, *insvsi_internal5,
	*insvsi_internal6, insvdi_internal, *insvdi_internal2,
	*insvdi_internal3): Delete.
	(*rotl<mode>3_mask, *rotl<mode>3_mask_dot, *rotl<mode>3_mask_dot2,
	*rotl<mode>3_insert, *rotl<mode>3_insert_2, *rotl<mode>3_insert_3,
	*rotl<mode>3_insert_4, two splitters for multi-precision shifts,
	*ior<mode>_mask): New.
	(extzv, extzvdi_internal, *extzvdi_internal1, *extzvdi_internal2,
	*rotlsi3_mask, *rotlsi3_mask_dot, *rotlsi3_mask_dot2,
	*ashlsi3_imm_mask, *ashlsi3_imm_mask_dot, *ashlsi3_imm_mask_dot2,
	*lshrsi3_imm_mask, *lshrsi3_imm_mask_dot, *lshrsi3_imm_mask_dot2):
	Delete.
	(ashr<mode>3): Delete expander.
	(*ashr<mode>3): Rename to ...
	(ashr<mode>3): ... This.
	(ashrdi3_no_power, *ashrdisi3_noppc64be): Delete.
	(*rotldi3_internal4, *rotldi3_internal5 and split,
	*rotldi3_internal6 and split, *ashldi3_internal4, ashldi3_internal5
	and split, *ashldi3_internal6 and split, *ashldi3_internal7,
	ashldi3_internal8 and split, *ashldi3_internal9 and split): Delete.
	(*anddi3_2rld, *anddi3_2rld_dot, *anddi3_2rld_dot2): Delete.
	(splitter for loading a mask): Adjust.
	* doc/md.texi (Machine Constraints): Remove q, S, T, t constraints.

From-SVN: r226005
2015-07-20 18:30:56 +02:00
Nathan Sidwell
f3e9a059a7 plugin-nvptx.c (struct targ_fn_descriptor): Move later.
* plugin/plugin-nvptx.c (struct targ_fn_descriptor): Move later.
	(struct ptx_image_data): Move earlier, add fns field.
	(struct ptx_device): Add images and image_lock fields.
	(ptx_images, ptx_image_lock): Delete.
	(nvptx_open_device): Initialize images and image_lock fields.
	(nvptx_close_device): Destroy image_lock.
	(GOMP_OFFLOAD_load_image): Register image to device-specific fields.
	(GOMP_OFFLOAD_unload_image): Unregister image from device-specific
	fields.

From-SVN: r226004
2015-07-20 16:17:57 +00:00
Marek Polacek
dd5bc4becd genemit.c (print_code, [...]): Remove declarations.
* genemit.c (print_code, gen_exp, gen_insn, gen_expand, gen_split,
	output_add_clobbers, output_added_clobbers_hard_reg_p,
	gen_rtx_scratch): Remove declarations.

From-SVN: r226003
2015-07-20 15:57:19 +00:00
Jiong Wang
4d05408430 [AArch64][testcase] Restrict got_mem_hoist_1.c with small memory model
From-SVN: r225999
2015-07-20 14:33:49 +00:00
Marek Polacek
451b5e4830 re PR c++/55095 (Wshift-overflow)
PR c++/55095
	* c-common.c (c_fully_fold_internal): Warn about left shift overflows.
	Use EXPR_LOC_OR_LOC.
	(maybe_warn_shift_overflow): New function.
	* c-common.h (maybe_warn_shift_overflow): Declare.
	* c-opts.c (c_common_post_options): Set warn_shift_overflow.
	* c.opt (Wshift-overflow): New option.

	* c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
	(build_binary_op): Warn about left shift overflows.

	* typeck.c (cp_build_binary_op): Warn about left shift overflows.

	* doc/invoke.texi: Document -Wshift-overflow and -Wshift-overflow=.

	* c-c++-common/Wshift-overflow-1.c: New test.
	* c-c++-common/Wshift-overflow-2.c: New test.
	* c-c++-common/Wshift-overflow-3.c: New test.
	* c-c++-common/Wshift-overflow-4.c: New test.
	* c-c++-common/Wshift-overflow-5.c: New test.
	* g++.dg/cpp1y/left-shift-1.C: New test.
	* gcc.dg/c90-left-shift-2.c: New test.
	* gcc.dg/c90-left-shift-3.c: New test.
	* gcc.dg/c99-left-shift-2.c: New test.
	* gcc.dg/c99-left-shift-3.c: New test.
	* gcc.dg/pr40501.c: Use -Wno-shift-overflow.
	* gcc.c-torture/execute/pr40386.c: Likewise.
	* gcc.dg/vect/pr33373.c: Likewise.
	* gcc.dg/vect/vect-shift-2-big-array.c: Likewise.
	* gcc.dg/vect/vect-shift-2.c: Likewise.

Co-Authored-By: Richard Sandiford <richard.sandiford@arm.com>

From-SVN: r225998
2015-07-20 13:43:45 +00:00
Kyrylo Tkachov
7040e90366 [simplify-rtx][2/2] Simplify - (y ? -x : x) -> (!y ? -x : x)
* simplify-rtx.c (simplify_unary_operation_1, NEG case):
	(neg (x ? (neg y) : y)) -> !x ? (neg y) : y.

	* gcc.target/aarch64/neg_abs_1.c: New test.

From-SVN: r225997
2015-07-20 12:51:45 +00:00
Kyrylo Tkachov
232c93296d [PATCH][combine][1/2] Try to simplify before substituting
* combine.c (combine_simplify_rtx): Move simplification step
	before various transformations/substitutions.

From-SVN: r225996
2015-07-20 12:49:36 +00:00
Mikhail Maltsev
df2a7a38f6 Fix partial specialization syntax of wide int traits.
gcc/
	* wide-int.h (struct binary_traits): Fix partial specialization syntax.
	(struct int_traits): Likewise.

From-SVN: r225993
2015-07-20 05:30:12 +00:00
GCC Administrator
3e24aa1bd8 Daily bump.
From-SVN: r225992
2015-07-20 00:16:15 +00:00
Jonathan Wakely
5a7dbecc2e status_cxx2017.xml: Fix URL for N4279.
* doc/xml/manual/status_cxx2017.xml: Fix URL for N4279.
	* doc/html/manual/status.html: Regenerate.

From-SVN: r225988
2015-07-19 19:32:35 +01:00
GCC Administrator
14ab705f11 Daily bump.
From-SVN: r225987
2015-07-19 00:16:18 +00:00
Trevor Saunders
38faca8996 fix compilation of vmsdbgout.c
The debug-early branch renamed vmsdbgout_decl to
vmsdbgout_function_decl, but didn't update its prototype.

gcc/ChangeLog:

2015-07-18  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* vmsdbgout.c (vmsdbgout_decl): Change name of prototyped
	function to vmsdbgout_function_decl.

From-SVN: r225983
2015-07-18 21:09:04 +00:00
Uros Bizjak
ab22883b70 re PR target/66922 (wrong code for bit-field struct at -O1 and above on x86_64-linux-gnu)
PR target/66922
	* config/i386/i386.c (ix86_expand_pextr): Reject extractions
	from misaligned positions.
	(ix86_expand_pinsr): Reject insertions to misaligned positions.

testsuite/ChangeLog:

	PR target/66922
	* gcc.target/i386/pr66922.c: New test.

From-SVN: r225980
2015-07-18 11:50:37 +02:00
Sebastian Pop
49b8fe6c1a fix pr46851 and pr60340: remove unmaintained omega dependence test
Regstrapped on amd64-linux.

2015-07-18  Sebastian Pop  <s.pop@samsung.com>

	PR middle-end/46851
	PR middle-end/60340
	* Makefile.in: Removed omega.o.
	* common.opt: Remove flag fcheck-data-deps.
	* doc/invoke.texi: Remove documentation for fcheck-data-deps and
	its associated params: omega-max-vars, omega-max-geqs,
	omega-max-eqs, omega-max-wild-cards, omega-hash-table-size,
	omega-max-keys, omega-eliminate-redundant-constraints.
	* doc/loop.texi: Remove all the section on Omega.
	* graphite-blocking.c: Include missing params.h: it used to be
	included through tree-data-ref.h and omega.h.
	* graphite-isl-ast-to-gimple.c: Same.
	* graphite-optimize-isl.c: Same.
	* graphite-sese-to-poly.c: Same.
	* graphite.c: Same.
	* omega.c: Remove.
	* omega.h: Remove.
	* params.def: Removed PARAM_OMEGA_MAX_VARS, PARAM_OMEGA_MAX_GEQS,
	PARAM_OMEGA_MAX_EQS, PARAM_OMEGA_MAX_WILD_CARDS,
	PARAM_OMEGA_HASH_TABLE_SIZE, PARAM_OMEGA_MAX_KEYS, and
	PARAM_OMEGA_ELIMINATE_REDUNDANT_CONSTRAINTS.
	* passes.def: Remove pass_check_data_deps.
	* tree-data-ref.c (dump_affine_function): Declare DEBUG_FUNCTION.
	(dump_conflict_function): Same.
	(dump_subscript): Same.
	(print_direction_vector): Same.
	(print_dir_vectors): Same.
	(print_lambda_vector): Same.
	(print_dist_vectors): Same.
	(dump_data_dependence_relation): Same.
	(dump_data_dependence_relations): Same.
	(dump_dist_dir_vectors): Same.
	(dump_ddrs): Same.
	(init_omega_eq_with_af): Removed.
	(omega_extract_distance_vectors): Removed.
	(omega_setup_subscript): Removed.
	(init_omega_for_ddr_1): Removed.
	(init_omega_for_ddr): Removed.
	(ddr_consistent_p): Removed.
	(compute_affine_dependence): Do not use omega to check data
	dependences.
	(compute_data_dependences_for_bb): Removed.
	(analyze_all_data_dependences): Removed.
	(tree_check_data_deps): Removed.
	* tree-data-ref.h: Do not include omega.h.
	(compute_data_dependences_for_bb): Removed.
	(tree_check_data_deps): Removed.
	* tree-ssa-loop.c (pass_check_data_deps): Removed.
	(make_pass_check_data_deps): Removed.
	* tree-ssa-phiopt.c: Include params.h.
	* tree-vect-data-refs.c: Same.
	* tree-vect-slp.c: Same.

testsuite/
	* gcc.dg/tree-ssa/pr42327.c: Removed.
	* g++.dg/other/pr35011.C: Removed.

From-SVN: r225979
2015-07-18 01:11:05 +00:00
GCC Administrator
ca4b5dbd8a Daily bump.
From-SVN: r225978
2015-07-18 00:16:12 +00:00
Uros Bizjak
736cad254a i386.md (pushsf splitter): Pass curr_insn to find_constant_src.
* config/i386/i386.md (pushsf splitter): Pass curr_insn to
	find_constant_src.  FAIL if find_constant_src returns NULL_RTX.
	(mem->fpreg splitters): Ditto.
	(general_operand->nonimmediate_operand splitter): Use explicit modes.
	Disable DFmode for TARGET_64BIT.

From-SVN: r225975
2015-07-18 01:41:11 +02:00
H.J. Lu
f6f6b749d6 Replicate static chain on the stack
If we put static chain on the stack, we need to replicate it on the stack
when stack is realigned with DRAP so that static chain can be reached via
(argp - 2) slot.

gcc/

	PR target/66906
	* config/i386/i386.c (ix86_expand_prologue): Replicate static
	chain on the stack.

gcc/testsuite/

	PR target/66906
	* gcc.target/i386/pr66906.c: New test.

From-SVN: r225974
2015-07-17 16:02:25 -07:00
H.J. Lu
de19301a86 Add missing ChangeLog entries
From-SVN: r225973
2015-07-17 15:57:35 -07:00
Mikael Morin
44f18d706a coarray_collectives_16.f90: Fix pattern as follow-up to r225930.
gcc/testsuite/
	* gfortran.dg/coarray_collectives_16.f90: Fix pattern
	as follow-up to r225930.

From-SVN: r225965
2015-07-17 20:02:38 +00:00
Paul Thomas
eb438073bf re PR fortran/52846 ([F2008] Support submodules)
2015-07-17  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/52846
	* decl.c (gfc_match_end): Pick out declared submodule name from
	the composite identifier.
	* gfortran.h : Add 'submodule_name' to gfc_use_list structure.
	* module.c (gfc_match_submodule): Define submodule_name and add
	static 'submodule_name'.
	(gfc_match_submodule): Build up submodule filenames, using '@'
	as a delimiter. Store the output filename in 'submodule_name'.
	Similarly, the submodule identifier is built using '.' as an
	identifier.
	(gfc_dump_module): If current state is COMP_SUBMODULE, write
	to file 'submodule_name', using SUBMODULE_EXTENSION.
	(gfc_use_module): Similarly, use the 'submodule_name' field in
	the gfc_use_list structure and SUBMODULE_EXTENSION to read the
	implicitly used submodule files.

2015-07-17  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/52846
	* lib/fortran-modules.exp (proc cleanup-submodules): New
	procedure.
	* gfortran.dg/submodule_1.f08: Change extension and clean up
	the submodule files.
	* gfortran.dg/submodule_2.f08: ditto
	* gfortran.dg/submodule_6.f08: ditto
	* gfortran.dg/submodule_7.f08: ditto
	* gfortran.dg/submodule_8.f08: New test
	* gfortran.dg/submodule_9.f08: New test

From-SVN: r225958
2015-07-17 17:32:09 +00:00
Paul Thomas
4d511a3ba7 re PR fortran/52846 ([F2008] Support submodules)
2015-07-17  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/52846
	* decl.c (gfc_match_end): Pick out declared submodule name from
	the composite identifier.
	* gfortran.h : Add 'submodule_name' to gfc_use_list structure.
	* module.c (gfc_match_submodule): Define submodule_name and add
	static 'submodule_name'.
	(gfc_match_submodule): Build up submodule filenames, using '@'
	as a delimiter. Store the output filename in 'submodule_name'.
	Similarly, the submodule identifier is built using '.' as an
	identifier.
	(gfc_dump_module): If current state is COMP_SUBMODULE, write
	to file 'submodule_name', using SUBMODULE_EXTENSION.
	(gfc_use_module): Similarly, use the 'submodule_name' field in
	the gfc_use_list structure and SUBMODULE_EXTENSION to read the
	implicitly used submodule files.

2015-07-17  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/52846
	* lib/fortran-modules.exp (proc cleanup-submodules): New
	procedure.
	* gfortran.dg/submodule_1.f08: Change extension and clean up
	the submodule files.
	* gfortran.dg/submodule_2.f08: ditto
	* gfortran.dg/submodule_6.f08: ditto
	* gfortran.dg/submodule_7.f08: ditto
	* gfortran.dg/submodule_8.f08: New test
	* gfortran.dg/submodule_9.f08: New test

From-SVN: r225957
2015-07-17 17:27:42 +00:00
Paul Thomas
d0e8d89223 re PR fortran/52846 ([F2008] Support submodules)
2015-07-17  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/52846
	* decl.c (gfc_match_end): Pick out declared submodule name from
	the composite identifier.
	* gfortran.h : Add 'submodule_name' to gfc_use_list structure.
	* module.c (gfc_match_submodule): Define submodule_name and add
	static 'submodule_name'.
	(gfc_match_submodule): Build up submodule filenames, using '@'
	as a delimiter. Store the output filename in 'submodule_name'.
	Similarly, the submodule identifier is built using '.' as an
	identifier.
	(gfc_dump_module): If current state is COMP_SUBMODULE, write
	to file 'submodule_name', using SUBMODULE_EXTENSION.
	(gfc_use_module): Similarly, use the 'submodule_name' field in
	the gfc_use_list structure and SUBMODULE_EXTENSION to read the
	implicitly used submodule files.

2015-07-17  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/52846
	* lib/fortran-modules.exp (proc cleanup-submodules): New
	procedure.
	* gfortran.dg/submodule_1.f08: Change extension and clean up
	the submodule files.
	* gfortran.dg/submodule_2.f08: ditto
	* gfortran.dg/submodule_6.f08: ditto
	* gfortran.dg/submodule_7.f08: ditto
	* gfortran.dg/submodule_8.f08: New test
	* gfortran.dg/submodule_9.f08: New test

From-SVN: r225956
2015-07-17 17:26:42 +00:00
Paul Thomas
91ff0ece84 re PR fortran/52846 ([F2008] Support submodules)
2015-07-17  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/52846
	* decl.c (gfc_match_end): Pick out declared submodule name from
	the composite identifier.
	* gfortran.h : Add 'submodule_name' to gfc_use_list structure.
	* module.c (gfc_match_submodule): Define submodule_name and add
	static 'submodule_name'.
	(gfc_match_submodule): Build up submodule filenames, using '@'
	as a delimiter. Store the output filename in 'submodule_name'.
	Similarly, the submodule identifier is built using '.' as an
	identifier.
	(gfc_dump_module): If current state is COMP_SUBMODULE, write
	to file 'submodule_name', using SUBMODULE_EXTENSION.
	(gfc_use_module): Similarly, use the 'submodule_name' field in
	the gfc_use_list structure and SUBMODULE_EXTENSION to read the
	implicitly used submodule files.

2015-07-17  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/52846
	* lib/fortran-modules.exp (proc cleanup-submodules): New
	procedure.
	* gfortran.dg/submodule_1.f08: Change extension and clean up
	the submodule files.
	* gfortran.dg/submodule_2.f08: ditto
	* gfortran.dg/submodule_6.f08: ditto
	* gfortran.dg/submodule_7.f08: ditto
	* gfortran.dg/submodule_8.f08: New test
	* gfortran.dg/submodule_9.f08: New test

From-SVN: r225955
2015-07-17 17:26:12 +00:00
Paul Thomas
0240a6db71 re PR fortran/52846 ([F2008] Support submodules)
2015-07-17  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/52846
	* decl.c (gfc_match_end): Pick out declared submodule name from
	the composite identifier.
	* gfortran.h : Add 'submodule_name' to gfc_use_list structure.
	* module.c (gfc_match_submodule): Define submodule_name and add
	static 'submodule_name'.
	(gfc_match_submodule): Build up submodule filenames, using '@'
	as a delimiter. Store the output filename in 'submodule_name'.
	Similarly, the submodule identifier is built using '.' as an
	identifier.
	(gfc_dump_module): If current state is COMP_SUBMODULE, write
	to file 'submodule_name', using SUBMODULE_EXTENSION.
	(gfc_use_module): Similarly, use the 'submodule_name' field in
	the gfc_use_list structure and SUBMODULE_EXTENSION to read the
	implicitly used submodule files.

2015-07-17  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/52846
	* lib/fortran-modules.exp (proc cleanup-submodules): New
	procedure.
	* gfortran.dg/submodule_1.f08: Change extension and clean up
	the submodule files.
	* gfortran.dg/submodule_2.f08: ditto
	* gfortran.dg/submodule_6.f08: ditto
	* gfortran.dg/submodule_7.f08: ditto
	* gfortran.dg/submodule_8.f08: New test
	* gfortran.dg/submodule_9.f08: New test

From-SVN: r225953
2015-07-17 17:25:55 +00:00
Paul Thomas
d5b32576ff re PR fortran/52846 ([F2008] Support submodules)
2015-07-17  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/52846
	* decl.c (gfc_match_end): Pick out declared submodule name from
	the composite identifier.
	* gfortran.h : Add 'submodule_name' to gfc_use_list structure.
	* module.c (gfc_match_submodule): Define submodule_name and add
	static 'submodule_name'.
	(gfc_match_submodule): Build up submodule filenames, using '@'
	as a delimiter. Store the output filename in 'submodule_name'.
	Similarly, the submodule identifier is built using '.' as an
	identifier.
	(gfc_dump_module): If current state is COMP_SUBMODULE, write
	to file 'submodule_name', using SUBMODULE_EXTENSION.
	(gfc_use_module): Similarly, use the 'submodule_name' field in
	the gfc_use_list structure and SUBMODULE_EXTENSION to read the
	implicitly used submodule files.

2015-07-17  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/52846
	* lib/fortran-modules.exp (proc cleanup-submodules): New
	procedure.
	* gfortran.dg/submodule_1.f08: Change extension and clean up
	the submodule files.
	* gfortran.dg/submodule_2.f08: ditto
	* gfortran.dg/submodule_6.f08: ditto
	* gfortran.dg/submodule_7.f08: ditto
	* gfortran.dg/submodule_8.f08: New test
	* gfortran.dg/submodule_9.f08: New test

From-SVN: r225948
2015-07-17 17:25:04 +00:00
Paul Thomas
3d91b817de re PR fortran/52846 ([F2008] Support submodules)
2015-07-17  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/52846
	* decl.c (gfc_match_end): Pick out declared submodule name from
	the composite identifier.
	* gfortran.h : Add 'submodule_name' to gfc_use_list structure.
	* module.c (gfc_match_submodule): Define submodule_name and add
	static 'submodule_name'.
	(gfc_match_submodule): Build up submodule filenames, using '@'
	as a delimiter. Store the output filename in 'submodule_name'.
	Similarly, the submodule identifier is built using '.' as an
	identifier.
	(gfc_dump_module): If current state is COMP_SUBMODULE, write
	to file 'submodule_name', using SUBMODULE_EXTENSION.
	(gfc_use_module): Similarly, use the 'submodule_name' field in
	the gfc_use_list structure and SUBMODULE_EXTENSION to read the
	implicitly used submodule files.

2015-07-17  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/52846
	* lib/fortran-modules.exp (proc cleanup-submodules): New
	procedure.
	* gfortran.dg/submodule_1.f08: Change extension and clean up
	the submodule files.
	* gfortran.dg/submodule_2.f08: ditto
	* gfortran.dg/submodule_6.f08: ditto
	* gfortran.dg/submodule_7.f08: ditto
	* gfortran.dg/submodule_8.f08: New test
	* gfortran.dg/submodule_9.f08: New test

From-SVN: r225947
2015-07-17 17:24:49 +00:00
Paul Thomas
09155f6980 re PR fortran/52846 ([F2008] Support submodules)
2015-07-17  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/52846
	* decl.c (gfc_match_end): Pick out declared submodule name from
	the composite identifier.
	* gfortran.h : Add 'submodule_name' to gfc_use_list structure.
	* module.c (gfc_match_submodule): Define submodule_name and add
	static 'submodule_name'.
	(gfc_match_submodule): Build up submodule filenames, using '@'
	as a delimiter. Store the output filename in 'submodule_name'.
	Similarly, the submodule identifier is built using '.' as an
	identifier.
	(gfc_dump_module): If current state is COMP_SUBMODULE, write
	to file 'submodule_name', using SUBMODULE_EXTENSION.
	(gfc_use_module): Similarly, use the 'submodule_name' field in
	the gfc_use_list structure and SUBMODULE_EXTENSION to read the
	implicitly used submodule files.

2015-07-17  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/52846
	* lib/fortran-modules.exp (proc cleanup-submodules): New
	procedure.
	* gfortran.dg/submodule_1.f08: Change extension and clean up
	the submodule files.
	* gfortran.dg/submodule_2.f08: ditto
	* gfortran.dg/submodule_6.f08: ditto
	* gfortran.dg/submodule_7.f08: ditto
	* gfortran.dg/submodule_8.f08: New test
	* gfortran.dg/submodule_9.f08: New test

From-SVN: r225946
2015-07-17 17:24:32 +00:00
Paul Thomas
3d5dc929f4 re PR fortran/52846 ([F2008] Support submodules)
2015-07-17  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/52846
	* decl.c (gfc_match_end): Pick out declared submodule name from
	the composite identifier.
	* gfortran.h : Add 'submodule_name' to gfc_use_list structure.
	* module.c (gfc_match_submodule): Define submodule_name and add
	static 'submodule_name'.
	(gfc_match_submodule): Build up submodule filenames, using '@'
	as a delimiter. Store the output filename in 'submodule_name'.
	Similarly, the submodule identifier is built using '.' as an
	identifier.
	(gfc_dump_module): If current state is COMP_SUBMODULE, write
	to file 'submodule_name', using SUBMODULE_EXTENSION.
	(gfc_use_module): Similarly, use the 'submodule_name' field in
	the gfc_use_list structure and SUBMODULE_EXTENSION to read the
	implicitly used submodule files.

2015-07-17  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/52846
	* lib/fortran-modules.exp (proc cleanup-submodules): New
	procedure.
	* gfortran.dg/submodule_1.f08: Change extension and clean up
	the submodule files.
	* gfortran.dg/submodule_2.f08: ditto
	* gfortran.dg/submodule_6.f08: ditto
	* gfortran.dg/submodule_7.f08: ditto
	* gfortran.dg/submodule_8.f08: New test
	* gfortran.dg/submodule_9.f08: New test

From-SVN: r225945
2015-07-17 17:23:45 +00:00
Nathan Sidwell
896c28a7fa target.c (GOMP_offload_register): Use int for device type arg.
* target.c (GOMP_offload_register): Use int for device type arg.
	(GOMP_offload_unregister): Likewise.

From-SVN: r225944
2015-07-17 17:17:26 +00:00
Nathan Sidwell
ebe4a56073 mkoffload.c (process): Constify host data.
gcc/
	* config/nvptx/mkoffload.c (process): Constify host data.
	* config/i386/intelmic-mkoffload.c (generate_target_descr_file):
	Constify host data.
	(generate_host_descr_file): Likewise.

	libgomp/
	* target.c (struct_offload_image_descr): Constify host_table.
	(gomp_offload_image_to_device): Likewise.
	(GOMP_offload_register, GOMP_offload_unregister): Likewise.

	libgcc/
	* offloadstuff.c: Constify host data.

From-SVN: r225943
2015-07-17 17:12:01 +00:00
Aditya Kumar
2475775256 [graphite] fix pr61929
This fixes bootstrap of GCC with BOOT_CFLAGS="-g -O2 -fgraphite-identity
-floop-nest-optimize -floop-block -floop-interchange -floop-strip-mine".  It
passes regstrap on amd64-linux.  A previous change
(https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=213816), replaced
isl_int with isl_val because isl_int would be deprecated. Since isl_val has
stricter checks, it exposed the bug.  In the test case (isl_set_max_val) would
return infinity which would remain unchecked.  We now check if the value
returned is an integer or not, and bail out if it isn't.  The other problem was
that we were allowing all kinds of data-refs in a scop.  Now we discard a scop
if it has any date-ref other than (ARRAY_REF, MEM_REF, COMPONENT_REF).

	PR middle-end/61929
	* graphite-dependences.c (add_pdr_constraints): Renamed
	pdr->extent to pdr->subscript_sizes.
	* graphite-interchange.c (build_linearized_memory_access): Add
	back all gcc_assert's that the "isl_int to isl_val conversion"
	patch has removed.  Refactored.
	(pdr_stride_in_loop): Renamed pdr->extent to pdr->subscript_sizes.
	* graphite-poly.c (new_poly_dr): Same.
	(free_poly_dr): Same.
	* graphite-poly.h (struct poly_dr): Same.
	* graphite-scop-detection.c (stmt_has_simple_data_refs_p): Ignore
	all data references other than ARRAY_REF, MEM_REF, and COMPONENT_REF.
	* graphite-scop-detection.h: Fix space.
	* graphite-sese-to-poly.c (build_pbb_scattering_polyhedrons): Add
	back all gcc_assert's removed by a previous patch.
	(wrap): Remove the_isl_ctx global variable that the same patch has
	added.
	(build_loop_iteration_domains): Same.
	(add_param_constraints): Same.
	(pdr_add_data_dimensions): Same.  Refactored.
	(build_poly_dr): Renamed extent to subscript_sizes.

testsuite/
	PR middle-end/61929
	* gcc.dg/graphite/pr61929.c: New.

Co-Authored-By: Sebastian Pop <s.pop@samsung.com>

From-SVN: r225942
2015-07-17 16:34:21 +00:00
Jonathan Wakely
9298e25f6c status_cxx2011.xml: Add caveats for native_handle.
* doc/xml/manual/status_cxx2011.xml: Add caveats for native_handle.
	* doc/html/manual/status.html: Regenerate.

From-SVN: r225939
2015-07-17 17:08:14 +01:00
Marek Polacek
f7b7b0aab8 fold-const.c (fold_binary_loc): Move A - (A & B) into ~B & A ...
* fold-const.c (fold_binary_loc): Move A - (A & B) into ~B & A ...
	* match.pd: ... here.

	* gcc.dg/fold-minus-7.c: New test.

From-SVN: r225938
2015-07-17 16:03:27 +00:00
Nathan Sidwell
afb2d80bc5 mkoffload.c (process): Constify target data.
gcc/
	* config/nvptx/mkoffload.c (process): Constify target data.
	* config/i386/intelmic-mkoffload.c (generate_target_descr_file):
	Constify target data.
	(generate_target_offloadend_file): Likewise.

	libgomp/
	* libgomp.h (gomp_device_descr): Constify target data arguments.
	* target.c (struct offload_image_descr): Constify target_data.
	(gomp_offload_image_to_device): Likewise.
	(GOMP_offload_register): Likewise.
	(GOMP_offload_unrefister): Likewise.
	* plugin/plugin-host.c (GOMP_OFFLOAD_load_image,
	GOMP_OFFLOAD_unload_image): Constify target data.
	* plugin/plugin-nvptx.c (struct ptx_image_data): Constify target data.
	(GOMP_OFFLOAD_load_image, GOMP_OFFLOAD_unload_image): Likewise.

	liboffloadmic/
	* plugin/libgomp-plugin-intelmic.cpp (ImgDevAddrMap): Constify.
	(offload_image, GOMP_OFFLOAD_load_image,
	OMP_OFFLOAD_unload_image): Constify target data.

From-SVN: r225936
2015-07-17 14:07:53 +00:00
Alessandro Fanfarillo
996d027a36 Fix fortran double address operator with co_reduce
gcc/fortran/
2015-07-17  Alessandro Fanfarillo  <fanfarillo.gcc@gmail.com>

	* trans-intrinsic.c (conv_co_collective): Remove redundant address
	operator in the generated code.

gcc/testsuite/
2015-07-17  Alessandro Fanfarillo  <fanfarillo.gcc@gmail.com>

	* gfortran.dg/co_reduce_1.f90: New file.

From-SVN: r225930
2015-07-17 12:18:44 +00:00
H.J. Lu
c92f5b137e Add a testcase for PR target/66824
PR target/66824
	* gcc.target/i386/pr66824.c:

From-SVN: r225929
2015-07-17 04:52:09 -07:00
Andre Vehreschild
255388b812 re PR fortran/66035 (gfortran ICE segfault)
gcc/fortran/ChangeLog:

2015-07-17  Andre Vehreschild  <vehre@gcc.gnu.org>

	PR fortran/66035
	* trans-expr.c (alloc_scalar_allocatable_for_subcomponent_assignment):
	Compute the size to allocate for class and derived type objects
	correclty.
	(gfc_trans_subcomponent_assign): Only allocate memory for a
	component when the object to assign is not an allocatable class
	object (the memory is already present for allocatable class objects).
	Furthermore use copy_class_to_class for assigning the rhs to the
	component (may happen for dummy class objects on the rhs).


gcc/testsuite/ChangeLog:

2015-07-17  Andre Vehreschild  <vehre@gcc.gnu.org>

	PR fortran/66035
	* gfortran.dg/structure_constructor_13.f03: New test.

From-SVN: r225928
2015-07-17 12:16:21 +02:00