platform/upstream/gcc.git
7 years agore PR c/79834 (c/c-parser.c: make code more i18n-friendly)
Jakub Jelinek [Tue, 7 Mar 2017 19:07:44 +0000 (20:07 +0100)]
re PR c/79834 (c/c-parser.c: make code more i18n-friendly)

PR c/79834
c/
* c-parser.c (c_parser_pragma): Use error_at instead of c_parser_error
for "may only be used in compound statements" diagnostics, change it
such that the same translatable string is used for all pragmas.  For
PRAGMA_OACC_WAIT use "acc wait" rather than "acc enter data" in the
diagnostics.
(c_parser_omp_cancellation_point, c_parser_omp_target_update,
c_parser_omp_target_enter_data, c_parser_omp_target_exit_data): Change
"may only be used in compound statements" diagnostics, such that the
same translatable string is used for all pragmas.
cp/
* parser.c (cp_parser_omp_cancellation_point,
cp_parser_omp_target_enter_data, cp_parser_omp_target_exit_data,
cp_parser_omp_target_update): Change "may only be used in compound
statements" diagnostics, such that the same translatable string is
used for all pragmas.
(cp_parser_pragma): Likewise.  Use error_at instead of
cp_parser_error for that diagnostics.
testsuite/
* c-c++-common/goacc/pragma_context.c (f2): Adjust expected
diagnostics.

From-SVN: r245959

7 years agore PR middle-end/79809 (ICE in alloca_call_type, at gimple-ssa-warn-alloca.c:282)
Marek Polacek [Tue, 7 Mar 2017 17:30:53 +0000 (17:30 +0000)]
re PR middle-end/79809 (ICE in alloca_call_type, at gimple-ssa-warn-alloca.c:282)

PR middle-end/79809
* gimple-ssa-warn-alloca.c (pass_walloca::gate): Use HOST_WIDE_INT.
(alloca_call_type): Likewise.

* g++.dg/Walloca1.C: New test.

From-SVN: r245955

7 years agogcov: put comment to correct location.
Martin Liska [Tue, 7 Mar 2017 14:13:10 +0000 (15:13 +0100)]
gcov: put comment to correct location.

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

* gcov.c (process_args): Put comment to correct location.

From-SVN: r245952

7 years agoUse array_at_struct_end_p in tree-chkp.c (PR middle-end/68270).
Martin Liska [Tue, 7 Mar 2017 14:12:52 +0000 (15:12 +0100)]
Use array_at_struct_end_p in tree-chkp.c (PR middle-end/68270).

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

PR middle-end/68270
* tree-chkp.c (chkp_may_narrow_to_field): Add new argument ref.
Use array_at_struct_end_p instead of DECL_CHAIN (field).
(chkp_narrow_bounds_for_field): Likewise.
(chkp_parse_array_and_component_ref): Pass one more argument to
call.
2017-03-07  Martin Liska  <mliska@suse.cz>

PR middle-end/68270
* g++.dg/pr68270.C: New test.

From-SVN: r245951

7 years agotree-vect-loop-manip.c (slpeel_add_loop_guard): Preserve preheaders.
Richard Biener [Tue, 7 Mar 2017 13:39:44 +0000 (13:39 +0000)]
tree-vect-loop-manip.c (slpeel_add_loop_guard): Preserve preheaders.

2017-03-07  Richard Biener  <rguenther@suse.de>

* tree-vect-loop-manip.c (slpeel_add_loop_guard): Preserve
preheaders.

From-SVN: r245950

7 years agoi386: Do not align small stack slots to 16 bytes
Segher Boessenkool [Tue, 7 Mar 2017 11:53:32 +0000 (12:53 +0100)]
i386: Do not align small stack slots to 16 bytes

As Shmuel reported in <https://gcc.gnu.org/ml/gcc-help/2017-03/msg00009.html>,
on x86-64 small structures in automatic storage are aligned to 16 bytes.
This seems to be because of a mix-up between bits and bytes in the i386
target code.

* config/i386/i386.c (ix86_local_alignment): Align most aggregates
of 16 bytes and more to 16 bytes, not those of 16 bits and more.

From-SVN: r245949

7 years agoPR c/79855: add full stop to store merging param descriptions
Kyrylo Tkachov [Tue, 7 Mar 2017 09:36:44 +0000 (09:36 +0000)]
PR c/79855: add full stop to store merging param descriptions

PR c/79855
* params.def (PARAM_STORE_MERGING_ALLOW_UNALIGNED): Add full stop
to end of description.
(PARAM_MAX_STORES_TO_MERGE): Likewise.

From-SVN: r245948

7 years agore PR rtl-optimization/79901 (ICE in prepare_cmp_insn, at optabs.c:3904)
Jakub Jelinek [Tue, 7 Mar 2017 08:11:30 +0000 (09:11 +0100)]
re PR rtl-optimization/79901 (ICE in prepare_cmp_insn, at optabs.c:3904)

PR rtl-optimization/79901
* config/i386/sse.md (*avx512bw_<code><mode>3<mask_name>): Renamed to
...
(*avx512f_<code><mode>3<mask_name>): ... this.
(<code><mode>3 with maxmin code iterator): Use VI8_AVX2_AVX512F
iterator instead of VI8_AVX2_AVX512BW.

* gcc.target/i386/pr79901.c: New test.

From-SVN: r245947

7 years agore PR rtl-optimization/79901 (ICE in prepare_cmp_insn, at optabs.c:3904)
Jakub Jelinek [Tue, 7 Mar 2017 08:04:38 +0000 (09:04 +0100)]
re PR rtl-optimization/79901 (ICE in prepare_cmp_insn, at optabs.c:3904)

PR rtl-optimization/79901
* expr.c (expand_expr_real_2): For vector MIN/MAX, if there is no
min/max expander, expand it using expand_vec_cond_expr.

From-SVN: r245946

7 years agore PR sanitizer/79897 (ICE in gimplify_modify_expr, at gimplify.c:5627 on ARM target)
Jakub Jelinek [Tue, 7 Mar 2017 06:11:14 +0000 (07:11 +0100)]
re PR sanitizer/79897 (ICE in gimplify_modify_expr, at gimplify.c:5627 on ARM target)

PR sanitizer/79897
* ubsan.c (ubsan_encode_value): Call mark_addressable on the
temporary.

* c-c++-common/ubsan/pr79897.c: New test.

From-SVN: r245945

