Commit Graph

168058 Commits

Author SHA1 Message Date
Steven G. Kargl 2810dfab5c re PR fortran/90166 (Compiler Fails at Assembler)
2019-04-19  Steven G. Kargl  <kargl@gcc.gnu.org>

	PR fortran/90166
	* decl.c (in_module_or_interface): New function to check that the
	current state is in a module, submodule, or interface.
	(gfc_match_prefix): Use it.

2019-04-19  Steven G. Kargl  <kargl@gcc.gnu.org>

	PR fortran/90166
	* gfortran.dg/submodule_22.f08: Add additional dg-error comments.

From-SVN: r270495
2019-04-22 21:00:40 +00:00
Jason Merrill f2b6aeeab2 PR c++/87366 - wrong error with alias template.
With this testcase the code in template_args_equal to treat aliases as
distinct wasn't sufficient, because it only looked at the top level, whereas
here we have a reference to the alias.  So let's also handle treating them
as distinct in structural_comptypes.  For GCC 10 I have a more comprehensive
patch, but for GCC 9 let's go with this smaller change.

	* typeck.c (structural_comptypes): When comparing_specializations,
	aliases are unequal.
	(comptypes): When comparing_specializations, do structural
	comparison.

From-SVN: r270494
2019-04-22 15:16:46 -04:00
Roman Zhuykov 1e8dac3257 Add myself to MAINTAINERS
2019-04-22  Roman Zhuykov  <zhroma@ispras.ru>

	* MAINTAINERS (Various Maintainers): Remove Ayal Zaks and add myself
	as modulo-scheduler maintainer.

From-SVN: r270492
2019-04-22 16:05:36 +00:00
Iain Buclaw 105d4c85f3 libphobos: Merge upstream phobos b538f758a
Fixes endian bugs in std.uni, and corrects unit-tests that failed on
version(BigEndian) targets.

Initial patch by Robin Dapp.

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

From-SVN: r270491
2019-04-22 13:46:25 +00:00
Iain Buclaw eb5f748a81 libphobos: Merge upstream druntime 109f0f2e
Backports more extern(C) bindings and platform ports.

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

From-SVN: r270490
2019-04-22 13:46:13 +00:00
Paul Thomas 16a51cf549 re PR fortran/57284 ([OOP] ICE with find_array_spec for polymorphic arrays)
2019-04-22  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/57284
	* resolve.c (find_array_spec): If this is a class expression
	and the symbol and component array specs are the same, this is
	not an error.
	*trans-intrinsic.c (gfc_conv_intrinsic_size): If a class symbol
	argument, has no namespace, it has come from the interface
	mapping and the _data component must be accessed directly.

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

	PR fortran/57284
	* gfortran.dg/class_70.f03

From-SVN: r270489
2019-04-22 06:50:33 +00:00
GCC Administrator 76a86e8616 Daily bump.
From-SVN: r270488
2019-04-22 00:16:16 +00:00
Iain Buclaw 3595df34b5 re PR d/90130 (gdc.test/runnable/test12.d FAILs)
PR d/90130
d/dmd: Merge upstream dmd 065fbd452

Fixes endian bug in CTFE, and corrects tests in the D2 testsuite that
failed on big endian targets.

Initial patch by Robin Dapp.

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

From-SVN: r270485
2019-04-21 20:26:12 +00:00
H.J. Lu f94302e90b LRA: Revert "Remove useless move insns"
Useless move insn removal was added to LRA just to avoid wasting CPU
cycles on such insn processing afterwards.  Such insns are removed
anyway later in the pass pipeline.  The CPU time savings are tiny but
the removal creates too many problems including PR target/90178.
Vladimir pre-approved the patch to remove the code:

https://gcc.gnu.org/ml/gcc-patches/2019-04/msg00834.html

gcc/

	PR target/90178
	Revert:
	2018-11-21  Uros Bizjak  <ubizjak@gmail.com>

	Revert the revert:
	2013-10-26  Vladimir Makarov  <vmakarov@redhat.com>

	Revert:
	2013-10-25  Vladimir Makarov  <vmakarov@redhat.com>

	* lra-spills.c (lra_final_code_change): Remove useless move insns.

