]> git.ipfire.org Git - thirdparty/gcc.git/log
thirdparty/gcc.git
6 years ago * fi.po, fr.po: Update.
jsm28 [Mon, 11 Feb 2019 19:05:33 +0000 (19:05 +0000)] 
* fi.po, fr.po: Update.

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

6 years ago[COMMITTED] Fix pthread errors in pr86637-2.c
wilco [Mon, 11 Feb 2019 18:14:37 +0000 (18:14 +0000)] 
[COMMITTED] Fix pthread errors in pr86637-2.c

Fix test errors on targets which do not support pthreads.

Committed as obvious.

    testsuite/
PR tree-optimization/86637
* gcc.c-torture/compile/pr86637-2.c: Test pthread and graphite target.

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

6 years agoPR tree-optimization/88771 - Misleading -Werror=array-bounds error
msebor [Mon, 11 Feb 2019 17:44:05 +0000 (17:44 +0000)] 
PR tree-optimization/88771 - Misleading -Werror=array-bounds error

gcc/ChangeLog:

PR tree-optimization/88771
* gimple-ssa-warn-restrict.c (pass_wrestrict::gate): Also enable
when -Wstringop-overflow is set.
(builtin_memref::builtin_memref): Adjust excessive upper bound
only when lower bound is not excessive.
(maybe_diag_overlap): Detect and diagnose excessive bounds via
-Wstringop-ovefflow.
(maybe_diag_offset_bounds): Rename...
(maybe_diag_access_bounds): ...to this.
(check_bounds_or_overlap): Adjust for name change above.

gcc/testsuite/ChangeLog:

PR tree-optimization/88771
* gcc.dg/Wstringop-overflow-8.c: New test.
* gcc.dg/Wstringop-overflow-9.c: New test.
* gcc.dg/Warray-bounds-40.c: New test.
* gcc.dg/builtin-stpncpy.c: Adjust.
* gcc.dg/builtin-stringop-chk-4.c: Adjust.
* g++.dg/opt/memcpy1.C: Adjust.

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

6 years agoPR c++/87996 - size of array is negative error when SIZE_MAX/2 < sizeof(array) <...
msebor [Mon, 11 Feb 2019 17:35:17 +0000 (17:35 +0000)] 
PR c++/87996 - size of array is negative error when SIZE_MAX/2 < sizeof(array) <= SIZE_MAX

gcc/ChangeLog:

PR c++/87996
* builtins.c (max_object_size): Move from here...
* builtins.h (max_object_size): ...and here...
* tree.c (max_object_size): ...to here...
* tree.h (max_object_size): ...and here.

gcc/c-family/ChangeLog:

PR c++/87996
* c-common.c (invalid_array_size_error): New function.
(valid_array_size_p): Call it.  Handle size as well as type.
* c-common.h (valid_constant_size_p): New function.
(enum cst_size_error): New type.

gcc/cp/ChangeLog:

PR c++/87996
* decl.c (compute_array_index_type_loc): Preserve signed sizes
for diagnostics.  Call valid_array_size_p instead of error.
* init.c (build_new_1): Compute size for diagnostic.  Call
invalid_array_size_error
(build_new): Call valid_array_size_p instead of error.

gcc/testsuite/ChangeLog:

PR c++/87996
* c-c++-common/array-5.c: New test.
* c-c++-common/pr68107.c: Adjust text of diagnostics.
* g++.dg/init/new38.C: Same.
* g++.dg/init/new43.C: Same.
* g++.dg/init/new44.C: Same.
* g++.dg/init/new46.C: Same.
* g++.dg/other/large-size-array.C: Same.
* g++.dg/other/new-size-type.C: Same.
* g++.dg/template/array30.C: Same.
* g++.dg/template/array32.C: New test.
* g++.dg/template/dependent-name3.C: Adjust.
* gcc.dg/large-size-array-3.c: Same.
* gcc.dg/large-size-array-5.c: Same.
* gcc.dg/large-size-array.c: Same.
* g++.old-deja/g++.brendan/array1.C: Same.
* g++.old-deja/g++.mike/p6149.C: Same.

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

6 years agogcc/testsuite/ChangeLog:
msebor [Mon, 11 Feb 2019 17:07:41 +0000 (17:07 +0000)] 
gcc/testsuite/ChangeLog:

* gcc.dg/tree-prof/inliner-1.c: Correct comments.

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

6 years agoArm: Update tests after register allocation changes. (PR/target 88560)
tnfchris [Mon, 11 Feb 2019 16:54:18 +0000 (16:54 +0000)] 
Arm: Update tests after register allocation changes. (PR/target 88560)

After the register allocator changes of r268705 we need to update a few tests
with new output.

In all cases the compiler is now generating the expected code, since the tests
are all float16 testcases using a hard-floar abi, we expect that actual fp16
instructions are used rather than using integer loads and stores.  Because of
we also save on some mov.f16s that were being emitted before to move between
the two.

The aapcs cases now match the f32 cases in using floating point operations.

gcc/testsuite/Changelog

PR middle-end/88560
* gcc.target/arm/armv8_2-fp16-move-1.c: Update assembler scans.
* gcc.target/arm/fp16-aapcs-1.c: Likewise.
* gcc.target/arm/fp16-aapcs-3.c: Likewise.

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

6 years ago[gcc]
wschmidt [Mon, 11 Feb 2019 16:50:33 +0000 (16:50 +0000)] 
[gcc]

2019-02-11  Bill Schmidt  <wschmidt@linux.ibm.com>

* config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Shift-right
and shift-left vector built-ins need to include a TRUNC_MOD_EXPR
for correct semantics.

[gcc/testsuite]

2019-02-11  Bill Schmidt  <wschmidt@linux.ibm.com>

* gcc.target/powerpc/vec-sld-modulo.c: New.
* gcc.target/powerpc/vec-srad-modulo.c: New.
* gcc.target/powerpc/vec-srd-modulo.c: New.

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

6 years ago[RS6000] No inline PLT for V4 bss-plt, implement -mno-pltseq
amodra [Mon, 11 Feb 2019 15:19:59 +0000 (15:19 +0000)] 
[RS6000] No inline PLT for V4 bss-plt, implement -mno-pltseq

Inline PLT calls need PLT to be an array of addresses.  PowerPC 32-bit
bss-plt works differently, so this patch disables inline PLT calls
when -mbss-plt.  The patch also adds support for a new -mno-pltseq
option, which may be required when linking with -mbss-plt code.

* doc/invoke.texi (man page RS/6000 and PowerPC Options): Mention
-mlongcall and -mpltseq.
(RS/6000 and PowerPC Options <-mlongcall>): Mention inline PLT calls.
(RS/6000 and PowerPC Options <-mpltseq>): Document.
* config/rs6000/rs6000.h (TARGET_PLTSEQ): Define.
* config/rs6000/sysv4.opt (mpltseq): New option.
* config/rs6000/sysv4.h (TARGET_PLTSEQ): Redefine.
(SUBTARGET_OVERRIDE_OPTIONS): Error if given -mpltseq when assembler
support is lacking.  Don't allow -mpltseq with -mbss-plt.
* config/rs6000/linux64.h (SUBSUBTARGET_OVERRIDE_OPTIONS): Warn if
-mpltseq given for ELFv1.
* config/rs6000/rs6000.c (rs6000_call_aix): Comment on UNSPEC_PLTSEQ.
Only use UNSPEC_PLTSEQ for inline PLT calls.
(rs6000_call_sysv, rs6000_sibcall_sysv): Expand comments.  Only
use UNSPEC_PLTSEQ for inline PLT calls.
(rs6000_indirect_call_template_1, rs6000_longcall_ref),
(rs6000_call_aix, rs6000_call_sysv, rs6000_sibcall_sysv): Replace
uses of HAVE_AS_PLTSEQ with TARGET_PLTSEQ, simplifying.
* config/rs6000/rs6000.md (pltseq_tocsave_<mode>),
(pltseq_plt16_ha_<mode>, pltseq_plt16_lo_<mode>),
(pltseq_mtctr_<mode>): Likewise.

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

