]> git.ipfire.org Git - thirdparty/gcc.git/log
thirdparty/gcc.git
5 years agoImplement new serial algorithms from Parallelism TS (P0024R2)
Jonathan Wakely [Tue, 20 Aug 2019 21:03:11 +0000 (22:03 +0100)] 
Implement new serial algorithms from Parallelism TS (P0024R2)

These new (non-parallel) algorithms were added to C++17 along with the
parallel algorithms, but were missing from libstdc++.

Backported for PR libstdc++/91495, replacing the use of
std::__size_to_integer which is not present on the branch.

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

* include/std/numeric (reduce(Iter, Iter, T, BinOp)): Fix value
category used in invocable check.
(reduce(Iter, Iter, T)): Pass initial value as rvalue.
* testsuite/26_numerics/reduce/2.cc: New test.

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

* include/bits/algorithmfwd.h: Change title of doc group.
* include/bits/stl_algo.h (for_each_n): Add new C++17 algorithm from
P0024R2.
* include/bits/stl_numeric.h: Define doc group and add algos to it.
* include/std/numeric (__is_random_access_iter): New internal trait.
(reduce, transform_reduce, exclusive_scan, inclusive_scan)
(transform_exclusive_scan, transform_inclusive_scan): Likewise.
* testsuite/25_algorithms/for_each/for_each_n.cc: New test.
* testsuite/26_numerics/exclusive_scan/1.cc: New test.
* testsuite/26_numerics/inclusive_scan/1.cc: New test.
* testsuite/26_numerics/reduce/1.cc: New test.
* testsuite/26_numerics/transform_exclusive_scan/1.cc: New test.
* testsuite/26_numerics/transform_inclusive_scan/1.cc: New test.
* testsuite/26_numerics/transform_reduce/1.cc: New test.
* testsuite/util/testsuite_iterators.h (test_container::size()): New
member function.

From-SVN: r274754

5 years agobaseline_symbols.txt: Update.
Uros Bizjak [Tue, 20 Aug 2019 20:13:16 +0000 (22:13 +0200)] 
baseline_symbols.txt: Update.

* config/abi/post/alpha-linux-gnu/baseline_symbols.txt: Update.

From-SVN: r274753

5 years agore PR rtl-optimization/91347 (hppa: wrong code generated with tail call optimisation)
Eric Botcazou [Tue, 20 Aug 2019 09:13:29 +0000 (09:13 +0000)] 
re PR rtl-optimization/91347 (hppa: wrong code generated with tail call optimisation)

PR rtl-optimization/91347
* dse.c (scan_insn): Call add_wild_read for non-const/memset tail calls
before reload if HARD_FRAME_POINTER_IS_ARG_POINTER.

From-SVN: r274709