gcc/testsuite/

	PR target/90178
	* gcc.target/i386/pr90178.c: New test.

From-SVN: r270484
2019-04-21 11:23:00 -07:00
Iain Buclaw 6397d8df30 re PR d/90064 (InSituRegion lacks SPARC64 support)
PR d/90064
libphobos: Merge upstream phobos 428460ddd

Defines growDownwards on SPARC64, initial patch by Rainer Orth.

Backports another fix to std.process, allowing permissions tests to be
skipped when running as root.

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

From-SVN: r270483
2019-04-21 10:21:07 +00:00
Iain Buclaw 6d679a7d9d libphobos: Merge upstream druntime 4b2674b3
Adds version (BacktraceExternal) for using libexecinfo instead of
internal implementation on FreeBSD, NetBSD, and DragonFly.

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

From-SVN: r270482
2019-04-21 10:02:02 +00:00
Iain Sandoe 42d3fe9afb MAINTAINERS - add iains as darwin co-maintainer.
2019-04-21  Iain Sandoe  <iain@sandoe.co.uk>

	* MAINTAINERS: Add myself as co-maintainer for Darwin.

From-SVN: r270481
2019-04-21 08:33:19 +00:00
Iain Sandoe befa871199 Fix test fails on powerpc-darwin.
The current implementation of “speculation_barrier”
and “group_end_nop” insns emit hard-wired register
names which causes tests using them to fail on Darwin,
at least, which uses “rNN” instead of “NN”.

The patch makes the register names for these insns use
the operand output mechanism to substitute the
appropriate variant when needed.

gcc/

2019-04-21  Iain Sandoe  <iain@sandoe.co.uk>

	* config/rs6000/rs6000.md (group_end_nop): Emit insn register
	names using operand format, rather than hard-wired.
	(speculation_barrier): Likewise.

From-SVN: r270480
2019-04-21 08:25:44 +00:00
Iain Sandoe 375eb99a55 libstdc++-v3 Skip tests on Darwin8-10.
These earlier Darwin versions have “FP_≈” inside a
comment in architecture/{ppc,i386}/math.h, which is
included by math.h which causes the tests to fail.

The intent of the tests (i.e. to ensure that the
library itself does not emit non-ascii) is covered
by other platforms, including later Darwin editions.

2019-04-21  Iain Sandoe  <iain@sandoe.co.uk>

	* testsuite/17_intro/headers/c++1998/charset.cc: Skip for Darwin8
	to Darwin10.
	* testsuite/17_intro/headers/c++2011/charset.cc: Likewise.
	* testsuite/17_intro/headers/c++2014/charset.cc: Likewise.
	* testsuite/17_intro/headers/c++2017/charset.cc: Likewise.
	* testsuite/17_intro/headers/c++2020/charset.cc: Likewise.

From-SVN: r270479
2019-04-21 08:14:47 +00:00
Iain Buclaw e64deb7447 d: Use semanticRun to prevent declaration pass from running multiple times.
This shouldn't happen during normal traversal of the AST provided from
the front-end, however as there are some cases where declarations need
to be visited out of order, such as what is being done in PR d/89017, it
then becomes necessary to guard against this.

gcc/d/ChangeLog:

2019-04-21  Iain Buclaw  <ibuclaw@gdcproject.org>

	* decl.cc (DeclVisitor::visit(Import)): Set semanticRun after
	completion, guard against being called more than once.
	(DeclVisitor::visit(StructDeclaration)): Likewise.
	(DeclVisitor::visit(ClassDeclaration)): Likewise.
	(DeclVisitor::visit(InterfaceDeclaration)): Likewise.
	(DeclVisitor::visit(VarDeclaration)): Likewise.
	(DeclVisitor::visit(TypeInfoDeclaration)): Likewise.