6 years agoPR libstdc++/89023 fix test that fails when <omp.h> not available
redi [Mon, 11 Feb 2019 12:56:59 +0000 (12:56 +0000)] 
PR libstdc++/89023 fix test that fails when <omp.h> not available

Instead of a single test that only checks whether <regex> can be
included in Parallel Mode, add tests for each of C++11/C++14/C++17 that
check whether <bits/extc++.h> is compatible with _GLIBCXX_PARALLEL.
This increases the coverage to (almost) all headers.

If <omp.h> is not available then the tests will trivially pass, because
we don't care about compatibility with _GLIBCXX_PARALLEL in that case.

PR libstdc++/89023
* testsuite/17_intro/headers/c++2011/parallel_mode.cc: New test.
* testsuite/17_intro/headers/c++2014/parallel_mode.cc: New test.
* testsuite/17_intro/headers/c++2017/parallel_mode.cc: New test.
* testsuite/28_regex/headers/regex/parallel_mode.cc: Remove.

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

6 years agoRestore .init_array etc. detection on 64-bit Solaris
ro [Mon, 11 Feb 2019 12:06:19 +0000 (12:06 +0000)] 
Restore .init_array etc. detection on 64-bit Solaris

* acinclude.m4 (gcc_AC_INITFINI_ARRAY): Use 8-byte strings with
Solaris ld.
* configure: Regenerate.

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

6 years agoAdd AMD GCN maintainers
ams [Mon, 11 Feb 2019 11:31:43 +0000 (11:31 +0000)] 
Add AMD GCN maintainers

2019-02-11  Andrew Stubbs  <ams@codesourcery.com>

* MAINTAINERS (amdgcn port): Add myself and Julian Brown.
(Write After Approval): Remove myself and Julian.

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

6 years ago PR bootstrap/88714
jakub [Mon, 11 Feb 2019 10:39:59 +0000 (10:39 +0000)] 
PR bootstrap/88714
* config/arm/ldrdstrd.md (*arm_ldrd, *arm_strd): Use q constraint
instead of r.

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

6 years ago * function.c (assign_parm_setup_block): Use the stored
hp [Mon, 11 Feb 2019 09:03:51 +0000 (09:03 +0000)] 
* function.c (assign_parm_setup_block): Use the stored
size, not the passed size, when allocating stack-space,
also for a parameter with alignment larger than
MAX_SUPPORTED_STACK_ALIGNMENT.

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

6 years agoConstruct ipa_reduced_postorder always for overwritable (PR ipa/89009).
marxin [Mon, 11 Feb 2019 08:13:03 +0000 (08:13 +0000)] 
Construct ipa_reduced_postorder always for overwritable (PR ipa/89009).

2019-02-11  Martin Liska  <mliska@suse.cz>

PR ipa/89009
* ipa-cp.c (build_toporder_info): Remove usage of a param.
* ipa-inline.c (inline_small_functions): Likewise.
* ipa-pure-const.c (propagate_pure_const): Likewise.
(propagate_nothrow): Likewise.
* ipa-reference.c (propagate): Likewise.
* ipa-utils.c (struct searchc_env): Remove unused field.
(searchc): Always search across AVAIL_INTERPOSABLE.
(ipa_reduced_postorder): Always allow AVAIL_INTERPOSABLE as
the only called IPA pure const can properly not propagate
across interposable boundary.
* ipa-utils.h (ipa_reduced_postorder): Remove param.
2019-02-11  Martin Liska  <mliska@suse.cz>

PR ipa/89009
* g++.dg/ipa/pr89009.C: New test.

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

6 years ago[NDS32] Add memory mode in call pattern.
jasonwucj [Mon, 11 Feb 2019 07:04:00 +0000 (07:04 +0000)] 
[NDS32] Add memory mode in call pattern.

gcc/
* config/nds32/nds32.md (call_internal, call_value_internal,
sibcall_internal, sibcall_value_internal): Use SImode for mem rtx.

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

6 years ago * config/cris/cris.c (cris_preferred_minimum_alignment): Fix name
hp [Mon, 11 Feb 2019 02:04:02 +0000 (02:04 +0000)] 
* config/cris/cris.c (cris_preferred_minimum_alignment): Fix name
typo.

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

6 years agoi386: Fix a typo in comments for for "Yd"
hjl [Mon, 11 Feb 2019 01:39:54 +0000 (01:39 +0000)] 
i386: Fix a typo in comments for for "Yd"

config/i386/constraints.md has

(define_register_constraint "Yd"
 "TARGET_AVX512DQ ? ALL_SSE_REGS : TARGET_SSE4_1 ? SSE_REGS : NO_REGS"
 "@internal Any EVEX encodable SSE register (@code{%xmm0-%xmm31}) for AVX512DQ target or any SSE register for SSE4_1 target.")

Comments for "Yd" should mention AVX512DQ, not AVX512BW.

* config/i386/constraints.md (Yd): Replace AVX512BW with AVX512DQ
in comments

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

6 years agoDaily bump.
gccadmin [Mon, 11 Feb 2019 00:16:19 +0000 (00:16 +0000)] 
Daily bump.

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

6 years agolibphobos: Merge upstream druntime 2f764ab6
ibuclaw [Sun, 10 Feb 2019 22:10:22 +0000 (22:10 +0000)] 
libphobos: Merge upstream druntime 2f764ab6

Fixes hashing of complex reals, enabling testing of rt.util.typeinfo and
core.internal.hash.

Reviewed-on: https://github.com/dlang/druntime/pull/6837

libphobos/ChangeLog:

* Makefile.in: Rebuild.
* configure: Rebuild.
* libdruntime/Makefile.am: Test rt.util.typeinfo and
core.internal.convert.
* libdruntime/Makefile.in: Rebuild.
* src/Makefile.in: Rebuild.
* testsuite/Makefile.in: Rebuild.
* testsuite/libphobos.hash/test_hash.d: Update test.

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

6 years agolibphobos: Apply core.internal.hash updates from druntime
ibuclaw [Sun, 10 Feb 2019 21:01:24 +0000 (21:01 +0000)] 
libphobos: Apply core.internal.hash updates from druntime

Backported from upstream druntime 2.084

Reviewed-on: https://github.com/dlang/druntime/pull/2469

libphobos/ChangeLog:

* libdruntime/Makefile.am (DRUNTIME_DSOURCES): Remove rt/util/hash.d
* libdruntime/Makefile.in: Rebuild.
* testsuite/libphobos.aa/aa.exp: New file.
* testsuite/libphobos.aa/test_aa.d: New test.
* testsuite/libphobos.hash/hash.exp: New file.
* testsuite/libphobos.hash/test_hash.d: New test.

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

6 years ago2019-02-10 Thomas Koenig <tkoenig@gcc.gnu.org>
tkoenig [Sun, 10 Feb 2019 15:56:41 +0000 (15:56 +0000)] 
2019-02-10  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/71723
* expr.c (gfc_check_assign): Add argument is_init_expr.  If we are
looking at an init expression, issue error if the target is not a
TARGET and we are not looking at a procedure pointer.
* gfortran.h (gfc_check_assign): Add optional argument
is_init_expr.

