174523 Commits

Author SHA1 Message Date
Claudiu Zissulescu
2744b8b286 [ARC] Make libgcc compatible with ARC's reduced register set config.
ARC processors can work with a reduced register set (i.e. registers
r4-r9 and r16-r25 are not available). This option can be enabled
passing -mrf16 option to the compiler, or by using -mcpu=em_mini CPU
configuration. Using RF16 config requires all the hand-made assembly
files used in libgcc to have the corresponding RF16 object attribute
set.

This patch qualifies the relevant hand-made assembly files to
RF16 config, and also adds generic c-functions for the one which are
not.

libgcc/
xxxx-xx-xx  Claudiu Zissulescu  <claziss@synopsys.com>

	* config/arc/crti.S: Add RF16 object attribute.
	* config/arc/crtn.S: Likewise.
	* config/arc/crttls.S: Likewise.
	* config/arc/lib1funcs.S: Likewise.
	* config/arc/fp-hack.h (ARC_OPTFPE): Define.
	* config/arc/lib2funcs.c: New file.
	* config/arc/t-arc: Add lib2funcs to LIB2ADD.
2020-01-27 14:51:03 +02:00
Jonathan Wakely
389cd88ce7 libstdc++: Fix deduction guide for std::span (PR93426)
The deduction guide from an iterator and sentinel used the wrong alias
template and so didn't work.

	PR libstdc++/93426
	* include/std/span (span): Fix deduction guide.
	* testsuite/23_containers/span/deduction.cc: New test.
2020-01-27 10:55:19 +00:00
Richard Sandiford
e648e57efc lra: Stop registers being incorrectly marked live [PR92989]
lra_assign has an assert to make sure that no pseudo is allocated
to a conflicting hard register.  It used to be restricted to
!flag_ipa_ra, but in g:a1e6ee38e708ef2bdef4 I'd enabled it for
flag_ipa_ra too.  It then tripped while building libstdc++
for mips-mti-linux.

The failure was due to code at the end of process_bb_lives.  For an
abnormal/EH edge, we need to make sure that all pseudos that are live
on entry to the destination conflict with all hard registers that are
clobbered by an abnormal call return.  The usual way to do this would
be to simulate a clobber of the hard registers, by making them live and
them making them dead again.  Making the registers live creates the
conflict; making them dead again restores the correct live set for
whatever follows.

However, process_bb_lives skips the second step (making the registers
dead again) at the start of a BB, presumably on the basis that there's
no further code that needs a correct live set.  The problem for the PR
is that that wasn't quite true in practice.  There was code further
down process_bb_lives that updated the live-in set of the BB for some
registers, and this live set was "contaminated" by registers that
weren't live but that created conflicts.  This information then got
propagated to other blocks, so that registers that were made live
purely to create a conflict at the start of the EH receiver then became
needlessly live throughout preceding blocks.  This in turn created a
fake conflict with pseudos in those blocks, invalidating the choices
made by IRA.

The easiest fix seems to be to update the live-in set *before* adding
the fake live registers.  An alternative would be to simulate the full
clobber, but that seems a bit wasteful.

2020-01-27  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
	PR rtl-optimization/92989
	* lra-lives.c (process_bb_lives): Update the live-in set before
	processing additional clobbers.
2020-01-27 10:53:35 +00:00
Richard Sandiford
150760dd6d cselib: Fix handling of multireg values for call insns [PR93170]
g:3bd2918594dae34ae84f mishandled the case in which only the
tail end of a multireg hard register is invalidated by the call.
Walking all the entries should be both safer and more precise.

Avoiding cselib_invalidate_regno also means that we no longer
walk the same list multiple times (which is something we did
before g:3bd2918594dae34ae84f too).

2020-01-27  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
	PR rtl-optimization/93170
	* cselib.c (cselib_invalidate_regno_val): New function, split out
	from...
	(cselib_invalidate_regno): ...here.
	(cselib_invalidated_by_call_p): New function.
	(cselib_process_insn): Iterate over all the hard-register entries in
	REG_VALUES and invalidate any that cross call-clobbered registers.

gcc/testsuite/
	* gcc.dg/torture/pr93170.c: New test.
2020-01-27 10:53:34 +00:00
Richard Sandiford
7974a14692 dojump: Fix gcc.dg/torture/pr91323.c for aarch64 targets
PR91323 was fixed for x86 and sparc in target code, but aarch64
instead relies on the target-independent comparison splitters.
Since LTGT is an unordered-signalling operation, we should split
it into unordered-signalling operations for any input that could
be NaN, not just inputs that could be signalling NaNs.

