gcc.git
8 years agoipa-cp.c (ipcp_bits_lattice::meet_with): Remove unreachable code.
Kugan Vivekanandarajah [Sun, 6 Nov 2016 08:25:36 +0000 (08:25 +0000)]
ipa-cp.c (ipcp_bits_lattice::meet_with): Remove unreachable code.

2016-11-06  Kugan Vivekanandarajah  <kuganv@linaro.org>

* ipa-cp.c (ipcp_bits_lattice::meet_with): Remove unreachable code.

From-SVN: r241883

8 years agoDaily bump.
GCC Administrator [Sun, 6 Nov 2016 00:16:15 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r241882

8 years agoinvoke.texi (Warning Options): Correct typos in -Walloca documentation.
Martin Sebor [Sat, 5 Nov 2016 19:54:17 +0000 (19:54 +0000)]
invoke.texi (Warning Options): Correct typos in -Walloca documentation.

gcc/ChangeLog:
* doc/invoke.texi (Warning Options): Correct typos in -Walloca
documentation.

From-SVN: r241875

8 years ago* es.po: Update.
Joseph Myers [Sat, 5 Nov 2016 19:34:21 +0000 (19:34 +0000)]
* es.po: Update.

From-SVN: r241873

8 years agocheck.c (gfc_check_move_alloc): Introduce error to prevent aliasing between to and...
Paul Thomas [Sat, 5 Nov 2016 14:25:25 +0000 (14:25 +0000)]
check.c (gfc_check_move_alloc): Introduce error to prevent aliasing between to and from arguments.

2016-11-05  Paul Thomas  <pault@gcc.gnu.org>

* check.c (gfc_check_move_alloc): Introduce error to prevent
aliasing between to and from arguments.

2016-11-05  Paul Thomas  <pault@gcc.gnu.org>

* gfortran.dg/move_alloc_17.f03: New test.

From-SVN: r241872

8 years agore PR ipa/78188 (AIX Bootstrap broken by tree-vrp.c change)
Richard Biener [Sat, 5 Nov 2016 13:06:08 +0000 (13:06 +0000)]
re PR ipa/78188 (AIX Bootstrap broken by tree-vrp.c change)

2016-11-05  Richard Biener  <rguenther@suse.de>

        PR bootstrap/78188
        * g++.dg/ipa/pr78188.C: New test.

From-SVN: r241871

8 years agore PR fortran/69495 (unused-label warning does not tell which flag triggered it)
Janus Weil [Sat, 5 Nov 2016 10:35:23 +0000 (11:35 +0100)]
re PR fortran/69495 (unused-label warning does not tell which flag triggered it)

2016-11-05  Janus Weil  <janus@gcc.gnu.org>
    Manuel Lopez-Ibanez  <manu@gcc.gnu.org>

PR fortran/69495
* invoke.texi: Mention -Wpedantic as an alias of -pedantic.
* check.c (gfc_check_transfer): Mention responsible flag in warning
message.
* frontend-passes.c (do_warn_function_elimination): Ditto.
* resolve.c (resolve_elemental_actual): Ditto.
(resolve_operator): Ditto.
(warn_unused_fortran_label): Ditto.
* trans-common.c (translate_common): Ditto.

2016-11-05  Janus Weil  <janus@gcc.gnu.org>
    Dominique d'Humieres  <dominiq@lps.ens.fr>

PR fortran/69495
* gfortran.dg/elemental_optional_args_6.f90: Use -Wpedantic flag.

Co-Authored-By: Dominique d'Humieres <dominiq@lps.ens.fr>
Co-Authored-By: Manuel López-Ibáñez <manu@gcc.gnu.org>
From-SVN: r241870

8 years agore PR fortran/67564 (Segfault on sourced allocattion statement with class(*) arrays)
Paul Thomas [Sat, 5 Nov 2016 07:11:24 +0000 (07:11 +0000)]
re PR fortran/67564 (Segfault on sourced allocattion statement with class(*) arrays)

2016-11-05  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/67564
* trans-expr.c (gfc_conv_class_to_class): Return _len component
of unlimited polymorphic entities.

2016-11-05  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/67564
* gfortran.dg/select_type_39.f03: New test.

From-SVN: r241869

8 years agore PR go/78172 (gen-sysinfo.go vs AIX cred.h)
Ian Lance Taylor [Sat, 5 Nov 2016 00:21:33 +0000 (00:21 +0000)]
re PR go/78172 (gen-sysinfo.go vs AIX cred.h)

PR go/78172.
    libgo: avoid confusion in upcase_fields in mksysinfo.sh

    The mksysinfo.sh script could get confused when there were multiple
    types starting with the same name.  I believe this is the underlying
    cause of GCC PR 78172.

    Also redirect a grep to /dev/null to avoid extraneous messages during
    the build.

    Reviewed-on: https://go-review.googlesource.com/32821

From-SVN: r241868

8 years agoDaily bump.
GCC Administrator [Sat, 5 Nov 2016 00:16:20 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r241867

8 years agolibiberty: Fix -Wimplicit-fallthrough warnings.
Mark Wielaard [Fri, 4 Nov 2016 23:55:01 +0000 (23:55 +0000)]
libiberty: Fix -Wimplicit-fallthrough warnings.

Adjust some comments, add some explicit fall through comments or explicit
returns where necessary to not get implicit-fallthrough warnings.

All fall throughs were deliberate. In one case I added an explicit return
false for clarity instead of falling through a default case (that also
would return false).

libiberty/ChangeLog:

       * cplus-dem.c (demangle_signature): Move fall through comment.
       (demangle_fund_type): Add fall through comment between 'G' and 'I'.
       * hashtab.c (iterative_hash): Add fall through comments.
       * regex.c (regex_compile): Add Fall through comment after '+'/'?'.
       (byte_re_match_2_internal): Add Fall through comment after jump_n.
       Change "Note fall through" to "Fall through".
       (common_op_match_null_string_p): Return false after set_number_at
       instead of fall through.

From-SVN: r241864

8 years agore PR ipa/78188 (AIX Bootstrap broken by tree-vrp.c change)
David Edelsohn [Fri, 4 Nov 2016 23:20:50 +0000 (23:20 +0000)]
re PR ipa/78188 (AIX Bootstrap broken by tree-vrp.c change)

PR bootstrap/78188
PR c++/71848
* ipa-comdats.c (pass_ipa_comdats::gate): Require HAVE_COMDAT_GROUP.

From-SVN: r241863

8 years agore PR fortran/64933 (ASSOCIATE on a character variable does not allow substring expre...
Paul Thomas [Fri, 4 Nov 2016 19:23:44 +0000 (19:23 +0000)]
re PR fortran/64933 (ASSOCIATE on a character variable does not allow substring expressions)

2016-04-19  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/64933
* primary.c (gfc_match_varspec): If selector expression is
unambiguously an array, make sure that the associate name
is an array and has an array spec. Modify the original
condition for doing this to exclude character types.

2016-04-19  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/64933
* gfortran.dg/associate_23.f90: New test.

From-SVN: r241860

8 years agore PR target/77834 (ICE: in make_decl_rtl, at varasm.c:1311 with -O -ftree-pre -mstri...
Jakub Jelinek [Fri, 4 Nov 2016 19:14:07 +0000 (20:14 +0100)]
re PR target/77834 (ICE: in make_decl_rtl, at varasm.c:1311 with -O -ftree-pre -mstringop-strategy=libcall)

PR target/77834
* alias.c (nonoverlapping_memrefs_p): Return 0 if exprx or expry
doesn't have rtl set.

* gcc.dg/pr77834.c: New test.

From-SVN: r241859

8 years agore PR c++/67980 (left shift count is negative [-Wshift-count-negative] generated...
Paolo Carlini [Fri, 4 Nov 2016 18:58:53 +0000 (18:58 +0000)]
re PR c++/67980 (left shift count is negative [-Wshift-count-negative] generated for unreachable code)

/cp
2016-11-04  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/67980
* pt.c (tsubst_expr, case IF_STMT): Use fold_non_dependent_expr
to suppress unwanted warnings.

/testsuite
2016-11-04  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/67980
* g++.dg/cpp1y/pr67980.C: New.

From-SVN: r241858

8 years agors6000.c (gimple-ssa.h): New #include.
Bill Schmidt [Fri, 4 Nov 2016 18:15:30 +0000 (18:15 +0000)]
rs6000.c (gimple-ssa.h): New #include.

[gcc]

2016-11-04  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

* config/rs6000/rs6000.c (gimple-ssa.h): New #include.
(TARGET_GIMPLE_FOLD_BUILTIN): Define as
rs6000_gimple_fold_builtin.
(rs6000_gimple_fold_builtin): New function.  Add handling for
early expansion of vector addition builtins.

[gcc/testsuite]

2016-11-04  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

* gcc.target/powerpc/fold-vec-add-1.c: New.
* gcc.target/powerpc/fold-vec-add-2.c: New.
* gcc.target/powerpc/fold-vec-add-3.c: New.
* gcc.target/powerpc/fold-vec-add-4.c: New.
* gcc.target/powerpc/fold-vec-add-5.c: New.
* gcc.target/powerpc/fold-vec-add-6.c: New.
* gcc.target/powerpc/fold-vec-add-7.c: New.

From-SVN: r241857

8 years agoexpr.h (copy_blkmode_from_reg): Delete.
Eric Botcazou [Fri, 4 Nov 2016 17:44:48 +0000 (17:44 +0000)]
expr.h (copy_blkmode_from_reg): Delete.

* expr.h (copy_blkmode_from_reg): Delete.
* expr.c (copy_blkmode_from_reg): Make static.

From-SVN: r241856

8 years agodefaults.h (LOAD_EXTEND_OP): Define if not already defined.
Eric Botcazou [Fri, 4 Nov 2016 17:42:32 +0000 (17:42 +0000)]
defaults.h (LOAD_EXTEND_OP): Define if not already defined.

* defaults.h (LOAD_EXTEND_OP): Define if not already defined.
* combine.c (LOAD_EXTEND_OP): Delete.
(simplify_comparison): Fix comment about LOAD_EXTEND_OP.
* cse.c (LOAD_EXTEND_OP): Delete.
* fold-const.c (LOAD_EXTEND_OP): Likewise.
* fwprop.c (free_load_extend): Remove #ifdef LOAD_EXTEND_OP/#endif.
* postreload.c (LOAD_EXTEND_OP): Delete.
* reload.c (push_reload): Remove #ifdef LOAD_EXTEND_OP/#endif.
Convert conditional compilation based on WORD_REGISTER_OPERATIONS.
(find_reloads): Likewise.
* reload1.c (eliminate_regs_1): Likewise.
* rtlanal.c (nonzero_bits1): Remove #ifdef LOAD_EXTEND_OP/#endif.
(num_sign_bit_copies1): Likewise.

From-SVN: r241855

8 years agoCorrect typo in changelog author
Matthew Fortune [Fri, 4 Nov 2016 17:11:31 +0000 (17:11 +0000)]
Correct typo in changelog author

gcc/testsuite/ChangeLog
* Update toma.tobacu to toma.tabacu

From-SVN: r241852

8 years agoStart adding target-specific selftests
David Malcolm [Fri, 4 Nov 2016 17:05:38 +0000 (17:05 +0000)]
Start adding target-specific selftests

gcc/ChangeLog:
* config/i386/i386.c: Include "selftest.h" and "selftest-rtl.h".
(selftest::ix86_test_dumping_hard_regs): New function.
(selftest::ix86_run_selftests): New function.
(TARGET_RUN_TARGET_SELFTESTS): When CHECKING_P, wire this up to
selftest::ix86_run_selftests.
* doc/tm.texi.in (TARGET_RUN_TARGET_SELFTESTS): New.
* doc/tm.texi: Regenerate
* selftest-rtl.h: New file.
* rtl-tests.c: Include "selftest-rtl.h".
(selftest::assert_rtl_dump_eq): Make non-static.
(ASSERT_RTL_DUMP_EQ): Move to selftest-rtl.h.
(selftest::test_dumping_regs): Update comment.
* selftest-run-tests.c: Include "target.h".
(selftest::run_tests): If non-NULL, call
targetm.run_target_selftests.
* target.def (run_target_selftests): New hook.

From-SVN: r241851

8 years agoMIPS: Handle -mbranch-likely in testsuite options
Toma Tabacu [Fri, 4 Nov 2016 16:47:32 +0000 (16:47 +0000)]
MIPS: Handle -mbranch-likely in testsuite options

gcc/testsuite/
* gcc.target/mips/mips.exp (mips-dg-options): Downgrade to R5
for -mbranch-likely, infer -mno-branch-likely for R6.

From-SVN: r241850

8 years agoAdd support for ARM Cortex-M33 processor
Thomas Preud'homme [Fri, 4 Nov 2016 16:46:44 +0000 (16:46 +0000)]
Add support for ARM Cortex-M33 processor

2016-11-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>

    gcc/
    * config/arm/arm-arches.def (armv8-m.main+dsp): Set Cortex-M33 as
    representative core for this architecture.
    * config/arm/arm-cores.def (cortex-m33): Define new processor.
    * config/arm/arm-tables.opt: Regenerate.
    * config/arm/arm-tune.md: Likewise.
    * config/arm/bpabi.h (BE8_LINK_SPEC): Add Cortex-M33 to the list of
    valid -mcpu options.
    * doc/invoke.texi (ARM Options): Document new Cortex-M33 processor.

From-SVN: r241849

8 years agoAdd support for ARM Cortex-M23 processor
Thomas Preud'homme [Fri, 4 Nov 2016 16:46:33 +0000 (16:46 +0000)]
Add support for ARM Cortex-M23 processor

2016-11-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>

    gcc/
    * config/arm/arm-arches.def (armv8-m.base): Set Cortex-M23 as
    representative core for this architecture.
    * config/arm/arm-cores.def (cortex-m23): Define new processor.
    * config/arm/arm-tables.opt: Regenerate.
    * config/arm/arm-tune.md: Likewise.
    * config/arm/arm.c (arm_v6m_tune): Add Cortex-M23 to the list of cores
    this tuning parameters apply to in the comment.
    * config/arm/bpabi.h (BE8_LINK_SPEC): Add Cortex-M23 to the list of
    valid -mcpu options.
    * doc/invoke.texi (ARM Options): Document new Cortex-M23 processor.

From-SVN: r241848

8 years agofold-const.c (fold_cond_expr_with_comparison): Remove call to pedantic_non_lvalue_loc.
Bin Cheng [Fri, 4 Nov 2016 15:51:38 +0000 (15:51 +0000)]
fold-const.c (fold_cond_expr_with_comparison): Remove call to pedantic_non_lvalue_loc.

* fold-const.c (fold_cond_expr_with_comparison): Remove call
to pedantic_non_lvalue_loc.  Remove useless code for lvalue
where cond_expr can't be a lvalue.

From-SVN: r241847

8 years agore PR c++/71973 (c++ handles built-in functions inconsistently)
Bernd Edlinger [Fri, 4 Nov 2016 15:30:52 +0000 (15:30 +0000)]
re PR c++/71973 (c++ handles built-in functions inconsistently)

2016-11-04  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        PR c++/71973
        * g++.dg/cpp1y/lambda-generic-udt.C: Fix builtin function declaration.
        * g++.dg/init/new15.C: Likewise.
        * g++.dg/ipa/inline-1.C: Likewise.
        * g++.dg/ipa/inline-2.C: Likewise.
        * g++.dg/lto/20080908-1_0.C: Likewise.
        * g++.dg/tc1/dr20.C: Likewise.
        * g++.dg/tree-ssa/inline-1.C: Likewise.
        * g++.dg/tree-ssa/inline-2.C: Likewise.
        * g++.old-deja/g++.law/except1.C: Likewise.
        * g++.old-deja/g++.other/vbase5.C: Likewise.
        * obj-c++.dg/lto/trivial-1_0.mm: Likewise.

From-SVN: r241846

8 years agore PR tree-optimization/78210 (slsr-8.c scan-tree-dump-times optimized fails)
Bill Schmidt [Fri, 4 Nov 2016 15:21:38 +0000 (15:21 +0000)]
re PR tree-optimization/78210 (slsr-8.c scan-tree-dump-times optimized fails)

2016-11-04  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

PR tree-optimization/78210
* gcc.dg/tree-ssa/slsr-8.c: Fix slsr scan to include the
possibility of widening multiplies.

From-SVN: r241845

8 years agoPR c++/78198 - inherited template ctor with default arg
Jason Merrill [Fri, 4 Nov 2016 12:47:01 +0000 (08:47 -0400)]
PR c++/78198 - inherited template ctor with default arg

* call.c (convert_default_arg): Look through inheriting ctors.

From-SVN: r241843

8 years ago[ARC] Various small miscellaneous fixes.
Claudiu Zissulescu [Fri, 4 Nov 2016 12:13:43 +0000 (13:13 +0100)]
[ARC] Various small miscellaneous fixes.

gcc/
2016-11-04  Claudiu Zissulescu  <claziss@synopsys.com>

* config/arc/arc.c (arc_process_double_reg_moves): Use
gen_dexcl_2op call.
* config/arc/arc.md (movsi_insn): Disable unsupported move
instructions for ARCv2 cores.
(movdi): Use prepare_move_operands.
(movsf, movdf): Use move_dest_operand predicate.
* config/arc/constraints.md (Chs): Enable when barrel shifter is
present.
* config/arc/fpu.md (divsf3): Change to divsf3_fpu.
* config/arc/fpx.md (dexcl_3op_peep2_insn): Dx data register is
also a destination.
(dexcl_3op_peep2_insn_nores): Likewise.
* config/arc/arc.h (SHIFT_COUNT_TRUNCATED): Define to one.
(LINK_COMMAND_SPEC): Remove.

From-SVN: r241842

8 years agore PR tree-optimization/78185 (Wrong branch optimization with -O1 on x86/x86_64)
Richard Biener [Fri, 4 Nov 2016 08:54:42 +0000 (08:54 +0000)]
re PR tree-optimization/78185 (Wrong branch optimization with -O1 on x86/x86_64)

2016-11-04  Richard Biener  <rguenther@suse.de>

PR middle-end/78185
* loop-invariant.c (find_exits): Record entering inner
loops as possibly exiting to handle infinite sub-loops.
* tree-ssa-loop-im.c: Include tree-ssa-loop-niter.h.
(fill_always_executed_in_1): Honor infinite child loops.

* gcc.dg/pr78185.c: New testcase.

From-SVN: r241841

8 years agoFix wrong patch committed
Michael Meissner [Fri, 4 Nov 2016 04:37:07 +0000 (04:37 +0000)]
Fix wrong patch committed

From-SVN: r241840

8 years agoref-3.C: XFAIL AIX.
David Edelsohn [Fri, 4 Nov 2016 01:52:05 +0000 (01:52 +0000)]
ref-3.C: XFAIL AIX.

        * g++.dg/debug/dwarf2/ref-3.C: XFAIL AIX.
        * g++.dg/debug/dwarf2/ref-4.C: XFAIL AIX.

From-SVN: r241838

8 years agoDaily bump.
GCC Administrator [Fri, 4 Nov 2016 00:16:14 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r241837

8 years agore PR target/78192 (extract from vector registers to int results in wrong data order)
Michael Meissner [Thu, 3 Nov 2016 23:32:07 +0000 (23:32 +0000)]
re PR target/78192 (extract from vector registers to int results in wrong data order)

2016-11-03  Michael Meissner  <meissner@linux.vnet.ibm.com>

PR target/78192
* config/rs6000/vsx.md (vsx_extract_<mode>_di): The element number
has already been adjusted for endianness, so don't adjust it any
further.

From-SVN: r241834

8 years agore PR bootstrap/77993 (bootstrap failure on PowerPC/Linux)
Michael Meissner [Thu, 3 Nov 2016 21:25:12 +0000 (21:25 +0000)]
re PR bootstrap/77993 (bootstrap failure on PowerPC/Linux)

2016-11-03  Michael Meissner  <meissner@linux.vnet.ibm.com>

PR target/77993
* config/rs6000/rs6000.h (FLOAT128_IBM_P): Do not allow IFmode or
ICmode unless we have standard PowerPC floating point.
* config/rs6000/rs6000.md (FP iterator): Likewise.
(FMOVE128 iterator): Likewise.

From-SVN: r241833

8 years agore PR debug/28767 (GCC should output DW_TAG_ptr_to_member for member functions)
Jakub Jelinek [Thu, 3 Nov 2016 21:18:49 +0000 (22:18 +0100)]
re PR debug/28767 (GCC should output DW_TAG_ptr_to_member for member functions)

PR debug/28767
PR debug/56974
* langhooks.h (struct lang_hooks_for_types): Add type_dwarf_attribute
langhook.
* langhooks.c (lhd_type_dwarf_attribute): New function.
* langhooks-def.h (lhd_type_dwarf_attribute): Declare.
(LANG_HOOKS_TYPE_DWARF_ATTRIBUTE): Define.
(LANG_HOOKS_FOR_TYPES_INITIALIZER): Add
LANG_HOOKS_TYPE_DWARF_ATTRIBUTE.
(check_qualified_type, check_aligned_type): Call it.
* dwarf2out.c (modified_type_die): Don't use type_main_variant
for FUNCTION_TYPE or METHOD_TYPE, instead walk over variants with
check_base_type and check_lang_type.
(gen_ptr_to_mbr_type_die): If lookup_type_die is already non-NULL,
return early.  For pointer-to-data-member add DW_AT_use_location
attribute.
(gen_subroutine_type_die): Add DW_AT_{,rvalue_}reference attribute
if needed.
(gen_type_die_with_usage): Don't use type_main_variant
for FUNCTION_TYPE or METHOD_TYPE, instead walk over variants with
check_base_type and check_lang_type.  Formatting fixes. Call
get_debug_type langhook.
cp/
* tree.c (cp_check_qualified_type): Use check_base_type and
TYPE_QUALS comparison instead of check_qualified_type.
(cxx_type_hash_eq): Return false if type_memfn_rqual don't match.
* cp-objcp-common.c (cp_get_debug_type): New function.
(cp_decl_dwarf_attribute): Don't handle types here.
(cp_type_dwarf_attribute): New function.
* cp-objcp-common.h (cp_get_debug_type, cp_type_dwarf_attribute):
Declare.
(LANG_HOOKS_GET_DEBUG_TYPE, LANG_HOOKS_TYPE_DWARF_ATTRIBUTE):
Define.
testsuite/
* g++.dg/debug/dwarf2/ptrdmem-1.C: New test.
* g++.dg/debug/dwarf2/ref-3.C: New test.
* g++.dg/debug/dwarf2/ref-4.C: New test.
* g++.dg/debug/dwarf2/refqual-1.C: New test.
* g++.dg/debug/dwarf2/refqual-2.C: New test.

From-SVN: r241832

8 years agoUse type_hash_eq langhook in check_qualified_type.
Jason Merrill [Thu, 3 Nov 2016 19:52:58 +0000 (15:52 -0400)]
Use type_hash_eq langhook in check_qualified_type.

gcc/
* tree.c (check_lang_type): New.
(check_qualified_type): Use it.
(check_aligned_type): Use it.
* tree.h: Declare it.
gcc/cp/
* tree.c (cp_check_qualified_type): Call check_base_type instead
of check_qualified_type.
(cxx_type_hash_eq): Check ref-qualifiers.
* typeck.c (apply_memfn_quals): No need to mess with TYPE_CANONICAL.

From-SVN: r241831

8 years ago* c-cppbuiltin.c (c_cpp_builtins): Correct __cpp_inheriting_constructors.
Jason Merrill [Thu, 3 Nov 2016 19:52:19 +0000 (15:52 -0400)]
* c-cppbuiltin.c (c_cpp_builtins): Correct __cpp_inheriting_constructors.

From-SVN: r241830

8 years agoAdd missing hunk from previous commit.
Richard Earnshaw [Thu, 3 Nov 2016 19:12:40 +0000 (19:12 +0000)]
Add missing hunk from previous commit.

From-SVN: r241829

8 years agoDefault missing exponents to 0 with -fdec.
Fritz Reese [Thu, 3 Nov 2016 18:09:44 +0000 (18:09 +0000)]
Default missing exponents to 0 with -fdec.

gcc/fortran/
* gfortran.texi: Document.
* gfortran.h (gfc_dt): New field default_exp.
* primary.c (match_real_constant): Default exponent with -fdec.
* io.c (match_io): Set dt.default_exp with -fdec.
* ioparm.def (IOPARM_dt_default_exp): New.
* trans-io.c (build_dt): Set IOPARM_dt_default_exp with -fdec.

libgfortran/io/
* io.h (IOPARM_DT_DEFAULT_EXP): New flag bit.
* list_read.c (parse_real, read_real): Allow omission of exponent with
IOPARM_DT_DEFAULT_EXP.
* read.c (read_f): Ditto.

gcc/testsuite/gfortran.dg/
* dec_exp_1.f90, dec_exp_2.f90, dec_exp_3.f90: New testcases.

From-SVN: r241828

8 years ago[arm] Eliminate SUBTARGET_CPU_DEFAULT
Richard Earnshaw [Thu, 3 Nov 2016 18:08:19 +0000 (18:08 +0000)]
[arm] Eliminate SUBTARGET_CPU_DEFAULT

* config.gcc (arm-wrs-vxworks): Set target_cpu_cname.
(arm*-freebsd*): Likewise.
(arm*-*-netbsdelf*): Likewise.
(arm*-*-linux*): Likewise.
(arm*-*-uclinux*eabi*): Likewise.
(arm*-*-phoenix*): Likewise.
(arm*-*-eabi*, arm*-*-symbianelf*, arm*-*-rtems*): Likewise.
(arm*-*-*): Don't clobber target_cpu_cname when --with-cpu is not
specified.  Default to arm6 if target_cpu_cname is not set.
* arm/arm.c (arm_option_override): Simplify logic.  Assert that the
default cpu has been correctly configured.
* arm/arm.h (TARGET_CPU_DEFAULT): Delete.
(target_cpus): Delete TARGET_CPU_generic, add TARGET_CPU_num_cores.
* arm/freebsd.h (SUBTARGET_CPU_DEFAULT): Delete.
* arm/linux-eabi.h (SUBTARGET_CPU_DEFAULT): Delete.
* arm/linux-elf.h (SUBTARGET_CPU_DEFAULT): Delete.
* arm/symbian.h (SUBTARGET_CPU_DEFAULT): Delete.
* arm/unknown-elf.h (SUBTARGET_CPU_DEFAULT): Delete.

From-SVN: r241827

8 years ago[DWARF] Enable DW_CFA_VAL_EXPRESSION support
Jiong Wang [Thu, 3 Nov 2016 17:32:03 +0000 (17:32 +0000)]
[DWARF] Enable DW_CFA_VAL_EXPRESSION support

gcc/
* reg-notes.def (CFA_VAL_EXPRESSION): New entry.
* dwarf2cfi.c (dwarf2out_frame_debug_cfa_val_expression): New function.
(dwarf2out_frame_debug): Support REG_CFA_VAL_EXPRESSION.
(output_cfa_loc): Support DW_CFA_val_expression.
(output_cfa_loc_raw): Likewise.
(output_cfi): Likewise.
(output_cfi_directive): Likewise.
* dwarf2out.c (dw_cfi_oprnd1_desc): Support DW_CFA_val_expression.
(dw_cfi_oprnd2_desc): Likewise.
(mem_loc_descriptor): Recognize new pattern generated for value
expression.

From-SVN: r241826

8 years agocombine lhs zero_extract fix (PR78186)
Segher Boessenkool [Thu, 3 Nov 2016 16:04:22 +0000 (17:04 +0100)]
combine lhs zero_extract fix (PR78186)

PR rtl-optimization/78186
* combine.c (change_zero_ext): Mask the RHS of a zero_extract as
well, when converting to IOR.

From-SVN: r241824

8 years agoSupport legacy PARAMETER statements with -std=legacy.
Fritz O. Reese [Thu, 3 Nov 2016 16:00:58 +0000 (16:00 +0000)]
Support legacy PARAMETER statements with -std=legacy.

gcc/fortran/
* decl.c (gfc_match_parameter): Allow omitted '()' with -std=legacy.
* parse.c (decode_statement): Match "parameter" before assignments.
* gfortran.texi: Document.

gcc/testsuite/gfortran.dg/
* dec_parameter_1.f: New test.
* dec_parameter_2.f90: Likewise.
* dec_parameter_3.f90: Likewise.
* dec_parameter_4.f90: Likewise.

From-SVN: r241823

8 years agosparc.md (vec_interleave_lowv8qi): Delete.
Eric Botcazou [Thu, 3 Nov 2016 16:00:55 +0000 (16:00 +0000)]
sparc.md (vec_interleave_lowv8qi): Delete.

* config/sparc/sparc.md (vec_interleave_lowv8qi): Delete.
(vec_interleave_highv8qi): Likewise.

From-SVN: r241822

8 years agoMake direct emission of time profiler counter
Martin Liska [Thu, 3 Nov 2016 15:24:22 +0000 (16:24 +0100)]
Make direct emission of time profiler counter

* libgcov-profiler.c (__gcov_time_profiler): Remove.
(__gcov_time_profiler_atomic): Likewise.
* profile.c (instrument_values): Fix coding style.
(branch_prob): Use renamed function.
* tree-profile.c (init_ic_make_global_vars): Likewise.
(gimple_init_edge_profiler): Rename to
gimple_init_gcov_profiler.
tree_time_profiler_counter variable declaration.
(gimple_gen_time_profiler): Rewrite to do a direct gimple code
emission.
* value-prof.h: Remove an argument.
* gcc.dg/no_profile_instrument_function-attr-1.c: Update scanned
output.
* gcc.dg/tree-prof/time-profiler-3.c: New test.

From-SVN: r241821

8 years agore PR libgcc/78067 (libgcc2 calls count_leading_zero with 0)
Bernd Edlinger [Thu, 3 Nov 2016 12:52:19 +0000 (12:52 +0000)]
re PR libgcc/78067 (libgcc2 calls count_leading_zero with 0)

2016-11-03  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        PR libgcc/78067
        * libgcc2.c (__floatdisf, __floatdidf): Avoid undefined results from
        count_leading_zeros.

testsuite:
2016-11-03  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        PR libgcc/78067
        * gcc.dg/torture/fp-int-convert.h: Add more conversion tests.

From-SVN: r241817

8 years agors6000.c (rs6000_xcoff_declare_object_name): Use symtab_node::get_create.
Richard Biener [Thu, 3 Nov 2016 12:31:10 +0000 (12:31 +0000)]
rs6000.c (rs6000_xcoff_declare_object_name): Use symtab_node::get_create.

2016-11-03  Richard Biener  <rguenther@suse.de>

        * config/rs6000/rs6000.c (rs6000_xcoff_declare_object_name): Use
        symtab_node::get_create.

From-SVN: r241816

8 years ago[rtlanal] Fix WORD_REGISTER_OPERATIONS condition in nonzero_bits
Kyrylo Tkachov [Thu, 3 Nov 2016 12:08:26 +0000 (12:08 +0000)]
[rtlanal] Fix WORD_REGISTER_OPERATIONS condition in nonzero_bits

* rtlanal.c (nonzero_bits1): Fix WORD_REGISTER_OPERATIONS condition.
Move comments into more natural position.

From-SVN: r241815

8 years ago[ARC] Define SIZE_TYPE and PTRDIFF_TYPE correctly.
Vineet Gupta [Thu, 3 Nov 2016 10:52:52 +0000 (10:52 +0000)]
[ARC] Define SIZE_TYPE and PTRDIFF_TYPE correctly.

This silences tons of -Wformat= warnings when building ARC Linux kernel
with gcc 6.x (and restores the ARC gcc 4.8.x behaviour) which had
similar fix.

gcc/
2016-11-03  Vineet Gupta  <vgupta@synopsys.com>

* config/arc/arc.h (SIZE_TYPE): Define as unsigned int.
(PTRDIFF_TYPE): Define as int.

From-SVN: r241812

8 years agomake targetm.gen_ccmp{first,next} take rtx_insn **
Trevor Saunders [Thu, 3 Nov 2016 09:27:55 +0000 (09:27 +0000)]
make targetm.gen_ccmp{first,next} take rtx_insn **

gcc/ChangeLog:

2016-11-03  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

* ccmp.c (expand_ccmp_expr_1): Adjust.
(expand_ccmp_expr): Likewise.
(expand_ccmp_next): Likewise.
* config/aarch64/aarch64.c (aarch64_gen_ccmp_next): Likewise.
(aarch64_gen_ccmp_first): Likewise.
* doc/tm.texi: Regenerate.
* target.def (gen_ccmp_first): Change argument types to rtx_insn *.
(gen_ccmp_next): Likewise.

From-SVN: r241811

8 years agotree-vect-loop.c (destroy_loop_vec_info): Handle cond_expr.
Bin Cheng [Thu, 3 Nov 2016 09:15:45 +0000 (09:15 +0000)]
tree-vect-loop.c (destroy_loop_vec_info): Handle cond_expr.

* tree-vect-loop.c (destroy_loop_vec_info): Handle cond_expr.
(vect_is_simple_reduction): Swap cond_reduction by inversion.

From-SVN: r241810

8 years agoFix bougs PR 78170 failure for avr
Senthil Kumar Selvaraj [Thu, 3 Nov 2016 08:04:40 +0000 (08:04 +0000)]
Fix bougs PR 78170 failure for avr

The test defines int bitfields that are more than 16 bits wide, and this
fails for the avr with its 16 bit integer size. Therefore, require
effective target int32plus.

gcc/testsuite/

2016-11-03  Senthil Kumar Selvaraj  <senthil_kumar.selvaraj@atmel.com>

* gcc.c-torture/execute/pr78170.c: Require int32plus.

From-SVN: r241809

8 years agoDaily bump.
GCC Administrator [Thu, 3 Nov 2016 00:16:18 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r241808

8 years agoi386.c (ix86_init_libfuncs): New.
Uros Bizjak [Wed, 2 Nov 2016 22:25:44 +0000 (23:25 +0100)]
i386.c (ix86_init_libfuncs): New.

* config/i386/i386.c (ix86_init_libfuncs): New.  Call
darwin_rename_builtins here.
(ix86_expand_divmod_libfunc): New.
(TARGET_INIT_LIBFUNCS): Unconditionally define to ix86_init_libfuncs.
(TARGET_EXPAND_DIVMOD_LIBFUNC): Define.

From-SVN: r241805

8 years agoMakefile.in (LIB2_DIVMOD_FUNCS): Add _divmoddi4.
Uros Bizjak [Wed, 2 Nov 2016 22:23:13 +0000 (23:23 +0100)]
Makefile.in (LIB2_DIVMOD_FUNCS): Add _divmoddi4.

* Makefile.in (LIB2_DIVMOD_FUNCS): Add _divmoddi4.
* libgcc2.c (__divmoddi4): New function.
* libgcc2.h (__divmoddi4): Declare.
* libgcc-std.ver.in (GCC_7.0.0): New. Add __PFX_divmoddi4
and __PFX_divmodti4.

From-SVN: r241804

8 years agonvptx.c (PTX_GANG_DEFAULT): Set to zero.
Cesar Philippidis [Wed, 2 Nov 2016 22:10:02 +0000 (15:10 -0700)]
nvptx.c (PTX_GANG_DEFAULT): Set to zero.

gcc/
* config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Set to zero.

libgomp/
* plugin/plugin-nvptx.c (nvptx_exec): Interrogate board attributes
to determine default geometry.
* testsuite/libgomp.oacc-c-c++-common/loop-auto-1.c: Set gang
dimension.

Co-Authored-By: Nathan Sidwell <nathan@acm.org>
From-SVN: r241803

8 years agoxtensa: don't xfail gcc.c-torture/compile/20001226-1.c
Max Filippov [Wed, 2 Nov 2016 18:36:52 +0000 (18:36 +0000)]
xtensa: don't xfail gcc.c-torture/compile/20001226-1.c

With jump trampolines implemented in binutils since 2.25 and enabled by
default this test no longer fails on xtensa.

2016-11-02  Max Filippov  <jcmvbkbc@gmail.com>
gcc/testsuite/
* gcc.c-torture/compile/20001226-1.c: Don't xfail on xtensa.

From-SVN: r241801

8 years agoxtensa: fix ICE on pr59037.c test
Max Filippov [Wed, 2 Nov 2016 18:34:43 +0000 (18:34 +0000)]
xtensa: fix ICE on pr59037.c test

xtensa gcc gets ICE on pr59037.c test because its xtensa_output_literal
function cannot handle integer literals of sizes other than 4 and 8,
whereas the test uses 16-byte int vector.
Split integer literal formatting into the recursive function
xtensa_output_integer_literal_parts capable of handling literals of any
power of 2 size not less than 4.

2016-11-02  Max Filippov  <jcmvbkbc@gmail.com>
gcc/
* config/xtensa/xtensa.c (xtensa_output_integer_literal_parts):
New function.
(xtensa_output_literal): Use xtensa_output_integer_literal_parts
to format MODE_INT and MODE_PARTIAL_INT literals.

From-SVN: r241800

8 years agors6000: Disable shrink-wrap-separate for abi=spe (PR78168)
Segher Boessenkool [Wed, 2 Nov 2016 17:06:04 +0000 (18:06 +0100)]
rs6000: Disable shrink-wrap-separate for abi=spe (PR78168)

With the SPE ABI, if we wrap GPRs we need to handle the upper half of the
extended 64-bit registers as well, which we cannot easily do.  So, this
patch disables separate shrink-wrapping for the SPE ABI.

PR target/78168
* config/r6000/rs6000.c (rs6000_get_separate_components): Return
NULL if TARGET_SPE_ABI.

From-SVN: r241799

8 years agoFix for big-endian gcc.c-torture/execute/pr55750.c
Kyrylo Tkachov [Wed, 2 Nov 2016 16:03:13 +0000 (16:03 +0000)]
Fix for big-endian gcc.c-torture/execute/pr55750.c

* gimple-ssa-store-merging.c (encode_tree_to_bitpos): Don't forget to
clear padding bits even when they're less than a byte.

From-SVN: r241798

8 years agoFix failing vminnm/vmaxnm test on ARM.
Tamar Christina [Wed, 2 Nov 2016 15:57:11 +0000 (15:57 +0000)]
Fix failing vminnm/vmaxnm test on ARM.

* gcc.target/arm/simd/vmaxnm_f32_1.c (dg-require-effective-target):
Check for arm_v8_neon_hw.
* gcc.target/arm/simd/vmaxnmq_f32_1.c (dg-require-effective-target):
Likewise.
* gcc.target/arm/simd/vminnm_f32_1.c (dg-require-effective-target):
Likewise.
* gcc.target/arm/simd/vminnmq_f32_1.c(dg-require-effective-target):
Likewise.

From-SVN: r241797

8 years agogimple-ssa-store-merging.c: Include gimplify-me.h.
Richard Biener [Wed, 2 Nov 2016 15:00:48 +0000 (15:00 +0000)]
gimple-ssa-store-merging.c: Include gimplify-me.h.

2016-11-02  Richard Biener  <rguenther@suse.de>

* gimple-ssa-store-merging.c: Include gimplify-me.h.
(imm_store_chain_info::output_merged_stores): Force base_addr
to be proper GIMPLE for a MEM_REF address.
(pass_store_merging::execute): Restrict negative bitpos
handling to non-MEM_REF bases.  Remove TREE_THIS_VOLATILE
check.  Take into account non-NULL_TREE offset if the base
is already addressable.

* gcc.dg/store_merging_8.c: New testcase.

From-SVN: r241796

8 years agoNew warning -Wargument-mismatch for function argument mismatches.
Fritz O. Reese [Wed, 2 Nov 2016 14:56:41 +0000 (14:56 +0000)]
New warning -Wargument-mismatch for function argument mismatches.

gcc/fortran/
* lang.opt, invoke.texi: New argument -Wargument-mismatch.
* interface.c (compare_parameter, compare_actual_formal,
gfc_check_typebound_override, argument_rank_mismatch): Control argument
mismatch warnings with -Wargument-mismatch.
* resolve.c (resolve_structure_cons, resolve_global_procedure): Ditto.

gcc/testsuite/gfortran.dg/
* warn_argument_mismatch_1.f90: New test.

From-SVN: r241795

8 years agoAllow warning flags to associate through gfc_error.
Fritz Reese [Wed, 2 Nov 2016 14:46:33 +0000 (14:46 +0000)]
Allow warning flags to associate through gfc_error.

gcc/fortran/
* gfortran.h (gfc_error): New declaration for gfc_error with 'opt'.
* error.c (gfc_error): Add optional 'opt' argument.
* error.c (gfc_notify_std): Call fully-qualified gfc_error.

From-SVN: r241794

8 years agoAdd LE/BE SHA1H patterns with a V2SI input.
Wilco Dijkstra [Wed, 2 Nov 2016 14:00:22 +0000 (14:00 +0000)]
Add LE/BE SHA1H patterns with a V2SI input.

Add LE/BE SHA1H patterns with a V2SI input.  This avoids unnecessary
DUPs when using intrinsics like vsha1h_u32 (vgetq_lane_u32 (x, 0)).

    gcc/
        * config/aarch64/aarch64-simd.md (aarch64_crypto_sha1hv4si):
        New pattern.
        (aarch64_be_crypto_sha1hv4si): New pattern.

From-SVN: r241791

8 years agoThe add expander still contains some expansion code that was required for the previou...
Wilco Dijkstra [Wed, 2 Nov 2016 13:56:07 +0000 (13:56 +0000)]
The add expander still contains some expansion code that was required for the previous prolog/epilog code...

The add expander still contains some expansion code that was required for the
previous prolog/epilog code, but which is no longer needed.  I also noticed
that the current version splits off immediates from frame addressing
instructions, which doesn't seem a good idea.  Avoiding this resulted in small
codesize improvements.

    gcc/
        * config/aarch64/aarch64.md (add<mode>3): Remove
        redundant code.  Don't split frame based additions.

From-SVN: r241790

8 years agogimple-ssa-store-merging.c (struct store_immediate_info): Remove redundant val and...
Richard Biener [Wed, 2 Nov 2016 13:05:07 +0000 (13:05 +0000)]
gimple-ssa-store-merging.c (struct store_immediate_info): Remove redundant val and dest members.

2016-11-02  Richard Biener  <rguenther@suse.de>

* gimple-ssa-store-merging.c (struct store_immediate_info): Remove
redundant val and dest members.
(store_immediate_info::store_immediate_info): Adjust.
(merged_store_group::merged_store_group): Adjust.
(merged_store_group::apply_stores): Likewise.
(struct imm_store_chain_info): Add base_addr field.
(imm_store_chain_info::imm_store_chain_info): New constructor.
(imm_store_chain_info::terminate_and_process_chain): Do not pass base.
(imm_store_chain_info::output_merged_store): Likewise.  Use
addr_base which is already the address.
(imm_store_chain_info::output_merged_stores): Likewise.
(pass_tree_store_merging::terminate_all_aliasing_chains): Take
imm_store_chain_info instead of base.  Fix alias check.
(pass_tree_store_merging::terminate_and_release_chain): Likewise.
(imm_store_chain_info::coalesce_immediate_stores): Adjust.
(pass_store_merging::execute): Refuse to operate on TARGET_MEM_REF.
use the address of the base and adjust for other changes.

From-SVN: r241789

8 years agoprod-options.c: XFAIL AIX.
David Edelsohn [Wed, 2 Nov 2016 12:42:19 +0000 (12:42 +0000)]
prod-options.c: XFAIL AIX.

        * gcc.dg/debug/dwarf2/prod-options.c: XFAIL AIX.
        * gcc.dg/debug/dwarf2/pr71855.c: XFAIL AIX.
        * gcc.dg/addr_equal_1.c: XFAIL AIX.
        * gcc.dg/pr65779.c: XFAIL AIX.
        * gcc.dg/pr70405.c: XFAIL AIX.

From-SVN: r241787

8 years agoinline-var-1.C: XFAIL AIX.
David Edelsohn [Wed, 2 Nov 2016 12:39:06 +0000 (12:39 +0000)]
inline-var-1.C: XFAIL AIX.

        * g++.dg/debug/dwarf2/inline-var-1.C: XFAIL AIX.
        * g++.dg/debug/dwarf2/ref-2.C: XFAIL AIX.
        * g++.dg/debug/dwarf2/constexpr-var-1.C: XFAIL AIX.

From-SVN: r241786

8 years agoFix linker detection in check_gc_sections_available
Rainer Orth [Wed, 2 Nov 2016 10:27:23 +0000 (10:27 +0000)]
Fix linker detection in check_gc_sections_available

* lib/target-supports.exp (check_gc_sections_available): Use
-print-prog-name=ld to determine linker used.

From-SVN: r241783

8 years agoFix host_size_t_cst_p predicat
Martin Liska [Wed, 2 Nov 2016 09:56:04 +0000 (10:56 +0100)]
Fix host_size_t_cst_p predicat

* fold-const-call.c (host_size_t_cst_p): Test whether
t is convertible to size_t.
* gcc.dg/tree-ssa/builtins-folding-gimple-ub.c (main): Add
test case.

From-SVN: r241780

8 years agoPR tree-optimization/78170: Truncate sign-extended padding when encoding bitfields
Kyrylo Tkachov [Wed, 2 Nov 2016 09:28:35 +0000 (09:28 +0000)]
PR tree-optimization/78170: Truncate sign-extended padding when encoding bitfields

PR tree-optimization/78170
* gimple-ssa-store-merging.c (encode_tree_to_bitpos): Truncate padding
introduced by native_encode_expr on little-endian as well.

* gcc.c-torture/execute/pr78170.c: New test.

From-SVN: r241779

8 years agoPR tree-optimization/78162: Reject negative offsets in store merging early
Kyrylo Tkachov [Wed, 2 Nov 2016 09:25:22 +0000 (09:25 +0000)]
PR tree-optimization/78162: Reject negative offsets in store merging early

PR tree-optimization/78162
* gimple-ssa-store-merging.c (execute): Mark stores with bitpos < 0
as invalid.

* gcc.c-torture/compile/pr78162.c: New test.

From-SVN: r241778

8 years ago[AArch64] Add function comments to some prologue/epilogue helpers
Kyrylo Tkachov [Wed, 2 Nov 2016 08:57:08 +0000 (08:57 +0000)]
[AArch64] Add function comments to some prologue/epilogue helpers

* config/aarch64/aarch64.c (aarch64_register_saved_on_entry): Add
function comment.
(aarch64_next_callee_save): Likewise.
(aarch64_pushwb_single_reg): Likewise.
(aarch64_gen_storewb_pair): Likewise.
(aarch64_push_regs): Likewise.
(aarch64_gen_loadwb_pair): Likewise.
(aarch64_pop_regs): Likewise.
(aarch64_gen_store_pair): Likewise.
(aarch64_gen_load_pair): Likewise.
(aarch64_save_callee_saves): Likewise.
(aarch64_restore_callee_saves): Likewise.

From-SVN: r241777

8 years agore PR tree-optimization/78035 (Inconsistency between address comparison and alias...
Richard Biener [Wed, 2 Nov 2016 08:29:48 +0000 (08:29 +0000)]
re PR tree-optimization/78035 (Inconsistency between address comparison and alias analysis)

2016-11-02  Richard Biener  <rguenther@suse.de>

PR tree-optimization/78035
PR tree-optimization/77964
* gimple-pretty-print.c (pp_points_to_solution): Print
vars_contains_interposable.
* tree-ssa-alias.c: Include varasm.h.
(ptrs_compare_unequal): Check vars_contains_interposable and
decl_binds_to_current_def_p.
(dump_points_to_solution): Dump vars_contains_interposable.
* tree-ssa-alias.h (struct pt_solution): Add vars_contains_interposable
flag.
* tree-ssa-structalias.c: Include varasm.h.
(set_uids_in_ptset): Record whether vars contains a
not decl_binds_to_current_def_p variable in vars_contains_interposable.
(ipa_escaped_pt): Update initializer.

* gcc.target/i386/pr78035.c: New testcase.

From-SVN: r241776

8 years agore PR middle-end/78047 (Chromium apparently gets miscompiled)
Richard Biener [Wed, 2 Nov 2016 08:13:29 +0000 (08:13 +0000)]
re PR middle-end/78047 (Chromium apparently gets miscompiled)

2016-11-02  Richard Biener  <rguenther@suse.de>

PR tree-optimization/78047
* tree-ssa-structalias.c (push_fields_onto_fieldstack): Initialize
fake field at offset zero conservatively regarding to may_have_pointers.

From-SVN: r241775

8 years agotree-vrp.c (evrp_dom_walker::before_dom_children): Call infer_value_range on stmt...
Richard Biener [Wed, 2 Nov 2016 08:11:48 +0000 (08:11 +0000)]
tree-vrp.c (evrp_dom_walker::before_dom_children): Call infer_value_range on stmt ops and update value-ranges.

2016-11-02  Richard Biener  <rguenther@suse.de>

* tree-vrp.c (evrp_dom_walker::before_dom_children): Call
infer_value_range on stmt ops and update value-ranges.
Dump visited stmts and blocks.
(evrp_dom_walker::push_value_range): Dump changes.
(evrp_dom_walker::pop_value_range): Likewise.
(evrp_dom_walker::try_find_new_range): Avoid noop changes.

* gcc.dg/tree-ssa/vrp111.c: New testcase.
* gcc.dg/tree-ssa/pr20702.c: Disable EVRP.
* gcc.dg/tree-ssa/pr21086.c: Likewise.
* gcc.dg/tree-ssa/pr58480.c: Likewise.
* gcc.dg/tree-ssa/vrp08.c: Likewise.

From-SVN: r241774

8 years agoremove cast from prev_nonnote_insn_bb
Trevor Saunders [Wed, 2 Nov 2016 03:46:17 +0000 (03:46 +0000)]
remove cast from prev_nonnote_insn_bb

gcc/ChangeLog:

2016-11-01  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

* emit-rtl.c (prev_nonnote_insn_bb): Change argument type to
rtx_insn *.
* rtl.h (prev_nonnote_insn_bb): Adjust prototype.

From-SVN: r241773

8 years agoremove cast in delete_insn_chain
Trevor Saunders [Wed, 2 Nov 2016 03:46:10 +0000 (03:46 +0000)]
remove cast in delete_insn_chain

gcc/ChangeLog:

2016-11-01  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

* cfgrtl.c (delete_insn_chain): Change argument type to rtx_insn *
and adjust for that.
* cfgrtl.h (delete_insn_chain): Adjust prototype.

From-SVN: r241772

8 years agoremove cast to rtx_insn * in remove_note
Trevor Saunders [Wed, 2 Nov 2016 03:45:59 +0000 (03:45 +0000)]
remove cast to rtx_insn * in remove_note

gcc/ChangeLog:

2016-11-01  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

* config/rl78/rl78.c (gen-and_emit_move): Change argument type
to rtx_insn *.
(transcode_memory_rtx): Likewise.
(move_to_acc): Likewise.
(move_from_acc): Likewise.
(move_acc_to_reg): Likewise.
(move_to_x): Likewise.
(move_to_hl): Likewise.
(move_to_de): Likewise.
* config/rs6000/rs6000.c (emit_frame_save): Likewise.
(rs6000_emit_savres_rtx): Likewise.
(rs6000_emit_prologue): Likewise.
* reorg.c (update_reg_unused_notes): Likewise.
* rtl.h (remove_note): Adjust prototype.
* rtlanal.c (remove_note): Make argument type rtx_insn *.

From-SVN: r241771

8 years agosplit up some variables to use rtx_insn * more
Trevor Saunders [Wed, 2 Nov 2016 03:45:45 +0000 (03:45 +0000)]
split up some variables to use rtx_insn * more

gcc/ChangeLog:

2016-11-01  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

* config/alpha/alpha.c (alpha_legitimize_address_1): Split up
variables so some can be rtx_insn *.
(alpha_emit_xfloating_libcall): Likewise.
* config/mips/mips.c (mips_call_tls_get_addr): Likewise.
(mips_legitimize_tls_address): Likewise.
* optabs.c (expand_binop): Likewise.
* reload1.c (gen_reload): Likewise.

From-SVN: r241770

8 years agosplit up the trial variable in reorg.c:relax_delay_slots to use rtx_insn * more
Trevor Saunders [Wed, 2 Nov 2016 03:45:29 +0000 (03:45 +0000)]
split up the trial variable in reorg.c:relax_delay_slots to use rtx_insn * more

gcc/ChangeLog:

2016-11-01  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

* reorg.c (relax_delay_slots): Split up the trial variable.

From-SVN: r241769

8 years agouse rtx_insn * in various places where it is obvious
Trevor Saunders [Wed, 2 Nov 2016 03:44:50 +0000 (03:44 +0000)]
use rtx_insn * in various places where it is obvious

gcc/ChangeLog:

2016-11-01  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

* config/arc/arc.c (arc_emit_call_tls_get_addr): Make the type
of variables rtx_insn *.
* config/arm/arm.c (arm_call_tls_get_addr): Likewise.
(legitimize_tls_address): Likewise.
* config/bfin/bfin.c (hwloop_optimize): Likewise.
(bfin_gen_bundles): Likewise.
* config/c6x/c6x.c (reorg_split_calls): Likewise.
(c6x_reorg): Likewise.
* config/frv/frv.c (frv_reorder_packet): Likewise.
* config/i386/i386.c (ix86_split_idivmod): Likewise.
* config/ia64/ia64.c (ia64_expand_compare): Likewise.
* config/m32c/m32c.c (m32c_prepare_shift): Likewise.
* config/mn10300/mn10300.c: Likewise.
* config/rl78/rl78.c: Likewise.
* config/s390/s390.c (s390_fix_long_loop_prediction): Likewise.
* config/sh/sh-mem.cc (sh_expand_cmpstr): Likewise.
(sh_expand_cmpnstr): Likewise.
(sh_expand_strlen): Likewise.
(sh_expand_setmem): Likewise.
* config/sh/sh.md: Likewise.
* emit-rtl.c (emit_pattern_before): Likewise.
* except.c: Likewise.
* final.c: Likewise.
* jump.c: Likewise.

From-SVN: r241768

8 years agoMAINTAINERS (Write After Approval): Update email address,
Josh Conner [Wed, 2 Nov 2016 02:10:45 +0000 (02:10 +0000)]
MAINTAINERS (Write After Approval): Update email address,

2016-11-01  Josh Conner  <joshconner@google.com>

* MAINTAINERS (Write After Approval): Update email address,

From-SVN: r241767

8 years agoc-cppbuiltin.c (c_cpp_builtins): Update __cpp_inheriting_constructors.
Jason Merrill [Wed, 2 Nov 2016 02:10:38 +0000 (22:10 -0400)]
c-cppbuiltin.c (c_cpp_builtins): Update __cpp_inheriting_constructors.

* c-cppbuiltin.c (c_cpp_builtins): Update
__cpp_inheriting_constructors.

From-SVN: r241766

8 years agoImplement P0136R1, Rewording inheriting constructors.
Jason Merrill [Wed, 2 Nov 2016 01:50:29 +0000 (21:50 -0400)]
Implement P0136R1, Rewording inheriting constructors.

gcc/c-family/
* c.opt (-fnew-inheriting-ctors): New.
* c-opts.c: Default to on for ABI 11+.
gcc/cp/
* call.c (enum rejection_reason_code): Add rr_inherited_ctor.
(inherited_ctor_rejection): New.
(add_function_candidate): Reject inherited ctors for copying.
(enforce_access): Use strip_inheriting_ctors.
(print_z_candidate): Likewise.  Handle rr_inherited_ctor.
(convert_like_real): Avoid copying inheriting ctor parameters.
(build_over_call): Likewise.  A base ctor inheriting from vbase
has no parms.  Sorry about varargs.
(joust): A local constructor beats inherited with the same convs.
* class.c (add_method): Handle hiding inheriting ctors.
(one_inherited_ctor): Handle new semantics.
(add_implicitly_declared_members): Pass using_decl down.
(build_clone): A base ctor inheriting from vbase has no parms.
* cp-tree.h (DECL_INHERITED_CTOR): Store this instead of the base.
(SET_DECL_INHERITED_CTOR): Likewise.
(DECL_INHERITED_CTOR_BASE): Adjust.
* constexpr.c: Adjust.
* error.c (dump_function_decl): Decorate inheriting ctors.
* init.c (emit_mem_initializers): Suppress access control in
inheriting ctor.
* mangle.c (write_special_name_constructor): Handle new inheriting
ctor mangling.
* method.c (strip_inheriting_ctors, inherited_ctor_binfo)
(ctor_omit_inherited_parms, binfo_inherited_from): New.
(synthesized_method_walk): Use binfo_inherited_from.  Suppress
access control in inheriting ctor.
(deduce_inheriting_ctor): Deleted if ambiguous ctor inheritance.
(maybe_explain_implicit_delete): Explain ambigous ctor inheritance.
(add_one_base_init, do_build_copy_constructor): Adjust.
(locate_fn_flags, explain_implicit_non_constexpr): Adjust.
(implicitly_declare_fn): Adjust.
(get_inherited_ctor): Remove.
* name-lookup.c (do_class_using_decl): Check for indirect ctor
inheritance.
* optimize.c (cdtor_comdat_group): Adjust for new mangling.
(maybe_clone_body): Handle omitted parms in base clone.
(maybe_thunk_body): Don't thunk if base clone omits parms.
* pt.c (tsubst_decl): Adjust.
(instantiate_template_1): Suppress access control in inheriting
ctor.
(fn_type_unification): Do deduction with inherited ctor.
* tree.c (special_function_p): Adjust.
gcc/
* tree-inline.c (copy_tree_body_r): Only copy the taken branch of
a COND_EXPR with constant condition.
libiberty/
* cp-demangle.c (d_ctor_dtor_name): Handle inheriting constructor.

From-SVN: r241765

8 years agoDaily bump.
GCC Administrator [Wed, 2 Nov 2016 00:16:21 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r241764

8 years ago* gfortran.dg/pr70937.f90: require-effective-target lto.
David Edelsohn [Tue, 1 Nov 2016 23:31:44 +0000 (23:31 +0000)]
* gfortran.dg/pr70937.f90: require-effective-target lto.

From-SVN: r241761

8 years agolibiberty: Fix memory leak in ada_demangle when symbol cannot be demangled.
Mark Wielaard [Tue, 1 Nov 2016 23:13:10 +0000 (23:13 +0000)]
libiberty: Fix memory leak in ada_demangle when symbol cannot be demangled.

When a symbol cannot be demangled in ada_demangle a new demangled VEC
will be allocated without deleting the demangled VEC already in use.

Running testsuite/test-demangle under valgrind will show the leak for
this entry in testsuite/demangle-expected:

    # Elaborated flag (not demangled)
    --format=gnat
    x_E
    <x_E>

 11 bytes in 1 blocks are definitely lost in loss record 1 of 1
    at 0x4C27BE3: malloc (vg_replace_malloc.c:299)
    by 0x413FE7: xmalloc (xmalloc.c:148)
    by 0x4025EC: ada_demangle (cplus-dem.c:930)
    by 0x402C59: cplus_demangle (cplus-dem.c:892)
    by 0x400FEC: main (test-demangle.c:317)

libiberty/ChangeLog:

* cplus-dem.c (ada_demangle): Initialize demangled to NULL and
XDELETEVEC demangled when unknown.

From-SVN: r241760

8 years agodwarf2out.c (gen_variable_die): Remove again origin_die variable and its initialization.
Jakub Jelinek [Tue, 1 Nov 2016 22:56:48 +0000 (23:56 +0100)]
dwarf2out.c (gen_variable_die): Remove again origin_die variable and its initialization.

* dwarf2out.c (gen_variable_die): Remove again origin_die variable
and its initialization.

From-SVN: r241759

8 years agoFix dwarf2out.c non-HAVE_AS_LEB128 bootstrap failure
Rainer Orth [Tue, 1 Nov 2016 22:20:58 +0000 (22:20 +0000)]
Fix dwarf2out.c non-HAVE_AS_LEB128 bootstrap failure

* dwarf2out.c (output_rnglists): Wrap basebuf, len in
HAVE_AS_LEB128.

From-SVN: r241758

8 years agolibgo: fix GOARCH_PHYSPAGESIZE for ia64
Ian Lance Taylor [Tue, 1 Nov 2016 21:45:32 +0000 (21:45 +0000)]
libgo: fix GOARCH_PHYSPAGESIZE for ia64

    From Andreas Schwab.

    Reviewed-on: https://go-review.googlesource.com/32537

From-SVN: r241757

8 years agore PR fortran/78178 (ICE in WHERE statement with diagnostic)
Thomas Koenig [Tue, 1 Nov 2016 21:16:46 +0000 (21:16 +0000)]
re PR fortran/78178 (ICE in WHERE statement with diagnostic)

2016-11-01  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/78178
* match.c (match_simple_where):  Fill in locus for assigment
in simple WHERE statement.

2016-11-01  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/69544
* gfortran.dg/where_6.f90:  New test.

From-SVN: r241756

8 years agodwarf2out.c (add_name_and_src_coords_attributes): Add NO_LINKAGE_NAME argument, don...
Jakub Jelinek [Tue, 1 Nov 2016 18:35:06 +0000 (19:35 +0100)]
dwarf2out.c (add_name_and_src_coords_attributes): Add NO_LINKAGE_NAME argument, don't call add_linkage_name if it is true.

* dwarf2out.c (add_name_and_src_coords_attributes): Add NO_LINKAGE_NAME
argument, don't call add_linkage_name if it is true.
(gen_variable_die): For C++ inline static data members, consider the
initial call when old_die is NULL to be declaration and call
add_name_and_src_coords_attributes in that case with true as
NO_LINKAGE_NAME.  Add DW_AT_inline attribute if needed.
(gen_member_die): For C++ inline static data members, emit a
definition DIE right away in DW_TAG_compile_unit context.
cp/
* cp-objcp-common.c (cp_decl_dwarf_attribute): Handle DW_AT_inline.
testsuite/
* g++.dg/debug/dwarf2/inline-var-1.C: New test.

From-SVN: r241753

8 years agore PR target/78166 (hash.c:1887:1: error: unrecognizable insn)
John David Anglin [Tue, 1 Nov 2016 18:15:57 +0000 (18:15 +0000)]
re PR target/78166 (hash.c:1887:1: error: unrecognizable insn)

PR target/78166
* config/pa/pa.md: Add new shift/add patterns to handle
(plus (mult (reg) (mem_shadd_operand)) (reg)) source operand.

From-SVN: r241749

8 years agoxtensa: Fix PR target/78118
Max Filippov [Tue, 1 Nov 2016 17:16:33 +0000 (17:16 +0000)]
xtensa: Fix PR target/78118

It started failing after the following commit: 32e90dc6a0cda45 ("PR
rtl-optimization/61047").

The change that made xtensa backend go ICE looks completely unrelated,
and indeed, the issue is caused by the side effect of
compute_frame_size() function call hidden in the
INITIAL_ELIMINATION_OFFSET macro. This call updates the value of the
xtensa_current_frame_size static variable, used in "return" instruction
predicate. Prior to the change the value of xtensa_current_frame_size was
set to 0 after the end of epilogue generation, which enabled the "return"
instruction for the CALL0 ABI, but after the change the additional
INITIAL_ELIMINATION_OFFSET calls make xtensa_current_frame_size non-zero
and "return" pattern unavailable.

Get rid of the global xtensa_current_frame_size and
xtensa_callee_save_size variables by moving them into the
machine_function structure. Implement predicate for the "return" pattern
as a function. Don't communicate completion of epilogue generation
through zeroing of xtensa_current_frame_size, add explicit epilogue_done
variable to the machine_function structure. Don't update stack frame
layout after the completion of reload.

2016-11-01  Max Filippov  <jcmvbkbc@gmail.com>
gcc/
* config/xtensa/xtensa-protos.h
(xtensa_use_return_instruction_p): New prototype.
* config/xtensa/xtensa.c (xtensa_current_frame_size,
xtensa_callee_save_size): Remove.
(struct machine_function): Add new fields: current_frame_size,
callee_save_size, frame_laid_out and epilogue_done.
(compute_frame_size, xtensa_expand_prologue,
xtensa_expand_epilogue): Replace xtensa_callee_save_size with
cfun->machine->callee_save_size and xtensa_current_frame_size
with cfun->machine->current_frame_size.
(compute_frame_size): Update cfun->machine->frame_laid_out and
don't update frame layout after reload completion.
(xtensa_expand_epilogue): Set cfun->machine->epilogue_done
instead of zeroing xtensa_current_frame_size.
(xtensa_use_return_instruction_p): New function.
* config/xtensa/xtensa.h (xtensa_current_frame_size): Remove
declaration.
(INITIAL_ELIMINATION_OFFSET): Use return value of
compute_frame_size instead of xtensa_current_frame_size value.
* config/xtensa/xtensa.md ("return" pattern): Use new predicate
function xtensa_use_return_instruction_p instead of inline code.

From-SVN: r241748

8 years agotree.h (BLOCK_IN_COLD_SECTION_P): Define.
Jakub Jelinek [Tue, 1 Nov 2016 16:54:49 +0000 (17:54 +0100)]
tree.h (BLOCK_IN_COLD_SECTION_P): Define.

* tree.h (BLOCK_IN_COLD_SECTION_P): Define.
* final.c (final_scan_insn): Set BLOCK_IN_COLD_SECTION_P.
* dwarf2out.c (rnglist_idx): New variable.
(struct dw_ranges): Add label, idx and maybe_new_sec fields.
(DEBUG_RNGLISTS_SECTION): Define.
(ranges_base_label): New variable.
(size_of_die) <case dw_val_class_range_list>: If using
DW_FORM_rnglistx, count size of uleb128 of range list index.
(value_format) <case dw_val_class_range_list>: For
-gdwarf-5 -gsplit-dwarf return DW_FORM_rnglistx.
(output_range_list_offset): Handle -gdwarf-5 .debug_rnglists
offsets.  Multiply dwarf < 5 offsets by 2 * DWARF_ADDR_SIZE.
(add_ranges_num): Remove useless prototype.  Don't multiply
by 2 * DWARF2_ADDR_SIZE.  Add maybe_new_sec argument, adjust
for new fields added to dw_ranges struct.
(add_ranges): Add maybe_new_sec argument and pass it
through to add_ranges_num.
(note_rnglist_head): New function.
(add_ranges_by_labels): Pass true as maybe_new_sec to
add_ranges_num, call note_rnglist_head on the head of the list.
(output_ranges): Add function comment.  Switch to
.debug_ranges section here and emit .Ldebug_ranges0 label.
(index_rnglists, output_rnglists): New functions.
(gen_subprogram_die): Formatting fixes.
(add_high_low_attributes): Don't divide offsets
by 2 * DWARF2_ADDR_SIZE.  Call note_rnglist_head on the
first list element or when pointing into the middle of
a list.  Pass true as second argument to add_ranges on the
first block fragment after cold/hot section switch.
(init_sections_and_labels): For -gdwarf-5 use .debug_rnglists
section instead of .debug_ranges.  Initialize
ranges_base_label if -gdwarf-5 -gsplit-dwarf.
(dwarf2out_finish): For -gdwarf-5 -gsplit-dwarf call
index_rnglists and add DW_AT_rnglists_base attr.  Don't switch
to dwarf_ranges_section here or emit .Ldebug_ranges0 label.
Call output_rnglists for -gdwarf-5.
(dwarf2out_c_finalize): Clear rnglist_idx.

From-SVN: r241747

8 years agohashtab.h: Use standard GPLv3 with runtime exception boilerplate.
Jakub Jelinek [Tue, 1 Nov 2016 16:47:50 +0000 (17:47 +0100)]
hashtab.h: Use standard GPLv3 with runtime exception boilerplate.

* hashtab.h: Use standard GPLv3 with runtime exception
boilerplate.

From-SVN: r241746

8 years agore PR fortran/69544 (Internal compiler error with -Wall and where)
Thomas Koenig [Tue, 1 Nov 2016 16:18:18 +0000 (16:18 +0000)]
re PR fortran/69544 (Internal compiler error with -Wall and where)

2016-11-01  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/69544
* match.c (gfc_match_where):  Fill in locus for assigment
in simple WHERE statement.

2016-11-01  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/69544
* gfortran.dg/where_5.f90:  New test.

From-SVN: r241745

8 years agoMark fallthrough cases with gcc_fallthrough.
Fritz Reese [Tue, 1 Nov 2016 15:29:51 +0000 (15:29 +0000)]
Mark fallthrough cases with gcc_fallthrough.

* gcc/combine.c (simplify_compare_const): Add gcc_fallthrough.

From-SVN: r241744