2019-02-10  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/71723
* gfortran.dg/pointer_init_2.f90: Adjust error messages.
* gfortran.dg/pointer_init_6.f90: Likewise.
* gfortran.dg/pointer_init_9.f90: New test.

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

6 years ago2019-02-10 Thomas Koenig <tkoenig@gcc.gnu.org>
tkoenig [Sun, 10 Feb 2019 15:52:38 +0000 (15:52 +0000)] 
2019-02-10  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/71237
* expr.c (gfc_check_assign): Add argument is_init_expr.  If we are
looking at an init expression, issue error if the target is not a
TARGET and we are not looking at a procedure pointer.
* gfortran.h (gfc_check_assign): Add optional argument
is_init_expr.

2019-02-10  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/71237
* gfortran.dg/pointer_init_2.f90: Adjust error messages.
* gfortran.dg/pointer_init_6.f90: Likewise.
* gfortran.dg/pointer_init_9.f90: New test.

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

6 years ago2019-02-10 Thomas Koenig <tkoenig@gcc.gnu.org>
tkoenig [Sun, 10 Feb 2019 15:38:19 +0000 (15:38 +0000)] 
2019-02-10  Thomas Koenig  <tkoenig@gcc.gnu.org>

    PR fortran/67679
    * gfortran.dg/warn_undefined_1.f90: New test.

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

6 years agolibphobos: Merge phobos upstream 6c9fb28b0
ibuclaw [Sun, 10 Feb 2019 14:27:17 +0000 (14:27 +0000)] 
libphobos: Merge phobos upstream 6c9fb28b0

Fixes a thread deadlock that occurs in the test runner if libcurl is
missing.

Library fix for https://gcc.gnu.org/PR88654

Reviewed-on: https://github.com/dlang/phobos/pull/6824

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

6 years ago[NDS32] Set default --with-nds32-lib correctly.
jasonwucj [Sun, 10 Feb 2019 12:27:01 +0000 (12:27 +0000)] 
[NDS32] Set default --with-nds32-lib correctly.

gcc/
* config.gcc (with_nds32_lib): Set default --with-nds32-lib correctly.

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

6 years ago PR tree-optimization/89268
jakub [Sun, 10 Feb 2019 11:06:58 +0000 (11:06 +0000)] 
PR tree-optimization/89268
* tree-if-conv.c (version_loop_for_if_conversion): Push to preds only
if preds is non-NULL.

* gcc.dg/vect/pr89268.c: New test.

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

6 years ago PR lto/89272
hubicka [Sun, 10 Feb 2019 10:46:43 +0000 (10:46 +0000)] 
PR lto/89272
* tree.c (fld_simplified_type_name): Also keep TYPE_DECL for
polymorphic types.

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

6 years ago[NDS32] Add 'trap' pattern for __builtin_trap ().
jasonwucj [Sun, 10 Feb 2019 09:45:55 +0000 (09:45 +0000)] 
[NDS32] Add 'trap' pattern for __builtin_trap ().

gcc/
* config/nds32/nds32.md (trap): New pattern.

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

6 years agod/dmd: Merge upstream dmd 39edbe17e
ibuclaw [Sun, 10 Feb 2019 09:13:26 +0000 (09:13 +0000)] 
d/dmd: Merge upstream dmd 39edbe17e

Backported fix from upstream dmd 2.079 for an internal compiler error
that occurred during semantic analysis on a recursive field initializer.

Fixes https://gcc.gnu.org/PR88989

Reviewed-on: https://github.com/dlang/dmd/pull/9284

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

6 years ago[NDS32] Refine register dwarf span.
jasonwucj [Sun, 10 Feb 2019 09:09:19 +0000 (09:09 +0000)] 
[NDS32] Refine register dwarf span.

gcc/
* config/nds32/nds32.c (nds32_dwarf_register_span): Refine register
dwarf span.

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

6 years ago[NDS32] Have nds32_spilt_doubleword to split POST_INC.
jasonwucj [Sun, 10 Feb 2019 09:00:43 +0000 (09:00 +0000)] 
[NDS32] Have nds32_spilt_doubleword to split POST_INC.

gcc/
* config/nds32/nds32-md-auxiliary.c (nds32_spilt_doubleword): Support
to split POST_INC.

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

6 years agoDon't XPASS gnat.dg/lto19.adb
ro [Sun, 10 Feb 2019 08:14:07 +0000 (08:14 +0000)] 
Don't XPASS gnat.dg/lto19.adb

* gnat.dg/lto19.adb: Remove dg-excess-errors.

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

6 years ago[libbacktrace] Add btest_lto
vries [Sun, 10 Feb 2019 03:16:09 +0000 (03:16 +0000)] 
[libbacktrace] Add btest_lto

Add libbacktrace test-case using -flto.

2019-02-10  Tom de Vries  <tdevries@suse.de>

* Makefile.am (BUILDTESTS): Add btest_lto.
* Makefile.in: Regenerate.
* btest.c (test1, f2, f3, test3, f22, f23): Declare with
__attribute__((noclone)).

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

6 years agoDaily bump.
gccadmin [Sun, 10 Feb 2019 00:16:34 +0000 (00:16 +0000)] 
Daily bump.

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

6 years ago * ipa-visibility.c (localize_node): Also do not localize
hubicka [Sat, 9 Feb 2019 21:54:28 +0000 (21:54 +0000)] 
* ipa-visibility.c (localize_node): Also do not localize
LDPR_PREVAILING_DEF_IRONLY_EXP.

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

6 years agoFix PR number.
hubicka [Sat, 9 Feb 2019 18:07:12 +0000 (18:07 +0000)] 
Fix PR number.

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

6 years ago PR lto/87809
hubicka [Sat, 9 Feb 2019 18:01:03 +0000 (18:01 +0000)] 
PR lto/87809
* tree.c (fld_simplified_type_name): Use DECL_ASSEMBLER_NAME_SET_P
instead of type_with_linkage.

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

6 years ago PR ipa/88755
hubicka [Sat, 9 Feb 2019 17:56:22 +0000 (17:56 +0000)] 
PR ipa/88755
* params.def (uninlined-function-insns, uninlined-function-time,
uninlined-thunk-insns, uninlined-thunk-time): Add artificial upper
bound so we don't get overflows.

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

6 years ago2019-02-09 Harald Anlauf <anlauf@gmx.de>
anlauf [Sat, 9 Feb 2019 17:25:23 +0000 (17:25 +0000)] 
2019-02-09  Harald Anlauf  <anlauf@gmx.de>

PR fortran/89077
* resolve.c (gfc_resolve_substring_charlen): Check substring
length for constantness prior to general calculation of length.

PR fortran/89077
* gfortran.dg/substr_simplify.f90: New test.

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

6 years ago2019-02-09 Aaron Sawdey <acsawdey@linux.ibm.com>
acsawdey [Sat, 9 Feb 2019 17:06:12 +0000 (17:06 +0000)] 
2019-02-09  Aaron Sawdey  <acsawdey@linux.ibm.com>

* config/rs6000/rs6000-string.c (expand_compare_loop,
expand_block_compare): Insert REG_BR_PROB notes in inline expansion of
memcmp/strncmp.

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

6 years ago PR ipa/88711
hubicka [Sat, 9 Feb 2019 16:28:45 +0000 (16:28 +0000)] 
PR ipa/88711
* gfortran.dg/pr79966.f90: Xfail everwyhere.

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

6 years ago2019-02-09 Paul Thomas <pault@gcc.gnu.org>
pault [Sat, 9 Feb 2019 11:11:33 +0000 (11:11 +0000)] 
2019-02-09  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/89200
* trans-array.c (gfc_trans_create_temp_array): Set the 'span'
field for derived types.