2020-01-27  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
	* dojump.c (split_comparison): Use HONOR_NANS rather than
	HONOR_SNANS when splitting LTGT.
2020-01-27 10:53:33 +00:00
Martin Liska
e97a3063fb
Filter out language specific options from --help=common.
PR driver/91220
	* opts.c (print_filtered_help): Exclude language-specific
	options from --help=common unless enabled in all FEs.
2020-01-27 11:01:26 +01:00
Martin Liska
10fe5cbe00
Do not print params in --help except --help=param.
* opts.c (print_help): Exclude params from
	all except --help=param.
2020-01-27 11:00:53 +01:00
Martin Liska
c2bd2b4664
Do not generate a unique fnname for resolver.
PR target/93274
	* config/i386/i386-features.c (make_resolver_func):
	Align the code with ppc64 target implementation.
	Do not generate a unique name for resolver function.
	PR target/93274
	* gcc.target/i386/pr81213.c: Adjust to not expect
	a globally unique name.
2020-01-27 10:48:18 +01:00
Richard Biener
1442bc31da tree-optimization/93397 delay converted reduction chain adjustment
The following delays adjusting the SLP graph for converted reduction
chains to a point where the SLP build no longer can fail since we
otherwise fail to undo marking the conversion as a group.

2020-01-27  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/93397
	* tree-vect-slp.c (vect_analyze_slp_instance): Delay
	converted reduction chain SLP graph adjustment.

	* gcc.dg/torture/pr93397.c: New testcase.
2020-01-27 10:31:53 +01:00
Tobias Burnus
86075aa5dd fortran] Fix PR 85781, ICE on valid
PR fortran/85781
        * trans-expr.c (gfc_conv_substring): Handle non-ARRAY_TYPE strings
        of Bind(C) procedures.

        PR fortran/85781
        * gfortran.dg/bind_c_char_2.f90: New.
        * gfortran.dg/bind_c_char_3.f90: New.
        * gfortran.dg/bind_c_char_4.f90: New.
        * gfortran.dg/bind_c_char_5.f90: New.
2020-01-27 10:13:27 +01:00
Jason Merrill
40bf3f1fd0 c++: Testsuite adjustments for PR 90992.
It occurred to me that the NotNoexcept class is irrelevant to the issue I
was fixing, so let's remove it.
2020-01-26 21:37:01 -05:00
Jason Merrill
5035cd6624 c++: Fix -Wnoexcept handling of system headers (PR90992).
The immediate issue here was that the second warning didn't depend on the
first one, so if the first location was in a system header, we'd
mysteriously give the second by itself.

It's also the case that the thing we care about being in a system header is
the function that we want to suggest adding 'noexcept' to, not the
noexcept-expression; it's useful to suggest adding noexcept to a user
function to satisfy a noexcept-expression in a system header.

	PR c++/90992
	* except.c (maybe_noexcept_warning): Check DECL_IN_SYSTEM_HEADER and
	temporarily enable -Wsystem-headers.  Change second warning to
	conditional inform.
2020-01-26 21:26:17 -05:00
GCC Administrator
cf17dcc6fc Daily bump. 2020-01-27 00:16:48 +00:00
Marek Polacek
787c79e559 Fix last CL. 2020-01-26 16:32:30 -05:00
Marek Polacek
ab6cd364ed sanopt: Avoid crash on anonymous parameter [PR93436]
Here we crash when using -fsanitize=address -fdump-tree-sanopt because
the dumping code uses IDENTIFIER_POINTER on a null DECL_NAME.  Instead,
we can print "<anonymous>" in such a case.  Or we could avoid printing
that diagnostic altogether.

2020-01-26  Marek Polacek  <polacek@redhat.com>

	PR tree-optimization/93436
	* sanopt.c (sanitize_rewrite_addressable_params): Avoid crash on
	null DECL_NAME.
2020-01-26 16:28:10 -05:00
Iain Sandoe
8022264265 coroutines: Fix whitespace and comment markers.
This amends the cases where inline comments in function calls were
followed by a space.  It also fixes some uses of C++ style and wrongly
wrapped comment end markers.

gcc/cp/ChangeLog:

2020-01-26  Iain Sandoe  <iain@sandoe.co.uk>

* coroutines.cc: Amend whitespace after inline comments
throughout.  Ensure use of C-style comment markers.
2020-01-26 20:50:58 +00:00
Rainer Orth
9664b52aeb testsuite: xfail gcc.target/i386/pr91298-?.c on Solaris/x86 with as
The new gcc.target/i386/pr91298-?.c testcases FAIL on Solaris/x86 with the
native assembler:

