aboutsummaryrefslogtreecommitdiff
path: root/gcc
AgeCommit message (Collapse)AuthorFilesLines
2016-10-13m68k.c (m68k_option_override): Check opt_fstack_limit_symbol_arg and ↵Andreas Schwab4-3/+15
opt_fstack_limit_register_no instead of... gcc/ * config/m68k/m68k.c (m68k_option_override): Check opt_fstack_limit_symbol_arg and opt_fstack_limit_register_no instead of stack_limit_rtx. gcc/testsuite/ * gcc.target/m68k/stack-limit-1.c: Expect warning on line 0. From-SVN: r241140
2016-10-13re PR tree-optimization/77937 (ICE: in replace_one_candidate, at ↵Bill Schmidt3-0/+37
gimple-ssa-strength-reduction.c:3370) 2016-10-13 Bill Schmidt <wschmidt@linux.vnet.ibm.com> PR tree-optimization/77937 * gcc.dg/torture/pr77937-1.c: New. * gcc.dg/torture/pr77937-2.c: New. From-SVN: r241139
2016-10-13Implement P0386R2 - C++17 inline variablesJason Merrill20-31/+712
2016-10-11 Jakub Jelinek <jakub@redhat.com> * dwarf2out.c (gen_member_die): Handle inline static data member definitions. c-family/ * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables. cp/ * cp-tree.h (struct lang_type): Shrink language field to 1 bit from 4. Add var_declared_inline_p field. Mention 2 spare bits. (DECL_VAR_DECLARED_INLINE_P): Define. (SET_DECL_VAR_DECLARED_INLINE_P): Define. (DECL_INLINE_VAR_P): Define. (diagnose_inline_vars_for_namespace): Declare. * decl.c (diagnose_inline_vars_for_namespace): New function. (duplicate_decls): For static data members copy DECL_DECLARED_CONSTEXPR_P. (redeclaration_error_message): Handle C++17 redundant redeclaration of constexpr static data member outside of class. (maybe_commonize_var): Handle inline variables. (check_initializer): Ignore inline variables for diagnostics. Adjust diagnostic wording for C++17. (make_rtl_for_nonlocal_decl): Allow in-class definition of inline static data members. (bad_specifiers): Don't diagnose inline on variables here. (grokvardecl): Add inlinep argument, non-static const inline variables are TREE_PUBLIC. (check_static_variable_definition): Return early also for inline variables. (grokdeclarator): Handle inline variables and inline static data members. * typeck2.c (store_init_value): Don't diagnose non-constant initializers for non-constexpr inline static data members. * decl2.c (vague_linkage_p): Return true for inline variables. (c_parse_final_cleanups): In-class declaration of inline static data members is a definition. Call diagnose_inline_vars_for_namespace through walk_namespaces. * pt.c (instantiate_decl): Set pattern_defined for in-class definitions of inline static data members. From-SVN: r241137
2016-10-13gcov-io.c (gcov_open): Fix documentation.Nathan Sidwell2-37/+17
* gcov-io.c (gcov_open): Fix documentation. Simplify setting gcov_var.mode. Remove unnecessary fstat. From-SVN: r241136
2016-10-13Create the *logue in the same order as before (PR77962)Segher Boessenkool2-6/+19
PR77962 shows Go failing on 32-bit x86. This happens because the i386 port requires the split stack prologue to be created before the normal prologue, and my previous patch changed it to be the other way around. This patch changes it back. Things will be exactly as before for targets that do not do shrink-wrapping for separate components. For targets that *do* support it, all three prologue/epilogue creation functions will now be called twice for functions that have anything wrapped separately (instead of just the prologue created twice). PR bootstrap/77962 * function.c (thread_prologue_and_epilogue_insns): Call all make_*logue_seq in the same order as traditional. Call them all a second time if shrink_wrapped-separate. From-SVN: r241135
2016-10-13Makefile.in (insn-attrtab.o-warn, [...]): Don't use -Wno-error.Marek Polacek2-5/+6
* Makefile.in (insn-attrtab.o-warn, insn-dfatab.o-warn, insn-latencytab.o-warn, insn-output.o-warn, insn-emit.o-warn): Don't use -Wno-error. From-SVN: r241134
2016-10-13Fix ChangeLog for r241132Sandra Loosemore1-4/+4
From-SVN: r241133
2016-10-13scd42-1.c: Skip if -mcpu incompatible with Xscale is specified, not just -march.Sandra Loosemore3-2/+10
2016-10-13 Sandra Loosemore <sandra@codesourcery.com> gcc/testsuite/ * scd42-1.c: Skip if -mcpu incompatible with Xscale is specified, not just -march. * scd42-2.c: Fix existing logic to skip if -mcpu is incompatible with Xscale. From-SVN: r241132
2016-10-13compiler: don't try to get backend representation of redefinitionIan Lance Taylor2-1/+9
Trying to get the backend representation of a redefined name can cause a compiler crash as the compiler can walk over the same statements a second time. It's also quite unlikely to produce any additional useful error messages for the user. Test case follows. I'm not going to bother adding this test case to the testsuite--crash-on-invalid cases are worth fixing but not worth continually retesting. package p type A []int func (a A) Sum() (sum int) { for _, v := range a { sum += v } return sum } type A []int func (a A) Sum() (sum int) { for _, v := range a { sum += v } return sum } Reviewed-on: https://go-review.googlesource.com/30976 From-SVN: r241127
2016-10-13re PR tree-optimization/77937 (ICE: in replace_one_candidate, at ↵Bill Schmidt2-0/+11
gimple-ssa-strength-reduction.c:3370) 2016-10-13 Bill Schmidt <wschmidt@linux.vnet.ibm.com> PR tree-optimization/77937 * gimple-ssa-strength-reduction.c (analyze_increments): Set cost to infinite when we have a pointer with an increment of -1. From-SVN: r241125
2016-10-13runtime: copy mstats code from Go 1.7 runtimeIan Lance Taylor2-1/+16
This replaces mem.go and the C runtime_ReadMemStats function with the Go 1.7 mstats.go. The GCStats code is commented out for now. The corresponding gccgo code is in runtime/mgc0.c. The variables memstats and worldsema are shared between the Go code and the C code, but are not exported. To make this work, add temporary accessor functions acquireWorldsema, releaseWorldsema, getMstats (the latter known as mstats in the C code). Check the preemptoff field of m when allocating and when considering whether to start a GC. This works with the new stopTheWorld and startTheWorld functions in Go, which are essentially the Go 1.7 versions. Change the compiler to stack allocate closures when compiling the runtime package. Within the runtime packages closures do not escape. This is similar to what the gc compiler does, except that the gc compiler, when compiling the runtime package, gives an error if escape analysis shows that a closure does escape. I added this here because the Go version of ReadMemStats calls systemstack with a closure, and having that allocate memory was causing some tests that measure memory allocations to fail. Reviewed-on: https://go-review.googlesource.com/30972 From-SVN: r241124
2016-10-13builtin-sprintf-warn-1.c: Cast 0 to wint_t to placate -Wformat on targets ↵Martin Sebor2-3/+8
where the type is not int. gcc/testsuite/Changelog: * gcc.dg/tree-ssa/builtin-sprintf-warn-1.c: Cast 0 to wint_t to placate -Wformat on targets where the type is not int. From-SVN: r241123
2016-10-13Move MEMMODEL_* from coretypes.h to memmodel.hThomas Preud'homme222-44/+351
2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com> gcc/ * coretypes.h: Move MEMMODEL_* macros and enum memmodel definition into ... * memmodel.h: This file. * alias.c, asan.c, auto-inc-dec.c, bb-reorder.c, bt-load.c, caller-save.c, calls.c, ccmp.c, cfgbuild.c, cfgcleanup.c, cfgexpand.c, cfgloopanal.c, cfgrtl.c, cilk-common.c, combine.c, combine-stack-adj.c, common/config/aarch64/aarch64-common.c, common/config/arm/arm-common.c, common/config/bfin/bfin-common.c, common/config/c6x/c6x-common.c, common/config/i386/i386-common.c, common/config/ia64/ia64-common.c, common/config/nvptx/nvptx-common.c, compare-elim.c, config/aarch64/aarch64-builtins.c, config/aarch64/aarch64-c.c, config/aarch64/cortex-a57-fma-steering.c, config/arc/arc.c, config/arc/arc-c.c, config/arm/arm-builtins.c, config/arm/arm-c.c, config/avr/avr.c, config/avr/avr-c.c, config/avr/avr-log.c, config/bfin/bfin.c, config/c6x/c6x.c, config/cr16/cr16.c, config/cris/cris.c, config/darwin-c.c, config/darwin.c, config/epiphany/epiphany.c, config/epiphany/mode-switch-use.c, config/epiphany/resolve-sw-modes.c, config/fr30/fr30.c, config/frv/frv.c, config/ft32/ft32.c, config/h8300/h8300.c, config/i386/i386-c.c, config/i386/winnt.c, config/iq2000/iq2000.c, config/lm32/lm32.c, config/m32c/m32c.c, config/m32r/m32r.c, config/m68k/m68k.c, config/mcore/mcore.c, config/microblaze/microblaze.c, config/mmix/mmix.c, config/mn10300/mn10300.c, config/moxie/moxie.c, config/msp430/msp430.c, config/nds32/nds32-cost.c, config/nds32/nds32-intrinsic.c, config/nds32/nds32-md-auxiliary.c, config/nds32/nds32-memory-manipulation.c, config/nds32/nds32-predicates.c, config/nds32/nds32.c, config/nios2/nios2.c, config/nvptx/nvptx.c, config/pa/pa.c, config/pdp11/pdp11.c, config/rl78/rl78.c, config/rs6000/rs6000-c.c, config/rx/rx.c, config/s390/s390-c.c, config/s390/s390.c, config/sh/sh.c, config/sh/sh-c.c, config/sh/sh-mem.cc, config/sh/sh_treg_combine.cc, config/sol2.c, config/spu/spu.c, config/stormy16/stormy16.c, config/tilegx/tilegx.c, config/tilepro/tilepro.c, config/v850/v850.c, config/vax/vax.c, config/visium/visium.c, config/vms/vms-c.c, config/xtensa/xtensa.c, coverage.c, cppbuiltin.c, cprop.c, cse.c, cselib.c, dbxout.c, dce.c, df-core.c, df-problems.c, df-scan.c, dojump.c, dse.c, dwarf2asm.c, dwarf2cfi.c, dwarf2out.c, emit-rtl.c, except.c, explow.c, expmed.c, expr.c, final.c, fold-const.c, function.c, fwprop.c, gcse.c, ggc-page.c, haifa-sched.c, hsa-brig.c, hsa-gen.c, hw-doloop.c, ifcvt.c, init-regs.c, internal-fn.c, ira-build.c, ira-color.c, ira-conflicts.c, ira-costs.c, ira-emit.c, ira-lives.c, ira.c, jump.c, loop-doloop.c, loop-invariant.c, loop-iv.c, loop-unroll.c, lower-subreg.c, lra.c, lra-assigns.c, lra-coalesce.c, lra-constraints.c, lra-eliminations.c, lra-lives.c, lra-remat.c, lra-spills.c, mode-switching.c, modulo-sched.c, omp-low.c, passes.c, postreload-gcse.c, postreload.c, predict.c, print-rtl-function.c, recog.c, ree.c, reg-stack.c, regcprop.c, reginfo.c, regrename.c, reload.c, reload1.c, reorg.c, resource.c, rtl-chkp.c, rtl-tests.c, rtlanal.c, rtlhooks.c, sched-deps.c, sched-rgn.c, sdbout.c, sel-sched-ir.c, sel-sched.c, shrink-wrap.c, simplify-rtx.c, stack-ptr-mod.c, stmt.c, stor-layout.c, target-globals.c, targhooks.c, toplev.c, tree-nested.c, tree-outof-ssa.c, tree-profile.c, tree-ssa-coalesce.c, tree-ssa-ifcombine.c, tree-ssa-loop-ivopts.c, tree-ssa-loop.c, tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-vect-data-refs.c, ubsan.c, valtrack.c, var-tracking.c, varasm.c: Include memmodel.h. * genattrtab.c (write_header): Include memmodel.h in generated file. * genautomata.c (main): Likewise. * gengtype.c (open_base_files): Likewise. * genopinit.c (main): Likewise. * genconditions.c (write_header): Include memmodel.h earlier in generated file. * genemit.c (main): Likewise. * genoutput.c (output_prologue): Likewise. * genpeep.c (main): Likewise. * genpreds.c (write_insn_preds_c): Likewise. * genrecog.c (write_header): Likewise. * Makefile.in (PLUGIN_HEADERS): Include memmodel.h gcc/ada/ * gcc-interface/utils2.c: Include memmodel.h. gcc/c-family/ * c-cppbuiltin.c: Include memmodel.h. * c-opts.c: Likewise. * c-pragma.c: Likewise. * c-warn.c: Likewise. gcc/c/ * c-typeck.c: Include memmodel.h. gcc/cp/ * decl2.c: Include memmodel.h. * rtti.c: Likewise. gcc/fortran/ * trans-intrinsic.c: Include memmodel.h. gcc/go/ * go-backend.c: Include memmodel.h. libgcc/ * libgcov-profiler.c: Replace MEMMODEL_* macros by their __ATOMIC_* equivalent. * config/tilepro/atomic.c: Likewise and stop casting model to enum memmodel. From-SVN: r241121
2016-10-13Add a "compact" mode to print_rtx_functionDavid Malcolm7-54/+136
gcc/ChangeLog: * function-tests.c (selftest::test_expansion_to_rtl): Add "true" for new "compact" param of print_rtx_function. Check for "cinsn" rather than "insn". * print-rtl-function.c (flag_compact): New decl. (print_rtx_function): Add param "compact" and use it to set flag_compact, adding a description of the effect to the leading comment, and updating the example output. * print-rtl.c (flag_compact): New variable. (print_rtx_operand_code_0): Omit the JUMP_LABEL reference in compact mode. (print_rtx_operand_code_i): When printing source locations, wrap xloc.file in quotes. Don't print INSN_CODEs in compact mode. (print_rtx_operand_code_r): Don't print regnos for hard regs and virtuals in compact mode. (print_rtx_operand_code_u): Don't print insn UIDs in compact mode, apart from in LABEL_REFs. (print_rtx_operand): In case 'w', don't print in hex in compact mode. Don't print basic block ids in compact mode. (print_rtx): In compact mode, prefix the code of insns with "c", only print the INSN_UID of CODE_LABELs, and omit their LABEL_NUSES. * print-rtl.h (print_rtx_function): Add "compact" param. gcc/testsuite/ChangeLog: * gcc.target/i386/vararg-loc.c: Update for quoting of xloc.file in INSN_LOCATION. From-SVN: r241120
2016-10-13Fix typo in name.Richard Earnshaw1-2/+2
From-SVN: r241119
2016-10-13[ARM] Remove redundant TARGET_VFPRichard Earnshaw11-136/+191
* arm.h (TARGET_VFP): Delete. (TARGET_VFPD32): Remove references to TARGET_VFP. (TARGET_VFP3, TARGET_VFP5): Likewise. (TARGET_VFP_SINGLE, TARGET_VFP_DOUBLE): Likewise. (TARGET_NEON_FP16): Likewise. (TARGET_FMA): Likewise. (TARGET_CRYPTO): Likewise. (TARGET_NEON): Likewise. (SECONDARY_OUTPUT_RELOAD_CLASS): Likewise. (FUNCTION_ARG_REGNO_P): Likewise. * arm.c (arm_option_check_internal): Likewise. (arm_option_override): Likewise. (use_return_insn): Likewise. (arm_function_value_regno_p): Likewise. (arm_apply_result_size): Likewise. (use_vfp_abi): Likewise. (arm_legitimate_address_outer_p): Likewise. (thumb2_legitimate_address_p): Likewise. (arm_legitimate_index_p): Likewise. (thumb2_legitimate_index_p): Likewise. (arm_legitimate_address): Likewise. (arm_get_vfp_saved_size): Likewise. (arm_emit_vfp_multi_reg_pop): Likewise. (arm_get_frame_offsets): Likewise. (arm_save_coproc_regs): Likewise. (arm_hard_regno_mode_ok): Likewise. (arm_expand_epilogue_apcs_frame): Likewise. (arm_expand_epilogue): Likewise. (arm_file_start): Likewise. (arm_conditional_register_usage): Likewise. (arm_validize_comparison): Use vfp_compare_operand directly. * arm-builtins.c (arm_init_builtins): Remove references to TARGET_VFP. (arm_expand_vfp_builtin): Use TARGET_HARD_FLOAT for detecting unsupported usage. (arm_atomic_assign_expand_fenv): Likewise. * arm.md (divsf3): Likewise. (arm_negsi2): Likewise. (absdf2): Likewise. (arm_movdi): Likewise. (arm_movt): Likewise. (cbranchsf4): Change predicate to vfp_compare_operand. (cbranchdf4): Change predicate to vfp_compare_operand. (cstorehf4): Change predicate to vfp_compare_operand. (cstoresf4): Change predicate to vfp_compare_operand. (cstoredf4): Change predicate to vfp_compare_operand. (vfp_pop_multiple_with_writeback): Remove references to TARGET_VFP. (movhi_insn_arch4, movhi_bytes): Likewise. * constraints.md (Dt): Likewise. (Dp): Likewise. * iterators.md (SDF): Likewise. * predicates.md (arm_float_compare_operand): Delete. (const_double_vcvt_power_of_two_reciprocal): Remove references to TARGET_VFP. (const_double_vcvt_power_of_two): Likewise. * thumb2.md thumb2_movsi_insn): Likewise. * vfp.md (arm_movhi_vfp, thumb2_movhi_vfp): Likewise. (movhf_vfp): Likewise. (arm_movsi_vfp, thumb2_movsi_vfp): Likewise. (movdi_vfp, movdi_vfp_cortexa8): Likewise. (movsf_vfp, thumb2_movsf_vfp): Likewise. (movdf_vfp, thumb2_movdf_vfp): Likewise. (movsfcc_vfp, abssf2_vfp, negsf2_vfp, addsf3_vfp): Likewise. (subsf3_vfp, divsf3_vfp): Likewise. (mulsf3_vfp, mulsf3negsf_vfp, negmulsf3_vfp): Likewise. (mulsf3addsf_vfp, (mulsf3subsf_vfp, mulsf3negsfaddsf_vfp): Likewise. (mulsf3negsfsubsf_vfp): Likewise. (truncsisf2_vfp, fixuns_truncsfsi2, floatsisf2_vfp): Likewise. (floatunssisf2, sqrtsf2_vfp): Likewise. (movcc_vfp): Likewise. (cmpsf_split_vfp, cmpsf_trap_split_vfp): Likewise. (cmpsf_vfp, cmpsf_trap_vfp): Likewise. (push_multi_vfp): Likewise. (set_fpscr, get_fpscr): Likewise. * arm-c.c (arm_cpu_builtins): Unconditionally define __VFP_FP__. From-SVN: r241118
2016-10-13[multiple changes]Arnaud Charlet12-46/+177
2016-10-13 Hristian Kirtchev <kirtchev@adacore.com> * sem_ch6.adb (Analyze_Expression_Function): Remove the aspects of the original expression function has been rewritten into a subprogram declaration or a body. Reinsert the aspects once they have been analyzed. 2016-10-13 Tristan Gingold <gingold@adacore.com> * exp_ch9.adb (Expand_N_Asynchronous_Select): Return immediately on restricted profile. 2016-10-13 Javier Miranda <miranda@adacore.com> * sem_prag.adb (Process_Compile_Time_Warning_Or_Error): Register the pragma for its validation after the backend has been called only if its expression has some occurrence of attributes 'size or 'alignment * table.ads (Release_Threshold): New formal. (Release): Adding documentation of its new functionality. * table.adb (Release): Extend its functionality with a Release_Threshold. * nlists.adb (Next_Node table): Set its Release_Threshold. * atree.adb (Orig_Nodes table): Set its Release_Threshold. * atree.ads (Nodes table): Set its Release_Threshold. (Flags table): Set its Release_Threshold. * alloc.ads (Nodes_Release_Threshold): New constant declaration. (Orig_Nodes_Release_Threshold): New constant declaration. * debug.adb (switch d.9): Left free. * gnat1drv.adb (Post_Compilation_Validation_Checks): Enable validation of pragmas Compile_Time_Error and Compile_Time_Warning. From-SVN: r241117
2016-10-13[ARM] Remove redundant model field from FPU descriptionsRichard Earnshaw4-29/+36
* arm.h (TARGET_VFP): Unconditionally define to 1. (arm_fpu_desc): Remove 'model' field. (TARGET_FPU_MODEL): Delete. * arm.c (all_fpus): Don't initialize the model field. (arm_can_inline_p): Don't check the FPU model. * arm-fpus.def: Remove redundant model field from all FPU descriptions. From-SVN: r241116
2016-10-13[multiple changes]Arnaud Charlet6-30/+106
2016-10-13 Hristian Kirtchev <kirtchev@adacore.com> * sem_ch6.adb (Create_Extra_Formals): Generate an Itype reference for the object extra formal in case the subprogram is called within the same or nested scope. 2016-10-13 Claire Dross <dross@adacore.com> * sem_ch5.adb (Analyze_Iterator_Specification): Also create a renaming in GNATprove mode. 2016-10-13 Ed Schonberg <schonberg@adacore.com> * freeze.adb (Freeze_Fixed_Point_Type): in SPARK mode, the given bounds of the type must be strictly representable, and the range reduction by one delta ("shaving") allowed by the Ada RM, is not applicable in SPARK. 2016-10-13 Javier Miranda <miranda@adacore.com> * debug.adb (switch d.9): Used to temporarily disable the support needed for this enhancement since it causes regressions with large sources. * gnat1drv.adb (Post_Compilation_Validation_Checks): Temporarily leave the validation of pragmas Compile_Time_Warning and Compile_Time_Error under control of -gnatd.9/ From-SVN: r241115
2016-10-13* i-vxinco.adb, i-vxinco.ads: New files.Ed Falis3-0/+105
From-SVN: r241114
2016-10-13Code cleanup.Arnaud Charlet1-2/+11
From-SVN: r241113
2016-10-13[multiple changes]Arnaud Charlet13-79/+131
2016-10-13 Hristian Kirtchev <kirtchev@adacore.com> * sem_ch10.adb (Entity_Needs_Body): A generic subprogram renaming needs a body if the renamed unit is declared outside the current compilation unit. 2016-10-13 Hristian Kirtchev <kirtchev@adacore.com> * sinfo.ads, sem_ch12.adb, sem.adb, expander.adb, sem_res.ads, sem_ch4.adb, sem_ch8.adb, s-memory.adb: Minor reformatting. 2016-10-13 Vincent Celier <celier@adacore.com> * gnatcmd.adb: Delete all temporary files when invoked as gnat list -V -P ... 2016-10-13 Ed Falis <falis@adacore.com> * impunit.adb: add i-vxinco.ads. * s-interr-vxworks.adb: add hook for user interrupt connection routine. From-SVN: r241112
2016-10-13s-interr-hwint.adb, [...]: Rename s-interr-hwint.adb to s-interr-vxworks.adb.Ed Falis2-1/+6
2016-10-13 Ed Falis <falis@adacore.com> * s-interr-hwint.adb, s-interr-vxworks.adb: Rename s-interr-hwint.adb to s-interr-vxworks.adb. From-SVN: r241110
2016-10-13exp_ch7.adb, [...]: Minor typo fixes and reformatting.Gary Dismukes9-28/+34
2016-10-13 Gary Dismukes <dismukes@adacore.com> * exp_ch7.adb, einfo.ads, sem_prag.adb, sem_prag.ads, sem.ads, sem_attr.adb, sem_case.adb, sem_ch13.ads: Minor typo fixes and reformatting. From-SVN: r241109
2016-10-13re PR target/77826 (ICE in decompose, at wide-int.h:928 w/ -m64 -O2 and above)Richard Biener4-44/+176
2016-10-13 Richard Biener <rguenther@suse.de> PR middle-end/77826 * genmatch.c (struct capture): Add value_match member. (commutate): Preserve value_match. (lower_opt_convert): Likewise. (lower_cond): Likewise. (replace_id): Likewise. (struct dt_operand): Add value_match member. (decision_tree::cmp_node): Compare it. (decision_tree::insert_operand): Honor it when finding and when appending a DT_MATCH. (dt_operand::gen_match_op): Generate a type check after operand_equal_p if ! value_match for both GENERIC and GIMPLE. (parser::get_internal_capture_id): New helper. (parser::finish_match_operand): New function lowering @@<id>. (parser::parse_capture): Parse @@<id> as value-match. (parser::parse_expr): Use get_internal_capture_id. (parser::parse_simplify): Call finish_match_operand. (walk_captures): New helper. * match.pd (X - (X / Y) * Y -> X % Y): Use value-matching instead of operand_equal_p. ((X /[ex] A) * A -> X): Likewise. ((X | Y) ^ X -> Y & ~ X): Handle constants properly by using convert[12] and value-matching. ((A | B) & (A | C) -> A | (B & C)): Likewise. ((X | Y) | Y -> X | Y): Likewise. ((X ^ Y) ^ Y -> X): Likewise. (A - (A & B) -> ~B & A): Likewise. ((T)(P + A) - (T)P -> (T) A): Likewise. ((T)P - (T)(P + A) -> -(T) A): Likewise. ((T)(P + A) - (T)(P + B) -> (T)A - (T)B): Likewise. * doc/match-and-simplify.texi: Amend capture section. From-SVN: r241108
2016-10-13sem_prag.ads (Process_Compile_Time_Warning_Or_Error): New overloaded ↵Javier Miranda9-88/+308
subprogram that factorizes code executed as part of the regular... 2016-10-13 Javier Miranda <miranda@adacore.com> * sem_prag.ads (Process_Compile_Time_Warning_Or_Error): New overloaded subprogram that factorizes code executed as part of the regular processing of these pragmas and as part of its validation after invoking the backend. * sem_prag.adb (Process_Compile_Time_Warning_Or_Error): New subprogram. (Process_Compile_Time_Warning_Or_Error): If the condition is known at compile time then invoke the new overloaded subprogram; otherwise register the pragma in a table to validate it after invoking the backend. * sem.ads, sem.adb (Unlock): New subprogram. * sem_attr.adb (Analyze_Attribute [Size]): If we are processing pragmas Compile_Time_Warning and Compile_Time_Errors after the backend has been called then evaluate this attribute if 'Size is known at compile time. * gnat1drv.adb (Post_Compilation_Validation_Checks): Validate compile time warnings and errors. * sem_ch13.ads, sem_ch13.adb (Validate_Compile_Time_Warning_Error): New subprogram. (Validate_Compile_Time_Warning_Errors): New subprogram. From-SVN: r241107
2016-10-13[multiple changes]Arnaud Charlet5-33/+175
2016-10-13 Yannick Moy <moy@adacore.com> * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Adapt to optional refinement for abstract states with only partial refinement visible. 2016-10-13 Justin Squirek <squirek@adacore.com> * sem_ch13.adb: Minor correction in comment in Analyze_Aspect_Specifications * sem_prag.adb: Minor reformatting. 2016-10-13 Thomas Quinot <quinot@adacore.com> * s-stratt-xdr.adb: Disable compiler unit warnings. 2016-10-13 Ed Schonberg <schonberg@adacore.com> * sem_ch3.adb (Visible_Component): In an instance body, check whether the component may be hidden in a selected component by a homonym that is a primitive operation of the type of the prefix. From-SVN: r241106
2016-10-13[ARC] Fix mul32x16 patterns.Claudiu Zissulescu2-11/+12
gcc/ 2016-10-13 Claudiu Zissulescu <claziss@synopsys.com> * config/arc/arc.md (umul_600): Change. (umul64_600): Likewise. From-SVN: r241105
2016-10-13[ARC] Update INSN_LENGTH_ALIGNMENT.Claudiu Zissulescu2-3/+7
gcc/ 2016-10-13 Claudiu Zissulescu <claziss@synopsys.com> * config/arc/arc.h (INSN_LENGTH_ALIGNMENT): Change. From-SVN: r241104
2016-10-13tree-vect-loop.c (loop_niters_no_overflow): New func.Bin Cheng2-2/+43
* tree-vect-loop.c (loop_niters_no_overflow): New func. (vect_transform_loop): Call loop_niters_no_overflow. Pass the no-overflow information to vect_do_peeling_for_loop_bound and vect_gen_vector_loop_niters. From-SVN: r241102
2016-10-13l_fma_float_1.c: Revise test.Bin Cheng13-48/+63
gcc/testsuite * gcc.target/i386/l_fma_float_1.c: Revise test. * gcc.target/i386/l_fma_float_2.c: Ditto. * gcc.target/i386/l_fma_float_3.c: Ditto. * gcc.target/i386/l_fma_float_4.c: Ditto. * gcc.target/i386/l_fma_float_5.c: Ditto. * gcc.target/i386/l_fma_float_6.c: Ditto. * gcc.target/i386/l_fma_double_1.c: Ditto. * gcc.target/i386/l_fma_double_2.c: Ditto. * gcc.target/i386/l_fma_double_3.c: Ditto. * gcc.target/i386/l_fma_double_4.c: Ditto. * gcc.target/i386/l_fma_double_5.c: Ditto. * gcc.target/i386/l_fma_double_6.c: Ditto. From-SVN: r241101
2016-10-13tree-predcom.c (tree_predictive_commoning_loop): Skip loop that only ↵Bin Cheng4-0/+19
iterates 1 time. * tree-predcom.c (tree_predictive_commoning_loop): Skip loop that only iterates 1 time. gcc/testsuite * gfortran.dg/vect/fast-math-mgrid-resid.f: New test string. From-SVN: r241100
2016-10-13tree-vect-loop-manip.c (adjust_vec_debug_stmts): Don't release adjust_vec ↵Bin Cheng4-1303/+910
automatically. * tree-vect-loop-manip.c (adjust_vec_debug_stmts): Don't release adjust_vec automatically. (slpeel_add_loop_guard): Remove param cond_expr_stmt_list. Rename param exit_bb to guard_to. (slpeel_checking_verify_cfg_after_peeling): (set_prologue_iterations): (create_lcssa_for_virtual_phi): New func which is factored out from slpeel_tree_peel_loop_to_edge. (slpeel_tree_peel_loop_to_edge): (iv_phi_p): New func. (vect_can_advance_ivs_p): Call iv_phi_p. (vect_update_ivs_after_vectorizer): Call iv_phi_p. Directly insert new gimple stmts in basic block. (vect_do_peeling_for_loop_bound): (vect_do_peeling_for_alignment): (vect_gen_niters_for_prolog_loop): Rename to... (vect_gen_prolog_loop_niters): ...Rename from. Change parameters and adjust implementation. (vect_update_inits_of_drs): Fix code style issue. Convert niters to sizetype if necessary. (vect_build_loop_niters): Move to here from tree-vect-loop.c. Change it to external function. (vect_gen_scalar_loop_niters, vect_gen_vector_loop_niters): New. (vect_gen_vector_loop_niters_mult_vf): New. (slpeel_update_phi_nodes_for_loops): New. (slpeel_update_phi_nodes_for_guard1): Reimplement. (find_guard_arg, slpeel_update_phi_nodes_for_guard2): Reimplement. (slpeel_update_phi_nodes_for_lcssa, vect_do_peeling): New. * tree-vect-loop.c (vect_build_loop_niters): Move to file tree-vect-loop-manip.c (vect_generate_tmps_on_preheader): Delete. (vect_transform_loop): Rename vectorization_factor to vf. Call vect_do_peeling instead of vect_do_peeling-* functions. * tree-vectorizer.h (vect_do_peeling): New decl. (vect_build_loop_niters, vect_gen_vector_loop_niters): New decls. (vect_do_peeling_for_loop_bound): Delete. (vect_do_peeling_for_alignment): Delete. From-SVN: r241099
2016-10-13tree-vect-loop-manip.c (slpeel_tree_duplicate_loop_to_edge_cfg): Put ↵Bin Cheng2-6/+12
duplicated loop after its preheader and after the original loop. * tree-vect-loop-manip.c (slpeel_tree_duplicate_loop_to_edge_cfg): Put duplicated loop after its preheader and after the original loop. From-SVN: r241098
2016-10-13tree-vect-loop.c (vect_analyze_loop_2): Check and skip loop if it has no ↵Bin Cheng7-7/+40
enough iterations for LOOP_VINFO_PEELING_FOR_GAPS. * tree-vect-loop.c (vect_analyze_loop_2): Check and skip loop if it has no enough iterations for LOOP_VINFO_PEELING_FOR_GAPS. gcc/testsuite * gcc.dg/vect/vect-98.c: Refine test case. * gcc.dg/vect/vect-strided-a-u8-i8-gap2.c: Increase niters. * gcc.dg/vect/vect-strided-u8-i8-gap2.c: Ditto. * gcc.dg/vect/vect-strided-u8-i8-gap4.c: Ditto. From-SVN: r241097
2016-10-13tree-vect-loop.c (vectorizable_live_operation): Support handling for live ↵Bin Cheng2-13/+22
variable outside loop but not in lcssa form. * tree-vect-loop.c (vectorizable_live_operation): Support handling for live variable outside loop but not in lcssa form. From-SVN: r241096
2016-10-13cfg.c (reset_original_copy_tables): New func.Bin Cheng3-0/+18
* cfg.c (reset_original_copy_tables): New func. * cfg.h (reset_original_copy_tables): New decl. From-SVN: r241095
2016-10-13re PR c/77946 (-Wimplicit-fallthrough=1 ICE: tree check: expected tree that ↵Jakub Jelinek5-3/+27
contains ‘decl with visibility’ structure, have ‘label_decl’) PR c/77946 * tree.h (FALLTHROUGH_LABEL_P): Use private_flag instead of public_flag. * varasm.c (default_binds_local_p_3): Formatting fix. * c-c++-common/Wimplicit-fallthrough-34.c: New test. From-SVN: r241094
2016-10-13tree-vect-loop-manip.c (slpeel_can_duplicate_loop_p): Fix code style issue.Bin Cheng2-9/+10
* tree-vect-loop-manip.c (slpeel_can_duplicate_loop_p): Fix code style issue. (vect_do_peeling_for_loop_bound, vect_do_peeling_for_alignment): Remove useless code. From-SVN: r241092
2016-10-13Do not merge BBs with a different EH landing pads (PRMartin Liska4-0/+41
PR tree-optimization/77943 * g++.dg/tree-ssa/pr77943.C: New test. PR tree-optimization/77943 * tree-ssa-tail-merge.c (merge_stmts_p): Do not merge BBs with a different EH landing pads. From-SVN: r241090
2016-10-13re PR fortran/72832 ([OOP] ALLOCATE with SOURCE fails to allocate requested ↵Andre Vehreschild7-3/+173
dimensions) gcc/fortran/ChangeLog: 2016-09-01 Andre Vehreschild <vehre@gcc.gnu.org> PR fortran/72832 * trans-expr.c (gfc_copy_class_to_class): Add generation of runtime array bounds check. * trans-intrinsic.c (gfc_conv_intrinsic_size): Add a crutch to get the descriptor of a function returning a class object. * trans-stmt.c (gfc_trans_allocate): Use the array spec on the array to allocate instead of the array spec from source=. gcc/testsuite/ChangeLog: 2016-09-01 Andre Vehreschild <vehre@gcc.gnu.org> PR fortran/72832 * gfortran.dg/allocate_with_source_22.f03: New test. * gfortran.dg/allocate_with_source_23.f03: New test. Expected to fail. From-SVN: r241088
2016-10-13re PR target/77957 (Undefined .LCTOC0 with -fstack-protector-strong ↵Jakub Jelinek17-13/+91
-mminimal-toc -O0 on ppc64) PR target/77957 * hooks.h (hook_tree_void_null): Declare. * hooks.c (hook_tree_void_null): New function. * langhooks.c (lhd_return_null_tree_v): Remove. * langhooks-def.h (lhd_return_null_tree_v): Remove. * cfgexpand.c (stack_protect_prologue): If guard_decl is NULL, set y to const0_rtx. * function.c (stack_protect_epilogue): Likewise. * config/tilepro/tilepro.c (TARGET_STACK_PROTECT_GUARD): Redefine if TARGET_THREAD_SSP_OFFSET is defined. * config/s390/s390.c (TARGET_STACK_PROTECT_GUARD): Likewise. * config/sparc/sparc.c (TARGET_STACK_PROTECT_GUARD): Likewise. * config/tilegx/tilegx.c (TARGET_STACK_PROTECT_GUARD): Likewise. * config/rs6000/rs6000.c (TARGET_STACK_PROTECT_GUARD): Likewise. * config/i386/i386.c (TARGET_STACK_PROTECT_GUARD): Likewise. (ix86_stack_protect_guard): New function. c/ * c-objc-common.h (LANG_HOOKS_GETDECLS): Use hook_tree_void_null instead of lhd_return_null_tree_v. ada/ * gcc-interface/misc.c (LANG_HOOKS_GETDECLS): Use hook_tree_void_null instead of lhd_return_null_tree_v. From-SVN: r241087
2016-10-13movhi_movw.c: Enable test for ARM mode.Thomas Preud'homme4-4/+13
2016-10-12 Thomas Preud'homme <thomas.preudhomme@arm.com> gcc/testsuite/ * gcc.target/arm/movhi_movw.c: Enable test for ARM mode. * gcc.target/arm/movsi_movw.c: Likewise. * gcc.target/arm/movdi_movw.c: Likewise and adapt scan-assembler directive to work on big endian targets. From-SVN: r241086
2016-10-13dwarf2out.c (tree_add_const_value_attribute): Do not try rtl_for_decl_init ↵Richard Biener2-12/+29
during early phase. 2016-10-13 Richard Biener <rguenther@suse.de> * dwarf2out.c (tree_add_const_value_attribute): Do not try rtl_for_decl_init during early phase. (gen_variable_die): Do not create locations during early phase. (gen_label_die): Likewise. (decls_for_scope): Do not waste time handling BLOCK_NONLOCALIZED_VARs twice. From-SVN: r241085
2016-10-13syscall: don't use pt_regs in clone_linux.cIan Lance Taylor1-1/+1
It's unnecessary and it reportedly breaks the build on arm64 GNU/Linux. Reviewed-on: https://go-review.googlesource.com/30978 From-SVN: r241084
2016-10-13EVRP - Push op1 value range before pushing op0 value range.Kugan Vivekanandarajah4-7/+46
gcc/ChangeLog: 2016-10-12 Richard Biener <rguenther@suse.de> * tree-vrp.c (evrp_dom_walker::try_find_new_range): Renamed from try_add_new_range and made to eturn new range. (evrp_dom_walker::before_dom_children): Push op1 value range before pushing op0 value range. gcc/testsuite/ChangeLog: 2016-10-12 Kugan Vivekanandarajah <kuganv@linaro.org> * gcc.dg/tree-ssa/evrp6.c: New test. From-SVN: r241083
2016-10-13re PR tree-optimization/77937 (ICE: in replace_one_candidate, at ↵Bill Schmidt2-2/+8
gimple-ssa-strength-reduction.c:3370) 2016-10-12 Bill Schmidt <wschmidt@linux.vnet.ibm.com> PR tree-optimization/77937 * gimple-ssa-strength-reduction.c (analyze_increments): Use POINTER_TYPE_P on the candidate type to determine whether candidates in this chain require pointer arithmetic. From-SVN: r241082
2016-10-13Daily bump.GCC Administrator1-1/+1
From-SVN: r241081
2016-10-12visium.c (visium_gimplify_va_arg): Emit a big-endian correction if the type ↵Eric Botcazou2-2/+21
is smaller than a word. * config/visium/visium.c (visium_gimplify_va_arg): Emit a big-endian correction if the type is smaller than a word. (visium_select_cc_mode): Add ... fall through ... comment. From-SVN: r241076
2016-10-12compiler, runtime: copy string code from Go 1.7Ian Lance Taylor6-76/+391
Add compiler support for turning concatenating strings into a call to a runtime function that takes the appropriate number of arguments. Rename some local variables in mgc0.c to avoid macros that the new rune.go causes to appear in runtime.inc. Reviewed-on: https://go-review.googlesource.com/30827 From-SVN: r241074