2019-02-09  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/89200
* gfortran.dg/array_reference_2.f90 : New test.

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

6 years ago PR middle-end/89246
jakub [Sat, 9 Feb 2019 08:55:39 +0000 (08:55 +0000)] 
PR middle-end/89246
* config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
If !node->definition and TYPE_ARG_TYPES is non-NULL, use
TYPE_ARG_TYPES instead of DECL_ARGUMENTS.

* gcc.dg/gomp/pr89246-1.c: New test.
* gcc.dg/gomp/pr89246-2.c: New test.

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

6 years agoAdd noexcept to filesystem::path query functions
redi [Sat, 9 Feb 2019 00:25:39 +0000 (00:25 +0000)] 
Add noexcept to filesystem::path query functions

In the standard these member functions are specified in terms of the
potentially-throwing path decompositions functions, but we implement
them without constructing any new paths or doing anything else that can
throw.

PR libstdc++/71044
* include/bits/fs_path.h (path::has_root_name)
(path::has_root_directory, path::has_root_path)
(path::has_relative_path, path::has_parent_path)
(path::has_filename, path::has_stem, path::has_extension)
(path::is_absolute, path::is_relative, path::_M_find_extension): Add
noexcept.
* src/c++17/fs_path.cc (path::has_root_name)
(path::has_root_directory, path::has_root_path)
(path::has_relative_path, path::has_parent_path)
(path::has_filename, path::_M_find_extension): Add noexcept.

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

6 years agoDaily bump.
gccadmin [Sat, 9 Feb 2019 00:16:31 +0000 (00:16 +0000)] 
Daily bump.

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

6 years ago[RS6000] Correct save_reg_p
amodra [Fri, 8 Feb 2019 22:20:58 +0000 (22:20 +0000)] 
[RS6000] Correct save_reg_p

Fixes lack of r30 save/restore on

// -m32 -fpic -ftls-model=initial-exec
__thread char* p;
char** f1 (void) { return &p; }

and

// -m32 -fpic -msecure-plt
extern int foo (int);
int f1 (int x) { return foo (x); }

These are both caused by save_reg_p returning false when the pic
offset table reg (r30 for ABI_V4) was used, due to the logic not
exactly matching that in rs6000_emit_prologue to set up r30.

I also noticed that save_reg_p isn't following the comment regarding
calls_eh_return (since svn 267049, git 0edf78b1b2a0), and the comment
needs tweaking too.  For why the revised comment is correct, grep for
saves_all_registers in lra.c, and yes, we do want to save the pic
offset table reg for eh_return.

PR target/88343
* config/rs6000/rs6000.c (save_reg_p): Correct calls_eh_return
case.  Match logic in rs6000_emit_prologue emitting pic_offset_table
setup.

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

6 years ago PR tree-optimization/88739
jakub [Fri, 8 Feb 2019 19:01:37 +0000 (19:01 +0000)] 
PR tree-optimization/88739
* gcc.c-torture/execute/pr88739.c: New test.

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

6 years ago2019-02-08 Vladimir Makarov <vmakarov@redhat.com>
vmakarov [Fri, 8 Feb 2019 19:01:10 +0000 (19:01 +0000)] 
2019-02-08  Vladimir Makarov  <vmakarov@redhat.com>

PR middle-end/88560
* lra-constraints.c (process_alt_operands): Don't increase reject
for memory when offset memory is required.

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

6 years ago2019-02-08 Jozef Lawrynowicz <jozef.l@mittosystems.com>
jozefl [Fri, 8 Feb 2019 16:47:28 +0000 (16:47 +0000)] 
2019-02-08  Jozef Lawrynowicz  <jozef.l@mittosystems.com>

PR testsuite/89258
* gcc.dg/tree-ssa/pr80887.c: Require int32plus.

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

6 years agoS/390: Implement vector copysign.
rdapp [Fri, 8 Feb 2019 14:25:48 +0000 (14:25 +0000)] 
S/390: Implement vector copysign.

This patch implements the vector copysign operation using vector select and a
signbit mask.

gcc/ChangeLog:

2019-02-08  Robin Dapp  <rdapp@linux.ibm.com>

* config/s390/vector.md: Implement vector copysign.

gcc/testsuite/ChangeLog:

2019-02-08  Robin Dapp  <rdapp@linux.ibm.com>

* gcc.target/s390/vector/vec-copysign-execute.c: New test.
* gcc.target/s390/vector/vec-copysign.c: New test.

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

6 years agoexpr.c: Correct indentations in expand_constructor
hjl [Fri, 8 Feb 2019 14:19:09 +0000 (14:19 +0000)] 
expr.c: Correct indentations in expand_constructor

* expr.c (expand_constructor): Correct indentations.

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

6 years ago2019-02-08 Richard Biener <rguenther@suse.de>
rguenth [Fri, 8 Feb 2019 13:21:36 +0000 (13:21 +0000)] 
2019-02-08  Richard Biener  <rguenther@suse.de>

PR tree-optimization/89247
* tree-if-conv.c: Include tree-cfgcleanup.h.
(version_loop_for_if_conversion): Record LOOP_VECTORIZED call.
(tree_if_conversion): Pass through predicate vector.
(pass_if_conversion::execute): Do CFG cleanup and SSA update
inline, see if any if-converted loops we refrece in
LOOP_VECTORIZED calls vanished and fixup.
* tree-if-conv.h (tree_if_conversion): Adjust prototype.

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

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

6 years agoS/390: Introduce jdd constraint
iii [Fri, 8 Feb 2019 12:39:27 +0000 (12:39 +0000)] 
S/390: Introduce jdd constraint

Implementation of section anchors in S/390 back-end added in r266741
broke jump labels in S/390 Linux kernel [1].  Currently jump labels
pass global variable addresses to .quad directive in inline assembly
using "X" constraint.  In the past this used to produce regular symbol
references, however, after r266741 we sometimes get values like
(plus (reg) (const_int)), where (reg) points to a section anchor.
Strictly speaking, this is still correct, since "X" accepts anything.
Thus, now we need another way to support jump labels.

The existing "i" constraint cannot be used, since with -fPIC it must
not accept non-local symbols, however, jump labels do require that,
e.g. __tracepoint_xdp_exception from kernel proper might be referenced
from kernel modules.

The existing "ZL" constraint cannot be used for the same reason.

The existing "b" constraint cannot be used because of the way
expand_asm_stmt works.  It deduces whether the constraint allows
regs, subregs or mems, and processes asm operands differently based on
that.  "b" is supposed to accept values like (mem (symbol_ref)), and
there appears to be no way to explain to expand_asm_stmt that for "b"
mem's address must not be in a register.

This patch introduces the new machine-specific constraint named "jdd" -
"j" prefix is already used for constants, and "d" stands for "data".
It accepts anything that fits into the data section, whether or not
this might require a relocation, that is, anything that passes
CONSTANT_P check.

[1] https://lkml.org/lkml/2019/1/23/346

gcc/ChangeLog:

2019-02-08  Ilya Leoshkevich  <iii@linux.ibm.com>

* config/s390/constraints.md (jdd): New constraint.

gcc/testsuite/ChangeLog:

2019-02-08  Ilya Leoshkevich  <iii@linux.ibm.com>

* gcc.target/s390/jump-label.c: New test.

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

6 years ago2019-02-08 Richard Biener <rguenther@suse.de>
rguenth [Fri, 8 Feb 2019 11:56:28 +0000 (11:56 +0000)] 
2019-02-08  Richard Biener  <rguenther@suse.de>