From-SVN: r270478
2019-04-21 07:03:32 +00:00
Iain Buclaw f452f0d67f d: Ensure all unittests are registered against the original module.
As any unittest functions registered against the testing module when
compiling with -fbuilding-libphobos-tests are ignored during the
generation of the ModuleInfo data.

gcc/d/ChangeLog:

2019-04-21  Iain Buclaw  <ibuclaw@gdcproject.org>

	* modules.cc (register_module_decl): Don't register unittests against
	the ModuleInfo symbol for -fbuilding-libphobos-tests.

From-SVN: r270477
2019-04-21 07:03:22 +00:00
Sandra Loosemore 7bbcf39575 pr89009.C: Add dg-require-effective-target fpic.
2019-04-20  Sandra Loosemore  <sandra@codesourcery.com>

	gcc/testsuite/
	* g++.dg/ipa/pr89009.C: Add dg-require-effective-target fpic.

From-SVN: r270476
2019-04-20 22:01:36 -04:00
GCC Administrator 21123d66f4 Daily bump.
From-SVN: r270475
2019-04-21 00:16:12 +00:00
Thomas Rodgers 1dc5a184ac Delegate PSTL configuration to pstl/pstl_config.h
* include/bits/c++config: Remove explicit PSTL configuration
	 macros and use definitions from <pstl/pstl_config.h>.

From-SVN: r270472
2019-04-20 23:20:03 +00:00
Thomas Rodgers 9762ea561d Cleanup algorithm implementations
* include/pstl/glue_algorithm_impl.h (stable_sort): Forward
        execution policy.
	(mismatch): Forward execution policy.
	(equal): Qualify call to std::equal().
	(partial_sort): Forward execution policy.
	(inplace_merge): Forward execution policy.

From-SVN: r270471
2019-04-20 22:45:58 +00:00
Iain Buclaw 0aa94749cb libphobos: core.atomic should have fallback when there's no libatomic.
libphobos/ChangeLog:

2019-04-20  Iain Buclaw  <ibuclaw@gdcproject.org>

	PR d/89293
	* libdruntime/core/atomic.d (casImpl): Remove static assert for
	GNU_Have_Atomics, add static path to handle missing atomic support.
	(atomicLoad): Likewise.
	(atomicStore): Likewise.
	(atomicFence):  Likewise.
	(atomicMutexHandle, AtomicMutex): Declare types.
	(_getAtomicMutex): New function.
	(getAtomicMutex): Declare.

From-SVN: r270470
2019-04-20 17:14:50 +00:00
Jason Merrill 1474a2e567 PR c++/90190 - CTAD with list-constructor.
The passage quoted talks about an initializer list containing a single
expression, but a braced-init-list is not an expression.

	* pt.c (do_class_deduction): Don't try the single element deduction
	if the single element is also a braced list.

From-SVN: r270468
2019-04-20 02:18:39 -04:00
Jason Merrill d395d8e771 PR c++/90171 - ICE with destroying delete with size_t parm.
The problem here was that "second parm is size_t" is false for a destroying
sized delete.  So let's introduce sized_deallocation_fn_p when that's what
we're asking, and reserve second_parm_is_size_t for the specific case of
warning about possible confusion with placement delete.

	* call.c (sized_deallocation_fn_p): New.  Use it instead of
	second_parm_is_size_t in most cases.
	(second_parm_is_size_t): Don't check for aligned.

From-SVN: r270467
2019-04-20 02:18:30 -04:00
GCC Administrator f9eff98e6f Daily bump.
From-SVN: r270466
2019-04-20 00:16:17 +00:00
Thomas Rodgers a34d6343a7 Improve implementation of parallel equal()
* include/pstl/algorithm_impl.h
	(__internal::__brick_equal): use "4 iterator" version of
	std::equal().
	(__internal::__brick_equal): use simd for random access
	iterators on unsequenced execution policies.
	(__internal::__pattern_equal): add "4 iterator" version
	(__internal::__pattern_equal): dispatch to simd __brick_equal
	for vector-only execution policies.
	(__internal::__pattern_equal): dispatch to __parallel_or for
	parallel execution policies.
	* include/pstl/glue_algorithm_impl.h
	(std::equal): dispatch to "4 iterator" version of
	__internal::__pattern_equal().