7 years agoDaily bump.
GCC Administrator [Tue, 7 Mar 2017 00:16:13 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r245943

7 years agoFix typo.
John David Anglin [Mon, 6 Mar 2017 23:12:14 +0000 (23:12 +0000)]
Fix typo.

From-SVN: r245937

7 years agore PR c++/79821 (SEGV in cc1plus compiling 64-bit stdc++.h.gch/O2g.gch)
Jakub Jelinek [Mon, 6 Mar 2017 22:51:23 +0000 (23:51 +0100)]
re PR c++/79821 (SEGV in cc1plus compiling 64-bit stdc++.h.gch/O2g.gch)

PR c++/79821
* dwarf2out.h (dw_vec_const): Change array type from unsigned char *
to void * for PCH reasons.
* dwarf2out.c (output_loc_operands, output_die): Cast
v.val_vec.array to unsigned char *.

From-SVN: r245932

7 years agoPR target 77850
John David Anglin [Mon, 6 Mar 2017 22:48:53 +0000 (22:48 +0000)]
PR target 77850

PR target 77850
* config/pa/pa-64.h (PAD_VARARGS_DOWN): Don't pad down complex and
vector types.

From-SVN: r245931

7 years agoFix the last ChangeLog entry
Vladimir Makarov [Mon, 6 Mar 2017 20:29:49 +0000 (20:29 +0000)]
Fix the last ChangeLog entry

From-SVN: r245929

7 years agore PR rtl-optimization/79571 (ICE in Max. number of generated reload insns per insn...
Vladimir Makarov [Mon, 6 Mar 2017 20:23:00 +0000 (20:23 +0000)]
re PR rtl-optimization/79571 (ICE in Max. number of generated reload insns per insn is achieved (90))

2017-03-06  Vladimir Makarov  <vmakarov@redhat.com>

PR rtl-optimization/79571
* lra-constraints.c (process_alt_operands): Claculate static
reject and subtract it from overal when there will be only address
reloads.

2017-03-06  Vladimir Makarov  <vmakarov@redhat.com>

PR rtl-optimization/79571
* gcc.target/i386/pr79571.c: New.

From-SVN: r245928

7 years agoPR c++/79796 - ICE with NSDMI and this pointer
Marek Polacek [Mon, 6 Mar 2017 17:38:42 +0000 (17:38 +0000)]
PR c++/79796 - ICE with NSDMI and this pointer

PR c++/79796 - ICE with NSDMI and this pointer
* call.c (build_over_call): Handle NSDMI with a 'this' by calling
replace_placeholders.

* g++.dg/cpp0x/nsdmi13.C: New test.

From-SVN: r245927

7 years agoSet incoming stack boundary to 128 for 64-bit targets
Julia Koval [Mon, 6 Mar 2017 16:08:59 +0000 (17:08 +0100)]
Set incoming stack boundary to 128 for 64-bit targets

For 64-bit targets, the incoming stack of interrupt handler is aligned
to 16 bytes.  Update ix86_minimum_incoming_stack_boundary to set the
incoming stack boundary of interrupt handler to 128 for 64-bit targets.

gcc/

2017-03-06  Julia Koval  <julia.koval@intel.com>

PR target/79793
* config/i386/i386.c (ix86_minimum_incoming_stack_boundary): Set
incoming stack boundary to 128 for 64-bit targets.

gcc/testsuite/

2017-03-06  Julia Koval  <julia.koval@intel.com>

PR target/79793
 * gcc.target/i386/interrupt-12.c: Update scan-assembler-times
 directives.
 * gcc.target/i386/interrupt-13.c: Ditto.
 * gcc.target/i386/interrupt-14.c: Ditto.
 * gcc.target/i386/interrupt-15.c: Ditto.

From-SVN: r245926

7 years agore PR c++/79822 (ICE with void statement expression)
Jakub Jelinek [Mon, 6 Mar 2017 15:43:51 +0000 (16:43 +0100)]
re PR c++/79822 (ICE with void statement expression)

PR c++/79822
* constexpr.c (cxx_eval_statement_list): Treat empty ({ }) like
({ (void) 0; }).

* g++.dg/cpp0x/constexpr-79822.C: New test.

From-SVN: r245925

7 years agoRevert "Allow deduction guides to look into primary template."
Jason Merrill [Mon, 6 Mar 2017 14:44:44 +0000 (09:44 -0500)]
Revert "Allow deduction guides to look into primary template."

* cp-tree.h, parser.c, pt.c, search.c: Revert.

From-SVN: r245924

7 years agore PR tree-optimization/79887 (ICE in set_uid_loop_bbs, at tree-vectorizer.c:482)
Richard Biener [Mon, 6 Mar 2017 13:58:57 +0000 (13:58 +0000)]
re PR tree-optimization/79887 (ICE in set_uid_loop_bbs, at tree-vectorizer.c:482)

2017-03-06  Richard Biener  <rguenther@suse.de>

PR tree-optimization/79894
* tree-vectorizer.c (vectorize_loops): Set loop_vectorized_call
to NULL after folding it.

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

From-SVN: r245923

7 years agore PR tree-optimization/79824 (Failure to peel for gaps leads to read beyond mapped...
Richard Biener [Mon, 6 Mar 2017 13:58:01 +0000 (13:58 +0000)]
re PR tree-optimization/79824 (Failure to peel for gaps leads to read beyond mapped memory)

2017-03-06  Richard Biener  <rguenther@suse.de>

PR tree-optimization/79824
* tree-vect-stmts.c (get_group_load_store_type): Fix alignment
check disabling peeling for gaps.

* gcc.dg/vect/pr79824-1.c: New testcase.
* gcc.dg/vect/pr79824-2.c: Likewise.

From-SVN: r245922

7 years agoAdd check_effective_target_gettimeofday and use it in gcc.dg/lto/pr60449_0.c.
Toma Tabacu [Mon, 6 Mar 2017 13:15:30 +0000 (13:15 +0000)]
Add check_effective_target_gettimeofday and use it in gcc.dg/lto/pr60449_0.c.

gcc/
* doc/sourcebuild.texi (Effective-Target Keywords, Environment
attributes): Document gettimeofday.

gcc/testsuite/

* gcc.dg/lto/pr60449_0.c: Add dg-require-effective-target for
gettimeofday.  Remove dg-skip-if for AVR.
* lib/target-supports.exp (check_effective_target_gettimeofday):
New proc.

From-SVN: r245921

7 years agore PR fortran/79894 (ICE in gfc_add_modify_loc, at fortran/trans.c:159)
Richard Biener [Mon, 6 Mar 2017 12:48:54 +0000 (12:48 +0000)]
re PR fortran/79894 (ICE in gfc_add_modify_loc, at fortran/trans.c:159)

2017-03-06  Richard Biener  <rguenther@suse.de>

PR fortran/79894
* trans.c (gfc_add_modify_loc): Weaken assert.

From-SVN: r245919

7 years agoS/390: Disable vectorization for loops with few iterations
Robin Dapp [Mon, 6 Mar 2017 12:43:33 +0000 (12:43 +0000)]
S/390: Disable vectorization for loops with few iterations

The following patch defines the PARAM_MIN_VECT_LOOP_BOUND parameter in
the s390 backend.  It helps with the vectorization epilogue problem
described here [1].
I see an overall performance increase of > 1% in SPECfp2006, yet some
cases like cactusADM regress.  This seems to be caused by the vectorizer
creating an epilogue guard for one more iteration than before, which, in
turn, causes e.g. predcom to run on the epilogue that it used to ignore
before ("Loop iterates only 1 time, nothing to do.").  Subsequent,
minor, effects cause an eventual slowdown.

Until the reason for the bad epilogue code is understood, this patch
mitigates the problem.  When investigating the issue, I stumbled across
an attempt to vectorize the epilogue itself as well as combine it with
the vectorized loop in addition to vector masking [2].  A similar
approach might also help here.  My original observation of high register
pressure within the epilogue still stands.  In this specific case, it
would most likely suffice to save all registers once, run the epilogue
and restore the registers.  I'm pretty sure this would be faster than
the "spill fest" that's currently happening.

Regards
 Robin

[1] https://gcc.gnu.org/ml/gcc/2017-01/msg00234.html
[2] https://gcc.gnu.org/ml/gcc-patches/2016-05/msg01562.html

gcc/ChangeLog:

2017-03-06  Robin Dapp  <rdapp@linux.vnet.ibm.com>

* config/s390/s390.c (s390_option_override_internal): Set
PARAM_MIN_VECT_LOOP_BOUND

From-SVN: r245918

7 years agoS/390: Change 2-byte NOPs
Robin Dapp [Mon, 6 Mar 2017 12:40:19 +0000 (12:40 +0000)]
S/390: Change 2-byte NOPs

The following patch changes "nopr %r7" to "nopr %r0" which is
advantageous from a hardware perspective. It will only be emitted for
hotpatching and should not impact normal code.

gcc/ChangeLog:

2017-03-06  Robin Dapp  <rdapp@linux.vnet.ibm.com>

* config/s390/s390.c (s390_asm_output_function_label): Use nopr %r0.
* config/s390/s390.md: Likewise.

gcc/testsuite/ChangeLog:

2017-03-06  Robin Dapp  <rdapp@linux.vnet.ibm.com>

* gcc.target/s390/hotpatch-1.c: Check for nopr %r0.
* gcc.target/s390/hotpatch-10.c: Likewise.
* gcc.target/s390/hotpatch-11.c: Likewise.
* gcc.target/s390/hotpatch-12.c: Likewise.
* gcc.target/s390/hotpatch-13.c: Likewise.
* gcc.target/s390/hotpatch-14.c: Likewise.
* gcc.target/s390/hotpatch-15.c: Likewise.
* gcc.target/s390/hotpatch-16.c: Likewise.
* gcc.target/s390/hotpatch-17.c: Likewise.
* gcc.target/s390/hotpatch-18.c: Likewise.
* gcc.target/s390/hotpatch-19.c: Likewise.
* gcc.target/s390/hotpatch-2.c: Likewise.
* gcc.target/s390/hotpatch-26.c: Likewise.
* gcc.target/s390/hotpatch-27.c: Likewise.
* gcc.target/s390/hotpatch-28.c: Likewise.
* gcc.target/s390/hotpatch-3.c: Likewise.
* gcc.target/s390/hotpatch-4.c: Likewise.
* gcc.target/s390/hotpatch-5.c: Likewise.
* gcc.target/s390/hotpatch-6.c: Likewise.
* gcc.target/s390/hotpatch-7.c: Likewise.
* gcc.target/s390/hotpatch-8.c: Likewise.
* gcc.target/s390/hotpatch-9.c: Likewise.

From-SVN: r245917

7 years agore PR c++/64574 (ICE (stack overflow SEGV) with bad template specialization)
Paolo Carlini [Mon, 6 Mar 2017 11:54:37 +0000 (11:54 +0000)]
re PR c++/64574 (ICE (stack overflow SEGV) with bad template specialization)

2017-03-06  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/64574
* g++.dg/template/crash125.C: New.

From-SVN: r245916

7 years agore PR target/79812 (ICE in simplify_binary_operation_1, at simplify-rtx.c:3586)
Jakub Jelinek [Mon, 6 Mar 2017 11:35:58 +0000 (12:35 +0100)]
re PR target/79812 (ICE in simplify_binary_operation_1, at simplify-rtx.c:3586)

PR target/79812
* config/i386/sse.md (VI8F_256_512): Remove mode iterator.
(<avx2_avx512>_perm<mode>): Rename to ...
(avx2_perm<mode>): ... this.  Use VI8F_256 iterator instead
of VI8F_256_512.
(<avx512>_perm<mode>_mask): Rename to ...
(avx512vl_perm<mode>_mask): ... this.  Use VI8F_256 iterator instead
of VI8F_256_512.
(<avx2_avx512>_perm<mode>_1<mask_name>): Rename to ...
(avx2_perm<mode>_1<mask_name): ... this.  Use VI8F_256 iterator
instead of VI8F_256_512.
(avx512f_perm<mode>): New define_expand.
(avx512f_perm<mode>_mask): Likewise.
(avx512f_perm<mode>_1<mask_name>): New define_insn.
(<avx512>_vec_dup<mode>_1): Fix up vec_select mode.

* gcc.target/i386/avx512f-vpermq-imm-3.c: New test.

From-SVN: r245915

7 years agoMIPS: Force o32 ABI for inline-memcpy-3.c.
Toma Tabacu [Mon, 6 Mar 2017 11:27:07 +0000 (11:27 +0000)]
MIPS: Force o32 ABI for inline-memcpy-3.c.

gcc/testsuite/

* gcc.target/mips/inline-memcpy-3.c (dg-options): Add -mabi=32.

From-SVN: r245914

7 years agomips-msa.md (msa_fmax_a_<msafmt>, [...]): Introduce mode interator for if_then_else.
Prachi Godbole [Mon, 6 Mar 2017 10:32:47 +0000 (10:32 +0000)]
mips-msa.md (msa_fmax_a_<msafmt>, [...]): Introduce mode interator for if_then_else.

gcc/
* config/mips/mips-msa.md (msa_fmax_a_<msafmt>, msa_fmin_a_<msafmt>,
msa_max_a_<msafmt>, msa_min_a_<msafmt>): Introduce mode interator for
if_then_else.
(smin<mode>3, smax<mode>3): Change operand print code from 'B' to 'E'.

gcc/testsuite/
* gcc.target/mips/msa-minmax.c: New tests.

From-SVN: r245913

7 years agoFix ICE in use-after-scope w/ -fno-tree-dce (PR sanitize/79783).
Martin Liska [Mon, 6 Mar 2017 10:20:33 +0000 (11:20 +0100)]
Fix ICE in use-after-scope w/ -fno-tree-dce (PR sanitize/79783).

2017-03-06  Martin Liska  <mliska@suse.cz>

PR sanitize/79783
* asan.c (asan_expand_poison_ifn): Do not expand ASAN_POISON
when having a SSA NAME w/o VAR_DECL assigned to it.
2017-03-06  Martin Liska  <mliska@suse.cz>

PR sanitize/79783
* g++.dg/asan/pr79783.C: New test.

From-SVN: r245912

7 years agomips-msa.md (msa_dotp_<su>_d, [...]): Fix MODE for vec_select.
Prachi Godbole [Mon, 6 Mar 2017 10:19:52 +0000 (10:19 +0000)]
mips-msa.md (msa_dotp_<su>_d, [...]): Fix MODE for vec_select.

gcc/
* config/mips/mips-msa.md (msa_dotp_<su>_d, msa_dpadd_<su>_d,
msa_dpsub_<su>_d): Fix MODE for vec_select.

gcc/testsuite/
* gcc.target/mips/msa-dotp.c: New tests.

From-SVN: r245911

7 years agomips.c (mips_gen_const_int_vector): Change type of last argument.
Prachi Godbole [Mon, 6 Mar 2017 10:08:51 +0000 (10:08 +0000)]
mips.c (mips_gen_const_int_vector): Change type of last argument.

gcc/
* config/mips/mips.c (mips_gen_const_int_vector): Change type of last
argument.
* config/mips/mips-protos.h (mips_gen_const_int_vector): Likewise.

gcc/testsuite/
* gcc.target/mips/msa-bclri.c: New test.

From-SVN: r245910

7 years agolto-streamer.c (lto_check_version): Use %qs in diagnostics.
Richard Biener [Mon, 6 Mar 2017 08:54:57 +0000 (08:54 +0000)]
lto-streamer.c (lto_check_version): Use %qs in diagnostics.

2017-03-06  Richard Biener  <rguenther@suse.de>

* lto-streamer.c (lto_check_version): Use %qs in diagnostics.
* plugin.c (register_plugin_info): Likewise.
* tree-chkp.c (chkp_make_static_const_bounds): Likewise.

From-SVN: r245909

7 years ago* de.po, fr.po: Update.
Joseph Myers [Mon, 6 Mar 2017 04:17:47 +0000 (04:17 +0000)]
* de.po, fr.po: Update.

From-SVN: r245908

7 years agoDaily bump.
GCC Administrator [Mon, 6 Mar 2017 00:16:20 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r245907

7 years agosse.md (sse_storehps, [...]): Require in condition that at least one operand is not...
Jakub Jelinek [Sun, 5 Mar 2017 21:41:10 +0000 (22:41 +0100)]
sse.md (sse_storehps, [...]): Require in condition that at least one operand is not a MEM.

* config/i386/sse.md (sse_storehps, sse_storelps,
avx_<castmode><avxsizesuffix>_<castmode>,
avx512f_<castmode><avxsizesuffix>_<castmode>,
avx512f_<castmode><avxsizesuffix>_256<castmode>): Require
in condition that at least one operand is not a MEM.

From-SVN: r245904

7 years agoAdd std::scoped_lock for C++17
Jonathan Wakely [Sun, 5 Mar 2017 18:38:35 +0000 (18:38 +0000)]
Add std::scoped_lock for C++17

* doc/xml/manual/status_cxx2017.xml: Document P0156R2 status.
* doc/html/*: Regenerate.
* include/std/mutex (scoped_lock): Implement new C++17 template.
* testsuite/30_threads/scoped_lock/cons/1.cc: New test.
* testsuite/30_threads/scoped_lock/requirements/
explicit_instantiation.cc: New test.
* testsuite/30_threads/scoped_lock/requirements/typedefs.cc: New test.

From-SVN: r245903

7 years agore PR c++/70266 (ICE on invalid code on x86_64-linux-gnu: unexpected expression ...
Paolo Carlini [Sun, 5 Mar 2017 17:13:16 +0000 (17:13 +0000)]
re PR c++/70266 (ICE on invalid code on x86_64-linux-gnu: unexpected expression ‘foo’ of kind overload)

/cp
2017-03-05  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/70266
* except.c (build_must_not_throw_expr): Perform the implicit
conversions on the condition.

/testsuite
2017-03-05  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/70266
* g++.dg/tm/pr70266.C: New.

From-SVN: r245901

7 years agocheck.c (positive_check): Add new function checking constant for being greater then...
Andre Vehreschild [Sun, 5 Mar 2017 11:35:47 +0000 (12:35 +0100)]
check.c (positive_check): Add new function checking constant for being greater then zero.

gcc/fortran/ChangeLog:

2017-03-05  Andre Vehreschild  <vehre@gcc.gnu.org>
            Alessandro Fanfarillo  <fanfarillo.gcc@gmail.com>

* check.c (positive_check): Add new function checking constant for
being greater then zero.
(gfc_check_image_status): Add checking of image_status arguments.
(gfc_check_failed_or_stopped_images): Same but for failed_- and
stopped_images function.
* dump-parse-tree.c (show_code_node): Added output of FAIL IMAGE.
* gfortran.h (enum gfc_statement): Added FAIL_IMAGE_ST.
(enum gfc_isym_id): Added new intrinsic symbols.
(enum gfc_exec_op): Added EXEC_FAIL_IMAGE.
* gfortran.texi: Added description for the new API functions. Updated
coverage of gfortran of TS18508.
* intrinsic.c (add_functions): Added symbols to resolve new intrinsic
functions.
* intrinsic.h: Added prototypes.
* iresolve.c (gfc_resolve_failed_images): Resolve the failed_images
intrinsic.
(gfc_resolve_image_status): Same for image_status.
(gfc_resolve_stopped_images): Same for stopped_images.
* libgfortran.h: Added prototypes.
* match.c (gfc_match_if): Added matching of FAIL IMAGE statement.
(gfc_match_fail_image): Match a FAIL IMAGE statement.
* match.h: Added prototype.
* parse.c (decode_statement): Added matching for FAIL IMAGE.
(next_statement): Same.
(gfc_ascii_statement): Same.
* resolve.c: Same.
* simplify.c (gfc_simplify_failed_or_stopped_images): For COARRAY=
single a constant result can be returne.d
(gfc_simplify_image_status): For COARRAY=single the result is constant.
* st.c (gfc_free_statement): Added FAIL_IMAGE handling.
* trans-decl.c (gfc_build_builtin_function_decls): Added decls of the
new intrinsics.
* trans-expr.c (gfc_conv_procedure_call): This is first time all
arguments of a function are optional, which is now handled here
correctly.
* trans-intrinsic.c (conv_intrinsic_image_status): Translate
image_status.
(gfc_conv_intrinsic_function): Add support for image_status.
(gfc_is_intrinsic_libcall): Add support for the remaining new
intrinsics.
* trans-stmt.c (gfc_trans_fail_image): Trans a fail image.
* trans-stmt.h: Add the prototype for the above.
* trans.c (trans_code): Dispatch for fail_image.
* trans.h: Add the trees for the new intrinsics.

libgfortran/ChangeLog:

2017-03-05  Andre Vehreschild  <vehre@gcc.gnu.org>
            Alessandro Fanfarillo  <fanfarillo.gcc@gmail.com>

* caf/libcaf.h: Added prototypes and stat codes for failed and stopped
images.
* caf/single.c (void _gfortran_caf_fail_image): Add the routine.
(int _gfortran_caf_image_status): Same.
(_gfortran_caf_failed_images): Same.
(_gfortran_caf_stopped_images): Same.

gcc/testsuite/ChangeLog:

2017-03-05  Andre Vehreschild  <vehre@gcc.gnu.org>
            Alessandro Fanfarillo  <fanfarillo.gcc@gmail.com>

* gfortran.dg/coarray/fail_image_1.f08: New test.
* gfortran.dg/coarray/fail_image_2.f08: New test.
* gfortran.dg/coarray/failed_images_1.f08: New test.
* gfortran.dg/coarray/failed_images_2.f08: New test.
* gfortran.dg/coarray/image_status_1.f08: New test.
* gfortran.dg/coarray/image_status_2.f08: New test.
* gfortran.dg/coarray/stopped_images_1.f08: New test.
* gfortran.dg/coarray/stopped_images_2.f08: New test.
* gfortran.dg/coarray_fail_st.f90: New test.
* gfortran.dg/coarray_failed_images_1.f08: New test.
* gfortran.dg/coarray_image_status_1.f08: New test.
* gfortran.dg/coarray_stopped_images_1.f08: New test.

From-SVN: r245900

7 years agoDaily bump.
GCC Administrator [Sun, 5 Mar 2017 00:16:13 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r245897

7 years agoc.opt (Wnoexcept-type): New.
Jason Merrill [Sat, 4 Mar 2017 19:21:38 +0000 (14:21 -0500)]
c.opt (Wnoexcept-type): New.

* c.opt (Wnoexcept-type): New.

gcc/cp/
* mangle.c (mangle_decl): Check -Wnoexcept-type instead of
-Wc++1z-compat.

From-SVN: r245894

7 years agore PR c/79847 (diagnostics: missing space in "implicit declaration of function")
Marek Polacek [Sat, 4 Mar 2017 11:04:50 +0000 (11:04 +0000)]
re PR c/79847 (diagnostics: missing space in "implicit declaration of function")

PR c/79847
* c-decl.c (implicit_decl_warning): Add missing space.

From-SVN: r245893

7 years agoCore issues 2273 and 2277
Jason Merrill [Sat, 4 Mar 2017 08:12:28 +0000 (03:12 -0500)]
Core issues 2273 and 2277

* call.c (joust): Adjust using-declaration tiebreaker to handle
the intermediate base case.
* method.c (strip_inheriting_ctors): Just return the argument if
!flag_new_inheriting_ctors.

From-SVN: r245892

7 years agore PR fortran/79841 (Inconsistent diagnostics in fortran/openmp.c, function check_sym...
Jerry DeLisle [Sat, 4 Mar 2017 03:13:34 +0000 (03:13 +0000)]
re PR fortran/79841 (Inconsistent diagnostics in fortran/openmp.c, function check_symbol_not_pointer)

2017-03-03  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

PR fortran/79841
* openmp.c (check_symbol_not_pointer): Adjust diagnostic.

From-SVN: r245891

7 years agoDaily bump.
GCC Administrator [Sat, 4 Mar 2017 00:16:21 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r245890

7 years ago* de.po: Update.
Joseph Myers [Fri, 3 Mar 2017 23:48:40 +0000 (23:48 +0000)]
* de.po: Update.

From-SVN: r245887

7 years agore PR c/79758 (ICE: tree check: expected class 'type', have 'exceptional' (error_mark...
Marek Polacek [Fri, 3 Mar 2017 22:19:24 +0000 (22:19 +0000)]
re PR c/79758 (ICE: tree check: expected class 'type', have 'exceptional' (error_mark) in store_parm_decls_oldstyle, at c/c-decl.c:8973)

PR c/79758
* c-decl.c (store_parm_decls_oldstyle): Check if the element of
current_function_prototype_arg_types is error_mark_node.  Fix
formatting.  Use TREE_VALUE instead of TREE_TYPE.

* gcc.dg/noncompile/pr79758.c: New test.

From-SVN: r245886

7 years agore PR c/79837 (incomplete diagnostic in c-parser: expected +, *, -, &, ^, |, &&,...
Jakub Jelinek [Fri, 3 Mar 2017 20:16:58 +0000 (21:16 +0100)]
re PR c/79837 (incomplete diagnostic in c-parser: expected +, *, -, &, ^, |, &&, ||, min or identifier)

PR c/79837
* c-parser.c (c_parser_omp_clause_reduction): Don't mention
%<min%> or %<max%> in the diagnostics, instead mention identifier.
(c_parser_omp_declare_reduction): Don't mention %<min%> in the
diagnostics.

From-SVN: r245885

7 years agore PR c/79836 (typo in c/c-parser.c: pragma omp ordered)
Jakub Jelinek [Fri, 3 Mar 2017 19:56:54 +0000 (20:56 +0100)]
re PR c/79836 (typo in c/c-parser.c: pragma omp ordered)

PR c/79836
* c-parser.c (c_parser_generic_selection): Use %<_Generic%>
instead of %<_Generic>.
(c_parser_omp_ordered): Use %<depend%> instead of %<depend>.
(c_parser_omp_target_exit_data): Use %<release%> instead of
%<release>.

From-SVN: r245883

7 years agore PR middle-end/79805 (ICE (verify_flow_info failed) with -fnon-call-exceptions -O)
Jakub Jelinek [Fri, 3 Mar 2017 19:32:01 +0000 (20:32 +0100)]
re PR middle-end/79805 (ICE (verify_flow_info failed) with -fnon-call-exceptions -O)

PR middle-end/79805
* internal-fn.def (ATOMIC_BIT_TEST_AND_SET, ATOMIC_BIT_TEST_AND_RESET,
ATOMIC_BIT_TEST_AND_COMPLEMENT, ATOMIC_COMPARE_EXCHANGE): Remove
ECF_NOTHROW.
* gimple-fold.c (fold_builtin_atomic_compare_exchange): Set
gimple_call_nothrow_p flag based on whether original builtin can throw.
If it can, emit following stmts on the fallthrough edge.
* tree-ssa-ccp.c (optimize_atomic_bit_test_and): Similarly, except
don't create new bb if inserting just debug stmts on the edge, try to
insert them on the fallthru bb or just reset debug stmts.

* g++.dg/opt/pr79805.C: New test.

From-SVN: r245882

7 years agors6000: Fix for -mwarn-cell-microcode (PR43763)
Segher Boessenkool [Fri, 3 Mar 2017 17:00:50 +0000 (18:00 +0100)]
rs6000: Fix for -mwarn-cell-microcode (PR43763)

If using -mwarn-cell-microcode, rs6000_final_prescan_insn calls
get_insn_template to get the name of the machine instruction.  But,
get_insn_template calls the output template if that is code, and that
then can modify recog_data (it is normal to change the operands, for
example).

This patch saves and restores recog_data around the call to
get_insn_template to fix the problems this causes.

PR target/43763
* config/rs6000/rs6000.c (rs6000_final_prescan_insn): Save and
restore recog_data (including the operand rtxes inside it) around
the call to get_insn_template.

From-SVN: r245880

7 years agoavx512vpopcntdq-check.h: New.
Andrew Senkevich [Fri, 3 Mar 2017 16:55:31 +0000 (16:55 +0000)]
avx512vpopcntdq-check.h: New.

* gcc.target/i386/avx512vpopcntdq-check.h: New.
* gcc.target/i386/avx512vpopcntdq-vpopcntd-1.c: Ditto.
* gcc.target/i386/avx512vpopcntdq-vpopcntq-1.c: Ditto.
* gcc.target/i386/avx512f-helper.h: Add avx512vpopcntdq-check.h.
* gcc.target/i386/i386.exp
(check_effective_target_avx512vpopcntdq): New.

From-SVN: r245879

7 years agoPR tree-optimization/79699 - small memory leak in MPFR
Martin Sebor [Fri, 3 Mar 2017 16:35:00 +0000 (16:35 +0000)]
PR tree-optimization/79699 - small memory leak in MPFR

gcc/ChangeLog:
* context.c (context::~context): Free MPFR caches to avoid
a memory leak on program exit.

From-SVN: r245878

7 years ago[AArch64] Fix bootstrap due to wide_int .elt (0) uninit warning
Kyrylo Tkachov [Fri, 3 Mar 2017 16:32:01 +0000 (16:32 +0000)]
[AArch64] Fix bootstrap due to wide_int .elt (0) uninit warning

    * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
    Use wide_int::ulow () instead of .elt (0).

From-SVN: r245877

7 years agoi386.md (*pushtf): Change *roF constraint to *roC.
Uros Bizjak [Fri, 3 Mar 2017 16:19:34 +0000 (17:19 +0100)]
i386.md (*pushtf): Change *roF constraint to *roC.

* config/i386/i386.md (*pushtf): Change *roF constraint to *roC.
(*pushxf): Limit oF constraint to 32bit targets and add oC
constraint for 64bit targets.
(pushxf splitter): Use PUSH_ROUNDING to calculate stack adjustment.
(*pushdf): Change rmF constraint to rmC.

From-SVN: r245876

7 years ago* gcc_release (snapshot_print): Replace md5 checksum by sha256.
Gerald Pfeifer [Fri, 3 Mar 2017 14:12:04 +0000 (14:12 +0000)]
* gcc_release (snapshot_print): Replace md5 checksum by sha256.

From-SVN: r245875

7 years agoMIPS: Fix register mode checking for n64 in pr68273.c.
Toma Tabacu [Fri, 3 Mar 2017 13:23:53 +0000 (13:23 +0000)]
MIPS: Fix register mode checking for n64 in pr68273.c.

gcc/testsuite/

* gcc.target/mips/pr68273.c (dg-final): Match SImode registers only for
ilp32 targets and match DImode registers for lp64 targets.

From-SVN: r245874

7 years agoRemove unused variable.
Martin Liska [Fri, 3 Mar 2017 12:53:13 +0000 (13:53 +0100)]
Remove unused variable.

2017-03-03  Martin Liska  <mliska@suse.cz>

* tree-ssa-loop-prefetch.c (pass_loop_prefetch::execute):
Remove unused variable.

From-SVN: r245873

7 years agopr71624.C: Disable for x32.
Uros Bizjak [Fri, 3 Mar 2017 12:26:16 +0000 (13:26 +0100)]
pr71624.C: Disable for x32.

* g++.dg/pr71624.C: Disable for x32.
* g++.dg/pr71633.C: Ditto.

From-SVN: r245872

7 years agore PR target/79807 (ICE in extract_insn, at recog.c:2311 (error: unrecognizable insn))
Jakub Jelinek [Fri, 3 Mar 2017 12:24:53 +0000 (13:24 +0100)]
re PR target/79807 (ICE in extract_insn, at recog.c:2311 (error: unrecognizable insn))

PR target/79807
* config/i386/i386.c (ix86_expand_multi_arg_builtin): If target
is a memory operand, increase num_memory.
(ix86_expand_args_builtin): Likewise.

* gcc.target/i386/pr79807.c: New test.

From-SVN: r245871

7 years agoProperly handle __cxa_pure_virtual visibility (PR lto/79760).
Jan Hubicka [Fri, 3 Mar 2017 11:58:03 +0000 (12:58 +0100)]
Properly handle __cxa_pure_virtual visibility (PR lto/79760).

2017-03-03  Jan Hubicka  <jh@suse.cz>

PR lto/79760
* ipa-devirt.c (maybe_record_node): Properly handle
__cxa_pure_virtual visibility.

From-SVN: r245870

7 years agoAdd -Wdisabled-optimization to loop prefetching pass (PR tree-optimization/79803).
Martin Liska [Fri, 3 Mar 2017 11:53:56 +0000 (12:53 +0100)]
Add -Wdisabled-optimization to loop prefetching pass (PR tree-optimization/79803).

2017-03-03  Martin Liska  <mliska@suse.cz>

PR tree-optimization/79803
* tree-ssa-loop-prefetch.c (tree_ssa_prefetch_arrays): Remove
assert.
(pass_loop_prefetch::execute): Disabled optimization if an
assumption about L1 cache size is not met.
2017-03-03  Martin Liska  <mliska@suse.cz>

PR tree-optimization/79803
* gcc.dg/tree-ssa/pr79803.c: New test.

From-SVN: r245869

7 years agoGCSE: Use HOST_WIDE_INT instead of int (PR rtl-optimization/79574).
Martin Liska [Fri, 3 Mar 2017 11:53:14 +0000 (12:53 +0100)]
GCSE: Use HOST_WIDE_INT instead of int (PR rtl-optimization/79574).

2017-03-03  Martin Liska  <mliska@suse.cz>

PR rtl-optimization/79574
* gcse.c (struct gcse_expr): Use HOST_WIDE_INT instead of int.
(hash_scan_set): Likewise.
(dump_hash_table): Likewise.
(hoist_code): Likewise.
2017-03-03  Martin Liska  <mliska@suse.cz>

PR rtl-optimization/79574
* gcc.dg/pr79574-2.c: New test.

From-SVN: r245868

7 years agofixed-value.c (fixed_from_string): Restore use of elt (1) in place of uhigh ().
Richard Biener [Fri, 3 Mar 2017 11:32:38 +0000 (11:32 +0000)]
fixed-value.c (fixed_from_string): Restore use of elt (1) in place of uhigh ().

2017-03-03  Richard Biener  <rguenther@suse.de>

* fixed-value.c (fixed_from_string): Restore use of elt (1)
in place of uhigh ().
(fixed_convert_from_real): Likewise.

From-SVN: r245867

7 years agore PR c++/79825 (Uninitialized uses in aggregate copies of empty structs (missed...
Richard Biener [Fri, 3 Mar 2017 11:30:32 +0000 (11:30 +0000)]
re PR c++/79825 (Uninitialized uses in aggregate copies of empty structs (missed DCE in C++ gimplify))

2017-03-03  Richard Biener  <rguenther@suse.de>

PR c++/79825
* cp-gimplify.c (simple_empty_class_p): Handle EMPTY_CLASS_EXPR.

* g++.dg/warn/Wuninitialized-8.C: New testcase.

From-SVN: r245866

7 years ago* gcc.dg/pr57134.c: Use empty inline asm string literal.
Jakub Jelinek [Fri, 3 Mar 2017 10:41:49 +0000 (11:41 +0100)]
* gcc.dg/pr57134.c: Use empty inline asm string literal.

From-SVN: r245865

7 years agore PR c++/79791 (-Werror=write-strings ignored with -Wpedantic)
Marek Polacek [Fri, 3 Mar 2017 09:58:10 +0000 (09:58 +0000)]
re PR c++/79791 (-Werror=write-strings ignored with -Wpedantic)

PR c++/79791
* typeck.c (string_conv_p): In C++11, always call pedwarn with
OPT_Wwrite_strings.

* g++.dg/warn/Wwrite-strings-1.C: New test.
* g++.dg/warn/Wwrite-strings-2.C: New test.
* g++.dg/warn/Wwrite-strings-3.C: New test.
* g++.dg/warn/Wwrite-strings-4.C: New test.
* g++.dg/warn/Wwrite-strings-5.C: New test.
* g++.dg/warn/Wwrite-strings-6.C: New test.
* g++.dg/warn/Wwrite-strings-7.C: New test.
* g++.dg/warn/Wwrite-strings-8.C: New test.
* g++.dg/warn/Wwrite-strings-9.C: New test.
* g++.dg/warn/Wwrite-strings-10.C: New test.
* g++.dg/warn/Wwrite-strings-11.C: New test.
* g++.dg/warn/Wwrite-strings-12.C: New test.

From-SVN: r245864

7 years agore PR target/79514 (ICE in curr_insn_transform, at lra-constraints.c:3773)
Uros Bizjak [Fri, 3 Mar 2017 09:18:01 +0000 (10:18 +0100)]
re PR target/79514 (ICE in curr_insn_transform, at lra-constraints.c:3773)

PR target/79514
* config/i386/i386.md (*pushxf_rounded): Use Pmode instead of DImode.

From-SVN: r245861

7 years agore PR middle-end/79818 (wrong code with -fwrapv and -Os/-O1/-O2/-O3)
Richard Biener [Fri, 3 Mar 2017 08:08:08 +0000 (08:08 +0000)]
re PR middle-end/79818 (wrong code with -fwrapv and -Os/-O1/-O2/-O3)

2017-03-03  Richard Biener  <rguenther@suse.de>

PR middle-end/79818
* match.pd ( X +- C1 CMP C2 -> X CMP C2 -+ C1): Add missing
TYPE_OVERFLOW_UNDEFINED check.

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

From-SVN: r245860

7 years agoUpdate overload resolution with deduction guides.
Jason Merrill [Fri, 3 Mar 2017 07:31:54 +0000 (02:31 -0500)]
Update overload resolution with deduction guides.

* pt.c (do_class_deduction): Always build the copy guide.
(copy_guide_p, template_guide_p): New.
(build_deduction_guide): Remember the original constructor.
* call.c (joust): Prefer the copy guide and non-template guides.

From-SVN: r245859

7 years agoAllow deduction guides to look into primary template.
Jason Merrill [Fri, 3 Mar 2017 01:26:47 +0000 (20:26 -0500)]
Allow deduction guides to look into primary template.

* cp-tree.h (struct saved_scope): Add deduction_guide_type.
(struct cp_decl_specifier_seq): Add constructor_p.
* parser.c (cp_parser_decl_specifier_seq): Set constructor_p.
(cp_parser_init_declarator): Check it.  Set ctor_dtor_or_conv_p.
Clear deduction_guide_type.  Don't handle deduction guide names.
(cp_parser_declarator): Don't clear ctor_dtor_or_conv_p.
(cp_parser_direct_declarator): Likewise.  Handle deduction guides.
(cp_parser_member_declaration, cp_parser_cache_defarg)
(cp_parser_objc_class_ivars): Set ctor_dtor_or_conv_p.
* pt.c (tsubst_copy, tsubst_copy_and_build): Revert last change.
(build_deduction_guide): Set deduction_guide_type.
(dependent_scope_p): Check deduction_guide_type.
* search.c (lookup_member): Likewise.

From-SVN: r245858

7 years agoDaily bump.
GCC Administrator [Fri, 3 Mar 2017 00:16:21 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r245857

7 years agore PR c++/79782 (ICE: tree check: expected tree_list, have void_type in emit_mem_init...
Jakub Jelinek [Thu, 2 Mar 2017 21:31:40 +0000 (22:31 +0100)]
re PR c++/79782 (ICE: tree check: expected tree_list, have void_type in emit_mem_initializers, at cp/init.c:1225)

PR c++/79782
* init.c (mark_exp_read_r): New function.
(emit_mem_initializers): Use cp_walk_tree with mark_exp_read_r on
whole arguments instead of plain mark_exp_read on TREE_LIST values.

* g++.dg/warn/Wunused-parm-10.C: New test.

From-SVN: r245853

7 years ago* da.po: Update.
Joseph Myers [Thu, 2 Mar 2017 21:06:47 +0000 (21:06 +0000)]
* da.po: Update.

From-SVN: r245852

7 years ago*.c: Test for "{ i?86-*-* x86_64-*-* } && lp64" targets only.
Uros Bizjak [Thu, 2 Mar 2017 19:32:32 +0000 (20:32 +0100)]
*.c: Test for "{ i?86-*-* x86_64-*-* } && lp64" targets only.

* gcc.dg/rtl/x86_64/*.c: Test for
"{ i?86-*-* x86_64-*-* } && lp64" targets only.

From-SVN: r245850

7 years agovector.md (vector_ne_<mode>_p): Correct operand numbers.
Bill Schmidt [Thu, 2 Mar 2017 19:17:04 +0000 (19:17 +0000)]
vector.md (vector_ne_<mode>_p): Correct operand numbers.

2017-03-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

* config/rs6000/vector.md (vector_ne_<mode>_p): Correct operand
numbers.
(vector_ae_<mode>_p): Likewise.
(vector_nez_<mode>_p): Likewise.
(vector_ne_v2di_p): Likewise.
(vector_ae_v2di_p): Likewise.
(vector_ne_<mode>_p): Likewise.
* config/rs6000/vsx.md (vsx_tsqrt<mode>2_fg): Correct operand
numbers.
(vsx_tsqrt<mode>2_fe): Likewise.

From-SVN: r245849

7 years agodebug_mode.xml: Update and simplify note on link- and run-time coexistence.
Gerald Pfeifer [Thu, 2 Mar 2017 19:11:50 +0000 (19:11 +0000)]
debug_mode.xml: Update and simplify note on link- and run-time coexistence.

* doc/xml/manual/debug_mode.xml: Update and simplify note
on link- and run-time coexistence.

Co-Authored-By: François Dumont <frs.dumont@gmail.com>
Co-Authored-By: Jonathan Wakely <jwakely@redhat.com>
From-SVN: r245848

7 years agoRename 17_intro/headers/names.cc test file
Jonathan Wakely [Thu, 2 Mar 2017 18:56:57 +0000 (18:56 +0000)]
Rename 17_intro/headers/names.cc test file

* testsuite/17_intro/headers/names.cc: Rename to ...
* testsuite/17_intro/names.cc: ... here.

From-SVN: r245845

7 years agore PR target/79514 (ICE in curr_insn_transform, at lra-constraints.c:3773)
Uros Bizjak [Thu, 2 Mar 2017 18:47:03 +0000 (19:47 +0100)]
re PR target/79514 (ICE in curr_insn_transform, at lra-constraints.c:3773)

PR target/79514
* config/i386/i386.md (*pushxf_rounded): New insn_and_split pattern.

testsuite/ChangeLog:

PR target/79514
* gcc.target/i386/pr79514.c: New test.

From-SVN: r245844

7 years agore PR rtl-optimization/79780 (ICE in rtl_verify_bb_insns, at cfgrtl.c:2661 (error...
Jakub Jelinek [Thu, 2 Mar 2017 16:02:37 +0000 (17:02 +0100)]
re PR rtl-optimization/79780 (ICE in rtl_verify_bb_insns, at cfgrtl.c:2661 (error: flow control insn inside a basic block))

PR rtl-optimization/79780
* cprop.c (one_cprop_pass): When second and further conditional trap
in a single basic block is turned into an unconditional trap, turn it
into a deleted note to avoid RTL verification failures.

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

From-SVN: r245843

7 years agofold-const.c (const_binop): Use ulow () instead of elt (0).
Richard Biener [Thu, 2 Mar 2017 14:38:47 +0000 (14:38 +0000)]
fold-const.c (const_binop): Use ulow () instead of elt (0).

2017-03-02  Richard Biener  <rguenther@suse.de>

* fold-const.c (const_binop): Use ulow () instead of elt (0).

From-SVN: r245841

7 years agore PR tree-optimization/79345 (passing yet-uninitialized member as argument to base...
Richard Biener [Thu, 2 Mar 2017 13:42:05 +0000 (13:42 +0000)]
re PR tree-optimization/79345 (passing yet-uninitialized member as argument to base class constructor should warn (-Wunitialized))

2017-03-02  Richard Biener  <rguenther@suse.de>

PR tree-optimization/79345
PR c++/42000
* tree-ssa-alias.c (walk_aliased_vdefs_1): Take a limit
param and abort the walk, returning -1 if it is hit.
(walk_aliased_vdefs): Take a limit param and pass it on.
* tree-ssa-alias.h (walk_aliased_vdefs): Add a limit param,
defaulting to 0 and return a signed int.
* tree-ssa-uninit.c (struct check_defs_data): New struct.
(check_defs): New helper.
(warn_uninitialized_vars): Use walk_aliased_vdefs to warn
about uninitialized memory.

* fixed-value.c (fixed_from_string): Use ulow/uhigh to avoid
bogus uninitialized warning.
(fixed_convert_from_real): Likewise.

* g++.dg/warn/Wuninitialized-7.C: New testcase.
* c-c++-common/ubsan/bounds-2.c: Add -Wno-uninitialized.
* gcc.dg/uninit-pr19430-2.c: Add expected warning.

From-SVN: r245840

7 years agomatmul.m4 (matmul_'rtype_code`): Avoid race condition on storing function pointer.
Thomas Koenig [Thu, 2 Mar 2017 12:54:27 +0000 (12:54 +0000)]
matmul.m4 (matmul_'rtype_code`): Avoid race condition on storing function pointer.

2017-03-02  Thomas Koenig  <tkoenig@gcc.gnu.org>
    Jakub Jelinek  <jakub@redhat.com>

* m4/matmul.m4 (matmul_'rtype_code`):  Avoid
race condition on storing function pointer.
        * generated/matmul_c10.c: Regenerated.
        * generated/matmul_c16.c: Regenerated.
        * generated/matmul_c4.c: Regenerated.
        * generated/matmul_c8.c: Regenerated.
        * generated/matmul_i1.c: Regenerated.
        * generated/matmul_i16.c: Regenerated.
        * generated/matmul_i2.c: Regenerated.
        * generated/matmul_i4.c: Regenerated.
        * generated/matmul_i8.c: Regenerated.
        * generated/matmul_r10.c: Regenerated.
        * generated/matmul_r16.c: Regenerated.
        * generated/matmul_r4.c: Regenerated.
        * generated/matmul_r8.c: Regenerated.

Co-Authored-By: Jakub Jelinek <jakub@redhat.com>
From-SVN: r245839

7 years agore PR middle-end/79756 (ICE in execute_todo, at passes.c:2011)
Richard Biener [Thu, 2 Mar 2017 11:44:16 +0000 (11:44 +0000)]
re PR middle-end/79756 (ICE in execute_todo, at passes.c:2011)

2017-03-02  Richard Biener  <rguenther@suse.de>

PR c/79756
* c-common.c (c_common_mark_addressable_vec): Look through
C_MAYBE_CONST_EXPR.

* gcc.dg/vector-1.c: New testcase.

From-SVN: r245838

7 years agore PR tree-optimization/66768 (address space gets lost on literal pointer)
Bin Cheng [Thu, 2 Mar 2017 11:25:11 +0000 (11:25 +0000)]
re PR tree-optimization/66768 (address space gets lost on literal pointer)

PR tree-optimization/66768
* tree-ssa-loop-ivopts.c (find_interesting_uses_address): Skip addr
iv_use if base object can't be determined.

gcc/testsuite
* gcc.target/i386/pr66768.c: New test.

From-SVN: r245837

7 years agore PR libfortran/78379 (Processor-specific versions for matmul)
Thomas Koenig [Thu, 2 Mar 2017 11:04:01 +0000 (11:04 +0000)]
re PR libfortran/78379 (Processor-specific versions for matmul)

2017-03-02  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/78379
* m4/matmul.m4: (matmul_'rtype_code`_avx2): Also generate for
reals.  Add fma to target options.
(matmul_'rtype_code`):  Call AVX2 only if FMA is available.
        * generated/matmul_c10.c: Regenerated.
        * generated/matmul_c16.c: Regenerated.
        * generated/matmul_c4.c: Regenerated.
        * generated/matmul_c8.c: Regenerated.
        * generated/matmul_i1.c: Regenerated.
        * generated/matmul_i16.c: Regenerated.
        * generated/matmul_i2.c: Regenerated.
        * generated/matmul_i4.c: Regenerated.
        * generated/matmul_i8.c: Regenerated.
        * generated/matmul_r10.c: Regenerated.
        * generated/matmul_r16.c: Regenerated.
        * generated/matmul_r4.c: Regenerated.
        * generated/matmul_r8.c: Regenerated.

From-SVN: r245836

7 years agogthr-win32.h: Define NOGDI before windows.h include to prevent w32api CC_NONE macro...
Jonathan Yong [Thu, 2 Mar 2017 11:03:23 +0000 (11:03 +0000)]
gthr-win32.h: Define NOGDI before windows.h include to prevent w32api CC_NONE macro clash...

        * config/i386/gthr-win32.h: Define NOGDI before
        windows.h include to prevent w32api CC_NONE macro
        clash with libgfortran.

From-SVN: r245835

7 years agounwind-seh.c: Suppress warnings for RtlUnwindEx calls.
Jonathan Yong [Thu, 2 Mar 2017 11:00:28 +0000 (11:00 +0000)]
unwind-seh.c: Suppress warnings for RtlUnwindEx calls.

* unwind-seh.c: Suppress warnings for RtlUnwindEx calls.

From-SVN: r245834

7 years agore PR tree-optimization/79345 (passing yet-uninitialized member as argument to base...
Jakub Jelinek [Thu, 2 Mar 2017 09:19:28 +0000 (10:19 +0100)]
re PR tree-optimization/79345 (passing yet-uninitialized member as argument to base class constructor should warn (-Wunitialized))

PR tree-optimization/79345
* gensupport.h (struct pattern_stats): Add min_scratch_opno field.
* gensupport.c (get_pattern_stats_1) <case MATCH_SCRATCH>: Update it.
(get_pattern_stats): Initialize it.
* genemit.c (gen_expand): Verify match_scratch numbers come after
match_operand/match_dup numbers.
* config/i386/i386.md (<s>mul<mode>3_highpart): Swap match_dup and
match_scratch numbers.
* config/i386/sse.md (avx2_gathersi<mode>, avx2_gatherdi<mode>):
Likewise.
* config/s390/s390.md (trunctdsd2): Likewise.

From-SVN: r245833

7 years agodfinit.c: Only run for lp64.
Richard Biener [Thu, 2 Mar 2017 08:20:19 +0000 (08:20 +0000)]
dfinit.c: Only run for lp64.

2017-03-02  Richard Biener  <rguenther@suse.de>

* gcc.dg/rtl/x86_64/dfinit.c: Only run for lp64.
* gcc.dg/rtl/x86_64/final.c: Likewise.
* gcc.dg/rtl/x86_64/into-cfglayout.c: Likewise.
* gcc.dg/rtl/x86_64/ira.c: Likewise.
* gcc.dg/rtl/x86_64/times-two.c.after-expand.c: Likewise.
* gcc.dg/rtl/x86_64/vregs.c: Likewise.

From-SVN: r245832

7 years agowide-int.h (wide_int_storage::operator=): Implement in terms of wi::copy.
Richard Biener [Thu, 2 Mar 2017 08:02:41 +0000 (08:02 +0000)]
wide-int.h (wide_int_storage::operator=): Implement in terms of wi::copy.

2017-03-02  Richard Biener  <rguenther@suse.de>

* wide-int.h (wide_int_storage::operator=): Implement in terms
of wi::copy.

From-SVN: r245831

7 years agore PR tree-optimization/79777 (ICE on -Os and above in on aarch64-linux-gnu (internal...
Richard Biener [Thu, 2 Mar 2017 07:53:42 +0000 (07:53 +0000)]
re PR tree-optimization/79777 (ICE on -Os and above in on aarch64-linux-gnu (internal compiler error: in VN_INFO_GET, at tree-ssa-sccvn.c:407 }))

2017-03-02  Richard Biener  <rguenther@suse.de>

PR tree-optimization/79777
* tree-ssa-pre.c (eliminate_insert): Give up if we simplify
the to insert expression to sth existing.

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

From-SVN: r245830

7 years agoPR libstdc++/79789 fix non-reserved names in headers
Jonathan Wakely [Thu, 2 Mar 2017 03:43:49 +0000 (03:43 +0000)]
PR libstdc++/79789 fix non-reserved names in headers

PR libstdc++/79789
* include/bits/hashtable_policy.h (__clp2): Use reserved names for
parameters and local variables.
* include/bits/ios_base.h (make_error_code, make_error_condition):
Likewise.
* include/bits/list.tcc (list::sort): Likewise.
* include/bits/mask_array.h (mask_array): Likewise.
* include/bits/regex.h (regex_token_iterator): Likewise.
* include/bits/slice_array.h (slice_array): Likewise.
* include/bits/stl_algo.h (__sample): Likewise.
* include/std/memory (undeclare_no_pointers): Likewise.
* include/std/type_traits (is_callable_v, is_nothrow_callable_v):
Likewise.
* libsupc++/exception_ptr.h (__dest_thunk): Likewise.
* testsuite/17_intro/headers/names.cc: New test.

From-SVN: r245828

7 years agoPR 79798 Fix incorrect use of std::result_of in std::bind
Jonathan Wakely [Thu, 2 Mar 2017 03:43:36 +0000 (03:43 +0000)]
PR 79798 Fix incorrect use of std::result_of in std::bind

PR libstdc++/79798
* include/std/functional (bind::_Res_type_impl): Fix incorrect use of
result_of that loses top-level cv-qualifiers.
* testsuite/20_util/bind/79798.cc: New test.

From-SVN: r245827

7 years agoClass template argument deduction in new-expression
Jason Merrill [Thu, 2 Mar 2017 01:58:30 +0000 (20:58 -0500)]
Class template argument deduction in new-expression

Class template argument deduction in new-expression
* init.c (build_new): Handle deduction from no initializer.
* parser.c (cp_parser_new_expression): Don't require a single
expression for class template deduction.
* typeck2.c (cxx_incomplete_type_diagnostic): Fix diagnostic for
class template placeholder.
* pt.c (tsubst_copy) [TEMPLATE_DECL]: Handle dependent context.
(tsubst_copy_and_build) [TEMPLATE_ID_EXPR]: Handle SCOPE_REF.
(redeclare_class_template): Set TEMPLATE_TYPE_PARM_FOR_CLASS.

From-SVN: r245826

7 years agoDaily bump.
GCC Administrator [Thu, 2 Mar 2017 00:16:14 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r245825

7 years agoPR middle-end/79692 - [7 Regression] -Wformat-overflow false positive
Martin Sebor [Wed, 1 Mar 2017 23:39:59 +0000 (23:39 +0000)]
PR middle-end/79692 - [7 Regression] -Wformat-overflow false positive

gcc/ChangeLog:

PR middle-end/79692
* gimple-ssa-sprintf.c
(directive::known_width_and_precision): New function.
(format_integer): Use it.
(get_mpfr_format_length): Consider the full range of precision
when computing %g output with the # flag.  Set the likely byte
count to 3 rather than 1 when precision is indeterminate.
(format_floating): Correct the lower bound of precision.

gcc/testsuite/ChangeLog:

PR middle-end/79692
* gcc.dg/tree-ssa/builtin-sprintf-2.c: Add test cases.
* gcc.dg/tree-ssa/builtin-sprintf-warn-10.c: Correct %#g.
* gcc.dg/tree-ssa/builtin-sprintf-warn-15.c: New test.
* gcc.dg/tree-ssa/builtin-snprintf-3.c: Ditto.

From-SVN: r245822

7 years agoinvoke.texi: Document default code model for 64-bit Linux.
Bill Schmidt [Wed, 1 Mar 2017 23:14:26 +0000 (23:14 +0000)]
invoke.texi: Document default code model for 64-bit Linux.

2017-03-01  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

* doc/invoke.texi: Document default code model for 64-bit Linux.

From-SVN: r245821

7 years ago* es.po: Update.
Joseph Myers [Wed, 1 Mar 2017 22:08:44 +0000 (22:08 +0000)]
* es.po: Update.

From-SVN: r245820