PR testsuite/89250
* gcc.dg/vect/vect-24.c: Remove XFAIL on vect_condition targets.

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

6 years ago * gcc-interface/trans.c (gnat_to_gnu) <N_Aggregate>: Minor tweak.
ebotcazou [Fri, 8 Feb 2019 11:37:40 +0000 (11:37 +0000)] 
* gcc-interface/trans.c (gnat_to_gnu) <N_Aggregate>: Minor tweak.
* gcc-interface/utils.c (convert): Do not pad when doing an unchecked
conversion here.  Use TREE_CONSTANT throughout the function.
(unchecked_convert): Also pad if the source is a CONSTRUCTOR and the
destination is a more aligned array type or a larger aggregate type,
but not between original and packable versions of a type.

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

6 years agoi386: Use OI/TImode in *mov[ot]i_internal_avx with AVX512VL
hjl [Fri, 8 Feb 2019 11:30:53 +0000 (11:30 +0000)] 
i386: Use OI/TImode in *mov[ot]i_internal_avx with AVX512VL

OImode and TImode moves must be done in XImode to access upper 16
vector registers without AVX512VL.  With AVX512VL, we can access
upper 16 vector registers in OImode and TImode.

PR target/89229
* config/i386/i386.md (*movoi_internal_avx): Set mode to XI for
upper 16 vector registers without TARGET_AVX512VL.
(*movti_internal): Likewise.

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

6 years ago * gcc-interface/utils.c (max_size) <tcc_unary>: Be prepared for an
ebotcazou [Fri, 8 Feb 2019 11:20:23 +0000 (11:20 +0000)] 
* gcc-interface/utils.c (max_size) <tcc_unary>: Be prepared for an
operand with VOID_TYPE.

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

6 years ago * gcc-interface/trans.c (elaborate_all_entities): Do not elaborate the
ebotcazou [Fri, 8 Feb 2019 11:19:51 +0000 (11:19 +0000)] 
* gcc-interface/trans.c (elaborate_all_entities): Do not elaborate the
entities of a package renaming another one.

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

6 years ago * gcc-interface/trans.c (Regular_Loop_to_gnu): Replace tests on
ebotcazou [Fri, 8 Feb 2019 11:07:08 +0000 (11:07 +0000)] 
* gcc-interface/trans.c (Regular_Loop_to_gnu): Replace tests on
individual flag_unswitch_loops and flag_tree_loop_vectorize switches
with test on global optimize switch.
(Raise_Error_to_gnu): Likewise.

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

6 years ago PR rtl-optimization/89234
jakub [Fri, 8 Feb 2019 10:26:33 +0000 (10:26 +0000)] 
PR rtl-optimization/89234
* except.c (copy_reg_eh_region_note_forward): Return if note_or_insn
is a NOTE, CODE_LABEL etc. - rtx_insn * other than INSN_P.
(copy_reg_eh_region_note_backward): Likewise.

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

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

6 years ago[libbacktrace] Declare external backtrace fns noinline
vries [Fri, 8 Feb 2019 09:49:06 +0000 (09:49 +0000)] 
[libbacktrace] Declare external backtrace fns noinline

The backtrace functions backtrace_full, backtrace_print and backtrace_simple
walk the call stack, but make sure to skip the first entry, in order to skip
over the functions themselves, and start the backtrace at the caller of the
functions.

When compiling with -flto, the functions may be inlined, causing them to skip
over the caller instead.

Fix this by declaring the functions with __attribute__((noinline)).

2019-02-08  Tom de Vries  <tdevries@suse.de>

* backtrace.c (backtrace_full): Declare with __attribute__((noinline)).
* print.c (backtrace_print): Same.
* simple.c (backtrace_simple): Same.

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

6 years ago2019-02-08 Richard Biener <rguenther@suse.de>
rguenth [Fri, 8 Feb 2019 08:18:09 +0000 (08:18 +0000)] 
2019-02-08  Richard Biener  <rguenther@suse.de>

PR middle-end/89223
* tree-data-ref.c (initialize_matrix_A): Fail if constant
doesn't fit in HWI.
(analyze_subscript_affine_affine): Handle failure from
initialize_matrix_A.

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

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

6 years ago * cfganal.c (pre_and_rev_post_order_compute_fn): Use fn instead of
jakub [Fri, 8 Feb 2019 07:14:57 +0000 (07:14 +0000)] 
* cfganal.c (pre_and_rev_post_order_compute_fn): Use fn instead of
cfun everywhere.

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

6 years ago[libbacktrace] Handle DW_FORM_ref_addr
vries [Fri, 8 Feb 2019 05:55:44 +0000 (05:55 +0000)] 
[libbacktrace] Handle DW_FORM_ref_addr

Add handling of the DW_FORM_ref_addr encoding to libbacktrace.

2019-02-08  Tom de Vries  <tdevries@suse.de>

PR libbacktrace/78063
* dwarf.c (build_address_map): Keep all parsed units.
(read_referenced_name_from_attr): Handle DW_FORM_ref_addr.

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

6 years agoDaily bump.
gccadmin [Fri, 8 Feb 2019 00:16:26 +0000 (00:16 +0000)] 
Daily bump.

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

6 years agoFix more ICEs in -fsave-optimization-record (PR tree-optimization/89235)
dmalcolm [Thu, 7 Feb 2019 23:00:18 +0000 (23:00 +0000)] 
Fix more ICEs in -fsave-optimization-record (PR tree-optimization/89235)

PR tree-optimization/89235 reports an ICE inside -fsave-optimization-record
whilst reporting the inlining chain of of the location_t in the
vect_location global.

This is very similar to PR tree-optimization/86637, fixed in r266821.

The issue is that the inlining chains are read from the location_t's
ad-hoc data, referencing GC-managed tree blocks, but the former are
not GC roots; it's simply assumed that old locations referencing dead
blocks never get used again.

The fix is to reset the "vect_location" global in more places.  Given
that is a somewhat subtle detail, the patch adds a sentinel class to
reset vect_location at the end of a scope.  Doing it as a class
simplifies the task of ensuring that the global is reset on every
exit path from a function, and also gives a good place to signpost
the above subtlety (in the documentation for the class).

The patch also adds test cases for both of the PRs mentioned above.

gcc/testsuite/ChangeLog:
PR tree-optimization/86637
PR tree-optimization/89235
* gcc.c-torture/compile/pr86637-1.c: New test.
* gcc.c-torture/compile/pr86637-2.c: New test.
* gcc.c-torture/compile/pr86637-3.c: New test.
* gcc.c-torture/compile/pr89235.c: New test.

gcc/ChangeLog:
PR tree-optimization/86637
PR tree-optimization/89235
* tree-vect-loop.c (optimize_mask_stores): Add an
auto_purge_vect_location sentinel to ensure that vect_location is
purged on exit.
* tree-vectorizer.c
(auto_purge_vect_location::~auto_purge_vect_location): New dtor.
(try_vectorize_loop_1): Add an auto_purge_vect_location sentinel
to ensure that vect_location is purged on exit.
(pass_slp_vectorize::execute): Likewise, replacing the manual
reset.
* tree-vectorizer.h (class auto_purge_vect_location): New class.

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

6 years ago[AArch64] Change representation of SABD in RTL
ktkachov [Thu, 7 Feb 2019 18:18:16 +0000 (18:18 +0000)] 
[AArch64] Change representation of SABD in RTL

Richard raised a concern about the RTL we use to represent the AdvSIMD SABD
(vector signed absolute difference) instruction.
We currently represent it as ABS (MINUS op1 op2).

This isn't exactly what SABD does. ABS treats its input as a signed value
and returns the absolute of that.

