Since -fcf-protection requires both -mshstk and -mibt, use
-fcf-protection=return with -mshstk in cet-intrin-4.c.
PR target/84243
* gcc.target/i386/cet-intrin-4.c (dg-options): Use
-fcf-protection=return.
From-SVN: r257445
Since ix86_option_override_internal sets the CF_SET bit in
flag_cf_protection and it can be called more than once via pragma,
we need to mask out the CF_SET bit when checking flag_cf_protection.
PR target/84248
* config/i386/i386.c (ix86_option_override_internal): Mask out
the CF_SET bit when checking -fcf-protection.
From-SVN: r257444
2018-02-07 Tom de Vries <tom@codesourcery.com>
PR libgomp/84217
* omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
enough.
* c-c++-common/goacc/pr84217.c: New test.
* gfortran.dg/goacc/pr84217.f90: New test.
* testsuite/libgomp.oacc-c-c++-common/pr84217.c: New test.
From-SVN: r257443
2018-02-07 Richard Biener <rguenther@suse.de>
PR tree-optimization/84204
* tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
this place.
* gcc.dg/graphite/pr84204.c: New testcase.
PR tree-optimization/84205
* graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
special-case isl_ast_op_zdiv_r.
* gcc.dg/graphite/pr84205.c: New testcase.
PR tree-optimization/84223
* graphite-scop-detection.c (gather_bbs::before_dom_children):
Only add conditions from within the region.
(gather_bbs::after_dom_children): Adjust.
* gfortran.dg/graphite/pr84223.f90: New testcase.
From-SVN: r257441
PR target/84209
* config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
* config/avr/avr.md: Only post-reload split REG-REG moves if
either register is REGERAL_REG_P.
From-SVN: r257440
PR tree-optimization/84235
* tree-ssa-scopedtables.c
(avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
if the subtraction is performed in floating point type where NaNs are
honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
build 1. Formatting fix.
* gcc.c-torture/execute/ieee/pr84235.c: New test.
From-SVN: r257437
Normally we ensure to build a single Btype for identical types.
We did not do this for methods table of identical interface
types, however. If there are two identical interface type I, I2,
they have the same Btype BI, but different Btypes for their
methods tables, BM and BM2. From the backend's point of view
only one of them is linked to BI. This can cause inconsitency
in the backend's type system, like unresolved placeholder. This
CL ensures we create a single Btype for methods table of
identical interface type.
Reviewed-on: https://go-review.googlesource.com/92436
From-SVN: r257436
PR testsuite/84243
* c-c++-common/fcf-protection-6.c: Only pass -mshstk on x86
targets.
* c-c++-common/fcf-protection-7.c: Likewise for -mibt.
From-SVN: r257432
PR target/84146
* config/i386/i386.c (rest_of_insert_endbranch): Only skip
NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
and skip it regardless of bb boundaries. Use CALL_P macro,
don't test INSN_P (insn) together with CALL_P or JUMP_P check
unnecessarily, formatting fix.
* gcc.target/i386/pr84146.c: New test.
From-SVN: r257431
2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
PR target/84154
* config/rs6000/rs6000.md (su code attribute): Use "u" for
unsigned_fix, not "s".
From-SVN: r257429
PR lto/81004
* lto.c: Include builtins.h
(register_resolution): Merge resolutions in case trees was
merged across units.
(lto_maybe_register_decl): Break out from ...
(lto_read_decls): ... here.
(unify_scc): Also register decls here.
(read_cgraph_and_symbols): Sanity check that all resolutions was
read.
From-SVN: r257412
2018-02-06 Richard Biener <rguenther@suse.de>
* config/i386/i386.c (print_reg): Fix typo.
(ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
From-SVN: r257407
"dict" was added in Tcl 8.5, but until a couple of weeks ago the
testsuite had worked with 8.4.
This patch uses arrays instead, like we do for the caching in
target-supports.exp. It is a bit uglier than using dicts was,
but hopefully not too bad...
2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
gcc/testsuite/
* lib/lto.exp (lto_handle_diagnostics): Remove messages_by_file
argument and use dg-messages-by-file instead. Expect it to be
an array rather than a dict.
(lto-link-and-maybe-run): Remove messages_by_file argument and
use an upvar for dg-messages-by-file. Update call to
lto_handle_diagnostics.
(lt-get-options): Treat dg-messages-by-file as an array
rather than a dict.
(lto-get-options-main): Likewise. Set the entry rather than appending.
(lto-execute): Treat dg-messages-by-file as an array rather than
a dict. Update call to lto-link-and-maybe-run.
From-SVN: r257397
It uses functions that are not available in MPFR 2.4.2, which is the
current version supported by GCC.
Original change description:
compiler: avoid negative zero in float constants
Check for negative numbers with very small magnitudes that will round
to negative zero, and force them to positive zero instead.
This implements the spec clarification in https://golang.org/cl/14727.
The test is in https://golang.org/cl/91895.
Fixesgolang/go#12621
Updates golang/go#12621
Reviewed-on: https://go-review.googlesource.com/92055
From-SVN: r257393
These tests started passing after r257293, which had the side-effect
of renumbering the SSA names and leaving the COND_EXPRs in their
natural order.
This does show a deeper underlying issue that code generation is too
sensitive to internal things like SSA_NAME versions, but it no longer
affects these particular tests (for now).
2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
gcc/testsuite/
* gcc.target/aarch64/sve/vcond_4.c: Remove XFAILs.
* gcc.target/aarch64/sve/vcond_5.c: Likewise.
From-SVN: r257386
2018-02-05 Martin Liska <mliska@suse.cz>
PR gcov-profile/83879
* doc/gcov.texi: Document necessity of --dynamic-list-data when
using dlopen functionality.
From-SVN: r257383
CL 71750 changed the definition of how iota works. This patch updates
gccgo for the new definition.
We've been mishandling iota appearing in a type that appears in a
const expression, as in `c = len([iota]int{})`. Correct that by copying
type expressions when we copy an expression. For simplicity only copy
when it can change the size of a type, as that is the only case where
iota in a type can affect the value of a constant (I think). This is
still a bunch of changes, but almost all boilerplate.
Fixesgolang/go#22341
Reviewed-on: https://go-review.googlesource.com/91475
From-SVN: r257379
The language spec permits empty statements after a fallthrough
statement, so implement that. Also give a better error message when a
fallthrough statement is in the wrong place. The test case for this
is in the master repository, test/fixedbugs/issue14540.go, just not
yet in the gccgo repository.
Fixesgolang/go#14538
Reviewed-on: https://go-review.googlesource.com/91855
From-SVN: r257378