FAIL: gcc.target/i386/pr91298-1.c (test for excess errors)

Excess errors:
Assembler: pr91298-1.c
        "/var/tmp//ccE6r3xb.s", line 5 : Syntax error
        Near line: "    .globl  $quux"
        "/var/tmp//ccE6r3xb.s", line 6 : Syntax error
        Near line: "    .type   $quux, @function"
        "/var/tmp//ccE6r3xb.s", line 7 : Syntax error
        Near line: "$quux:"
        "/var/tmp//ccE6r3xb.s", line 15 : Syntax error
        Near line: "    .size   $quux, .-$quux"
        "/var/tmp//ccE6r3xb.s", line 24 : Syntax error
        Near line: "    movl    $($a), %eax"
        "/var/tmp//ccE6r3xb.s", line 38 : Syntax error
        Near line: "    leal    ($a)(,%eax,4), %eax"
        "/var/tmp//ccE6r3xb.s", line 51 : Syntax error
        Near line: "    movl    ($a), %eax"
        "/var/tmp//ccE6r3xb.s", line 63 : Syntax error
        Near line: "    movl    ($a)+16, %eax"
        "/var/tmp//ccE6r3xb.s", line 97 : Syntax error
        Near line: "    movl    $($quux), %eax"
        "/var/tmp//ccE6r3xb.s", line 101 : Syntax error
        Near line: "    .globl  $a"
        "/var/tmp//ccE6r3xb.s", line 104 : Syntax error
        Near line: "    .type   $a, @object"
        "/var/tmp//ccE6r3xb.s", line 105 : Syntax error
        Near line: "    .size   $a, 72"
        "/var/tmp//ccE6r3xb.s", line 106 : Syntax error
        Near line: "$a:"
        "/var/tmp//ccE6r3xb.s", line 228 : Syntax error
        Near line: "    .long   ($a)"

FAIL: gcc.target/i386/pr91298-2.c (test for excess errors)

It only allows letters, digits, '_' and '.' in identifiers:
https://docs.oracle.com/cd/E37838_01/html/E61064/eqbsx.html#XALRMeoqjw

For lack of an effective-target keyword matching -fdollars-in-identifiers,
this patch fixes this by xfailing them on *-*-solaris2.* && !gas.

Tested on i386-pc-solaris2.11 with as and gas and x86_64-pc-linux-gnu.

	* gcc.target/i386/pr91298-1.c: xfail on Solaris/x86 with native
	assembler.
	* gcc.target/i386/pr91298-2.c: Likewise.
2020-01-26 21:30:49 +01:00
Jason Merrill
091fe099ba checking: avoid verify_type_variant crash on incomplete type.
Here, we end up calling gen_type_die_with_usage for a type that's in the
middle of finish_struct_1, after we set TYPE_NEEDS_CONSTRUCTING on it but
before we copy all the flags to the variants--and, significantly, before we
set its TYPE_SIZE.  It seems reasonable to only look at
TYPE_NEEDS_CONSTRUCTING on complete types, since we aren't going to try to
create an object of an incomplete type any other way.

	PR c++/92601
	* tree.c (verify_type_variant): Only verify TYPE_NEEDS_CONSTRUCTING
	of complete types.
2020-01-26 13:41:05 -05:00
Darius Galis
0f6f39ed73 Avoid creating string insns unless string support is enabled
* config/rx/rx.md (setmemsi): Added rx_allow_string_insns constraint
	(rx_setmem): Likewise.
2020-01-26 09:53:24 -07:00
Jakub Jelinek
a9947bac07 i386: Fix up *{add,sub}v<dwi>4_doubleword patterns (PR target/93412)
In the *{add,sub}v<dwi>4_doubleword patterns, we don't really want to see a
VOIDmode last operand, because it then means invalid RTL
(sign_extend:{TI,POI} (const_int ...)) or so, and therefore something we
don't really handle in the splitter either.  We have
*{add,sub}v<dwi>4_doubleword_1 pattern for those and that is what combine
will match, the problem in this testcase is just that it was only RA that
propagated the constant into the instruction.

In the similar *{add,sub}v<mode>4 patterns, we make sure not to accept
VOIDmode operand and similarly to these have _1 suffixed variant that allows
constants.