For example:
(sabd:QI 64 -128) == 192 (unsigned) aka -64 (signed)
whereas
(minus:QI 64 -128) == 192 (unsigned) aka -64 (signed), (abs ...) of that is 64.

A better way to describe the instruction is with MINUS (SMAX (op1 op2) SMIN (op1 op2)).
This patch implements that, and also implements similar semantics for the UABD instruction
that uses UMAX and UMIN.

That way for the example above we'll have:
(minus:QI (smax:QI (64 -128)) (smin:QI (64 -128))) == (minus:QI 64 -128) == 192 (or -64 signed) which matches
what SABD does.

* config/aarch64/iterators.md (max_opp): New code_attr.
(USMAX): New code iterator.
* config/aarch64/predicates.md (aarch64_smin): New predicate.
(aarch64_smax): Likewise.
* config/aarch64/aarch64-simd.md (abd<mode>_3): Rename to...
(*aarch64_<su>abd<mode>_3): ... Change RTL representation to
MINUS (MAX MIN).

* gcc.target/aarch64/abd_1.c: New test.
* gcc.dg/sabd_1.c: Likewise.

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

6 years agoi386: Fix typo in *movoi_internal_avx/movti_internal
hjl [Thu, 7 Feb 2019 17:58:19 +0000 (17:58 +0000)] 
i386: Fix typo in *movoi_internal_avx/movti_internal

PR target/89229
* config/i386/i386.md (*movoi_internal_avx): Set mode to OI
for TARGET_AVX512VL.
(*movti_internal): Set mode to TI for TARGET_AVX512VL.

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

6 years ago2019-02-07 Dominique d'Humieres <dominiq@gcc.gnu.org>
dominiq [Thu, 7 Feb 2019 17:40:29 +0000 (17:40 +0000)] 
2019-02-07  Dominique d'Humieres  <dominiq@gcc.gnu.org>

PR fortran/52789
* gfortran.dg/wunused-parameter_2.f90: New test.

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

6 years agoOnly run on arm architecture
matmal01 [Thu, 7 Feb 2019 16:54:54 +0000 (16:54 +0000)] 
Only run on arm architecture

My previous patch failed to only run an arm test on arm architecture.
This adds that condition to the test.

gcc/testsuite/ChangeLog:

2019-02-07  Matthew Malcomson  <matthew.malcomson@arm.com>

* gcc.dg/rtl/arm/ldrd-peepholes.c: Only run on arm

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

6 years ago * libgnarl/s-linux__sparc.ads (ETIMEDOUT): Set to correct value.
ebotcazou [Thu, 7 Feb 2019 16:28:40 +0000 (16:28 +0000)] 
* libgnarl/s-linux__sparc.ads (ETIMEDOUT): Set to correct value.

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

6 years agoS/390: Fix the vec_xl / vec_xst style builtins
krebbel [Thu, 7 Feb 2019 15:53:38 +0000 (15:53 +0000)] 
S/390: Fix the vec_xl / vec_xst style builtins

This patch fixes several problems with the vec_xl/vec_xst builtins:

- vec_xl/vec_xst needs to use the alignment of the scalar memory
  operand for the vector type reference. This is required to emit the
  proper vl/vst alignment hints.
- vec_xl / vec_xld2 / vec_xlw4 should accept const pointer source operands
- vec_xlw4 / vec_xstw4 needs to accept float memory operands

gcc/ChangeLog:

2019-02-07  Andreas Krebbel  <krebbel@linux.ibm.com>

* config/s390/s390-builtin-types.def: Add new types.
* config/s390/s390-builtins.def: (s390_vec_xl, s390_vec_xld2)
(s390_vec_xlw4): Make the memory operand into a const pointer.
(s390_vec_xld2, s390_vec_xlw4): Add a variant for single precision
float.
* config/s390/s390-c.c (s390_expand_overloaded_builtin): Generate
a new vector type with the alignment of the scalar memory operand.

gcc/testsuite/ChangeLog:

2019-02-07  Andreas Krebbel  <krebbel@linux.ibm.com>

* gcc.target/s390/zvector/xl-xst-align-1.c: New test.
* gcc.target/s390/zvector/xl-xst-align-2.c: New test.

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

6 years ago[Patch] [arm] Fix 88714, Arm LDRD/STRD peepholes.
matmal01 [Thu, 7 Feb 2019 14:54:15 +0000 (14:54 +0000)] 
[Patch] [arm] Fix 88714, Arm LDRD/STRD peepholes.

These peepholes match a pair of SImode loads or stores that can be
implemented with a single LDRD or STRD instruction.
When compiling for TARGET_ARM, these peepholes originally created a set
pattern in DI mode to be caught by movdi patterns.

This approach failed to take into account the possibility that the two
matched insns operated on memory with different aliasing information.
The peepholes lost the aliasing information on one of the insns, which
could then cause the scheduler to make an invalid transformation.

This patch changes the peepholes so they generate a PARALLEL expression
of the two relevant loads or stores, which means the aliasing
information of both is kept.  Such a PARALLEL pattern is what the
peepholes currently produce for TARGET_THUMB2.

In order to match these new insn patterns, we add two new define_insn's.  These
define_insn's use the same checks as the peepholes to find valid insns.

Note that the patterns now created by the peepholes for LDRD and STRD
are very similar to those created by the peepholes for LDM and STM.
Many patterns could be matched by the LDM and STM define_insns, which
means we rely on the order the define_insn patterns are defined in the
machine description, with those for LDRD/STRD defined before those for
LDM/STM.

The difference between the peepholes for LDRD/STRD and those for LDM/STM
are mainly that those for LDRD/STRD have some logic to ensure that the
two registers are consecutive and the first one is even.

Bootstrapped and regtested on arm-none-linux-gnu.
Demonstrated fix of bug 88714 by bootstrapping on armv7l.

gcc/ChangeLog:

2019-02-07  Matthew Malcomson  <matthew.malcomson@arm.com>
    Jakub Jelinek  <jakub@redhat.com>

PR bootstrap/88714
* config/arm/arm-protos.h (valid_operands_ldrd_strd,
arm_count_ldrdstrd_insns): New declarations.
* config/arm/arm.c (mem_ok_for_ldrd_strd): Remove broken handling of
MINUS.
(valid_operands_ldrd_strd): New function.
(arm_count_ldrdstrd_insns): New function.
* config/arm/ldrdstrd.md: Change peepholes to generate PARALLEL SImode
sets instead of single DImode set and define new insns to match this.

gcc/testsuite/ChangeLog:

2019-02-07  Matthew Malcomson  <matthew.malcomson@arm.com>
    Jakub Jelinek  <jakub@redhat.com>

PR bootstrap/88714
* gcc.c-torture/execute/pr88714.c: New test.
* gcc.dg/rtl/arm/ldrd-peepholes.c: New test.

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

6 years agoAArch64: Fix initializer for array so it's a C initializer instead of C++.
tnfchris [Thu, 7 Feb 2019 11:05:22 +0000 (11:05 +0000)] 
AArch64: Fix initializer for array so it's a C initializer instead of C++.

This fixes a missing = that would cause the array initializer to be a C++
initializer instead of a C one, causing a warning when building with pre-C++11
standards compiler.

Committed under the GCC obvious rules.

gcc/ChangeLog:

* config/aarch64/aarch64-builtins.c (aarch64_fcmla_lane_builtin_data):
Make it a C initializer.

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

6 years agoArm: Fix NEON REG to REG reload failures. (PR/target 88850)
tnfchris [Thu, 7 Feb 2019 10:05:57 +0000 (10:05 +0000)] 
Arm: Fix NEON REG to REG reload failures. (PR/target 88850)

