]> git.ipfire.org Git - thirdparty/gcc.git/log
thirdparty/gcc.git
6 years agoLWG 3050 Fix cv-qualification of convertibility constraints
Jonathan Wakely [Wed, 8 Aug 2018 15:40:57 +0000 (16:40 +0100)] 
LWG 3050 Fix cv-qualification of convertibility constraints

Backport from mainline
2018-06-18  Jonathan Wakely  <jwakely@redhat.com>

* include/std/chrono (duration, operator*, operator/, operator%): Use
const-qualified type as source type in is_convertible constraints.
* testsuite/20_util/duration/arithmetic/dr3050.cc: New.
* testsuite/20_util/duration/cons/dr3050.cc: New.
* testsuite/20_util/duration/literals/range.cc: Rename to...
* testsuite/20_util/duration/literals/range_neg.cc: Here. Adjust
dg-error lineno.

From-SVN: r263423

6 years agoAdd noexcept to std::shared_future copy operations (LWG DR 2799)
Jonathan Wakely [Wed, 8 Aug 2018 15:40:51 +0000 (16:40 +0100)] 
Add noexcept to std::shared_future copy operations (LWG DR 2799)

Backport from mainline
2017-11-16  Jonathan Wakely  <jwakely@redhat.com>

* include/std/future (shared_future): Add noexcept to copy constructor
and copy-assignment operator (LWG 2799).

From-SVN: r263422

6 years agoPR libstdc++/80893 Fix null dereference in vector<bool>
Jonathan Wakely [Wed, 8 Aug 2018 15:40:47 +0000 (16:40 +0100)] 
PR libstdc++/80893 Fix null dereference in vector<bool>

Backport from mainline
2017-06-17  Jonathan Wakely  <jwakely@redhat.com>

PR libstdc++/80893
* testsuite/23_containers/vector/bool/80893.cc: Add { target c++11 }.

Backport from mainline
2017-05-31  Jonathan Wakely  <jwakely@redhat.com>

PR libstdc++/80893
* include/bits/stl_bvector.h (vector<bool>::_M_initialize): Avoid
null pointer dereference when size is zero.
* testsuite/23_containers/vector/bool/80893.cc: New.
* testsuite/util/testsuite_allocator.h (PointerBase::PointerBase):
Add non-explicit constructor from nullptr.
(PointerBase::derived() const): Add const-qualified overload.

From-SVN: r263421

6 years agoPR libstdc++/68519 use native duration to avoid rounding errors
Jonathan Wakely [Wed, 8 Aug 2018 15:40:41 +0000 (16:40 +0100)] 
PR libstdc++/68519 use native duration to avoid rounding errors

Backport from mainline
2017-12-14  Jonathan Wakely  <jwakely@redhat.com>

PR libstdc++/68519
* include/std/condition_variable (condition_variable::wait_for):
Convert duration to native clock's duration before addition.
* testsuite/30_threads/condition_variable/members/68519.cc: New test.

From-SVN: r263420

6 years agoPR libstdc++/86292 fix exception safety of std::vector<InputIterator> constructor
Jonathan Wakely [Wed, 8 Aug 2018 15:40:37 +0000 (16:40 +0100)] 
PR libstdc++/86292 fix exception safety of std::vector<InputIterator> constructor

Backport from mainline
2018-06-25  Jonathan Wakely  <jwakely@redhat.com>

PR libstdc++/86292
* include/bits/stl_vector.h (vector::_M_range_initialize<InputIter>):
Add try-catch block.
* testsuite/23_containers/vector/cons/86292.cc: New.

From-SVN: r263419

6 years agoImprove libstdc++ docs w.r.t newer C++ standards
Jonathan Wakely [Wed, 8 Aug 2018 15:40:32 +0000 (16:40 +0100)] 
Improve libstdc++ docs w.r.t newer C++ standards

Instead of repeating all the old headers for every new standard I've
changed the docs to only list the new headers for each standard.

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