2020-01-26  Jakub Jelinek  <jakub@redhat.com>

	PR target/93412
	* config/i386/i386.md (*addv<dwi>4_doubleword, *subv<dwi>4_doubleword):
	Use nonimmediate_operand instead of x86_64_hilo_general_operand and
	drop <di> from constraint of last operand.

	* gcc.dg/pr93412.c: New test.
2020-01-26 12:12:36 +01:00
Jakub Jelinek
322db86f4b i386: Fix up *avx_vperm_broadcast_v4df [PR93430]
Apparently my recent patch which moved the *avx_vperm_broadcast* and
*vpermil* patterns before vpermpd broke the following testcase, the
define_insn_and_split matched always but the splitter condition only split
it if not -mavx2 for V4DFmode, basically relying on the vpermpd pattern to
come first.

The following patch fixes it by moving that part of SPLIT-CONDITION into
CONDITION, so that when it is not met, we just don't match the pattern
and thus match the later vpermpd pattern in that case.
Except, for { 0, 0, 0, 0 } permutation, there is actually no reason to do
that, vbroadcastsd from memory seems to be slightly cheaper than vpermpd $0.

2020-01-26  Jakub Jelinek  <jakub@redhat.com>

	PR target/93430
	* config/i386/sse.md (*avx_vperm_broadcast_<mode>): Disallow for
	TARGET_AVX2 and V4DFmode not in the split condition, but in the
	pattern condition, though allow { 0, 0, 0, 0 } broadcast always.

	* gcc.dg/pr93430.c: New test.
	* gcc.target/i386/avx2-pr93430.c: New test.
2020-01-26 12:10:48 +01:00
Jason Merrill
da11ffbba8 c++: avoid ICE with __builtin_memset (PR90997).
warn_for_memset calls fold_for_warn, which calls fold_non_dependent_expr, so
also calling instantiate_non_dependent_expr here is undesirable.

	PR c++/90997
	* semantics.c (finish_call_expr): Don't call
	instantiate_non_dependent_expr before warn_for_memset.
2020-01-26 00:49:24 -05:00
GCC Administrator
d0683c187f Daily bump. 2020-01-26 00:16:28 +00:00
Jakub Jelinek
05107d4e4c testsuite: Fix up pr93166.C test, so that it doesn't FAIL with -std=c++98 and tests what it is supposed to test.
2020-01-26  Jakub Jelinek  <jakub@redhat.com>

	PR ipa/93166
	* g++.dg/pr93166.C: Move to ...
	* g++.dg/pr93166_0.C: ... here.  Turn it into a proper lto test.
2020-01-26 00:47:18 +01:00
Jakub Jelinek
cc74832213 testsuite: Fix up pr92788.C FAIL on ia32.
2020-01-26  Jakub Jelinek  <jakub@redhat.com>

	PR tree-optimization/92788
	* g++.dg/pr92788.C: Move to ...
	* g++.target/i386/pr92788.C: ... here.  Remove target from dg-do line.
	Change type of operator new's first parameter to __SIZE_TYPE__.
2020-01-26 00:32:01 +01:00
Marek Polacek
de0684bf3f c++: Poor diagnostic for dynamic_cast in constexpr context [PR93414]
I neglected to add a proper diagnostic for the reference dynamic_cast
case when the operand of a dynamic_cast doesn't refer to a public base
of Derived, resulting in suboptimal error message

   error: call to non-'constexpr' function 'void* __cxa_bad_cast()'

2020-01-25  Marek Polacek  <polacek@redhat.com>

	PR c++/93414 - poor diagnostic for dynamic_cast in constexpr context.
	* constexpr.c (cxx_eval_dynamic_cast_fn): Add a reference
	dynamic_cast diagnostic.

	* g++.dg/cpp2a/constexpr-dynamic18.C: New test.
2020-01-25 14:26:07 -05:00
John David Anglin
10be08aa27 Fix missing SCNuMAX defines in inttypes.h on hpux11.[01]*
2020-01-25  John David Anglin  <danglin@gcc.gnu.org>

	* inclhack.def (hpux_c99_inttypes4): New, add missing SCNuMAX defines.
	* fixincl.x: Regenerate.
	* tests/base/inttypes.h: Update for above fix.
2020-01-25 12:20:24 -05:00
Feng Xue
98dd8c97e4 Remove assertion in get_info_about_necessary_edges
2020-01-25  Feng Xue  <fxue@os.amperecomputing.com>

        PR ipa/93166
        * ipa-cp.c (get_info_about_necessary_edges): Remove value
        check assertion.

        PR ipa/93166
        * g++.dg/pr93166.C: New test.
