• R/O
  • HTTP
  • SSH
  • HTTPS

List of commits

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

GCC with patches for OS216


RSS
Rev. Time Author
39a300f releases/gcc-6 2018-11-08 05:52:55 Max Filippov

gcc: xtensa: don't force PIC for uclinux target

xtensa-uclinux uses bFLT executable file format that cannot relocate
fields representing offsets from data to code. C++ objects built as PIC
use offsets to encode FDE structures. As a result C++ exception handling
doesn't work correctly on xtensa-uclinux. Don't use PIC by default on
xtensa-uclinux.

gcc/
2018-11-07 Max Filippov <jcmvbkbc@gmail.com>

Backport from mainline
2018-11-05 Max Filippov <jcmvbkbc@gmail.com>

* config/xtensa/uclinux.h (XTENSA_ALWAYS_PIC): Change to 0.

From-SVN: r265890

e31ae98 releases/gcc-6.5.0 2018-10-26 18:54:34 GCC Administrator

Update ChangeLog and version files for release

From-SVN: r265524

68f5087 2018-10-26 09:16:31 GCC Administrator

Daily bump.

From-SVN: r265511

931e715 2018-10-26 01:42:01 Jonathan Wakely

PR libstdc++/87749 fix (and optimize) string move construction

The move constructor for the SSO string uses assign(const basic_string&)
when either:

(1) the source string is "local" and so the contents of the small string
buffer need to be copied, or

(2) the allocator does not propagate and is_always_equal is false.

Case (1) is suboptimal, because the assign member is not noexcept and
the compiler isn't smart enough to see it won't actually throw in this
case. This causes extra code in the move assignment operator so that any
exception will be turned into a call to std::terminate. This can be
fixed by copying small strings inline instead of calling assign.

Case (2) is a bug, because the specific instances of the allocators
could be equal even if is_always_equal is false. This can result in an
unnecessary deep copy (and potentially-throwing allocation) when the
storage should be moved. This can be fixed by simply checking if the
allocators are equal.

PR libstdc++/87749
* include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI]
(basic_string::operator=(basic_string&&)): For short strings copy the
buffer inline. Only fall back to using assign(const basic_string&) to
do a deep copy when reallocation is needed.
* testsuite/21_strings/basic_string/modifiers/assign/char/87749.cc:
New test.
* testsuite/21_strings/basic_string/modifiers/assign/char/
move_assign_optim.cc: New test.
* testsuite/21_strings/basic_string/modifiers/assign/wchar_t/87749.cc:
New test.
* testsuite/21_strings/basic_string/modifiers/assign/wchar_t/
move_assign_optim.cc: New test.

From-SVN: r265500

7487520 2018-10-26 01:41:54 Jonathan Wakely

PR libstdc++/87704 fix unique_ptr(nullptr_t) constructors

Using a delegating constructor to implement these constructors means
that they instantiate the destructor, which requires the element_type to
be complete. In C++11 and C++14 they were specified to be delegating,
but that was changed as part of LWG 2801 so in C++17 they don't require
a complete type (as was intended all along).

Backport from mainline
2018-10-23 Jonathan Wakely <jwakely@redhat.com>

PR libstdc++/87704
* include/bits/unique_ptr.h (unique_ptr::unique_ptr(nullptr_t)): Do
not delegate to default constructor.
(unique_ptr<T[], D>::unique_ptr(nullptr_t)): Likewise.
* testsuite/20_util/unique_ptr/cons/incomplete.cc: New test.

From-SVN: r265499

7aec289 2018-10-25 09:16:05 GCC Administrator

Daily bump.

From-SVN: r265475

0970e37 2018-10-24 09:16:40 GCC Administrator

Daily bump.

From-SVN: r265445

5d72b28 2018-10-24 02:16:55 Tom de Vries

backport "[c++] Fix DECL_BY_REFERENCE of clone parms"

Consider test.C compiled at -O0 -g:
...
class string {
public:
string (const char *p) { this->p = p ; }
string (const string &s) { this->p = s.p; }

private:
const char *p;
};

class foo {
public:
foo (string dir_hint) {}
};

int
main (void)
{
std::string s = "This is just a string";
foo bar(s);
return 0;
}
...

When parsing foo::foo, the dir_hint parameter gets a DECL_ARG_TYPE of
'struct string & restrict'. Then during finish_struct, we call
clone_constructors_and_destructors and create clones for foo::foo, and
set the DECL_ARG_TYPE in the same way.

