gcc.git
6 years ago* lto.c (register_resolution): Remove forgotten sanity check.
Jan Hubicka [Wed, 7 Feb 2018 10:20:03 +0000 (11:20 +0100)]
* lto.c (register_resolution): Remove forgotten sanity check.

From-SVN: r257442

6 years agore PR tree-optimization/84204 ([graphite] ICE in set_codegen_error, at graphite-isl...
Richard Biener [Wed, 7 Feb 2018 10:14:25 +0000 (10:14 +0000)]
re PR tree-optimization/84204 ([graphite] ICE in set_codegen_error, at graphite-isl-ast-to-gimple.c:206)

2018-02-07  Richard Biener  <rguenther@suse.de>

PR tree-optimization/84204
* tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
this place.

* gcc.dg/graphite/pr84204.c: New testcase.

PR tree-optimization/84205
* graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
special-case isl_ast_op_zdiv_r.

* gcc.dg/graphite/pr84205.c: New testcase.

PR tree-optimization/84223
* graphite-scop-detection.c (gather_bbs::before_dom_children):
Only add conditions from within the region.
(gather_bbs::after_dom_children): Adjust.

* gfortran.dg/graphite/pr84223.f90: New testcase.

From-SVN: r257441

6 years agore PR target/84209 ([avr] Don't split SP in split2)
Georg-Johann Lay [Wed, 7 Feb 2018 09:59:52 +0000 (09:59 +0000)]
re PR target/84209 ([avr] Don't split SP in split2)

PR target/84209
* config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
* config/avr/avr.md: Only post-reload split REG-REG moves if
either register is REGERAL_REG_P.

From-SVN: r257440

6 years agore PR c++/71662 ([DR 1485] ICE on invalid C++11 code with unqualified name look up...
Paolo Carlini [Wed, 7 Feb 2018 09:35:10 +0000 (09:35 +0000)]
re PR c++/71662 ([DR 1485] ICE on invalid C++11 code with unqualified name look up: in tsubst_copy, at cp/pt.c:14010)

2018-02-07  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/71662
* g++.dg/cpp0x/scoped_enum7.C: New.

From-SVN: r257439

6 years ago[testsuite] Fix gcc.dg/cse_recip.c for AArch64 after r257181.
Christophe Lyon [Wed, 7 Feb 2018 09:12:48 +0000 (09:12 +0000)]
[testsuite] Fix gcc.dg/cse_recip.c for AArch64 after r257181.

2018-02-07  Christophe Lyon <christophe.lyon@linaro.org>

PR tree-optimization/83008
* gcc.dg/cse_recip.c: Add -fno-tree-slp-vectorize.

From-SVN: r257438

6 years agore PR tree-optimization/84235 (Miscompilation of floating point code by dom2)
Jakub Jelinek [Wed, 7 Feb 2018 08:29:58 +0000 (09:29 +0100)]
re PR tree-optimization/84235 (Miscompilation of floating point code by dom2)

PR tree-optimization/84235
* tree-ssa-scopedtables.c
(avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
if the subtraction is performed in floating point type where NaNs are
honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
build 1.  Formatting fix.

* gcc.c-torture/execute/ieee/pr84235.c: New test.

From-SVN: r257437

6 years agocompiler: make single Btype for methods table of identical interface type
Ian Lance Taylor [Wed, 7 Feb 2018 01:52:48 +0000 (01:52 +0000)]
compiler: make single Btype for methods table of identical interface type

    Normally we ensure to build a single Btype for identical types.
    We did not do this for methods table of identical interface
    types, however. If there are two identical interface type I, I2,
    they have the same Btype BI, but different Btypes for their
    methods tables, BM and BM2. From the backend's point of view
    only one of them is linked to BI. This can cause inconsitency
    in the backend's type system, like unresolved placeholder. This
    CL ensures we create a single Btype for methods table of
    identical interface type.

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

From-SVN: r257436

6 years agoDaily bump.
GCC Administrator [Wed, 7 Feb 2018 00:16:28 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r257435

6 years agoDon't pass x86-only options on non-x86 targets in c-c++-common/fcf-protection-[67...
Rainer Orth [Tue, 6 Feb 2018 23:31:09 +0000 (23:31 +0000)]
Don't pass x86-only options on non-x86 targets in c-c++-common/fcf-protection-[67].c (PR testsuite/84243)

PR testsuite/84243
* c-c++-common/fcf-protection-6.c: Only pass -mshstk on x86
targets.
* c-c++-common/fcf-protection-7.c: Likewise for -mibt.

From-SVN: r257432

6 years agore PR target/84146 (ICE with -mcet in dwarf2out_var_location, involving sigsetjmp)
Jakub Jelinek [Tue, 6 Feb 2018 20:32:45 +0000 (21:32 +0100)]
re PR target/84146 (ICE with -mcet in dwarf2out_var_location, involving sigsetjmp)

PR target/84146
* config/i386/i386.c (rest_of_insert_endbranch): Only skip
NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
and skip it regardless of bb boundaries.  Use CALL_P macro,
don't test INSN_P (insn) together with CALL_P or JUMP_P check
unnecessarily, formatting fix.

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

From-SVN: r257431

6 years ago2018-02-06 Michael Collison <michael.collison@arm.com>
Michael Collison [Tue, 6 Feb 2018 20:27:08 +0000 (20:27 +0000)]
2018-02-06  Michael Collison  <michael.collison@arm.com>

* config/arm/thumb2.md:
(*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
(*thumb_mov_notscc): Ditto.
* gcc.target/arm/pr7676.c: New testcase.

From-SVN: r257430

6 years agore PR target/84154 (PowerPC GCC 7 and 8 have regression in converting fp to short...
Michael Meissner [Tue, 6 Feb 2018 20:15:40 +0000 (20:15 +0000)]
re PR target/84154 (PowerPC GCC 7 and 8 have regression in converting fp to short/char and returning it)

2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>

PR target/84154
* config/rs6000/rs6000.md (su code attribute): Use "u" for
unsigned_fix, not "s".

From-SVN: r257429

6 years agoFix HAVE_GAS_CFI_DIRECTIVE for x86_64-pc-solaris2.*
Rainer Orth [Tue, 6 Feb 2018 18:33:19 +0000 (18:33 +0000)]
Fix HAVE_GAS_CFI_DIRECTIVE for x86_64-pc-solaris2.*

* configure.ac (gcc_fn_eh_frame_ro): New function.
(gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
correct .eh_frame permissions.
* configure: Regenerate.

From-SVN: r257424

6 years agoinvoke.texi: Add section for the PowerPC SPE backend.
Andrew Jenner [Tue, 6 Feb 2018 17:37:46 +0000 (17:37 +0000)]
invoke.texi: Add section for the PowerPC SPE backend.

       * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove irrelevant options.

From-SVN: r257422

6 years agore PR tree-optimization/84225 (ICE in operation_no_trapping_overflow, at tree.c:7206)
Aldy Hernandez [Tue, 6 Feb 2018 17:11:01 +0000 (17:11 +0000)]
re PR tree-optimization/84225 (ICE in operation_no_trapping_overflow, at tree.c:7206)

PR tree-optimization/84225
Add test for previous commit for PR84225.

From-SVN: r257420

6 years agors6000.c (rs6000_option_override_internal): Display warning message for -mno-speculat...
Bill Schmidt [Tue, 6 Feb 2018 16:55:01 +0000 (16:55 +0000)]
rs6000.c (rs6000_option_override_internal): Display warning message for -mno-speculate-indirect-jumps.

[gcc]

2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

* config/rs6000/rs6000.c (rs6000_option_override_internal):
Display warning message for -mno-speculate-indirect-jumps.

[gcc/testsuite]

2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

* gcc.target/powerpc/safe-indirect-jump-1.c: Detect deprecation
warning for -mno-speculate-indirect-jumps.
* gcc.target/powerpc/safe-indirect-jump-2.c: Likewise.
* gcc.target/powerpc/safe-indirect-jump-3.c: Likewise.
* gcc.target/powerpc/safe-indirect-jump-4.c: Likewise.
* gcc.target/powerpc/safe-indirect-jump-5.c: Likewise.
* gcc.target/powerpc/safe-indirect-jump-6.c: Likewise.
* gcc.target/powerpc/safe-indirect-jump-7.c: Likewise.

From-SVN: r257419

6 years agopowerpcspe.opt: (msimple-fpu, mfpu) Add Undocumented.
Andrew Jenner [Tue, 6 Feb 2018 16:10:43 +0000 (16:10 +0000)]
powerpcspe.opt: (msimple-fpu, mfpu) Add Undocumented.

       * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
       Undocumented.
       * config/powerpcspe/sysv4.opt (mbit-align): Likewise.

From-SVN: r257417

6 years agore PR tree-optimization/84225 (ICE in operation_no_trapping_overflow, at tree.c:7206)
Aldy Hernandez [Tue, 6 Feb 2018 15:44:51 +0000 (15:44 +0000)]
re PR tree-optimization/84225 (ICE in operation_no_trapping_overflow, at tree.c:7206)

PR tree-optimization/84225
* tree-eh.c (find_trapping_overflow): Only call
operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.

From-SVN: r257416

6 years agocompiler: avoid negative zero in float constants
Ian Lance Taylor [Tue, 6 Feb 2018 15:30:06 +0000 (15:30 +0000)]
compiler: avoid negative zero in float constants

    Check for negative numbers with very small magnitudes that will round
    to negative zero, and force them to positive zero instead.

    This implements the spec clarification in https://golang.org/cl/14727.
    The test is in https://golang.org/cl/91895.

    Fixes golang/go#12621

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

From-SVN: r257415

6 years agoFix checking -mibt and -mshstk options for control flow protection
Igor Tsimbalist [Tue, 6 Feb 2018 15:25:31 +0000 (16:25 +0100)]
Fix checking -mibt and -mshstk options for control flow protection

PR target/84145
* config/i386/i386.c: Reimplement the check of possible options
-mibt/-mshstk conbination. Change error messages.
* doc/invoke.texi: Fix a typo: remove extra '='.
* c-c++-common/fcf-protection-1.c: Change a compared message.
* c-c++-common/fcf-protection-2.c: Likewise.
* c-c++-common/fcf-protection-3.c: Likewise.
* c-c++-common/fcf-protection-5.c: Likewise.
* c-c++-common/fcf-protection-6.c: New test.
* c-c++-common/fcf-protection-7.c: Likewise.

From-SVN: r257414

6 years agoruntime: correct runtime structfield type to match reflect
Ian Lance Taylor [Tue, 6 Feb 2018 15:18:50 +0000 (15:18 +0000)]
runtime: correct runtime structfield type to match reflect

    The offset field in structfield has changed to offsetAnon, and now
    requires a shift to get the actual offset value.

    Fixes golang/go#23391

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

From-SVN: r257413

6 years agore PR lto/81004 (linking failed with -flto and static libboost_program_options)
Jan Hubicka [Tue, 6 Feb 2018 13:27:04 +0000 (14:27 +0100)]
re PR lto/81004 (linking failed with -flto and static libboost_program_options)

PR lto/81004
* lto.c: Include builtins.h
(register_resolution): Merge resolutions in case trees was
merged across units.
(lto_maybe_register_decl): Break out from ...
(lto_read_decls): ... here.
(unify_scc): Also register decls here.
(read_cgraph_and_symbols): Sanity check that all resolutions was
read.

From-SVN: r257412

6 years agore PR tree-optimization/84228 (Bogus -Wstringop-truncation warning with -g)
Marek Polacek [Tue, 6 Feb 2018 13:25:54 +0000 (13:25 +0000)]
re PR tree-optimization/84228 (Bogus -Wstringop-truncation warning with -g)

PR tree-optimization/84228
* tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.

* c-c++-common/Wstringop-truncation-3.c: New test.

From-SVN: r257411

6 years agore PR target/82641 (Unable to enable crc32 for a certain function with target attribu...
Tamar Christina [Tue, 6 Feb 2018 11:20:55 +0000 (11:20 +0000)]
re PR target/82641 (Unable to enable crc32 for a certain function with target attribute on ARM (aarch32))

2018-02-06  Tamar Christina  <tamar.christina@arm.com>

PR target/82641
* config/arm/arm.c (arm_print_asm_arch_directives): Record already
emitted arch directives.
* config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
__ARM_FEATURE_COPROC before changing architectures.

gcc/testsuite
2018-02-06  Tamar Christina  <tamar.christina@arm.com>

PR target/82641
* gcc.target/arm/pragma_arch_switch_2.c: New.

From-SVN: r257410

6 years agoAvoid cc1 SEGV in gcc.dg/rtl/x86_64/final.c (PR target/79975)
Rainer Orth [Tue, 6 Feb 2018 10:28:47 +0000 (10:28 +0000)]
Avoid cc1 SEGV in gcc.dg/rtl/x86_64/final.c (PR target/79975)

PR target/79975
* gcc.dg/rtl/x86_64/final.c: Add -fdwarf2-cfi-asm to dg-options.

From-SVN: r257408

6 years agoi386.c (print_reg): Fix typo.
Richard Biener [Tue, 6 Feb 2018 09:26:48 +0000 (09:26 +0000)]
i386.c (print_reg): Fix typo.

2018-02-06  Richard Biener  <rguenther@suse.de>

* config/i386/i386.c (print_reg): Fix typo.
(ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.

From-SVN: r257407

6 years agogcc-plugin.m4 (GCC_ENABLE_PLUGINS): Remove -q option passed to grep.
Eric Botcazou [Tue, 6 Feb 2018 08:30:53 +0000 (08:30 +0000)]
gcc-plugin.m4 (GCC_ENABLE_PLUGINS): Remove -q option passed to grep.

config/
* gcc-plugin.m4 (GCC_ENABLE_PLUGINS): Remove -q option passed to grep.
gcc/
* configure: Regenerate.

From-SVN: r257406

6 years agoAdd upstream svn rev for PR sanitizer/82825.
Rainer Orth [Tue, 6 Feb 2018 08:16:22 +0000 (08:16 +0000)]
Add upstream svn rev for PR sanitizer/82825.

From-SVN: r257405

6 years agoDaily bump.
GCC Administrator [Tue, 6 Feb 2018 00:16:13 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r257404

6 years ago* sv.po: Update.
Joseph Myers [Mon, 5 Feb 2018 23:47:14 +0000 (23:47 +0000)]
* sv.po: Update.

From-SVN: r257401

6 years agoPR tree-optimization/83369 - Missing diagnostics during inlining
Martin Sebor [Mon, 5 Feb 2018 22:45:04 +0000 (22:45 +0000)]
PR tree-optimization/83369 - Missing diagnostics during inlining

gcc/ChangeLog:

PR tree-optimization/83369
* tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
inlining context.

gcc/testsuite/ChangeLog:

PR tree-optimization/83369
gcc.dg/Wnonnull.c: New test.

From-SVN: r257400

6 years agoMake lto.exp work with Tcl 8.4
Richard Sandiford [Mon, 5 Feb 2018 21:34:46 +0000 (21:34 +0000)]
Make lto.exp work with Tcl 8.4

"dict" was added in Tcl 8.5, but until a couple of weeks ago the
testsuite had worked with 8.4.

This patch uses arrays instead, like we do for the caching in
target-supports.exp.  It is a bit uglier than using dicts was,
but hopefully not too bad...

2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>

gcc/testsuite/
* lib/lto.exp (lto_handle_diagnostics): Remove messages_by_file
argument and use dg-messages-by-file instead.  Expect it to be
an array rather than a dict.
(lto-link-and-maybe-run): Remove messages_by_file argument and
use an upvar for dg-messages-by-file.  Update call to
lto_handle_diagnostics.
(lt-get-options): Treat dg-messages-by-file as an array
rather than a dict.
(lto-get-options-main): Likewise.  Set the entry rather than appending.
(lto-execute): Treat dg-messages-by-file as an array rather than
a dict.  Update call to lto-link-and-maybe-run.

From-SVN: r257397

6 years agocompiler: rollback "avoid negative zero in float constants"
Ian Lance Taylor [Mon, 5 Feb 2018 19:26:29 +0000 (19:26 +0000)]
compiler: rollback "avoid negative zero in float constants"

    It uses functions that are not available in MPFR 2.4.2, which is the
    current version supported by GCC.

    Original change description:

        compiler: avoid negative zero in float constants

        Check for negative numbers with very small magnitudes that will round
        to negative zero, and force them to positive zero instead.

        This implements the spec clarification in https://golang.org/cl/14727.
        The test is in https://golang.org/cl/91895.

        Fixes golang/go#12621

    Updates golang/go#12621

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

From-SVN: r257393

6 years agocompiler: avoid negative zero in float constants
Ian Lance Taylor [Mon, 5 Feb 2018 15:28:59 +0000 (15:28 +0000)]
compiler: avoid negative zero in float constants

    Check for negative numbers with very small magnitudes that will round
    to negative zero, and force them to positive zero instead.

    This implements the spec clarification in https://golang.org/cl/14727.
    The test is in https://golang.org/cl/91895.

    Fixes golang/go#12621

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

From-SVN: r257390

6 years agoclass.c: Remove unused global variables.
Marek Polacek [Mon, 5 Feb 2018 11:47:48 +0000 (11:47 +0000)]
class.c: Remove unused global variables.

* class.c: Remove unused global variables.
        (build_primary_vtable): Don't gather statistics.
(print_class_statistics): Remove.
* cp-tree.h (print_class_statistics): Remove.
* tree.c (cxx_print_statistics): Don't call print_class_statistics.

From-SVN: r257389

6 years agore PR c++/82782 (ICE: nested template alias and specialized template with auto templa...
Paolo Carlini [Mon, 5 Feb 2018 11:15:55 +0000 (11:15 +0000)]
re PR c++/82782 (ICE: nested template alias and specialized template with auto template parameter)

2018-02-05  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/82782
* g++.dg/cpp1z/inline-var4.C: New.

From-SVN: r257388

6 years agoCherry-pick libsanitizer pointer-pair tristate option.
Martin Liska [Mon, 5 Feb 2018 11:01:50 +0000 (12:01 +0100)]
Cherry-pick libsanitizer pointer-pair tristate option.

2018-02-05  Martin Liska  <mliska@suse.cz>

* doc/invoke.texi: Cherry-pick upstream r323995.
2018-02-05  Martin Liska  <mliska@suse.cz>

* c-c++-common/asan/pointer-compare-1.c: Adjust ASAN_OPTIONS
options.
* c-c++-common/asan/pointer-compare-2.c: Likewise.
* c-c++-common/asan/pointer-subtract-1.c: Likewise.
* c-c++-common/asan/pointer-subtract-2.c: Likewise.
* c-c++-common/asan/pointer-subtract-3.c: Likewise.
* c-c++-common/asan/pointer-subtract-4.c: Likewise.
* c-c++-common/asan/pointer-compare-3.c: New test.
2018-02-05  Martin Liska  <mliska@suse.cz>

* asan/asan_flags.inc: Cherry-pick upstream r323995.
* asan/asan_report.cc (CheckForInvalidPointerPair):
Cherry-pick upstream r323995.

From-SVN: r257387

6 years ago[AArch64] Remove SVE XFAILs
Richard Sandiford [Mon, 5 Feb 2018 10:48:49 +0000 (10:48 +0000)]
[AArch64] Remove SVE XFAILs

These tests started passing after r257293, which had the side-effect
of renumbering the SSA names and leaving the COND_EXPRs in their
natural order.

This does show a deeper underlying issue that code generation is too
sensitive to internal things like SSA_NAME versions, but it no longer
affects these particular tests (for now).

2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>

gcc/testsuite/
* gcc.target/aarch64/sve/vcond_4.c: Remove XFAILs.
* gcc.target/aarch64/sve/vcond_5.c: Likewise.

From-SVN: r257386

6 years agoAdjust ira_init_register_move_cost comment
Richard Sandiford [Mon, 5 Feb 2018 10:47:56 +0000 (10:47 +0000)]
Adjust ira_init_register_move_cost comment

2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>

gcc/
* ira.c (ira_init_register_move_cost): Adjust comment.

From-SVN: r257385

6 years agoFix GCOV documentation (PR gcov-profile/84137).
Martin Liska [Mon, 5 Feb 2018 09:59:16 +0000 (10:59 +0100)]
Fix GCOV documentation (PR gcov-profile/84137).

2018-02-05  Martin Liska  <mliska@suse.cz>

PR gcov-profile/84137
* doc/gcov.texi: Fix typo in documentation.

From-SVN: r257384

6 years agoDocument --dynamic-list-data option for --coverage usage.
Martin Liska [Mon, 5 Feb 2018 09:19:18 +0000 (10:19 +0100)]
Document --dynamic-list-data option for --coverage usage.

2018-02-05  Martin Liska  <mliska@suse.cz>

PR gcov-profile/83879
* doc/gcov.texi: Document necessity of --dynamic-list-data when
using dlopen functionality.

From-SVN: r257383

6 years agoAdd missing mask[z]_range[_round]_s[d,s] intrinsics
Olga Makhotina [Mon, 5 Feb 2018 07:08:24 +0000 (07:08 +0000)]
Add missing mask[z]_range[_round]_s[d,s] intrinsics

gcc/
* config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
_mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
_mm_maskz_range_ss, _mm_mask_range_round_ss,
_mm_maskz_range_round_ss): New intrinsics.
(__builtin_ia32_rangesd128_round)
(__builtin_ia32_rangess128_round): Remove.
(__builtin_ia32_rangesd128_mask_round,
__builtin_ia32_rangess128_mask_round): New builtins.
* config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
__builtin_ia32_rangess128_round): Remove.
(__builtin_ia32_rangesd128_mask_round,
__builtin_ia32_rangess128_mask_round): New builtins.
* config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
(ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
"<round_saeonly_constraint>")): Changed to ...
((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
"<round_saeonly_scalar_constraint>")): ... this.
("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
%0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
%1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
%2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
gcc/testsuite
* gcc.target/i386/avx512dq-vrangesd-1.c (_mm_mask_range_sd,
_mm_maskz_range_sd, _mm_mask_range_round_sd,
_mm_maskz_range_round_sd): Test new intrinsics.
* gcc.target/i386/avx512dq-vrangesd-2.c (_mm_range_sd,
_mm_mask_range_sd, _mm_maskz_range_sd, _mm_range_round_sd,
_mm_mask_range_round_sd, _mm_maskz_range_round_sd): Test new intrinsics.
* gcc.target/i386/avx512dq-vrangess-1.c (_mm_mask_range_ss,
_mm_maskz_range_ss, _mm_mask_range_round_ss,
_mm_maskz_range_round_ss): Test new intrinsics.
* gcc.target/i386/avx512dq-vrangess-2.c (_mm_range_ss,
_mm_mask_range_ss, _mm_maskz_range_ss, _mm_range_round_ss,
_mm_mask_range_round_ss, _mm_maskz_range_round_ss): Test new intrinsics.
* gcc.target/i386/avx-1.c (__builtin_ia32_rangesd128_round,
__builtin_ia32_rangess128_round): Remove builtins.
(__builtin_ia32_rangesd128_mask_round,
__builtin_ia32_rangess128_mask_round): Test new builtins.
* gcc.target/i386/sse-13.c: Ditto.
* gcc.target/i386/sse-23.c: Ditto.

From-SVN: r257382

6 years agocompiler: update iota handling, fix using iota in array length
Ian Lance Taylor [Mon, 5 Feb 2018 01:57:42 +0000 (01:57 +0000)]
compiler: update iota handling, fix using iota in array length

    CL 71750 changed the definition of how iota works.  This patch updates
    gccgo for the new definition.

    We've been mishandling iota appearing in a type that appears in a
    const expression, as in `c = len([iota]int{})`.  Correct that by copying
    type expressions when we copy an expression.  For simplicity only copy
    when it can change the size of a type, as that is the only case where
    iota in a type can affect the value of a constant (I think).  This is
    still a bunch of changes, but almost all boilerplate.

    Fixes golang/go#22341

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

From-SVN: r257379

6 years agocompiler: permit empty statements after fallthrough
Ian Lance Taylor [Mon, 5 Feb 2018 01:53:23 +0000 (01:53 +0000)]
compiler: permit empty statements after fallthrough

    The language spec permits empty statements after a fallthrough
    statement, so implement that.  Also give a better error message when a
    fallthrough statement is in the wrong place.  The test case for this
    is in the master repository, test/fixedbugs/issue14540.go, just not
    yet in the gccgo repository.

    Fixes golang/go#14538

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

From-SVN: r257378

6 years agocompiler: in range, evaluate array if it has receives or calls
Ian Lance Taylor [Mon, 5 Feb 2018 01:50:22 +0000 (01:50 +0000)]
compiler: in range, evaluate array if it has receives or calls

    The last change was incomplete, in that it did not evaluate the array
    argument in some cases where it had to be evaluated.  This reuses the
    existing code for checking whether len/cap is constant.

    Also clean up the use of _ as the second variable in a for/range,
    which was previously inconsistent depending on whether the statement
    used = or :=.

    Updates golang/go#22313

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

From-SVN: r257377

6 years agocompiler: give error for non-int arguments to make
Ian Lance Taylor [Mon, 5 Feb 2018 01:46:07 +0000 (01:46 +0000)]
compiler: give error for non-int arguments to make

    This implements a requirement of the language spec.

    While we're here fix the value returned by the type method of a
    builtin call expression to make, although this doesn't seem to make
    any difference anywhere since we lower this to a runtime call before
    the determine_types pass anyhow.

    There is already a test for this error in the master repository:
    test/fixedbugs/issue16949.go. It just hasn't made it into the gccgo
    testsuite yet.

    Fixes golang/go#16949

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

From-SVN: r257376

6 years agocompiler: don't error for goto over type or const declaration
Ian Lance Taylor [Mon, 5 Feb 2018 01:43:24 +0000 (01:43 +0000)]
compiler: don't error for goto over type or const declaration

    We should only issue an error for a goto over a var declaration.

    The test case for this is already in the master repository, at
    test/fixedbugs/issue8042.go.  It just hasn't been copied into the
    gccgo repository yet.

    Fixes golang/go#19089

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

From-SVN: r257375

6 years agocompiler: correct parse of parenthesized select case
Ian Lance Taylor [Mon, 5 Feb 2018 01:40:51 +0000 (01:40 +0000)]
compiler: correct parse of parenthesized select case

    We used to mishandle `select { case (<-c): }` and friends.

    The test case for this is https://golang.org/cl/91657.

    Fixes golang/go#20923

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

From-SVN: r257374

6 years agocmd/go: don't lose last flag from _cgo_flags
Ian Lance Taylor [Mon, 5 Feb 2018 01:38:34 +0000 (01:38 +0000)]
cmd/go: don't lose last flag from _cgo_flags

    The quoting code that read _cgo_flags, currently only in the gccgo
    version of cmd/go, was losing the last flag read from the file.

    Fixes golang/go#23666

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

From-SVN: r257373

6 years agoDaily bump.
GCC Administrator [Mon, 5 Feb 2018 00:16:12 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r257372

6 years agore PR ipa/79966 (run time more than twice slower when using -fipa-cp-clone)
Jan Hubicka [Sun, 4 Feb 2018 17:15:36 +0000 (18:15 +0100)]
re PR ipa/79966 (run time more than twice slower when using -fipa-cp-clone)

PR middle-end/79966
* gfortran.dg/pr79966.f90: New testcase

From-SVN: r257367

6 years ago* es.po: Update.
Joseph Myers [Sun, 4 Feb 2018 14:03:29 +0000 (14:03 +0000)]
* es.po: Update.

From-SVN: r257366

6 years ago* ru.po: Update.
Joseph Myers [Sun, 4 Feb 2018 14:01:51 +0000 (14:01 +0000)]
* ru.po: Update.

From-SVN: r257365

6 years agore PR fortran/84094 (several correctness issues in gfortran.dg)
Dominique d'Humieres [Sun, 4 Feb 2018 13:44:52 +0000 (14:44 +0100)]
re PR fortran/84094 (several correctness issues in gfortran.dg)

2018-02-04  Dominique d'Humieres <dominiq@gcc.gnu.org>

PR fortran/84094
* gfortran.dg/associate_23.f90: Fix invalid code.
* gfortran.dg/intrinsic_actual_4.f90: Likewise.
* gfortran.dg/matmul_3.f90: Likewise.
* gfortran.dg/transfer_array_intrinsic_2.f90: Likewise.

From-SVN: r257364

6 years agore PR fortran/84115 (Failure in associate construct with concatenated character target)
Paul Thomas [Sun, 4 Feb 2018 13:18:33 +0000 (13:18 +0000)]
re PR fortran/84115 (Failure in associate construct with concatenated character target)

2018-02-04  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/84115
* trans-decl.c (gfc_get_symbol_decl): Do not finish the decl of
'length' if the symbol charlen backend_decl is an indirect ref.

2018-02-04  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/84115
* gfortran.dg/associate_34.f90: New test.
* gfortran.dg/associate_35.f90: New test.

From-SVN: r257363

6 years agoDaily bump.
GCC Administrator [Sun, 4 Feb 2018 00:16:23 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r257362

6 years agogo-gcc.cc (Gcc_backend::fill_in_struct): Mark struct types as using structural equality.
Ian Lance Taylor [Sat, 3 Feb 2018 17:01:46 +0000 (17:01 +0000)]
go-gcc.cc (Gcc_backend::fill_in_struct): Mark struct types as using structural equality.

* go-gcc.cc (Gcc_backend::fill_in_struct): Mark struct types as
using structural equality.

From-SVN: r257357

6 years agore PR fortran/84141 (Internal error: type_name(): Bad type)
Paul Thomas [Sat, 3 Feb 2018 14:06:44 +0000 (14:06 +0000)]
re PR fortran/84141 (Internal error: type_name(): Bad type)

2018-02-03  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/84141
PR fortran/84155
* trans-array.c (gfc_array_init_size): Instead of gfc_get_dtype
use gfc_get_dtype_rank_type.

2018-02-03  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/84141
PR fortran/84155
* gfortran.dg/pr84155.f90 : New test.

From-SVN: r257356

6 years agoDaily bump.
GCC Administrator [Sat, 3 Feb 2018 00:16:13 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r257355

6 years ago* pt_BR.po: Update.
Joseph Myers [Fri, 2 Feb 2018 21:30:48 +0000 (21:30 +0000)]
* pt_BR.po: Update.

From-SVN: r257350

6 years agoc-common.h (DECL_UNNAMED_BIT_FIELD): New.
Paolo Carlini [Fri, 2 Feb 2018 19:53:59 +0000 (19:53 +0000)]
c-common.h (DECL_UNNAMED_BIT_FIELD): New.

/c-family
2018-02-02  Paolo Carlini  <paolo.carlini@oracle.com>

* c-common.h (DECL_UNNAMED_BIT_FIELD): New.

/c
2018-02-02  Paolo Carlini  <paolo.carlini@oracle.com>

* c-typeck.c (really_start_incremental_init, push_init_level,
set_nonincremental_init, output_init_element, process_init_element):
Use DECL_UNNAMED_BIT_FIELD.

/cp
2018-02-02  Paolo Carlini  <paolo.carlini@oracle.com>

* class.c (is_really_empty_class): Use DECL_UNNAMED_BIT_FIELD.
* constexpr.c (cx_check_missing_mem_inits): Likewise.
* decl.c (next_initializable_field, find_decomp_class_base,
cp_finish_decomp): Likewise.
* typeck2.c (process_init_constructor_record): Likewise.

From-SVN: r257348

6 years agodecl.c (array_type_has_nonaliased_component): Return false if the component type...
Eric Botcazou [Fri, 2 Feb 2018 18:09:58 +0000 (18:09 +0000)]
decl.c (array_type_has_nonaliased_component): Return false if the component type is a pointer.

* gcc-interface/decl.c (array_type_has_nonaliased_component): Return
false if the component type is a pointer.

From-SVN: r257344

6 years agore PR lto/83954 (LTO: Bogus -Wlto-type-mismatch warning for array of pointer to incom...
Eric Botcazou [Fri, 2 Feb 2018 18:09:32 +0000 (18:09 +0000)]
re PR lto/83954 (LTO: Bogus -Wlto-type-mismatch warning for array of pointer to incomplete type)

PR lto/83954
* lto-symtab.c (warn_type_compatibility_p): Do not recurse into the
component type of array types with non-aliased component.

From-SVN: r257343

6 years agopowerpcspe.opt: Add Undocumented to irrelevant options.
Andrew Jenner [Fri, 2 Feb 2018 17:31:20 +0000 (17:31 +0000)]
powerpcspe.opt: Add Undocumented to irrelevant options.

       * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
       options.
       * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
       Remove all values except native, 8540 and 8548.

From-SVN: r257342

6 years agoi386: Pass INVALID_REGNUM as invalid register number
H.J. Lu [Fri, 2 Feb 2018 16:43:46 +0000 (16:43 +0000)]
i386: Pass INVALID_REGNUM as invalid register number

* config/i386/i386.c (ix86_output_function_return): Pass
INVALID_REGNUM, instead of -1, as invalid register number to
indirect_thunk_name and output_indirect_thunk.

From-SVN: r257340

6 years agoPR c++/84181 - ICE with lambda parm in template argument.
Jason Merrill [Fri, 2 Feb 2018 16:42:46 +0000 (11:42 -0500)]
PR c++/84181 - ICE with lambda parm in template argument.

* tree.c (strip_typedefs_expr): Use cp_tree_operand_length.

From-SVN: r257339

6 years agodec_parameter_1.f (sub1): Remove statement with no effect.
Uros Bizjak [Fri, 2 Feb 2018 16:01:49 +0000 (17:01 +0100)]
dec_parameter_1.f (sub1): Remove statement with no effect.

* gfortran.dg/dec_parameter_1.f (sub1): Remove statement with no effect.
* gfortran.dg/dec_parameter_2.f90 (sub1): Ditto.

From-SVN: r257337

6 years agovec-cmpne-long.c: Add p8vector_hw require to dg-do run stanza.
Will Schmidt [Fri, 2 Feb 2018 16:00:28 +0000 (16:00 +0000)]
vec-cmpne-long.c: Add p8vector_hw require to dg-do run stanza.

[testsuite]

2018-02-02  Will Schmidt  <will_schmidt@vnet.ibm.com>

* gcc.target/powerpc/vec-cmpne-long.c: Add p8vector_hw require to
dg-do run stanza.

From-SVN: r257336

6 years agofold-vec-abs-int.p9.c: Add powerpc_p9vector_ok requirement.
Will Schmidt [Fri, 2 Feb 2018 15:53:30 +0000 (15:53 +0000)]
fold-vec-abs-int.p9.c: Add powerpc_p9vector_ok requirement.

[testsuite]

2018-01-31  Will Schmidt  <will_schmidt@vnet.ibm.com>

* gcc.target/powerpc/fold-vec-abs-int.p9.c: Add powerpc_p9vector_ok
requirement.
* gcc.target/powerpc/fold-vec-abs-int-fwrapv.p9.c: Same.
* gcc.target/powerpc/fold-vec-cmp-char.p9.c: Same.
* gcc.target/powerpc/fold-vec-neg-int.p9.c: Same.

From-SVN: r257335

6 years agogo-gcc.cc (Gcc_backend::type_size): Return 0 for void_type_node.
Ian Lance Taylor [Fri, 2 Feb 2018 15:19:44 +0000 (15:19 +0000)]
go-gcc.cc (Gcc_backend::type_size): Return 0 for void_type_node.

* go-gcc.cc (Gcc_backend::type_size): Return 0 for
void_type_node.
(Gcc_backend::convert_expression): Don't convert if the type of
expr_tree is void_type_node.
(Gcc_backend::array_index_expression): Don't index if the type of
the array expression is void_type_node.
(Gcc_backend::init_statement): Don't initialize if the type of the
initializer expression is void_type_node.
(Gcc_backend::assignment_statement): Don't assign if the type of
either the left or right hand side is void_type_node.
(Gcc_backend::temporary_variable): Don't initialize if the type of
the initializer expression is void_type_node.

From-SVN: r257334

6 years agore PR testsuite/52641 (Test cases fail for 16-bit int targets)
Georg-Johann Lay [Fri, 2 Feb 2018 15:07:37 +0000 (15:07 +0000)]
re PR testsuite/52641 (Test cases fail for 16-bit int targets)

PR testsuite/52641
* gcc.c-torture/execute/pr83362.c: Make work for int16.
* gcc.dg/Wsign-conversion.c: Dito.
* gcc.dg/attr-alloc_size-4.c: Dito.
* gcc.dg/pr81020.c: Dito.
* gcc.dg/pr81192.c: Dito.
* gcc.dg/pr83463.c (dg-options): Add -Wno-pointer-to-int-cast.
* gcc.dg/attr-alloc_size-11.c: Also special-case avr.
* gcc.dg/pr83844.c: Restrict to int32plus.
* gcc.dg/attr-alloc_size-3.c: Restrict to size32plus.
* gcc.dg/tree-ssa/ldist-25.c: Dito.
* gcc.dg/tree-ssa/ldist-27.c: Dito.
* gcc.dg/tree-ssa/ldist-28.c: Dito.
* gcc.dg/tree-ssa/ldist-29.c: Dito.
* gcc.dg/tree-ssa/ldist-30.c: Dito.
* gcc.dg/tree-ssa/ldist-31.c: Dito.
* gcc.dg/tree-ssa/ldist-32.c: Dito.
* gcc.dg/tree-ssa/ldist-33.c: Dito.
* gcc.dg/tree-ssa/ldist-34.c: Dito.
* gcc.dg/tree-ssa/ldist-35.c: Dito.
* gcc.dg/tree-ssa/ldist-36.c: Dito.

From-SVN: r257333

6 years agoAdd -march=icelake.
Julia Koval [Fri, 2 Feb 2018 13:45:57 +0000 (14:45 +0100)]
Add -march=icelake.

gcc/
* config.gcc: Add -march=icelake.
* config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
* config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
* config/i386/i386.c (processor_costs): Add m_ICELAKE.
(PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
(processor_target_table): Add icelake.
(ix86_option_override_internal): Handle new PTAs.
(get_builtin_code_for_version): Handle icelake.
(M_INTEL_COREI7_ICELAKE): New.
(fold_builtin_cpu): Handle icelake.
* config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
* doc/invoke.texi: Add -march=icelake.
gcc/testsuite/
* gcc.target/i386/funcspec-56.inc: Handle new march.
* g++.dg/ext/mv16.C: Ditto.
libgcc/
* config/i386/cpuinfo.h (processor_subtypes): Add INTEL_COREI7_ICELAKE.

From-SVN: r257331

6 years agocompiler: don't incorrectly evaluate range variable
Ian Lance Taylor [Fri, 2 Feb 2018 13:44:41 +0000 (13:44 +0000)]
compiler: don't incorrectly evaluate range variable

    The language spec says that in `for i = range x`, in which there is no
    second iteration variable, if len(x) is constant, then x is not
    evaluated.  This only matters when x is an expression that panics but
    whose type is an array type; in such a case, we should not evaluate x,
    since len of any array type is a constant.

    Fixes golang/go#22313

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

From-SVN: r257330

6 years agoMove omp bitmask to general to use it in x86 backend.
Julia Koval [Fri, 2 Feb 2018 13:39:30 +0000 (14:39 +0100)]
Move omp bitmask to general to use it in x86 backend.

gcc/c-family/
* c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.

gcc/
* config/i386/i386.c (ix86_option_override_internal): Change flags type
to wide_int_bitmask.
* wide-int-bitmask.h: New.

From-SVN: r257329

6 years agoReduce fallout for avr.
Georg-Johann Lay [Fri, 2 Feb 2018 12:24:34 +0000 (12:24 +0000)]
Reduce fallout for avr.

* lib/target-supports.exp
(check_effective_target_keeps_null_pointer_checks): No more
special-case avr.
* gcc.dg/tree-ssa/pr21086.c (dg-final): Special-case avr.
* gcc.dg/ifcvt-4.c: Skip avr.
* gcc.dg/pr53037-1.c: Dito.
* gcc.dg/pr53037-2.c: Dito.
* gcc.dg/pr53037-3.c: Dito.
* gcc.dg/pr63387-2.c: Dito.
* gcc.dg/pr63387.c: Dito.
* gcc.dg/sancov/cmp0.c: Dito.
* gcc.dg/tree-ssa/loop-interchange-1.c: Dito.
* gcc.dg/tree-ssa/loop-interchange-10.c: Dito.
* gcc.dg/tree-ssa/loop-interchange-11.c: Dito.
* gcc.dg/tree-ssa/loop-interchange-1b.c: Dito.
* gcc.dg/tree-ssa/loop-interchange-2.c: Dito.
* gcc.dg/tree-ssa/loop-interchange-3.c: Dito.
* gcc.dg/tree-ssa/loop-interchange-4.c: Dito.
* gcc.dg/tree-ssa/loop-interchange-5.c: Dito.
* gcc.dg/tree-ssa/loop-interchange-6.c: Dito.
* gcc.dg/tree-ssa/loop-interchange-7.c: Dito.
* gcc.dg/tree-ssa/loop-interchange-8.c: Dito.
* gcc.dg/tree-ssa/loop-interchange-9.c: Dito.
* gcc.dg/tree-ssa/pr82059.c: Dito.
* gcc.c-torture/execute/pr70460.c: Dito.

From-SVN: r257328

6 years agore PR testsuite/52641 (Test cases fail for 16-bit int targets)
Georg-Johann Lay [Fri, 2 Feb 2018 11:36:54 +0000 (11:36 +0000)]
re PR testsuite/52641 (Test cases fail for 16-bit int targets)

PR testsuite/52641
* gcc.c-torture/execute/pr81913.c: Use types that also work for int16.
* gcc.c-torture/execute/20180112-1.c: Dito.
* gcc.c-torture/execute/pr81503.c: Dito.
* gcc.dg/store_merging_12.c: Dito.
* gcc.dg/tree-ssa/loop-niter-1.c: Dito.
* gcc.dg/tree-ssa/loop-niter-2.c: Dito.
* gcc.dg/tree-ssa/pr80898.c: Dito.
* gcc.dg/tree-ssa/pr82363.c: Dito.
* gcc.dg/utf16-4.c: Also allow "short unsigned int" in dg-warning.
* gcc.dg/tree-ssa/pr81346-5.c: Special-case int16.
* gcc.dg/tree-ssa/ssa-sink-11.c: Dito.
* gcc.dg/tree-ssa/ssa-sink-12.c: Dito.
* gcc.dg/torture/pr81814.c: Restrict to int32plus.
* gcc.dg/tree-ssa/pr80803.c: Dito.
* gcc.dg/tree-ssa/pr80898-2.c: Dito.
* gcc.dg/tree-ssa/pr81346-4.c: Dito.
* gcc.dg/tree-ssa/vrp114.c: Dito.
* gcc.dg/tree-ssa/pr82574.c: Restrict to size32plus.
* gcc.dg/tree-ssa/ssa-dom-thread-13.c: Dito.
* gcc.dg/tree-ssa/ssa-sink-15.c: Dito.

From-SVN: r257327

6 years agoPR84066 Wrong shadow stack register size is saved for x32
Igor Tsimbalist [Fri, 2 Feb 2018 10:06:39 +0000 (11:06 +0100)]
PR84066 Wrong shadow stack register size is saved for x32

x32 is a 64-bit process with 32-bit software pointer and kernel may
place x32 shadow stack above 4GB.  We need to save and restore 64-bit
shadow stack register for x32. builtin jmp buf size is 5 pointers.  We
have space to save 64-bit shadow stack pointers: 32-bit SP, 32-bit FP,
32-bit IP, 64-bit SSP for x32.

PR target/84066
* gcc/config/i386/i386.md: Replace Pmode with word_mode in
builtin_setjmp_setup and builtin_longjmp to support x32.
* gcc/testsuite/gcc.target/i386/cet-sjlj-6a.c: New test.
* gcc/testsuite/gcc.target/i386/cet-sjlj-6b.c: Likewise.

From-SVN: r257326

6 years agoPR c++/84160 - ICE with nested variadic capture.
Jason Merrill [Fri, 2 Feb 2018 02:07:09 +0000 (21:07 -0500)]
PR c++/84160 - ICE with nested variadic capture.

* lambda.c (is_capture_proxy_with_ref): New.
(insert_capture_proxy): Don't set DECL_CAPTURED_VARIABLE from a
COMPONENT_REF.
* expr.c (mark_use): Use is_capture_proxy_with_ref.
* constexpr.c (potential_constant_expression_1): Likewise.
* semantics.c (process_outer_var_ref): Likewise.

From-SVN: r257325

6 years agoreflect: enable allocation tests
Ian Lance Taylor [Fri, 2 Feb 2018 00:33:03 +0000 (00:33 +0000)]
reflect: enable allocation tests

    They were disabled due to the lack of escape analysis. Now that
    we have escape analysis, unskip these tests.

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

From-SVN: r257324

6 years agoruntime: scan register backing store on ia64
Ian Lance Taylor [Fri, 2 Feb 2018 00:16:43 +0000 (00:16 +0000)]
runtime: scan register backing store on ia64

    On ia64, a separate stack is used for saving/restoring register frames,
    occupying the other end of the stack mapping. This must also be scanned
    for pointers into the heap.

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

From-SVN: r257323

6 years agoDaily bump.
GCC Administrator [Fri, 2 Feb 2018 00:16:28 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r257322

6 years agocompiler: turn on escape analysis by default
Cherry Zhang [Fri, 2 Feb 2018 00:00:04 +0000 (00:00 +0000)]
compiler: turn on escape analysis by default

    The escape analysis now runs by default. It can be disabled with
    the negative flag, -fno-go-optimize-allocs.

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

* lang.opt (fgo-optimize): Remove RejectNegative.
* go-c.h (go_enable_optimize): Update declaration to take value
argument.
* go-lang.c (go_langhook_handle_option): Pass value to
go_enable_optimize.
* gccgo.texi (Invoking gccgo): Update -fgo-optimize-allocs doc.

From-SVN: r257319

6 years agoChange accidentally omitted from revision 257280.
Ian Lance Taylor [Thu, 1 Feb 2018 21:08:31 +0000 (21:08 +0000)]
Change accidentally omitted from revision 257280.

From-SVN: r257313

6 years agomath: adjust compilation flags, use them when testing
Ian Lance Taylor [Thu, 1 Feb 2018 21:05:20 +0000 (21:05 +0000)]
math: adjust compilation flags, use them when testing

    We were using special compilation flags for the math package, but we
    weren't using them when testing.  That meant that our tests were not
    checking the real code we were providing.  Fix that.

    Fixing that revealed that we were not using a good set of flags, or at
    least were not using flags that let the tests pass.  Adjust the flags
    to stop using -funsafe-math-optimizations on x86.  Instead always use
    -ffp-contract=off -fno-math-errno -fno-trapping-math for all targets.

    Fixes golang/go#23647

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

From-SVN: r257312

6 years agore PR c++/84125 (ICE in generic lambda when static_assert argument is implicitly...
Marek Polacek [Thu, 1 Feb 2018 20:32:33 +0000 (20:32 +0000)]
re PR c++/84125 (ICE in generic lambda when static_assert argument is implicitly converted to bool)

PR c++/84125
* typeck.c (build_address): Relax the assert when
processing_template_decl.

* g++.dg/cpp1y/lambda-generic-84125.C:New test.

From-SVN: r257311

6 years agoPR 83975 Associate target with non-constant character length
Janne Blomqvist [Thu, 1 Feb 2018 19:47:15 +0000 (21:47 +0200)]
PR 83975 Associate target with non-constant character length

When associating a variable of type character, if the length of the
target isn't known at compile time, generate an error. See PR 83344
for more details.

Regtested on x86_64-pc-linux-gnu.

gcc/fortran/ChangeLog:

2018-02-01  Janne Blomqvist  <jb@gcc.gnu.org>

PR 83975
PR 83344
* resolve.c (resolve_assoc_var): Generate an error if
target length unknown.

From-SVN: r257310

6 years agoPR c++/84126 - ICE with variadic generic lambda
Jason Merrill [Thu, 1 Feb 2018 18:44:41 +0000 (13:44 -0500)]
PR c++/84126 - ICE with variadic generic lambda

PR c++/84036
PR c++/82249
* pt.c (tsubst_pack_expansion): Handle function parameter_packs in
PACK_EXPANSION_EXTRA_ARGS.

From-SVN: r257307

6 years agore PR target/56010 (Powerpc, -mcpu=native and -mtune=native use the wrong name for...
Peter Bergner [Thu, 1 Feb 2018 18:26:51 +0000 (12:26 -0600)]
re PR target/56010 (Powerpc, -mcpu=native and -mtune=native  use the wrong name for target 7450)

PR target/56010
PR target/83743
* config/rs6000/driver-rs6000.c: #include "diagnostic.h".
#include "opts.h".
(rs6000_supported_cpu_names): New static variable.
(linux_cpu_translation_table): Likewise.
(elf_platform) <cpu>: Define new static variable and use it.
Translate kernel AT_PLATFORM name to canonical name if needed.
Error if platform name is unknown.

From-SVN: r257305

6 years agore PR middle-end/84089 (FAIL: g++.dg/cpp1y/lambda-generic-x.C -std=gnu++14 (internal...
Aldy Hernandez [Thu, 1 Feb 2018 17:12:28 +0000 (17:12 +0000)]
re PR middle-end/84089 (FAIL: g++.dg/cpp1y/lambda-generic-x.C  -std=gnu++14 (internal compiler error))

PR target/84089
* config/pa/predicates.md (base14_operand): Handle E_VOIDmode.

From-SVN: r257304

6 years agore PR target/84128 (i686: Stack spilling in -fstack-clash-protection prologue neglect...
Jeff Law [Thu, 1 Feb 2018 16:22:56 +0000 (09:22 -0700)]
re PR target/84128 (i686: Stack spilling in -fstack-clash-protection prologue neglects %esp change)

PR target/84128
* config/i386/i386.c (release_scratch_register_on_entry): Add new
OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
the scratch if RELEASE_VIA_POP is false.
(ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
If we have to save a temporary register, decrement SIZE appropriately.
Pass new arguments to release_scratch_register_on_entry.
(ix86_adjust_stack_and_probe): Likewise.
(ix86_emit_probe_stack_range): Pass new arguments to
release_scratch_register_on_entry.

PR target/84128
* gcc.target/i386/pr84128.c: New test.

From-SVN: r257303

6 years agore PR rtl-optimization/84157 ([nvptx] ICE: RTL check: expected code 'reg', have ...
Uros Bizjak [Thu, 1 Feb 2018 16:04:18 +0000 (17:04 +0100)]
re PR rtl-optimization/84157 ([nvptx] ICE: RTL check: expected code 'reg', have 'lshiftrt')

PR rtl-optimization/84157
* combine.c (change_zero_ext): Use REG_P predicate in
front of HARD_REGISTER_P predicate.

From-SVN: r257302

6 years agoavr.c (avr_option_override): Move disabling of -fdelete-null-pointer-checks to...
Georg-Johann Lay [Thu, 1 Feb 2018 15:54:20 +0000 (15:54 +0000)]
avr.c (avr_option_override): Move disabling of -fdelete-null-pointer-checks to...

gcc/
* config/avr/avr.c (avr_option_override): Move disabling of
-fdelete-null-pointer-checks to...
* common/config/avr/avr-common.c (avr_option_optimization_table):
...here.
testsuite/
* gcc.dg/tree-ssa/vrp111.c (dg-options): Add
-fdelete-null-pointer-checks.

From-SVN: r257301

6 years agocompiler: omit field name for embedded fields in reflection string
Ian Lance Taylor [Thu, 1 Feb 2018 15:54:04 +0000 (15:54 +0000)]
compiler: omit field name for embedded fields in reflection string

    This matches the gc compiler.

    The test case was sent for the master repo as
    https://golang.org/cl/91138.

    Fixes golang/go#23620

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

From-SVN: r257300

6 years agonet: declare lib_getaddrinfo as returning int32
Ian Lance Taylor [Thu, 1 Feb 2018 15:49:53 +0000 (15:49 +0000)]
net: declare lib_getaddrinfo as returning int32

    Otherwise on a 64-bit system we will read the 32-bit value as a 64-bit
    value.  Since getaddrinfo returns negative numbers as error values,
    these will be interpreted as numbers like 0xfffffffe rather than -2,
    and the comparisons with values like syscall.EAI_NONAME will fail.

    Fixes golang/go#23645

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

From-SVN: r257299

6 years agore PR c++/83796 (Abstract classes allowed to be instantiated when initialised as...
Paolo Carlini [Thu, 1 Feb 2018 15:36:04 +0000 (15:36 +0000)]
re PR c++/83796 (Abstract classes allowed to be instantiated when initialised as default parameter to function or constructor)

/cp
2018-02-01  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/83796
* call.c (convert_like_real): If w're initializing from {} explicitly
call abstract_virtuals_error_sfinae.

/testsuite
2018-02-01  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/83796
* g++.dg/cpp0x/abstract-default1.C: New.

From-SVN: r257298

6 years agoUse range info in split_constant_offset (PR 81635)
Richard Sandiford [Thu, 1 Feb 2018 14:17:07 +0000 (14:17 +0000)]
Use range info in split_constant_offset (PR 81635)

This patch implements the original suggestion for fixing PR 81635:
use range info in split_constant_offset to see whether a conversion
of a wrapping type can be split.  The range info problem described in:

    https://gcc.gnu.org/ml/gcc-patches/2017-08/msg01002.html

seems to have been fixed.

The patch is part 1.  There needs to be a follow-on patch to handle:

  for (unsigned int i = 0; i < n; i += 4)
    {
      ...[i + 2]...
      ...[i + 3]...

which the old SCEV test handles, but which the range check doesn't.
At the moment we record that the low two bits of "i" are clear,
but we still end up with a maximum range of 0xffffffff rather than
0xfffffffc.

2018-01-31  Richard Sandiford  <richard.sandiford@linaro.org>

gcc/
PR tree-optimization/81635
* tree-data-ref.c (split_constant_offset_1): For types that
wrap on overflow, try to use range info to prove that wrapping
cannot occur.

gcc/testsuite/
PR tree-optimization/81635
* gcc.dg/vect/bb-slp-pr81635-1.c: New test.
* gcc.dg/vect/bb-slp-pr81635-2.c: Likewise.

From-SVN: r257296

6 years ago[PR83370][AARCH64]Use tighter register constraint for sibcall patterns.
Renlin Li [Thu, 1 Feb 2018 13:02:24 +0000 (13:02 +0000)]
[PR83370][AARCH64]Use tighter register constraint for sibcall patterns.

In aarch64 backend, ip0/ip1 register will be used in the prologue/epilogue as
temporary register.

When the compiler is performing sibcall optimization. It has the chance to use
ip0/ip1 register for indirect function call to hold the address. However,
those two register might be clobbered by the epilogue code which makes the
last sibcall instruction invalid.

The patch here renames the register class CALLER_SAVE_REGS to TAILCALL_ADDR_REGS
to reflect its usage, and remove IP registers from this class.

gcc/

2018-02-01  Renlin Li  <renlin.li@arm.com>

PR target/83370
* config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
TAILCALL_ADDR_REGS.
(aarch64_register_move_cost): Likewise.
* config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
TAILCALL_ADDR_REGS.
(REG_CLASS_NAMES): Likewise.
(REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
TAILCALL_ADDR_REGS. Remove IP registers.
* config/aarch64/aarch64.md (Ucs): Update register constraint.

gcc/testsuite/

2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>

PR target/83370
* gcc.target/aarch64/pr83370.c: New.

From-SVN: r257294

6 years agodomwalk.h (dom_walker::dom_walker): Add additional constructor for specifying RPO...
Richard Biener [Thu, 1 Feb 2018 12:51:24 +0000 (12:51 +0000)]
domwalk.h (dom_walker::dom_walker): Add additional constructor for specifying RPO order and allow NULL for that.

2018-02-01  Richard Biener  <rguenther@suse.de>

* domwalk.h (dom_walker::dom_walker): Add additional constructor
for specifying RPO order and allow NULL for that.
* domwalk.c (dom_walker::dom_walker): Likewise.
(dom_walker::walk): Handle NULL RPO order.
* tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
in RPO order.
(rewrite_update_dom_walker): Likewise.
(mark_def_dom_walker): Likewise.

* gcc.dg/graphite/pr35356-1.c: Adjust.

From-SVN: r257293

6 years ago[AArch64] Fix SVE testsuite failures for ILP32 (PR 83846)
Richard Sandiford [Thu, 1 Feb 2018 11:04:58 +0000 (11:04 +0000)]
[AArch64] Fix SVE testsuite failures for ILP32 (PR 83846)

The SVE tests are split into code-quality compile tests and runtime
tests.  A lot of the former are geared towards LP64.  It would be
possible (but tedious!) to mark up every line that is expected to work
only for LP64, but I think it would be a constant source of problems.

Since the code has not been tuned for ILP32 yet, I think the best
thing is to select only the runtime tests for that combination.
They all pass on aarch64-elf and aarch64_be-elf except vec-cond-[34].c,
which are unsupported due to the lack of fenv support.

The patch also replaces uses of built-in types with stdint.h types
where possible.  (This excludes tests that change the endianness,
since we can't assume that system header files work in that case.)

2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>

gcc/testsuite/
PR testsuite/83846
* gcc.target/aarch64/sve/aarch64-sve.exp: Only do *_run tests
for ILP32.
* gcc.target/aarch64/sve/clastb_2_run.c (main): Use TYPE instead
of hard-coding the choice.
* gcc.target/aarch64/sve/clastb_4_run.c (main): Likewise.
* gcc.target/aarch64/sve/clastb_5_run.c (main): Likewise.
* gcc.target/aarch64/sve/clastb_3_run.c (main): Likewise.  Generalize
memset call.
* gcc.target/aarch64/sve/const_pred_1.C: Include stdint.h and use
stdint.h types.
* gcc.target/aarch64/sve/const_pred_2.C: Likewise.
* gcc.target/aarch64/sve/const_pred_3.C: Likewise.
* gcc.target/aarch64/sve/const_pred_4.C: Likewise.
* gcc.target/aarch64/sve/load_const_offset_2.c: Likewise.
* gcc.target/aarch64/sve/logical_1.c: Likewise.
* gcc.target/aarch64/sve/mask_struct_load_1.c: Likewise.
* gcc.target/aarch64/sve/mask_struct_load_2.c: Likewise.
* gcc.target/aarch64/sve/mask_struct_load_3.c: Likewise.
* gcc.target/aarch64/sve/mask_struct_load_4.c: Likewise.
* gcc.target/aarch64/sve/mask_struct_load_5.c: Likewise.
* gcc.target/aarch64/sve/mask_struct_load_6.c: Likewise.
* gcc.target/aarch64/sve/mask_struct_load_7.c: Likewise.
* gcc.target/aarch64/sve/mask_struct_load_8.c: Likewise.
* gcc.target/aarch64/sve/mask_struct_store_1.c: Likewise.
* gcc.target/aarch64/sve/mask_struct_store_2.c: Likewise.
* gcc.target/aarch64/sve/mask_struct_store_3.c: Likewise.
* gcc.target/aarch64/sve/mask_struct_store_4.c: Likewise.
* gcc.target/aarch64/sve/struct_vect_1.c: Likewise.
* gcc.target/aarch64/sve/struct_vect_2.c: Likewise.
* gcc.target/aarch64/sve/struct_vect_2_run.c: Likewise.
* gcc.target/aarch64/sve/struct_vect_3.c: Likewise.
* gcc.target/aarch64/sve/struct_vect_3_run.c: Likewise.
* gcc.target/aarch64/sve/struct_vect_4.c: Likewise.
* gcc.target/aarch64/sve/struct_vect_4_run.c: Likewise.
* gcc.target/aarch64/sve/struct_vect_7.c: Likewise.
* gcc.target/aarch64/sve/struct_vect_8.c: Likewise.
* gcc.target/aarch64/sve/struct_vect_8_run.c: Likewise.
* gcc.target/aarch64/sve/struct_vect_9.c: Likewise.
* gcc.target/aarch64/sve/struct_vect_9_run.c: Likewise.
* gcc.target/aarch64/sve/struct_vect_10.c: Likewise.
* gcc.target/aarch64/sve/struct_vect_10_run.c: Likewise.
* gcc.target/aarch64/sve/struct_vect_11.c: Likewise.
* gcc.target/aarch64/sve/struct_vect_11_run.c: Likewise.
* gcc.target/aarch64/sve/struct_vect_12.c: Likewise.
* gcc.target/aarch64/sve/struct_vect_12_run.c: Likewise.
* gcc.target/aarch64/sve/struct_vect_13.c: Likewise.
* gcc.target/aarch64/sve/struct_vect_13_run.c: Likewise.
* gcc.target/aarch64/sve/struct_vect_14.c: Likewise.
* gcc.target/aarch64/sve/struct_vect_18.c: Likewise.
* gcc.target/aarch64/sve/struct_vect_19.c: Likewise.
* gcc.target/aarch64/sve/struct_vect_20.c: Likewise.
* gcc.target/aarch64/sve/struct_vect_21.c: Likewise.
* gcc.target/aarch64/sve/struct_vect_22.c: Likewise.
* gcc.target/aarch64/sve/struct_vect_23.c: Likewise.
* gcc.target/aarch64/sve/popcount_1.c (popcount_64): Use
__builtin_popcountll rather than __builtin_popcountl.

Reviewed-by: James Greenhalgh <james.greenhalgh@arm.com>
From-SVN: r257290

6 years ago[AArch64] Handle SVE subregs that are effectively REVs
Richard Sandiford [Thu, 1 Feb 2018 11:04:28 +0000 (11:04 +0000)]
[AArch64] Handle SVE subregs that are effectively REVs

Subreg reads should be equivalent to storing the inner register to
memory and loading the appropriate memory bytes back, with subreg
writes doing the reverse.  For the reasons explained in the comments,
this isn't what happens for big-endian SVE if we simply reinterpret
one vector register as having a different element size, so the
conceptual store and load is needed in the general case.

However, that obviously produces poor code if we do it too often.
The patch therefore adds a pattern for handling the operation in
registers.  This copes with the important case of a VIEW_CONVERT
created by tree-vect-slp.c:duplicate_and_interleave.

It might make sense to tighten the predicates in aarch64-sve.md so
that such subregs are not allowed as operands to most instructions,
but that's future work.

This fixes the sve/slp_*.c tests on aarch64_be.

2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>

gcc/
* config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
(aarch64_maybe_expand_sve_subreg_move): Declare.
* config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
* config/aarch64/predicates.md (aarch64_any_register_operand): New
predicate.
* config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
that are semantically a reverse operation.
(*aarch64_sve_mov<mode>_subreg_be): New pattern.
* config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
(aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
functions.
(aarch64_can_change_mode_class): For big-endian, forbid changes
between two SVE modes if they have different element sizes.

Reviewed-by: James Greenhalgh <james.greenhalgh@arm.com>
From-SVN: r257289