]> git.ipfire.org Git - thirdparty/gcc.git/log
thirdparty/gcc.git
6 years agodarwin, backport driver fixes.
Iain Sandoe [Fri, 2 Aug 2019 14:54:57 +0000 (14:54 +0000)] 
darwin, backport driver fixes.

272260,r272479 - Darwin, Driver - Improve processing of macosx-version-min=

For PR target/63810 some improvements were made in the parsing of
the version string at the point it's used to define the built-in
__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__. This is fine, but the
specs processing also uses the version, and specs version-compare
doesn't like leading zeros on components. This means that while we
succeed in processing -mmacosx-version-min=010.00002.000099 on compile
lines, it fails for any other line that uses the value as part of a spec
(in particular, link lines fail).

To fix this, we need to apply a bit of clean-up to the version that's
presented to the driver, and push that back into the command line opts.

The value can come from four places:
1. User-entered on the command line
2. User-entered as MACOSX_DEPLOYMENT_TARGET= environment var.
3. Absent those two
3a For self-hosting systems, look-up from the kernel
3b For cross-compilers, as a default supplied at configure time.

We apply the clean-up to all 4 (although it shouldn't really be needed
for the cases under 3).

We also supply a test-case that adapts to the target-version of the
system, so that the link requirements are met by the SDK in use (if you
try to link i686-darwin9 on an x86-64-darwin18 SDK, it will fail).

gcc/

2019-08-02  Iain Sandoe  <iain@sandoe.co.uk>

Backport from mainline
2019-06-19  Iain Sandoe  <iain@sandoe.co.uk>

* config/darwin-driver.c (darwin_driver_init): Fix off-by-one errors
in computing the number of options to be moved.

Backport from mainline
2019-06-13  Iain Sandoe  <iain@sandoe.co.uk>

* config/darwin-driver.c (validate_macosx_version_min): New.
(darwin_default_min_version): Cleanup and validate supplied version.
(darwin_driver_init): Likewise and push cleaned version into opts.

gcc/testsuite/

2019-08-02  Iain Sandoe  <iain@sandoe.co.uk>

2019-06-13  Iain Sandoe  <iain@sandoe.co.uk>

* gcc.dg/darwin-minversion-link.c: New test.

From-SVN: r274017

6 years agodarwin, x86, backport fix for missing .p2align.
Iain Sandoe [Fri, 2 Aug 2019 14:44:23 +0000 (14:44 +0000)] 
darwin, x86, backport fix for missing .p2align.

This fixes a number of testcases that expect use of
.p2align, which was omitted from the darwin X86 port
(but is available in all assemblers used with that).

2019-08-02  Iain Sandoe  <iain@sandoe.co.uk>

Backport from mainline
2019-05-31  Iain Sandoe  <iain@sandoe.co.uk>

* config/i386/darwin.h (ASM_OUTPUT_MAX_SKIP_ALIGN): New.

From-SVN: r274016

6 years agodarwin, objc, backport fix for objc header paths
Iain Sandoe [Fri, 2 Aug 2019 14:34:02 +0000 (14:34 +0000)] 
darwin, objc, backport fix for objc header paths

Don't try to prepend a sysroot for the gnu-objc headers, which
are compiler-relative.