We currently return cost 2 for NEON REG to REG moves, which would be incorrect
for 64 bit moves.  We currently don't have a pattern for this in the neon_move
alternatives because this is a bit of a special case.  We would almost never
want it to use this r -> r pattern unless it really has no choice.

As such we add a new neon r -> r move pattern but also hide it from being used
to determine register preferences and also disparage it during LRA.

gcc/ChangeLog:

PR/target 88850
* config/arm/neon.md (*neon_mov<mode>): Add r -> r case.

gcc/testsuite/ChangeLog:

PR/target 88850
* gcc.target/arm/pr88850.c: New test.

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

6 years ago[arm] Use neon_dot_q type for 128-bit V[US]DOT instructions where appropriate
ktkachov [Thu, 7 Feb 2019 09:32:46 +0000 (09:32 +0000)] 
[arm] Use neon_dot_q type for 128-bit V[US]DOT instructions where appropriate

For the Dot Product instructions we have the scheduling types neon_dot and neon_dot_q for the 128-bit versions.
It seems that we're only using the former though, not assigning the neon_dot_q type anywhere.

This patch fixes that by adding the <q> mode attribute suffix to the type, similar to how we do it for other
types in neon.md.

* config/arm/neon.md (neon_<sup>dot<vsi2qi>):
Use neon_dot<q> for type.
(neon_<sup>dot_lane<vsi2qi>): Likewise.

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

6 years ago[AArch64] Use neon_dot_q type for 128-bit [US]DOT instructions where appropriate
ktkachov [Thu, 7 Feb 2019 09:31:33 +0000 (09:31 +0000)] 
[AArch64] Use neon_dot_q type for 128-bit [US]DOT instructions where appropriate

For the Dot Product instructions we have the scheduling types neon_dot and neon_dot_q for the 128-bit versions.
It seems that we're only using the former though, not assigning the neon_dot_q type anywhere.

This patch fixes that by adding the <q> mode attribute suffix to the type, similar to how we do it for other
types in aarch64-simd.md.

* config/aarch64/aarch64-simd.md (aarch64_<sur>dot<vsi2qi>):
Use neon_dot<q> for type.
(aarch64_<sur>dot_lane<vsi2qi>): Likewise.
(aarch64_<sur>dot_laneq<vsi2qi>): Likewise.

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

6 years ago[PR86218] handle ck_aggr in compare_ics in both and either conversion
aoliva [Thu, 7 Feb 2019 07:50:42 +0000 (07:50 +0000)] 
[PR86218] handle ck_aggr in compare_ics in both and either conversion

Because of rank compares, and checks for ck_list, we know that if we
see user_conv_p or ck_list in ics1, we'll also see it in ics2.  This
reasoning does not extend to ck_aggr, however, so we might have
ck_aggr conversions starting both ics1 and ics2, which we handle
correctly, or either, which we likely handle by crashing on whatever
path we take depending on whether ck_aggr is in ics1 or ics2.

We crash because, as we search the conversion sequences, we may very
well fail to find what we are looking for, and reach the end of the
sequence, which is unexpected in all paths.

This patch arranges for us to take the same path when ck_aggr is in
ics2 only that we would if it was in ics1 (regardless of ics2), and it
deals with not finding the kind of conversion we look for there.

I've changed the type of the literal constant in the testcase, so as
to hopefully make it well-formed.  We'd fail to reject the narrowing
conversion in the original testcase, but that's a separate bug.

for  gcc/cp/ChangeLog

PR c++/86218
* call.c (compare_ics): Deal with ck_aggr in either cs.

for  gcc/testsuite/ChangeLog

PR c++/86218
* g++.dg/cpp0x/pr86218.C: New.

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

6 years ago os, syscall: Hurd fixes for a couple of tests
ian [Thu, 7 Feb 2019 05:02:26 +0000 (05:02 +0000)] 
os, syscall: Hurd fixes for a couple of tests

    Based on patch by Svante Signell.

    Reviewed-on: https://go-review.googlesource.com/c/161520

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

6 years ago os, net, crypto/x509: add hurd support
ian [Thu, 7 Feb 2019 04:45:01 +0000 (04:45 +0000)] 
os, net, crypto/x509: add hurd support

    Patch by Svante Signell.

    Reviewed-on: https://go-review.googlesource.com/c/161519

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

6 years ago syscall: add Hurd support
ian [Thu, 7 Feb 2019 03:11:47 +0000 (03:11 +0000)] 
syscall: add Hurd support

    Loosely based on a patch by Svante Signell.

    Reviewed-on: https://go-review.googlesource.com/c/161518

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

6 years ago internal/syscall/unix: add constants for hurd
ian [Thu, 7 Feb 2019 02:22:57 +0000 (02:22 +0000)] 
internal/syscall/unix: add constants for hurd

    Patch by Svante Signell.

    Reviewed-on: https://go-review.googlesource.com/c/161517

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

6 years agoDaily bump.
gccadmin [Thu, 7 Feb 2019 00:16:25 +0000 (00:16 +0000)] 
Daily bump.

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

6 years ago2019-02-06 Vladimir Makarov <vmakarov@redhat.com>
vmakarov [Wed, 6 Feb 2019 21:48:45 +0000 (21:48 +0000)] 
2019-02-06  Vladimir Makarov  <vmakarov@redhat.com>

PR rtl-optimization/89225
* lra-constaints.c (simplify_operand_subreg): Add subreg mode
sizes check.

2019-02-06  Vladimir Makarov  <vmakarov@redhat.com>

PR rtl-optimization/89225
* gcc.target/powerpc/pr89225.c: New.

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

6 years ago * config/i386/i386.c (ix86_expand_prologue): Emit a memory blockage
ebotcazou [Wed, 6 Feb 2019 21:03:03 +0000 (21:03 +0000)] 
* config/i386/i386.c (ix86_expand_prologue): Emit a memory blockage
after restoring registers saved to allocate the frame on Windows.

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

6 years ago * eo.po: Update.
jsm28 [Wed, 6 Feb 2019 21:02:28 +0000 (21:02 +0000)] 
* eo.po: Update.

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

6 years ago PR go/89199
ian [Wed, 6 Feb 2019 20:46:00 +0000 (20:46 +0000)] 
PR go/89199
    sync/atomic: use strong form of atomic_compare_exchange_n

    In the recent change to use atomic_compare_exchange_n I thought we
    could use the weak form, which can spuriously fail. But that is not
    how it is implemented in the gc library, and it is not what the rest
    of the library expects.

    Thanks to Lynn Boger for identifying the problem.

    Fixes https://gcc.gnu.org/PR89199

    Reviewed-on: https://go-review.googlesource.com/c/161359

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

6 years ago2019-02-06 Thomas Koenig <tkoenig@gcc.gnu.org>
tkoenig [Wed, 6 Feb 2019 20:34:42 +0000 (20:34 +0000)] 
2019-02-06  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/71860
* gfortran.dg/null_10.f90: New test.

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

6 years agoFix locations in conversion_null_warnings (PR c++/71302)
dmalcolm [Wed, 6 Feb 2019 19:44:52 +0000 (19:44 +0000)] 
Fix locations in conversion_null_warnings (PR c++/71302)

PR c++/71302 reports that g++ shows poor locations for
-Wzero-as-null-pointer-constant for pointers in function calls,
using the close parenthesis of the call, rather than showing the
pertinent argument.

This particular case was fixed in GCC 8, but regressed on trunk
in r260973.