5 years agoDaily bump.
GCC Administrator [Tue, 20 Aug 2019 00:16:18 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r274688

5 years ago[aarch64] PR target/91386 Use copy_rtx to avoid modifying original insns in peep2...
Richard Earnshaw [Mon, 19 Aug 2019 16:11:30 +0000 (16:11 +0000)] 
[aarch64] PR target/91386 Use copy_rtx to avoid modifying original insns in peep2 pattern

PR target/91386 is a situation where a peephole2 pattern substitution
is discarded late because the selected instructions contain
frame-related notes that we cannot redistribute (because the pattern
has more than one insn in the output).  Unfortunately, the original
insns were being modified during the generation, so after the undo we
are left with corrupt RTL.

We avoid this by ensuring that the modifications are always made on a
copy, so that the original insns are never changed.

Backport from mainline
2019-09-09  Richard Earnshaw  <rearnsha@arm.com>

PR target/91386
        * config/aarch64/aarch64.c (aarch64_gen_adjusted_ldpstp): Use copy_rtx
        to preserve the contents of the original insns.

From-SVN: r274675

5 years agore PR fortran/91485 (Erroneous conflict between variable x and operator(.x.))
Steven G. Kargl [Mon, 19 Aug 2019 03:21:46 +0000 (03:21 +0000)] 
re PR fortran/91485 (Erroneous conflict between variable x and operator(.x.))

2019-08-18  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/91485
module.c (gfc_match_use): User defined operator cannot conflict with
a rename symbol.

2019-08-18  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/91485
* gfortran.dg/pr91485.f90: New test.

From-SVN: r274632

5 years agoDaily bump.
GCC Administrator [Mon, 19 Aug 2019 00:16:14 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r274628

5 years agoDarwin, libsanitizer - remove reference to __cxa_rethrow_primary_exception.
Iain Sandoe [Sun, 18 Aug 2019 19:11:29 +0000 (19:11 +0000)] 
Darwin, libsanitizer - remove reference to __cxa_rethrow_primary_exception.

For some Darwin versions the absence of the rethrow_primary_exception
symbol causes almost all sanitizer tests to fail.
The symbol is not present in libstdc++ and, therefore is is correct to
remove the reference to it for all platforms.  We do this by adding a
new guard "ASAN_HAS_CXA_RETHROW_PRIMARY_EXCEPTION".

For the backported version, to avoid bumping the library version, this
is only applied for Darwin (because of the way that symbol interposing
works on Darwin, this does not alter the exported symbols list).

libsanitizer/

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

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

PR libsanitizer/87880
* asan/asan_interceptors.h:
(ASAN_INTERCEPT___CXA_RETHROW_PRIMARY_EXCEPTION): New.
* asan/Makefile.am (DEFS): Add (for Darwin only)
ASAN_HAS_CXA_RETHROW_PRIMARY_EXCEPTION, defined to 0.
* asan/Makefile.in: Regenerated.

From-SVN: r274625

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

From-SVN: r274617

5 years agore PR fortran/91471 (f951: internal compiler error: gfc_variable_attr(): Bad array...
Steven G. Kargl [Sat, 17 Aug 2019 18:16:51 +0000 (18:16 +0000)] 
re PR fortran/91471 (f951: internal compiler error: gfc_variable_attr(): Bad array reference)

2019-08-17  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/91471
* primary.c (gfc_variable_attr): Remove a gfc_internal_error(),
which cannot be reached by conforming Fortran code, but seems to
be reachable from nonconforming Fortran code.  Treat the AR_UNKNOWN
case as a no-op.

2019-08-17  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/91471
* gfortran.dg/pr91471.f90: New test.

From-SVN: r274612

5 years agore PR fortran/78739 (ICE in gfc_get_symbol_decl, at fortran/trans-decl.c:1477)
Steven G. Kargl [Sat, 17 Aug 2019 18:14:26 +0000 (18:14 +0000)] 
re PR fortran/78739 (ICE in gfc_get_symbol_decl, at fortran/trans-decl.c:1477)

2019-08-17  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/78739
* match.c (gfc_match_st_function):  When matching a statement function,
need to check if the statement function name shadows the function
name.

2019-08-17  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/78739
* fortran.dg/pr78739.f90: New test.

From-SVN: r274611

5 years agore PR fortran/78719 ([F03] ICE in gfc_get_symbol_decl, at fortran/trans-decl.c:1438)
Steven G. Kargl [Sat, 17 Aug 2019 18:11:58 +0000 (18:11 +0000)] 
re PR fortran/78719 ([F03] ICE in gfc_get_symbol_decl, at fortran/trans-decl.c:1438)

2019-08-17  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/78719
* decl.c (get_proc_name): Check for a CLASS entity when trying to
add attributes to an entity that already has an explicit interface.

2019-08-17  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/78719
* gfortran.dg/pr78719_1.f90: New test.
* gfortran.dg/pr78719_2.f90: Ditto.
* gfortran.dg/pr78719_3.f90: Ditto.

From-SVN: r274610

5 years agore PR fortran/82992 (ICE in create_int_parameter_array, at fortran/module.c:6586)
Steven G. Kargl [Sat, 17 Aug 2019 18:08:21 +0000 (18:08 +0000)] 
re PR fortran/82992 (ICE in create_int_parameter_array, at fortran/module.c:6586)

2019-08-17  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/82992
* module.c (gfc_match_use):  When renaming a module entity, search
current namespace for conflicting symbol.

2019-08-17  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/82992
* gfortran.dg/pr71649.f90: Adjust error messages.
* gfortran.dg/use_15.f90: Ditto.
* gfortran.dg/use_rename_8.f90: Ditto.

From-SVN: r274609

5 years agoPR c++/90393 - ICE with throw in ?:
Jason Merrill [Sat, 17 Aug 2019 01:34:00 +0000 (21:34 -0400)] 
PR c++/90393 - ICE with throw in ?:

I fixed the DR 1560 implementation properly for GCC 10, but for GCC 9 feel
that it's better not to change the meaning of well-formed code.  Reverting
the incomplete implementation fixes the ICEs.

* call.c (build_conditional_expr_1): Revert changes from
PR c++/64372 and c++/86205.

From-SVN: r274597

5 years agoDaily bump.
GCC Administrator [Sat, 17 Aug 2019 00:16:13 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r274594

5 years agobackport: re PR tree-optimization/91109 ([arm] gcc.c-torture/execute/20040709-1.c...
Bernd Edlinger [Fri, 16 Aug 2019 16:37:04 +0000 (16:37 +0000)] 
backport: re PR tree-optimization/91109 ([arm] gcc.c-torture/execute/20040709-1.c fails since r273135)

2019-08-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        Backport from mainline
        2019-08-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        PR tree-optimization/91109
        * lra-int.h (lra_need_for_scratch_reg_p): Declare.
        * lra.c (lra): Use lra_need_for_scratch_reg_p.
        * lra-spills.c (lra_need_for_scratch_reg_p): New function.

From-SVN: r274578

5 years agobackport: re PR tree-optimization/91109 ([arm] gcc.c-torture/execute/20040709-1.c...
Bernd Edlinger [Fri, 16 Aug 2019 16:31:13 +0000 (16:31 +0000)] 
backport: re PR tree-optimization/91109 ([arm] gcc.c-torture/execute/20040709-1.c fails since r273135)

2019-08-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        Backport from mainline
        2019-08-07  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        PR tree-optimization/91109
        * lra-remat.c (update_scratch_ops): Remove assignment of the
        hard register.

From-SVN: r274577

5 years agotest_summary: Do not escape "=".
Uros Bizjak [Fri, 16 Aug 2019 12:03:09 +0000 (14:03 +0200)] 
test_summary: Do not escape "=".

* test_summary: Do not escape "=".

From-SVN: r274566

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

From-SVN: r274554

5 years agobackport: omp-simd-clone.c (simd_clone_adjust_return_type): Remove call to build_dist...
Steve Ellcey [Thu, 15 Aug 2019 20:41:47 +0000 (20:41 +0000)] 
backport: omp-simd-clone.c (simd_clone_adjust_return_type): Remove call to build_distinct_type_copy.

2019-08-15  Steve Ellcey  <sellcey@marvell.com>

Backport from mainline
2019-08-02  Steve Ellcey  <sellcey@marvell.com>

* omp-simd-clone.c (simd_clone_adjust_return_type): Remove call to
build_distinct_type_copy.
(simd_clone_adjust_argument_types): Ditto.
(simd_clone_adjust): Call build_distinct_type_copy here.
(expand_simd_clones): Ditto.

From-SVN: r274548

5 years agoPR c++/90884 - stray note with -Wctor-dtor-privacy.
Marek Polacek [Thu, 15 Aug 2019 18:35:07 +0000 (18:35 +0000)] 
PR c++/90884 - stray note with -Wctor-dtor-privacy.

* class.c (maybe_warn_about_overly_private_class): Guard the call to
inform.

From-SVN: r274547

5 years agoPR c++/90473 - wrong code with nullptr in default argument.
Marek Polacek [Thu, 15 Aug 2019 18:33:43 +0000 (18:33 +0000)] 
PR c++/90473 - wrong code with nullptr in default argument.

* call.c (null_ptr_cst_p): Update quote from the standard.
* decl.c (check_default_argument): Don't return nullptr when the arg
has side-effects.

* g++.dg/cpp0x/nullptr42.C: New test.

From-SVN: r274546

5 years agoPR c++/87519 - bogus warning with -Wsign-conversion.
Marek Polacek [Thu, 15 Aug 2019 18:32:33 +0000 (18:32 +0000)] 
PR c++/87519 - bogus warning with -Wsign-conversion.

* typeck.c (cp_build_binary_op): Use same_type_p instead of comparing
the types directly.

* g++.dg/warn/Wsign-conversion-5.C: New test.

From-SVN: r274545

5 years agoPR c++/81429 - wrong parsing of constructor with C++11 attribute.
Marek Polacek [Thu, 15 Aug 2019 18:31:16 +0000 (18:31 +0000)] 
PR c++/81429 - wrong parsing of constructor with C++11 attribute.

* parser.c (cp_parser_constructor_declarator_p): Handle the scenario
when a parameter declaration begins with [[attribute]].

* g++.dg/cpp0x/gen-attrs-68.C: New test.
* g++.dg/cpp0x/gen-attrs-69.C: New test.

From-SVN: r274544

5 years agobackport: [multiple changes]
Richard Biener [Thu, 15 Aug 2019 12:02:47 +0000 (12:02 +0000)] 
backport: [multiple changes]

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

PR tree-optimization/91445
* gcc.dg/torture/pr91445.c: New testcase.

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

PR tree-optimization/91091
* tree-ssa-alias.h (get_continuation_for_phi): Add tbaa_p parameter.
(walk_non_aliased_vuses): Likewise.
* tree-ssa-alias.c (maybe_skip_until): Pass down tbaa_p.
(get_continuation_for_phi): New tbaa_p parameter and pass
it down.
(walk_non_aliased_vuses): Likewise.
* tree-ssa-pre.c (translate_vuse_through_block): Likewise.
* tree-ssa-scopedtables.c (avail_exprs_stack::lookup_avail_expr):
Likewise.
* tree-ssa-sccvn.c (struct vn_walk_cb_data): Add tbaa_p flag.
(vn_reference_lookup_3): Handle and pass down tbaa_p flag.
(vn_reference_lookup_pieces): Adjust.
(vn_reference_lookup): Remove alias-set altering, instead pass
down false as tbaa_p.

* gcc.dg/tree-ssa/pr91091-2.c: New testcase.

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

* tree-ssa-sccvn.h (vn_reference_lookup): Add last_vuse_ptr
argument.
* tree-ssa-sccvn.c (last_vuse_ptr, vn_walk_kind): Move
globals into...
(struct vn_walk_cb_data): New callback data struct.
(vn_reference_lookup_2): Adjust.
(vn_reference_lookup_3): Likewise.
(vn_reference_lookup_pieces): Likewise.
(vn_reference_lookup): Likewise, get last_vuse_ptr argument.
(visit_reference_op_load): Adjust.

From-SVN: r274532

5 years agoDaily bump.
GCC Administrator [Thu, 15 Aug 2019 00:16:22 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r274500

5 years agobackport: re PR c++/90947 (Simple lookup table of array of strings is miscompiled)
Martin Sebor [Wed, 14 Aug 2019 20:36:46 +0000 (20:36 +0000)] 
backport: re PR c++/90947 (Simple lookup table of array of strings is miscompiled)

Backport from mainline

2019-08-01  Martin Sebor  <msebor@redhat.com>

PR c++/90947
* tree.c (type_initializer_zero_p): Define.
* tree.h (type_initializer_zero_p): New function.

2019-08-05  Martin Sebor  <msebor@redhat.com>

* doc/extend.texi (Common Variable Attributes): Document alias
attribute.

2019-08-01  Martin Sebor  <msebor@redhat.com>

PR c++/90947
* decl.c (reshape_init_array_1): Avoid truncating initializer
lists containing string literals.

2019-08-14  Martin Sebor  <msebor@redhat.com>

PR tree-optimization/91294
* gcc.dg/strlenopt-44.c: Adjust tested result.
* gcc.dg/strlenopt-70.c: Avoid exercising unimplemnted optimization.
* gcc.dg/strlenopt-73.c: New test.
* gcc.dg/strlenopt-74.c: New test.
* gcc.dg/strlenopt-75.c: New test.
* gcc.dg/strlenopt-76.c: New test.
* gcc.dg/strlenopt-77.c: New test.

From-SVN: r274494

5 years agoPR c++/91436 fix C++ dialect for std::make_unique fix-it hint
Jonathan Wakely [Wed, 14 Aug 2019 20:10:00 +0000 (21:10 +0100)] 
PR c++/91436 fix C++ dialect for std::make_unique fix-it hint

The std::make_unique function wasn't added until C++14, and neither was
the std::complex_literals namespace.

gcc/cp:

PR c++/91436
* name-lookup.c (get_std_name_hint): Fix min_dialect field for
complex_literals and make_unique entries.

gcc/testsuite:

PR c++/91436
* g++.dg/lookup/missing-std-include-5.C: Limit test to C++14 and up.
* g++.dg/lookup/missing-std-include-6.C: Don't check make_unique in
test that runs for C++11.
* g++.dg/lookup/missing-std-include-8.C: Check make_unique here.

From-SVN: r274493

5 years agore PR fortran/87991 (ICE in gfc_constructor_append_expr, at fortran/constructor.c...
Steven G. Kargl [Wed, 14 Aug 2019 04:38:29 +0000 (04:38 +0000)] 
re PR fortran/87991 (ICE in gfc_constructor_append_expr, at fortran/constructor.c:135)

2019-08-13  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/87991
* resolve.c (check_data_variable): data-stmt-object with pointer
attribute requires a data-stmt-value with the target attribute.

2019-08-13  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/87991
* gfortran.dg/pr87991.f90: New test.

From-SVN: r274413

5 years agoDaily bump.
GCC Administrator [Wed, 14 Aug 2019 00:16:15 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r274409

5 years agobackport: re PR fortran/90563 (Out of bounds error when compiling with -Wextra)
Thomas Koenig [Tue, 13 Aug 2019 22:25:32 +0000 (22:25 +0000)] 
backport: re PR fortran/90563 (Out of bounds error when compiling with -Wextra)

2013-08-13  Thomas Koenig  <tkoenig@gcc.gnu.org>

Backport from trunk
PR fortran/90563
* frontend-passes.c (insert_index): Suppress errors while
simplifying the resulting expression.

2013-08-13  Thomas Koenig  <tkoenig@gcc.gnu.org>

Backport from trunk
PR fortran/90563
* gfortran.dg/do_subsript_5.f90: New test.

From-SVN: r274405

5 years agore PR fortran/88072 (gfortran crashes with an internal compiler error)
Steven G. Kargl [Tue, 13 Aug 2019 20:38:01 +0000 (20:38 +0000)] 
re PR fortran/88072 (gfortran crashes with an internal compiler error)

2019-08-13  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/88072
* misc.c (gfc_typename): Do not point to something that ought not to
be pointed at.

2019-08-13  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/88072
* gfortran.dg/pr88072.f90: New test.
* gfortran.dg/unlimited_polymorphic_28.f90: Fix error message.

From-SVN: r274401

5 years agobackport: re PR fortran/90561 (ICE in gimplify_var_or_parm_decl, at gimplify.c:2747)
Thomas Koenig [Tue, 13 Aug 2019 20:01:43 +0000 (20:01 +0000)] 
backport: re PR fortran/90561 (ICE in gimplify_var_or_parm_decl, at gimplify.c:2747)

2019-08-13  Thomas Koenig  <tkoenig@gcc.gnu.org>

Backport from trunk
PR fortran/90561
* trans.h (gfc_evaluate_now_function_scope): New function.
* trans.c (gfc_evaluate_now_function_scope): New function.
* trans-expr.c (gfc_trans_assignment): Use it.

2019-08-13  Thomas Koenig  <tkoenig@gcc.gnu.org>

Backport from trunk
PR fortran/90561
* gfortran.dg/deferred_character_34.f90: New test.

From-SVN: r274398

5 years agore PR fortran/89647 (Host associated procedure unable to be used as binding target)
Steven G. Kargl [Tue, 13 Aug 2019 18:49:00 +0000 (18:49 +0000)] 
re PR fortran/89647 (Host associated procedure unable to be used as binding target)

2019-08-13  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/89647
resolve.c (resolve_typebound_procedure): Allow host associated
procedure to be a binding target.  While here, wrap long line.

2019-08-13  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/89647
* gfortran.dg/pr89647.f90: New test.

From-SVN: r274395

5 years agore PR fortran/87993 (ICE in gfc_constructor_first, at fortran/constructor.c:234)
Steven G. Kargl [Tue, 13 Aug 2019 18:27:05 +0000 (18:27 +0000)] 
re PR fortran/87993 (ICE in gfc_constructor_first, at fortran/constructor.c:234)

2019-08-13  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/87993
* expr.c (gfc_simplify_expr): Simplifcation of an array with a kind
type inquiry suffix yields a constant expression.

2019-08-13  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/87993
* gfortran.dg/pr87993.f90: New test.

From-SVN: r274390

5 years agoPR libstdc++/90361 add missing macro definition
Jonathan Wakely [Tue, 13 Aug 2019 13:14:45 +0000 (14:14 +0100)] 
PR libstdc++/90361 add missing macro definition

The src/c++17/string-inst.cc file needs to override the default string
ABI so that it still contains the expected symbols even when the library
is configured with --with-default-libstdcxx-abi=gcc4-compatible.

Backport from mainline
2019-08-12  Jonathan Wakely  <jwakely@redhat.com>

PR libstdc++/90361
* src/c++17/string-inst.cc: Use _GLIBCXX_USE_CXX11_ABI=1 by default.

From-SVN: r274379

5 years agobackport: re PR fortran/91424 (Extend warnings about DO loops)
Thomas Koenig [Tue, 13 Aug 2019 10:05:44 +0000 (10:05 +0000)] 
backport: re PR fortran/91424 (Extend warnings about DO loops)

2019-08-13  Thomas Koenig  <tkoenig@gcc.gnu.org>

Backport from trunk
PR fortran/91424
* frontend-passes.c (do_subscript): Do not warn for an
expression a second time.  Do not warn about a zero-trip loop.
(doloop_warn): Also look at contained namespaces.

2019-08-13  Thomas Koenig  <tkoenig@gcc.gnu.org>

Backport from trunk
PR fortran/91424
* gfortran.dg/do_subscript_3.f90: New test.
* gfortran.dg/do_subscript_4.f90: New test.
* gfortran.dg/pr70754.f90: Use indices that to not overflow.

2019-08-13  Thomas Koenig  <tkoenig@gcc.gnu.org>

Backport from trunk
PR fortran/91422
* testsuite/libgomp.oacc-fortran/routine-7.f90: Correct array
dimension.

From-SVN: r274369

5 years agoPR fortran/91414 Correctly fill master_state from os_seed.
Janne Blomqvist [Tue, 13 Aug 2019 09:02:25 +0000 (12:02 +0300)] 
PR fortran/91414 Correctly fill master_state from os_seed.

From-SVN: r274364

5 years agoPR fortran/91414 Improve initialization of PRNG
Janne Blomqvist [Tue, 13 Aug 2019 08:42:43 +0000 (11:42 +0300)] 
PR fortran/91414 Improve initialization of PRNG

As part of PR 91414 an improved PRNG was contributed to trunk. This is
a partial backport of some related changes to the PRNG. Namely when
seeding the PRNG, it needs only 8 bytes of randomness from the OS, and
uses a simple splitmix64 PRNG to fill in the rest of the state,
instead of getting all the state from the OS. This can be useful for
operating systems that can run out of entropy.

libgfortran/ChangeLog:

2019-08-13  Janne Blomqvist  <jb@gcc.gnu.org>

Partial backport from trunk
PR fortran/91414
* intrinsics/random.c (lcg_parkmiller): Replace with splitmix64.
(splitmix64): New function.
(getosrandom): Fix return value, simplify.
(init_rand_state): Use getosrandom only to get 8 bytes, splitmix64
to fill rest of state.

From-SVN: r274362

5 years agoDaily bump.
GCC Administrator [Tue, 13 Aug 2019 00:16:12 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r274326

5 years agore PR fortran/91359 (logical function X returns .TRUE. - Warning: spaghetti code)
Steven G. Kargl [Mon, 12 Aug 2019 20:09:00 +0000 (20:09 +0000)] 
re PR fortran/91359 (logical function X returns .TRUE. - Warning:  spaghetti code)

2019-08-12  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/91359
* trans-decl.c (gfc_generate_return): Ensure something is returned
from a function.

2019-08-12  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/91359
* gfortran.dg/pr91359_1.f: New test.
* gfortran.dg/pr91359_2.f: Ditto.

From-SVN: r274319

5 years agore PR fortran/42546 (ALLOCATED statement typo in the docs and for scalar variables)
Steven G. Kargl [Mon, 12 Aug 2019 19:48:37 +0000 (19:48 +0000)] 
re PR fortran/42546 (ALLOCATED statement typo in the docs and for scalar variables)

2019-08-01  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/42546
* check.c(gfc_check_allocated): Add comment pointing to ...
* intrinsic.c(sort_actual): ... the checking done here.

2019-08-01  Steven G. Kargl  <kargl@gcc.gnu.org>

PR fortran/42546
* gfortran.dg/allocated_1.f90: New test.
* gfortran.dg/allocated_2.f90: Ditto.

From-SVN: r274318

5 years agoPR c++/88095, CTAD for literal operator templates per P0732
Tom Honermann [Mon, 12 Aug 2019 17:46:37 +0000 (17:46 +0000)] 
PR c++/88095, CTAD for literal operator templates per P0732

This patch fixes PR c++/88095: class nontype template parameter UDL string
literals doesn't accepts deduction placeholder

It also addresses a latent issue; literal operator templates with template
parameter packs of literal class type were previously accepted.  The patch
corrects this and adds a test (udlit-class-nttp-neg.C).

This fix is needed for one of the char8_t remediation approaches documented
in P1423, and may be helpful for existing code bases impacted by the char8_t
changes adopted via P0482 for C++20.

gcc/cp/ChangeLog:

2019-08-02  Tom Honermann  <tom@honermann.net>

        * parser.c (cp_parser_template_declaration_after_parameters): Enable
        class template argument deduction for non-type template parameters
        in literal operator templates.

gcc/testsuite/ChangeLog:

2019-08-02  Tom Honermann  <tom@honermann.net>

        PR c++/88095
        * g++.dg/cpp2a/udlit-class-nttp-ctad.C: New test.
        * g++.dg/cpp2a/udlit-class-nttp-ctad-neg.C: New test.
        * g++.dg/cpp2a/udlit-class-nttp-ctad-neg2.C: New test.
        * g++.dg/cpp2a/udlit-class-nttp.C: New test.
        * g++.dg/cpp2a/udlit-class-nttp-neg.C: New test.
        * g++.dg/cpp2a/udlit-class-nttp-neg2.C: New test.

From-SVN: r274317

5 years agoPR c++/91378 - ICE with noexcept and auto return type.
Jason Merrill [Mon, 12 Aug 2019 17:46:32 +0000 (13:46 -0400)] 
PR c++/91378 - ICE with noexcept and auto return type.

Here, since the call to g is not type-dependent, we call mark_used on it to
determine its return type.  This also wants to instantiate the
noexcept-expression.  But since nothing in maybe_instantiate_noexcept was
calling push_to_top_level, we substituted b.i with processing_template_decl
set, so we left it unresolved for later access checking.  As a result, the
type of C::g<int> remained instantiation-dependent, leading to an ICE in
type_dependent_expression_p on the assert that the type of a function
template with no dependent template arguments must be non-dependent.

* pt.c (maybe_instantiate_noexcept): push_to_top_level.

From-SVN: r274316

5 years agoPR c++/90538 - multiple expansions of capture packs
Jason Merrill [Mon, 12 Aug 2019 17:46:25 +0000 (13:46 -0400)] 
PR c++/90538 - multiple expansions of capture packs

Previously, with init-capture the type of the closure field was a
DECLTYPE_TYPE of the initializer.  But since each time we tsubst a lambda we
get a different lambda, that meant that if the initializer is a lambda, we'd
end up with different closure types in the field and initializer after
substitution (PR 87322).  We dealt with this by remembering the lambda
instantiation within each pack expansion element, using
local_specialization_stack to separate the elements.  But that broke this
testcase, because it lost lambda capture proxies that also use
local_specializations.

So, this patch removes the local_specializations changes from that patch and
fixes 87322 differently, by giving init-capture fields 'auto' type and doing
deduction later.  There's a bit of a kludge to get the right number of
fields by pretending that 'auto...' uses the parameter packs from the
initializer, but it does the trick.

* cp-tree.h (DECLTYPE_FOR_INIT_CAPTURE): Remove.
* lambda.c (add_capture): Copy parameter packs from init.
(lambda_capture_field_type): Always use auto for init-capture.
* pt.c (uses_parameter_packs): Return tree.
(tsubst) [DECLTYPE_TYPE]: Remove init-capture handling.
(gen_elem_of_pack_expansion_instantiation): Don't push
local_specialization_stack.
(prepend_one_capture): New.
(tsubst_lambda_expr): Use it.  Don't touch local_specializations.
(do_auto_deduction): Avoid redundant error.

From-SVN: r274315

5 years agobackport: [multiple changes]
Richard Biener [Mon, 12 Aug 2019 12:59:08 +0000 (12:59 +0000)] 
backport: [multiple changes]

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

Backport from mainline
2019-08-12  Richard Biener  <rguenther@suse.de>

PR lto/91375
* tree.c (free_lang_data_in_type): Do not free TYPE_BINFO dependent on
flag_devirtualize.

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

PR driver/91130
* lto-wrapper.c (get_options_from_collect_gcc_options): Remove
lang_mask option, always use CL_DRIVER.
(find_and_merge_options): Adjust.
(run_gcc): Likewise.

2019-08-07  Richard Earnshaw  <rearnsha@arm.com>

PR driver/91130
* lto-wrapper.c (find_and_merge_options): Use CL_DRIVER when
processing COLLECT_GCC_OPTIONS.
(run_gcc): Likewise.

From-SVN: r274311

5 years ago* BASE-VER: Set to 9.2.1.
Jakub Jelinek [Mon, 12 Aug 2019 08:40:24 +0000 (10:40 +0200)] 
* BASE-VER: Set to 9.2.1.

From-SVN: r274276

5 years agoUpdate ChangeLog and version files for release releases/gcc-9.2.0
Jakub Jelinek [Mon, 12 Aug 2019 07:38:49 +0000 (09:38 +0200)] 
Update ChangeLog and version files for release

From-SVN: r274274

5 years agoDaily bump.
GCC Administrator [Mon, 12 Aug 2019 00:16:21 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r274271

5 years agoDaily bump.
GCC Administrator [Sun, 11 Aug 2019 00:16:21 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r274260

5 years agoDaily bump.
GCC Administrator [Sat, 10 Aug 2019 00:16:19 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r274247

5 years ago* zh_TW.po: Update.
Joseph Myers [Fri, 9 Aug 2019 22:02:27 +0000 (23:02 +0100)] 
* zh_TW.po: Update.

From-SVN: r274244

5 years ago* uk.po: Update.
Joseph Myers [Fri, 9 Aug 2019 22:00:57 +0000 (23:00 +0100)] 
* uk.po: Update.

From-SVN: r274242

5 years agoDaily bump.
GCC Administrator [Fri, 9 Aug 2019 00:16:13 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r274223

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

From-SVN: r274204

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

From-SVN: r274154

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

From-SVN: r274133

6 years agoAda, Darwin, PPC, backport fix for stack check probes.
Iain Sandoe [Mon, 5 Aug 2019 08:12:23 +0000 (08:12 +0000)] 
Ada, Darwin, PPC, backport fix for stack check probes.

On PPC, Darwin uses the same code as other parts of the port.

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

Backport from mainline.
2019-07-02  Iain Sandoe  <iain@sandoe.co.uk>

* libgnat/system-darwin-ppc.ads: Set Stack_Check_Probes True for
PPC Darwin.

From-SVN: r274111

6 years agoAda, backport push -shared-libgcc where needed.
Iain Sandoe [Mon, 5 Aug 2019 08:09:34 +0000 (08:09 +0000)] 
Ada, backport push -shared-libgcc where needed.

Gnatlink has code that checks for duplicate '-shared-libgcc’ switches (but not
duplicate â€˜static-libgcc’) and also pushes â€™static-libgcc' onto the link line for
targets that default to static linking, provided '-shared-libgcc' is not present.

For targets that should use a shared libgcc we need the same process to be
applied (in inverse), in the event that they do not default to providing the
shared flag implicitly.

So this adds the complementary set of tests for the shared case and pushes
the shared flag as needed. As a minor tidy-up there’s no need push duplicates
of the libgcc switch onto the link line when one has already been seen (given by
the user).

The patch does not alter any of the platform defaults for static/shared libgcc,
but it ensures that the intent of the link is explicit.

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

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

* gnatlink.adb (Link_Step): Remove duplicate -static-libgcc switches.
Push -shared-libgcc explicitly, when it is the target default (unless
overidden by the static flag).
When the user has put an instance of shared/static-libgcc do not push
a duplicate of this.

From-SVN: r274110

6 years agoRISC-V: Promote type correctly for libcalls
Kito Cheng [Mon, 5 Aug 2019 07:54:31 +0000 (07:54 +0000)] 
RISC-V: Promote type correctly for libcalls

 - argument and return value for libcall won't promote at
   default_promote_function_mode_always_promote, however we expect it
   should sign-extend as normal function.

 - Witout this patch, this test case will fail at -march=rv64i -mabi=lp64.

 - The implementation of riscv_promote_function_mode is borrowed from MIPS.

gcc/ChangeLog

Backport from mainline
2019-08-05  Kito Cheng  <kito.cheng@sifive.com>

* config/riscv/riscv.c (riscv_promote_function_mode): New.
(TARGET_PROMOTE_FUNCTION_MODE): Use riscv_promote_function_mode.

gcc/testsuite/ChangeLog

Backport from mainline
2019-08-05  Kito Cheng  <kito.cheng@sifive.com>

* gcc.target/riscv/promote-type-for-libcall.c: New.

From-SVN: r274108

6 years agoPR91349, powerpc64*-*-freebsd* defines _GNU_SOURCE
Alan Modra [Mon, 5 Aug 2019 01:53:31 +0000 (11:23 +0930)] 
PR91349, powerpc64*-*-freebsd* defines _GNU_SOURCE

rev 266496 (git ab6b1bb456) undefined some macros in rs6000/freebsd.h
but missed doing the same in rs6000/freebsd64.h.

PR target/91349
* config/rs6000/freebsd64.h (CPLUSPLUS_CPP_SPEC),
(LINK_GCC_C_SEQUENCE_SPEC): Undef.

From-SVN: r274106

6 years agobackport: re PR fortran/87233 (Constraint C1279 still followed after f2008 standard...
Jerry DeLisle [Mon, 5 Aug 2019 00:47:41 +0000 (00:47 +0000)] 
backport: re PR fortran/87233 (Constraint C1279 still followed after f2008 standard revision (?))

2019-08-04  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

Backport from trunk
PR fortran/87233
* expr.c (check_restricted): Relax constraint C1279 which was
removed from F2008 and above.

* gfortran.dg/initialization_14.f90: Modify to now pass by
removing two dg-error commands. Added comments.
* gfortran.dg/initialization_30.f90: New test that includes the
two tests removed above with the 'dg-options -std=f95'.

From-SVN: r274104

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

From-SVN: r274102

6 years agobackport: rs6000.c (rs6000_dbx_register_number): Return the correct numbers for TFHAR...
Segher Boessenkool [Sun, 4 Aug 2019 19:23:59 +0000 (21:23 +0200)] 
backport: rs6000.c (rs6000_dbx_register_number): Return the correct numbers for TFHAR, TFIAR, TEXASR.

Backport from trunk
2019-05-02  Segher Boessenkool  <segher@kernel.crashing.org>

* config/rs6000/rs6000.c (rs6000_dbx_register_number): Return the
correct numbers for TFHAR, TFIAR, TEXASR.

From-SVN: r274097

6 years agoObjective-C, NeXT, backport workaround for PR90709
Iain Sandoe [Sun, 4 Aug 2019 13:34:19 +0000 (13:34 +0000)] 
Objective-C, NeXT, backport workaround for PR90709

Since we cannot parse the current NeXT headers, because of PR90709 and its
dependents, we have a large amount of testsuite noise for Darwin platforms.
In order to restore the usefulness of the testsuite, we are going add headers
without the modern syntax elements that trigger the bug, and use these for
test runs on newer Darwin.

The headers are imported from GNUStep, with some local modifications to make
sure that __BLOCKS__ is honoured as a gate for Apple-style blocks closures.

CF-CFString.h, F-NS*.h are proxy headers that use the installed CoreFoundation
or Foundation headers on systems <= Darwin12 and the GNUStep headers for newer.

Use the CF-CFString.h, F-NS*.h proxy headers where needed in the objective-c
testsuite. Make minor adjustments to tests as required, providing that those
do not alter the test intent.

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

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

PR objc/90709
* obj-c++.dg/proto-lossage-7.mm: Use proxy headers.
* obj-c++.dg/strings/const-cfstring-2.mm: Likewise.
* obj-c++.dg/strings/const-cfstring-5.mm: Likewise
* obj-c++.dg/strings/const-str-12.mm: Likewise.
* obj-c++.dg/syntax-error-1.mm: Likewise.
* obj-c++.dg/torture/strings/const-cfstring-1.mm: Likewise.
* obj-c++.dg/torture/strings/const-str-10.mm: Likewise.
* obj-c++.dg/torture/strings/const-str-11.mm: Likewise.
* obj-c++.dg/torture/strings/const-str-9.mm: Likewise.
* obj-c++.dg/cxx-ivars-3.mm: Skip on later Darwin, where the 10.4 API
in no longer supported, also on m64 where there's no meaning to it.
* obj-c++.dg/isa-field-1.mm: Suppress unwanted warning, add comment why.
* obj-c++.dg/objc-gc-3.mm: Skip for Darwin > 16, the API use is an error
there.
* obj-c++.dg/qual-types-1.mm: Prune a spurious l64 warning.
* obj-c++.dg/stubify-1.mm: Tidy up after better compiler warnings.
* obj-c++.dg/stubify-2.mm: Likewise.
* obj-c++.dg/try-catch-1.mm: Likewise.
* obj-c++.dg/try-catch-3.mm: Likewise.

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

PR objc/90709
* objc.dg/encode-7-next-64bit.m: Use proxy headers.
* objc.dg/image-info.m: Likewise.
* objc.dg/method-6.m: Likewise.
* objc.dg/no-extra-load.m: Likewise.
* objc.dg/objc-foreach-4.m: Likewise.
* objc.dg/objc-foreach-5.m: Likewise.
* objc.dg/proto-lossage-7.m: Likewise.
* objc.dg/strings/const-cfstring-2.m: Likewise.
* objc.dg/strings/const-cfstring-5.m: Likewise.
* objc.dg/strings/const-str-12b.m: Likewise.
* objc.dg/symtab-1.m: Likewise.
* objc.dg/torture/strings/const-cfstring-1.m: Likewise.
* objc.dg/torture/strings/const-str-10.m: Likewise.
* objc.dg/torture/strings/const-str-11.m: Likewise.
* objc.dg/torture/strings/const-str-9.m: Likewise.
* objc.dg/zero-link-1.m: Likewise.
* objc.dg/zero-link-2.m: Likewise.
* objc.dg/zero-link-3.m: Likewise.
* objc.dg/isa-field-1.m: Suppress unwanted warning, add comment why.
* objc.dg/headers.m: XFAIL for Darwin14-19.
* objc.dg/objc-gc-4.m: Skip for Darwin > 16, the API use is an error
there.

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

PR objc/90709
* objc-obj-c++-shared/CF-CFString.h: New.
* objc-obj-c++-shared/F-NSArray.h: New.
* objc-obj-c++-shared/F-NSAutoreleasePool.h: New.
* objc-obj-c++-shared/F-NSObject.h: New.
* objc-obj-c++-shared/F-NSString.h: New.
* objc-obj-c++-shared/F-NSValue.h: New.
* objc-obj-c++-shared/GNUStep/CoreFoundation/CFArray.h: New.
* objc-obj-c++-shared/GNUStep/CoreFoundation/CFAvailability.h: New.
* objc-obj-c++-shared/GNUStep/CoreFoundation/CFBase.h: New.
* objc-obj-c++-shared/GNUStep/CoreFoundation/CFCharacterSet.h: New.
* objc-obj-c++-shared/GNUStep/CoreFoundation/CFData.h: New.
* objc-obj-c++-shared/GNUStep/CoreFoundation/CFDictionary.h: New.
* objc-obj-c++-shared/GNUStep/CoreFoundation/CFLocale.h: New.
* objc-obj-c++-shared/GNUStep/CoreFoundation/CFString.h: New.
* objc-obj-c++-shared/GNUStep/Foundation/NSArray.h: New.
* objc-obj-c++-shared/GNUStep/Foundation/NSAutoreleasePool.h: New.
* objc-obj-c++-shared/GNUStep/Foundation/NSDate.h: New.
* objc-obj-c++-shared/GNUStep/Foundation/NSEnumerator.h: New.
* objc-obj-c++-shared/GNUStep/Foundation/NSGeometry.h: New.
* objc-obj-c++-shared/GNUStep/Foundation/NSObjCRuntime.h: New.
* objc-obj-c++-shared/GNUStep/Foundation/NSObject.h: New.
* objc-obj-c++-shared/GNUStep/Foundation/NSRange.h: New.
* objc-obj-c++-shared/GNUStep/Foundation/NSString.h: New.
* objc-obj-c++-shared/GNUStep/Foundation/NSValue.h: New.
* objc-obj-c++-shared/GNUStep/Foundation/NSZone.h: New.
* objc-obj-c++-shared/GNUStep/GNUstepBase/GNUstep.h: New.
* objc-obj-c++-shared/GNUStep/GNUstepBase/GSBlocks.h: New.
* objc-obj-c++-shared/GNUStep/GNUstepBase/GSConfig.h: New.
* objc-obj-c++-shared/GNUStep/GNUstepBase/GSObjCRuntime.h: New.
* objc-obj-c++-shared/GNUStep/GNUstepBase/GSVersionMacros.h: New.
* objc-obj-c++-shared/GNUStep/GNUstepBase/NSArray+GNUstepBase.h: New.
* objc-obj-c++-shared/GNUStep/GNUstepBase/NSMutableString+GNUstepBase.h:
New.
* objc-obj-c++-shared/GNUStep/GNUstepBase/NSNumber+GNUstepBase.h: New.
* objc-obj-c++-shared/GNUStep/GNUstepBase/NSObject+GNUstepBase.h: New.
* objc-obj-c++-shared/GNUStep/GNUstepBase/NSString+GNUstepBase.h: New.

From-SVN: r274095

6 years agoDarwin, PPC, testsuite, backport fix for bmi2-bzhi64-1a.c
Iain Sandoe [Sun, 4 Aug 2019 13:17:15 +0000 (13:17 +0000)] 
Darwin, PPC, testsuite, backport fix for bmi2-bzhi64-1a.c

This test is failing with older cpus because the included header needs both
altivec and vsx to be enabled to succeed in compiling. Without this (if these
are not defaults for the cpu) there are errors like:

In file included from ... x86intrin.h:41,
from ... bmi2-bzhi64-1a.c:6:
... xmmintrin.h: In function '_mm_loadu_ps':
... xmmintrin.h:122:11:
error: incompatible types when returning type 'int' but '__m128' {aka '__vector(4) float'} was expected
<snip>
... xmmintrin.h: In function '_mm_cvtps_pi32':
... xmmintrin.h:996:3:
error: use of 'long long' in AltiVec types is invalid without '-mvsx'
<snip>

Fixed by adding -maltivec -mvsx to the options

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

Backport from mainline.
2019-07-27  Iain Sandoe  <iain@sandoe.co.uk>

* gcc.target/powerpc/bmi2-bzhi64-1a.c: Add options to enable altivec
and vsx.

From-SVN: r274093

6 years agoDarwin, testsuite, backport fix for 91087.
Iain Sandoe [Sun, 4 Aug 2019 13:12:26 +0000 (13:12 +0000)] 
Darwin, testsuite, backport fix for 91087.

The testcase is failing to instrument part of the source because of a bug
in the ordering of static DTORs. It seems unlikely that this is generically
fixable in the toolchain (and given that it's likely to be a dynamic loader
change would not be expected to be applied retrospectively to OS versions
that are out of support). To avoid the testsuite noise, xfail the count lines
that don't match (we can adjust the xfails as/when the upstream bug is fixed).

dejagnu xfails do not seem to work when embedded in a line like:
~Test (void) { .... /* count(1) { xfail ... } */ }
the closing brace seems to confuse the parser. The solution is to exapnd the
text onto three lines.

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

Backport from mainline.
2019-07-25  Iain Sandoe  <iain@sandoe.co.uk>

PR gcov-profile/91087
* g++.dg/gcov/pr16855.C: Xfail the count lines for the DTORs and the
"final" line for the failure summaries.  Adjust source layout so that
dejagnu xfail expressions work.

From-SVN: r274092

6 years agoDarwin, PPC, testsuite - backport fix for stabs-attrib-vect-darwin.
Iain Sandoe [Sun, 4 Aug 2019 13:10:00 +0000 (13:10 +0000)] 
Darwin, PPC, testsuite - backport fix for stabs-attrib-vect-darwin.

This test requires stabs support in the assembler so require it.

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

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

* gcc.target/powerpc/stabs-attrib-vect-darwin.c: Require stabs
support.

From-SVN: r274091

6 years agoDarwin, testsuite, backport removal of unused test.
Iain Sandoe [Sun, 4 Aug 2019 13:06:11 +0000 (13:06 +0000)] 
Darwin, testsuite, backport removal of unused test.

During GCC-9, the codegen for unreachable switch case statements changed
such that the (undefined) behaviour of reaching such statements is directed
to one of the existing switch cases. This means that the testcase which
deals with the old behaviour can no longer work (and there is nothing to test
with it). The [Darwin-specific] test is now redundant and can be removed.

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

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

* gcc.dg/pr57438-2.c: Remove.

From-SVN: r274090

6 years agoDarwin, PPC, testsuite - backport fix for safe-indirect-jump* fails.
Iain Sandoe [Sun, 4 Aug 2019 12:59:22 +0000 (12:59 +0000)] 
Darwin, PPC, testsuite - backport fix for safe-indirect-jump* fails.

The -mno-speculate-indirect-jumps functionality is not implemented for
Darwin.

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

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

* gcc.target/powerpc/safe-indirect-jump-1.c: Skip for Darwin.
* gcc.target/powerpc/safe-indirect-jump-7.c: Likewise.

From-SVN: r274088

6 years agoDarwin, PPC, testsuite - backport fix for powerpc/spec-barr-1.c
Iain Sandoe [Sun, 4 Aug 2019 12:55:56 +0000 (12:55 +0000)] 
Darwin, PPC, testsuite - backport fix for powerpc/spec-barr-1.c

We just needed to adjust the regex to accept Darwin's register names.

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

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

* gcc.target/powerpc/spec-barr-1.c: Adjust scan assembler regex
to recognise Darwin's register names.

From-SVN: r274087

6 years agoDarwin, testsuite - backport fix for cpp/isysroot-1.c.
Iain Sandoe [Sun, 4 Aug 2019 12:52:31 +0000 (12:52 +0000)] 
Darwin, testsuite - backport fix for cpp/isysroot-1.c.

For the test to succeed there needs to be some header that is to be found in
the 'expected' place i.e. <sysroot>/usr/include/. It's important that it is
not the name of a header for which fixincludes have been applied, since such
headers will be found in the gcc include-fixed dir and, in general, reference
additional headers. The dummy sysroot will prevent the additional headers
from being found, resulting in a failed test. The fix is to use a header name
that isn't expected to be present in a real sysroot.

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

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

* gcc.dg/cpp/isysroot-1.c: Use <example.h> as the test header.
* gcc.dg/cpp/usr/include/stdio.h: Rename...
* gcc.dg/cpp/usr/include/example.h: ... to this.

From-SVN: r274086

6 years agoDarwin, PPC< testsuite - backport fix for powerpc/builtins-2.c
Iain Sandoe [Sun, 4 Aug 2019 12:49:12 +0000 (12:49 +0000)] 
Darwin, PPC< testsuite - backport fix for powerpc/builtins-2.c

This cannot pass for current Darwin, since it requires VSX and we
don't have any hardware supporting that. Add a dg-requires clause
for this.

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

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

* gcc.target/powerpc/builtins-2.c: Require VSX hardware support.

From-SVN: r274085

6 years agoDarwin, PPC, testsuite, backport fix for pr80125.
Iain Sandoe [Sun, 4 Aug 2019 12:46:00 +0000 (12:46 +0000)] 
Darwin, PPC, testsuite, backport fix for pr80125.

Darwin (unlike most of the members of the PowerPC port family)
defaults to signed chars, so the test was failing to compile with
a "mismatched parameters" error.

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

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

* gcc.target/powerpc/pr80125.c (foo): Use an unsigned char
vector explicitly for the vec_perm.

From-SVN: r274084

6 years agoDarwin, PPC, testsuite - backport fix for builtins-1.
Iain Sandoe [Sun, 4 Aug 2019 12:40:43 +0000 (12:40 +0000)] 
Darwin, PPC, testsuite - backport fix for builtins-1.

This needs to account for Darwin's __USER_LABEL_PREFIX__.

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

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

* gcc.target/powerpc/builtins-1.c: Account for Darwin's use of
__USER_LABEL_PREFIX__.

From-SVN: r274083

6 years agoDarwin, PPC, testsuite, backport fix for pr71785.
Iain Sandoe [Sun, 4 Aug 2019 12:37:28 +0000 (12:37 +0000)] 
Darwin, PPC, testsuite, backport fix for pr71785.

Firstly, we adjust the test conditions to use non-PIC code for Darwin.
Secondly, we have to account for out-of-line GPR restores which gives
a false positive on one of the scan-assembler-not. Lastly, we make the
test a bit more specific for Darwin - that it looks for absence of
branches to local labels.

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

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

* gcc.target/powerpc/pr71785.c: For Darwin, make test non-PIC,
expect the out-of-line GPR restore, and test specifically for
absence of branches to local labels.

From-SVN: r274082

6 years agoDarwin, PPC, testsuite, require DFP for two tests using it.
Iain Sandoe [Sun, 4 Aug 2019 12:29:53 +0000 (12:29 +0000)] 
Darwin, PPC, testsuite, require DFP for two tests using it.

The two tests use decimal floating point, add the relevant dg-requires
so that they are unsupported on platforms without DFP.

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

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

* gcc.target/powerpc/pr64205.c: Require effective target dfp.
* gcc.target/powerpc/pr79909.c: Likewise.

From-SVN: r274081

6 years agoDarwin, ppc, testsuite, backport fix for darwin-bool-1.
Iain Sandoe [Sun, 4 Aug 2019 12:22:55 +0000 (12:22 +0000)] 
Darwin, ppc, testsuite, backport fix for darwin-bool-1.

This test is failing because of a pedantic warning that is unrelated to the
purpose of the test. Fixed by suppressing that warning

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

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

* gcc.target/powerpc/darwin-bool-1.c: Suppress the pedantic
warning about _Bool.

From-SVN: r274080

6 years agoDarwin, testsuite, backport fix for pr71694.
Iain Sandoe [Sun, 4 Aug 2019 12:16:10 +0000 (12:16 +0000)] 
Darwin, testsuite, backport fix for pr71694.

This test fails for Darwin m32 because it's scanning for absence
of an instruction that's validly used in PIC code.  Fixed, in this
case, by using non-PIC codegen.

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

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

* g++.dg/pr71694.C: Use non-PIC codegen for Darwin m32.

From-SVN: r274079

6 years agoDarwin, testsuite, backport fix for darwin-minversion-1,2.
Iain Sandoe [Sun, 4 Aug 2019 12:12:30 +0000 (12:12 +0000)] 
Darwin, testsuite, backport fix for darwin-minversion-1,2.

Newer OS versions (10.14+) do not provide some of the CRTs that are used
for older ones (e.g. 10.5), and thus link tests that specify targeting
such a revision fail. We retain the testing of the correct defined OS
version number but switch to compile-only testing for these two tests.

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

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

* gcc.dg/darwin-minversion-1.c: Use compile rather than link/run.
* gcc.dg/darwin-minversion-2.c: Likewise.

From-SVN: r274078

6 years agoDarwin, testsuite, require alias support in a test using it.
Iain Sandoe [Sun, 4 Aug 2019 12:08:41 +0000 (12:08 +0000)] 
Darwin, testsuite, require alias support in a test using it.

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

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

* gcc.dg/pr90760.c: Require alias support.

From-SVN: r274077

6 years agoDarwin, testsuite, backport fix for PR65364
Iain Sandoe [Sun, 4 Aug 2019 12:04:06 +0000 (12:04 +0000)] 
Darwin, testsuite, backport fix for PR65364

This test currently fails on Darwin, because the port inlines fn2 for
both PIC (and non-pic for m32).  Fixed by adjusting the target condition.

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

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

PR testsuite/65364
* gcc.dg/uninit-19.c (fn1): Adjust target condition for Darwin.
(fn2): Likewise.

From-SVN: r274076

6 years agoDarwin, testsuite, backport fix for test using aliases.
Iain Sandoe [Sun, 4 Aug 2019 12:00:42 +0000 (12:00 +0000)] 
Darwin, testsuite, backport fix for test using aliases.

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

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

* gcc.dg/attr-copy-6.c: Require alias support.

From-SVN: r274075

6 years agoDarwin, testsuite, backport fix for cpp0x/alignas4.C
Iain Sandoe [Sun, 4 Aug 2019 11:57:41 +0000 (11:57 +0000)] 
Darwin, testsuite, backport fix for cpp0x/alignas4.C

Darwin produces aligned zerofill directives for the objects represented.
We can scan for these using lp64 and ilp32 to catch operation on both
X86 and PowerPC ports (the test is for the alignment which is the trailing
value in the zerofill directive, as a power of two).

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

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

* g++.dg/cpp0x/alignas4.C: Amend test to check for zerofill syntax
on Darwin.

From-SVN: r274074

6 years agoDarwin, X86, backport test adjusts for PR90698.
Iain Sandoe [Sun, 4 Aug 2019 11:54:13 +0000 (11:54 +0000)] 
Darwin, X86, backport test adjusts for PR90698.

We don't have support for -mcmodel={medium, large, kernel} so don't
expect tests for those things to work.

For now mark them as xfail where possible and skip where that isn't.
These changes will be logged onto the PR and therefore can be backed
out when the facility is implemented.

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

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

PR target/90698
* gcc.target/i386/pr49866.c: XFAIL for Darwin.
* gcc.target/i386/pr63538.c: Likewise.
* gcc.target/i386/pr61599-1.c: Skip for Darwin.

From-SVN: r274073

6 years agoDarwin, testsuite, require alias in a test where it's used.
Iain Sandoe [Sun, 4 Aug 2019 11:46:44 +0000 (11:46 +0000)] 
Darwin, testsuite, require alias in a test where it's used.

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

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

* g++.dg/cpp0x/pr84497.C: Require alias support.

From-SVN: r274072

6 years agoDarwin, X86, backport testsuite fixes for align syntax.
Iain Sandoe [Sun, 4 Aug 2019 11:43:19 +0000 (11:43 +0000)] 
Darwin, X86, backport testsuite fixes for align syntax.

Darwin has a .align taking a power of 2 by default, so that some
tests expecting a byte count are failing.

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

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

* gcc.target/i386/falign-functions-3.c: Adjust align syntax
and label for Darwin.
* gcc.target/i386/attr-aligned-2.c: Adjust align syntax for
Darwin.

From-SVN: r274071

6 years agoDarwin, x86, backport TLS test fixes.
Iain Sandoe [Sun, 4 Aug 2019 11:40:24 +0000 (11:40 +0000)] 
Darwin, x86, backport TLS test fixes.

Require native TLS for two tests that use it.

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

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

* gcc.target/i386/pr86257.c: Require native TLS support.
* gcc.target/i386/stack-prot-sym.c: Likewise.

From-SVN: r274070

6 years agoDarwin, x86, testsuite - backport for for pr22076 fail.
Iain Sandoe [Sun, 4 Aug 2019 11:32:48 +0000 (11:32 +0000)] 
Darwin, x86, testsuite - backport for for pr22076 fail.

Darwin has a .align taking a power of 2 by default, so that some
tests expecting a byte count are failing, fixed thus.

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

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

* gcc.target/i386/pr22076.c: Adjust options to
match codegen expected by the scan-asms.

From-SVN: r274069

6 years agoDarwin, X86, backport fixes for three PIE tests.
Iain Sandoe [Sun, 4 Aug 2019 11:01:41 +0000 (11:01 +0000)] 
Darwin, X86, backport fixes for three PIE tests.

Darwin requires PIC code in order to support PIE, amend the test scan-asms
to match this.

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

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

* gcc.target/i386/pr39013-1.c: Adjust scan-asms for PIE to
account for PIC code on Darwin.
* gcc.target/i386/pr39013-2.c: Likewise.
* gcc.target/i386/pr64317.c: Likewise.

From-SVN: r274068

6 years agoDarwin, X86, backport test fix for pr59874-3.
Iain Sandoe [Sun, 4 Aug 2019 10:53:48 +0000 (10:53 +0000)] 
Darwin, X86, backport test fix for pr59874-3.

This test fails on Darwin because the port has a different
spelling for popcnt.

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

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

* gcc.target/i386/pr59874-3.c: Use the spelling of popcnt
expected for Darwin.

From-SVN: r274067

6 years agoDarwin, x86, backport testsuite fix.
Iain Sandoe [Sun, 4 Aug 2019 10:47:16 +0000 (10:47 +0000)] 
Darwin, x86, backport testsuite fix.

Require alias support in a test using aliases.

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

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

* gcc.target/i386/pr82659-3.c: Require alias support.

From-SVN: r274066

6 years agoDarwin, X86, testsuite, backport matching fixes.
Iain Sandoe [Sun, 4 Aug 2019 10:40:16 +0000 (10:40 +0000)] 
Darwin, X86, testsuite, backport matching fixes.

Some of the i386.exp tests fail on Darwin (and at least one passes
incorrectly on Linux) because their scan-asm match strings are too
general.  In some cases the strings also match instances in the .file
and size directives or in comment output.  This patch makes the match
strings more specific.

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

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

* gcc.target/i386/pconfig-1.c: Scan for the string in the generated
code, not in comments or miscellaneous directives.
* gcc.target/i386/pr18041-1.c: Likewise.
* gcc.target/i386/pr18041-2.c: Likewise.
* gcc.target/i386/wbinvd-1.c: Likewise.
* gcc.target/i386/wbnoinvd-1.c: Likewise.
* gcc.target/i386/pr66819-3.c: Specifically, check that there is no
call to "bar".
* gcc.target/i386/pr66819-4.c: Likewise.
* gcc.target/i386/pr82662.c
* gcc.target/i386/ptwrite2.c: Make the checks look for the specific
destination register, don't try the m32 test on m64 targets.

From-SVN: r274065

6 years agoDarwin, X86, testsuite backport USER_LABEL_PREFIX fixes.
Iain Sandoe [Sun, 4 Aug 2019 10:33:57 +0000 (10:33 +0000)] 
Darwin, X86, testsuite backport USER_LABEL_PREFIX fixes.

more tests that failed on Darwin because of missing
__USER_LABEL_PREFIX__ matching.

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

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

* gcc.target/i386/pr67985-2.c: Adjust label checks for
Darwin.
* gcc.target/i386/pr77881.c: Likewise.

From-SVN: r274064

6 years agoDarwin, X86, backport test fixes.
Iain Sandoe [Sun, 4 Aug 2019 10:29:37 +0000 (10:29 +0000)] 
Darwin, X86, backport test fixes.

Skip three tests that cannot pass on Darwin.

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

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

* gcc.target/i386/falign-functions-2.c: Skip for Darwin.
* gcc.target/i386/pr70738-7.c: Likewise.
* gcc.target/i386/pr24414.c: Likewise.

From-SVN: r274063

6 years agoDarwin, X86, backport fixes for 64895.
Iain Sandoe [Sun, 4 Aug 2019 10:24:34 +0000 (10:24 +0000)] 
Darwin, X86, backport fixes for 64895.

Although this is marked as rtl-optimisation, the Darwin
issue is that the testcase XPASS there since the codegen
is different.

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

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

PR rtl-optimisation/64895
* gcc.target/i386/fuse-caller-save-rec.c: Remove XFAILs.
* gcc.target/i386/fuse-caller-save.c: Likewise.
* gcc.target/i386/fuse-caller-save-xmm.c: Adjust tests for
PIC cases, remove XFAILs.

From-SVN: r274062

6 years agoDarwin, testsuite, backport for for 27221.
Iain Sandoe [Sun, 4 Aug 2019 10:11:53 +0000 (10:11 +0000)] 
Darwin, testsuite, backport for for 27221.

This can't pass on 32b power Darwin, since the ABI conflicts.

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

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

PR testsuite/27221
* g++.dg/ext/alignof2.C: XFAIL for 32bit Darwin.

From-SVN: r274061

6 years agoDarwin, X86, backport testsuite fix for 67958.
Iain Sandoe [Sun, 4 Aug 2019 10:06:33 +0000 (10:06 +0000)] 
Darwin, X86, backport testsuite fix for 67958.

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

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

PR testsuite/67958
* gcc.target/i386/pr32219-1.c: Adjust scan-asms for Darwin, comment
the differences.
* gcc.target/i386/pr32219-2.c: Likewise.
* gcc.target/i386/pr32219-3.c: Likewise.
* gcc.target/i386/pr32219-4.c: Likewise.
* gcc.target/i386/pr32219-5.c: Likewise.
* gcc.target/i386/pr32219-6.c: Likewise.
* gcc.target/i386/pr32219-7.c: Likewise.
* gcc.target/i386/pr32219-8.c: Likewise.

From-SVN: r274060

6 years agoDarwin, testsuite, backport fix for PR83891
Iain Sandoe [Sun, 4 Aug 2019 09:59:21 +0000 (09:59 +0000)] 
Darwin, testsuite, backport fix for PR83891

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

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

PR target/63891
* gcc.dg/darwin-weakimport-3.c: Adjust options and explain
the reasons.

From-SVN: r274059

6 years agoDarwin, X86, backport fix for PR58321.
Iain Sandoe [Sun, 4 Aug 2019 09:53:37 +0000 (09:53 +0000)] 
Darwin, X86, backport fix for PR58321.

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

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

PR testsuite/58321
* gcc.target/i386/memcpy-strategy-3.c: Adjust count for Darwin and
add a comment as to the reason for the difference.
* gcc.target/i386/memset-strategy-1.c: Likewise.

From-SVN: r274058