From-SVN: r270463
2019-04-19 22:44:11 +00:00
Jakub Jelinek 53db57ccaf * de.po, es.po, fr.po, sv.po: Update.
From-SVN: r270462
2019-04-19 21:19:51 +02:00
Segher Boessenkool c5c4d431e0 tree-call-cdce: If !HONOR_NANS do not make code with NaNs (PR88055)
If we don't HONOR_NANS we should not try to use any unordered
comparison results.  Best case those will just be optimized away;
realistically, they ICE.  For example, the rs6000 backend has some
code that specifically checks we never do this.


	PR tree-optimization/88055
	* tree-call-cdce.c (comparison_code_if_no_nans): New function.
	(gen_one_condition): Use it if !HONOR_NANS.

From-SVN: r270460
2019-04-19 18:58:01 +02:00
Paolo Carlini 3734fb6a27 re PR c++/89900 (ICE: Segmentation fault (in check_instantiated_arg))
/cp
2019-04-19  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/89900
	* pt.c (fn_type_unification): When handling null explicit
	arguments do not special case non-parameter packs.

/testsuite
2019-04-19  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/89900
	* g++.dg/cpp0x/pr89900-1.C: New.
	* g++.dg/cpp0x/pr89900-2.C: Likewise.
	* g++.dg/cpp0x/pr89900-3.C: Likewise.
	* g++.dg/cpp0x/pr89900-4.C: Likewise.

From-SVN: r270459
2019-04-19 15:36:20 +00:00
Ian Lance Taylor f4488799b2 libgo/go/syscall: add SockAddrDatalink on AIX
This patch is required in order to build golang.org/x/net. The
    corresponding Go Toolchain patch is CL 170537.
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/172898

From-SVN: r270458
2019-04-19 14:20:16 +00:00
Jakub Jelinek a7bfaee58f re PR middle-end/90139 (ICE in emit_block_move_hints, at expr.c:1601)
PR middle-end/90139
	* tree-outof-ssa.c (get_temp_reg): If reg_mode is BLKmode, return
	assign_temp instead of gen_reg_rtx.

	* gcc.c-torture/compile/pr90139.c: New test.

From-SVN: r270457
2019-04-19 13:58:11 +02:00
Jakub Jelinek 7296c0c537 re PR c++/90138 (ICE on invalid in contains_struct_check())
PR c++/90138
	* pt.c (process_template_parm): Set decl to pushdecl result.  If
	!is_non_type, also set parm to that.

	* g++.dg/template/pr90138.C: New test.

From-SVN: r270456
2019-04-19 13:57:23 +02:00
Jakub Jelinek c280b7ee5c re PR c/89888 (When switch controlling expression is promoted from type narrower than int, GCC does not diagnose identical cases)
PR c/89888
	* c-common.h (c_add_case_label): Remove orig_type and outside_range_p
	arguments.
	(c_do_switch_warnings): Remove outside_range_p argument.
	* c-common.c (check_case_bounds): Removed.
	(c_add_case_label): Remove orig_type and outside_range_p arguments.
	Don't call check_case_bounds.  Fold low_value as well as high_value.
	* c-warn.c (c_do_switch_warnings): Remove outside_range_p argument.
	Check for case labels outside of range of original type here and
	adjust them.
c/
	* c-typeck.c (struct c_switch): Remove outside_range_p member.
	(c_start_case): Don't clear it.
	(do_case): Adjust c_add_case_label caller.
	(c_finish_case): Adjust c_do_switch_warnings caller.
cp/
	* decl.c (struct cp_switch): Remove outside_range_p member.
	(push_switch): Don't clear it.
	(pop_switch): Adjust c_do_switch_warnings caller.
	(finish_case_label): Adjust c_add_case_label caller.
testsuite/
	* c-c++-common/pr89888.c: New test.
	* g++.dg/torture/pr40335.C: Change dg-bogus into dg-warning.
	Don't expect -Wswitch-unreachable warning.