This patch fixes the regression, and adds column numbers to the
test cases (where they're correct) to avoid regressing them in the
future.  There are still various places where the locations aren't
correct, but fixing them isn't stage 4 material.

gcc/cp/ChangeLog:
PR c++/71302
* call.c (get_location_for_expr_unwinding_for_system_header): New
function.
(conversion_null_warnings): Use it when getting locations for
EXPR, effectively adding a call to
get_location_for_expr_unwinding_for_system_header for
-Wconversion-null and making use of EXPR_LOCATION for
-Wzero-as-null-pointer-constant.

gcc/testsuite/ChangeLog:
PR c++/71302
* g++.dg/cpp0x/Wzero-as-null-pointer-constant-1.C: Add expected
column numbers to dg-warning directives where they are correct.
* g++.dg/warn/Wzero-as-null-pointer-constant-5.C: Likewise.
* g++.dg/warn/Wzero-as-null-pointer-constant-7.C: Likewise.
* g++.dg/warn/Wzero-as-null-pointer-constant-8.C: New test.

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

6 years agoFix gcc.dg/debug/dwarf2/inline5.c with Solaris as (PR debug/87451)
ro [Wed, 6 Feb 2019 18:54:16 +0000 (18:54 +0000)] 
Fix gcc.dg/debug/dwarf2/inline5.c with Solaris as (PR debug/87451)

PR debug/87451
* gcc.dg/debug/dwarf2/inline5.c: Allow for non-comment before
"(DIE (0x[0-9a-f]*) DW_TAG_variable".
xfail scan-assembler-not with Solaris as.

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

6 years ago * ru.po: Update.
jsm28 [Wed, 6 Feb 2019 17:41:59 +0000 (17:41 +0000)] 
* ru.po: Update.

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

6 years agoPR libstdc++/89102 fix common_type<> and common_type<T> specializations
redi [Wed, 6 Feb 2019 17:25:26 +0000 (17:25 +0000)] 
PR libstdc++/89102 fix common_type<> and common_type<T> specializations

This is a partial implementation of the revised std::common_type rules
from P0435R1.

PR libstdc++/89102 (partial)
* include/std/type_traits (common_type<>): Define.
(common_type<T>): Derive from common_type<T, T>.
* testsuite/20_util/common_type/requirements/explicit_instantiation.cc:
Test zero-length template argument list.
* testsuite/20_util/common_type/requirements/sfinae_friendly_1.cc:
Test additional single argument cases.
* testsuite/20_util/common_type/requirements/sfinae_friendly_2.cc:
Adjust expected error.

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

6 years ago2019-02-06 Bill Seurer <seurer@linux.vnet.ibm.com>
seurer [Wed, 6 Feb 2019 16:29:56 +0000 (16:29 +0000)] 
2019-02-06  Bill Seurer  <seurer@linux.vnet.ibm.com>

* gcc.target/powerpc/vsx-vector-6.p7.c: Update instruction
counts and target.
* gcc.target/powerpc/vsx-vector-6.p8.c: Update instruction
counts and target.
* gcc.target/powerpc/vsx-vector-6.p9.c: Update instruction
counts and target.

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

6 years ago README: update text to describe current status
ian [Wed, 6 Feb 2019 16:28:31 +0000 (16:28 +0000)] 
README: update text to describe current status

    Reviewed-on: https://go-review.googlesource.com/c/161338

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

6 years ago * libgnarl/s-linux__x32.ads: Resync list of signals with s-linux.ads
charlet [Wed, 6 Feb 2019 11:50:15 +0000 (11:50 +0000)] 
* libgnarl/s-linux__x32.ads: Resync list of signals with s-linux.ads

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

6 years ago2019-02-06 Richard Biener <rguenther@suse.de>
rguenth [Wed, 6 Feb 2019 11:18:33 +0000 (11:18 +0000)] 
2019-02-06  Richard Biener  <rguenther@suse.de>

PR tree-optimization/89182
* graphite.h (cached_scalar_evolution_in_region): Declare.
* graphite.c (struct seir_cache_key): New.
(struct sese_scev_hash): Likewise.
(seir_cache): New global.
(cached_scalar_evolution_in_region): New function.
(graphite_transform_loops): Allocate and release seir_cache.
* graphite-isl-ast-to-gimple.c (get_rename_from_scev): Use
cached_scalar_evolution_in_region.
* graphite-scop-detection.c (scop_detection::can_represent_loop):
Simplify.
(scop_detection::graphite_can_represent_expr: Use
cached_scalar_evolution_in_region.
(scop_detection::stmt_simple_for_scop_p): Likewise.
(find_params_in_bb): Likewise.
(gather_bbs::before_dom_children): Likewise.
* graphite-sese-to-poly.c (create_pw_aff_from_tree): Likewise.
(add_loop_constraints): Likewise.

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

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

6 years ago PR c/89211
jakub [Wed, 6 Feb 2019 09:17:55 +0000 (09:17 +0000)] 
PR c/89211
* c-parser.c (c_parser_declaration_or_fndef): Don't update
DECL_ARGUMENTS of d if it has been defined already.  Use a single if
instead of 3 nested ifs.

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

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

6 years ago PR middle-end/89210
jakub [Wed, 6 Feb 2019 09:16:19 +0000 (09:16 +0000)] 
PR middle-end/89210
* fold-const-call.c (fold_const_vec_convert): Pass true as last
operand to new_unary_operation only if both element types are integral
and it isn't a widening conversion.  Return NULL_TREE if
new_unary_operation failed.

* c-c++-common/builtin-convertvector-2.c: New test.

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

6 years agogcc/go:
ian [Wed, 6 Feb 2019 04:48:35 +0000 (04:48 +0000)] 
gcc/go:
        PR go/89019
        * go-gcc.cc (Gcc_backend::placeholder_struct_type): Mark
        placeholder structs as requiring structural equality.
        (Gcc_backend::set_placeholder_pointer_type): Propagate the
canonical type from the desired pointer type to the placeholder
pointer type.
gcc/testsuite/:
        * lib/go-torture.exp: Test compiling with -flto.

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

6 years agoFix type of extern array declared in inner scope with outer initialization shadowed...
jsm28 [Wed, 6 Feb 2019 01:51:29 +0000 (01:51 +0000)] 
Fix type of extern array declared in inner scope with outer initialization shadowed (PR c/88584).

As reported in bug 88584, if you have a file-scope array with external
linkage, initialized at file scope, and that array is shadowed at
block scope, and is declared again with external linkage and an
incomplete type in an inner scope, it is wrongly given a complete type
in that inner scope when the correct C semantics give it an incomplete
type (only the visible declarations contribute to the type in a given
scope).

In general, issues with the types of external linkage declarations
being different in different scopes were addressed by my fixes for bug
13801, for GCC 4.0.  In this case, however, the code in pushdecl
dealing with giving declarations the right type in each scope works
fine, and the type is subsequently modified by complete_array_type
called from finish_decl: finish_decl is trying to complete an array
type based on an initializer, but that's only correct for the original
initialization at file scope, not for such a declaration in an inner
scope (it's harmless but unnecessary in the case where the original
declaration is still visible in the inner scope).  Thus, this patch
changes finish_decl to stop this logic applying for such an external
declaration in an inner scope.  (An erroneous attempt to include an
initializer for an extern variable in an inner scope is diagnosed
elsewhere.)

This is a regression from GCC 3.4, which properly rejected the code in
question (quite likely by accident).

Bootstrapped with no regressions on x86_64-pc-linux-gnu.

gcc/c:
PR c/88584
* c-decl.c (finish_decl): Do not complete array types for arrays
with external linkage not at file scope.

gcc/testsuite:
PR c/88584
* gcc.dg/redecl-18.c: New test.

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