2020-01-25 22:18:18 +08:00
Andrew Pinski
53d172975f Fix gcc.target/aarch64/vec_zeroextend.c for big-endian
vec_zeroextend.c fails on big-endian as it assumes
0 index is the lower part but it is not for
big-endian case.  This fixes the problem by
using the correct index for the lower part
for big-endian.

Committed as obvious after a test on aarch64_be-linux-gnu.

ChangeLog:
* gcc.target/aarch64/vec_zeroextend.c: Fix for big-endian.
2020-01-25 03:38:31 -08:00
Jason Merrill
9c1179c339 c++: Fix ICE with constrained friend (PR93400).
Here, the problem was that tsubst_friend_function was modifying the
CONSTRAINT_INFO for the friend template to have the constraints for one
instantiation, which fell down when we went to adjust it for another
instantiation.  Fixed by deferring substitution of trailing requirements
until we try to check declaration matching.

	PR c++/93400 - ICE with constrained friend.
	* constraint.cc (maybe_substitute_reqs_for): New.
	* decl.c (function_requirements_equivalent_p): Call it.
	* pt.c (tsubst_friend_function): Only substitute
	TEMPLATE_PARMS_CONSTRAINTS.
	(tsubst_template_parms): Copy constraints.
2020-01-25 01:07:51 -05:00
Jason Merrill
8b91e84813 c++: Fix ICE with lambda in member operator (PR93279)
Here the problem was that we were remembering the lookup in template scope,
and then trying to reuse that lookup in the instantiation without
substituting into it at all.  The simplest solution is to not try to
remember a lookup that finds a class-scope declaration, as in that case
doing the normal lookup again at instantiation time will always find the
right declarations.

	PR c++/93279 - ICE with lambda in member operator.
	* name-lookup.c (maybe_save_operator_binding): Don't remember
	class-scope bindings.
2020-01-24 22:18:46 -05:00
GCC Administrator
c671727004 Daily bump. 2020-01-25 00:16:30 +00:00
Jeff Law
98181563dc Fix ICE due to invalid jump threading request
PR tree-optimization/92788
	* tree-ssa-threadedge.c (thread_across_edge): Check EDGE_COMPLEX
	not EDGE_ABNORMAL.

	PR tree-optimization/92788
	* g++.dg/pr92788.C: New test.
2020-01-24 17:51:19 -05:00
Jason Merrill
55dd44535d c++: Fix parameter map handling of member typedef.
any_template_parm_r was looking at the args of an alias template-id, but we
need to look at all args of a member alias/typedef, including implicit ones
from the enclosing class.

	PR c++/93377 - ICE with member alias in constraint.
	* pt.c (any_template_parm_r): Look at template arguments for all
	aliases, not only alias templates.
2020-01-24 17:22:56 -05:00
Jakub Jelinek
5d782a8d90 i386: prefer vpermilpd over vpermpd [PR93395]
In Agner Fog's tables, vpermilp[sd] with immediates seem to be
much faster than vpermpd with immediate, for a good reason,
the former only permute something within the lanes and don't do anything
intra-lane, while vpermpd can.  So, functionality-wise, vpermilpd
is more efficient subset of vpermpd.  We use the same RTL for those
though (and also for certain broadcast).

Now, the problem was that the vpermpd pattern appeared first in sse.md,
followed by the broadcast patterns, followed by the vpermilp[sd].
Which means unless -mavx -mno-avx2, we'd emit vpermpd instead of the
more efficient alternatives.

The following patch reorders them, so that vpermpd comes last, if we
can match a broadcast, we do, if we can match a vpermilp[sd] that is not a
broadcast, we will, otherwise fall back (of course only if -mavx2) to
vpermpd.

2020-01-24  Jakub Jelinek  <jakub@redhat.com>

	PR target/93395
	* config/i386/sse.md (*avx_vperm_broadcast_v4sf,
	*avx_vperm_broadcast_<mode>,
	<sse2_avx_avx512f>_vpermil<mode><mask_name>,
	*<sse2_avx_avx512f>_vpermilp<mode><mask_name>):
	Move before avx2_perm<mode>/avx512f_perm<mode>.

	* gcc.target/i386/pr93395.c: New test.
	* gcc.target/i386/avx512vl-vpermilpdi-1.c: Remove xfail.
2020-01-24 22:49:51 +01:00
Jakub Jelinek
14e5881e37 simplify-rtx: Punt for modes with precision above MAX_BITSIZE_MODE_ANY_INT [PR93376]
The following patch makes sure we punt in the 3 spots if precision is above
MAX_BITSIZE_MODE_ANY_INT.

