]> git.ipfire.org Git - thirdparty/gcc.git/log
thirdparty/gcc.git
8 years ago2017-07-20 Richard Biener <rguenther@suse.de>
rguenth [Thu, 20 Jul 2017 10:03:34 +0000 (10:03 +0000)] 
2017-07-20  Richard Biener  <rguenther@suse.de>

* gcc.dg/vect/slp-43.c: Increase loop count to enable vectorization
with V64QImode.
* gcc.dg/vect/slp-45.c: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250380 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoFix phi arg location in find_implicit_erroneous_behavior
vries [Thu, 20 Jul 2017 07:16:01 +0000 (07:16 +0000)] 
Fix phi arg location in find_implicit_erroneous_behavior

2017-07-20  Tom de Vries  <tom@codesourcery.com>

PR tree-optimization/81489
* gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior): Move
read of phi arg location to before loop that modifies phi.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250378 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agogcc
naveenh [Thu, 20 Jul 2017 03:57:48 +0000 (03:57 +0000)] 
gcc
* match.pd (((m1 >/</>=/<= m2) * d -> (m1 >/</>=/<= m2) ? d : 0):
New pattern.

gcc/testsuite
* gcc.dg/tree-ssa/vrp116.c: New Test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250377 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoDaily bump.
gccadmin [Thu, 20 Jul 2017 00:16:24 +0000 (00:16 +0000)] 
Daily bump.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250376 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago PR middle-end/81331
hubicka [Wed, 19 Jul 2017 21:06:55 +0000 (21:06 +0000)] 
PR middle-end/81331
* except.c (execute): Fix ordering issue.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250370 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago * math/powq.c (powq): Use uint32_t instead of u_int32_t.
gerald [Wed, 19 Jul 2017 19:53:58 +0000 (19:53 +0000)] 
* math/powq.c (powq): Use uint32_t instead of u_int32_t.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250367 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoPR libstdc++/81476 Optimise vector insertion from input iterators
redi [Wed, 19 Jul 2017 19:32:15 +0000 (19:32 +0000)] 
PR libstdc++/81476 Optimise vector insertion from input iterators

PR libstdc++/81476
* include/bits/vector.tcc (vector::_M_range_insert<_InputIterator>):
Only insert elements one-by-one when inserting at the end.
* testsuite/performance/23_containers/insert/81476.cc: New.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250366 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agocombine: Fix for PR81423
segher [Wed, 19 Jul 2017 19:31:26 +0000 (19:31 +0000)] 
combine: Fix for PR81423

We here have an AND of a SUBREG of an LSHIFTRT.  If that SUBREG is
paradoxical, the extraction we form is the length of the size of the
inner mode, which includes some bits that should not be in the result.
Just give up in that case.

PR rtl-optimization/81423
* combine.c (make_compound_operation_int): Don't try to optimize
the AND of a SUBREG of an LSHIFTRT if that SUBREG is paradoxical.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250365 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2017-07-19 Michael Meissner <meissner@linux.vnet.ibm.com>
meissner [Wed, 19 Jul 2017 19:29:16 +0000 (19:29 +0000)] 
2017-07-19  Michael Meissner  <meissner@linux.vnet.ibm.com>

* gcc.target/powerpc/cpu-builtin-1.c: Change test to use #ifdef
__BUILTIN_CPU_SUPPORTS to see if the GLIBC is new enough that
__builtin_cpu_is and __builtin_cpu_supports are supported.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250364 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agosimplify-rtx: The truncation of an IOR can have all bits set (PR81423)
segher [Wed, 19 Jul 2017 19:28:41 +0000 (19:28 +0000)] 
simplify-rtx: The truncation of an IOR can have all bits set (PR81423)

... if it is an IOR with a constant with all bits set in the mode
that is truncated to, for example.  Handle that case.

PR rtl-optimization/81423
* simplify-rtx.c (simplify_truncation): Handle truncating an IOR
with a constant that is -1 in the truncated to mode.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250363 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoFix up plafform testes in check headers. After a resent GCC change
munroesj [Wed, 19 Jul 2017 19:04:50 +0000 (19:04 +0000)] 
Fix up plafform testes in check headers. After a resent GCC change
the previously submitted BMI/BMI2 intrinsic test started to fail
with a warning/error.

[gcc/testsuite]

2017-07-19  Steven Munroe  <munroesj@gcc.gnu.org>

* gcc.target/powerpc/bmi-check.h (main): Skip unless
__BUILTIN_CPU_SUPPORTS__ defined.
* gcc.target/powerpc/bmi2-check.h (main): Skip unless
__BUILTIN_CPU_SUPPORTS__ defined.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250362 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago * predict.c (propagate_unlikely_bbs_forward): Break out from ...
hubicka [Wed, 19 Jul 2017 18:09:39 +0000 (18:09 +0000)] 
* predict.c (propagate_unlikely_bbs_forward): Break out from ...
(determine_unlikely_bbs): ... here.
* predict.h (propagate_unlikely_bbs_forward): Declare.
* cfgexpand.c (pass_expand::execute): Use it.
* bb-reorder.c (sanitize_hot_paths): Do not consider known to be
unlikely edges.
(find_rarely_executed_basic_blocks_and_crossing_edges): Use
propagate_unlikely_bbs_forward.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250360 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago * predict.c (propagate_unlikely_bbs_forward): Break out from ...
hubicka [Wed, 19 Jul 2017 18:08:53 +0000 (18:08 +0000)] 
* predict.c (propagate_unlikely_bbs_forward): Break out from ...
(determine_unlikely_bbs): ... here.
* predict.h (propagate_unlikely_bbs_forward): Declare.
* cfgexpand.c (pass_expand::execute): Use it.
* bb-reorder.c (sanitize_hot_paths): Do not consider known to be
unlikely edges.
(find_rarely_executed_basic_blocks_and_crossing_edges): Use
propagate_unlikely_bbs_forward.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250359 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago PR middle-end/81331
hubicka [Wed, 19 Jul 2017 18:08:07 +0000 (18:08 +0000)] 
PR middle-end/81331
* except.c (maybe_add_nop_after_section_switch): New function.
(execute): Use it.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250358 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago * libsupc++/new (bad_array_new_length): Remove redundant
reichelt [Wed, 19 Jul 2017 16:59:00 +0000 (16:59 +0000)] 
    * libsupc++/new (bad_array_new_length): Remove redundant
        semicolon after in-class member function definition.
        * include/bits/locale_facets.h (ctype_byname, num_put): Likewise.
        * include/bits/locale_facets_nonio.h (time_put_byname): Likewise.
        * include/bits/random.h (mersenne_twister_engine): Likewise.
        * include/tr1/random.h (mersenne_twister): Likewise
        * include/ext/random (simd_fast_mersenne_twister_engine): Likewise.
        * include/ext/rope (char_producer, _Rope_char_consumer,
        _Rope_self_destruct_ptr, _Rope_const_iterator, _Rope_iterator):
        Likewise.
        * include/ext/ropeimpl.h (_Rope_flatten_char_consumer,
        _Rope_insert_char_consumer): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250357 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago * gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE,
jakub [Wed, 19 Jul 2017 15:55:47 +0000 (15:55 +0000)] 
* gcc-interface/ada-tree.h (TYPE_OBJECT_RECORD_TYPE,
TYPE_GCC_MIN_VALUE): Use TYPE_MIN_VALUE_RAW instead of TYPE_MINVAL.
(TYPE_GCC_MAX_VALUE): Use TYPE_MAX_VALUE_RAW instead of TYPE_MAXVAL.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250355 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoFix Unwind support on DragonFly BSD after sigtramp move
redi [Wed, 19 Jul 2017 15:55:11 +0000 (15:55 +0000)] 
Fix Unwind support on DragonFly BSD after sigtramp move

2017-07-19  John Marino  <gnugcc@marino.st>

* config/i386/dragonfly-unwind.h: Handle sigtramp relocation.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250354 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoFix indentation in std::basic_filebuf member functions
redi [Wed, 19 Jul 2017 15:46:04 +0000 (15:46 +0000)] 
Fix indentation in std::basic_filebuf member functions

* include/bits/fstream.tcc (basic_filebuf::xsgetn)
(basic_filebuf::xsputn, basic_filebuf::seekoff): Fix indentation.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250353 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoFix assert in gimple_phi_set_arg
vries [Wed, 19 Jul 2017 15:33:50 +0000 (15:33 +0000)] 
Fix assert in gimple_phi_set_arg

2017-07-19  Tom de Vries  <tom@codesourcery.com>

* gimple.h (gimple_phi_set_arg): Make assert more strict.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250352 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoFix assert in gimple_phi_arg
vries [Wed, 19 Jul 2017 15:33:40 +0000 (15:33 +0000)] 
Fix assert in gimple_phi_arg

2017-07-19  Tom de Vries  <tom@codesourcery.com>

* gimple.h (gimple_phi_arg): Make assert more strict.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250351 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoNow adding the mmintrin.h intrinsic headers. The DG tests will follow.
munroesj [Wed, 19 Jul 2017 15:24:42 +0000 (15:24 +0000)] 
Now adding the mmintrin.h intrinsic headers. The DG tests will follow.

2017-07-19  Steven Munroe  <munroesj@gcc.gnu.org>

* config.gcc (powerpc*-*-*): Add mmintrin.h.
* config/rs6000/mmintrin.h: New file.
* config/rs6000/x86intrin.h [__ALTIVEC__]: Include mmintrin.h.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250350 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoFix indentation in libstdc++ testsuite utils
redi [Wed, 19 Jul 2017 14:49:00 +0000 (14:49 +0000)] 
Fix indentation in libstdc++ testsuite utils

* testsuite/util/testsuite_iterators.h: Fix indentation.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250349 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago * class.c (add_implicitly_declared_members): Use
nathan [Wed, 19 Jul 2017 13:28:21 +0000 (13:28 +0000)] 
* class.c (add_implicitly_declared_members): Use
classtype_has_move_assign_or_move_ctor_p.
(classtype_has_move_assign_or_move_ctor,
classtype_has_user_move_assign_or_move_ctor_p): Merge into ...
(classtype_has_move_assign_or_move_ctor_p): ... this new function.
* cp-tree.h (classtype_has_user_move_assign_or_move_ctor_p):
Replace with ...
(classtype_has_move_assign_or_move_ctor_p): ... this.
* method.c (maybe_explain_implicit_delete, lazily_declare_fn): Adjust.
* tree.c (type_has_nontrivial_copy_init): Adjust.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250344 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago PR libquadmath/65757
jakub [Wed, 19 Jul 2017 13:12:58 +0000 (13:12 +0000)] 
PR libquadmath/65757
* quadmath-imp.h (math_opt_barrier, math_force_eval,
math_narrow_eval, math_check_force_underflow,
math_check_force_underflow_nonneg): Define.
* math/ceilq.c: Backport changes from upstream glibc
between 2012-11-01 and 2017-07-13.
* math/remquoq.c: Likewise.
* math/expq.c: Likewise.
* math/llroundq.c: Likewise.
* math/logq.c: Likewise.
* math/atanq.c: Likewise.
* math/nearbyintq.c: Likewise.
* math/scalblnq.c: Likewise.
* math/finiteq.c: Likewise.
* math/atanhq.c: Likewise.
* math/expm1q.c: Likewise.
* math/sinhq.c: Likewise.
* math/log10q.c: Likewise.
* math/rintq.c: Likewise.
* math/roundq.c: Likewise.
* math/fmaq.c: Likewise.
* math/erfq.c: Likewise.
* math/log2q.c: Likewise.
* math/lroundq.c: Likewise.
* math/j1q.c: Likewise.
* math/scalbnq.c: Likewise.
* math/truncq.c: Likewise.
* math/frexpq.c: Likewise.
* math/sincosq.c: Likewise.
* math/tanhq.c: Likewise.
* math/asinq.c: Likewise.
* math/coshq.c: Likewise.
* math/j0q.c: Likewise.
* math/asinhq.c: Likewise.
* math/floorq.c: Likewise.
* math/sinq_kernel.c: Likewise.
* math/powq.c: Likewise.
* math/hypotq.c: Likewise.
* math/sincos_table.c: Likewise.
* math/rem_pio2q.c: Likewise.
* math/nextafterq.c: Likewise.
* math/log1pq.c: Likewise.
* math/sincosq_kernel.c: Likewise.
* math/tanq.c: Likewise.
* math/acosq.c: Likewise.
* math/lrintq.c: Likewise.
* math/llrintq.c: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250343 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago PR tree-optimization/81346
jakub [Wed, 19 Jul 2017 13:10:05 +0000 (13:10 +0000)] 
PR tree-optimization/81346
* match.pd: Optimize (X - 1U) <= INT_MAX-1U into (int) X > 0.

* gcc.dg/tree-ssa/pr81346-5.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250342 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoAdd v2di support for nvptx
vries [Wed, 19 Jul 2017 13:05:35 +0000 (13:05 +0000)] 
Add v2di support for nvptx

2017-07-19  Tom de Vries  <tom@codesourcery.com>

* config/nvptx/nvptx-modes.def: Add V2DImode.
* config/nvptx/nvptx-protos.h (nvptx_data_alignment): Declare.
* config/nvptx/nvptx.c (nvptx_ptx_type_from_mode): Handle V2DImode.
(nvptx_output_mov_insn): Handle lack of mov.b128.
(nvptx_print_operand): Handle 'H' and 'L' codes.
(nvptx_vector_mode_supported): Allow V2DImode.
(nvptx_preferred_simd_mode): New function.
(nvptx_data_alignment): New function.
(TARGET_VECTORIZE_PREFERRED_SIMD_MODE): Redefine to
nvptx_preferred_simd_mode.
* config/nvptx/nvptx.h (STACK_BOUNDARY, BIGGEST_ALIGNMENT): Change from
64 to 128 bits.
(DATA_ALIGNMENT): Define.  Set to nvptx_data_alignment.

* config/nvptx/nvptx.md (VECIM): Add V2DI.

* gcc.target/nvptx/decl-init.c: Update alignment.
* gcc.target/nvptx/slp-2-run.c: New test.
* gcc.target/nvptx/slp-2.c: New test.
* gcc.target/nvptx/v2di.c: New test.

* testsuite/libgomp.oacc-c/vec.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250341 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoAdd v2si support for nvptx
vries [Wed, 19 Jul 2017 13:05:21 +0000 (13:05 +0000)] 
Add v2si support for nvptx

2017-07-19  Tom de Vries  <tom@codesourcery.com>

* config/nvptx/nvptx-modes.def: New file.  Add V2SImode.
* config/nvptx/nvptx.c (nvptx_ptx_type_from_mode): Handle V2SImode.
(nvptx_vector_mode_supported): New function.  Allow V2SImode.
(TARGET_VECTOR_MODE_SUPPORTED_P): Redefine to nvptx_vector_mode_supported.
* config/nvptx/nvptx.md (VECIM): New mode iterator. Add V2SI.
(mov<VECIM>_insn): New define_insn.
(define_expand "mov<VECIM>): New define_expand.

* gcc.target/nvptx/slp-run.c: New test.
* gcc.target/nvptx/slp.c: New test.
* gcc.target/nvptx/v2si-cvt.c: New test.
* gcc.target/nvptx/v2si-run.c: New test.
* gcc.target/nvptx/v2si.c: New test.
* gcc.target/nvptx/vec.inc: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250340 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoAdd generic v2 vector mode support for nvptx
vries [Wed, 19 Jul 2017 13:05:09 +0000 (13:05 +0000)] 
Add generic v2 vector mode support for nvptx

2017-07-19  Tom de Vries  <tom@codesourcery.com>

* config/nvptx/nvptx.c (nvptx_print_operand): Handle v2 vector mode.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250339 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago PR tree-optimization/81346
jakub [Wed, 19 Jul 2017 12:31:59 +0000 (12:31 +0000)] 
PR tree-optimization/81346
* fold-const.h (fold_div_compare, range_check_type): Declare.
* fold-const.c (range_check_type): New function.
(build_range_check): Use range_check_type.
(fold_div_compare): No longer static, rewritten into
a match.pd helper function.
(fold_comparison): Don't call fold_div_compare here.
* match.pd (X / C1 op C2): New optimization using fold_div_compare
as helper function.

* gcc.dg/tree-ssa/pr81346-1.c: New test.
* gcc.dg/tree-ssa/pr81346-2.c: New test.
* gcc.dg/tree-ssa/pr81346-3.c: New test.
* gcc.dg/tree-ssa/pr81346-4.c: New test.
* gcc.target/i386/umod-3.c: Hide comparison against 1 from the
compiler to avoid X / C1 op C2 optimization to trigger.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250338 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago gcc/
nathan [Wed, 19 Jul 2017 12:01:18 +0000 (12:01 +0000)] 
gcc/
* tree.h (TYPE_MINVAL, TYPE_MAXVAL): Rename to ...
(TYPE_MIN_VALUE_RAW, TYPE_MAX_VALUE_RAW): ... these.
* tree.c (find_decls_types_r, verify_type): Use
TYPE_{MIN,MAX}_VALUE_RAW.
* lto-streamer-out.c (DFS::DFS_write_tree_body): Likewise.
(hash_tree): Likewise.
* tree-streamer-in.c (lto_input_ts_type_non_common_tree_pointers):
Likewise.
* tree-streamer-out.c (write_ts_type_non_common_tree_pointers):
Likewise.

gcc/cp/
* cp-tree.h (PACK_EXPANSION_PARAMETER_PACKS,
PACK_EXPANSION_EXTRA_ARGS): Use TYPE_{MIN,MAX}_VALUE_RAW.

gcc/lto/
* lto.c (mentions_vars_p_type): Use TYPE_{MIN,MAX}_VALUE_RAW.
(compare_tree_sccs_1, lto_fixup_prevailing_decls): Likewise.

gcc/objc/
* objc-act.h (CLASS_NST_METHODS, CLASS_CLS_METHODS): Use
TYPE_{MIN,MAX}_VALUE_RAW.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250337 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoFix an UBSAN test-case (PR sanitizer/63361).
marxin [Wed, 19 Jul 2017 06:50:34 +0000 (06:50 +0000)] 
Fix an UBSAN test-case (PR sanitizer/63361).

2017-07-19  Martin Liska  <mliska@suse.cz>

PR sanitizer/63361
* c-c++-common/ubsan/float-cast-overflow-1.c: Add either
-ffloat-store or -mieee for targets that need it.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250336 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoHandle equal-argument loop exit phi in expand_omp_for_static_chunk
vries [Wed, 19 Jul 2017 06:25:40 +0000 (06:25 +0000)] 
Handle equal-argument loop exit phi in expand_omp_for_static_chunk

2017-07-18  Tom de Vries  <tom@codesourcery.com>

PR middle-end/81464
* omp-expand.c (expand_omp_for_static_chunk): Handle equal-argument loop
exit phi.

* gfortran.dg/pr81464.f90: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250335 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoAdd myself to MAINTAINERS.
ygribov [Wed, 19 Jul 2017 05:25:47 +0000 (05:25 +0000)] 
Add myself to MAINTAINERS.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250334 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoUse dg-require-fileio in new test
redi [Wed, 19 Jul 2017 00:23:00 +0000 (00:23 +0000)] 
Use dg-require-fileio in new test

* testsuite/27_io/basic_filebuf/sgetn/char/81395.cc: Add dg-require.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250333 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoDaily bump.
gccadmin [Wed, 19 Jul 2017 00:16:19 +0000 (00:16 +0000)] 
Daily bump.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250332 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoPR libstdc++/81395 fix crash when write follows large read
redi [Tue, 18 Jul 2017 23:39:34 +0000 (23:39 +0000)] 
PR libstdc++/81395 fix crash when write follows large read

PR libstdc++/81395
* include/bits/fstream.tcc (basic_filebuf::xsgetn): Don't set buffer
pointers for write mode after reading.
* testsuite/27_io/basic_filebuf/sgetn/char/81395.cc: New.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250328 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago compiler: insert backend type conversion for closure func ptr
ian [Tue, 18 Jul 2017 23:29:15 +0000 (23:29 +0000)] 
compiler: insert backend type conversion for closure func ptr

    In Func_expression::do_get_backend when creating the backend
    representation for a closure, create a backend type conversion to
    account for potential differences between the closure struct type
    (where the number of fields is dependent on the number of values
    referenced in the closure) and the generic function descriptor type
    (struct with single function pointer field).

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

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250327 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago PR go/81451
ian [Tue, 18 Jul 2017 23:14:29 +0000 (23:14 +0000)] 
PR go/81451
    runtime: inline runtime_osinit

    We had two identical copies of runtime_osinit. They set runtime_ncpu,
    a variable that is no longer used. Removing that leaves us with two lines.
    Inline those two lines in the two places the function was called.

    This fixes GCC PR 81451.

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

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250326 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago compiler: pass correct 'function' flag to circular_pointer_type
ian [Tue, 18 Jul 2017 22:31:00 +0000 (22:31 +0000)] 
compiler: pass correct 'function' flag to circular_pointer_type

    The code in Named_type::do_get_backend was not passing the correct
    flag value for circular function types to Backend::circular_pointer_type
    (it was always setting this flag to false). Pass a true value if the
    type being converted is a function type.

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

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250325 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago PR go/81324
ian [Tue, 18 Jul 2017 22:06:31 +0000 (22:06 +0000)] 
PR go/81324
    sysinfo.c: ignore ptrace_peeksiginfo_args from <linux/ptrace.h>

    With some versions of glibc and GNU/Linux ptrace_pseeksiginfo_args is
    defined in both <sys/ptrace.h> and <linux/ptrace.h>. We don't actually
    care about the struct, so use a #define to avoid a redefinition error.

    This fixes https://gcc.gnu.org/PR81324.

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

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250324 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoupdate my entry in MAINTAINERS
tbsaunde [Tue, 18 Jul 2017 21:05:48 +0000 (21:05 +0000)] 
update my entry in MAINTAINERS

/:

* MAINTAINERS: Update my email address.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250321 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2017-07-18 François Dumont <fdumont@gcc.gnu.org>
fdumont [Tue, 18 Jul 2017 20:26:08 +0000 (20:26 +0000)] 
2017-07-18  François Dumont  <fdumont@gcc.gnu.org>

* include/bits/stl_list.h
(struct _List_node_header): New.
(_List_impl()): Fix noexcept qualification.
(_List_impl(_List_impl&&)): New, default.
(_List_base()): Default.
(_List_base(_List_base&&)): Default.
(_List_base::_M_move_nodes): Adapt to use
_List_node_header._M_move_nodes.
(_List_base::_M_init): Likewise.
(list<>()): Default.
(list<>(list&&)): Default.
(list<>::_M_move_assign(list&&, true_type)): Use _M_move_nodes.
(__distance(_List_const_iterator<>, _List_const_iterator<>,
input_iterator_tag)): Adapt.
* testsuite/23_containers/list/allocator/default_init.cc: New.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250320 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago PR target/81471
uros [Tue, 18 Jul 2017 16:10:20 +0000 (16:10 +0000)] 
PR target/81471
* config/i386/i386.md (rorx_immediate_operand): New mode attribute.
(*bmi2_rorx<mode>3_1): Use rorx_immediate_operand as
operand 2 predicate.
(*bmi2_rorxsi3_1_zext): Use const_0_to_31_operand as
operand 2 predicate.
(ror,rol -> rorx splitters): Use const_int_operand as
operand 2 predicate.

testsuite/ChangeLog:

PR target/81471
* gcc.target/i386/pr81471.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250315 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2017-07-17 Yury Gribov <tetra2005@gmail.com>
chefmax [Tue, 18 Jul 2017 15:39:39 +0000 (15:39 +0000)] 
2017-07-17  Yury Gribov  <tetra2005@gmail.com>

* mklog: Fix extraction of changed file name.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250314 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2017-06-18 Richard Biener <rguenther@suse.de>
rguenth [Tue, 18 Jul 2017 13:55:47 +0000 (13:55 +0000)] 
2017-06-18  Richard Biener  <rguenther@suse.de>

PR tree-optimization/81410
* tree-vect-stmts.c (vectorizable_load): Properly adjust for
the gap in the ! slp_perm SLP case after each group.

* gcc.dg/vect/pr81410.c: New testcase.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250312 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago PR middle-end/81463
hubicka [Tue, 18 Jul 2017 13:51:22 +0000 (13:51 +0000)] 
PR middle-end/81463
* cfgloopmanip.c (scale_loop_profile): Watch out for zero frequency
again.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250311 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago PR middle-end/81462
hubicka [Tue, 18 Jul 2017 13:49:30 +0000 (13:49 +0000)] 
PR middle-end/81462
* predict.c (set_even_probabilities): Cleanup; do not affect
probabilities that are already known.
(combine_predictions_for_bb): Call even when count is set.

* g++.dg/torture/pr81462.C: New testcase.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250310 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago gcc/
nathan [Tue, 18 Jul 2017 13:22:50 +0000 (13:22 +0000)] 
   gcc/
* tree-parloops.c (try_transform_to_exit_first_loop_alt): Use
TYPE_MAX_VALUE.

       gcc/c-family/
* c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.

       gcc/c/
* c-parser.c (c_parser_array_notation): Use TYPE_{MIN,MAX}_VALUE.

       gcc/cp/
* cp-array-notation.c (build_array_notation_ref): Use
TYPE_{MIN,MAX}_VALUE.

       gcc/fortran/
* trans.c (gfc_build_array_ref): Use TYPE_MAX_VALUE.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250309 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agogcc: ada: delete old $(P) reference
vapier [Tue, 18 Jul 2017 12:38:41 +0000 (12:38 +0000)] 
gcc: ada: delete old $(P) reference

The P variable was deleted back in Nov 2015 (svn rev 231062),
but its expansion was missed.  Delete those now too.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250307 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago * class.c (classtype_has_move_assign_or_move_ctor): Declare.
nathan [Tue, 18 Jul 2017 12:05:12 +0000 (12:05 +0000)] 
* class.c (classtype_has_move_assign_or_move_ctor): Declare.
(add_implicitly_declared_members): Use it.
(type_has_move_constructor, type_has_move_assign): Merge into ...
(classtype_has_move_assign_or_move_ctor): ... this new function.
* cp-tree.h (type_has_move_constructor, type_has_move_assign): Delete.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250305 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago PR target/81408
amker [Tue, 18 Jul 2017 11:40:38 +0000 (11:40 +0000)] 
PR target/81408
* tree-ssa-loop-niter.c (number_of_iterations_exit): Dump missed
optimization for loop niter analysis.

gcc/testsuite
* g++.dg/tree-ssa/pr81408.C: New.
* gcc.dg/tree-ssa/pr19210-1.c: Check dump message rather than warning.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250304 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agogcc/
gjl [Tue, 18 Jul 2017 09:36:21 +0000 (09:36 +0000)] 
gcc/
PR target/81473
* config/avr/avr.c (avr_optimize_casesi): Don't use
INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250301 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoFix PR81362: Vector peeling
krebbel [Tue, 18 Jul 2017 09:23:35 +0000 (09:23 +0000)] 
Fix PR81362: Vector peeling

npeel was erroneously overwritten by vect_peeling_hash_get_lowest_cost
although the corresponding dataref is not used afterwards.  It should
be safe to get rid of the npeel parameter since we use the returned
peeling_info's npeel anyway.  Also removed the body_cost_vec parameter
which is not used elsewhere.

gcc/ChangeLog:

2017-07-18  Robin Dapp  <rdapp@linux.vnet.ibm.com>

* tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Remove
body_cost_vec from _vect_peel_extended_info.
(vect_peeling_hash_get_lowest_cost): Do not set body_cost_vec.
(vect_peeling_hash_choose_best_peeling): Remove body_cost_vec and
npeel.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250300 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago * config/arm/arm.c (emit_unlikely_jump): Remove unused var.
amker [Tue, 18 Jul 2017 08:34:37 +0000 (08:34 +0000)] 
* config/arm/arm.c (emit_unlikely_jump): Remove unused var.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250299 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2017-07-18 Richard Biener <rguenther@suse.de>
rguenth [Tue, 18 Jul 2017 07:35:40 +0000 (07:35 +0000)] 
2017-07-18  Richard Biener  <rguenther@suse.de>

PR tree-optimization/80620
PR tree-optimization/81403
* tree-ssa-pre.c (phi_translate_1): Clear range and points-to
info when re-using a VN table entry.

* gcc.dg/torture/pr80620.c: New testcase.
* gcc.dg/torture/pr81403.c: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250297 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2017-06-18 Richard Biener <rguenther@suse.de>
rguenth [Tue, 18 Jul 2017 07:26:04 +0000 (07:26 +0000)] 
2017-06-18  Richard Biener  <rguenther@suse.de>

PR tree-optimization/81418
* tree-vect-loop.c (vectorizable_reduction): Properly compute
vectype_in.  Verify that with lane-reducing reduction operations
we have a single def-use cycle.

* gcc.dg/torture/pr81418.c: New testcase.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250296 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agogcc/ChangeLog:
carll [Tue, 18 Jul 2017 03:40:39 +0000 (03:40 +0000)] 
gcc/ChangeLog:

2017-07-17  Carl Love  <cel@us.ibm.com>

Revert commit r249424 2017-06-20  Carl Love  <cel@us.ibm.com>

* config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
ALTIVEC_BUILTIN_VMULESW, ALTIVEC_BUILTIN_VMULEUW,
ALTIVEC_BUILTIN_VMULOSW, ALTIVEC_BUILTIN_VMULOUW entries.
* config/rs6000/rs6000.c (rs6000_gimple_fold_builtin,
builtin_function_type): Add ALTIVEC_BUILTIN_* case statements.
* config/rs6000/altivec.md (MVULEUW, VMULESW, VMULOUW,
VMULOSW): New enum "unspec" values.
(vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si,
altivec_vmuleuw, altivec_vmulesw, altivec_vmulouw,
altivec_vmulosw): New patterns.
* config/rs6000/rs6000-builtin.def (VMLEUW, VMULESW, VMULOUW,
VMULOSW): Add definitions.

gcc/testsuite/ChangeLog:

2017-07-17  Carl Love  <cel@us.ibm.com>

Revert commit r249572  2017-06-22 Carl Love  <cel@us.ibm.com>
test case changes for commit 249424

* gcc.target/powerpc/builtins-2.c (vmulosh, vmulouh, vmulesh,
vmuleuh): Fix scan-assembler-times should check for word not half word
instructions.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250295 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoDaily bump.
gccadmin [Tue, 18 Jul 2017 00:16:34 +0000 (00:16 +0000)] 
Daily bump.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250294 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago * config/alpha/alpha.c: Include predict.h.
uros [Mon, 17 Jul 2017 20:54:31 +0000 (20:54 +0000)] 
* config/alpha/alpha.c: Include predict.h.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250290 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2017-07-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
wschmidt [Mon, 17 Jul 2017 19:12:11 +0000 (19:12 +0000)] 
2017-07-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

PR tree-optimization/81162
* gcc.dg/pr81162.c: Move this to...
* gcc.dg/ubsan/pr81162.c: ...here.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250284 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago * parser.c (cp_parser_decl_specifier_seq): Add fix-it hints for
reichelt [Mon, 17 Jul 2017 16:58:00 +0000 (16:58 +0000)] 
    * parser.c (cp_parser_decl_specifier_seq): Add fix-it hints for
        friend outside class and obsolete auto as storage-class-specifier.

        * g++.dg/diagnostic/friend1.C: New test.
        * g++.dg/cpp0x/auto1.C: Add check for fix-it hint.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250282 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago * class.c (maybe_warn_about_overly_private_class): Ignore public
nathan [Mon, 17 Jul 2017 16:52:31 +0000 (16:52 +0000)] 
* class.c (maybe_warn_about_overly_private_class): Ignore public
copy ctors.

* g++.dg/warn/ctor-dtor-privacy-3.C: New.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250281 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago * class.c (type_has_user_declared_move_constructor,
nathan [Mon, 17 Jul 2017 15:57:59 +0000 (15:57 +0000)] 
* class.c (type_has_user_declared_move_constructor,
type_has_user_declared_move_assign): Combine into ...
(classtype_has_user_move_assign_or_move_ctor_p): ... this new function.
* cp-tree.h (type_has_user_declared_move_constructor,
type_has_user_declared_move_assign): Combine into ...
(classtype_has_user_move_assign_or_move_ctor_p): ... this. Declare.
* method.c (maybe_explain_implicit_delete): Use it.
(lazily_declare_fn): Use it.
* tree.c (type_has_nontrivial_copy_init): Use it.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250280 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2017-07-17 Bernd Edlinger <bernd.edlinger@hotmail.de>
edlinger [Mon, 17 Jul 2017 15:54:32 +0000 (15:54 +0000)] 
2017-07-17  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        * lib/gcc-dg.exp: Increase expect's match buffer size.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250279 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2017-07-17 Yury Gribov <tetra2005@gmail.com>
chefmax [Mon, 17 Jul 2017 14:58:00 +0000 (14:58 +0000)] 
2017-07-17  Yury Gribov  <tetra2005@gmail.com>

gcc/
        * tree-vrp.c (compare_assert_loc): Fix comparison function
to return predictable results.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250278 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago[ARC] Deprecate mexpand-adddi option.
claziss [Mon, 17 Jul 2017 12:59:56 +0000 (12:59 +0000)] 
[ARC] Deprecate mexpand-adddi option.

Emitting subregs in the expand will result in broken code due to LRA handling of them. Issue observed while turning on mlra and mexpand-adddi options using dejagnu test suite. Deprecate this
option.

gcc/
2017-04-26  Claudiu Zissulescu  <claziss@synopsys.com>

* config/arc/arc.md (adddi3): Remove support for mexpand-adddi
option.
(subdi3): Likewise.
* config/arc/arc.opt (mexpand-adddi): Deprecate it.
* doc/invoke.texi (mexpand-adddi): Update text.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250276 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago[ARC] [LRA] Avoid emitting COND_EXEC during expand.
claziss [Mon, 17 Jul 2017 12:59:45 +0000 (12:59 +0000)] 
[ARC] [LRA] Avoid emitting COND_EXEC during expand.

Emmitting COND_EXEC rtxes during expand does introduces errors due to LRA handling of them. Issue discovered while running dejagnu test suit with mlra option on.

gcc/
2017-07-17  Claudiu Zissulescu  <claziss@synopsys.com>

* config/arc/arc.md (clzsi2): Expand to an arc_clzsi2 instruction
that also clobbers the CC register. The old expand code is moved
to ...
(*arc_clzsi2): ... here.
(ctzsi2): Expand to an arc_ctzsi2 instruction that also clobbers
the CC register. The old expand code is moved to ...
(arc_ctzsi2): ... here.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250275 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago[ARC] Enable indexed loads for elf targers.
claziss [Mon, 17 Jul 2017 12:32:02 +0000 (12:32 +0000)] 
[ARC] Enable indexed loads for elf targers.

Enable indexed loads only for elf target, as the linux ones need more testing.

gcc/
2017-02-28  Claudiu Zissulescu  <claziss@synopsys.com>

* config/arc/arc.opt (mindexed-loads): Use initial value
TARGET_INDEXED_LOADS_DEFAULT.
(mauto-modify-reg): Use initial value
TARGET_AUTO_MODIFY_REG_DEFAULT.
* config/arc/elf.h (TARGET_INDEXED_LOADS_DEFAULT): Define.
(TARGET_AUTO_MODIFY_REG_DEFAULT): Likewise.
* config/arc/linux.h (TARGET_INDEXED_LOADS_DEFAULT): Define.
(TARGET_AUTO_MODIFY_REG_DEFAULT): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250274 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago * semantics.c (classtype_has_nothrow_assign_or_copy_p): Clarify
nathan [Mon, 17 Jul 2017 11:54:03 +0000 (11:54 +0000)] 
* semantics.c (classtype_has_nothrow_assign_or_copy_p): Clarify
semantics, simplify implementation.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250272 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoDo not allow -fgnu-tm w/ -fsanitize={kernel-,}address (PR sanitizer/81302).
marxin [Mon, 17 Jul 2017 11:44:54 +0000 (11:44 +0000)] 
Do not allow -fgnu-tm w/ -fsanitize={kernel-,}address (PR sanitizer/81302).

2017-07-17  Martin Liska  <mliska@suse.cz>

PR sanitizer/81302
* opts.c (finish_options): Do not allow -fgnu-tm
w/ -fsanitize={kernel-,}address.  Say sorry.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250271 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago PR target/81369
amker [Mon, 17 Jul 2017 11:40:54 +0000 (11:40 +0000)] 
PR target/81369
* tree-loop-distribution.c (classify_partition): Only assert on
numer of iterations.
(merge_dep_scc_partitions): Delete prameter.  Update function call.
(distribute_loop): Remove code handling loop with unknown niters.
(pass_loop_distribution::execute): Skip loop with unknown niters.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250270 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago PR target/81369
amker [Mon, 17 Jul 2017 11:38:15 +0000 (11:38 +0000)] 
PR target/81369
* tree-loop-distribution.c (merge_dep_scc_partitions): Sink call to
function sort_partitions_by_post_order.

gcc/testsuite
* gcc.dg/tree-ssa/pr81369.c: New.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250269 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago PR tree-optimization/81374
amker [Mon, 17 Jul 2017 11:34:30 +0000 (11:34 +0000)] 
PR tree-optimization/81374
* tree-loop-distribution.c (pass_loop_distribution::execute): Record
the max index of basic blocks, rather than number of basic blocks.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250268 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago[ARC] Consolidate PIC implementation.
claziss [Mon, 17 Jul 2017 11:04:37 +0000 (11:04 +0000)] 
[ARC] Consolidate PIC implementation.

This patch refactors a number of functions and compiler hooks into using a
single function which checks if a rtx is suited for pic or not. Removed
functions are arc_legitimate_pc_offset_p and arc_legitimate_pic_operand_p
beeing replaced by calls to arc_legitimate_pic_addr_p. Thus we have an
unitary way of checking a rtx beeing pic.

gcc/
2017-07-17  Claudiu Zissulescu  <claziss@synopsys.com>

* config/arc/arc-protos.h (arc_legitimate_pc_offset_p): Remove
proto.
(arc_legitimate_pic_operand_p): Likewise.
* config/arc/arc.c (arc_legitimate_pic_operand_p): Remove
function.
(arc_needs_pcl_p): Likewise.
(arc_legitimate_pc_offset_p): Likewise.
(arc_legitimate_pic_addr_p): Remove LABEL_REF case, as this
function is also used in constrains.md.
(arc_legitimate_constant_p): Use arc_legitimate_pic_addr_p to
validate pic constants. Handle CONST_INT, CONST_DOUBLE, MINUS and
PLUS.  Only return true/false in known cases, otherwise assert.
(arc_legitimate_address_p): Remove arc_legitimate_pic_addr_p as it
is already called in arc_legitimate_constant_p.
* config/arc/arc.h (CONSTANT_ADDRESS_P): Consider also LABEL for
pic addresses.
(LEGITIMATE_PIC_OPERAND_P): Use
arc_raw_symbolic_reference_mentioned_p function.
* config/arc/constraints.md (Cpc): Use arc_legitimate_pic_addr_p
function.
(Cal): Likewise.
(C32): Likewise.

gcc/testsuite
2017-07-17  Claudiu Zissulescu  <claziss@synopsys.com>

* gcc.target/arc/pr9000674901.c: New file.
* gcc.target/arc/pic-1.c: Likewise.
* gcc.target/arc/pr9001191897.c: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250267 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago[PATCH] [ARC] Add support for naked functions.
claziss [Mon, 17 Jul 2017 10:46:55 +0000 (10:46 +0000)] 
[PATCH] [ARC] Add support for naked functions.

gcc/
2017-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
            Andrew Burgess  <andrew.burgess@embecosm.com>

        * config/arc/arc-protos.h (arc_compute_function_type): Change prototype.
        (arc_return_address_register): New function.
        * config/arc/arc.c (arc_handle_fndecl_attribute): New function.
        (arc_handle_fndecl_attribute): Add naked attribute.
        (TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS): Define.
        (TARGET_WARN_FUNC_RETURN): Likewise.
        (arc_allocate_stack_slots_for_args): New function.
        (arc_warn_func_return): Likewise.
        (machine_function): Change type fn_type.
        (arc_compute_function_type): Consider new naked function type,
        change function return type.
        (arc_must_save_register): Adapt to handle new
        arc_compute_function_type's return type.
        (arc_expand_prologue): Likewise.
        (arc_expand_epilogue): Likewise.
        (arc_return_address_regs): Delete.
        (arc_return_address_register): New function.
        (arc_epilogue_uses): Use above function.
        * config/arc/arc.h (arc_return_address_regs): Delete prototype.
        (arc_function_type): Change encoding, add naked type.
        (ARC_INTERRUPT_P): Change to handle the new encoding.
        (ARC_FAST_INTERRUPT_P): Likewise.
        (ARC_NORMAL_P): Define.
        (ARC_NAKED_P): Likewise.
        (arc_compute_function_type): Delete prototype.
        * config/arc/arc.md (in_ret_delay_slot): Use
        arc_return_address_register function.
        (simple_return): Likewise.
        (p_return_i): Likewise.

gcc/testsuite
2017-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
            Andrew Burgess  <andrew.burgess@embecosm.com>

        * gcc.target/arc/naked-1.c: New file.
        * gcc.target/arc/naked-2.c: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250266 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago PR tree-optimization/81428
jakub [Mon, 17 Jul 2017 10:20:41 +0000 (10:20 +0000)] 
PR tree-optimization/81428
* match.pd (X / X -> one): Don't optimize _Fract divisions, as 1
can't be built for those types.

* gcc.dg/fixed-point/pr81428.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250265 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago Remove stuff dead since r239246.
gjl [Mon, 17 Jul 2017 09:32:42 +0000 (09:32 +0000)] 
Remove stuff dead since r239246.
* config/avr/avr-arch.h (avr_inform_devices): Remove dead proto.
* config/avr/avr-devices.c (mcu_name, comparator, avr_mcus_str)
(avr_inform_devices): Remove dead stuff.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250264 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago * gcc_update (files_and_dependencies)
gjl [Mon, 17 Jul 2017 09:13:36 +0000 (09:13 +0000)] 
* gcc_update (files_and_dependencies)
[gcc/config/avr/avr-tables.opt]: Remove dead entry.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250263 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago2017-07-17 Tamar Christina <tamar.christina@arm.com>
tnfchris [Mon, 17 Jul 2017 09:12:57 +0000 (09:12 +0000)] 
2017-07-17  Tamar Christina  <tamar.christina@arm.com>

* config/arm/arm_neon.h: Fix softp typo.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250262 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago PR tree-optimization/81365
jakub [Mon, 17 Jul 2017 09:10:23 +0000 (09:10 +0000)] 
PR tree-optimization/81365
* tree-ssa-phiprop.c (propagate_with_phi): When considering hoisting
aggregate moves onto bb predecessor edges, make sure there are no
loads that could alias the lhs in between the start of bb and the
loads from *phi.

* g++.dg/torture/pr81365.C: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250261 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago PR 80929
gjl [Mon, 17 Jul 2017 08:56:06 +0000 (08:56 +0000)] 
PR 80929
* config/avr/avr.c (avr_mul_highpart_cost): New static function.
(avr_rtx_costs_1) [TRUNCATE]: Use it to compute mul_highpart cost.
[LSHIFTRT, outer_code = TRUNCATE]: Same.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250258 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago PR tree-optimization/81396
jakub [Mon, 17 Jul 2017 08:14:16 +0000 (08:14 +0000)] 
PR tree-optimization/81396
* tree-ssa-math-opts.c (struct symbolic_number): Add n_ops field.
(init_symbolic_number): Initialize it to 1.
(perform_symbolic_merge): Add n_ops from both operands into the new
n_ops.
(find_bswap_or_nop): Don't consider n->n == cmpnop computations
without base_addr as useless if they need more than one operation.
(bswap_replace): Handle !bswap case for NULL base_addr.

* gcc.dg/tree-ssa/pr81396.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250257 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoInsert diverging jump alap in nvptx_single
vries [Mon, 17 Jul 2017 07:49:22 +0000 (07:49 +0000)] 
Insert diverging jump alap in nvptx_single

2017-07-17  Tom de Vries  <tom@codesourcery.com>

PR target/81069
* config/nvptx/nvptx.c (nvptx_single): Insert diverging branch as late
as possible.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250256 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago[SPARC/RTEMS] Add __FIX_LEON3FT_B2BST
sh [Mon, 17 Jul 2017 05:27:13 +0000 (05:27 +0000)] 
[SPARC/RTEMS] Add __FIX_LEON3FT_B2BST

In case the LEON3FT back-to-back store workaround is active
(sparc_fix_b2bst), then define the builtin define __FIX_LEON3FT_B2BST on
RTEMS.  The intended use case for this is operating system code in
assembly language.  See also:

https://lists.rtems.org/pipermail/devel/2017-July/018463.html

gcc/
*  gcc/config/sparc/rtemself.h (TARGET_OS_CPP_BUILTINS): Add
conditional builtin define __FIX_LEON3FT_B2BST.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250254 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago[RTEMS] Add multilibs for LEON3FT back-to-back store workaround
sh [Mon, 17 Jul 2017 05:18:42 +0000 (05:18 +0000)] 
[RTEMS] Add multilibs for LEON3FT back-to-back store workaround

Replace MULTILIB_EXCEPTIONS with MULTILIB_REQUIRED for readability.
-mfix-gr712rc and -mfix-ut700 are currently equivalent.

gcc/
* config/sparc/t-rtems: Add mfix-gr712rc multilibs. Replace
MULTILIB_EXCEPTIONS with MULTILIB_REQUIRED. Match -mfix-gr712rc
with -mfix-ut700.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250252 138bc75d-0d04-0410-961f-82ee72b054a4

8 years agoDaily bump.
gccadmin [Mon, 17 Jul 2017 00:16:33 +0000 (00:16 +0000)] 
Daily bump.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250251 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago PR rtl-optimization/81424
ebotcazou [Sun, 16 Jul 2017 22:03:54 +0000 (22:03 +0000)] 
PR rtl-optimization/81424
* optabs.c (prepare_cmp_insn): Use copy_to_reg instead of force_reg
to remove potential trapping from operands if -fnon-call-exceptions.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250246 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Use
hubicka [Sun, 16 Jul 2017 18:25:26 +0000 (18:25 +0000)] 
* tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Use
profile_proability for scalling.
* scale_profile_for_vect_loop.c (scale_profile_for_vect_loop): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250245 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago * cgraph.c (cgraph_edge::redirect_call_stmt_to_caller): Cleanup.
hubicka [Sun, 16 Jul 2017 16:36:48 +0000 (16:36 +0000)] 
* cgraph.c (cgraph_edge::redirect_call_stmt_to_caller): Cleanup.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250243 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago * cfgloopmanip.c (scale_loop_profile): Avoid use of REG_BR_PROB_BASE
hubicka [Sun, 16 Jul 2017 16:35:00 +0000 (16:35 +0000)] 
* cfgloopmanip.c (scale_loop_profile): Avoid use of REG_BR_PROB_BASE
fixpoint arithmetics.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250242 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago * tree-ssa-loop-unswitch.c (hoist_guard): Avoid use of REG_BR_PROB_BASE
hubicka [Sun, 16 Jul 2017 16:30:40 +0000 (16:30 +0000)] 
* tree-ssa-loop-unswitch.c (hoist_guard): Avoid use of REG_BR_PROB_BASE
fixpoint arithmetics.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250241 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago * asan.c (create_cond_insert_point): Avoid use of REG_BR_PROB_BASE
hubicka [Sun, 16 Jul 2017 16:28:57 +0000 (16:28 +0000)] 
* asan.c (create_cond_insert_point): Avoid use of REG_BR_PROB_BASE
fixpoint arithmetics.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250240 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago * profile-count.h (profile_probability::from_reg_br_prob_note,
hubicka [Sun, 16 Jul 2017 16:10:58 +0000 (16:10 +0000)] 
* profile-count.h (profile_probability::from_reg_br_prob_note,
profile_probability::to_reg_br_prob_note): New functions.
* doc/rtl.texi (REG_BR_PROB_NOTE): Update documentation.
* reg-notes.h (REG_BR_PROB, REG_BR_PRED): Update docs.
* predict.c (probability_reliable_p): Update.
(edge_probability_reliable_p): Update.
(br_prob_note_reliable_p): Update.
(invert_br_probabilities): Update.
(add_reg_br_prob_note): New function.
(combine_predictions_for_insn): Update.
* asan.c (asan_clear_shadow): Update.
* cfgbuild.c (compute_outgoing_frequencies): Update.
* cfgrtl.c (force_nonfallthru_and_redirect): Update.
(update_br_prob_note): Update.
(rtl_verify_edges): Update.
(purge_dead_edges): Update.
(fixup_reorder_chain): Update.
* emit-rtl.c (try_split): Update.
* ifcvt.c (cond_exec_process_insns): Update.
(cond_exec_process_if_block): Update.
(dead_or_predicable): Update.
* internal-fn.c (expand_addsub_overflow): Update.
(expand_neg_overflow): Update.
(expand_mul_overflow): Update.
* loop-doloop.c (doloop_modify): Update.
* loop-unroll.c (compare_and_jump_seq): Update.
* optabs.c (emit_cmp_and_jump_insn_1): Update.
* predict.h: Update.
* reorg.c (mostly_true_jump): Update.
* rtl.h: Update.
* config/aarch64/aarch64.c (aarch64_emit_unlikely_jump): Update.
* config/alpha/alpha.c (emit_unlikely_jump): Update.
* config/arc/arc.c: (emit_unlikely_jump): Update.
* config/arm/arm.c: (emit_unlikely_jump): Update.
* config/bfin/bfin.c (cbranch_predicted_taken_p): Update.
* config/frv/frv.c (frv_print_operand_jump_hint): Update.
* config/i386/i386.c (ix86_expand_split_stack_prologue): Update.
(ix86_print_operand): Update.
(ix86_split_fp_branch): Update.
(predict_jump): Update.
* config/ia64/ia64.c (ia64_print_operand): Update.
* config/mmix/mmix.c (mmix_print_operand): Update.
* config/powerpcspe/powerpcspe.c (output_cbranch): Update.
(rs6000_expand_split_stack_prologue): Update.
* config/rs6000/rs6000.c: Update.
* config/s390/s390.c (s390_expand_vec_strlen): Update.
(s390_expand_vec_movstr): Update.
(s390_expand_cs_tdsi): Update.
(s390_expand_split_stack_prologue): Update.
* config/sh/sh.c (sh_print_operand): Update.
(expand_cbranchsi4): Update.
(expand_cbranchdi4): Update.
* config/sparc/sparc.c (output_v9branch): Update.
* config/spu/spu.c (get_branch_target): Update.
(ea_load_store_inline): Update.
* config/tilegx/tilegx.c (cbranch_predicted_p): Update.
* config/tilepro/tilepro.c: Update.
* gcc.dg/predict-8.c: Update.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250239 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago * gimplify.c (mostly_copy_tree_r): Revert latest change.
ebotcazou [Sun, 16 Jul 2017 13:36:27 +0000 (13:36 +0000)] 
* gimplify.c (mostly_copy_tree_r): Revert latest change.
(gimplify_save_expr): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250238 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago * ipa-visibility.c (function_and_variable_visibility): Fix pasto.
hubicka [Sun, 16 Jul 2017 11:21:39 +0000 (11:21 +0000)] 
* ipa-visibility.c (function_and_variable_visibility): Fix pasto.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250237 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago * ipa-fnsummary.c (pass_data_ipa_fn_summary): Use
hubicka [Sun, 16 Jul 2017 11:19:44 +0000 (11:19 +0000)] 
* ipa-fnsummary.c (pass_data_ipa_fn_summary): Use
TV_IPA_FNSUMMARY.
* timevar.def (TV_IPA_FNSUMMARY): Define.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250236 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago * config/sparc/sparc.md (divdf3_fix): Add NOP to prevent back
ebotcazou [Sun, 16 Jul 2017 10:43:15 +0000 (10:43 +0000)] 
* config/sparc/sparc.md (divdf3_fix): Add NOP to prevent back
to back store errata sensitive sequence from being generated.
(sqrtdf2_fix): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250234 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago * tree-ssa-threadupdate.c (compute_path_counts,
hubicka [Sun, 16 Jul 2017 10:06:00 +0000 (10:06 +0000)] 
* tree-ssa-threadupdate.c (compute_path_counts,
update_joiner_offpath_counts): Use profile_probability.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250233 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago Add forgotten Changelog entries for
reichelt [Sun, 16 Jul 2017 09:57:50 +0000 (09:57 +0000)] 
   Add forgotten Changelog entries for

        * parser.c (cp_parser_cast_expression): Use %q#T instead of %qT
        in old-style cast diagnostic.
        * typeck.c (maybe_warn_about_useless_cast): Use %q#T instead of %qT
        in useless cast diagnostic.
        * error.c (type_to_string): Remove enum special handling.

        * g++.dg/cpp1z/direct-enum-init1.C: Revert special enum handling.
        * g++.dg/warn/pr12242.C: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250232 138bc75d-0d04-0410-961f-82ee72b054a4

8 years ago * parser.c (cp_parser_cast_expression): Use %q#T instead of %qT
reichelt [Sun, 16 Jul 2017 09:55:18 +0000 (09:55 +0000)] 
    * parser.c (cp_parser_cast_expression): Use %q#T instead of %qT
        in old-style cast diagnostic.
        * typeck.c (maybe_warn_about_useless_cast): Use %q#T instead of %qT
        in useless cast diagnostic.
        * error.c (type_to_string): Remove enum special handling.

        * g++.dg/cpp1z/direct-enum-init1.C: Revert special enum handling.
        * g++.dg/warn/pr12242.C: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@250231 138bc75d-0d04-0410-961f-82ee72b054a4