<feed xmlns='http://www.w3.org/2005/Atom'>
<title>gcc.git, branch basepoints/gcc-11</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/'/>
<entry>
<title>Bump BASE-VER.</title>
<updated>2020-04-30T15:35:51+00:00</updated>
<author>
<name>Jakub Jelinek</name>
<email>jakub@redhat.com</email>
</author>
<published>2020-04-30T15:35:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=46eed414a332f7684a9d8f07c0f7e94b8cc2659e'/>
<id>46eed414a332f7684a9d8f07c0f7e94b8cc2659e</id>
<content type='text'>
2020-04-30  Jakub Jelinek  &lt;jakub@redhat.com&gt;

	* BASE-VER: Set to 11.0.0.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
2020-04-30  Jakub Jelinek  &lt;jakub@redhat.com&gt;

	* BASE-VER: Set to 11.0.0.
</pre>
</div>
</content>
</entry>
<entry>
<title>c++ ICE with nested requirement as default tpl parm[PR94827]</title>
<updated>2020-04-30T15:23:16+00:00</updated>
<author>
<name>Nathan Sidwell</name>
<email>nathan@acm.org</email>
</author>
<published>2020-04-30T15:23:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=c416c52bcdb120db5e8c53a51bd78c4360daf79b'/>
<id>c416c52bcdb120db5e8c53a51bd78c4360daf79b</id>
<content type='text'>
Template headers are not incrementally updated as we parse its parameters.
We maintain a dummy level until the closing &gt; when we replace the dummy with
a real parameter set.  requires processing was expecting a properly populated
arg_vec in current_template_parms, and then creates a self-mapping of parameters
from that.  But we don't need to do that, just teach map_arguments to look at
TREE_VALUE when args is NULL.

	* constraint.cc (map_arguments): If ARGS is null, it's a
	self-mapping of parms.
	(finish_nested_requirement): Do not pass argified
	current_template_parms to normalization.
	(tsubst_nested_requirement): Don't assert no template parms.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Template headers are not incrementally updated as we parse its parameters.
We maintain a dummy level until the closing &gt; when we replace the dummy with
a real parameter set.  requires processing was expecting a properly populated
arg_vec in current_template_parms, and then creates a self-mapping of parameters
from that.  But we don't need to do that, just teach map_arguments to look at
TREE_VALUE when args is NULL.

	* constraint.cc (map_arguments): If ARGS is null, it's a
	self-mapping of parms.
	(finish_nested_requirement): Do not pass argified
	current_template_parms to normalization.
	(tsubst_nested_requirement): Don't assert no template parms.
</pre>
</div>
</content>
</entry>
<entry>
<title>libstdc++: Avoid errors in allocator's noexcept-specifier (PR 89510)</title>
<updated>2020-04-30T15:01:43+00:00</updated>
<author>
<name>Jonathan Wakely</name>
<email>jwakely@redhat.com</email>
</author>
<published>2020-04-30T14:47:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=b1983f4582bbe060b7da83578acb9ed653681fc8'/>
<id>b1983f4582bbe060b7da83578acb9ed653681fc8</id>
<content type='text'>
This fixes a regression due to the conditional noexcept-specifier on
std::allocator::construct and std::allocator::destroy, as well as the
corresponding members of new_allocator, malloc_allocator, and
allocator_traits. Those noexcept-specifiers were using expressions which
might be ill-formed, which caused errors outside the immediate context
when checking for the presence of construct and destroy in SFINAE
contexts.

The fix is to use the is_nothrow_constructible and
is_nothrow_destructible type traits instead, because those traits are
safe to use even when the construction/destruction itself is not valid.