Later on, during finish_function, cp_genericize is called for the original
foo::foo, which sets the type of parm dir_hint to DECL_ARG_TYPE, and sets
DECL_BY_REFERENCE of dir_hint to 1.

After that, during maybe_clone_body update_cloned_parm is called with:
...
(gdb) call debug_generic_expr (parm.typed.type)
struct string & restrict
(gdb) call debug_generic_expr (cloned_parm.typed.type)
struct string
...
The type of the cloned_parm is then set to the type of parm, but
DECL_BY_REFERENCE is not set.

When doing cp_genericize for the clone later on,
TREE_ADDRESSABLE (TREE_TYPE ()) is no longer true for the updated type for
the parm, so DECL_BY_REFERENCE is not set there either.

The missing DECL_BY_REFERENCE on cloned_parm causes incorrect debug info to be
generated.

This patch fixes the problem by copying DECL_BY_REFERENCE in update_cloned_parm.

Bootstrapped and reg-tested on x86_64.

2018-10-23 Tom de Vries <tdevries@suse.de>

backport from trunk:
2018-07-31 Tom de Vries <tdevries@suse.de>

PR debug/86687
* optimize.c (update_cloned_parm): Copy DECL_BY_REFERENCE.

* g++.dg/guality/pr86687.C: New test.

From-SVN: r265431

f9da731 2018-10-23 09:16:37 GCC Administrator

Daily bump.

From-SVN: r265405

4afedd9 2018-10-22 09:16:31 GCC Administrator

Daily bump.

From-SVN: r265363

ba8783c 2018-10-21 09:16:21 GCC Administrator

Daily bump.

From-SVN: r265346

d331c05 2018-10-20 09:16:39 GCC Administrator

Daily bump.

From-SVN: r265336

d243689 2018-10-19 09:16:46 GCC Administrator

Daily bump.

From-SVN: r265300

4f9f5a0 2018-10-19 06:41:01 Jonathan Wakely

PR libstdc++/87641 correctly initialize accumulator in valarray::sum()

Use the value of the first element as the initial value of the
__valarray_sum accumulator. Value-initialization might not create the
additive identity for the value type.

PR libstdc++/87641
* include/bits/valarray_array.h (__valarray_sum): Use first element
to initialize accumulator instead of value-initializing it.
* testsuite/26_numerics/valarray/87641.cc: New test.

From-SVN: r265291

9a34d8e 2018-10-18 09:16:24 GCC Administrator

Daily bump.

From-SVN: r265252

d0419fc 2018-10-18 02:54:26 Eric Botcazou

re PR middle-end/87623 (bytes swapped in register when comparing cause fail when compiled with -O1 or higher)

PR middle-end/87623
* fold-const.c (fold_truth_andor_1): If the right side is not constant,
bail out if both sides do not have the same storage order.

From-SVN: r265245

8fb108b 2018-10-17 09:16:25 GCC Administrator

Daily bump.

From-SVN: r265225

001521b 2018-10-17 00:21:19 Gerald Pfeifer

backport: close.c: Include <string.h>.

Backport from trunk
* io/close.c [!HAVE_UNLINK_OPEN_FILE]: Include <string.h>.

From-SVN: r265198

29813f1 2018-10-16 09:16:36 GCC Administrator

Daily bump.

From-SVN: r265180

a22584b 2018-10-15 23:03:53 Jonathan Wakely

Adjust test to pass with latest glibc

Glibc changed the it_IT locales to use thousands separators,
invalidating this test. Use nl_NL instead, as Dutch only uses grouping
for money not numbers.