From-SVN: r270455
2019-04-19 13:56:07 +02:00
Christophe Lyon 4180490732 PR translation/90118 Missing space between words
2019-04-19  Christophe Lyon  <christophe.lyon@linaro.org>

	PR translation/90118

	contrib/
	* check-internal-format-escaping.py: Check that %< is not next to
	a word.

	gcc/
	* config/aarch64/aarch64.c (aarch64_override_options_internal):
	Add missing space before %<.

From-SVN: r270454
2019-04-19 11:08:49 +02:00
Jakub Jelinek e7178413f4 re PR c++/90108 (ICE: Segmentation fault (in c_tree_chain_next))
PR c++/90108
	* c-decl.c (merge_decls): If remove is main variant and
	DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
	variant that has newdecl as TYPE_NAME if any.

	* decl.c (duplicate_decls): If remove is main variant and
	DECL_ORIGINAL_TYPE is some other type, remove a DECL_ORIGINAL_TYPE
	variant that has newdecl as TYPE_NAME if any.

	* c-c++-common/pr90108.c: New test.

From-SVN: r270453
2019-04-19 10:24:05 +02:00
GCC Administrator 1ad6b21051 Daily bump.
From-SVN: r270451
2019-04-19 00:16:19 +00:00
Peter Bergner 8503f963b0 re PR rtl-optimization/87871 (testcases fail after r265398 on arm)
PR rtl-optimization/87871
	* ira-lives.c (make_object_dead): Don't add conflicts to
	TOTAL_CONFLICT_HARD_REGS for register ignore_reg_for_conflicts.

From-SVN: r270448
2019-04-18 17:14:17 -05:00
Martin Sebor 6c76c0e408 PR middle-end/89797 - ICE on a vector_size (1LU << 33) int variable
gcc/ChangeLog:
	* tree.h (TYPE_VECTOR_SUBPARTS): Use HOST_WIDE_INT_1U.
	* config/aarch64/aarch64.c (aarch64_simd_vector_alignment): Avoid
	assuming type size fits in SHWI.

From-SVN: r270447
2019-04-18 14:26:07 -06:00
Jan Hubicka f6e809c849 re PR ipa/85051 (ICE: in edge_badness, at ipa-inline.c:1035 with flattening recursive calls)
PR ipa/85051
	* ipa-inline.c (flatten_function): New parameter UPDATE.
	(ipa_inline, early_inliner): Use it.

From-SVN: r270446
2019-04-18 17:03:00 +00:00
Jason Merrill 7f0964e6f1 PR c++/87554 - ICE with extern template and reference member.
The removed code ended up setting DECL_INITIAL to the INIT_EXPR returned by
split_nonconstant_init, which makes no sense.  This code was added back in
1996, so any rationale is long lost.

	* decl.c (cp_finish_decl): Don't set DECL_INITIAL of external vars.

From-SVN: r270445
2019-04-18 12:50:10 -04:00
Segher Boessenkool 5f864b980a move ChangeLog entry to the correct file
From-SVN: r270444
2019-04-18 15:38:55 +02:00
Richard Sandiford 714996e2c2 Fix UB in int_const_binop
When testing PR 85164, the baseline bootstrap-ubsan results had
a lot of failures from int_const_binop.  This is because with the
new overflow handling we can sometimes do:

      poly_res = res;

on an uninitialised res.

2019-04-18  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
	* fold-const.c (int_const_binop): Return early on failure.

From-SVN: r270443
2019-04-18 12:30:36 +00:00
Richard Sandiford cd7f7c54a4 Fix two ubsan failures (PR85164)
Two fixes for UB when handling very large offsets.  The calculation in
force_int_to_mode would have been correct if signed integers used modulo
arithmetic, so just switch to unsigned types.  The calculation in
rtx_addr_can_trap_p_1 didn't handle overflow properly, so switch to
known_subrange_p instead (which is supposed to handle all cases).