* doc/xml/manual/using.xml: Document all headers for C++11 and later.
* doc/html/*: Regenerate.

From-SVN: r263418

6 years agoPR libstdc++/60555 std::system_category() should recognise POSIX errno values
Jonathan Wakely [Wed, 8 Aug 2018 15:40:26 +0000 (16:40 +0100)] 
PR libstdc++/60555 std::system_category() should recognise POSIX errno values

Backport from mainline
2018-08-03  Jonathan Wakely  <jwakely@redhat.com>

* src/c++11/system_error.cc
(system_error_category::default_error_condition): Add workaround for
ENOTEMPTY and EEXIST having the same value on AIX.
* testsuite/19_diagnostics/error_category/system_category.cc: Add
extra testcases for EDOM, EILSEQ, ERANGE, EEXIST and ENOTEMPTY.

Backport from mainline
2018-08-01  Jonathan Wakely  <jwakely@redhat.com>

PR libstdc++/60555
* src/c++11/system_error.cc
(system_error_category::default_error_condition): New override to
check for POSIX errno values.
* testsuite/19_diagnostics/error_category/generic_category.cc: New
* testsuite/19_diagnostics/error_category/system_category.cc: New
test.

From-SVN: r263417

6 years agoPR libstdc++/86734 use addressof in reverse_iterator::operator->
Jonathan Wakely [Wed, 8 Aug 2018 15:40:21 +0000 (16:40 +0100)] 
PR libstdc++/86734 use addressof in reverse_iterator::operator->

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

PR libstdc++/86734
* include/bits/stl_iterator.h (reverse_iterator::operator->): Use
addressof (LWG 2188).
* testsuite/24_iterators/reverse_iterator/dr2188.cc: New test.

From-SVN: r263416

6 years agoFix std::codecvt_utf8<wchar_t> for Mingw
Jonathan Wakely [Wed, 8 Aug 2018 15:40:17 +0000 (16:40 +0100)] 
Fix std::codecvt_utf8<wchar_t> for Mingw

Backport from mainline
2018-05-19  Jonathan Wakely  <jwakely@redhat.com>

* src/c++11/codecvt.cc (__codecvt_utf8_base<wchar_t>::do_in)
[__SIZEOF_WCHAR_T__==2 && __BYTE_ORDER__!=__ORDER_BIG_ENDIAN__]: Set
little_endian element in bitmask.
* testsuite/22_locale/codecvt/codecvt_utf8/69703.cc: Run all tests.
* testsuite/22_locale/codecvt/codecvt_utf8/wchar_t/1.cc: New.

From-SVN: r263415

6 years agoPR libstdc++/66145 allow catching iostream errors as cxx11 ios::failure
Jonathan Wakely [Wed, 8 Aug 2018 15:40:11 +0000 (16:40 +0100)] 
PR libstdc++/66145 allow catching iostream errors as cxx11 ios::failure

Define a new exception type derived from the gcc4-compatible ios::failure
which also aggregates an object of the ios::failure[abi:cxx11] type.
Make __throw_ios_failure throw this new type for iostream errors
that raise exceptions. Provide custom type info for the new type so that
it can be caught by handlers for ios::failure[abi:cxx11] type
as well as handlers for the gcc4-compatible ios::failure and its bases.

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

PR libstdc++/85222
* src/c++11/cxx11-ios_failure.cc (__construct_ios_failure)
(__destroy_ios_failure, is_ios_failure_handler): New functions.
* src/c++11/ios.cc (__throw_ios_failure): Remove definition.
(_GLIBCXX_USE_CXX11_ABI): Don't define here.
* src/c++98/Makefile.am [ENABLE_DUAL_ABI]: Add special rules for
ios_failure.cc to rewrite type info for __ios_failure.
* src/c++98/Makefile.in: Regenerate.
* src/c++98/ios_failure.cc [_GLIBCXX_USE_DUAL_ABI]
(__iosfailure, __iosfailure_type_info): New types.
(__throw_ios_failure): Define here.
* testsuite/27_io/ios_base/failure/dual_abi.cc: New.
* testsuite/27_io/basic_ios/copyfmt/char/1.cc: Revert changes to
add -D_GLIBCXX_USE_CXX11_ABI=0 to dg-options.
* testsuite/27_io/basic_ios/exceptions/char/1.cc: Likewise.
* testsuite/27_io/basic_istream/extractors_arithmetic/char/
exceptions_failbit.cc: Likewise.
* testsuite/27_io/basic_istream/extractors_arithmetic/wchar_t/
exceptions_failbit.cc: Likewise.
* testsuite/27_io/basic_istream/extractors_other/char/
exceptions_null.cc: Likewise.
* testsuite/27_io/basic_istream/extractors_other/wchar_t/
exceptions_null.cc: Likewise.
* testsuite/27_io/basic_istream/sentry/char/12297.cc: Likewise.
* testsuite/27_io/basic_istream/sentry/wchar_t/12297.cc: Likewise.
* testsuite/27_io/basic_ostream/inserters_other/char/
exceptions_null.cc: Likewise.
* testsuite/27_io/basic_ostream/inserters_other/wchar_t/
exceptions_null.cc: Likewise.
* testsuite/27_io/ios_base/storage/2.cc: Likewise.

From-SVN: r263414

6 years agoDaily bump.
GCC Administrator [Wed, 8 Aug 2018 00:16:16 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r263384

6 years agoDaily bump.
GCC Administrator [Tue, 7 Aug 2018 00:16:17 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r263347

7 years agoDaily bump.
GCC Administrator [Mon, 6 Aug 2018 00:16:05 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r263321

7 years agoDaily bump.
GCC Administrator [Sun, 5 Aug 2018 00:16:09 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r263313

7 years agoDaily bump.
GCC Administrator [Sat, 4 Aug 2018 00:16:07 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r263302

7 years agoDaily bump.
GCC Administrator [Fri, 3 Aug 2018 00:16:04 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r263281

7 years agoDaily bump.
GCC Administrator [Thu, 2 Aug 2018 00:16:32 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r263240

7 years agoDaily bump.
GCC Administrator [Wed, 1 Aug 2018 00:16:06 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r263187

7 years agoDaily bump.
GCC Administrator [Tue, 31 Jul 2018 00:16:05 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r263077

7 years agoDaily bump.
GCC Administrator [Mon, 30 Jul 2018 00:16:28 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r263056

7 years agopa.c (pa_output_addr_vec): Align address table.
John David Anglin [Sun, 29 Jul 2018 16:11:34 +0000 (16:11 +0000)] 
pa.c (pa_output_addr_vec): Align address table.

* config/pa/pa.c (pa_output_addr_vec): Align address table.
* config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
* config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.

From-SVN: r263054

7 years agoDaily bump.
GCC Administrator [Sun, 29 Jul 2018 00:16:10 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r263047

7 years agoDaily bump.
GCC Administrator [Sat, 28 Jul 2018 00:16:04 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r263042

7 years agoDaily bump.
GCC Administrator [Fri, 27 Jul 2018 00:16:05 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r263024

7 years agoDaily bump.
GCC Administrator [Thu, 26 Jul 2018 00:16:16 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r262985

7 years agoDaily bump.
GCC Administrator [Wed, 25 Jul 2018 00:16:21 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r262954

7 years agoDaily bump.
GCC Administrator [Tue, 24 Jul 2018 00:16:12 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r262937

7 years agoDaily bump.
GCC Administrator [Mon, 23 Jul 2018 00:16:05 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r262924

7 years agoDaily bump.
GCC Administrator [Sun, 22 Jul 2018 00:16:05 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r262918

7 years agoDaily bump.
GCC Administrator [Sat, 21 Jul 2018 00:16:05 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r262914

7 years agoDaily bump.
GCC Administrator [Fri, 20 Jul 2018 00:16:04 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r262894

7 years agoDaily bump.
GCC Administrator [Thu, 19 Jul 2018 00:16:05 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r262867

7 years agoDaily bump.
GCC Administrator [Wed, 18 Jul 2018 00:16:15 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r262843

7 years agoAvoid assembler warnings from AArch64 constructor/destructor priorities.
Kyrylo Tkachov [Tue, 17 Jul 2018 12:53:42 +0000 (12:53 +0000)] 
Avoid assembler warnings from AArch64 constructor/destructor priorities.

2018-07-17  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

Backport from mainline
PR target/84168
2017-09-28  Joseph Myers  <joseph@codesourcery.com>

* config/aarch64/aarch64.c (aarch64_elf_asm_constructor)
(aarch64_elf_asm_destructor): Pass SECTION_NOTYPE to get_section
when creating .init_array and .fini_array sections with priority
specified.

From-SVN: r262822

7 years agoDaily bump.
GCC Administrator [Tue, 17 Jul 2018 00:16:15 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r262761

7 years agoDaily bump.
GCC Administrator [Mon, 16 Jul 2018 00:16:21 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r262672

7 years agoDaily bump.
GCC Administrator [Sun, 15 Jul 2018 00:16:05 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r262662

7 years agoDaily bump.
GCC Administrator [Sat, 14 Jul 2018 00:16:14 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r262655

7 years agoDaily bump.
GCC Administrator [Fri, 13 Jul 2018 00:16:05 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r262617

7 years agore PR target/84829 (-mieee-fp causes to link with -lieee but that is no longer available)
Richard Biener [Thu, 12 Jul 2018 16:33:26 +0000 (16:33 +0000)] 
re PR target/84829 (-mieee-fp causes to link with -lieee but that is no longer available)

2018-07-12  Richard Biener  <rguenther@suse.de>

PR target/84829
* config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
Remove -mieee-fp handling.

* gcc.target/i386/pr84829.c: New testcase.

From-SVN: r262598

7 years agoDaily bump.
GCC Administrator [Thu, 12 Jul 2018 00:16:07 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r262568

7 years agoDaily bump.
GCC Administrator [Wed, 11 Jul 2018 00:16:44 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r262546

7 years agoDaily bump.
GCC Administrator [Tue, 10 Jul 2018 00:16:33 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r262529

7 years agoDaily bump.
GCC Administrator [Mon, 9 Jul 2018 00:16:18 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r262506

7 years agoDaily bump.
GCC Administrator [Sun, 8 Jul 2018 00:16:05 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r262502

7 years agoDaily bump.
GCC Administrator [Sat, 7 Jul 2018 00:16:05 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r262489

7 years agoDaily bump.
GCC Administrator [Fri, 6 Jul 2018 00:16:19 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r262459

7 years agobackport: re PR libstdc++/86272 (__gnu_debug::string uses undefined __glibcxx_check_i...
François Dumont [Thu, 5 Jul 2018 20:51:27 +0000 (20:51 +0000)] 
backport: re PR libstdc++/86272 (__gnu_debug::string uses undefined __glibcxx_check_insert_range2)

2018-07-05  François Dumont  <fdumont@gcc.gnu.org>

Backport from mainline
2018-07-04  François Dumont  <fdumont@gcc.gnu.org>

PR libstdc++/86272
* include/debug/string
(__gnu_debug::basic_string<>::insert<_Ite>(const_iterator, _Ite, _Ite)):
Use __glibcxx_check_insert_range.

From-SVN: r262455

7 years agoDaily bump.
GCC Administrator [Thu, 5 Jul 2018 00:16:32 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r262425

7 years agoDaily bump.
GCC Administrator [Wed, 4 Jul 2018 00:16:07 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r262361

7 years agore PR fortran/82969 (ICE in gfc_class_vptr_get, at fortran/trans-expr.c:211)
Paul Thomas [Tue, 3 Jul 2018 10:45:52 +0000 (10:45 +0000)] 
re PR fortran/82969 (ICE in gfc_class_vptr_get, at fortran/trans-expr.c:211)

2018-07-03  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/82969
PR fortran/86242
* trans-array.c (structure_alloc_comps): Do not explicitly copy
procedure pointer components.

2018-07-03  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/82969
PR fortran/86242
* gfortran.dg/proc_ptr_50.f90: New test.

From-SVN: r262339

7 years agoDaily bump.
GCC Administrator [Tue, 3 Jul 2018 00:16:26 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r262323

7 years agoDaily bump.
GCC Administrator [Mon, 2 Jul 2018 00:16:11 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r262291

7 years ago[multiple changes]
David Edelsohn [Sun, 1 Jul 2018 14:57:03 +0000 (14:57 +0000)] 
[multiple changes]

2018-06-27  David Edelsohn  <dje.gcc@gmail.com>

        2018-06-19  Tony Reix  <tony.reix@atos.com>
            Damien Bergamini  <damien.bergamini@atos.com>
            David Edelsohn  <dje.gcc@gmail.com>

        * collect2.c (static_obj): New variable.
        (static_libs): New variable.
        (is_in_list): Uncomment declaration.
        (main): Track AIX libraries linked statically.
        (is_in_list): Uncomment definition.
        (scan_prog_file): Don't add AIX shared libraries initializer
        to constructor list if linking statically.

From-SVN: r262285

7 years agoDaily bump.
GCC Administrator [Sun, 1 Jul 2018 00:16:05 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r262279

7 years agoDaily bump.
GCC Administrator [Sat, 30 Jun 2018 00:16:14 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r262263

7 years agoDaily bump.
GCC Administrator [Fri, 29 Jun 2018 00:16:18 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r262237

7 years agoDaily bump.
GCC Administrator [Thu, 28 Jun 2018 00:16:16 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r262200

7 years agoDaily bump.
GCC Administrator [Wed, 27 Jun 2018 00:16:24 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r262168

7 years agobackport: rs6000-c.c (altivec_overloaded_builtins): Change behavior of vec_packsu...
Kelvin Nilsen [Tue, 26 Jun 2018 17:24:54 +0000 (17:24 +0000)] 
backport: rs6000-c.c (altivec_overloaded_builtins): Change behavior of vec_packsu (vector unsigned long long...

gcc/ChangeLog:

2018-06-26  Kelvin Nilsen  <kelvin@gcc.gnu.org>

Backported from mainline
2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>

* config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
behavior of vec_packsu (vector unsigned long long, vector unsigned
long long) to match behavior of vec_packs with same signature.

gcc/testsuite/ChangeLog:

2018-06-26  Kelvin Nilsen  <kelvin@gcc.gnu.org>

Backported from mainline
2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>

* gcc.target/powerpc/builtins-1.c: Add dg directive to scan
for vpkudus.

From-SVN: r262160

7 years agore PR c++/86291 (OpenMP incorrect for-loop collapsing with iterators and at least...
Jakub Jelinek [Tue, 26 Jun 2018 11:33:48 +0000 (13:33 +0200)] 
re PR c++/86291 (OpenMP incorrect for-loop collapsing with iterators and at least 5 nested loops)

PR c++/86291
* parser.c (cp_parser_omp_for_loop_init): Change for_block argument
type from vec<tree, va_gc> * to vec<tree, va_gc> *&.

* testsuite/libgomp.c++/pr86291.C: New test.

From-SVN: r262140

7 years agosyscall: remove Ustat
Ian Lance Taylor [Tue, 26 Jun 2018 04:44:49 +0000 (04:44 +0000)] 
syscall: remove Ustat

    glibc 2.28 removes ustat.h and the ustat function entirely, which
    breaks syscall.Ustat.

    Updates golang/go#25990

    Reviewed-on: https://go-review.googlesource.com/120535

From-SVN: r262128

7 years agoDaily bump.
GCC Administrator [Tue, 26 Jun 2018 00:16:31 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r262124

7 years agore PR target/84786 ([miscompilation] vunpcklpd accessing xmm16-22 targeting KNL)
Jakub Jelinek [Mon, 25 Jun 2018 17:55:15 +0000 (19:55 +0200)] 
re PR target/84786 ([miscompilation] vunpcklpd accessing xmm16-22 targeting KNL)

PR target/84786
* config/i386/sse.md (vshift_count): New mode attr.
(<shift_insn><mode>3<mask_name>): Use <vshift_count>N instead of vN
as last operand's constraint for VI2_AVX2_AVX512BW shifts.  Use YvN
instead of vN as last operand's constraint for VI48_AVX2 shifts.

* gcc.target/i386/avx512f-pr84786-3.c: New test.

From-SVN: r262103

7 years agobackport: re PR c++/86210 (Missing -Wnonnull warning for function defined in the...
Jakub Jelinek [Mon, 25 Jun 2018 17:54:30 +0000 (19:54 +0200)] 
backport: re PR c++/86210 (Missing -Wnonnull warning for function defined in the same TU)

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

PR c++/86210
* c-common.c (check_nonnull_arg): Use fold_for_warn.  Adjust obsolete
comment.

* g++.dg/warn/Wnonnull4.C: New test.

From-SVN: r262102

7 years agobackport: re PR tree-optimization/86231 (vrp_meet causes wrong-code)
Jakub Jelinek [Mon, 25 Jun 2018 17:53:50 +0000 (19:53 +0200)] 
backport: re PR tree-optimization/86231 (vrp_meet causes wrong-code)

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

PR tree-optimization/86231
* tree-vrp.c (union_ranges): For (  [  )  ] or (   )[   ] range and
anti-range don't overwrite *vr0min before using it to compute *vr0max.

* gcc.dg/tree-ssa/vrp119.c: New test.
* gcc.c-torture/execute/pr86231.c: New test.

From-SVN: r262101

7 years agobackport: re PR middle-end/85878 (ICE in convert_mode_scalar, at expr.c:287)
Jakub Jelinek [Mon, 25 Jun 2018 17:53:06 +0000 (19:53 +0200)] 
backport: re PR middle-end/85878 (ICE in convert_mode_scalar, at expr.c:287)

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

PR middle-end/85878
* expr.c (expand_assignment): Only call store_expr for halves if the
mode is the same.

* gfortran.fortran-torture/compile/pr85878.f90: New test.

From-SVN: r262100

7 years agobackport: re PR target/85945 (ICE in resolve_subreg_use, at lower-subreg.c:751)
Jakub Jelinek [Mon, 25 Jun 2018 17:52:28 +0000 (19:52 +0200)] 
backport: re PR target/85945 (ICE in resolve_subreg_use, at lower-subreg.c:751)

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

PR target/85945
* lower-subreg.c (find_decomposable_subregs): Don't decompose float
subregs of multi-word pseudos unless the float mode has word size.

* gcc.c-torture/compile/pr85945.c: New test.

From-SVN: r262099

7 years agobackport: re PR c++/85659 (ICE with inline assembly inside virtual function)
Jakub Jelinek [Mon, 25 Jun 2018 17:51:44 +0000 (19:51 +0200)] 
backport: re PR c++/85659 (ICE with inline assembly inside virtual function)

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

PR c++/85659
* cfgexpand.c (expand_asm_stmt): Don't create a temporary if
the type is addressable.  Don't force op into register if it has
BLKmode.

* g++.dg/ext/asm14.C: New test.
* g++.dg/ext/asm15.C: New test.
* g++.dg/ext/asm16.C: New test.

From-SVN: r262098

7 years agobackport: re PR rtl-optimization/85431 (UBSAN: ../../gcc/dse.c:303:15: runtime error...
Jakub Jelinek [Mon, 25 Jun 2018 17:48:47 +0000 (19:48 +0200)] 
backport: re PR rtl-optimization/85431 (UBSAN: ../../gcc/dse.c:303:15: runtime error: shift exponent 64 is too large for 64-bit type 'long unsigned int')

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

PR rtl-optimization/85431
* dse.c (record_store): Ignore zero width stores.

From-SVN: r262097

7 years agobackport: re PR rtl-optimization/85300 (ICE in exact_int_to_float_conversion_p, at...
Jakub Jelinek [Mon, 25 Jun 2018 17:47:56 +0000 (19:47 +0200)] 
backport: re PR rtl-optimization/85300 (ICE in exact_int_to_float_conversion_p, at simplify-rtx.c:895)

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

PR rtl-optimization/85300
* combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
simplify_unary_operation fails.

* gcc.dg/pr85300.c: New test.

From-SVN: r262096

7 years agobackport: re PR fortran/85313 (gcc/fortran/openmp.c: 2 * confused logic ?)
Jakub Jelinek [Mon, 25 Jun 2018 17:47:12 +0000 (19:47 +0200)] 
backport: re PR fortran/85313 (gcc/fortran/openmp.c: 2 * confused logic ?)

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

PR fortran/85313
* openmp.c (resolve_omp_do): Remove bogus if (j < i) break;.
(resolve_oacc_nested_loops): Likewise.  Formatting fix.

* gfortran.dg/gomp/pr85313.f90: New test.

From-SVN: r262095

7 years agobackport: re PR tree-optimization/85257 (wrong code with -O -fno-tree-ccp and reading...
Jakub Jelinek [Mon, 25 Jun 2018 17:45:48 +0000 (19:45 +0200)] 
backport: re PR tree-optimization/85257 (wrong code with -O -fno-tree-ccp and reading zeroed vector member)

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

PR tree-optimization/85257
* fold-const.c (native_encode_vector): If not all elts could fit
and off is -1, return 0 rather than offset.
* tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
(offset - offset2) / BITS_PER_UNIT as 4th argument to
native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
adjust buffer in native_interpret_expr call.

* gcc.dg/pr85257.c: New test.

From-SVN: r262094

7 years agobackport: re PR debug/85252 (ICE with -g for static zero-length array initialization)
Jakub Jelinek [Mon, 25 Jun 2018 17:44:31 +0000 (19:44 +0200)] 
backport: re PR debug/85252 (ICE with -g for static zero-length array initialization)

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

PR debug/85252
* dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.

* gcc.dg/debug/pr85252.c: New test.

From-SVN: r262093

7 years agobackport: re PR rtl-optimization/85167 (shrink-wrap.c:333:15: runtime error with...
Jakub Jelinek [Mon, 25 Jun 2018 17:43:41 +0000 (19:43 +0200)] 
backport: re PR rtl-optimization/85167 (shrink-wrap.c:333:15: runtime error with UBSAN)

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

PR rtl-optimization/85167
* shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
bb_defs if *split_p, instead preinitialize it to NULL.

* gcc.dg/pr85167.c: New test.

From-SVN: r262091

7 years agobackport: re PR c++/85147 (ICE with invalid variadic template-template parameter)
Jakub Jelinek [Mon, 25 Jun 2018 17:42:51 +0000 (19:42 +0200)] 
backport: re PR c++/85147 (ICE with invalid variadic template-template parameter)

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

PR c++/85147
* pt.c (fixed_parameter_pack_p_1): Punt if parm is error_mark_node.

* g++.dg/cpp0x/pr85147.C: New test.

From-SVN: r262090

7 years agobackport: re PR c++/85140 (ICE with invalid use of alignas)
Jakub Jelinek [Mon, 25 Jun 2018 17:42:12 +0000 (19:42 +0200)] 
backport: re PR c++/85140 (ICE with invalid use of alignas)

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

PR c++/85140
* name-lookup.c (handle_namespace_attrs): Return early if attributes
is error_mark_node.

* g++.dg/cpp0x/gen-attrs-64.C: New test.

From-SVN: r262089

7 years agobackport: re PR c++/84791 (ICE with broken OpenMP reduction clause)
Jakub Jelinek [Mon, 25 Jun 2018 17:41:34 +0000 (19:41 +0200)] 
backport: re PR c++/84791 (ICE with broken OpenMP reduction clause)

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

PR c++/84791
* semantics.c (finish_omp_reduction_clause): If
OMP_CLAUSE_REDUCTION_PLACEHOLDER is error_mark_node, return true
even if processing_template_decl.

* g++.dg/gomp/pr84791.C: New test.

From-SVN: r262088

7 years agobackport: re PR c++/85076 (ICE with invalid template used as lambda argument)
Jakub Jelinek [Mon, 25 Jun 2018 17:40:52 +0000 (19:40 +0200)] 
backport: re PR c++/85076 (ICE with invalid template used as lambda argument)

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

PR c++/85076
* tree.c (cp_build_reference_type): If to_type is error_mark_node,
return it right away.

* g++.dg/cpp1y/pr85076.C: New test.

From-SVN: r262087

7 years agobackport: re PR c++/85068 (ICE with invalid covariant return type hierarchy)
Jakub Jelinek [Mon, 25 Jun 2018 17:39:55 +0000 (19:39 +0200)] 
backport: re PR c++/85068 (ICE with invalid covariant return type hierarchy)

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

PR c++/85068
* class.c (update_vtable_entry_for_fn): Don't ICE if base_binfo
is NULL.  Assert if thunk_binfo is NULL then errorcount is non-zero.

* g++.dg/inherit/covariant22.C: New test.

From-SVN: r262086

7 years agobackport: re PR inline-asm/85022 (internal compiler error: in write_dependence_p...
Jakub Jelinek [Mon, 25 Jun 2018 17:39:11 +0000 (19:39 +0200)] 
backport: re PR inline-asm/85022 (internal compiler error: in write_dependence_p, at alias.c:3003)

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

PR inline-asm/85022
* emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
known size by default.

From-SVN: r262085

7 years agobackport: re PR inline-asm/85034 (-O1 internal compiler error: in elimination_costs_i...
Jakub Jelinek [Mon, 25 Jun 2018 17:38:29 +0000 (19:38 +0200)] 
backport: re PR inline-asm/85034 (-O1 internal compiler error: in elimination_costs_in_insn, at reload1.c:3633)

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

PR inline-asm/85034
* function.c (match_asm_constraints_1): Don't optimize if input
doesn't satisfy general_operand predicate for output's mode.

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

From-SVN: r262084

7 years agobackport: re PR inline-asm/85022 (internal compiler error: in write_dependence_p...
Jakub Jelinek [Mon, 25 Jun 2018 17:37:40 +0000 (19:37 +0200)] 
backport: re PR inline-asm/85022 (internal compiler error: in write_dependence_p, at alias.c:3003)

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

PR inline-asm/85022
* alias.c (write_dependence_p): Don't require for x_canonicalized
non-VOIDmode if x has VOIDmode.

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

From-SVN: r262083

7 years agobackport: re PR inline-asm/84941 (internal compiler error: in reg_overlap_mentioned_p...
Jakub Jelinek [Mon, 25 Jun 2018 17:37:02 +0000 (19:37 +0200)] 
backport: re PR inline-asm/84941 (internal compiler error: in reg_overlap_mentioned_p, at rtlanal.c:1870 (reg_overlap_mentioned_p()/match_asm_constraints_1()))

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

PR inline-asm/84941
* function.c (match_asm_constraints_1): Don't do the optimization
if input isn't a REG, SUBREG, MEM or constant.

* gcc.dg/pr84941.c: New test.

From-SVN: r262082

7 years agobackport: re PR debug/84875 (ICE in maybe_record_trace_start, at dwarf2cfi.c:2348...
Jakub Jelinek [Mon, 25 Jun 2018 17:36:14 +0000 (19:36 +0200)] 
backport: re PR debug/84875 (ICE in maybe_record_trace_start, at dwarf2cfi.c:2348 on s390x)

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

PR debug/84875
* dce.c (delete_unmarked_insns): Don't remove frame related noop moves
holding REG_CFA_RESTORE notes, instead turn them into a USE.

* gcc.dg/pr84875.c: New test.

From-SVN: r262081

7 years agobackport: re PR c/84953 (misleading warning from strpbrk(x,""))
Jakub Jelinek [Mon, 25 Jun 2018 17:35:29 +0000 (19:35 +0200)] 
backport: re PR c/84953 (misleading warning from strpbrk(x,""))

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

PR c/84953
* builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
instead of TREE_TYPE (s1) for the return value.

* gcc.dg/pr84953.c: New test.

From-SVN: r262080

7 years agobackport: re PR target/84899 (ICE: in final_scan_insn_1, at final.c:3139 (error:...
Jakub Jelinek [Mon, 25 Jun 2018 17:34:55 +0000 (19:34 +0200)] 
backport: re PR target/84899 (ICE: in final_scan_insn_1, at final.c:3139 (error: could not split insn))

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

PR target/84899
* postreload.c (reload_combine_recognize_pattern): Perform
INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
truncate_int_for_mode the result for the destination's mode.

* gcc.dg/pr84899.c: New test.

From-SVN: r262079

7 years agobackport: re PR c++/84874 (internal compiler error: in reshape_init_class, at cp...
Jakub Jelinek [Mon, 25 Jun 2018 17:34:18 +0000 (19:34 +0200)] 
backport: re PR c++/84874 (internal compiler error: in reshape_init_class, at cp/decl.c:5800)

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

PR c++/84874
* g++.dg/cpp1z/desig8.C: New test.

From-SVN: r262078

7 years agobackport: re PR c++/84874 (internal compiler error: in reshape_init_class, at cp...
Jakub Jelinek [Mon, 25 Jun 2018 17:33:40 +0000 (19:33 +0200)] 
backport: re PR c++/84874 (internal compiler error: in reshape_init_class, at cp/decl.c:5800)

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

PR c++/84874
* decl.c (reshape_init_class): Don't assert d->cur->index == field
if d->cur->index is a FIELD_DECL, instead set field to d->cur->index.

* g++.dg/cpp1z/desig7.C: New test.

From-SVN: r262077

7 years agobackport: re PR c++/79085 (ICE with placement new to unaligned location)
Jakub Jelinek [Mon, 25 Jun 2018 17:32:55 +0000 (19:32 +0200)] 
backport: re PR c++/79085 (ICE with placement new to unaligned location)

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

PR c++/79085
* calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
check and use address of target always.

* g++.dg/opt/pr79085.C: New test.

From-SVN: r262076

7 years agobackport: re PR c++/84222 ([[deprecated]] class complains about internal class usage)
Jakub Jelinek [Mon, 25 Jun 2018 17:32:10 +0000 (19:32 +0200)] 
backport: re PR c++/84222 ([[deprecated]] class complains about internal class usage)

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

PR c++/84222
* cp-tree.h (cp_warn_deprecated_use): Declare.
* tree.c (cp_warn_deprecated_use): New function.
* typeck2.c (build_functional_cast): Use it.
* decl.c (grokparms): Likewise.
(grokdeclarator): Likewise.  Temporarily push nested class scope
around grokparms call for out of class member definitions.

* g++.dg/warn/deprecated.C (T::member3): Change dg-warning to dg-bogus.
* g++.dg/warn/deprecated-6.C (T::member3): Likewise.
* g++.dg/warn/deprecated-13.C: New test.

From-SVN: r262075

7 years agobackport: re PR target/84772 (powerpc-spe: Spurious "is used uninitialized" warning...
Jakub Jelinek [Mon, 25 Jun 2018 17:31:23 +0000 (19:31 +0200)] 
backport: re PR target/84772 (powerpc-spe: Spurious "is used uninitialized" warning, or possibly incorrect codegen for va_arg(long double))

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

PR target/84772
* config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.

* gcc.dg/pr84772.c: New test.

From-SVN: r262074

7 years agobackport: re PR c++/84076 (Warning about objects through POD mistakenly claims the...
Jakub Jelinek [Mon, 25 Jun 2018 17:30:03 +0000 (19:30 +0200)] 
backport: re PR c++/84076 (Warning about objects through POD mistakenly claims the object is a pointer)

Backported from mainline
2018-03-09  Jason Merrill  <jason@redhat.com>
    Jakub Jelinek  <jakub@redhat.com>

PR c++/84076
* call.c (convert_arg_to_ellipsis): Instead of cp_build_addr_expr
build ADDR_EXPR with REFERENCE_TYPE.
(build_over_call): For purposes of check_function_arguments, if
argarray[j] is ADDR_EXPR with REFERENCE_TYPE created above, use
its operand rather than the argument itself.

* g++.dg/warn/Wformat-2.C: New test.

From-SVN: r262073

7 years agobackport: re PR c++/84767 (ICE with pointer to VLA)
Jakub Jelinek [Mon, 25 Jun 2018 17:29:17 +0000 (19:29 +0200)] 
backport: re PR c++/84767 (ICE with pointer to VLA)

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

PR c++/84767
* tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
decl, use remap_type if we want to use the type.

* g++.dg/ext/vla18.C: New test.

From-SVN: r262072

7 years agobackport: re PR tree-optimization/84739 (ICE in get_value_for_expr, at tree-ssa-ccp...
Jakub Jelinek [Mon, 25 Jun 2018 17:28:32 +0000 (19:28 +0200)] 
backport: re PR tree-optimization/84739 (ICE in get_value_for_expr, at tree-ssa-ccp.c:649)

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

PR tree-optimization/84739
* tree-tailcall.c (find_tail_calls): Check call arguments against
DECL_ARGUMENTS (current_function_decl) rather than
DECL_ARGUMENTS (func) when checking for tail recursion.

* gcc.dg/pr84739.c: New test.

From-SVN: r262071

7 years agobackport: re PR target/84700 (ICE on 32-bit BE powerpc targets w/ -misel -O1)
Jakub Jelinek [Mon, 25 Jun 2018 17:27:47 +0000 (19:27 +0200)] 
backport: re PR target/84700 (ICE on 32-bit BE powerpc targets w/ -misel -O1)

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

PR target/84700
* combine.c (combine_simplify_rtx): Don't try to simplify if
if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
are equal to x.

* gcc.target/powerpc/pr84700.c: New test.

From-SVN: r262070

7 years agobackport: re PR c++/84662 (internal compiler error: tree check: expected class 'type...
Jakub Jelinek [Mon, 25 Jun 2018 17:26:53 +0000 (19:26 +0200)] 
backport: re PR c++/84662 (internal compiler error: tree check: expected class 'type', have 'exceptional' (error_mark) in is_bitfield_expr_with_lowered_type, at cp/typeck.c:1944)

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

PR c++/84662
* pt.c (tsubst_copy_and_build) <case TEMPLATE_ID_EXPR>: Use
RETURN instead of return.
<case POINTER_PLUS_EXPR>: Likewise.
<case CONVERT_EXPR>: If op0 is error_mark_node, just return
it instead of wrapping it into CONVERT_EXPR.

* g++.dg/cpp1y/pr84662.C: New test.

From-SVN: r262069

7 years agobackport: re PR inline-asm/84625 (ICE with empty constraint and vector constant)
Jakub Jelinek [Mon, 25 Jun 2018 17:25:41 +0000 (19:25 +0200)] 
backport: re PR inline-asm/84625 (ICE with empty constraint and vector constant)

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

PR inline-asm/84625
* config/i386/i386.c (ix86_print_operand): Use conditional
output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
zero vector.

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

From-SVN: r262068

7 years agobackport: re PR sanitizer/70875 (ICE in get_ubsan_type_info_for_type with -fsanitize...
Jakub Jelinek [Mon, 25 Jun 2018 17:24:42 +0000 (19:24 +0200)] 
backport: re PR sanitizer/70875 (ICE in get_ubsan_type_info_for_type with -fsanitize=undefined)

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

PR sanitizer/70875
* gcc.dg/ubsan/bounds-3.c: Add -fno-sanitize-recover=bounds to
dg-options and dg-shouldfail "ubsan" directive.

From-SVN: r262067

7 years agobackport: re PR c++/84558 (ICE with invalid constexpr constructor)
Jakub Jelinek [Mon, 25 Jun 2018 17:24:06 +0000 (19:24 +0200)] 
backport: re PR c++/84558 (ICE with invalid constexpr constructor)

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

PR c++/84558
* constexpr.c (cxx_eval_vec_init_1): For reuse, treat NULL eltinit like
a valid constant initializer.  Formatting fixes.

* g++.dg/cpp1y/pr84558.C: New test.

From-SVN: r262066