2020-01-24  Jakub Jelinek  <jakub@redhat.com>

	PR target/93376
	* simplify-rtx.c (simplify_const_unary_operation,
	simplify_const_binary_operation): Punt for mode precision above
	MAX_BITSIZE_MODE_ANY_INT.
2020-01-24 22:47:23 +01:00
Andrew Pinski
6ccc19bd4d Decrease cortexa57_extra_costs's alu.shift_reg
Like I mentioned in https://gcc.gnu.org/ml/gcc/2020-01/msg00157.html,
The shift by a register should be just COSTS_N_INSNS (1) rather than
COSTS_N_INSNS (2).  This allows lshift_cheap_p to return true now
and converting switches to be using shift and other like
structures.  I noticed this difference when I was working
through PR 93131 and understanding what reassoc could handle.

ChangeLog:
* config/arm/aarch-cost-tables.h (cortexa57_extra_costs): Change
alu.shift_reg to 0.
2020-01-24 21:33:43 +00:00
Marek Polacek
d54a86cd92 c++: Fix ICE in tsubst_copy with parenthesized expression [PR93299]
Since e4511ca2e9ecdb51d41b64452398f8e2df575668 force_paren_expr can create
a VIEW_CONVERT_EXPR so that we have something to set REF_PARENTHESIZED_P
on, while not making the expression dependent.  But tsubst_copy can't cope
with such a VIEW_CONVERT_EXPR, because it's not location_wrapper_p, or
a TEMPLATE_PARM_INDEX wrapped in a VIEW_CONVERT_EXPR.

I think we need to teach tsubst_copy how to handle it.  Setting
EXPR_LOCATION_WRAPPER_P in force_paren_expr would make the ICE go away
too, but tsubst_copy would lose the REF_PARENTHESIZED_P flag.

2020-01-24  Marek Polacek  <polacek@redhat.com>

	PR c++/93299 - ICE in tsubst_copy with parenthesized expression.
	* pt.c (tsubst_copy): Handle a REF_PARENTHESIZED_P VIEW_CONVERT_EXPR.

	* g++.dg/cpp1y/paren5.C: New test.
2020-01-24 15:44:01 -05:00
Sandra Loosemore
7c75a2a3bf Add -fdelete-null-pointer-checks to some C++ testcases.
These testcases were failing on nios2-elf, which defaults to
-fno-delete-null-pointer-checks.

2020-01-24  Sandra Loosemore  <sandra@codesourcery.com>

	gcc/testsuite/
	* g++.dg/cpp0x/constexpr-odr1.C: Add -fdelete-null-pointer-checks.
	* g++.dg/cpp0x/constexpr-odr2.C: Likewise.
	* g++.dg/cpp0x/nontype4.C: Likewise.
	* g++.dg/cpp1y/constexpr-new.C: Likewise.
	* g++.dg/cpp1y/new1.C: Likewise.
	* g++.dg/cpp1y/new2.C: Likewise.
	* g++.dg/cpp2a/constexpr-dynamic11.C: Likewise.
	* g++.dg/cpp2a/constexpr-dynamic17.C: Likewise.
	* g++.dg/cpp2a/constexpr-dynamic4.C: Likewise.
	* g++.dg/cpp2a/constexpr-new1.C: Likewise.
	* g++.dg/cpp2a/constexpr-new10.C: Likewise.
	* g++.dg/cpp2a/constexpr-new2.C: Likewise.
	* g++.dg/cpp2a/constexpr-new3.C: Likewise.
	* g++.dg/cpp2a/constexpr-new4.C: Likewise.
	* g++.dg/cpp2a/constexpr-new8.C: Likewise.
	* g++.dg/cpp2a/constexpr-new9.C: Likewise.
	* g++.dg/cpp2a/nontype-class1.C: Likewise.
2020-01-24 11:41:31 -08:00
Jason Merrill
28a5d5c365 c++: Unshare expressions from constexpr cache.
Another place we need to unshare cached expressions.

	PR c++/92852 - ICE with generic lambda and reference var.
	* constexpr.c (maybe_constant_value): Likewise.
