platform/upstream/gcc.git
7 years agoPR c++/80244 - ICE with attribute in template alias.
Marek Polacek [Tue, 18 Apr 2017 09:34:10 +0000 (09:34 +0000)]
PR c++/80244 - ICE with attribute in template alias.

* tree.c (strip_typedefs): Handle UNDERLYING_TYPE.

* g++.dg/cpp0x/alias-decl-59.C: New test.

From-SVN: r246962

7 years agoValidate that destination gcov file does not exist for gcov-tool (PR gcov-profile...
Martin Liska [Tue, 18 Apr 2017 07:24:20 +0000 (09:24 +0200)]
Validate that destination gcov file does not exist for gcov-tool (PR gcov-profile/78783).

2017-04-18  Martin Liska  <mliska@suse.cz>

PR gcov-profile/78783
* libgcov-driver.c (gcov_get_filename): New function.
2017-04-18  Martin Liska  <mliska@suse.cz>

PR gcov-profile/78783
* gcov-tool.c (gcov_output_files): Validate that destination
file is either removed by the tool or by a user.

From-SVN: r246961

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

From-SVN: r246960

7 years agolibgo: update to Go 1.8.1 release
Ian Lance Taylor [Mon, 17 Apr 2017 22:10:58 +0000 (22:10 +0000)]
libgo: update to Go 1.8.1 release

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

From-SVN: r246957

7 years ago017-04-17 Bernd Edlinger <bernd.edlinger@hotmail.de>
Bernd Edlinger [Mon, 17 Apr 2017 20:41:40 +0000 (20:41 +0000)]
017-04-17  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        PR c++/80287
        * class.c (fixup_may_alias): Fix all type variants.

gcc/testsuite
2017-04-17  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        PR c++/80287
        * g++.dg/lto/pr80287_0.C: New test.

From-SVN: r246955

7 years agoPR c++/80415 - wrong error with default arg and array reference.
Jason Merrill [Mon, 17 Apr 2017 19:39:00 +0000 (15:39 -0400)]
PR c++/80415 - wrong error with default arg and array reference.

* tree.c (lvalue_kind): Return clk_class for an array prvalue.

From-SVN: r246954

7 years ago* pt.c (tsubst_init): Set TARGET_EXPR_DIRECT_INIT_P.
Jason Merrill [Mon, 17 Apr 2017 19:24:31 +0000 (15:24 -0400)]
* pt.c (tsubst_init): Set TARGET_EXPR_DIRECT_INIT_P.

From-SVN: r246953

7 years agore PR fortran/80440 (Slow compile when USEing modules)
Paul Thomas [Mon, 17 Apr 2017 18:22:03 +0000 (18:22 +0000)]
re PR fortran/80440 (Slow compile when USEing modules)

2017-04-17  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/80440
* module.c (find_symtree_for_symbol): Delete.
(read_module): Remove the call to the above.

From-SVN: r246952

7 years agore PR target/80315 (Calling __builtin_crypto_vshasigmaw with argument 3 out of range...
Kelvin Nilsen [Mon, 17 Apr 2017 16:16:43 +0000 (16:16 +0000)]
re PR target/80315 (Calling __builtin_crypto_vshasigmaw with argument 3 out of range creates an unrecognizable insn)

gcc/testsuite/ChangeLog:

2017-04-12  Kelvin Nilsen  <kelvin@gcc.gnu.org>

PR target/80315
* gcc.target/powerpc/pr80315-1.c: New test.
* gcc.target/powerpc/pr80315-2.c: New test.
* gcc.target/powerpc/pr80315-3.c: New test.
* gcc.target/powerpc/pr80315-4.c: New test.

From-SVN: r246949

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

From-SVN: r246948

7 years agoRemove braces around line number in dejagnu directive
Tom de Vries [Sun, 16 Apr 2017 08:17:14 +0000 (08:17 +0000)]
Remove braces around line number in dejagnu directive

2017-04-16  Tom de Vries  <tom@codesourcery.com>

* g++.dg/parse/error11.C: Remove braces around line number in dejagnu
  directive.
* g++.dg/parse/error3.C: Same.
* g++.old-deja/g++.pt/niklas01a.C: Same.
* gcc.dg/990506-0.c: Same.
* gcc.dg/cpp/19990413-1.c: Same.
* gcc.dg/cpp/pragma-1.c: Same.
* gcc.dg/cpp/pragma-2.c: Same.
* gcc.dg/m-un-2.c: Same.
* objc.dg/private-1.m: Same.

From-SVN: r246945

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

From-SVN: r246944

7 years agopr54669.c: Fix dg-do directive.
Uros Bizjak [Sat, 15 Apr 2017 20:07:47 +0000 (22:07 +0200)]
pr54669.c: Fix dg-do directive.

* gcc.dg/pr54669.c: Fix dg-do directive.
* gcc.dg/pr78582.c: Ditto.
* gcc.dg/pr80020.c: Ditto.
* gcc.dg/torture/pr57993-2.cpp: Ditto.
* gcc.dg/tree-ssa/builtin-sprintf-3.c: Ditto.
* gcc.dg/tree-ssa/builtin-sprintf-4.c: Ditto.
* gcc.dg/tree-ssa/builtin-sprintf-5.c: Ditto.
* gcc.dg/tree-ssa/builtin-sprintf-6.c: Ditto.
* gcc.dg/tree-ssa/builtin-sprintf-warn-5.c: Ditto.
* gcc.dg/tree-ssa/pr79327-2.c: Ditto.
* gcc.dg/tree-ssa/pr79352.c: Ditto.
* gcc.dg/tree-ssa/pr79376.c: Ditto.
* gcc.dg/tree-ssa/pr79691.c: Ditto.

From-SVN: r246941

7 years agodeferred_character_3.f90: Fix dg directive.
Dominique d'Humieres [Sat, 15 Apr 2017 18:17:11 +0000 (20:17 +0200)]
deferred_character_3.f90: Fix dg directive.

2017-04-15  Dominique d'Humieres  <dominiq@lps.ens.fr>

* gfortran.dg/deferred_character_3.f90: Fix dg directive.
* gfortran.dg/generic_29.f90: Likewise.
* gfortran.dg/goacc/multi-clause.f90: Likewise.
* gfortran.dg/pr41922.f90: Likewise.
* gfortran.dg/pr70006.f90: Likewise.

From-SVN: r246940

7 years agors6000: Testcase 20050830-1.c no longer fails (PR66612)
Segher Boessenkool [Sat, 15 Apr 2017 04:11:35 +0000 (06:11 +0200)]
rs6000: Testcase 20050830-1.c no longer fails (PR66612)

Bin's commit r246810, for PR80153, fixes 20050830-1.c for -m64 (it
already passed for -m32).  So, this patch removes the remaining xfail.

gcc/testsuite/
PR tree-optimization/66612
* gcc.target/powerpc/20050830-1.c: Remove xfail.

From-SVN: r246939

7 years ago[libcp1] handle anon aggregates linkage-named by typedefs
Alexandre Oliva [Sat, 15 Apr 2017 03:28:31 +0000 (03:28 +0000)]
[libcp1] handle anon aggregates linkage-named by typedefs

Arrange for the first typedef to an anonymous type in the same context
to be used as the linkage name for the type.

for  gcc/cp/ChangeLog

* decl.c (name_unnamed_type): Split out of...
(grokdeclarator): ... this.
* decl.h (name_unnamed_type): Declare.

for  libcc1/ChangeLog

* libcp1plugin.cc (plugin_build_decl): Call name_unnamed_type.

From-SVN: r246938

7 years agoDaily bump.
GCC Administrator [Sat, 15 Apr 2017 00:16:19 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r246937

7 years agore PR fortran/80361 ([OOP] bogus recursive call to nonrecursive procedure with ...
Janus Weil [Fri, 14 Apr 2017 21:17:52 +0000 (23:17 +0200)]
re PR fortran/80361 ([OOP] bogus  recursive call to nonrecursive procedure with -fcheck=recursion)

2017-04-14  Janus Weil  <janus@gcc.gnu.org>

PR fortran/80361
* class.c (generate_finalization_wrapper): Give the finalization wrapper
the recursive attribute.

2017-04-14  Janus Weil  <janus@gcc.gnu.org>

PR fortran/80361
* gfortran.dg/class_62.f90: New test case.

From-SVN: r246934

7 years agoarc: Fix for loop end detection
Andrew Burgess [Fri, 14 Apr 2017 21:14:34 +0000 (22:14 +0100)]
arc: Fix for loop end detection

We use a negative ID number to link together the doloop_begin and
doloop_end instructions.  This negative ID number is setup within
doloop_begin, at this point the ID is stored into the loop end
instruction (doloop_end_i) and placed into the doloop_begin_i
instruction.

In arc.c (arc_reorg) we extract the ID from the doloop_end_i
instruction in order to find the matching doloop_begin_i instruction,
though the ID is only used in some cases.

Currently in arc_reorg when we extract the ID we negate it.  This
negation is invalid.  The ID stored in both doloop_end_i and
doloop_begin_i is already negative, the negation in arc_reorg means
that if we need to use the ID to find the doloop_begin_i then we will
never find it (as the IDs will never match).

This commit removes the unneeded negation, moves the extraction of the
ID into a more appropriately scoped block and adds a new test for this
issue.

gcc/ChangeLog:

* config/arc/arc.c (arc_reorg): Move loop_end_id into a more local
block, and do not negate it, the stored id is already negative.

gcc/testsuite/ChangeLog:

* gcc.target/arc/loop-1.c: New file.

Co-Authored-By: Guy Benyei <guybe@mellanox.com>
From-SVN: r246933

7 years agoarc: Use @pcl assembler syntax instead of invalid expressions
Andrew Burgess [Fri, 14 Apr 2017 21:08:35 +0000 (22:08 +0100)]
arc: Use @pcl assembler syntax instead of invalid expressions

The old ARC assembler would accept expressions like 'LABEL-(.&-4)'
which would calculate the offset from the PCL to LABEL.  The new ARC
assembler does not accept these expressions, instead there's an @pcl
synax, used like LABEL@pcl which gives the offset from PCL to LABEL.

Most of the use of the old expression syntax have been removed,
however, this one got missed.

gcc/ChangeLog:

* config/arc/arc.md (doloop_begin_i): Use @pcl assembler syntax.

From-SVN: r246932

7 years agore PR target/80098 (ICE in curr_insn_transform, at lra-constraints.c:3816 on ppc64le)
Michael Meissner [Fri, 14 Apr 2017 20:27:18 +0000 (20:27 +0000)]
re PR target/80098 (ICE in curr_insn_transform, at lra-constraints.c:3816 on ppc64le)

[gcc]
2017-04-14  Michael Meissner  <meissner@linux.vnet.ibm.com>

PR target/80098
* config/rs6000/rs6000-cpus.def (OTHER_P9_VECTOR_MASKS): Define
masks of options that should be turned off if the VSX vector
options are turned off.
(OTHER_P8_VECTOR_MASKS): Likewise.
(OTHER_VSX_VECTOR_MASKS): Likewise.
* config/rs6000/rs6000.c (rs6000_option_override_internal): Call
rs6000_disable_incompatible_switches to validate no type switches
like -mvsx.
(rs6000_incompatible_switch): New function to disallow turning on
other vector options if -mno-vsx, -mno-power8-vector, or
-mno-power9-vector are specified.

[gcc/testsuite]
2017-04-14  Michael Meissner  <meissner@linux.vnet.ibm.com>

PR target/80098
* gcc.target/powerpc/pr80098-1.c: New test.
* gcc.target/powerpc/pr80098-2.c: Likewise.
* gcc.target/powerpc/pr80098-3.c: Likewise.
* gcc.target/powerpc/pr80098-4.c: Likewise.

From-SVN: r246930

7 years ago[ARC] Use long jumps for CRT calls
Claudiu Zissulescu [Fri, 14 Apr 2017 11:41:04 +0000 (13:41 +0200)]
[ARC] Use long jumps for CRT calls

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

* config/arc/arc.h (CRT_CALL_STATIC_FUNCTION): Use long calls.

From-SVN: r246927

7 years ago[ARC] DWARF emitting cleanup.
Claudiu Zissulescu [Fri, 14 Apr 2017 11:40:54 +0000 (13:40 +0200)]
[ARC] DWARF emitting cleanup.

The use of CFA_FRAME_BASE_OFFSET and ARG_POINTER_CFA_OFFSET macros
leads to wrong offset calculation for DW_OP_fbreg constructions.
Remove them.

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

* config/arc/arc-protos.h (arc_decl_pretend_args): Remove.
* config/arc/arc.c (arc_decl_pretend_args): Likewise.
* config/arc/arc.h (CFA_FRAME_BASE_OFFSET): Likewise.
(ARG_POINTER_CFA_OFFSET): Likewise.

From-SVN: r246926

7 years ago[ARC] Update mode_dependent_address_p hook.
Claudiu Zissulescu [Fri, 14 Apr 2017 11:40:43 +0000 (13:40 +0200)]
[ARC] Update mode_dependent_address_p hook.

Update arc_mode_dependent_address_p to avoid emitting subreg(mem (reg
..)) when expanding by relaxing the conditions.

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

* config/arc/arc.c (arc_mode_dependent_address_p): Relax
conditions to take advantage of various optimizations.

From-SVN: r246925

7 years agomips.mips.md (zero_extendsidi2): Do not allow SP to appear in operands[1] if it is...
Jeff Law [Fri, 14 Apr 2017 05:13:19 +0000 (23:13 -0600)]
mips.mips.md (zero_extendsidi2): Do not allow SP to appear in operands[1] if it is a MEM and TARGET_MIPS16 is active.

* config/mips.mips.md (zero_extendsidi2): Do not allow SP to appear
in operands[1] if it is a MEM and TARGET_MIPS16 is active.
(zero_extendsidi2_dext): Likewise.

From-SVN: r246924

7 years agoDaily bump.
GCC Administrator [Fri, 14 Apr 2017 00:16:18 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r246923

7 years agoplugin-nvptx.c (cuda_lib_inited): Use signed char type instead of char.
Jakub Jelinek [Thu, 13 Apr 2017 19:59:04 +0000 (21:59 +0200)]
plugin-nvptx.c (cuda_lib_inited): Use signed char type instead of char.

* plugin/plugin-nvptx.c (cuda_lib_inited): Use signed char type
instead of char.

From-SVN: r246918

7 years agore PR sanitizer/80403 (UBSAN: compile time crash with "type mismatch in binary expres...
Jakub Jelinek [Thu, 13 Apr 2017 19:52:58 +0000 (21:52 +0200)]
re PR sanitizer/80403 (UBSAN: compile time crash with "type mismatch in binary expression" message in / and % expr)

PR sanitizer/80403
* fold-const.c (fold_ternary_loc): Revert
use op0 instead of fold_convert_loc (loc, type, arg0) part of
2017-04-12 change.

* g++.dg/ubsan/pr80403-2.C: New test.

From-SVN: r246917

7 years agore PR rtl-optimization/80343 (ICE in extract_constrain_insn, at recog.c:2213 (error...
Vladimir Makarov [Thu, 13 Apr 2017 18:08:51 +0000 (18:08 +0000)]
re PR rtl-optimization/80343 (ICE in extract_constrain_insn, at recog.c:2213 (error: insn does not satisfy its constraints))

2017-04-13  Vladimir Makarov  <vmakarov@redhat.com>

PR rtl-optimization/80343
* lra-remat.c (update_scratch_ops): Assign original hard reg to
new scratch pseudo.

2017-04-13  Vladimir Makarov  <vmakarov@redhat.com>

PR rtl-optimization/80343
* gcc.target/powerpc/pr80343.c: New.

From-SVN: r246914

7 years agore PR sanitizer/80414 ([UBSAN] segfault with -fsanitize=undefined)
Denis Khalikov [Thu, 13 Apr 2017 14:52:23 +0000 (14:52 +0000)]
re PR sanitizer/80414 ([UBSAN] segfault with -fsanitize=undefined)

PR sanitizer/80414
* ubsan.c (ubsan_expand_bounds_ifn): Pass original index
to ubsan_encode_value.

* c-c++-common/ubsan/bounds-15.c: New test.

From-SVN: r246909

7 years agoreload1.c (eliminate_regs_1): Call gen_rtx_raw_SUBREG for SUBREGs appearing in DEBUG_...
Jeff Law [Thu, 13 Apr 2017 14:02:33 +0000 (08:02 -0600)]
reload1.c (eliminate_regs_1): Call gen_rtx_raw_SUBREG for SUBREGs appearing in DEBUG_INSNs.

* reload1.c (eliminate_regs_1): Call gen_rtx_raw_SUBREG for SUBREGs
appearing in DEBUG_INSNs.

From-SVN: r246904

7 years agoDo not call memcpy with a NULL argument (PR gcov-profile/80413).
Martin Liska [Thu, 13 Apr 2017 11:51:28 +0000 (13:51 +0200)]
Do not call memcpy with a NULL argument (PR gcov-profile/80413).

2017-04-13  Martin Liska  <mliska@suse.cz>

PR gcov-profile/80413
* gcov-io.c (gcov_write_string): Copy to buffer just when
allocated size is greater than zero.

From-SVN: r246903

7 years agore PR testsuite/80416 (FAIL: g++.dg/torture/pr79671.C -O2 execution test)
Richard Biener [Thu, 13 Apr 2017 11:17:38 +0000 (11:17 +0000)]
re PR testsuite/80416 (FAIL: g++.dg/torture/pr79671.C   -O2  execution test)

2017-04-13  Richard Biener  <rguenther@suse.de>

PR testsuite/80416
* g++.dg/torture/pr79671.C: Fix asm constraints.

From-SVN: r246902

7 years agore PR debug/80321 (infinite recursion with inlining of nested function and debug...
Jakub Jelinek [Thu, 13 Apr 2017 11:05:09 +0000 (13:05 +0200)]
re PR debug/80321 (infinite recursion with inlining of nested function and debug info)

PR debug/80321
* dwarf2out.c (decls_for_scope): Ignore declarations of
current_function_decl in BLOCK_NONLOCALIZED_VARS.

* gcc.dg/debug/pr80321.c: New test.

2017-04-13  Eric Botcazou  <ebotcazou@adacore.com>

* gnat.dg/debug10.adb: New test.
* gnat.dg/debug10_pkg.ads: New helper.

From-SVN: r246900

7 years agore PR c++/69953 (Using lto causes gtkmm/gparted and gtkmm/inkscape compile to fail)
Jan Hubicka [Thu, 13 Apr 2017 08:04:52 +0000 (10:04 +0200)]
re PR c++/69953 (Using lto causes gtkmm/gparted and gtkmm/inkscape compile to fail)

PR lto/69953
* ipa-visibility.c (non_local_p): Fix typos.
(localize_node): When localizing symbol in same comdat group,
dissolve the group only when we know external symbols are going
to be privatized.
(function_and_variable_visibility): Do not localize DECL_EXTERNAL.

From-SVN: r246899

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

From-SVN: r246898

7 years agore PR tree-optimization/79390 (10% performance drop in SciMark2 LU after r242550)
Jakub Jelinek [Wed, 12 Apr 2017 18:09:47 +0000 (20:09 +0200)]
re PR tree-optimization/79390 (10% performance drop in SciMark2 LU after r242550)

PR tree-optimization/79390
* optabs.c (emit_conditional_move): If the preferred op2/op3 operand
order does not result in usable sequence, retry with reversed operand
order.

* gcc.target/i386/pr70465-2.c: Xfail the scan-assembler-not test.

From-SVN: r246882

7 years agore PR sanitizer/80403 (UBSAN: compile time crash with "type mismatch in binary expres...
Jakub Jelinek [Wed, 12 Apr 2017 18:08:29 +0000 (20:08 +0200)]
re PR sanitizer/80403 (UBSAN: compile time crash with "type mismatch in binary expression" message in / and % expr)

PR sanitizer/80403
PR sanitizer/80404
PR sanitizer/80405
* fold-const.c (fold_ternary_loc): Use op1 instead of arg1 as argument
to fold_build2_loc.  Convert TREE_OPERAND (tem, 0) to type.  Use
op0 instead of fold_convert_loc (loc, type, arg0).

* g++.dg/ubsan/pr80403.C: New test.
* g++.dg/ubsan/pr80404.C: New test.
* g++.dg/ubsan/pr80405.C: New test.

From-SVN: r246881

7 years agogenattrtab.c (write_eligible_delay): Verify DELAY_INSN still has a delay slot in...
Jeff Law [Wed, 12 Apr 2017 16:08:18 +0000 (10:08 -0600)]
genattrtab.c (write_eligible_delay): Verify DELAY_INSN still has a delay slot in the generated code.

* genattrtab.c (write_eligible_delay): Verify DELAY_INSN still
has a delay slot in the generated code.

From-SVN: r246879

7 years agocris.md (cris_preferred_reload_class): Return GENNONACR_REGS rather than GENERAL_REGS.
Jeff Law [Wed, 12 Apr 2017 14:58:23 +0000 (08:58 -0600)]
cris.md (cris_preferred_reload_class): Return GENNONACR_REGS rather than GENERAL_REGS.

* config/cris/cris.md (cris_preferred_reload_class): Return
GENNONACR_REGS rather than GENERAL_REGS.

From-SVN: r246877

7 years agore PR middle-end/80163 (ICE on hopefully valid code)
Jakub Jelinek [Wed, 12 Apr 2017 13:57:45 +0000 (15:57 +0200)]
re PR middle-end/80163 (ICE on hopefully valid code)

PR c/80163
* expr.c <CASE_CONVERT>: For EXPAND_INITIALIZER determine SIGN_EXTEND
vs. ZERO_EXTEND based on signedness of treeop0's type rather than
signedness of the result type.

* gcc.dg/torture/pr80163.c: New test.

From-SVN: r246876

7 years agore PR tree-optimization/80359 (DSE causes error: invalid reference prefix)
Richard Biener [Wed, 12 Apr 2017 13:47:26 +0000 (13:47 +0000)]
re PR tree-optimization/80359 (DSE causes error: invalid reference prefix)

2017-04-12  Richard Biener  <rguenther@suse.de>
Jeff Law  <law@redhat.com>

PR tree-optimization/80359
* tree-ssa-dse.c (maybe_trim_partially_dead_store): Do not
trim stores to TARGET_MEM_REFs.

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

Co-Authored-By: Jeff Law <law@redhat.com>
From-SVN: r246875

7 years agore PR tree-optimization/79390 (10% performance drop in SciMark2 LU after r242550)
Richard Biener [Wed, 12 Apr 2017 09:41:02 +0000 (09:41 +0000)]
re PR tree-optimization/79390 (10% performance drop in SciMark2 LU after r242550)

2017-04-12  Richard Biener  <rguenther@suse.de>

PR tree-optimization/79390
* gimple-ssa-split-paths.c (is_feasible_trace): Restrict
threading case even more.

From-SVN: r246869

7 years agors6000: Enforce quad_address_p in TImode atomic_load/store (PR80382)
Segher Boessenkool [Wed, 12 Apr 2017 08:32:56 +0000 (10:32 +0200)]
rs6000: Enforce quad_address_p in TImode atomic_load/store (PR80382)

Whatever expand expands to should be valid instructions.  The defined
instructions here have a quad_memory_operand predicate, which boils
down to quad_address_p on the address, so let's test for that instead
of only disallowing indexed addresses.

* config/rs6000/sync.md (atomic_load<mode>, atomic_store<mode): Test
for quad_address_p for TImode, instead of just not indexed_address.

From-SVN: r246868

7 years agors6000: Enforce quad_address_p in TImode atomic_load/store (PR80382)
Segher Boessenkool [Wed, 12 Apr 2017 08:31:40 +0000 (10:31 +0200)]
rs6000: Enforce quad_address_p in TImode atomic_load/store (PR80382)

Whatever expand expands to should be valid instructions.  The defined
instructions here have a quad_memory_operand predicate, which boils
down to quad_address_p on the address, so let's test for that instead
of only disallowing indexed addresses.

* config/rs6000/sync.md (atomic_load<mode>, atomic_store<mode): Test
for quad_address_p for TImode, instead of just not indexed_address.

From-SVN: r246867

7 years agore PR target/79671 (mapnik miscompilation on armv7hl since r235622)
Richard Biener [Wed, 12 Apr 2017 07:35:49 +0000 (07:35 +0000)]
re PR target/79671 (mapnik miscompilation on armv7hl since r235622)

2017-04-12  Richard Biener  <rguenther@suse.de>
Bernd Edlinger  <bernd.edlinger@hotmail.de>

PR middle-end/79671
* alias.c (component_uses_parent_alias_set_from): Handle
TYPE_TYPELESS_STORAGE.
(get_alias_set): Likewise.
* tree-core.h (tree_type_common): Add typeless_storage flag.
* tree.h (TYPE_TYPELESS_STORAGE): New macro.
* stor-layout.c (place_union_field): Set TYPE_TYPELESS_STORAGE
for types containing members with TYPE_TYPELESS_STORAGE.
(place_field): Likewise.
(layout_type): Likewise for ARRAY_TYPE.
* lto-streamer-out.c (hash_tree): Hash TYPE_TYPELESS_STORAGE.
* tree-streamer-in.c (unpack_ts_type_common_value_fields): Stream
TYPE_TYPELESS_STORAGE.
* tree-streamer-out.c (pack_ts_type_common_value_fields): Likewise.

lto/
* lto.c (compare_tree_sccs_1): Compare TYPE_TYPELESS_STORAGE.

cp/
* tree.c (build_cplus_array_type): Set TYPE_TYPELESS_STORAGE
for arrays of character or std::byte type.

* g++.dg/torture/pr79671.C: New testcase.
* g++.dg/lto/pr79671_0.C: Likewise.
* g++.dg/lto/pr79671_1.c: Likewise.

Co-Authored-By: Bernd Edlinger <bernd.edlinger@hotmail.de>
From-SVN: r246866

7 years agore PR sanitizer/80349 (UBSAN: compile time crash with "type mismatch in binary expres...
Jakub Jelinek [Wed, 12 Apr 2017 06:12:26 +0000 (08:12 +0200)]
re PR sanitizer/80349 (UBSAN: compile time crash with "type mismatch in binary expression" message)

PR sanitizer/80349
* fold-const.c (fold_binary_loc) <case BIT_IOR_EXPR>: Convert arg0's
first argument to type.

* g++.dg/ubsan/pr80349.C: New test.

From-SVN: r246865

7 years agore PR go/77857 (gccgo: vendoring doesn't work in gcc 6/7)
Ian Lance Taylor [Wed, 12 Apr 2017 04:26:15 +0000 (04:26 +0000)]
re PR go/77857 (gccgo: vendoring doesn't work in gcc 6/7)

PR go/77857
    cmd/go: generate vendor paths for -I arg on compile

    This change generates the vendor path to be used with -I
    on a gccgo compile to find imports from the vendor directories.

    Fixes golang/go#15628

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

From-SVN: r246864

7 years agoDaily bump.
GCC Administrator [Wed, 12 Apr 2017 00:16:20 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r246863

7 years agofaq.xml: Update reference link to C++ ABI for Itanium.
Gerald Pfeifer [Tue, 11 Apr 2017 22:36:40 +0000 (22:36 +0000)]
faq.xml: Update reference link to C++ ABI for Itanium.

* doc/xml/faq.xml: Update reference link to C++ ABI for Itanium.
* doc/xml/manual/abi.xml. Ditto (thrice).

From-SVN: r246860

7 years agore PR target/80376 (Some vec_xxpermdi usage lead to ICE)
Bill Schmidt [Tue, 11 Apr 2017 21:37:16 +0000 (21:37 +0000)]
re PR target/80376 (Some vec_xxpermdi usage lead to ICE)

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

PR target/80376
PR target/80315
* config/rs6000/rs6000.c (rs6000_expand_unop_builtin): Return
CONST0_RTX (mode) rather than const0_rtx where appropriate.
(rs6000_expand_binop_builtin): Likewise.
(rs6000_expand_ternop_builtin): Likewise; also add missing
vsx_xxpermdi_* variants; also fix typo (arg1 => arg2) for
vshasigma built-ins.
* doc/extend.texi: Document that vec_xxpermdi's third argument
must be a constant.

From-SVN: r246859

7 years agoPR c++/80294 - ICE with constexpr and inheritance.
Jason Merrill [Tue, 11 Apr 2017 21:07:32 +0000 (17:07 -0400)]
PR c++/80294 - ICE with constexpr and inheritance.

* constexpr.c (reduced_constant_expression_p):
A null constructor element is non-constant.
(cxx_eval_indirect_ref): Don't VERIFY_CONSTANT before
returning an empty base.

From-SVN: r246858

7 years agore PR c++/80370 (ICE when using structured bindings and nested generic lambdas (tsubs...
Jakub Jelinek [Tue, 11 Apr 2017 20:51:16 +0000 (22:51 +0200)]
re PR c++/80370 (ICE when using structured bindings and nested generic lambdas (tsubst_decomp_names))

PR c++/80370
* decl.c (cp_finish_decomp): If processing_template_decl on
non-dependent decl, only set TREE_TYPE on the v[i] decls, but don't
change their DECL_VALUE_EXPR nor cp_finish_decl them.  Instead make
sure DECL_VALUE_EXPR is the canonical NULL type ARRAY_REF for tsubst
processing.
* pt.c (value_dependent_expression_p) <case VAR_DECL>: For variables
with DECL_VALUE_EXPR, return true if DECL_VALUE_EXPR is type
dependent.

* g++.dg/cpp1z/decomp28.C: New test.

From-SVN: r246857

7 years agoi386.c (dimode_scalar_chain::compute_convert_gain): Use shift_const cost parameter...
Uros Bizjak [Tue, 11 Apr 2017 20:36:58 +0000 (22:36 +0200)]
i386.c (dimode_scalar_chain::compute_convert_gain): Use shift_const cost parameter when calculating gain of STV shifts.

* config/i386/i386.c (dimode_scalar_chain::compute_convert_gain):
Use shift_const cost parameter when calculating gain of STV shifts.

From-SVN: r246856

7 years agore PR rtl-optimization/70478 ([LRA] S/390: Performance regression - superfluous stack...
Vladimir Makarov [Tue, 11 Apr 2017 19:39:59 +0000 (19:39 +0000)]
re PR rtl-optimization/70478 ([LRA] S/390: Performance regression - superfluous stack frame)

2017-04-11  Vladimir Makarov  <vmakarov@redhat.com>

PR rtl-optimization/70478
* lra-constraints.c (process_alt_operands): Check memory for
disfavoring memory insn operand.

From-SVN: r246854

7 years agore PR middle-end/80100 (simplify-rtx.c sanitizer detects undefined behaviour with...
Jakub Jelinek [Tue, 11 Apr 2017 17:21:51 +0000 (19:21 +0200)]
re PR middle-end/80100 (simplify-rtx.c sanitizer detects undefined behaviour with optimization)

PR middle-end/80100
* simplify-rtx.c (simplify_binary_operation_1) <case IOR>: Perform
left shift in unsigned HOST_WIDE_INT type.

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

From-SVN: r246851

7 years agore PR rtl-optimization/80385 (Segfault in commutative_operand_precedence() rtlanal...
Jakub Jelinek [Tue, 11 Apr 2017 17:19:56 +0000 (19:19 +0200)]
re PR rtl-optimization/80385 (Segfault in commutative_operand_precedence() rtlanal.c:3373)

PR rtl-optimization/80385
* simplify-rtx.c (simplify_unary_operation_1): Don't transform
(not (neg X)) into (plus X -1) for complex or non-integral modes.

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

From-SVN: r246850

7 years agore PR libgomp/80394 (Empty OpenMP task is wrongly removed when optimizing)
Jakub Jelinek [Tue, 11 Apr 2017 17:15:47 +0000 (19:15 +0200)]
re PR libgomp/80394 (Empty OpenMP task is wrongly removed when optimizing)

PR libgomp/80394
* omp-low.c (scan_omp_task): Don't optimize away empty tasks
if they have any depend clauses.

* testsuite/libgomp.c/pr80394.c: New test.

From-SVN: r246849

7 years agoAdd function part to a same comdat group (PR ipa/80212).
Martin Liska [Tue, 11 Apr 2017 16:38:19 +0000 (18:38 +0200)]
Add function part to a same comdat group (PR ipa/80212).

2017-04-11  Martin Liska  <mliska@suse.cz>

PR ipa/80212
* cgraph.c (cgraph_node::dump): Dump calls_comdat_local.
* ipa-split.c (split_function): Create a local comdat symbol
if caller is in a comdat group.
2017-04-11  Martin Liska  <mliska@suse.cz>

PR ipa/80212
* g++.dg/ipa/pr80212.C: New test.

From-SVN: r246848

7 years agoDo not create a constprop clone for calls_comdat_local nodes (PR ipa/80212).
Martin Liska [Tue, 11 Apr 2017 16:37:31 +0000 (18:37 +0200)]
Do not create a constprop clone for calls_comdat_local nodes (PR ipa/80212).

2017-04-11  Martin Liska  <mliska@suse.cz>

PR ipa/80212
* ipa-cp.c (determine_versionability): Handle calls_comdat_local
flags.

From-SVN: r246847

7 years agoPR middle-end/80364 - sanitizer detects signed integer overflow in gimple-ssa-sprintf.c
Martin Sebor [Tue, 11 Apr 2017 16:35:34 +0000 (16:35 +0000)]
PR middle-end/80364 - sanitizer detects signed integer overflow in gimple-ssa-sprintf.c

gcc/ChangeLog:
PR middle-end/80364
* gimple-ssa-sprintf.c (get_int_range): Remove second argument and
always use the int type.  Use INTEGRAL_TYPE_P() rather than testing
for INTEGER_TYPE.
(directive::set_width, directive::set_precision, format_character):
Adjust.
(parse_directive): Use INTEGRAL_TYPE_P() rather than testing for
INTEGER_TYPE.

gcc/testsuite/ChangeLog:
PR middle-end/80364
* gcc.dg/tree-ssa/builtin-sprintf-warn-16.c: New test.

From-SVN: r246846

7 years agodownload_prerequisites (md5_check): New function emulates Linux 'md5 --check' on...
Damian Rouson [Tue, 11 Apr 2017 16:34:07 +0000 (16:34 +0000)]
download_prerequisites (md5_check): New function emulates Linux 'md5 --check' on macOS.

2017-04-11  Damian Rouson  <damian@sourceryinstitute.org>

        * download_prerequisites (md5_check): New function emulates Linux
        'md5 --check' on macOS.  Modified script for macOS compatibility.

From-SVN: r246845

7 years ago[arm] PR 80389 - if architecture and cpu mismatch, don't print an architecture name...
Richard Earnshaw [Tue, 11 Apr 2017 14:57:41 +0000 (14:57 +0000)]
[arm] PR 80389 - if architecture and cpu mismatch, don't print an architecture name as a CPU name

In this PR we incorrectly print the architecture name in a .cpu
directive in the assembly file when the -mcpu and -march options
conflict (don't target the same base architecture).  In this case the
.arch overrides the .cpu directive and we should emit a .arch option.

PR target/80389
* config/arm/arm.c (arm_configure_build_target): When -mcpu and -arch conflict,
set target->arch_name instead of target->cpu_name.

From-SVN: r246843

7 years agoclose.c: Fix white space in pointer declarations and comment formats where applicable.
Jerry DeLisle [Tue, 11 Apr 2017 14:51:25 +0000 (14:51 +0000)]
close.c: Fix white space in pointer declarations and comment formats where applicable.

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

* close.c: Fix white space in pointer declarations and comment
formats where applicable.
* fbuf.c: Likewise.
* fbuf.h: Likewise.
* format.c: Likewise.
* inquire.c: Likewise.
* intrinsics.c: Likewise.
* list_read.c: Likewise.
* lock.c: Likewise.
* open.c: Likewise.
* read.c: Likewise.
* transfer.c: Likewise.
* unit.c: Likewise.
* unix.c: Likewise.
* unix.h: Likewise.
* write.c: Likewise.

From-SVN: r246842

7 years agore PR tree-optimization/80374 (ICE in fold_convert_loc, at fold-const.c:2384)
Richard Biener [Tue, 11 Apr 2017 13:44:24 +0000 (13:44 +0000)]
re PR tree-optimization/80374 (ICE in fold_convert_loc, at fold-const.c:2384)

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

PR tree-optimization/80374
* tree-ssa-dom.c (derive_equivalences_from_bit_ior): Use
build_zero_cst, remove fold_convertible_p check again.

From-SVN: r246840

7 years agoDo not instrument register variables in object-size sanitizer (PR sanitizer/70878).
Martin Liska [Tue, 11 Apr 2017 13:08:08 +0000 (15:08 +0200)]
Do not instrument register variables in object-size sanitizer (PR sanitizer/70878).

2017-04-11  Martin Liska  <mliska@suse.cz>

PR sanitizer/70878
* ubsan.c (instrument_object_size): Do not instrument register
variables.
2017-04-11  Martin Liska  <mliska@suse.cz>

PR sanitizer/70878
* gcc.dg/ubsan/pr70878.c: New test.

From-SVN: r246837

7 years agore PR target/80381 (AVX512: -O3, _mm512_srai_epi32, the last argument must be an...
Jakub Jelinek [Tue, 11 Apr 2017 08:54:54 +0000 (10:54 +0200)]
re PR target/80381 (AVX512: -O3, _mm512_srai_epi32, the last argument must be an 8-bit immediate)

PR target/80381
* config/i386/i386-builtin-types.def
(V16HI_FTYPE_V16HI_INT_V16HI_UHI_COUNT,
V16HI_FTYPE_V16HI_V8HI_V16HI_UHI_COUNT,
V16SI_FTYPE_V16SI_INT_V16SI_UHI_COUNT,
V16SI_FTYPE_V16SI_V4SI_V16SI_UHI_COUNT,
V2DI_FTYPE_V2DI_INT_V2DI_UQI_COUNT,
V2DI_FTYPE_V2DI_V2DI_V2DI_UQI_COUNT,
V32HI_FTYPE_V32HI_INT_V32HI_USI_COUNT,
V32HI_FTYPE_V32HI_V8HI_V32HI_USI_COUNT,
V4DI_FTYPE_V4DI_INT_V4DI_UQI_COUNT,
V4DI_FTYPE_V4DI_V2DI_V4DI_UQI_COUNT,
V4SI_FTYPE_V4SI_INT_V4SI_UQI_COUNT,
V4SI_FTYPE_V4SI_V4SI_V4SI_UQI_COUNT,
V8DI_FTYPE_V8DI_INT_V8DI_UQI_COUNT,
V8DI_FTYPE_V8DI_V2DI_V8DI_UQI_COUNT,
V8HI_FTYPE_V8HI_INT_V8HI_UQI_COUNT,
V8HI_FTYPE_V8HI_V8HI_V8HI_UQI_COUNT,
V8SI_FTYPE_V8SI_INT_V8SI_UQI_COUNT,
V8SI_FTYPE_V8SI_V4SI_V8SI_UQI_COUNT): New function type aliases.
* config/i386/i386-builtin.def (__builtin_ia32_pslld512_mask,
__builtin_ia32_pslldi512_mask, __builtin_ia32_psllq512_mask,
__builtin_ia32_psllqi512_mask, __builtin_ia32_psrad512_mask,
__builtin_ia32_psradi512_mask, __builtin_ia32_psraq512_mask,
__builtin_ia32_psraqi512_mask, __builtin_ia32_psrld512_mask,
__builtin_ia32_psrldi512_mask, __builtin_ia32_psrlq512_mask,
__builtin_ia32_psrlqi512_mask, __builtin_ia32_psllwi128_mask,
__builtin_ia32_pslldi128_mask, __builtin_ia32_psllqi128_mask,
__builtin_ia32_psllw128_mask, __builtin_ia32_pslld128_mask,
__builtin_ia32_psllq128_mask, __builtin_ia32_psllwi256_mask,
__builtin_ia32_psllw256_mask, __builtin_ia32_pslldi256_mask,
__builtin_ia32_pslld256_mask, __builtin_ia32_psllqi256_mask,
__builtin_ia32_psllq256_mask, __builtin_ia32_psradi128_mask,
__builtin_ia32_psrad128_mask, __builtin_ia32_psradi256_mask,
__builtin_ia32_psrad256_mask, __builtin_ia32_psraqi128_mask,
__builtin_ia32_psraq128_mask, __builtin_ia32_psraqi256_mask,
__builtin_ia32_psraq256_mask, __builtin_ia32_psrldi128_mask,
__builtin_ia32_psrld128_mask, __builtin_ia32_psrldi256_mask,
__builtin_ia32_psrld256_mask, __builtin_ia32_psrlqi128_mask,
__builtin_ia32_psrlq128_mask, __builtin_ia32_psrlqi256_mask,
__builtin_ia32_psrlq256_mask, __builtin_ia32_psrawi256_mask,
__builtin_ia32_psraw256_mask, __builtin_ia32_psrawi128_mask,
__builtin_ia32_psraw128_mask, __builtin_ia32_psrlwi256_mask,
__builtin_ia32_psrlw256_mask, __builtin_ia32_psrlwi128_mask,
__builtin_ia32_psrlw128_mask, __builtin_ia32_psllwi512_mask,
__builtin_ia32_psllw512_mask, __builtin_ia32_psrawi512_mask,
__builtin_ia32_psraw512_mask, __builtin_ia32_psrlwi512_mask,
__builtin_ia32_psrlw512_mask): Use _COUNT suffixed function type
aliases.
* config/i386/i386.c (ix86_expand_args_builtin): Rename last_arg_count
flag to second_arg_count, handle 4 argument function type _COUNT
aliases, handle second_arg_count on second argument rather than last.

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

From-SVN: r246835

7 years agore PR c++/80363 (#'vec_cond_expr' not supported by dump_expr#<expression error>)
Jakub Jelinek [Tue, 11 Apr 2017 08:51:40 +0000 (10:51 +0200)]
re PR c++/80363 (#'vec_cond_expr' not supported by dump_expr#<expression error>)

PR c++/80363
* error.c (dump_expr): Handle VEC_COND_EXPR like COND_EXPR.

* g++.dg/ext/pr80363.C: New test.

From-SVN: r246834

7 years agoFix pr80374 testcase
Markus Trippelsdorf [Tue, 11 Apr 2017 06:31:58 +0000 (06:31 +0000)]
Fix pr80374 testcase

From-SVN: r246832

7 years agoFix bogus builtin-sprintf-warn-{3,10}.c failures for avr.
Senthil Kumar Selvaraj [Tue, 11 Apr 2017 05:09:41 +0000 (05:09 +0000)]
Fix bogus builtin-sprintf-warn-{3,10}.c failures for avr.

This patch fixes a whole bunch of failures reported for
gcc.dg/tree-ssa/builtin-sprintf-warn-{3,10}.c for the avr target.

builtin-sprintf-warn-10.c fails because the bounds in the warning
messages expect 4 digit wide exponents i.e. __DBL_MAX_EXP__ > 999.
For the avr, floats and doubles are both 32 bits wide, __DBL_MAX_EXP__
== 128, and the max number of exponent digits can only be 3 .
The computed size thus ends up one short of the value the test
expects. The patch makes the test run only for targets with double64plus.

builtin-sprintf-warn-3.c fails because the test appears to assume all
non lp64 targets to be ilp32. For the avr, pointer size and int size
are equal, but both are 16 bits, not 32. The patch fixes this by
explicitly adding avr to the dejagnu selector.

gcc/testsuite

2017-04-06  Senthil Kumar Selvaraj  <senthil_kumar.selvaraj@atmel.com>

* gcc.dg/tree-ssa/builtin-sprintf-warn-10.c: Require double64plus.
* gcc.dg/tree-ssa/builtin-sprintf-warn-3.c (void test_too_large):
Add avr-*-* to non-lp64 selector.

From-SVN: r246831

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

From-SVN: r246830

7 years agoAdjust dg-bogus pattern to match the text of the changed diagnostic.
Martin Sebor [Mon, 10 Apr 2017 23:26:17 +0000 (17:26 -0600)]
Adjust dg-bogus pattern to match the text of the changed diagnostic.

gcc/testsuite:
* gcc.dg/pr40340-3.c: Adjust directive pattern.
* gcc.dg/pr40340-4.c: Same.

From-SVN: r246827

7 years agore PR fortran/69498 (ICE on disjunct cases with displaced or incomplete embedded...
Nicolas Koenig [Mon, 10 Apr 2017 20:58:21 +0000 (22:58 +0200)]
re PR fortran/69498 (ICE on disjunct cases with displaced or incomplete embedded statement)

2017-04-10  Nicolas Koenig  <koenigni@student.ethz.ch>
            Paul Thomas  <pault@gcc.gnu.org>

PR fortran/69498
* module.c (gfc_match_submodule): Add error
if function is called in the wrong state.

2017-04-10  Nicolas Koenig  <koenigni@student.ethz.ch>

PR fortran/69498
* gfortran.dg/submodule_unexp.f90: Modified test
to account for new error.
* gfortran.dg/submodule_twice.f90: New Test

Co-Authored-By: Paul Thomas <pault@gcc.gnu.org>
From-SVN: r246826

7 years agore PR c++/80176 (cannot bind reference to static member function using object access...
Jakub Jelinek [Mon, 10 Apr 2017 20:49:11 +0000 (22:49 +0200)]
re PR c++/80176 (cannot bind reference to static member function using object access expression)

PR c++/80176
* tree.c (lvalue_kind): For COMPONENT_REF with BASELINK second
operand, if it is a static member function, recurse on the
BASELINK.

* g++.dg/init/ref23.C: New test.

From-SVN: r246825

7 years agore PR tree-optimization/80304 (Wrong result with do concurrent)
Thomas Koenig [Mon, 10 Apr 2017 20:40:48 +0000 (20:40 +0000)]
re PR tree-optimization/80304 (Wrong result with do concurrent)

2017-04-10  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR tree-optimization/80304
* gfortran.dg/do_concurrent_4.f90:  New test case.

From-SVN: r246824

7 years agore PR fortran/80046 ([F03] Explicit interface required: pointer argument)
Janus Weil [Mon, 10 Apr 2017 20:28:23 +0000 (22:28 +0200)]
re PR fortran/80046 ([F03] Explicit interface required: pointer argument)

2017-04-10  Janus Weil  <janus@gcc.gnu.org>

PR fortran/80046
* expr.c (gfc_check_pointer_assign): Check if procedure pointer
components in a pointer assignment need an explicit interface.

2017-04-10  Janus Weil  <janus@gcc.gnu.org>

PR fortran/80046
* gfortran.dg/proc_ptr_comp_48.f90: New test case.

From-SVN: r246823

7 years ago* g++.dg/torture/pr79905.C: Add -maltivec option.
David Edelsohn [Mon, 10 Apr 2017 19:50:33 +0000 (19:50 +0000)]
* g++.dg/torture/pr79905.C: Add -maltivec option.

From-SVN: r246820

7 years agore PR tree-optimization/80374 (ICE in fold_convert_loc, at fold-const.c:2384)
Jeff Law [Mon, 10 Apr 2017 19:19:42 +0000 (13:19 -0600)]
re PR tree-optimization/80374 (ICE in fold_convert_loc, at fold-const.c:2384)

PR tree-optimization/80374
* tree-ssa-dom.c (derive_equivalences_from_bit_ior): Do not try to
record anything if we can not convert integer_zero_node to the
desired type.

PR tree-optimization/80374
* g++.dg/pr80374.c: New test.

From-SVN: r246819

7 years agore PR target/80108 (ICE in aggregate_value_p at function.c:2028)
Kelvin Nilsen [Mon, 10 Apr 2017 19:01:37 +0000 (19:01 +0000)]
re PR target/80108 (ICE in aggregate_value_p at function.c:2028)

gcc/ChangeLog:

2017-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>

PR target/80108
* config/rs6000/rs6000.c (rs6000_option_override_internal):
Enhance special handling given to the TARGET_P9_MINMAX option in
relation to certain other options.

gcc/testsuite/ChangeLog:

2017-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>

PR target/80108
* gcc.target/powerpc/ppc-fortran/ppc-fortran.exp: New file.
* gcc.target/powerpc/ppc-fortran/pr80108-1.f90: New test.

From-SVN: r246818

7 years agounroll-7.c: Declare "a" as a pointer to external array.
Uros Bizjak [Mon, 10 Apr 2017 18:58:34 +0000 (20:58 +0200)]
unroll-7.c: Declare "a" as a pointer to external array.

* gcc.dg/unroll-7.c: Declare "a" as a pointer to external array.

From-SVN: r246817

7 years agore PR testsuite/79356 (XPASS in attr-alloc_size-11.c)
Uros Bizjak [Mon, 10 Apr 2017 18:51:42 +0000 (20:51 +0200)]
re PR testsuite/79356 (XPASS in attr-alloc_size-11.c)

PR testsuite/79356
* gcc.dg/attr-alloc_size-11.c: Don't xfail on alpha.

From-SVN: r246816

7 years agore PR testsuite/79867 ([cygwin] LD_LIBRARY_PATH ignored, contaminating (nearly?)...
Daniel Santos [Mon, 10 Apr 2017 17:45:35 +0000 (17:45 +0000)]
re PR testsuite/79867 ([cygwin] LD_LIBRARY_PATH ignored, contaminating (nearly?) all test results)

2017-04-10  Daniel Santos <daniel.santos@pobox.com>

PR testsuite/79867
* lib/target-libpath.exp: Merge in cygwin fix from libffi.

From-SVN: r246813

7 years agore PR sanitizer/80348 (UBSAN: compile time crash in ubsan_instrument_division)
Marek Polacek [Mon, 10 Apr 2017 17:18:15 +0000 (17:18 +0000)]
re PR sanitizer/80348 (UBSAN: compile time crash in ubsan_instrument_division)

PR sanitizer/80348
* typeck.c (cp_build_binary_op): Use NULL_TREE instead of NULL.  Set
ORIG_TYPE earlier and not only when shortening.

* g++.dg/ubsan/div-by-zero-3.C: New test.

From-SVN: r246812

7 years agore PR tree-optimization/80153 (ivopt generate wrong code)
Bin Cheng [Mon, 10 Apr 2017 16:54:14 +0000 (16:54 +0000)]
re PR tree-optimization/80153 (ivopt generate wrong code)

PR tree-optimization/80153
* tree-ssa-loop-ivopts.c (add_iv_candidate_for_use): Check and
remove POINTER_PLUS_EXPR's base part directly, rather than through
aff_tree.

From-SVN: r246811

7 years agore PR tree-optimization/80153 (ivopt generate wrong code)
Bin Cheng [Mon, 10 Apr 2017 16:51:44 +0000 (16:51 +0000)]
re PR tree-optimization/80153 (ivopt generate wrong code)

PR tree-optimization/80153
* tree-affine.c (aff_combination_to_tree): Get base pointer from
the first element of pointer type aff_tree.  Build result expr in
aff_tree's type.
(add_elt_to_tree): Convert to type unconditionally.  Remove other
fold_convert calls.
* tree-ssa-loop-ivopts.c (alloc_iv): Pass in consistent types.
(rewrite_use_nonlinear_expr): Check invariant using iv information.
gcc/testsuite
PR tree-optimization/80153
* gcc.c-torture/execute/pr80153.c: New.

From-SVN: r246810

7 years agotree-ssa-structalias.c (find_func_aliases): Properly handle asm inputs.
Richard Biener [Mon, 10 Apr 2017 15:34:19 +0000 (15:34 +0000)]
tree-ssa-structalias.c (find_func_aliases): Properly handle asm inputs.

2017-04-10  Richard Biener  <rguenther@suse.de>

* tree-ssa-structalias.c (find_func_aliases): Properly handle
asm inputs.

From-SVN: r246809

7 years agore PR rtl-optimization/70478 ([LRA] S/390: Performance regression - superfluous stack...
Vladimir Makarov [Mon, 10 Apr 2017 14:58:33 +0000 (14:58 +0000)]
re PR rtl-optimization/70478 ([LRA] S/390: Performance regression - superfluous stack frame)

2017-04-10  Vladimir Makarov  <vmakarov@redhat.com>

PR rtl-optimization/70478
* lra-constraints.c (curr_small_class_check): New.
(update_and_check_small_class_inputs): New.
(process_alt_operands): Update curr_small_class_check.  Disfavor
alternative insn memory operands.  Check available regs for small
class operands.

From-SVN: r246808

7 years agoUpdate MIPS -mvirt option description
Matthew Fortune [Mon, 10 Apr 2017 13:44:39 +0000 (13:44 +0000)]
Update MIPS -mvirt option description

gcc/
PR target/80057
* config/mips/mips.opt (-mvirt): Update description.
* doc/invoke.texi (-mvirt): Likewise.

From-SVN: r246807

7 years agore PR middle-end/80362 (gcc miscompiles arithmetic with signed char)
Richard Biener [Mon, 10 Apr 2017 13:02:12 +0000 (13:02 +0000)]
re PR middle-end/80362 (gcc miscompiles arithmetic with signed char)

2017-04-10  Richard Biener  <rguenther@suse.de>

PR middle-end/80362
* fold-const.c (fold_binary_loc): Look at unstripped ops when
looking for NEGATE_EXPR in -A / -B to A / B folding.

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

From-SVN: r246805

7 years agoSupport multiple files w/ -i option in gcov (PR gcov-profile/80224).
Martin Liska [Mon, 10 Apr 2017 11:37:14 +0000 (13:37 +0200)]
Support multiple files w/ -i option in gcov (PR gcov-profile/80224).

2017-04-10  Martin Liska  <mliska@suse.cz>

PR gcov-profile/80224
* gcov.c (print_usage): Fix usage string.
(get_gcov_intermediate_filename): Remove.
(output_gcov_file): Use both for normal and intermediate format.
(generate_results): Do not initialize special file for
intermediate format.

From-SVN: r246804

7 years agore PR tree-optimization/80304 (Wrong result with do concurrent)
Richard Biener [Mon, 10 Apr 2017 11:27:05 +0000 (11:27 +0000)]
re PR tree-optimization/80304 (Wrong result with do concurrent)

2017-04-10  Richard Biener  <rguenther@suse.de>

PR tree-optimization/80304
* tree-ssa-loop-im.c (ref_indep_loop_p_1): Also recurse
for safelen.

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

From-SVN: r246803

7 years agore PR target/79905 (ICE in canonical types differ for identical types __vector(4...
Nathan Sidwell [Mon, 10 Apr 2017 11:25:44 +0000 (11:25 +0000)]
re PR target/79905 (ICE in canonical types differ for identical types __vector(4) int and V4i {aka __vector(4) int})

PR target/79905
* config/rs6000/rs6000.c (rs6000_vector_type): New.
(rs6000_init_builtins): Use it.

PR target/79905
* g++.dg/torture/pr79905.C: New.

From-SVN: r246802

7 years ago[ARM] Add source mode to coprocessor pattern SETs
Kyrylo Tkachov [Mon, 10 Apr 2017 11:21:55 +0000 (11:21 +0000)]
[ARM] Add source mode to coprocessor pattern SETs

* config/arm/arm.md (<mrc>): Add mode to SET source.
(<mrrc>): Likewise.

From-SVN: r246801

7 years agore PR tree-optimization/80344 (-Wuninitialized triggering on a ctor on ARM)
Richard Biener [Mon, 10 Apr 2017 08:58:02 +0000 (08:58 +0000)]
re PR tree-optimization/80344 (-Wuninitialized triggering on a ctor on ARM)

2017-04-10  Richard Biener  <rguenther@suse.de>

PR middle-end/80344
* gimplify.c (is_gimple_mem_rhs_or_call): Allow CLOBBERs.

From-SVN: r246800

7 years agoEvaluate a SAVE_EXPR before an UBSAN check (PR sanitizer/80350).
Martin Liska [Mon, 10 Apr 2017 07:29:29 +0000 (09:29 +0200)]
Evaluate a SAVE_EXPR before an UBSAN check (PR sanitizer/80350).

2017-04-10  Martin Liska  <mliska@suse.cz>

PR sanitizer/80350
* c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
doing an UBSAN check.
2017-04-10  Martin Liska  <mliska@suse.cz>

PR sanitizer/80350
* c-c++-common/ubsan/pr80350.c: New test.

From-SVN: r246799

7 years agore PR target/80324 (_mm512_reduce_xxx type instrinsics are missing)
Jakub Jelinek [Mon, 10 Apr 2017 06:53:28 +0000 (08:53 +0200)]
re PR target/80324 (_mm512_reduce_xxx type instrinsics are missing)

PR target/80324
* config/i386/avx512fintrin.h (_mm512_reduce_add_epi32,
_mm512_reduce_mul_epi32, _mm512_reduce_and_epi32,
_mm512_reduce_or_epi32, _mm512_mask_reduce_add_epi32,
_mm512_mask_reduce_mul_epi32, _mm512_mask_reduce_and_epi32,
_mm512_mask_reduce_or_epi32, _mm512_reduce_min_epi32,
_mm512_reduce_max_epi32, _mm512_reduce_min_epu32,
_mm512_reduce_max_epu32, _mm512_mask_reduce_min_epi32,
_mm512_mask_reduce_max_epi32, _mm512_mask_reduce_min_epu32,
_mm512_mask_reduce_max_epu32, _mm512_reduce_add_ps,
_mm512_reduce_mul_ps, _mm512_mask_reduce_add_ps,
_mm512_mask_reduce_mul_ps, _mm512_reduce_min_ps, _mm512_reduce_max_ps,
_mm512_mask_reduce_min_ps, _mm512_mask_reduce_max_ps,
_mm512_reduce_add_epi64, _mm512_reduce_mul_epi64,
_mm512_reduce_and_epi64, _mm512_reduce_or_epi64,
_mm512_mask_reduce_add_epi64, _mm512_mask_reduce_mul_epi64,
_mm512_mask_reduce_and_epi64, _mm512_mask_reduce_or_epi64,
_mm512_reduce_min_epi64, _mm512_reduce_max_epi64,
_mm512_mask_reduce_min_epi64, _mm512_mask_reduce_max_epi64,
_mm512_reduce_min_epu64, _mm512_reduce_max_epu64,
_mm512_mask_reduce_min_epu64, _mm512_mask_reduce_max_epu64,
_mm512_reduce_add_pd, _mm512_reduce_mul_pd, _mm512_mask_reduce_add_pd,
_mm512_mask_reduce_mul_pd, _mm512_reduce_min_pd, _mm512_reduce_max_pd,
_mm512_mask_reduce_min_pd, _mm512_mask_reduce_max_pd): New intrinsics.

* gcc.target/i386/avx512f-reduce-op-1.c: New test.

From-SVN: r246798

7 years agoDaily bump.
GCC Administrator [Mon, 10 Apr 2017 00:16:18 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r246797

7 years agoPR c++/80356 - ICE with reference to function template argument.
Jason Merrill [Sun, 9 Apr 2017 05:38:40 +0000 (01:38 -0400)]
PR c++/80356 - ICE with reference to function template argument.

PR c++/79294
* pt.c (convert_nontype_argument_function): Adjust type even with a
value-dependent argument.

From-SVN: r246794

7 years agoPR c++/80267 - ICE with nested capture of reference
Jason Merrill [Sun, 9 Apr 2017 05:06:08 +0000 (01:06 -0400)]
PR c++/80267 - ICE with nested capture of reference

PR c++/60992
* pt.c (tsubst_copy): Handle lookup finding a capture proxy.

From-SVN: r246793

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

From-SVN: r246792