aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite
AgeCommit message (Collapse)AuthorFilesLines
2015-07-21Fix ChangeLog of r225926 (PR fortran/61831)Mikael Morin1-1/+1
From-SVN: r226033
2015-07-21unpack-be-order.c: Use -Wno-shift-overflow.Marek Polacek4-2/+10
* 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-20i386.c (ix86_md_asm_adjust): Handle DImode dest_mode for !TARGET_64BIT.Uros Bizjak2-1/+6
* 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[AArch64][testcase] Restrict got_mem_hoist_1.c with small memory modelJiong Wang2-0/+6
From-SVN: r225999
2015-07-20re PR c++/55095 (Wshift-overflow)Marek Polacek16-2/+336
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[simplify-rtx][2/2] Simplify - (y ? -x : x) -> (!y ? -x : x)Kyrylo Tkachov2-0/+21
* 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-18re PR target/66922 (wrong code for bit-field struct at -O1 and above on ↵Uros Bizjak2-0/+28
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-18fix pr46851 and pr60340: remove unmaintained omega dependence testSebastian Pop3-33/+7
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-17Replicate static chain on the stackH.J. Lu2-0/+50
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-17Add missing ChangeLog entriesH.J. Lu1-0/+10
From-SVN: r225973
2015-07-17coarray_collectives_16.f90: Fix pattern as follow-up to r225930.Mikael Morin2-3/+8
gcc/testsuite/ * gfortran.dg/coarray_collectives_16.f90: Fix pattern as follow-up to r225930. From-SVN: r225965
2015-07-17re PR fortran/52846 ([F2008] Support submodules)Paul Thomas1-0/+13
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-17re PR fortran/52846 ([F2008] Support submodules)Paul Thomas2-0/+84
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-17re PR fortran/52846 ([F2008] Support submodules)Paul Thomas1-0/+2
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-17re PR fortran/52846 ([F2008] Support submodules)Paul Thomas1-0/+2
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-17re PR fortran/52846 ([F2008] Support submodules)Paul Thomas1-0/+0
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-17re PR fortran/52846 ([F2008] Support submodules)Paul Thomas1-0/+0
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-17re PR fortran/52846 ([F2008] Support submodules)Paul Thomas1-0/+0
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-17re PR fortran/52846 ([F2008] Support submodules)Paul Thomas1-0/+2
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-17re PR fortran/52846 ([F2008] Support submodules)Paul Thomas2-0/+16
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[graphite] fix pr61929Aditya Kumar2-0/+25
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-17fold-const.c (fold_binary_loc): Move A - (A & B) into ~B & A ...Marek Polacek2-0/+40
* 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-17Fix fortran double address operator with co_reduceAlessandro Fanfarillo2-0/+37
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-17Add a testcase for PR target/66824H.J. Lu2-0/+34
PR target/66824 * gcc.target/i386/pr66824.c: From-SVN: r225929
2015-07-17re PR fortran/66035 (gfortran ICE segfault)Andre Vehreschild2-0/+33
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-17Fix PR61831: Side-effect variable component deallocationMikael Morin3-0/+141
gcc/fortran/ 2015-07-17 Mikael Morin <mikael@gcc.gnu.org> Dominique d'Humieres <dominiq@lps.ens.fr> PR fortran/61831 * trans-array.c (gfc_conv_array_parameter): Guard allocatable component deallocation code generation with descriptorless calling convention flag. * trans-expr.c (gfc_conv_expr_reference): Remove allocatable component deallocation code generation from revision 212329. (expr_may_alias_variables): New function. (gfc_conv_procedure_call): New boolean elemental_proc to factor check for procedure elemental-ness. Rename boolean f to nodesc_arg and declare it in the outer scope. Use expr_may_alias_variables, elemental_proc and nodesc_arg to decide whether generate allocatable component deallocation code. (gfc_trans_subarray_assign): Set deep copy flag. gcc/testsuite/ 2015-07-17 Mikael Morin <mikael@gcc.gnu.org> PR fortran/61831 * gfortran.dg/alloc_comp_auto_array_3.f90: Count the number of generated while loops in the tree dump. * gfortran.dg/derived_constructor_comps_6.f90: New file. Co-Authored-By: Dominique d'Humieres <dominiq@lps.ens.fr> From-SVN: r225926
2015-07-17tree-vect-loop-manip.c (rename_variables_in_bb): Add argument to allow ↵Yuri Rumyantsev2-0/+79
renaming of PHI arguments on edges incoming from outer... gcc/ * tree-vect-loop-manip.c (rename_variables_in_bb): Add argument to allow renaming of PHI arguments on edges incoming from outer loop header, add corresponding check before start PHI iterator. (slpeel_tree_duplicate_loop_to_edge_cfg): Introduce new bool variable DUPLICATE_OUTER_LOOP and set it to true for outer loops with true force_vectorize. Set-up dominator for outer loop too. Pass DUPLICATE_OUTER_LOOP as argument to rename_variables_in_bb. (slpeel_can_duplicate_loop_p): Allow duplicate of outer loop if it was marked with force_vectorize and has restricted cfg. (slpeel_tree_peel_loop_to_edge): Do not rename exit PHI uses in inner loop. * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Do not do peeling for outer loops. gcc/testsuite/ * gcc.dg/vect/vect-outer-simd-2.c: New test. From-SVN: r225923
2015-07-17re PR rtl-optimization/66891 (ICE in expand_call, at calls.c:3407)Uros Bizjak2-0/+21
PR rtl-optimization/66891 * calls.c (expand_call): Wrap precompute_register_parameters with NO_DEFER_POP/OK_DEFER_POP to prevent deferred pops. testsuite/ChangeLog: PR target/66891 * gcc.target/i386/pr66891.c: New test. From-SVN: r225918
2015-07-16[ARM][testsuite] Do not override -mcpu in no-volatile-in-it.cKyrylo Tkachov2-0/+5
* gcc.target/arm/no-volatile-in-it.c: Skip if -mcpu is overriden. From-SVN: r225892
2015-07-16re PR rtl-optimization/66626 (gcc.dg/torture/stackalign/non-local-goto-5.c ↵Vladimir Makarov2-0/+31
segfaults w/ -mregparm=3 or -miamcu) 2015-07-16 Vladimir Makarov <vmakarov@redhat.com> PR rtl-optimization/66626 * ira.h (emit-rtl.h): Include. (non_spilled_static_chain_regno_p): New. * ira-color.c (setup_profitable_hard_regs): Clear profitable regs unless it is non spilled static chain pseudo. (assign_hard_rego): Spill memory profitable allocno unless it is non spilled static chain pseudo. (allocno_spill_priority_compare): Put non spilled static chain pseudo at the end of sorted array. (improve_allocation): Do nothing if we have static chain and non-local goto. (allocno__priority_compare_func): Put non spilled static chain pseudo at the beginning of sorted array. (move_spill_restore): Ignore non spilled static chain pseudo. * ira-costs.c (find_costs_and_classes): Don't assign class NO_REGS to non spilled static chain pseudo. * lra-assigns.c (pseudo_compare_func): Put non spilled static chain pseudo at the beginning of sorted array. (spill_for): Spill non spilled static chain pseudo last. * lra-constraints.c (lra_constraints): Remove static chain pseudo check for equivalence. 2015-07-16 Vladimir Makarov <vmakarov@redhat.com> PR rtl-optimization/66626 * gcc.target/i386/pr66626-2.c: New. From-SVN: r225891
2015-07-16re PR ipa/66896 (ipa-prop.c:2479 runtime error: member call on null pointer ↵Martin Liska1-0/+4
of type 'struct ipa_polymorphic_call_context') Fix PR ipa/66896. * g++.dg/ipa/pr66896.c: New test. PR ipa/66896. * ipa-prop.c (update_jump_functions_after_inlining): Create properly dst_ctx if it does not exist. From-SVN: r225887
2015-07-16re PR tree-optimization/66894 (wrong code at -Os and above on x86_64-linux-gnu)Richard Biener2-0/+26
2015-07-16 Richard Biener <rguenther@suse.de> PR tree-optimization/66894 * tree-vrp.c (register_edge_assert_for_2): Fix bad assumption about deriving NE_EXPR from truncated values. * gcc.dg/torture/pr66894.c: New testcase. From-SVN: r225870
2015-07-16fold-const.c (fold_widened_comparison): Remove.Richard Biener2-2/+6
2015-07-16 Richard Biener <rguenther@suse.de> * fold-const.c (fold_widened_comparison): Remove. (fold_sign_changed_comparison): Likewise. (fold_comparison): Move widened and sign-changed comparison simplification ... * match.pd: ... to patterns here. * generic-match-head.c: Include target.h. * gimple-match-head.c: Likewise. * gcc.dg/tree-ssa/pr21031.c: Adjust. From-SVN: r225861
2015-07-16re PR target/66866 (incorrect load address on manual vector shuffle)Uros Bizjak2-0/+34
PR target/66866 * config/i386/i386-protos.h (ix86_expand_pextr): New prototype. * config/i386/i386.c (ix86_expand_pextr): New function. (ix86_expand_pinsr): Handle V1TI and TI modes. Call ix86_expand_pextr for non-lowpart subregs. * config/i386/i386.md (extzv<mode>): Expand with ix86_expand_pextr. (insv<mode>): Use SWI248 mode iterator. (insv<mode>_1): Ditto. testsuite/ChangeLog: PR target/66866 * g++.dg/pr66866.C: New test. From-SVN: r225852
2015-07-15simplify-rtx.c (simplify_ternary_operation): Add simplification for (!c) != ↵Bill Schmidt2-0/+24
{0,...,0} ? a : b for vector modes. [gcc] 2015-07-15 Bill Schmidt <wschmidt@linux.vnet.ibm.com> * simplify-rtx.c (simplify_ternary_operation): Add simplification for (!c) != {0,...,0} ? a : b for vector modes. [gcc/testsuite] 2015-07-15 Bill Schmidt <wschmidt@linux.vnet.ibm.com> * gcc.target/powerpc/vec-cmp-sel.c: New test. From-SVN: r225840
2015-07-15re PR c++/65091 (decltype(~arg) fails for template functions)Jason Merrill1-0/+11
PR c++/65091 * parser.c (cp_parser_unqualified_id): Don't accept ~x in a template if there is no type x in scope. From-SVN: r225831
2015-07-15objc-torture.exp (OBJC_TORTURE_OPTIONS): Remove { -O3 -fomit-frame-pointer }...Richard Biener2-3/+11
2015-07-15 Richard Biener <rguenther@suse.de> * lib/objc-torture.exp (OBJC_TORTURE_OPTIONS): Remove { -O3 -fomit-frame-pointer }, { -O3 -fomit-frame-pointer -funroll-loops } and { -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions } in favor of { -O3 -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions } From-SVN: r225821
2015-07-15Fix restoration of hi/lo in MIPS64R2 interrupt handlers.Robert Suchanek2-0/+12
gcc/ * config/mips/mips.c (mips_emit_save_slot_move): Fix typo. gcc/testsuite/ * gcc.target/mips/interrupt_handler-5.c: New test. From-SVN: r225820
2015-07-15Support new interrupt handler options.Matthew Fortune2-0/+36
gcc/ * config/mips/mips.c (mips_int_mask): New enum. (mips_shadow_set): Likewise. (int_mask): New variable. (use_shadow_register_set_p): Change type to enum mips_shadow_set. (machine_function): Add int_mask and use_shadow_register_set. (mips_attribute_table): Add attribute handlers for interrupt and use_shadow_register_set. (mips_interrupt_mask): New static function. (mips_handle_interrupt_attr): Likewise. (mips_handle_use_shadow_register_set_attr): Likewise. (mips_use_shadow_register_set): Change return type to enum mips_shadow_set. Add argument handling for use_shadow_register_set attribute. (mips_interrupt_extra_called_saved_reg_p): Update the conditional to compare with mips_shadow_set enum. (mips_compute_frame_info): Add interrupt mask and use_shadow_register_set to per-function information structure. Add a stack slot for EPC unconditionally. (mips_expand_prologue): Compare use_shadow_register_set value with mips_shadow_set enum. Save EPC always in K1, clobber only K1 for masked interrupt register but in EIC mode use K0 and save Cause in K0. EPC saved and restored unconditionally. Use PMODE_INSN macro when copying the stack pointer from the shadow register set. * config/mips/mips.h (SR_IM0): New define. * config/mips/mips.md (mips_rdpgpr): Rename to... (mips_rdpgpr_<mode>): ...this. Use the Pmode iterator. * doc/extend.texi (Declaring Attributes of Functions): Document optional arguments for interrupt and use_shadow_register_set attributes. gcc/testsuite/ * gcc.target/mips/interrupt_handler-4.c: New test. Co-Authored-By: Robert Suchanek <robert.suchanek@imgtec.com> From-SVN: r225819
2015-07-15re PR testsuite/66734 (Many MPX tests are skipped)Ilya Enkovich2-0/+6
PR testsuite/66734 * gcc.dg/lto/lto.exp: Initialize MPX. From-SVN: r225815
2015-07-15[ARM][testsuite] Add -mfloat-abi=softfp to some xscale testsKyrylo Tkachov3-2/+10
* gcc.target/arm/scd42-1.c: Add -mfloat-abi=softfp and appropriate dg-skip-if. * gcc.target/arm/scd42-3.c: Likewise. From-SVN: r225814
2015-07-15MIPS: In mips.exp allow the post-arch code to be run when the pre-arch code ↵Andrew Bennett2-2/+12
increases the isa_rev to mips32r6 or greater. testsuite/ * gcc.target/mips/mips.exp (mips-dg-options): Allow the post-arch code to be run when the pre-arch code increases the isa_rev to mips32r6 or greater. From-SVN: r225813
2015-07-15Add missing PR target/66731 to gcc/testsuite/ChangelogSzabolcs Nagy1-0/+1
From-SVN: r225810
2015-07-15c-torture.exp (C_TORTURE_OPTIONS): Remove { -O3 -fomit-frame-pointer }...Richard Biener4-7/+16
2015-07-15 Richard Biener <rguenther@suse.de> * lib/c-torture.exp (C_TORTURE_OPTIONS): Remove { -O3 -fomit-frame-pointer }, { -O3 -fomit-frame-pointer -funroll-loops } and { -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions } in favor of { -O3 -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions } * lib/gcc-dg.exp (DG_TORTURE_OPTIONS): Likewise. * gcc.c-torture/execute/builtins/builtins.exp: Add -fno-tracer to additional_flags. From-SVN: r225808
2015-07-15re PR rtl-optimization/66838 (Calling multiple SYSV AMD64 ABI functions from ↵Uros Bizjak2-11/+52
MS x64 ABI one results in clobbered parameters) PR rtl-optimization/66838 * postreload.c (reload_cse_move2add): Also process CALL_INSN_FUNCTION_USAGE when resetting information of call-clobbered registers. testsuite/ChangeLog: PR rtl-optimization/66838 * gcc.target/i386/pr66838.c: New test. From-SVN: r225806
2015-07-15re PR c++/66850 (Adding a forward declaration of a template containing a ↵Patrick Palka2-0/+49
template template parm causes ICE on valid code) Fix PR c++/66850 gcc/cp/ChangeLog: PR c++/66850 * pt.c (redeclare_class_template): Set the DECL_CONTEXTs of each template template parm in the redeclaration. (lookup_template_class_1): Peel off irrelevant template levels from current_template_parms before augmenting the argument list. gcc/testsuite/ChangeLog: PR c++/66850 * g++.dg/template/pr66850.C: New test. From-SVN: r225801
2015-07-14constraints.md (U, v): New constraints.Sandra Loosemore6-0/+113
2015-07-14 Sandra Loosemore <sandra@codesourcery.com> Cesar Philippidis <cesar@codesourcery.com> Chung-Lin Tang <cltang@codesourcery.com> gcc/ * config/nios2/constraints.md (U, v): New constraints. * config/nios2/predicates.md (rdprs_dcache_operand): New. (ldstex_memory_operand): New. * config/nios2/sync.md: New file. * config/nios2/nios2.md (unspecv): Add new builtin function UNSPECV codes. (rdprs, flushd, flushda, wrpie, eni): New patterns. (top-level): Include sync.md. * config/nios2/nios2.c (N2_FTYPES): Add function types for new builtins. (N2_BUILTINS): Add arch field setting, add new builtins. (enum nios2_builtin_code,nios2_builtins): Update N2_BUILTIN_DEF for arch field. (nios2_expand_ldst_builtin): Rename from nios2_expand_ldstio_builtin. Also handle ldex/stex/ldsex/stsex builtins. (nios2_expand_rdprs_builtin): New function. (nios2_expand_cache_builtin): New function. (nios2_expand_wrpie_builtin): New function. (nios2_expand_eni_builtin): New function. (nios2_expand_builtin): Add arch field handling and new builtin cases. * doc/extend.texi (Altera Nios II Built-in Functions): Document new builtins. * doc/md.texi (Machine Constraints): Document U and v constraints. gcc/testsuite/ * gcc.target/nios2/nios2-flushd.c: New. * gcc.target/nios2/nios2-rdprs.c: New. * gcc.target/nios2/r2-atomic.c: New. * gcc.target/nios2/r2-eni.c: New. * gcc.target/nios2/r2-wrpie.c: New. Co-Authored-By: Cesar Philippidis <cesar@codesourcery.com> Co-Authored-By: Chung-Lin Tang <cltang@codesourcery.com> From-SVN: r225800
2015-07-14predicates.md (pop_operation): New.Sandra Loosemore3-0/+97
2015-07-14 Sandra Loosemore <sandra@codesourcery.com> Cesar Philippidis <cesar@codesourcery.com> Chung-Lin Tang <cltang@codesourcery.com> gcc/ * config/nios2/predicates.md (pop_operation): New. (ldwm_operation, stwm_operation): New. (nios2_hard_register_operand): New. * config/nios2/nios2-protos.h (pop_operation_p): Declare. (ldstwm_operation_p): Declare. (gen_ldstwm_peep): Declare. * config/nios2/nios2.c: (nios2_ldst_parallel): Declare. (base_reg_adjustment_p): New. (pop_operation_p): New. (CDX_LDSTWM_VALID_REGS_0, CDX_LDSTWM_VALID_REGS_1): Define. (nios2_ldstwm_regset_p): New. (ldstwm_operation_p): New. (gen_ldst): New. (nios2_ldst_parallel): New. (struct ldswm_operand): Declare. (compare_ldstwm_operands): New. (can_use_cdx_ldstw): New. (gen_ldstwm_peep): New. * config/nios2/nios2-ldstwm.sml: New. * config/nios2/nios2.md: Include ldstwm.md. * config/nios2/ldstwm.md: Generated. gcc/testsuite/ * gcc.target/nios2/cdx-ldstwm-1.c: New. * gcc.target/nios2/cdx-ldstwm-2.c: New. Co-Authored-By: Cesar Philippidis <cesar@codesourcery.com> Co-Authored-By: Chung-Lin Tang <cltang@codesourcery.com> From-SVN: r225798
2015-07-14nios2.h (LABEL_ALIGN): Define.Sandra Loosemore12-1/+336
2015-07-14 Sandra Loosemore <sandra@codesourcery.com> Cesar Philippidis <cesar@codesourcery.com> Chung-Lin Tang <cltang@codesourcery.com> gcc/ * config/nios2/nios2.h (LABEL_ALIGN): Define. (REG_ALLOC_ORDER): Define. (ADJUST_REG_ALLOC_ORDER): Define. (HONOR_REG_ALLOC_ORDER): Define. (CDX_REG_P): Define. (ANDCLEAR_INT): Define. * config/nios2/nios2-protos.h (nios2_add_insn_asm): Declare. (nios2_label_align): Declare. (nios2_cdx_narrow_form_p): Declare. (nios2_adjust_reg_alloc_order): Declare. * config/nios2/nios2.c (nios2_rtx_costs): Adjust for BMX zero-extract operation. (nios2_large_unspec_reloc_p): New function, split from... (nios2_legitimate_pic_operand_p): ...here. (nios2_emit_move_sequence): Add *high/*lo_sum constant expand code. (nios2_print_operand_punct_valid_p): New. (nios2_print_operand): Add %., %!, %x, %y, %A. Remove %U. (split_mem_address): New. (split_alu_insn): New. (cdxreg): New. (cdx_add_immed, cdx_and_immed, cdx_mov_immed, cdx_shift_immed): New. (enum nios2_add_insn_kind): New. (nios2_add_insn_names, nios2_add_insn_narrow): New. (nios2_add_insn_classify): New. (nios2_add_insn_asm): New. (nios2_cdx_narrow_form_p): New. (label_align, min_labelno, max_labelno): New. (nios2_reorg): New. (nios2_label_align): New. (nios2_adjust_reg_alloc_order): New. (TARGET_PRINT_OPERAND_PUNCT_VALID_P): Define. (TARGET_MACHINE_DEPENDENT_REORG): Define. * config/nios2/constraints.md (P): New constraint. * config/nios2/predicates.md (const_and_operand): New. (and_operand): New. (stack_memory_operand): New. * config/nios2/nios2.md (SP_REGNO): Define stack pointer regno. (length): Update to use nios2_cdx_narrow_form_p(). (type): Add new insn type values. (control, alu, st, ld, shift): Update insn reservations with new insn type values. (*high, *lo_sum): Define new insn patterns for constant generation. (movqi_internal, movhi_internal, movsi_internal): Reduce alternatives, update asm template to handle CDX variants, update type attributes. (zero_extendhisi2, zero_extendqi<mode>2): Add CDX variants to asm template, update type attributes. (extendhisi2, extendqi<mode>2): Likewise. (addsi3): Change to use function for asm string. (subsi3): Add CDX notation to asm template, update type attributes. (negsi3, one_cmplsi3): Likewise. (andsi3): New pattern, specialized from logical patterns. (<code>si3): Remove and case, combine alternatives, update asm template. (<shift_op>si3): Add CDX notation, update type attributes. (rotrsi3): Update type attribute. (*merge, extzv, insv): New insn patterns. (return): Change to define_expand. (simple_return): Add CDX notation, update type attributes. (indirect_jump): Add CDX notation. (jump): Update asm cases, update length attribute expression. (*call, *call_value, *sibcall, *sibcall_value): Add CDX variant. (nios2_cbranch): Update asm cases and length attribute expression to handle CDX variants. (nios2_cmp<code>): Update asm template. (nop): Add CDX notation, update type attributes. (trap): Add CDX notation. (ctrapsi4): Update asm cases and length attribute expression to handle CDX variant. * doc/md.texi (Machine Constraints): Document P constraint. gcc/testsuite/ * gcc.target/nios2/andci.c: New. * gcc.target/nios2/bmx.c: New. * gcc.target/nios2/cdx-add.c: New. * gcc.target/nios2/cdx-branch.c: New. * gcc.target/nios2/cdx-callret.c: New. * gcc.target/nios2/cdx-loadstore.c: New. * gcc.target/nios2/cdx-logical.c: New. * gcc.target/nios2/cdx-mov.c: New. * gcc.target/nios2/cdx-shift.c: New. * gcc.target/nios2/cdx-sub.c: New. * gcc.target/nios2/nios2-trap-insn.c: Adjust pattern. Co-Authored-By: Cesar Philippidis <cesar@codesourcery.com> Co-Authored-By: Chung-Lin Tang <cltang@codesourcery.com> From-SVN: r225796
2015-07-14re PR c++/65071 (ICE on valid, sizeof...() of template template parameter ↵Andrea Azzarone2-0/+14
pack in return type) /cp 2015-07-14 Andrea Azzarone <azzaronea@gmail.com> PR c++/65071 * parser.c (cp_parser_sizeof_pack): Also consider template template parameters. /testsuite 2015-07-14 Andrea Azzarone <azzaronea@gmail.com> PR c++/65071 * g++.dg/cpp0x/vt-65071.C: New. From-SVN: r225793