The is_nothrow_constructible trait will be false for a type that is not
also nothrow-destructible, even if the new-expression used in the
construct function body is actually noexcept. That's not the correct
answer, but isn't a problem because providing a noexcept-specifier on
these functions is not required by the standard anyway. If the answer is
false when it should be true, that's suboptimal but OK (unlike giving
errors for valid code, or giving a true answer when it should be false).

	PR libstdc++/89510
	* include/bits/alloc_traits.h (allocator_traits::_S_construct)
	(allocator_traits::_S_destroy)
	(allocator_traits&lt;allocator&lt;T&gt;&gt;::construct): Use traits in
	noexcept-specifiers.
	* include/bits/allocator.h (allocator&lt;void&gt;::construct)
	(allocator&lt;void&gt;::destroy): Likewise.
	* include/ext/malloc_allocator.h (malloc_allocator::construct)
	(malloc_allocator::destroy): Likewise.
	* include/ext/new_allocator.h (new_allocator::construct)
	(new_allocator::destroy): Likewise.
	* testsuite/20_util/allocator/89510.cc: New test.
	* testsuite/ext/malloc_allocator/89510.cc: New test.
	* testsuite/ext/new_allocator/89510.cc: New test.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This fixes a regression due to the conditional noexcept-specifier on
std::allocator::construct and std::allocator::destroy, as well as the
corresponding members of new_allocator, malloc_allocator, and
allocator_traits. Those noexcept-specifiers were using expressions which
might be ill-formed, which caused errors outside the immediate context
when checking for the presence of construct and destroy in SFINAE
contexts.

The fix is to use the is_nothrow_constructible and
is_nothrow_destructible type traits instead, because those traits are
safe to use even when the construction/destruction itself is not valid.

The is_nothrow_constructible trait will be false for a type that is not
also nothrow-destructible, even if the new-expression used in the
construct function body is actually noexcept. That's not the correct
answer, but isn't a problem because providing a noexcept-specifier on
these functions is not required by the standard anyway. If the answer is
false when it should be true, that's suboptimal but OK (unlike giving
errors for valid code, or giving a true answer when it should be false).

	PR libstdc++/89510
	* include/bits/alloc_traits.h (allocator_traits::_S_construct)
	(allocator_traits::_S_destroy)
	(allocator_traits&lt;allocator&lt;T&gt;&gt;::construct): Use traits in
	noexcept-specifiers.
	* include/bits/allocator.h (allocator&lt;void&gt;::construct)
	(allocator&lt;void&gt;::destroy): Likewise.
	* include/ext/malloc_allocator.h (malloc_allocator::construct)
	(malloc_allocator::destroy): Likewise.
	* include/ext/new_allocator.h (new_allocator::construct)
	(new_allocator::destroy): Likewise.
	* testsuite/20_util/allocator/89510.cc: New test.
	* testsuite/ext/malloc_allocator/89510.cc: New test.
	* testsuite/ext/new_allocator/89510.cc: New test.
</pre>
</div>
</content>
</entry>
<entry>
<title>coroutines: Fix handling of artificial vars [PR94886]</title>
<updated>2020-04-30T15:00:39+00:00</updated>
<author>
<name>Iain Sandoe</name>
<email>iain@sandoe.co.uk</email>
</author>
<published>2020-04-30T09:42:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=448c89d590455ed4ab7abc40309b5cf8ec52d13d'/>
<id>448c89d590455ed4ab7abc40309b5cf8ec52d13d</id>
<content type='text'>
The testcase ICEs because the range-based for generates three
artificial variables that need to be allocated to the coroutine
frame but, when walking the BIND_EXR that contains these, the
DECL_INITIAL for one of them refers to an entry appearing later,
which means that the frame entry hasn't been allocated when that
INITIAL is walked.

The solution is to defer walking the DECL_INITIAL/SIZE etc. until
all the BIND_EXPR vars have been processed.

gcc/cp/ChangeLog:

2020-04-30  Iain Sandoe  &lt;iain@sandoe.co.uk&gt;

	PR c++/94886
	* coroutines.cc (transform_local_var_uses): Defer walking
	the DECL_INITIALs of BIND_EXPR vars until all the frame
	allocations have been made.

gcc/testsuite/ChangeLog:

2020-04-30  Iain Sandoe  &lt;iain@sandoe.co.uk&gt;

	PR c++/94886
	* g++.dg/coroutines/pr94886-folly-3.C: New test.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The testcase ICEs because the range-based for generates three
artificial variables that need to be allocated to the coroutine
frame but, when walking the BIND_EXR that contains these, the
DECL_INITIAL for one of them refers to an entry appearing later,
which means that the frame entry hasn't been allocated when that
INITIAL is walked.

The solution is to defer walking the DECL_INITIAL/SIZE etc. until
all the BIND_EXPR vars have been processed.