Darwin is able to use two runtimes for objective-c; the
default is its native "NeXT" runtime, but also it can build
code using the "gnu-runtime". In order to do this, we have to
be able to find the gnu-runtime headers (which are installed
into the compiler's tree).

The process to do this is erroneously prepending the sysroot
to this when a sysroot is in force. The gnu-runtime headers have
never been installed in a Darwin (macOS) SDK so we must make
sure that they are found local to the compiler.

gcc/

2019-08-02  Iain Sandoe  <iain@sandoe.co.uk>

Backport from mainline
2019-05-18  Iain Sandoe  <iain@sandoe.co.uk>

* config/darwin-c.c (darwin_register_objc_includes): Do not
prepend the sysroot when building gnu-runtime header search
paths.

From-SVN: r274015

6 years agodarwin, backport fix for objc section switches.
Iain Sandoe [Fri, 2 Aug 2019 14:25:04 +0000 (14:25 +0000)] 
darwin, backport fix for objc section switches.

gcc/

2019-08-02  Iain Sandoe  <iain@sandoe.co.uk>

Backport from mainline
2019-05-18  Iain Sandoe  <iain@sandoe.co.uk>

* config/darwin.c (darwin_file_end): Use switch_to_section ()
instead of direct output of the asm.

From-SVN: r274014

6 years agoDarwin, ppc, backport build fix.
Iain Sandoe [Fri, 2 Aug 2019 14:19:42 +0000 (14:19 +0000)] 
Darwin, ppc, backport build fix.

libgcc/

2019-08-02  Iain Sandoe  <iain@sandoe.co.uk>

Backport from mainline.
2019-05-12  Iain Sandoe  <iain@sandoe.co.uk>

* config/rs6000/darwin-vecsave.S: Set .machine appropriately.

From-SVN: r274013

6 years agoPR c++/91230 - wrong error with __PRETTY_FUNCTION__ and generic lambda.
Marek Polacek [Fri, 2 Aug 2019 13:29:05 +0000 (13:29 +0000)] 
PR c++/91230 - wrong error with __PRETTY_FUNCTION__ and generic lambda.

* pt.c (value_dependent_expression_p): Consider __PRETTY_FUNCTION__
inside a template function value-dependent.

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

From-SVN: r274010

6 years agobackport: re PR tree-optimization/91280 (ICE in get_constraint_for_component_ref...
Richard Biener [Fri, 2 Aug 2019 12:07:33 +0000 (12:07 +0000)] 
backport: re PR tree-optimization/91280 (ICE in get_constraint_for_component_ref, at tree-ssa-structalias.c:3259 since r260354)

2019-08-02  Richard Biener  <rguenther@suse.de>

Backport from mainline
2019-07-31  Richard Biener  <rguenther@suse.de>

PR tree-optimization/91280
* tree-ssa-structalias.c (get_constraint_for_component_ref):
Decompose MEM_REF manually for offset handling.

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

2019-07-31  Richard Biener  <rguenther@suse.de>

PR tree-optimization/91293
* tree-vect-slp.c (vect_build_slp_tree_2): Do not swap operands
of reduction stmts.

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

From-SVN: r274007

6 years agobackport: [multiple changes]
Richard Biener [Fri, 2 Aug 2019 08:40:34 +0000 (08:40 +0000)] 
backport: [multiple changes]

2019-08-02  Richard Biener  <rguenther@suse.de>

Backport from mainline
2019-07-31  Richard Biener  <rguenther@suse.de>

PR tree-optimization/91178
* tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address):
Use tail-recursion.

* gcc.dg/torture/pr91178-2.c: New testcase.

2019-07-17  Richard Biener  <rguenther@suse.de>

PR tree-optimization/91178
* tree-ssa.c (release_defs_bitset): Iterate from higher to
lower SSA names to avoid quadratic behavior in the common case.
* tree-data-ref.c (split_constant_offset): Add limit argument
and pass it down.  Initialize it from PARAM_SSA_NAME_DEF_CHAIN_LIMIT.
(split_constant_offset_1): Add limit argument and use it to
limit SSA def walking.  Optimize the common plus/minus case.

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

2019-07-12  Martin Sebor  <msebor@redhat.com>

* doc/invoke.texi (ssa-name-def-chain-limit): Document new --param.
* params.def (PARAM_SSA_NAME_DEF_CHAIN_LIMIT): Add new --param.
* tree-vrp.c (vrp_prop::check_mem_ref): Use
PARAM_SSA_NAME_DEF_CHAIN_LIMIT.

* gcc.dg/Warray-bounds-43.c: New test.

From-SVN: r274000

6 years agoDaily bump.
GCC Administrator [Fri, 2 Aug 2019 00:16:11 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r273992

6 years agobackport: re PR c/91192 (non-deterministic ICE on invalid)
Jakub Jelinek [Thu, 1 Aug 2019 06:31:54 +0000 (08:31 +0200)] 
backport: re PR c/91192 (non-deterministic ICE on invalid)

Backported from mainline
2019-07-31  Jakub Jelinek  <jakub@redhat.com>

PR c/91192
* c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range
even if finish is UNKNOWN_LOCATION, just use start as finish in that
case.

From-SVN: r273967

6 years agobackport: re PR middle-end/91301 (ICE in omp_add_variable on random access iterator...
Jakub Jelinek [Thu, 1 Aug 2019 06:31:20 +0000 (08:31 +0200)] 
backport: re PR middle-end/91301 (ICE in omp_add_variable on random access iterator distribute parallel for private (iterator))

Backported from mainline
2019-07-31  Jakub Jelinek  <jakub@redhat.com>

PR middle-end/91301
* gimplify.c (gimplify_omp_for): If for class iterator on
distribute parallel for there is no data sharing clause
on inner_for_stmt, look for private clause on combined
parallel too and if found, move it to inner_for_stmt.

* testsuite/libgomp.c++/for-27.C: New test.

From-SVN: r273966

6 years agobackport: re PR middle-end/91216 (OpenMP ICE starting with r265930)
Jakub Jelinek [Thu, 1 Aug 2019 06:30:26 +0000 (08:30 +0200)] 
backport: re PR middle-end/91216 (OpenMP ICE starting with r265930)

Backported from mainline
2019-07-30  Jakub Jelinek  <jakub@redhat.com>

PR middle-end/91216
* omp-low.c (global_nonaddressable_vars): New variable.
(use_pointer_for_field): For global decls, if they are non-addressable,
remember it in the global_nonaddressable_vars bitmap, if they are
addressable and in the global_nonaddressable_vars bitmap, ignore their
TREE_ADDRESSABLE bit.
(omp_copy_decl_2): Clear TREE_ADDRESSABLE also on private copies of
vars in global_nonaddressable_vars bitmap.
(execute_lower_omp): Free global_nonaddressable_vars bitmap.

* gcc.dg/gomp/pr91216.c: New test.

From-SVN: r273965

6 years agobackport: re PR target/91150 (wrong code with -O -mavx512vbmi due to wrong writemask)
Jakub Jelinek [Thu, 1 Aug 2019 06:29:22 +0000 (08:29 +0200)] 
backport: re PR target/91150 (wrong code with -O -mavx512vbmi due to wrong writemask)

Backported from mainline
2019-07-30  Jakub Jelinek  <jakub@redhat.com>

PR target/91150
* config/i386/i386.c (expand_vec_perm_blend): Change mask type
from unsigned to unsigned HOST_WIDE_INT.  For E_V64QImode cast
comparison to unsigned HOST_WIDE_INT before shifting it left.

* gcc.target/i386/avx512bw-pr91150.c: New test.

From-SVN: r273964

6 years agobackport: re PR tree-optimization/91157 (ICE: verify_gimple failed (error: position...
Jakub Jelinek [Thu, 1 Aug 2019 06:28:19 +0000 (08:28 +0200)] 
backport: re PR tree-optimization/91157 (ICE: verify_gimple failed (error: position plus size exceeds size of referenced object in 'bit_field_ref'))

Backported from mainline
2019-07-17  Jakub Jelinek  <jakub@redhat.com>

PR tree-optimization/91157
* tree-vect-generic.c (expand_vector_comparison): Handle lhs being
a vector boolean with scalar mode.
(expand_vector_condition): Handle first operand being a vector boolean
with scalar mode.
(expand_vector_operations_1): For comparisons, don't bail out early
if the return type is vector boolean with scalar mode, but comparison
operand type is not.

* gcc.target/i386/avx512f-pr91157.c: New test.
* gcc.target/i386/avx512bw-pr91157.c: New test.

From-SVN: r273963

6 years ago[RS6000] PR91135, __linux__ not defined with -mcall-aixdesc on 9.x and ppc64
Alan Modra [Thu, 1 Aug 2019 05:57:12 +0000 (15:27 +0930)] 
[RS6000] PR91135, __linux__ not defined with -mcall-aixdesc on 9.x and ppc64

This patch makes the obvious fix for PR91135, and deletes extraneous
copies of GNU_USER_TARGET_D_OS_VERSIONS that appear in rs6000/linux.h
and rs6000/linux64.h.  Since all configurations using either of these
files also include linux.h there is no need to duplicate the macro.

PR target/91135
* config/rs6000/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Don't
define.
* config/rs6000/linux64.h (TARGET_OS_CPP_BUILTINS): Invoke
GNU_USER_TARGET_OS_CPP_BUILTINS for aixdesc abi.
(GNU_USER_TARGET_D_OS_VERSIONS): Don't define.

From-SVN: r273962

6 years agoDaily bump.
GCC Administrator [Thu, 1 Aug 2019 00:16:14 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r273959

6 years agoUse standard <float.h> macros in test
Jonathan Wakely [Wed, 31 Jul 2019 19:56:19 +0000 (20:56 +0100)] 
Use standard <float.h> macros in test

The <float.h> changes to define these for C++ have been backported, so
the test can use them now.

* testsuite/26_numerics/midpoint/floating.cc: Use standard macros
instead of GCC-specific ones.

From-SVN: r273950

6 years agoDefine C11 macros such as FLT_DECIMAL_DIG for C++17
Jonathan Wakely [Wed, 31 Jul 2019 19:56:16 +0000 (20:56 +0100)] 
Define C11 macros such as FLT_DECIMAL_DIG for C++17

Backport from mainline
2019-06-24  Jonathan Wakely  <jwakely@redhat.com>

* ginclude/float.h (FLT_DECIMAL_DIG, DBL_DECIMAL_DIG, LDBL_DECIMAL_DIG)
(FLT_HAS_SUBNORM, DBL_HAS_SUBNORM, LDBL_HAS_SUBNORM, FLT_TRUE_MIN)
(DBL_TRUE_MIN, LDBL_TRUE_MIN): Also define for C++17.

Backport from mainline
2019-06-24  Jonathan Wakely  <jwakely@redhat.com>

* testsuite/18_support/headers/cfloat/values_c++17.cc: New test.

From-SVN: r273949

6 years agoQualify call to prevent ADL
Jonathan Wakely [Wed, 31 Jul 2019 19:56:12 +0000 (20:56 +0100)] 
Qualify call to prevent ADL

Backport from mainline
2019-07-31  Jonathan Wakely  <jwakely@redhat.com>

* include/std/memory (make_obj_using_allocator): Qualify call to
uses_allocator_construction_args.

From-SVN: r273948

6 years agoPR libstdc++/91308 fix constraints on unique_ptr assignment
Jonathan Wakely [Wed, 31 Jul 2019 19:56:08 +0000 (20:56 +0100)] 
PR libstdc++/91308 fix constraints on unique_ptr assignment

Backport from mainline
2019-07-31  Jonathan Wakely  <jwakely@redhat.com>

PR libstdc++/91308
* include/bits/unique_ptr.h (unique_ptr::__safe_conversion_up): Remove
constraints on deleter that should only apply to the constructor.
(unique_ptr<T[], D>::__safe_conversion_up): Likewise.
(unique_ptr<T[], D>::unique_ptr(unique_ptr<U, D>&&)): Restore
constraints on deleter here.
* testsuite/20_util/unique_ptr/assign/91308.cc: New test.

From-SVN: r273947

6 years agoPR libstdc++/51333 Define recursive_init_error constructor non-inline
Jonathan Wakely [Wed, 31 Jul 2019 19:56:04 +0000 (20:56 +0100)] 
PR libstdc++/51333 Define recursive_init_error constructor non-inline

The recursive_init_error class is defined in a header, with an inline
constructor, but the definition of the vtable and destructor are not
exported from the shared library. With -fkeep-inline-functions the
constructor gets emitted in user code, and requires the (non-exported)
vtable. This fails to link.

As far as I can tell, the recursive_init_error class definition was
moved into <cxxabi.h> so it could be documented with Doxygen, not for
any technical reason. But now it's there (and documented), somebody
could be relying on it, by catching that type and possibly performing
derived-to-base conversions to the std::exception base class. So the
conservative fix is to leave the class definition in the header but make
the constructor non-inline. This still allows the type to be caught and
still defines its base class.

Backport from mainline
2019-07-29  Jonathan Wakely  <jwakely@redhat.com>

PR libstdc++/51333
* libsupc++/cxxabi.h (__gnu_cxx::recursive_init_error): Do not define
constructor inline.
* libsupc++/guard_error.cc (__gnu_cxx::recursive_init_error): Define
constructor.
* testsuite/18_support/51333.cc: New test.

From-SVN: r273946

6 years agoBackport PRs 91126, 91131, 91145, 91162, 91200
Richard Biener [Wed, 31 Jul 2019 15:40:36 +0000 (15:40 +0000)] 
Backport PRs 91126, 91131, 91145, 91162, 91200

2019-07-31  Richard Biener  <rguenther@suse.de>

Backport from mainline
2019-07-19  Richard Biener  <rguenther@suse.de>

PR tree-optimization/91200
* tree-ssa-phiopt.c (cond_store_replacement): Check we have
no PHI nodes in middle-bb.

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

2019-07-15  Richard Biener  <rguenther@suse.de>

PR middle-end/91162
* tree-cfg.c (move_block_to_fn): When releasing a virtual PHI
node make sure to replace all uses with something valid.

* gcc.dg/autopar/pr91162.c: New testcase.

2019-07-12  Richard Biener  <rguenther@suse.de>

PR tree-optimization/91145
* tree-vect-slp.c (vect_build_slp_tree_2): Fix reduction
chain check.

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

2019-07-11  Richard Biener  <rguenther@suse.de>

PR middle-end/91131
* gimplify.c (gimplify_compound_literal_expr): Force a temporary
when the object is volatile and we have not cleared it even though
there are no nonzero elements.

* gcc.target/i386/pr91131.c: New testcase.

2019-07-10  Richard Biener  <rguenther@suse.de>

PR tree-optimization/91126
* tree-ssa-sccvn.c (n_walk_cb_data::push_partial_def): Adjust
native encoding offset for BYTES_BIG_ENDIAN.
(vn_reference_lookup_3): Likewise.

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

From-SVN: r273939

6 years agoDaily bump.
GCC Administrator [Wed, 31 Jul 2019 00:16:19 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r273919

6 years agore PR fortran/91296 (ICE when passing complex number %re/%im as a procedure argument...
Steven G. Kargl [Tue, 30 Jul 2019 21:38:48 +0000 (21:38 +0000)] 
re PR fortran/91296 (ICE when passing complex number %re/%im as a procedure argument with -Waliasing.)

2019-07-30  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/91296
* interface.c (compare_actual_expr): When checking for aliasing, add
a case to handle REF_INQUIRY (e.g., foo(x%re, x%im) do not alias).

2019-07-30  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/91296
* gfortran.dg/pr91296.f90: New test.

From-SVN: r273916

6 years agobackport: re PR fortran/90786 (ICE on procedure pointer assignment to function with...
Thomas Koenig [Tue, 30 Jul 2019 19:11:03 +0000 (19:11 +0000)] 
backport: re PR fortran/90786 (ICE on procedure pointer assignment to function with class pointer result)

2019-07-29  Thomas Koenig  <tkoenig@gcc.gnu.org>
Paul Thomas <pault@gcc.gnu.org>

Backport from trunk
PR fortran/90786
PR fortran/90813
* trans-expr.c (pointer_assignment_is_proc_pointer) Remove as
it is very simple and only called from one place.
(gfc_trans_pointer_assignment): Rename non_proc_pointer_assign
as non_proc_ptr_assign. Assign to it directly, rather than call
to above, deleted function and use gfc_expr_attr instead of
only checking the reference chain.
* dump-parse-tree.c (show_global_symbol): New function.
(gfc_dump_global_symbols): New function.
* gfortran.h (gfc_traverse_gsymbol): Add prototype.
(gfc_dump_global_symbols): Likewise.
* invoke.texi: Document -fdump-fortran-global.
* lang.opt: Add -fdump-fortran-global.
* parse.c (gfc_parse_file): Handle flag_dump_fortran_global.
* symbol.c (gfc_traverse_gsymbol): New function.
* trans-decl.c (sym_identifier): New function.
(mangled_identifier): New function, doing most of the work
of gfc_sym_mangled_identifier.
(gfc_sym_mangled_identifier): Use mangled_identifier.  Add mangled
identifier to global symbol table.
(get_proc_pointer_decl): Use backend decl from global identifier
if present.

2019-07-29  Thomas Koenig  <tkoenig@gcc.gnu.org>
Paul Thomas <pault@gcc.gnu.org>

Backport from trunk
PR fortran/90786
PR fortran/90813
* gfortran.dg/proc_ptr_51.f90: New test.

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

6 years agobackport: i386-common.c: Use PROCESSOR_ZNVER2 scheduler for znver2.
Jan Hubicka [Tue, 30 Jul 2019 09:28:13 +0000 (11:28 +0200)] 
backport: i386-common.c: Use PROCESSOR_ZNVER2 scheduler for znver2.

Backport from mainline
2019-07-23  Jan Hubicka  <hubicka@ucw.cz>

* i386-common.c: Use PROCESSOR_ZNVER2 scheduler for znver2.
* config/i386/znver1.md: Enable patterns for znver2 and add store
variants which use extra AGU unit.

From-SVN: r273904

6 years agobackport: i386.c (ix86_option_override_internal): Default PARAM_AVOID_FMA_MAX_BITS...
Jan Hubicka [Tue, 30 Jul 2019 08:10:22 +0000 (10:10 +0200)] 
backport: i386.c (ix86_option_override_internal): Default PARAM_AVOID_FMA_MAX_BITS to 256 for znver2.

Backport from mainline
2019-07-23  Jan Hubicka  <hubicka@ucw.cz>

* config/i386/i386.c (ix86_option_override_internal): Default
PARAM_AVOID_FMA_MAX_BITS to 256 for znver2.
* config/i386/x86-tune.def (X86_TUNE_AVOID_256FMA_CHAINS): Set
for ZNVER2.

From-SVN: r273901

6 years agobackport: x86-tune-costs.h (znver2_memcpy): Update.
Jan Hubicka [Tue, 30 Jul 2019 08:03:43 +0000 (10:03 +0200)] 
backport: x86-tune-costs.h (znver2_memcpy): Update.

Backport from mainline
2019-07-23  Jan Hubicka  <hubicka@ucw.cz>

* config/i386/x86-tune-costs.h (znver2_memcpy): Update.
(znver2_costs): Update 256 bit SSE costs and multiplication.

From-SVN: r273900

6 years agoDaily bump.
GCC Administrator [Tue, 30 Jul 2019 00:16:12 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r273895

6 years agoDaily bump.
GCC Administrator [Mon, 29 Jul 2019 00:16:16 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r273863

6 years agoDaily bump.
GCC Administrator [Sun, 28 Jul 2019 00:16:55 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r273849

6 years agoDaily bump.
GCC Administrator [Sat, 27 Jul 2019 00:16:28 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r273842

6 years agoDefine __cpp_lib_endian feature test macro
Jonathan Wakely [Fri, 26 Jul 2019 13:37:00 +0000 (14:37 +0100)] 
Define __cpp_lib_endian feature test macro

This macro was added as part of moving std::endian from <type_traits> to
<bit>.

Backport from mainline
2019-07-26  Jonathan Wakely  <jwakely@redhat.com>

* include/std/bit (__cpp_lib_endian): Define.
* include/std/version (__cpp_lib_endian): Define.
* testsuite/26_numerics/endian/2.cc: New.
* testsuite/26_numerics/endian/3.cc: New.
* testsuite/26_numerics/endian/4.cc: New.

From-SVN: r273838

6 years agoRelocate std::endian from <type_traits> to <bit>
Jonathan Wakely [Fri, 26 Jul 2019 13:36:56 +0000 (14:36 +0100)] 
Relocate std::endian from <type_traits> to <bit>

This change to an early C++2a feature was just approved (P1612R1).

Backport from mainline
2019-07-25  Jonathan Wakely  <jwakely@redhat.com>

* include/std/bit (endian): Move definition here as per P1612R1.
* include/std/type_traits (endian): Remove definition from here.
* testsuite/20_util/endian/1.cc: Rename to ...
* testsuite/26_numerics/endian/1.cc: ... here. Adjust header.

From-SVN: r273837

6 years agoAdjust std::rotl, std::rotr etc to match final P0553R4 proposal
Jonathan Wakely [Fri, 26 Jul 2019 13:36:52 +0000 (14:36 +0100)] 
Adjust std::rotl, std::rotr etc to match final P0553R4 proposal

This proposal has now been accepted for C++20, with a few changes. This
patch adjusts std::rotl and std::rotr to match the final specification
and declares the additions for C++2a mode even when __STRICT_ANSI__ is
defined.

Backport from mainline
2019-07-22  Jonathan Wakely  <jwakely@redhat.com>

* include/std/bit (__rotl, __rotr): Change second parameter from
unsigned int to int and handle negative values.
(rotl, rotr): Remove check for __STRICT_ANSI__. Change second
parameter from unsigned int to int. Add nodiscard attribute.
* testsuite/26_numerics/bit/bitops.rot/rotl.cc: Rename to ...
* testsuite/26_numerics/bit/bit.rotate/rotl.cc: Here. Test negative
shifts.
* testsuite/26_numerics/bit/bitops.rot/rotr.cc: Rename to ...
* testsuite/26_numerics/bit/bit.rotate/rotr.cc: Here. Test negative
shifts.

From-SVN: r273836

6 years agoChange std::ceil2 to be undefined if the result can't be represented
Jonathan Wakely [Fri, 26 Jul 2019 13:36:47 +0000 (14:36 +0100)] 
Change std::ceil2 to be undefined if the result can't be represented

Backport from mainline
2019-07-22  Jonathan Wakely  <jwakely@redhat.com>

* include/std/bit (__ceil2): Make unrepresentable results undefined,
as per P1355R2. Add debug assertion. Perform one left shift, not two,
so that out of range values cause undefined behaviour. Ensure that
shift will still be undefined if left operand is promoted.
* testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Replace checks for
unrepresentable values with checks that they are not core constant
expressions.
* testsuite/26_numerics/bit/bit.pow.two/ceil2_neg.cc: New test.

From-SVN: r273835

6 years agoRemove std::byte overloads from <bit>
Jonathan Wakely [Fri, 26 Jul 2019 13:36:44 +0000 (14:36 +0100)] 
Remove std::byte overloads from <bit>

The additional overloads for std::byte in <bit> were reviewed by LEWG
and considered undesirable, so this patch removes them.

Backport from mainline (partial)
2019-06-26  Jonathan Wakely  <jwakely@redhat.com>

* include/std/bit (rotl(byte, unsigned), rotr(byte, unsigned))
(countl_zero(byte), countl_one(byte), countr_zero(byte))
(countr_one(byte), popcount(byte), ispow2(byte), ceil2(byte))
(floor2(byte), log2p1(byte)): Remove.
* testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Remove test for
std::byte overload.
* testsuite/26_numerics/bit/bit.pow.two/floor2.cc: Likewise.
* testsuite/26_numerics/bit/bit.pow.two/ispow2.cc: Likewise.
* testsuite/26_numerics/bit/bit.pow.two/log2p1.cc: Likewise.
* testsuite/26_numerics/bit/bitops.count/countl_one.cc: Likewise.
* testsuite/26_numerics/bit/bitops.count/countl_zero.cc: Likewise.
* testsuite/26_numerics/bit/bitops.count/countr_one.cc: Likewise.
* testsuite/26_numerics/bit/bitops.count/countr_zero.cc: Likewise.
* testsuite/26_numerics/bit/bitops.count/popcount.cc: Likewise.
* testsuite/26_numerics/bit/bitops.rot/rotl.cc: Likewise.
* testsuite/26_numerics/bit/bitops.rot/rotr.cc: Likewise.

From-SVN: r273834

6 years agoAdd parens around constraint in <memory>.
Jonathan Wakely [Fri, 26 Jul 2019 13:36:39 +0000 (14:36 +0100)] 
Add parens around constraint in <memory>.

C++20 concepts require parens around atomic constraints that are not
primary-expressions.

Backport from mainline
2019-07-16  Jason Merrill  <jason@redhat.com>

* include/std/memory (uses_allocator_construction_args): Add parens
around constraint.

From-SVN: r273833

6 years agoFix preprocessor checks for Clang builtins
Jonathan Wakely [Fri, 26 Jul 2019 13:36:36 +0000 (14:36 +0100)] 
Fix preprocessor checks for Clang builtins

Clang seems to define built-ins that start with "__builtin_" as
non-keywords, which means that we need to use __has_builtin to detect
them, not __is_identifier. The built-ins that don't start with
"__builtin_" are keywords, and can only be detected using
__is_identifier and not by __has_builtin.

Backport from mainline
2019-07-02  Jonathan Wakely  <jwakely@redhat.com>

* include/bits/c++config (_GLIBCXX_HAVE_BUILTIN_LAUNDER)
(_GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED): Use __has_builtin
instead of __is_identifier to detect Clang support.

From-SVN: r273832

6 years agoAdd missing feature test macro to C++17 status table
Jonathan Wakely [Fri, 26 Jul 2019 13:36:33 +0000 (14:36 +0100)] 
Add missing feature test macro to C++17 status table

Backport from mainline
2019-05-23  Jonathan Wakely  <jwakely@redhat.com>

* doc/xml/manual/status_cxx2017.xml: Add feature test macro for
P0040R3.
* doc/html/*: Regenerate.

From-SVN: r273831

6 years agoFix outdated reference to C++17 draft in the docs
Jonathan Wakely [Fri, 26 Jul 2019 13:36:29 +0000 (14:36 +0100)] 
Fix outdated reference to C++17 draft in the docs

Backport from mainline
2019-06-20  Jonathan Wakely  <jwakely@redhat.com>

* doc/xml/manual/status_cxx2017.xml: Fix outdated reference to
C++17 working draft.

From-SVN: r273830

6 years agoFix std::midpoint for denormal values
Jonathan Wakely [Fri, 26 Jul 2019 13:36:25 +0000 (14:36 +0100)] 
Fix std::midpoint for denormal values

Backport from mainline
2019-06-25  Jonathan Wakely  <jwakely@redhat.com>

* include/std/numeric (midpoint(T, T)): Avoid std::abs in constexpr
function.

Backport from mainline
2019-06-24  Jonathan Wakely  <jwakely@redhat.com>

* include/std/numeric (midpoint(T, T)): Change implementation for
floating-point types to avoid incorrect rounding of denormals.
* testsuite/26_numerics/midpoint/floating.cc: Add check for correct
rounding with denormals.
* testsuite/26_numerics/gcd/gcd_neg.cc: Adjust dg-error line numbers.
* testsuite/26_numerics/lcm/lcm_neg.cc: Likewise.

From-SVN: r273829

6 years agoDaily bump.
GCC Administrator [Fri, 26 Jul 2019 00:16:21 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r273822

6 years agore PR plugins/90924 (lto-plugin/lto-plugin.c heap memory corruption due to insufficie...
Richard Biener [Thu, 25 Jul 2019 10:46:54 +0000 (10:46 +0000)] 
re PR plugins/90924 (lto-plugin/lto-plugin.c heap memory corruption due to insufficient sanitization.)

2019-07-25  Richard Biener  <rguenther@suse.de>

PR lto/90924
Backport from mainline
2019-07-12  Ren Kimura  <rkx1209dev@gmail.com>

* simple-object-elf.c (simple_object_elf_match): Check zero value
shstrndx.

From-SVN: r273793

6 years agoDaily bump.
GCC Administrator [Thu, 25 Jul 2019 00:16:21 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r273781

6 years agoFixup ChangeLog entry for revision 273754.
Bin Cheng [Wed, 24 Jul 2019 01:32:59 +0000 (01:32 +0000)] 
Fixup ChangeLog entry for revision 273754.

From-SVN: r273755

6 years agobackport: re PR tree-optimization/91137 (Wrong code with -O3)
Bin Cheng [Wed, 24 Jul 2019 01:28:33 +0000 (01:28 +0000)] 
backport: re PR tree-optimization/91137 (Wrong code with -O3)

        Backport from mainline
        2019-07-18  Bin Cheng  <bin.linux@linux.alibaba.com>

        PR tree-optimization/91137
        * tree-ssa-loop-ivopts.c (struct ivopts_data): New field.
        (tree_ssa_iv_optimize_init, alloc_iv, tree_ssa_iv_optimize_finalize):
        Init, use and fini the above new field.
        (determine_base_object_1): New function.
        (determine_base_object): Reimplement using walk_tree.

gcc/testsuite
        2019-07-18  Bin Cheng  <bin.linux@linux.alibaba.com>

        PR tree-optimization/91137
        * gcc.c-torture/execute/pr91137.c: New test.

From-SVN: r273754

6 years agoDaily bump.
GCC Administrator [Wed, 24 Jul 2019 00:16:20 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r273752

6 years agore PR rtl-optimization/91173 (ICE: in int_mode_for_mode, at stor-layout.c:403)
Matthew Beliveau [Tue, 23 Jul 2019 15:56:22 +0000 (15:56 +0000)] 
re PR rtl-optimization/91173 (ICE: in int_mode_for_mode, at stor-layout.c:403)

PR rtl-optimization/91173

Backported from mainline
2019-07-16  Jeff Law  <law@redhat.com>

PR rtl-optimization/91173
* tree-ssa-address.c (addr_for_mem_ref): If the base is an
SSA_NAME with a constant value, fold its value into the offset
and clear the base before calling gen_addr_rtx.
* g++.dg/pr91173.C: New test.

From-SVN: r273741

6 years agore PR debug/91231 (ICE in dwarf2out_inline_entry, at dwarf2out.c:27642)
Richard Biener [Tue, 23 Jul 2019 11:17:37 +0000 (11:17 +0000)] 
re PR debug/91231 (ICE in dwarf2out_inline_entry, at dwarf2out.c:27642)

2019-07-23  Richard Biener  <rguenther@suse.de>

PR debug/91231
* lto-streamer-in.c (input_function): Drop inline-entry markers
that ended up with an unknown location block.

From-SVN: r273734

6 years agobackport: re PR libfortran/91030 (Poor performance of I/O -fconvert=big-endian)
Thomas Koenig [Tue, 23 Jul 2019 08:57:45 +0000 (08:57 +0000)] 
backport: re PR libfortran/91030 (Poor performance of I/O -fconvert=big-endian)

2019-07-23  Thomas König  <tkoenig@gcc.gnu.org>

Backport from trunk
PR libfortran/91030
* gfortran.texi (GFORTRAN_FORMATTED_BUFFER_SIZE): Document.
(GFORTRAN_UNFORMATTED_BUFFER_SIZE): Likewise.

2019-07-23  Thomas König  <tkoenig@gcc.gnu.org>

Backport from trunk
PR libfortran/91030
* io/unix.c (BUFFER_SIZE): Delete.
(BUFFER_FORMATTED_SIZE_DEFAULT): New variable.
(BUFFER_UNFORMATTED_SIZE_DEFAULT): New variable.
(unix_stream): Add buffer_size.
(buf_read): Use s->buffer_size instead of BUFFER_SIZE.
(buf_write): Likewise.
(buf_init): Add argument unformatted.  Handle block sizes
for unformatted vs. formatted, using defaults if provided.
(fd_to_stream): Add argument unformatted in call to buf_init.
* libgfortran.h (options_t): Add buffer_size_formatted and
buffer_size_unformatted.
* runtime/environ.c (variable_table): Add
GFORTRAN_UNFORMATTED_BUFFER_SIZE and
GFORTRAN_FORMATTED_BUFFER_SIZE.

From-SVN: r273727

6 years agoDaily bump.
GCC Administrator [Tue, 23 Jul 2019 00:16:25 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r273711

6 years ago[rs6000] Add _mm_blend_epi16 and _mm_blendv_epi8
Paul A. Clarke [Mon, 22 Jul 2019 16:32:37 +0000 (16:32 +0000)] 
[rs6000] Add _mm_blend_epi16 and _mm_blendv_epi8

Add compatibility implementations of _mm_blend_epi16 and _mm_blendv_epi8
intrinsics.

Respective test cases are copied almost verbatim (minor changes to
the dejagnu head lines) from i386.

2019-07-22  Paul A. Clarke  <pc@us.ibm.com>

[gcc]

* config/rs6000/smmintrin.h (_mm_blend_epi16): New.
(_mm_blendv_epi8): New.

[gcc/testsuite]

* gcc.target/powerpc/sse4_1-check.h: New.
* gcc.target/powerpc/sse4_1-pblendvb.c: New.
* gcc.target/powerpc/sse4_1-pblendw.c: New.
* gcc.target/powerpc/sse4_1-pblendw-2.c: New.

From-SVN: r273704

6 years agoBackport r273660
Martin Liska [Mon, 22 Jul 2019 09:37:18 +0000 (11:37 +0200)] 
Backport r273660

2019-07-22  Martin Liska  <mliska@suse.cz>

Backport from mainline
2019-07-22  Martin Liska  <mliska@suse.cz>

PR driver/91172
* opts-common.c (decode_cmdline_option): Decode
argument of -Werror and check it for a wrong language.
* opts-global.c (complain_wrong_lang): Remove such case.
2019-07-22  Martin Liska  <mliska@suse.cz>

Backport from mainline
2019-07-22  Martin Liska  <mliska@suse.cz>

PR driver/91172
* gcc.dg/pr91172.c: New test.

From-SVN: r273664

6 years ago[ARC] Backport ix emitting TLS symbols.
Claudiu Zissulescu [Mon, 22 Jul 2019 07:21:24 +0000 (09:21 +0200)] 
[ARC] Backport ix emitting TLS symbols.

From-SVN: r273658

6 years agoDaily bump.
GCC Administrator [Mon, 22 Jul 2019 00:16:19 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r273655

6 years agoDaily bump.
GCC Administrator [Sun, 21 Jul 2019 00:16:12 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r273639

6 years agoFix -Wreturn-type for static naked functions in C
Richard Sandiford [Sat, 20 Jul 2019 18:50:20 +0000 (18:50 +0000)] 
Fix -Wreturn-type for static naked functions in C

This patch extends the fix for PR53633 to include static functions,
which were giving a bogus -Wreturn-type warning for C but not for C++.

2019-07-20  Richard Sandiford  <richard.sandiford@arm.com>

gcc/c/
Backport from mainline
2019-07-18  Richard Sandiford  <richard.sandiford@arm.com>

PR c/53633
* c-decl.c (finish_function): Check targetm.warn_func_return
before issuing a -Wreturn-type warning.

gcc/testsuite/
Backport from mainline
2019-07-18  Richard Sandiford  <richard.sandiford@arm.com>

* c-c++-common/pr53633-2.c: New test.

From-SVN: r273635

6 years agoFix folding of vector EQ/NE
Richard Sandiford [Sat, 20 Jul 2019 18:49:59 +0000 (18:49 +0000)] 
Fix folding of vector EQ/NE

For vector1 != vector2, we returned false if any elements were equal,
rather than if all elements were equal.

2019-07-20  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
Backport from mainline
2019-07-10  Richard Sandiford  <richard.sandiford@arm.com>

* fold-const.c (fold_relational_const): Fix folding of
vector-to-scalar NE_EXPRs.
(test_vector_folding): Add more tests.

From-SVN: r273634

6 years agoDaily bump.
GCC Administrator [Sat, 20 Jul 2019 00:16:11 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r273614

6 years agoPR c++/90098 - partial specialization and class non-type parms.
Jason Merrill [Fri, 19 Jul 2019 08:53:07 +0000 (04:53 -0400)] 
PR c++/90098 - partial specialization and class non-type parms.

A non-type template parameter of class type used in an expression has
const-qualified type; the pt.c hunks deal with this difference from the
unqualified type of the parameter declaration.  WAhen we use such a
parameter as an argument to another template, we don't want to confuse
things by copying it, we should pass it straight through.  And we might as
well skip copying other classes in constant evaluation context in a
template, too; we'll get the copy semantics at instantiation time.

PR c++/90099
PR c++/90101
* call.c (build_converted_constant_expr_internal): Don't copy.
* pt.c (process_partial_specialization): Allow VIEW_CONVERT_EXPR
around class non-type parameter.
(unify) [TEMPLATE_PARM_INDEX]: Ignore cv-quals.
(invalid_nontype_parm_type_p): Check for dependent class type.

From-SVN: r273597

6 years agoPR c++/85552 - wrong instantiation of dtor for DMI.
Jason Merrill [Fri, 19 Jul 2019 08:52:58 +0000 (04:52 -0400)] 
PR c++/85552 - wrong instantiation of dtor for DMI.

* typeck2.c (digest_nsdmi_init): Set tf_no_cleanup for direct-init.

From-SVN: r273596

6 years agoPR c++/63149 - wrong auto deduction from braced-init-list
Nina Dinka Ranns [Fri, 19 Jul 2019 08:52:50 +0000 (08:52 +0000)] 
PR c++/63149 - wrong auto deduction from braced-init-list

2019-06-04  Nina Dinka Ranns  <dinka.ranns@gmail.com>

    gcc/cp/
    * pt.c (listify_autos): Use non cv qualified auto_node in
    std::initializer_list<auto>.

    testsuite/
    * g++.dg/cpp0x/initlist-deduce2.C: New test.

From-SVN: r273595

6 years agoPR c++/82081 - tail call optimization breaks noexcept
Jason Merrill [Fri, 19 Jul 2019 08:52:41 +0000 (04:52 -0400)] 
PR c++/82081 - tail call optimization breaks noexcept

If a noexcept function calls a function that might throw, doing the tail
call optimization means that an exception thrown in the called function
will propagate out, breaking the noexcept specification.  So we need to
prevent the optimization in that case.

* tree-tailcall.c (find_tail_calls): Don't turn a call from a
nothrow function to a might-throw function into a tail call.

From-SVN: r273594

6 years agoDaily bump.
GCC Administrator [Fri, 19 Jul 2019 00:16:22 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r273589

6 years agoRISC-V: Fix splitter for 32-bit AND on 64-bit target.
Kito Cheng [Thu, 18 Jul 2019 07:00:32 +0000 (07:00 +0000)] 
RISC-V: Fix splitter for 32-bit AND on 64-bit target.

Fixes github.com/riscv/riscv-gcc issue #161.  We were accidentally using
BITS_PER_WORD to compute shift counts when we should have been using the
bitsize of the operand modes.  This was wrong when we had an SImode shift
and a 64-bit target.

Andrew Waterman  <andrew@sifive.com>
gcc/
* config/riscv/riscv.md (lshrsi3_zero_extend_3+1): Use operands[1]
bitsize instead of BITS_PER_WORD.
gcc/testsuite/
* gcc.target/riscv/shift-shift-2.c: Add one more test.

gcc/ChangeLog:
2019-07-18  Kito Cheng  <kito.cheng@sifive.com>

Backport from mainline
2019-07-08  Andrew Waterman  <andrew@sifive.com>
    Jim Wilson  <jimw@sifive.com>

* config/riscv/riscv.md (lshrsi3_zero_extend_3+1): Use operands[1]
bitsize instead of BITS_PER_WORD.
gcc/testsuite/

gcc/testsuite/ChangeLog:
2019-07-18  Kito Cheng  <kito.cheng@sifive.com>

Backport from mainline
2019-07-08  Jim Wilson  <jimw@sifive.com>

* gcc.target/riscv/shift-shift-2.c: Add one more test.

From-SVN: r273566

6 years agoDaily bump.
GCC Administrator [Thu, 18 Jul 2019 00:16:33 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r273561

6 years agopa.c (pa_som_asm_init_sections): Don't force all constant data into data section...
John David Anglin [Thu, 18 Jul 2019 00:10:27 +0000 (00:10 +0000)] 
pa.c (pa_som_asm_init_sections): Don't force all constant data into data section when generating PIC code.

* config/pa/pa.c (pa_som_asm_init_sections): Don't force all constant
data into data section when generating PIC code.
(pa_select_section): Use pa_reloc_rw_mask() to qualify relocs.
(pa_reloc_rw_mask): Return 3 when generating PIC code and when
generating code for SOM targets earlier than HP-UX 11.  Otherwise,
return 2 for SOM and 0 for other targets.

From-SVN: r273558

6 years agoS/390: Fix vector shift count operand
Andreas Krebbel [Wed, 17 Jul 2019 07:32:30 +0000 (07:32 +0000)] 
S/390: Fix vector shift count operand

We currently use subst definitions to handle the different variants of shift
count operands. Unfortunately, in the vector shift pattern the shift count
operand is used directly. Without it being adjusted for the 'subst' variants the
displacement value is omitted resulting in a wrong shift count being applied.

This patch needs to be applied to older branches as well.

gcc/ChangeLog:

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

Backport from mainline
2019-07-01  Andreas Krebbel  <krebbel@linux.ibm.com>

* config/s390/vector.md: Fix shift count operand printing.

gcc/testsuite/ChangeLog:

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

Backport from mainline
2019-07-01  Andreas Krebbel  <krebbel@linux.ibm.com>

* gcc.target/s390/vector/vec-shift-2.c: New test.

From-SVN: r273546

6 years agoDaily bump.
GCC Administrator [Wed, 17 Jul 2019 00:16:17 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r273540

6 years agoFix alignment option parser (PR90684)
Wilco Dijkstra [Tue, 16 Jul 2019 16:17:39 +0000 (16:17 +0000)] 
Fix alignment option parser (PR90684)

Fix the alignment option parser to always allow up to 4 alignments.
Now -falign-functions=16:8:8:8 no longer reports an error.

    gcc/
PR driver/90684
* gcc/opts.c (parse_and_check_align_values): Allow 4 alignment values.

From-SVN: r273533

6 years agoAdd missing testcase for PR89190
Wilco Dijkstra [Tue, 16 Jul 2019 12:12:01 +0000 (12:12 +0000)] 
Add missing testcase for PR89190

    testsuite/
PR target/89190
* gcc.target/arm/pr89190.c: New test.

From-SVN: r273525

6 years agoDo not use -Werror in a test that has -frepo warning (PR testsuite/91175).
Martin Liska [Tue, 16 Jul 2019 10:21:57 +0000 (12:21 +0200)] 
Do not use -Werror in a test that has -frepo warning (PR testsuite/91175).

2019-07-16  Martin Liska  <mliska@suse.cz>

PR testsuite/91175
* g++.old-deja/g++.pt/instantiate4.C: Do not use -Werror.

From-SVN: r273521

6 years agoDaily bump.
GCC Administrator [Tue, 16 Jul 2019 00:16:44 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r273504

6 years agoDeprecate -frepo on gcc-9 branch (PR c++/91125).
Martin Liska [Mon, 15 Jul 2019 04:11:43 +0000 (06:11 +0200)] 
Deprecate -frepo on gcc-9 branch (PR c++/91125).

2019-07-15  Martin Liska  <mliska@suse.cz>

PR c++/91125
* c-opts.c (c_common_handle_option): Warn the -frepo
will be removed in the future.
2019-07-15  Martin Liska  <mliska@suse.cz>

PR c++/91125
* g++.dg/parse/repo1.C: Add scan for the new warning.
* g++.dg/rtti/repo1.C: Likewise.
* g++.dg/template/repo1.C: Likewise.
* g++.dg/template/repo10.C: Likewise.
* g++.dg/template/repo11.C: Likewise.
* g++.dg/template/repo2.C: Likewise.
* g++.dg/template/repo3.C: Likewise.
* g++.dg/template/repo4.C: Likewise.
* g++.dg/template/repo5.C: Likewise.
* g++.dg/template/repo6.C: Likewise.
* g++.dg/template/repo7.C: Likewise.
* g++.dg/template/repo8.C: Likewise.
* g++.dg/template/repo9.C: Likewise.
* g++.old-deja/g++.pt/instantiate4.C: Likewise.
* g++.old-deja/g++.pt/instantiate6.C: Likewise.
* g++.old-deja/g++.pt/repo1.C: Likewise.
* g++.old-deja/g++.pt/repo2.C: Likewise.
* g++.old-deja/g++.pt/repo3.C: Likewise.
* g++.old-deja/g++.pt/repo4.C: Likewise.

From-SVN: r273489

6 years agoDaily bump.
GCC Administrator [Mon, 15 Jul 2019 00:16:14 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r273487

6 years agobackport: re PR c/91149 (GCC 9 and later incorrectly rejects OpenMP task reduction...
Jakub Jelinek [Sun, 14 Jul 2019 08:29:38 +0000 (10:29 +0200)] 
backport: re PR c/91149 (GCC 9 and later incorrectly rejects OpenMP task reduction-modifier on target parallel combined construct)

Backported from mainline
2019-07-13  Jakub Jelinek  <jakub@redhat.com>

PR c/91149
* c-omp.c (c_omp_split_clauses): Fix a pasto in
OMP_CLAUSE_REDUCTION_TASK handling.

* c-c++-common/gomp/reduction-task-3.c: New test.

From-SVN: r273478

6 years agobackport: re PR middle-end/78884 ([7/8] ICE when gimplifying VLA in OpenMP SIMD region)
Jakub Jelinek [Sun, 14 Jul 2019 08:28:06 +0000 (10:28 +0200)] 
backport: re PR middle-end/78884 ([7/8] ICE when gimplifying VLA in OpenMP SIMD region)

Backported from mainline
2019-07-04  Jakub Jelinek  <jakub@redhat.com>

PR middle-end/78884
* gimplify.c (struct gimplify_omp_ctx): Add add_safelen1 member.
(gimplify_bind_expr): If seeing TREE_ADDRESSABLE VLA inside of simd
loop body, set ctx->add_safelen1 instead of making it GOVD_PRIVATE.
(gimplify_adjust_omp_clauses): Add safelen (1) clause if
ctx->add_safelen1 is set.

* gcc.dg/gomp/pr78884.c: New test.

From-SVN: r273477

6 years agobackport: re PR rtl-optimization/90756 (g++ ICE in convert_move, at expr.c:218 on...
Jakub Jelinek [Sun, 14 Jul 2019 08:27:12 +0000 (10:27 +0200)] 
backport: re PR rtl-optimization/90756 (g++ ICE in convert_move, at expr.c:218 on i686 and s390x)

Backported from mainline
2019-07-04  Jakub Jelinek  <jakub@redhat.com>

PR rtl-optimization/90756
* explow.c (promote_ssa_mode): Always use TYPE_MODE, don't bypass it
for VECTOR_TYPE_P.

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

From-SVN: r273476

6 years agoDaily bump.
GCC Administrator [Sun, 14 Jul 2019 00:16:14 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r273473

6 years agoDaily bump.
GCC Administrator [Sat, 13 Jul 2019 00:16:20 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r273462

6 years agoTurn off ipa-ra in builtins test (PR91059)
Wilco Dijkstra [Fri, 12 Jul 2019 17:00:40 +0000 (17:00 +0000)] 
Turn off ipa-ra in builtins test (PR91059)

The gcc.c-torture/execute/builtins/lib directory contains a reimplementation
of many C library string functions, which causes non-trivial register allocation
bugs with LTO and static linked libraries.  To fix this long-standing test issue,
turn off ipa-ra which avoids the register corruption across calls.  All builtin
torture tests now pass on aarch64-none-elf.  Committed as obvious.
See PR78529 for more details.

    testsuite/
PR testsuite/78529
* gcc.c-torture/execute/builtins/builtins.exp: Add -fno-ipa-ra.

From-SVN: r273452

6 years agoBackport PRs 90369, 90900, 90914, 90972, 90982, 91004, 91062, 91063
Richard Biener [Fri, 12 Jul 2019 14:42:14 +0000 (14:42 +0000)] 
Backport PRs 90369, 90900, 90914, 90972, 90982, 91004, 91062, 91063

2019-07-12  Richard Biener  <rguenther@suse.de>

Backport from mainline
2019-07-04  Jakub Jelinek  <jakub@redhat.com>

PR tree-optimization/91063
* tree-vect-stmts.c (vect_init_vector): Call gsi_remove to remove
stmt from stmts sequence before calling vect_init_vector_1.
Formatting fix.

* gcc.dg/gomp/pr91063.c: New test.

2019-07-04  Richard Biener  <rguenther@suse.de>

PR ipa/91062
* tree-pass.h (execute_all_ipa_transforms): Add a flag
parameter whether to disable GC collection.
* passes.c (execute_one_ipa_transform_pass): Likewise, and
honor it.
(execute_all_ipa_transforms): Likewise and pass it down.
* cgraph.c (cgraph_node::get_body): Do not invoke garbage
collection from applying IPA transforms.
* cgraphunit.c (cgraph_node::expand): Allow garbage collection
from applying IPA transforms.

2019-06-27  Richard Biener  <rguenther@suse.de>

PR testsuite/91004
* g++.dg/torture/pr34850.C: Fix overly reduced testcase.

2019-06-26  Richard Biener  <rguenther@suse.de>

PR ipa/90982
* tree-inline.c (remap_ssa_name): Copy SSA range info.

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

2019-06-24  Richard Biener  <rguenther@suse.de>

PR tree-optimization/90972
* tree-vect-stmts.c (vect_init_vector): Handle CONSTANT_CLASS_P
in common code, dealing with STRING_CST properly.

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

2019-06-21  Richard Biener  <rguenther@suse.de>

PR debug/90914
* dwarf2out.c (prune_unused_types_walk): Always consider
function-local extern declarations as used.

* g++.dg/debug/pr90914.C: New testcase.

2019-06-18  Richard Biener  <rguenther@suse.de>

PR debug/90900
* cfgexpand.c (expand_debug_expr): Treat NOTE_P DECL_RTL
as if optimized away.

* gcc.dg/gomp/pr90900.c: New testcase.

2019-05-07  Richard Biener  <rguenther@suse.de>

PR lto/90369
* lto-wrapper.c (debug_objcopy): Use the original filename
including archive offset for the filename used for -save-temps.

From-SVN: r273446

6 years agore PR rtl-optimization/91136 (incorrect move of instruction to delay slot causes...
Eric Botcazou [Fri, 12 Jul 2019 10:16:11 +0000 (10:16 +0000)] 
re PR rtl-optimization/91136 (incorrect move of instruction to delay slot causes application crash in exception handling)

PR rtl-optimization/91136
* df-core.c (ACCESSING REFS): Fix typos in comment.
* resource.c (mark_target_live_reg): Add artificial defs that occur at
the beginning of the block to the initial set of live registers.

From-SVN: r273437

6 years agoDaily bump.
GCC Administrator [Fri, 12 Jul 2019 00:16:13 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r273428

6 years agobackport: pr81563.c (dg-final): Check that no registers are restored from %esp.
Uros Bizjak [Thu, 11 Jul 2019 20:52:25 +0000 (22:52 +0200)] 
backport: pr81563.c (dg-final): Check that no registers are restored from %esp.

Backported from mainline
2019-06-18  Uroš Bizjak  <ubizjak@gmail.com>

* gcc.target/i386/pr81563.c (dg-final): Check that no
registers are restored from %esp.

From-SVN: r273423

6 years agobackport: sse.md (*andnot<mode>3_bcst): Fix VI/VI48_AVX512VL typo.
Uros Bizjak [Thu, 11 Jul 2019 20:49:13 +0000 (22:49 +0200)] 
backport: sse.md (*andnot<mode>3_bcst): Fix VI/VI48_AVX512VL typo.

Backported from mainline
2019-07-06  Richard Sandiford  <richard.sandiford@arm.com>

* config/i386/sse.md (*andnot<mode>3_bcst): Fix VI/VI48_AVX512VL typo.

From-SVN: r273422

6 years agors6000: Handle Modula-2 in the traceback table
Segher Boessenkool [Thu, 11 Jul 2019 18:42:20 +0000 (20:42 +0200)] 
rs6000: Handle Modula-2 in the traceback table

This patch recognises Modula-2 as language for the traceback table,
fixing the problem shown in
https://gcc.gnu.org/ml/gcc-patches/2019-07/msg00848.html .

* config/rs6000/rs6000.c (rs6000_output_function_epilogue): Handle
Modula-2.

From-SVN: r273412

6 years agoDaily bump.
GCC Administrator [Thu, 11 Jul 2019 00:16:12 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r273374

6 years agoDaily bump.
GCC Administrator [Wed, 10 Jul 2019 00:16:16 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r273320

6 years agoDaily bump.
GCC Administrator [Tue, 9 Jul 2019 00:16:14 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r273259

6 years agore PR tree-optimization/91108 (Fails to pun through unions)
Richard Biener [Mon, 8 Jul 2019 11:48:48 +0000 (11:48 +0000)] 
re PR tree-optimization/91108 (Fails to pun through unions)

2019-07-08  Richard Biener  <rguenther@suse.de>

PR tree-optimization/91108
* tree-ssa-sccvn.c: Include builtins.h.
(vn_reference_lookup_3): Use only alignment constraints to
verify same-valued store disambiguation.

* gcc.dg/tree-ssa/pr91091-1.c: New testcase.
* gcc.dg/tree-ssa/ssa-fre-78.c: Likewise.

From-SVN: r273233

6 years agoDaily bump.
GCC Administrator [Mon, 8 Jul 2019 00:16:19 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r273189

6 years agore PR fortran/91077 (Wrong indexing when using a pointer)
Paul Thomas [Sun, 7 Jul 2019 14:32:53 +0000 (14:32 +0000)] 
re PR fortran/91077 (Wrong indexing when using a pointer)

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

PR fortran/91077
* trans-array.c (gfc_conv_scalarized_array_ref) Delete code
that gave symbol backend decl for subref arrays and deferred
length variables.

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

PR fortran/91077
* gfortran.dg/pointer_array_11.f90 : New test.

From-SVN: r273177

6 years agoDaily bump.
GCC Administrator [Sun, 7 Jul 2019 00:16:18 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r273172

6 years agoDaily bump.
GCC Administrator [Sat, 6 Jul 2019 00:16:31 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r273153

6 years agoaarch64: emit .variant_pcs for aarch64_vector_pcs symbol references
Szabolcs Nagy [Fri, 5 Jul 2019 15:06:11 +0000 (15:06 +0000)] 
aarch64: emit .variant_pcs for aarch64_vector_pcs symbol references

Backport r271869
Backport r271913
Backport r272414

A dynamic linker with lazy binding support may need to handle vector PCS
function symbols specially, so an ELF symbol table marking was
introduced for such symbols.

Function symbol references and definitions that follow the vector PCS
are marked in the generated assembly with .variant_pcs and then the
STO_AARCH64_VARIANT_PCS st_other flag is set on the symbol in the object
file.  The marking is propagated to the dynamic symbol table by the
static linker so a dynamic linker can handle such symbols specially.

For this to work, the assembler, the static linker and the dynamic
linker has to be updated on a system.  Old assembler does not support
the new .variant_pcs directive, so a toolchain with old binutils won't
be able to compile code that references vector PCS symbols.

gcc/ChangeLog:

* config/aarch64/aarch64-protos.h (aarch64_asm_output_alias): Declare.
(aarch64_asm_output_external): Declare.
* config/aarch64/aarch64.c (aarch64_asm_output_variant_pcs): New.
(aarch64_declare_function_name): Call aarch64_asm_output_variant_pcs.
(aarch64_asm_output_alias): New.
(aarch64_asm_output_external): New.
* config/aarch64/aarch64.h (ASM_OUTPUT_DEF_FROM_DECLS): Define.
(ASM_OUTPUT_EXTERNAL): Define.

gcc/testsuite/ChangeLog:

* gcc.target/aarch64/pcs_attribute-2.c: New test.
* gcc.target/aarch64/torture/simd-abi-4.c: Check .variant_pcs support.
* lib/target-supports.exp (check_effective_target_aarch64_variant_pcs):
New.

gcc/ChangeLog:

* config/aarch64/aarch64-protos.h (aarch64_asm_output_external): Remove
const.
* config/aarch64/aarch64.c (aarch64_asm_output_external): Call
default_elf_asm_output_external.

gcc/testsuite/ChangeLog:

* gcc.target/aarch64/pcs_attribute-2.c: Remove ifunc usage.
* gcc.target/aarch64/pcs_attribute-3.c: New test.

From-SVN: r273140

6 years agoDaily bump.
GCC Administrator [Fri, 5 Jul 2019 00:16:19 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r273099

6 years agos-osinte__kfreebsd-gnu.ads (clockid_t): Make type definition public.
James Clarke [Thu, 4 Jul 2019 13:36:08 +0000 (13:36 +0000)] 
s-osinte__kfreebsd-gnu.ads (clockid_t): Make type definition public.

2019-07-04  James Clarke <jrtc27@debian.org>

        * libgnarl/s-osinte__kfreebsd-gnu.ads (clockid_t): Make type
        definition public.
        (CLOCK_REALTIME): Make value public.

From-SVN: r273081

6 years agoBackport r272993
Martin Liska [Thu, 4 Jul 2019 09:03:56 +0000 (11:03 +0200)] 
Backport r272993

2019-07-04  Martin Liska  <mliska@suse.cz>

Backport from mainline
2019-07-03  Martin Liska  <mliska@suse.cz>

PR tree-optimization/90892
* builtins.c (inline_expand_builtin_string_cmp): Handle '\0'
in string constants.
2019-07-04  Martin Liska  <mliska@suse.cz>

Backport from mainline
2019-07-03  Martin Liska  <mliska@suse.cz>

PR tree-optimization/90892
* gcc.dg/pr90892.c: New test.

From-SVN: r273074