This is the result of these two oneliners:
perl -ni -e 'print unless /dg-skip-if "do not override -mcpu"/' \
$(find gcc/testsuite/gcc.target/powerpc/ -type f)
perl -pi -e 's/(dg-options.*)-mcpu=/\1-mdejagnu-cpu=/' \
$(find gcc/testsuite/gcc.target/powerpc/ -type f)
gcc/testsuite/
* gcc.target/powerpc/ throughout: Delete dg-skip-if "do not override
-mcpu". Use -mdejagnu-cpu= in dg-options instead of -mcpu=.
From-SVN: r269324
This adds an option -mdejagnu-cpu=. This option simply overrides what
is given in -mcpu=. The reason for this is that with older versions
of DejaGnu the value given in the RUNTESTFLAGS will override the value
a testcase wants to have.
* config/rs6000/rs6000.c (rs6000_option_override_internal): If
rs6000_dejagnu_cpu_index is set, use that to override rs6000_cpu_index.
* config/rs6000/rs6000.opt (mdejagnu-cpu=): New option.
From-SVN: r269322
PR rtl-optimization/85899
* haifa-sched.c (find_fallthru_edge_from): Relax assert to account for
fallthru edges leading to the exit block.
* gcc.dg/pr85899.c: New test.
From-SVN: r269319
Interpreting auxv as []uintptr is incorrect on 64-bit big-endian,
as auxv alternates a 32-bit int with a 64-bit pointer.
Patch from Rainer Orth.
Reviewed-on: https://go-review.googlesource.com/c/164739
From-SVN: r269315
Implement P1002R1, Try-catch blocks in constexpr functions
PR c++/89513
* parser.c (cp_parser_ctor_initializer_opt_and_function_body):
Diagnose constexpr ctor or function with function-try-block with
pedwarn for c++17 and earlier. Formatting fix.
(cp_parser_try_block): Use pedwarn instead of error and only for
c++17 and earlier when try block appears in constexpr function.
* constexpr.c (build_constexpr_constructor_member_initializers):
Handle TRY_BLOCK here instead of erroring on it.
* g++.dg/cpp2a/constexpr-try1.C: New test.
* g++.dg/cpp2a/constexpr-try2.C: New test.
* g++.dg/cpp2a/constexpr-try3.C: New test.
* g++.dg/cpp2a/constexpr-try4.C: New test.
* g++.dg/cpp2a/constexpr-try5.C: New test.
* g++.dg/cpp0x/constexpr-ctor10.C: Don't expect error for C++2a.
From-SVN: r269314
The checking memory_resource in the testsuite assumes sized deallocation
is supported, which might not be true for other compilers.
* testsuite/util/testsuite_allocator.h (__gnu_test::memory_resource)
[!__cpp_sized_deallocation]: Do not pass size to operator delete.
From-SVN: r269312
* include/std/memory (uses_allocator_construction_args): New set of
overloaded functions.
(make_obj_using_allocator, uninitialized_construct_using_allocator):
New functions.
* include/std/memory_resource (polymorphic_allocator::construct)
[__cplusplus > 201703l]: Replace all overloads with a single function
using uses_allocator_construction_args.
* testsuite/20_util/polymorphic_allocator/construct_c++2a.cc: New
test.
* testsuite/20_util/uses_allocator/make_obj.cc: New test.
From-SVN: r269311
Due to config.gcc all the options need to be on one line because of the grep
lines which would select only the first line of the option.
This causes it not to select the right bits on options that are spread over
multiple lines when the --with-arch configure option is used. The issue happens
silently and you just get a compiler with an incorrect set of default flags.
This solution just collapses everything back to one line as they were in GCC7.
Unfortunately this does make some lines quite long.
I do have an alternate patch which used the pre-processors to first flatten the
file in config.gcc. I will send that one out for GCC 10.
gcc/ChangeLog:
PR target/89517
* config/aarch64/aarch64-option-extensions.def (fp, simd, crypto, fp16,
rdma, dotprod, sha2, sha3, sm4, fp16fml, sve): Collapse line.
From-SVN: r269309
This is another case in which we were failing to pass the expected
mask vector type to vect_get_vec_def_for_operand.
2019-02-28 Richard Sandiford <richard.sandiford@arm.com>
gcc/
PR tree-optimization/89535
* tree-vect-stmts.c (vectorizable_call): Record the vector types
for each operand. Calculate the fallback choice for mask operands
and pass it to vect_get_vec_def_for_operand.
gcc/testsuite/
PR tree-optimization/89535
* gfortran.dg/vect/pr89535.f90: New test.
From-SVN: r269308
2019-03-01 Richard Biener <rguenther@suse.de>
PR middle-end/89541
* tree-ssa-operands.c (add_stmt_operand): CONST_DECL may
get virtual operands.
(get_expr_operands): Handle CONST_DECL like other decls.
* gfortran.dg/pr89451.f90: New testcase.
From-SVN: r269307
Backports support for extern(C++, "namespace"), which makes the
core.stdcpp package compilable.
Added predefined condition for CppRuntime_Gcc unconditionally, as it is
unlikely that D code will be linking to anything other than libstdc++
when extern(C++) is used.
Reviewed-on: https://github.com/dlang/dmd/pull/9371
gcc/d/ChangeLog:
2019-03-01 Iain Buclaw <ibuclaw@gdcproject.org>
* d-builtins.cc (d_init_versions): Add CppRuntime_Gcc as predefined
version condition.
From-SVN: r269304
2019-03-01 Richard Biener <rguenther@suse.de>
PR middle-end/89497
* tree-cfgcleanup.h (cleanup_tree_cfg): Add SSA update flags
argument, defaulted to zero.
* passes.c (execute_function_todo): Pass down SSA update flags
to cleanup_tree_cfg.
* tree-cfgcleanup.c: Include tree-into-ssa.h and tree-cfgcleanup.h.
(cleanup_tree_cfg_noloop): After cleanup_control_flow_pre update SSA
form if requested.
(cleanup_tree_cfg): Get and pass down SSA update flags.
* gcc.dg/tree-ssa/reassoc-43.c: Avoid false match in regex.
* g++.dg/tree-prof/devirt.C: Scan tracer dump for foldings
that happen now earlier.
From-SVN: r269302
When using the go tool with gccgo, this changes the default
compilation to use -O2. The -gccgoflags option can be used to
override this default. I think this change better corresponds to what
people expect when using the go tool.
Reviewed-on: https://go-review.googlesource.com/c/164378
From-SVN: r269299
gotest: avoid using echo inside $()
The handling of newlines is not portable between bash and ksh.
Reviewed-on: https://go-review.googlesource.com/c/164597
From-SVN: r269298
build_m_component_ref can't handle type-dependent operands, so let's use the
default case; tsubst_copy_and_build also uses build_x_binary_op for
substituting a DOTSTAR_EXPR.
* pt.c (fold_expression) [DOTSTAR_EXPR]: Remove special handling.
From-SVN: r269293
PR tree-optimization/89536
* tree-ssa-dom.c (edge_info::derive_equivalences) <BIT_NOT_EXPR>: Test
only whether bit #0 of the value is 0 instead of the entire value.
From-SVN: r269289
* gimplify.c (expand_FALLTHROUGH_r): If IFN_FALLTHROUGH was found
at the end of a seq, save its location to walk_stmt_info.
(expand_FALLTHROUGH): Warn if IFN_FALLTHROUGH is at the end of
a switch.
* c-c++-common/Wimplicit-fallthrough-37.c: New test.
From-SVN: r269288
A type in an anonymous namespace can never be merged with one from
another translation unit, so a member of such a type is always its own
prevailing decl.
* lto-symtab.c (lto_symtab_prevailing_virtual_decl): Return early
for a type in an anonymous namespace.
From-SVN: r269283
Since AES has been removed from Westmere in GCC 9, we should identify
Westmere from PCLMUL, instead of AES.
PR target/89455
* config/i386/i386.c (get_builtin_code_for_version): Identify
Westmere from PCLMUL, instead of AES.
From-SVN: r269281
This patch makes the feature detection code for AArch64 GCC not add features
automatically when the feature had no hwcaps string to match against.
This means that -mcpu=native no longer adds feature flags such as +profile.
The behavior wasn't noticed before because at the time +profile was added a bug
was preventing any feature bits from being added by native detections.
The loop has also been changed as Jakub specified in order to avoid a memory
leak that was present in the existing code and to be slightly more efficient.
gcc/ChangeLog:
PR target/88530
* config/aarch64/aarch64-option-extensions.def: Document it.
* config/aarch64/driver-aarch64.c (host_detect_local_cpu): Skip feature
if empty hwcaps.
gcc/testsuite/ChangeLog:
PR target/88530
* gcc.target/aarch64/options_set_10.c: New test.
From-SVN: r269276
PR c/89525
* c-typeck.c (convert_arguments): Call inform_declaration only if
the previous warning_at call returned true.
* gcc.dg/pr89525.c: New test.
From-SVN: r269274
PR c/89520
* convert.c (convert_to_real_1, convert_to_integer_1): Punt for
builtins if they don't have a single scalar floating point argument.
Formatting fixes.
* gcc.dg/pr89520-1.c: New test.
* gcc.dg/pr89520-2.c: New test.
From-SVN: r269273
PR go/89172
internal/cpu, runtime, runtime/pprof: handle function descriptors
When using PPC64 ELF ABI v1 a function address is not a PC, but is the
address of a function descriptor. The first field in the function
descriptor is the actual PC (see
http://refspecs.linuxfoundation.org/ELF/ppc64/PPC-elf64abi.html#FUNC-DES).
The libbacktrace library knows about this, and libgo uses actual PC
values consistently except for the helper function funcPC that appears
in both runtime and runtime/pprof.
This patch fixes funcPC by recording, in the internal/cpu package,
whether function descriptors are being used. We have to check for
function descriptors using a C compiler check, because GCC can be
configured using --with-abi to select the ELF ABI to use.
Fixes https://gcc.gnu.org/PR89172
Reviewed-on: https://go-review.googlesource.com/c/162978
From-SVN: r269266
Here, the problem was that extract_local_specs wasn't seeing that we use
'self' inside the lambda in the else of the inner constexpr if, because we
don't walk into lambda bodies and we didn't capture it in the lambda because
'self' is still dependent. Marek recently changed process_outer_var_ref to
do more implicit capture in templates; this example shows that we should
always capture non-packs, so that we can continue to not walk into lambda
bodies. We do walk into lambda bodies for pack expansions, so we can delay
deciding whether we're capturing a single element or the entire pack.
Immediately capturing a VLA means we need to create a dependent VLA capture
type, and not in the context of the lambda op(), since trying to look up the
instantiation of the op() while we're substituting into the capture list
would crash. So I force TYPE_CONTEXT and the binding level out to the
enclosing function before pushtag, avoid adding a TAG_DEFN, and instead
force the type to be complete in tsubst_lambda_expr.
* semantics.c (process_outer_var_ref): Do capture dependent vars.
* class.c (finish_struct): Only add TAG_DEFN if T is in
current_function_decl.
* lambda.c (vla_capture_type): Force the capture type out into the
lambda's enclosing function.
(add_capture): Pass in the lambda.
* pt.c (tsubst_lambda_expr): complete_type a VLA capture type.
From-SVN: r269265
2019-02-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
PR rtl-optimization/89490
* varasm.c (get_block_for_section): Bail out for mergeable sections.
(default_use_anchors_for_symbol_p, output_object_block): Assert the
block section is not mergeable.
From-SVN: r269264
* parser.c (cp_parser_using_declaration): For an unscoped enum
only use its context if it's not a function declaration.
* g++.dg/cpp0x/using-enum-3.C: New test.
From-SVN: r269262
PR target/70341
* config/aarch64/aarch64.md (casesi): Create the casesi_dispatch
MEM manually here, set MEM_READONLY_P and MEM_NOTRAP_P on it.
From-SVN: r269260