2018-12-06 Richard Biener <rguenther@suse.de>
* bitmap.c (bitmap_head::crashme): Define.
* bitmap.h (bitmap_head): Add constexpr default constructor
poisoning the obstack member.
(bitmap_head::crashme): Declare.
(bitmap_release): New function clearing a bitmap and poisoning
the obstack member.
* gengtype.c (main): Make it recognize CONSTEXPR.
* lra-constraints.c (lra_inheritance): Use bitmap_release
instead of bitmap_clear.
* ira.c (ira): Work around class-memaccess warning.
* regrename.c (create_new_chain): Likewise.
From-SVN: r266850
PR tree-optimization/85726
* generic-match-head.c (optimize_successive_divisions_p): New function.
* gimple-match-head.c (optimize_successive_divisions_p): Likewise.
* match.pd: Don't combine successive divisions if they aren't exact
and optimize_successive_divisions_p is false.
* gcc.dg/tree-ssa/pr85726-1.c: New test.
* gcc.dg/tree-ssa/pr85726-2.c: New test.
* gcc.dg/tree-ssa/pr85726-3.c: New test.
* gcc.dg/tree-ssa/pr85726-4.c: New test.
From-SVN: r266848
/cp
2018-12-06 Paolo Carlini <paolo.carlini@oracle.com>
* decl2.c (grokbitfield): Use DECL_SOURCE_LOCATION in error message;
print the type too; fix thinko in INDIRECT_TYPE_P use.
/testsuite
2018-12-06 Paolo Carlini <paolo.carlini@oracle.com>
* g++.dg/parse/bitfield6b.C: New.
* g++.dg/parse/bitfield3.C: Test location and type.
From-SVN: r266841
This CL adds support of precise stack scan using stack maps to
the runtime. The stack maps are generated by the compiler (if
supported). Each safepoint is associated with a (real or dummy)
landing pad, and its "type info" in the exception table is a
pointer to the stack map. When a stack is scanned, the stack map
is found by the stack unwinding code by inspecting the exception
table (LSDA).
For precise stack scan we need to unwind the stack. There are
three cases:
- If a goroutine is scanning its own stack, it can unwind the
stack and scan the frames.
- If a goroutine is scanning another, stopped, goroutine, it
cannot directly unwind the target stack. We handle this by
switching (runtime.gogo) to the target g, letting it unwind
and scan the stack, and switch back.
- If we are scanning a goroutine that is blocked in a syscall,
we send a signal to the target goroutine's thread, and let the
signal handler unwind and scan the stack. Extra care is needed
as this races with enter/exit syscall.
Currently this is only implemented on linux.
Reviewed-on: https://go-review.googlesource.com/c/140518
From-SVN: r266832
As Jakub pointed out, if we narrow a plus, minus or mult operation based
on the number of bits that consumers need, we have to convert a signed
operation to an unsigned one in order to avoid new undefined behaviour.
This patch does that and generalises vect_convert_input and
vect_recog_over_widening_pattern to cope with the extra casts.
(The changes to both functions are covered by existing tests.)
2018-12-03 Richard Sandiford <richard.sandiford@arm.com>
gcc/
PR tree-optimization/88064
* tree-vect-patterns.c (vect_convert_input): Convert the result of
an existing cast if it has the right width but the wrong sign.
Do not test the signedness of the required result when
considering whether to split an existing cast; instead split to
a type with the same signedness as the source of the cast, then
convert it to the opposite signedness where necessary.
(vect_recog_over_widening_pattern): Handle sign changes between
the final PLUS_EXPR and the RSHIFT_EXPR.
(vect_recog_average_pattern): Use an unsigned operation when
truncating an addition, subtraction or multiplication. Cast the
result back to the "real" signedness before promoting.
gcc/testsuite/
PR tree-optimization/88064
* gcc.dg/vect/vect-over-widen-23.c: New test.
From-SVN: r266829
When debugging a failing test, I typically invoke DejaGnu at
verbosity level 2 (via RUNTESTFLAGS="-v -v dg.exp=something"),
so that DejaGnu prints the command line used to invoke the
compiler; specifically these two sites:
target.exp "Invoking the compiler as "
remote.exp "Executing on $hostname"
which are both verbosity level 2.
Unfortunately I run into an O(n^2) issue with logging from
process-message:
verbose "process-message:\n${dg-messages}" 2
where, as each message each processed, it emits the state
of dg-messages, containing the new message and all messages so far,
leading to exponentially-increasing output at level 2 as more test
messages are added.
This patch papers over the problem by moving the
problematic message to verbosity level 3.
gcc/testsuite/ChangeLog:
* lib/gcc-dg.exp (process-message): Change verbosity level of
"verbose" from 2 to 3.
(dg-locus): Likewise.
From-SVN: r266828
PR sanitizer/88333
* cfgexpand.c (expand_stack_vars): If asan_vec is empty, start with
aligning frame offset to ASAN_RED_ZONE_SIZE bytes.
* c-c++-common/asan/pr88333.c: New test.
From-SVN: r266817
The testcase is the work-around testcase for the PR; even that had
started failing. The problem was that, when unqualifying the type of
a TARGET_EXPR, we'd create a variant of the type, then request the
conversion of the TARGET_EXPR_INITIAL to that variant type. Though
the types are different pointer-wise, they're the same_type_p, so the
resulting modified expr compares cp_tree_equal to the original, which
maybe_constant_value flags as an error. There's no reason to
construct an alternate TARGET_EXPR or CONSTRUCTOR just because of an
equivalent type, except for another spot that expected pointer
equality that would no longer be satisfied. Without relaxing the
assert in constexpr_call_hasher::equal, g++.robertl/eb73.C would
trigger an assertion failure.
for gcc/cp/ChangeLog
PR c++/85569
* constexpr.c (adjust_temp_type): Test for type equality with
same_type_p.
(constexpr_call_hasher::equal): Likewise.
for gcc/testsuite/ChangeLog
PR c++/85569
* g++.dg/cpp1z/pr85569.C: New.
From-SVN: r266816
David's fix for the AIX aggregate passing from yesterday unfortunately
also triggers on powerpc64-linux. This fixes it.
* config/rs6000/rs6000.c (rs6000_function_arg): Only do the special
aggregate handling on actual AIX, not on somewhat similar systems.
(rs6000_arg_partial_bytes): Ditto.
From-SVN: r266811
2018-12-04 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/88317
* lra-constraints.c (split_reg): Don't set up check_only_regs if
we are outside the inheritance pass.
From-SVN: r266803
This adds another testcase for overzealous spellchecker suggestions,
reported on IRC.
gcc/ChangeLog:
PR c/82967
* spellcheck.c (selftest::test_suggestions): Add another
assertion.
From-SVN: r266798
* pt.c (lookup_template_function): Always build the TEMPLATE_ID_EXPR
with unknown_type_node.
* g++.dg/cpp2a/fn-template17.C: New test.
* g++.dg/cpp2a/fn-template18.C: New test.
From-SVN: r266793
2018-12-04 Vladimir Makarov <vmakarov@redhat.com>
PR target/88282
* ira-costs.c (exec): Try bigger class to use smaller register
move cost.
From-SVN: r266784