gcc/cp/ChangeLog:

2020-04-30  Iain Sandoe  &lt;iain@sandoe.co.uk&gt;

	PR c++/94886
	* coroutines.cc (transform_local_var_uses): Defer walking
	the DECL_INITIALs of BIND_EXPR vars until all the frame
	allocations have been made.

gcc/testsuite/ChangeLog:

2020-04-30  Iain Sandoe  &lt;iain@sandoe.co.uk&gt;

	PR c++/94886
	* g++.dg/coroutines/pr94886-folly-3.C: New test.
</pre>
</div>
</content>
</entry>
<entry>
<title>coroutines: Fix handling of target cleanup exprs [PR94883]</title>
<updated>2020-04-30T14:58:48+00:00</updated>
<author>
<name>Iain Sandoe</name>
<email>iain@sandoe.co.uk</email>
</author>
<published>2020-04-29T18:46:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=aa94a22f5cb337e173d7119ffd5a92f1e607f544'/>
<id>aa94a22f5cb337e173d7119ffd5a92f1e607f544</id>
<content type='text'>
The problem here is that target cleanup expressions have been
added to the initialisers for the awaitable (and returns of
non-trivial values from await_suspend() calls.  This is because
the expansion of the co_await into its control flow is not
apparent to the machinery adding the target cleanup expressions.
The solution being tested is simply to recreate target expressions
as the co_awaits are lowered.  Teaching the machinery to handle
walking co_await expressions in different ways at different points
(outside the coroutine transformation) seems overly complex.

gcc/cp/ChangeLog:

2020-04-30  Iain Sandoe  &lt;iain@sandoe.co.uk&gt;

	PR c++/94883
	* coroutines.cc (register_awaits): Update target
	expressions for awaitable and suspend handle
	initializers.

gcc/testsuite/ChangeLog:

2020-04-30  Iain Sandoe  &lt;iain@sandoe.co.uk&gt;

	PR c++/94883
	* g++.dg/coroutines/pr94883-folly-2.C: New test.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The problem here is that target cleanup expressions have been
added to the initialisers for the awaitable (and returns of
non-trivial values from await_suspend() calls.  This is because
the expansion of the co_await into its control flow is not
apparent to the machinery adding the target cleanup expressions.
The solution being tested is simply to recreate target expressions
as the co_awaits are lowered.  Teaching the machinery to handle
walking co_await expressions in different ways at different points
(outside the coroutine transformation) seems overly complex.

gcc/cp/ChangeLog:

2020-04-30  Iain Sandoe  &lt;iain@sandoe.co.uk&gt;

	PR c++/94883
	* coroutines.cc (register_awaits): Update target
	expressions for awaitable and suspend handle
	initializers.

gcc/testsuite/ChangeLog:

2020-04-30  Iain Sandoe  &lt;iain@sandoe.co.uk&gt;

	PR c++/94883
	* g++.dg/coroutines/pr94883-folly-2.C: New test.
</pre>
</div>
</content>
</entry>
<entry>
<title>coroutines: Fix cases where proxy variables are used [PR94879]</title>
<updated>2020-04-30T14:56:44+00:00</updated>
<author>
<name>Iain Sandoe</name>
<email>iain@sandoe.co.uk</email>
</author>
<published>2020-04-27T14:21:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=b16fd5fd8afe6f95c8ae44e759971e605c31f97b'/>
<id>b16fd5fd8afe6f95c8ae44e759971e605c31f97b</id>
<content type='text'>
There are several places where the handling of a variable
declaration depends on whether it corresponds to a compiler
temporary, or to some other entity.  We were testing that var
decls were artificial in determining this.  However, proxy vars
are also artificial so that this is not sufficient.  The solution
is to exclude variables with a DECL_VALUE_EXPR as well, since
the value variable will not be a temporary.

gcc/cp/ChangeLog:

2020-04-30  Iain Sandoe  &lt;iain@sandoe.co.uk&gt;

	PR c++/94879
	* coroutines.cc (build_co_await): Account for variables
	with DECL_VALUE_EXPRs.
	(captures_temporary): Likewise.
	(register_awaits): Likewise.

gcc/testsuite/ChangeLog:

2020-04-30  Iain Sandoe  &lt;iain@sandoe.co.uk&gt;

	PR c++/94879
	* g++.dg/coroutines/pr94879-folly-1.C: New test.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There are several places where the handling of a variable
declaration depends on whether it corresponds to a compiler
temporary, or to some other entity.  We were testing that var
decls were artificial in determining this.  However, proxy vars
are also artificial so that this is not sufficient.  The solution
is to exclude variables with a DECL_VALUE_EXPR as well, since
the value variable will not be a temporary.

gcc/cp/ChangeLog:

2020-04-30  Iain Sandoe  &lt;iain@sandoe.co.uk&gt;

	PR c++/94879
	* coroutines.cc (build_co_await): Account for variables
	with DECL_VALUE_EXPRs.
	(captures_temporary): Likewise.
	(register_awaits): Likewise.

gcc/testsuite/ChangeLog:

2020-04-30  Iain Sandoe  &lt;iain@sandoe.co.uk&gt;

	PR c++/94879
	* g++.dg/coroutines/pr94879-folly-1.C: New test.
</pre>
</div>
</content>
</entry>
<entry>
<title>diagnostics: Fix spelling in comment</title>
<updated>2020-04-30T13:43:30+00:00</updated>
<author>
<name>Jonathan Wakely</name>
<email>jwakely@redhat.com</email>
</author>
<published>2020-04-30T13:42:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=04e88369a7d95492efccf8f527d27cca74664ea7'/>
<id>04e88369a7d95492efccf8f527d27cca74664ea7</id>
<content type='text'>
gcc/ChangeLog:

	* pretty-print.c (pp_take_prefix): Fix spelling in comment.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
gcc/ChangeLog:

	* pretty-print.c (pp_take_prefix): Fix spelling in comment.
</pre>
</div>
</content>
</entry>
<entry>
<title>tree: Don't reuse types if TYPE_USER_ALIGN differ [PR94775]</title>
<updated>2020-04-30T12:34:40+00:00</updated>
<author>
<name>Marek Polacek</name>
<email>polacek@redhat.com</email>
</author>
<published>2020-04-29T19:36:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=6318fe77395fc0dd59419bc4d69cd06ac0158e54'/>
<id>6318fe77395fc0dd59419bc4d69cd06ac0158e54</id>
<content type='text'>
Here we trip on the TYPE_USER_ALIGN (t) assert in strip_typedefs: it
gets "const d[0]" with TYPE_USER_ALIGN=0 but the result built by
build_cplus_array_type is "const char[0]" with TYPE_USER_ALIGN=1.

When we strip_typedefs the element of the array "const d", we see it's
a typedef_variant_p, so we look at its DECL_ORIGINAL_TYPE, which is
char, but we need to add the const qualifier, so we call
cp_build_qualified_type -&gt; build_qualified_type
where get_qualified_type checks to see if we already have such a type
by walking the variants list, which in this case is:

  char -&gt; c -&gt; const char -&gt; const char -&gt; d -&gt; const d

Because check_base_type only checks TYPE_ALIGN and not TYPE_USER_ALIGN,
we choose the first const char, which has TYPE_USER_ALIGN set.  If the
element type of an array has TYPE_USER_ALIGN, the array type gets it too.

So we can make check_base_type stricter.  I was afraid that it might make
us reuse types less often, but measuring showed that we build the same
amount of types with and without the patch, while bootstrapping.

	PR c++/94775
	* tree.c (check_base_type): Return true only if TYPE_USER_ALIGN match.
	(check_aligned_type): Check if TYPE_USER_ALIGN match.

	* g++.dg/warn/Warray-bounds-10.C: New test.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Here we trip on the TYPE_USER_ALIGN (t) assert in strip_typedefs: it
gets "const d[0]" with TYPE_USER_ALIGN=0 but the result built by
build_cplus_array_type is "const char[0]" with TYPE_USER_ALIGN=1.

When we strip_typedefs the element of the array "const d", we see it's
a typedef_variant_p, so we look at its DECL_ORIGINAL_TYPE, which is
char, but we need to add the const qualifier, so we call
cp_build_qualified_type -&gt; build_qualified_type
where get_qualified_type checks to see if we already have such a type
by walking the variants list, which in this case is:

  char -&gt; c -&gt; const char -&gt; const char -&gt; d -&gt; const d

Because check_base_type only checks TYPE_ALIGN and not TYPE_USER_ALIGN,
we choose the first const char, which has TYPE_USER_ALIGN set.  If the
element type of an array has TYPE_USER_ALIGN, the array type gets it too.

So we can make check_base_type stricter.  I was afraid that it might make
us reuse types less often, but measuring showed that we build the same
amount of types with and without the patch, while bootstrapping.

	PR c++/94775
	* tree.c (check_base_type): Return true only if TYPE_USER_ALIGN match.
	(check_aligned_type): Check if TYPE_USER_ALIGN match.

	* g++.dg/warn/Warray-bounds-10.C: New test.
</pre>
</div>
</content>
</entry>
<entry>
<title>[AArch64] Make -moutline-atomics on by default</title>
<updated>2020-04-30T12:12:13+00:00</updated>
<author>
<name>Kyrylo Tkachov</name>
<email>kyrylo.tkachov@arm.com</email>
</author>
<published>2020-04-30T12:12:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=cd4b68527988f42c10c0d6c10e812d299887e0c2'/>
<id>cd4b68527988f42c10c0d6c10e812d299887e0c2</id>
<content type='text'>
2020-04-30  Kyrylo Tkachov  &lt;kyrylo.tkachov@arm.com&gt;

	* config/aarch64/aarch64.h (TARGET_OUTLINE_ATOMICS): Define.
	* config/aarch64/aarch64.opt (moutline-atomics): Change to Int variable.
	* doc/invoke.texi (moutline-atomics): Document as on by default.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
2020-04-30  Kyrylo Tkachov  &lt;kyrylo.tkachov@arm.com&gt;

	* config/aarch64/aarch64.h (TARGET_OUTLINE_ATOMICS): Define.
	* config/aarch64/aarch64.opt (moutline-atomics): Change to Int variable.
	* doc/invoke.texi (moutline-atomics): Document as on by default.
</pre>
</div>
</content>
</entry>
<entry>
<title>aarch64: don't emit bti j after NOTE_INSN_DELETED_LABEL [PR94748]</title>
<updated>2020-04-30T12:08:13+00:00</updated>
<author>
<name>Szabolcs Nagy</name>
<email>szabolcs.nagy@arm.com</email>
</author>
<published>2020-04-24T16:36:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/gcc.git/commit/?id=6ac83d350604c3e934d5e8a455ba7ec1c1c0240b'/>
<id>6ac83d350604c3e934d5e8a455ba7ec1c1c0240b</id>
<content type='text'>
It was previously discussed that indirect branches cannot go to
NOTE_INSN_DELETED_LABEL so inserting a landing pad is unnecessary.
See https://gcc.gnu.org/pipermail/gcc-patches/2019-May/522625.html

Before the patch a bti j was inserted after the label in

  __attribute__((target("branch-protection=bti")))
  int foo (void)
  {
  label:
    return 0;
  }

This is not necessary and weakens the security protection.

gcc/ChangeLog:

	PR target/94748
	* config/aarch64/aarch64-bti-insert.c (rest_of_insert_bti): Remove
	the check for NOTE_INSN_DELETED_LABEL.

gcc/testsuite/ChangeLog:

	PR target/94748
	* gcc.target/aarch64/pr94748.c: New test.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It was previously discussed that indirect branches cannot go to
NOTE_INSN_DELETED_LABEL so inserting a landing pad is unnecessary.
See https://gcc.gnu.org/pipermail/gcc-patches/2019-May/522625.html

Before the patch a bti j was inserted after the label in

  __attribute__((target("branch-protection=bti")))
  int foo (void)
  {
  label:
    return 0;
  }

This is not necessary and weakens the security protection.

gcc/ChangeLog:

	PR target/94748
	* config/aarch64/aarch64-bti-insert.c (rest_of_insert_bti): Remove
	the check for NOTE_INSN_DELETED_LABEL.

gcc/testsuite/ChangeLog:

	PR target/94748
	* gcc.target/aarch64/pr94748.c: New test.
</pre>
</div>
</content>
</entry>
</feed>