2020-01-24 12:34:02 -05:00
Jason Merrill
6ad405c430 Add missing ChangeLog entry. 2020-01-24 12:34:02 -05:00
Jonathan Wakely
482eeff5f1 libstdc++: Simplify construction of comparison category types
The _Eq and _Ord enumerations can be combined into one, reducing the
number of constructors needed for the comparison category types. The
redundant equal enumerator can be removed and equivalent used in its
place. The _Less and _Greater enumerators can be renamed because 'less'
and 'greater' are already reserved names anyway.

	* libsupc++/compare (__cmp_cat::_Eq): Remove enumeration type.
	(__cmp_cat::_Ord::equivalent): Add enumerator.
	(__cmp_cat::_Ord::_Less, __cmp_cat::_Ord::_Greater): Rename to less
	and greater.
	(partial_ordering, weak_ordering, strong_ordering): Remove
	constructors taking __cmp_cat::_Eq parameters. Use renamed
	enumerators.
2020-01-24 17:17:16 +00:00
Jeff Law
64c9f2d997 Emit reasonable diagnostic rather than ICE on invalid ASM on H8 port
PR target/13721
	* config/h8300/h8300.c (h8300_print_operand): Only call byte_reg
	for REGs.  Call output_operand_lossage to get more reasonable
	diagnostics.

	PR target/13721
	* gcc.target/h8300/pr13721.c: New test.
2020-01-24 08:57:46 -07:00
Jeff Law
e6e5cd2fd7 Add PR markers for yesterday's H8 changes 2020-01-24 08:44:29 -07:00
Andrew Stubbs
f4d4a40698 Fix ICE on unsupported FP comparison
2020-01-24  Andrew Stubbs  <ams@codesourcery.com>

	gcc/
	* config/gcn/gcn-valu.md (vec_cmp<mode>di): Use
	gcn_fp_compare_operator.
	(vec_cmpu<mode>di): Use gcn_compare_operator.
	(vec_cmp<u>v64qidi): Use gcn_compare_operator.
	(vec_cmp<mode>di_exec): Use gcn_fp_compare_operator.
	(vec_cmpu<mode>di_exec): Use gcn_compare_operator.
	(vec_cmp<u>v64qidi_exec): Use gcn_compare_operator.
	(vec_cmp<mode>di_dup): Use gcn_fp_compare_operator.
	(vec_cmp<mode>di_dup_exec): Use gcn_fp_compare_operator.
	(vcond<VEC_ALLREG_MODE:mode><VEC_ALLREG_ALT:mode>): Use
	gcn_fp_compare_operator.
	(vcond<VEC_ALLREG_MODE:mode><VEC_ALLREG_ALT:mode>_exec): Use
	gcn_fp_compare_operator.
	(vcondu<VEC_ALLREG_MODE:mode><VEC_ALLREG_INT_MODE:mode>): Use
	gcn_fp_compare_operator.
	(vcondu<VEC_ALLREG_MODE:mode><VEC_ALLREG_INT_MODE:mode>_exec): Use
	gcn_fp_compare_operator.
2020-01-24 14:53:35 +00:00
Richard Earnshaw
612137e171 contrib: Change 'remote' for personal branches and add branch creation script
Whilst trying to convert the add vendor branch script to work with
personal branches I encountered a minor issue where git would report
ambiguous refs when checking out the new branch.

It turns out that this is because git considers <me>/<topic> to be
ambiguous if both

  refs/heads/<me>/<topic>

and

  refs/remotes/<me>/<topic>

exist in the list of known branches.

Having thought about this a bit, I think the best solution is to adopt
something more like the vendors space and call the remote users/<me>
(this also works better if you want to set up remotes to track other
users branches as well).

So this patch has two parts.

1) It updates gcc-git-customization.sh to set up the new 'remote' and
converts any existing remote and branches tracking that to the new
format
2) It adds a new script to set up a personal branch on the gcc git repository.

	* gcc-git-customization.sh: Use users/<pfx> for the personal remote
	rather than just <pfx>.  Convert any existing personal branches to the
	new remote.
	* git-add-user-branch.sh: New file.
2020-01-24 14:38:16 +00:00
Ian Lance Taylor
ba386bea11 libgo: handle --with-toolexeclibdir=.
Patch by Maciej W. Rozycki.

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/216239
2020-01-24 06:33:46 -08:00
Nathan Sidwell
a1f6eff20e Remove bogus __has_include controlling macro
I noticed, but ignored this code when addressing p80005, but having
fixed up defined(X) on the modules branch, I could see where it came
from, and it's obviously wrong as we've just pulled out a string
contant from the token.

	* expr.c (parse_has_include): Remove bogus controlling macro code.