* testsuite/22_locale/numpunct/members/char/3.cc: Adjust test to
account for change to glibc it_IT localedata (glibc bz#10797).

From-SVN: r265168

2a4e082 2018-10-15 22:43:09 Richard Biener

backport: re PR sanitizer/84761 (AddressSanitizer is not compatible with glibc 2.27 on x86)

2018-10-15 Richard Biener <rguenther@suse.de>

Backport from mainline
2018-03-19 Jakub Jelinek <jakub@redhat.com>

PR sanitizer/84761
* sanitizer_common/sanitizer_linux_libcdep.cc (__GLIBC_PREREQ):
Define if not defined.
(DL_INTERNAL_FUNCTION): Don't define.
(InitTlsSize): For __i386__ if not compiled against glibc 2.27+
determine at runtime whether to use regparm(3), stdcall calling
convention for older glibcs or normal calling convention for
newer glibcs for call to _dl_get_tls_static_info.

From-SVN: r265164

92eeabf 2018-10-15 20:52:48 Jonathan Wakely

PR libstdc++/86751 default assignment operators for std::pair

The solution for PR 77537 causes ambiguities due to the extra copy
assignment operator taking a __nonesuch_no_braces parameter. By making
the base class non-assignable we don't need the extra deleted overload
in std::pair. The copy assignment operator will be implicitly deleted
(and the move assignment operator not declared) as needed. Without the
additional user-provided operator in std::pair the ambiguity is avoided.

Backport from mainline
2018-07-31 Jonathan Wakely <jwakely@redhat.com>

PR libstdc++/86751
* include/bits/stl_pair.h (__pair_base): New class with deleted copy
assignment operator.
(pair): Derive from __pair_base.
(pair::operator=): Remove deleted overload.
* python/libstdcxx/v6/printers.py (StdPairPrinter): New pretty printer
so that new base class isn't shown in GDB.
* testsuite/20_util/pair/86751.cc: New test.
* testsuite/20_util/pair/ref_assign.cc: New test.

From-SVN: r265162

c35f091 2018-10-15 19:50:57 Richard Biener

backport: [multiple changes]

2018-10-15 Richard Biener <rguenther@suse.de>

Backport from mainline
2018-08-23 Richard Biener <rguenther@suse.de>

PR middle-end/87024
* tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
calls.

* gcc.dg/pr87024.c: New testcase.

2018-08-17 Richard Biener <rguenther@suse.de>

PR middle-end/86505
* tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
across a va-arg-pack using call adjust its return value accordingly.

* gcc.dg/torture/pr86505.c: New testcase.

From-SVN: r265159

baa7a1d 2018-10-15 09:16:36 GCC Administrator

Daily bump.

From-SVN: r265152

0b6974a 2018-10-14 09:16:06 GCC Administrator

Daily bump.

From-SVN: r265143

c32acb1 2018-10-13 09:16:20 GCC Administrator

Daily bump.

From-SVN: r265136

b979a5a 2018-10-13 02:34:07 Jakub Jelinek

backport: re PR target/87550 (Intrinsics for rdpmc (__rdpmc, __builtin_ia32_rdpmc) are interpreted as pure functions)

Backported from mainline
2018-10-10 Jakub Jelinek <jakub@redhat.com>

PR target/87550
* config/i386/i386.c (bdesc_args): Move IX86_BUILTIN_RDPMC
from here to ...
(bdesc_special_args): ... here.

* gcc.target/i386/pr87550.c: New test.

From-SVN: r265122

3176632 2018-10-13 02:33:25 Jakub Jelinek

backport: re PR middle-end/87248 (Bad code for masked operations involving signed ints)

Backported from mainline
2018-09-12 Jakub Jelinek <jakub@redhat.com>

PR middle-end/87248
* fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
BIT_AND_EXPR's second operand is a power of two. Formatting fix.

* c-c++-common/torture/pr87248.c: New test.

From-SVN: r265121

7685fb0 2018-10-13 02:32:38 Jakub Jelinek

backport: re PR rtl-optimization/87065 (combine causes ICE in trunc_int_for_mode)

Backported from mainline
2018-08-27 Jakub Jelinek <jakub@redhat.com>

PR rtl-optimization/87065
* combine.c (simplify_if_then_else): Formatting fix.
(if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
check.
(known_cond): Don't return const_true_rtx for vector modes. Use
CONST0_RTX instead of const0_rtx. Formatting fixes.

* gcc.target/i386/pr87065.c: New test.

From-SVN: r265120

6b30e83 2018-10-13 02:31:33 Jakub Jelinek

backport: re PR middle-end/86627 (Signed 128-bit division by 2 no longer expanded to RTL)

Backported from mainline
2018-07-24 Jakub Jelinek <jakub@redhat.com>

PR middle-end/86627
* expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
and size > HOST_BITS_PER_WIDE_INT. For size > HOST_BITS_PER_WIDE_INT
and abs_d == d, do the power of two handling if profitable.

* gcc.target/i386/pr86627.c: New test.

From-SVN: r265119