2019-04-18  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
	PR middle-end/85164
	* combine.c (force_int_to_mode): Cast the argument rather than
	the result of known_alignment.
	* rtlanal.c (rtx_addr_can_trap_p_1): Use known_subrange_p.

gcc/testsuite/
	PR middle-end/85164
	* gcc.dg/pr85164-1.c, gcc.dg/pr85164-2.c: New tests.

From-SVN: r270442
2019-04-18 12:29:56 +00:00
Richard Biener e62817edae re PR debug/90131 (wrong debug info at -O3)
2019-04-18  Richard Biener  <rguenther@suse.de>

	PR debug/90131
	* tree-cfgcleanup.c (move_debug_stmts_from_forwarder): Split
	out from ...
	(remove_forwarder_block): ... here.
	(remove_forwarder_block_with_phi): Also move debug stmts here.

	* gcc.dg/guality/pr90131.c: New testcase.

From-SVN: r270441
2019-04-18 12:02:40 +00:00
Jakub Jelinek 9574af76fa Reverted unintended part of previous commit.
From-SVN: r270439
2019-04-18 12:34:06 +02:00
Jakub Jelinek ff146a59dd re PR translation/79183 (Hard coded plurals in gimple-ssa-sprintf.c:2050)
PR translation/79183
	* gimple-ssa-sprintf.c (format_directive): Use inform_n instead of
	inform where appropriate.

From-SVN: r270438
2019-04-18 12:28:21 +02:00
Richard Biener 1b73c7ef7c tree.c (get_qualified_type): Put found type variants at the head of the variant list.
2019-04-18  Richard Biener  <rguenther@suse.de>

	* tree.c (get_qualified_type): Put found type variants at the
	head of the variant list.

From-SVN: r270437
2019-04-18 07:40:35 +00:00
Iain Sandoe 3d52462c8c MAINTAINERS: Update email address
2019-04-18  Iain Sandoe  <iain@sandoe.co.uk>

	* MAINTAINERS: Update my email address.

From-SVN: r270436
2019-04-18 07:40:08 +00:00
Erik Schnetter 8e6759aafd re PR bootstrap/89864 (gcc fails to build/bootstrap with XCode 10.2)
fix PR89864

      2019-04-18  Erik Schnetter  <schnetter@gmail.com>
	  Jakub Jelinek  <jakub@redhat.com>
	  Iain Sandoe  <iain@sandoe.co.uk>

	PR bootstrap/89864
	* inclhack.def (darwin_ucred__Atomic): New, work around _Atomic keyword
	use in headers included by C++.
	* fixincl.x: Regenerated.


Co-Authored-By: Iain Sandoe <iain@sandoe.co.uk>
Co-Authored-By: Jakub Jelinek <jakub@redhat.com>

From-SVN: r270435
2019-04-18 06:53:21 +00:00
Ian Lance Taylor 5c727cf625 re PR go/90110 (libgo fails to build against glibc 2.19)
PR go/90110
    compiler: use temporary to avoid early destruction
    
    The code was passing a substr directly to strtol, and then checking
    the *end value returned by strtol.  But the substr could be destroyed
    as soon as strtol returns, making the test of *end invalid.
    
    Also fix an incorrect test of the string index rather than the value.
    
    Fixes https://gcc.gnu.org/PR90110
    
    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/172663

From-SVN: r270434
2019-04-18 04:11:22 +00:00
Jason Merrill 5a58e967b5 PR c++/90047 - ICE with enable_if alias template.
In order to make alias templates useful for SFINAE we instantiate them under
the prevailing 'complain' argument, so an error encountered while
instantiating during SFINAE context is silent.  The problem in this PR comes
when we later look up the erroneous instantiation and don't give an error at
that point.  Fixed by not adding an erroneous instantiation to the hash
table, so we instantiate it again when needed and get the error.  This
required changes to a number of tests, which previously said "substitution
failed:" with no explanation of what the failure was; now we properly
explain.

	* pt.c (tsubst_decl) [TYPE_DECL]: Don't put an erroneous decl in the
	hash table when we're in SFINAE context.

From-SVN: r270433
2019-04-17 23:32:24 -04:00