2020-01-24 04:19:36 -08:00
Maciej W. Rozycki
e8e66971cd Add `--with-toolexeclibdir=' configuration option
Provide means, in the form of a `--with-toolexeclibdir=' configuration
option, to override the default installation directory for target
libraries, otherwise known as $toolexeclibdir.  This is so that it is
possible to get newly-built libraries, particularly the shared ones,
installed in a common place, so that they can be readily used by the
target system as their host libraries, possibly over NFS, without a need
to manually copy them over from the currently hardcoded location they
would otherwise be installed in.

In the presence of the `--enable-version-specific-runtime-libs' option
and for configurations building native GCC the option is ignored.

	config/
	* toolexeclibdir.m4: New file.

	gcc/
	* doc/install.texi (Cross-Compiler-Specific Options): Document
	`--with-toolexeclibdir' option.

	libada/
	* Makefile.in (configure_deps): Add `toolexeclibdir.m4'.
	* configure.ac: Handle `--with-toolexeclibdir='.
	* configure: Regenerate.

	libatomic/
	* configure.ac: Handle `--with-toolexeclibdir='.
	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* testsuite/Makefile.in: Regenerate.

	libffi/
	* configure.ac: Handle `--with-toolexeclibdir='.
	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* include/Makefile.in: Regenerate.
	* man/Makefile.in: Regenerate.
	* testsuite/Makefile.in: Regenerate.

	libgcc/
	* Makefile.in (configure_deps): Add `toolexeclibdir.m4'.
	* configure.ac: Handle `--with-toolexeclibdir='.
	* configure: Regenerate.

	libgfortran/
	* configure.ac: Handle `--with-toolexeclibdir='.
	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

	libgomp/
	* configure.ac: Handle `--with-toolexeclibdir='.
	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* testsuite/Makefile.in: Regenerate.

	libhsail-rt/
	* configure.ac: Handle `--with-toolexeclibdir='.
	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

	libitm/
	* configure.ac: Handle `--with-toolexeclibdir='.
	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* testsuite/Makefile.in: Regenerate.

	libobjc/
	* Makefile.in (aclocal_deps): Add `toolexeclibdir.m4'.
	* aclocal.m4: Include `toolexeclibdir.m4'.
	* configure.ac: Handle `--with-toolexeclibdir='.
	* configure: Regenerate.

	liboffloadmic/
	* plugin/configure.ac: Handle `--with-toolexeclibdir='.
	* plugin/Makefile.in: Regenerate.
	* plugin/aclocal.m4: Regenerate.
	* plugin/configure: Regenerate.
	* configure.ac: Handle `--with-toolexeclibdir='.
	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

	libphobos/
	* m4/druntime.m4: Handle `--with-toolexeclibdir='.
	* m4/Makefile.in: Regenerate.
	* libdruntime/Makefile.in: Regenerate.
	* src/Makefile.in: Regenerate.
	* testsuite/Makefile.in: Regenerate.
	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

	libquadmath/
	* configure.ac: Handle `--with-toolexeclibdir='.
	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

	libsanitizer/
	* configure.ac: Handle `--with-toolexeclibdir='.
	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* asan/Makefile.in: Regenerate.
	* interception/Makefile.in: Regenerate.
	* libbacktrace/Makefile.in: Regenerate.
	* lsan/Makefile.in: Regenerate.
	* sanitizer_common/Makefile.in: Regenerate.
	* tsan/Makefile.in: Regenerate.
	* ubsan/Makefile.in: Regenerate.

	libssp/
	* configure.ac: Handle `--with-toolexeclibdir='.
	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

	libstdc++-v3/
	* acinclude.m4: Handle `--with-toolexeclibdir='.
	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* doc/Makefile.in: Regenerate.
	* include/Makefile.in: Regenerate.
	* libsupc++/Makefile.in: Regenerate.
	* po/Makefile.in: Regenerate.
	* python/Makefile.in: Regenerate.
	* src/Makefile.in: Regenerate.
	* src/c++11/Makefile.in: Regenerate.
	* src/c++17/Makefile.in: Regenerate.
	* src/c++98/Makefile.in: Regenerate.
	* src/filesystem/Makefile.in: Regenerate.
	* testsuite/Makefile.in: Regenerate.

	libvtv/
	* configure.ac: Handle `--with-toolexeclibdir='.
	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* testsuite/Makefile.in: Regenerate.

	zlib/
	* configure.ac: Handle `--with-toolexeclibdir='.
	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
2020-01-24 11:24:25 +00:00
Jan Hubicka
e3fe0070c1 libgcov: Fix merging of topn [PR92924]
PR tree-optimization/92924
	* libgcov-merge.c (merge_topn_values_set): Fix merging.
2020-01-24 12:12:17 +01:00