]> git.ipfire.org Git - thirdparty/gcc.git/log
thirdparty/gcc.git
8 years agoDaily bump.
GCC Administrator [Mon, 26 Jun 2017 00:16:07 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r249634

8 years agoDaily bump.
GCC Administrator [Sun, 25 Jun 2017 00:16:06 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r249629

8 years agoDaily bump.
GCC Administrator [Sat, 24 Jun 2017 00:16:07 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r249616

8 years ago[ARM] Rename FPSCR builtins to correct names
Thomas Preud'homme [Fri, 23 Jun 2017 16:15:56 +0000 (16:15 +0000)] 
[ARM] Rename FPSCR builtins to correct names

2017-06-23  Thomas Preud'homme  <thomas.preudhomme@arm.com>

    Backport from mainline
    2017-05-04  Prakhar Bahuguna  <prakhar.bahuguna@arm.com>

    gcc/
    * gcc/config/arm/arm-builtins.c (arm_init_builtins): Rename
    __builtin_arm_ldfscr to __builtin_arm_get_fpscr, and rename
    __builtin_arm_stfscr to __builtin_arm_set_fpscr.

    gcc/testsuite/
    * gcc.target/arm/fpscr.c: New file.

From-SVN: r249598

8 years agoDaily bump.
GCC Administrator [Fri, 23 Jun 2017 00:16:05 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r249580

8 years agoBackport r248729
Martin Liska [Thu, 22 Jun 2017 11:31:28 +0000 (13:31 +0200)] 
Backport r248729

2017-06-22  Martin Liska  <mliska@suse.cz>

Backport from mainline
2017-05-31  Martin Liska  <mliska@suse.cz>

PR target/79155
* config/i386/cpuid.h: Fix typo in a comment in cpuid.h.

From-SVN: r249538

8 years agoBackport r248647
Martin Liska [Thu, 22 Jun 2017 11:30:56 +0000 (13:30 +0200)] 
Backport r248647

2017-06-22  Martin Liska  <mliska@suse.cz>

Backport from mainline
2017-05-30  Martin Liska  <mliska@suse.cz>

PR other/80909
* auto-profile.c (get_function_decl_from_block): Fix
parenthesis.

From-SVN: r249537

8 years agoBackport r248489
Martin Liska [Thu, 22 Jun 2017 11:30:42 +0000 (13:30 +0200)] 
Backport r248489

2017-06-22  Martin Liska  <mliska@suse.cz>

Backport from mainline
2017-05-26  Martin Liska  <mliska@suse.cz>

PR ipa/80663
* params.def: Bound partial-inlining-entry-probability param.
2017-06-22  Martin Liska  <mliska@suse.cz>

Backport from mainline
2017-05-26  Martin Liska  <mliska@suse.cz>

PR ipa/80663
* g++.dg/ipa/pr80212.C: Remove the test as it does not longer
split at the problematic spot.
* gcc.dg/ipa/pr48195.c: Change 101 to 100 as 101 is no longer
a valid value of the param.

From-SVN: r249536

8 years agoBackport r248089
Martin Liska [Thu, 22 Jun 2017 11:29:22 +0000 (13:29 +0200)] 
Backport r248089

2017-06-22  Martin Liska  <mliska@suse.cz>

Backport from mainline
2017-05-16  Martin Liska  <mliska@suse.cz>

PR ipa/79850.
* ipa-devirt.c (odr_types_equivalent_p): Fix typo.

From-SVN: r249535

8 years agoBackport r248060
Martin Liska [Thu, 22 Jun 2017 11:29:02 +0000 (13:29 +0200)] 
Backport r248060

2017-06-22  Martin Liska  <mliska@suse.cz>

Backport from mainline
2017-05-15  Martin Liska  <mliska@suse.cz>

PR driver/31468
* gcc.c (process_command): Do not allow empty argument of -o option.

From-SVN: r249534

8 years agoBackport r247507
Martin Liska [Thu, 22 Jun 2017 11:28:44 +0000 (13:28 +0200)] 
Backport r247507

2017-06-22  Martin Liska  <mliska@suse.cz>

Backport from mainline
2017-05-02  Martin Liska  <mliska@suse.cz>

* doc/gcov.texi: Add missing preposition.
* gcov.c (function_info::function_info): Properly fill up
all member variables.

From-SVN: r249533

8 years agoBackport r247485
Martin Liska [Thu, 22 Jun 2017 11:28:22 +0000 (13:28 +0200)] 
Backport r247485

2017-06-22  Martin Liska  <mliska@suse.cz>

Backport from mainline
2017-05-02  Martin Liska  <mliska@suse.cz>

PR other/80589
* common.opt: Fix typo.
* doc/invoke.texi: Likewise.

From-SVN: r249532

8 years agoBackport r247377
Martin Liska [Thu, 22 Jun 2017 11:28:05 +0000 (13:28 +0200)] 
Backport r247377

2017-06-22  Martin Liska  <mliska@suse.cz>

Backport from mainline
2017-04-28  Martin Liska  <mliska@suse.cz>

* doc/gcov.texi: Enhance documentation of gcov.

From-SVN: r249531

8 years agoBackport r247376
Martin Liska [Thu, 22 Jun 2017 11:27:50 +0000 (13:27 +0200)] 
Backport r247376

2017-06-22  Martin Liska  <mliska@suse.cz>

Backport from mainline
2017-04-28  Martin Liska  <mliska@suse.cz>

* doc/gcov.texi: Sort options in alphabetic order.
* doc/gcov-dump.texi: Likewise.
* doc/gcov-tool.texi: Likewise.
* gcov.c (print_usage): Likewise.
* gcov-dump.c (print_usage): Likewise.
* gcov-tool.c (print_merge_usage_message): Likewise.
(print_rewrite_usage_message): Likewise.
(print_overlap_usage_message): Likewise.

From-SVN: r249530

8 years agoBackport r247375
Martin Liska [Thu, 22 Jun 2017 11:27:31 +0000 (13:27 +0200)] 
Backport r247375

2017-06-22  Martin Liska  <mliska@suse.cz>

Backport from mainline
2017-04-28  Martin Liska  <mliska@suse.cz>

PR gcov-profile/53915
* gcov.c (format_gcov): Print 'NAN %' when top > bottom.

From-SVN: r249529

8 years agoBackport r247371
Martin Liska [Thu, 22 Jun 2017 11:26:58 +0000 (13:26 +0200)] 
Backport r247371

2017-06-22  Martin Liska  <mliska@suse.cz>

Backport from mainline
2017-04-28  Martin Liska  <mliska@suse.cz>

PR driver/56469
* coverage.c (coverage_remove_note_file): New function.
* coverage.h: Declare the function.
* toplev.c (finalize): Clean if an error has been seen.

From-SVN: r249528

8 years agoDaily bump.
GCC Administrator [Thu, 22 Jun 2017 00:16:07 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r249489

8 years agoDaily bump.
GCC Administrator [Wed, 21 Jun 2017 00:16:11 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r249429

8 years agoDaily bump.
GCC Administrator [Tue, 20 Jun 2017 00:16:10 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r249391

8 years agoDaily bump.
GCC Administrator [Mon, 19 Jun 2017 00:16:11 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r249353

8 years agoDaily bump.
GCC Administrator [Sun, 18 Jun 2017 00:16:12 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r249340

8 years agoDaily bump.
GCC Administrator [Sat, 17 Jun 2017 00:16:07 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r249313

8 years agoFix std::wbuffer_convert::sync()
Jonathan Wakely [Fri, 16 Jun 2017 14:22:30 +0000 (15:22 +0100)] 
Fix std::wbuffer_convert::sync()

* include/bits/locale_conv.h (wbuffer_convert::sync): Fix condition.
* testsuite/22_locale/conversions/buffer/2.cc: New.

From-SVN: r249259

8 years agoBackport libstdc++ doc improvements from mainline
Jonathan Wakely [Fri, 16 Jun 2017 12:55:17 +0000 (13:55 +0100)] 
Backport libstdc++ doc improvements from mainline

* doc/xml/manual/appendix_contributing.xml: Link to the list of bad
names, and link to the test docs and note higher DejaGnu version
requirement.
* doc/xml/manual/allocator.xml: Fix ViewCVS URLs.
* doc/xml/manual/mt_allocator.xml: Likewise.
* doc/html/*: Regenerate.

From-SVN: r249254

8 years agoFix missing return in libstdc++ header
Jonathan Wakely [Fri, 16 Jun 2017 12:55:11 +0000 (13:55 +0100)] 
Fix missing return in libstdc++ header

* include/bits/locale_conv.h (wbuffer_convert::_M_put): Add missing
return statement.

From-SVN: r249253

8 years agoDaily bump.
GCC Administrator [Fri, 16 Jun 2017 00:16:09 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r249230

8 years agoDaily bump.
GCC Administrator [Thu, 15 Jun 2017 00:16:07 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r249209

8 years agoDaily bump.
GCC Administrator [Wed, 14 Jun 2017 00:16:05 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r249176

8 years agoDaily bump.
GCC Administrator [Tue, 13 Jun 2017 00:16:06 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r249139

8 years agoDaily bump.
GCC Administrator [Mon, 12 Jun 2017 00:16:05 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r249107

8 years agoDaily bump.
GCC Administrator [Sun, 11 Jun 2017 00:16:14 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r249099

8 years agoDaily bump.
GCC Administrator [Sat, 10 Jun 2017 00:16:05 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r249084

8 years agobackport: re PR fortran/70601 ([OOP] ICE on procedure pointer component call)
Janus Weil [Fri, 9 Jun 2017 19:23:48 +0000 (21:23 +0200)] 
backport: re PR fortran/70601 ([OOP] ICE on procedure pointer component call)

2017-06-09  Janus Weil  <janus@gcc.gnu.org>

Backport from trunk
PR fortran/70601
* trans-expr.c (gfc_conv_procedure_call): Fix detection of allocatable
function results.

2017-06-09  Janus Weil  <janus@gcc.gnu.org>

Backport from trunk
PR fortran/70601
* gfortran.dg/proc_ptr_comp_50.f90: New test.

From-SVN: r249073

8 years agosparc: Further adjustments for alloca epilogue blockage.
David S. Miller [Fri, 9 Jun 2017 19:21:15 +0000 (19:21 +0000)] 
sparc: Further adjustments for alloca epilogue blockage.

gcc/

PR target/80968
* config/sparc/sparc.c (sparc_flat_expand_epilogue): Don't
        emit frame blockage here.
(sparc_expand_epilogue): Do it here.
* config/sparc/sparc.md (return expander): Emit frame blockage
for alloca here too.

From-SVN: r249072

8 years agoDaily bump.
GCC Administrator [Fri, 9 Jun 2017 00:16:08 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r249042

8 years agore PR c/81006 (ICE with zero-size array and #pragma omp task depend)
Jakub Jelinek [Thu, 8 Jun 2017 19:23:34 +0000 (21:23 +0200)] 
re PR c/81006 (ICE with zero-size array and #pragma omp task depend)

PR c/81006
* c-typeck.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
to sizetype before size_binop.

* semantics.c (handle_omp_array_sections_1): Convert TYPE_MAX_VALUE
to sizetype before size_binop.

* c-c++-common/gomp/pr81006.c: New test.

From-SVN: r249038

8 years agoDaily bump.
GCC Administrator [Thu, 8 Jun 2017 00:16:06 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r249000

8 years agoPR libstdc++/81002 fix std::basic_regex range constructor
Jonathan Wakely [Wed, 7 Jun 2017 17:00:56 +0000 (18:00 +0100)] 
PR libstdc++/81002 fix std::basic_regex range constructor

PR libstdc++/81002
* include/bits/regex_compiler.h (__compile_nfa): Add template argument
list to specify traits type.
* testsuite/28_regex/basic_regex/ctors/basic/iter.cc: New.

From-SVN: r248993

8 years agoDaily bump.
GCC Administrator [Wed, 7 Jun 2017 00:16:06 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r248939

8 years agosparc: Fix stack references in return delay slot.
David S. Miller [Tue, 6 Jun 2017 18:54:55 +0000 (18:54 +0000)] 
sparc: Fix stack references in return delay slot.

gcc/

PR target/80968
* config/sparc/sparc.c (sparc_expand_prologue): Emit frame
blockage if function uses alloca.

gcc/testsuite/

* gcc.target/sparc/sparc-ret-3.c: New test.

From-SVN: r248931

8 years agoDaily bump.
GCC Administrator [Tue, 6 Jun 2017 00:16:05 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r248905

8 years agoDaily bump.
GCC Administrator [Mon, 5 Jun 2017 00:16:05 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r248864

8 years agoDaily bump.
GCC Administrator [Sun, 4 Jun 2017 00:16:04 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r248856

8 years agoDaily bump.
GCC Administrator [Sat, 3 Jun 2017 00:16:06 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r248848

8 years agoDaily bump.
GCC Administrator [Fri, 2 Jun 2017 00:16:08 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r248807

8 years agobackport: rdseedintrin.h (_rdseed16_step, [...]): Uglify argument names and/or local...
Jakub Jelinek [Thu, 1 Jun 2017 21:51:51 +0000 (23:51 +0200)] 
backport: rdseedintrin.h (_rdseed16_step, [...]): Uglify argument names and/or local variable names in inline functions.

Backported from mainline
2016-08-19  Jakub Jelinek  <jakub@redhat.com>

* config/i386/rdseedintrin.h (_rdseed16_step, _rdseed32_step,
_rdseed64_step): Uglify argument names and/or local variable names
in inline functions.
* config/i386/rtmintrin.h (_xabort): Likewise.
* config/i386/avx512vlintrin.h (_mm256_ternarylogic_epi64,
_mm256_mask_ternarylogic_epi64, _mm256_maskz_ternarylogic_epi64,
_mm256_ternarylogic_epi32, _mm256_mask_ternarylogic_epi32,
_mm256_maskz_ternarylogic_epi32, _mm_ternarylogic_epi64,
_mm_mask_ternarylogic_epi64, _mm_maskz_ternarylogic_epi64,
_mm_ternarylogic_epi32, _mm_mask_ternarylogic_epi32,
_mm_maskz_ternarylogic_epi32): Likewise.
* config/i386/lwpintrin.h (__llwpcb, __lwpval32, __lwpval64,
__lwpins32, __lwpins64): Likewise.
* config/i386/avx2intrin.h (_mm_i32gather_pd, _mm_mask_i32gather_pd,
_mm256_i32gather_pd, _mm256_mask_i32gather_pd, _mm_i64gather_pd,
_mm_mask_i64gather_pd, _mm256_i64gather_pd, _mm256_mask_i64gather_pd,
_mm_i32gather_ps, _mm_mask_i32gather_ps, _mm256_i32gather_ps,
_mm256_mask_i32gather_ps, _mm_i64gather_ps, _mm_mask_i64gather_ps,
_mm256_i64gather_ps, _mm256_mask_i64gather_ps, _mm_i32gather_epi64,
_mm_mask_i32gather_epi64, _mm256_i32gather_epi64,
_mm256_mask_i32gather_epi64, _mm_i64gather_epi64,
_mm_mask_i64gather_epi64, _mm256_i64gather_epi64,
_mm256_mask_i64gather_epi64, _mm_i32gather_epi32,
_mm_mask_i32gather_epi32, _mm256_i32gather_epi32,
_mm256_mask_i32gather_epi32, _mm_i64gather_epi32,
_mm_mask_i64gather_epi32, _mm256_i64gather_epi32,
_mm256_mask_i64gather_epi32): Likewise.
* config/i386/pmm_malloc.h (_mm_malloc, _mm_free): Likewise.
* config/i386/ia32intrin.h (__writeeflags): Likewise.
* config/i386/avx512pfintrin.h (_mm512_mask_prefetch_i32gather_pd,
_mm512_mask_prefetch_i32gather_ps, _mm512_mask_prefetch_i64gather_pd,
_mm512_mask_prefetch_i64gather_ps, _mm512_prefetch_i32scatter_pd,
_mm512_prefetch_i32scatter_ps, _mm512_mask_prefetch_i32scatter_pd,
_mm512_mask_prefetch_i32scatter_ps, _mm512_prefetch_i64scatter_pd,
_mm512_prefetch_i64scatter_ps, _mm512_mask_prefetch_i64scatter_pd,
_mm512_mask_prefetch_i64scatter_ps): Likewise.
* config/i386/gmm_malloc.h (_mm_malloc, _mm_free): Likewise.
* config/i386/avx512fintrin.h (_mm512_ternarylogic_epi64,
_mm512_mask_ternarylogic_epi64, _mm512_maskz_ternarylogic_epi64,
_mm512_ternarylogic_epi32, _mm512_mask_ternarylogic_epi32,
_mm512_maskz_ternarylogic_epi32, _mm512_i32gather_ps,
_mm512_mask_i32gather_ps, _mm512_i32gather_pd, _mm512_i64gather_ps,
_mm512_i64gather_pd, _mm512_i32gather_epi32, _mm512_i32gather_epi64,
_mm512_i64gather_epi32, _mm512_i64gather_epi64): Likewise.

From-SVN: r248804

8 years agoDaily bump.
GCC Administrator [Thu, 1 Jun 2017 00:16:04 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r248767

8 years agoDaily bump.
GCC Administrator [Wed, 31 May 2017 00:16:04 +0000 (00:16 +0000)] 
Daily bump.

From-SVN: r248716

8 years agogcc: xtensa: fix fprintf format specifiers
Max Filippov [Tue, 30 May 2017 23:42:48 +0000 (23:42 +0000)] 
gcc: xtensa: fix fprintf format specifiers

HOST_WIDE_INT may not be long as assumed in print_operand and
xtensa_emit_call. Use HOST_WIDE_INT_PRINT_DEC/HOST_WIDE_INT_PRINT_HEX
format strings instead of %ld/0x%lx. This fixes incorrect assembly code
generation by the compiler running on armhf host.

2017-05-30  Max Filippov  <jcmvbkbc@gmail.com>
gcc/
Backport from mainline
2017-05-29  Max Filippov  <jcmvbkbc@gmail.com>

* config/xtensa/xtensa.c (xtensa_emit_call): Use
HOST_WIDE_INT_PRINT_HEX instead of 0x%lx format string.
(print_operand): Use HOST_WIDE_INT_PRINT_DEC instead of %ld
format string.

From-SVN: r248709

8 years agoxtensa: Fix PR target/78603
Max Filippov [Tue, 30 May 2017 23:41:58 +0000 (23:41 +0000)] 
xtensa: Fix PR target/78603

2017-05-30  Max Filippov  <jcmvbkbc@gmail.com>
gcc/
Backport from mainline
2016-11-29  Max Filippov  <jcmvbkbc@gmail.com>

* config/xtensa/xtensa.c (hwloop_optimize): Don't emit zero
overhead loop start between a call and its CALL_ARG_LOCATION
note.

From-SVN: r248708

8 years agoxtensa: don't use unwind-dw2-fde-dip with elf targets
Max Filippov [Tue, 30 May 2017 23:40:34 +0000 (23:40 +0000)] 
xtensa: don't use unwind-dw2-fde-dip with elf targets

Define LIB2ADDEH_XTENSA_UNWIND_DW2_FDE to unwind-dw2-fde.c in
xtensa/t-elf and to unwind-dw2-fde-dip.c in xtensa/t-linux and use
LIB2ADDEH_XTENSA_UNWIND_DW2_FDE in LIB2ADDEH definition.

This fixes build for elf target with windowed xtensa core that currently
breaks with the following error message:

  unwind-dw2-fde-dip.c:36:40: fatal error: elf.h: No such file or directory

2017-05-30  Max Filippov  <jcmvbkbc@gmail.com>
libgcc/
Backport from mainline
2016-10-18  Max Filippov  <jcmvbkbc@gmail.com>

* config/xtensa/t-elf (LIB2ADDEH_XTENSA_UNWIND_DW2_FDE): New
definition.
* config/xtensa/t-linux (LIB2ADDEH_XTENSA_UNWIND_DW2_FDE): New
definition.
* config/xtensa/t-windowed (LIB2ADDEH): Use
LIB2ADDEH_XTENSA_UNWIND_DW2_FDE defined by either xtensa/t-elf
or xtensa/t-linux.

From-SVN: r248707

8 years agoxtensa: fix libgcc build with --text-section-literals
Max Filippov [Tue, 30 May 2017 23:39:41 +0000 (23:39 +0000)] 
xtensa: fix libgcc build with --text-section-literals

Functions __muldf3_aux, __divdf3_aux, __mulsf3_aux and __divsf3_aux
don't start with leaf_entry, so they need explicit .literal_position,
otherwise libgcc build fails in the presence of --text-section-literals.

2017-05-30  Max Filippov  <jcmvbkbc@gmail.com>
libgcc/
Backport from mainline
2016-02-17  Max Filippov  <jcmvbkbc@gmail.com>

* config/xtensa/ieee754-df.S (__muldf3_aux, __divdf3_aux): Add
.literal_position before the function.
* config/xtensa/ieee754-sf.S (__mulsf3_aux, __divsf3_aux):
Likewise.

From-SVN: r248706

8 years agoxtensa: fix xtensa_fallback_frame_state for call0 ABI
Max Filippov [Tue, 30 May 2017 23:38:45 +0000 (23:38 +0000)] 
xtensa: fix xtensa_fallback_frame_state for call0 ABI

2017-05-30  Max Filippov  <jcmvbkbc@gmail.com>
gcc/
Backport from mainline
2015-09-15  Max Filippov  <jcmvbkbc@gmail.com>

* config/xtensa/xtensa.h (DWARF_ALT_FRAME_RETURN_COLUMN): New
definition.
(DWARF_FRAME_REGISTERS): Reserve space for one extra register in
call0 ABI.

libgcc/
Backport from mainline
2015-09-15  Max Filippov  <jcmvbkbc@gmail.com>

* config/xtensa/linux-unwind.h (xtensa_fallback_frame_state):
Add support for call0 ABI.

From-SVN: r248705

8 years agoxtensa: fix TLS calls for call0 ABI
Max Filippov [Tue, 30 May 2017 23:37:42 +0000 (23:37 +0000)] 
xtensa: fix TLS calls for call0 ABI

2017-05-30  Max Filippov  <jcmvbkbc@gmail.com>
gcc/
Backport from mainline
2015-09-15  Max Filippov  <jcmvbkbc@gmail.com>

* config/xtensa/xtensa.c (xtensa_call_tls_desc): Use a10 or a2
to pass TLS call argument, according to current ABI.
* config/xtensa/xtensa.md (tls_call pattern): Use callx8 or
callx0 for TLS call, according to current ABI.

From-SVN: r248704

8 years agoxtensa: fix _Unwind_GetCFA
Max Filippov [Tue, 30 May 2017 23:32:21 +0000 (23:32 +0000)] 
xtensa: fix _Unwind_GetCFA

Returning context->cfa in _Unwind_GetCFA makes CFA point one stack frame
higher than what was actually used by code at context->ra. This results
in invalid CFA value in signal frames and premature unwinding completion
in forced unwinding used by uClibc NPTL thread cancellation.
Returning context->sp from _Unwind_GetCFA makes all CFA values valid and
matching code that used them.

2017-05-30  Max Filippov  <jcmvbkbc@gmail.com>
libgcc/
Backport from mainline
2015-08-18  Max Filippov  <jcmvbkbc@gmail.com>

* config/xtensa/unwind-dw2-xtensa.c (_Unwind_GetCFA): Return
context->sp instead of context->cfa.

From-SVN: r248703

8 years agoxtensa: use unwind-dw2-fde-dip instead of unwind-dw2-fde
Max Filippov [Tue, 30 May 2017 23:31:36 +0000 (23:31 +0000)] 
xtensa: use unwind-dw2-fde-dip instead of unwind-dw2-fde

This allows having exception cleanup code in binaries that don't
register their unwind tables.

2017-05-30  Max Filippov  <jcmvbkbc@gmail.com>
libgcc/
Backport from mainline
2015-08-18  Max Filippov  <jcmvbkbc@gmail.com>

* config/xtensa/t-windowed (LIB2ADDEH): Replace unwind-dw2-fde
with unwind-dw2-fde-dip.

From-SVN: r248702

8 years agobackport: Makefile.in (s-options): Invoke opt-gather.awk with LC_ALL=C in the environ...
Jakub Jelinek [Tue, 30 May 2017 08:27:04 +0000 (10:27 +0200)] 
backport: Makefile.in (s-options): Invoke opt-gather.awk with LC_ALL=C in the environment.

Backported from mainline
2017-04-25  Jakub Jelinek  <jakub@redhat.com>

* Makefile.in (s-options): Invoke opt-gather.awk with LC_ALL=C in the
environment.

From-SVN: r248673

8 years agobackport: re PR rtl-optimization/80385 (Segfault in commutative_operand_precedence...
Jakub Jelinek [Tue, 30 May 2017 08:26:33 +0000 (10:26 +0200)] 
backport: re PR rtl-optimization/80385 (Segfault in commutative_operand_precedence() rtlanal.c:3373)

Backported from mainline
2017-04-11  Jakub Jelinek  <jakub@redhat.com>

PR rtl-optimization/80385
* simplify-rtx.c (simplify_unary_operation_1): Don't transform
(not (neg X)) into (plus X -1) for complex or non-integral modes.

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

From-SVN: r248672

8 years agobackport: re PR libgomp/80394 (Empty OpenMP task is wrongly removed when optimizing)
Jakub Jelinek [Tue, 30 May 2017 08:25:50 +0000 (10:25 +0200)] 
backport: re PR libgomp/80394 (Empty OpenMP task is wrongly removed when optimizing)

Backported from mainline
2017-04-11  Jakub Jelinek  <jakub@redhat.com>

PR libgomp/80394
* omp-low.c (scan_omp_task): Don't optimize away empty tasks
if they have any depend clauses.

* testsuite/libgomp.c/pr80394.c: New test.

From-SVN: r248671

8 years agobackport: re PR c++/80363 (#'vec_cond_expr' not supported by dump_expr#<expression...
Jakub Jelinek [Tue, 30 May 2017 08:25:10 +0000 (10:25 +0200)] 
backport: re PR c++/80363 (#'vec_cond_expr' not supported by dump_expr#<expression error>)

Backported from mainline
2017-04-11  Jakub Jelinek  <jakub@redhat.com>

PR c++/80363
* error.c (dump_expr): Handle VEC_COND_EXPR like COND_EXPR.

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

From-SVN: r248670

8 years agobackport: re PR c++/80176 (cannot bind reference to static member function using...
Jakub Jelinek [Tue, 30 May 2017 08:24:21 +0000 (10:24 +0200)] 
backport: re PR c++/80176 (cannot bind reference to static member function using object access expression)

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

PR c++/80176
* tree.c (lvalue_kind): For COMPONENT_REF with BASELINK second
operand, if it is a static member function, recurse on the
BASELINK.

* g++.dg/init/ref23.C: New test.

From-SVN: r248669

8 years agobackport: re PR target/80286 (AVX2 _mm_cvtsi128_si32 doesn't return a proper 32bits...
Jakub Jelinek [Tue, 30 May 2017 08:23:29 +0000 (10:23 +0200)] 
backport: re PR target/80286 (AVX2 _mm_cvtsi128_si32 doesn't return a proper 32bits int)

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

PR target/80286
* config/i386/i386.c (ix86_expand_args_builtin): If op has scalar
int mode, convert_modes it to mode as unsigned, otherwise use
lowpart_subreg to mode rather than SImode.
* config/i386/sse.md (<mask_codefor>ashr<mode>3<mask_name>,
ashr<mode>3, ashr<mode>3<mask_name>, <shift_insn><mode>3<mask_name>):
Use DImode instead of SImode for the shift count operand.
* config/i386/mmx.md (mmx_ashr<mode>3, mmx_<shift_insn><mode>3):
Likewise.

* gcc.target/i386/avx-pr80286.c: New test.
* gcc.dg/pr80286.c: New test.

From-SVN: r248668

8 years agobackport: re PR debug/80025 (ICE w/ -O2 (-O3, -Ofast) -g -ftracer (infinite recursion...
Jakub Jelinek [Tue, 30 May 2017 08:22:41 +0000 (10:22 +0200)] 
backport: re PR debug/80025 (ICE w/ -O2 (-O3, -Ofast) -g -ftracer (infinite recursion in rtx_equal_for_cselib_1))

Backported from mainline
2017-03-31  Jakub Jelinek  <jakub@redhat.com>

PR debug/80025
* cselib.c (cselib_hasher::equal): Pass 0 to rtx_equal_for_cselib_1.
(rtx_equal_for_cselib_1): Add depth argument.  If depth
is 128, don't look up VALUE locs and punt.  Increment
depth in recursive calls when walking VALUE locs.

* gcc.dg/torture/pr80025.c: New test.

From-SVN: r248667

8 years agobackport: env.c (initialize_env): Initialize stacksize to 0.
Jakub Jelinek [Tue, 30 May 2017 08:21:17 +0000 (10:21 +0200)] 
backport: env.c (initialize_env): Initialize stacksize to 0.

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

* env.c (initialize_env): Initialize stacksize to 0.

From-SVN: r248666

8 years agobackport: re PR sanitizer/80168 (ICE in make_decl_rtl, at varasm.c:1311 w/ VLA and...
Jakub Jelinek [Tue, 30 May 2017 08:20:45 +0000 (10:20 +0200)] 
backport: re PR sanitizer/80168 (ICE in make_decl_rtl, at varasm.c:1311 w/ VLA and -fsanitize=address)

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

PR sanitizer/80168
* asan.c (instrument_derefs): Copy over last operand from
original COMPONENT_REF to the new COMPONENT_REF with
DECL_BIT_FIELD_REPRESENTATIVE.
* ubsan.c (instrument_object_size): Likewise.

* gcc.dg/asan/pr80168.c: New test.

From-SVN: r248665

8 years agobackport: re PR rtl-optimization/80112 (ICE in doloop_condition_get at loop-doloop...
Jakub Jelinek [Tue, 30 May 2017 08:20:03 +0000 (10:20 +0200)] 
backport: re PR rtl-optimization/80112 (ICE in doloop_condition_get at loop-doloop.c:158)

Backported from mainline
2017-03-24  Jakub Jelinek  <jakub@redhat.com>

PR rtl-optimization/80112
* loop-doloop.c (doloop_condition_get): Don't check condition
if cmp isn't SET with IF_THEN_ELSE src.

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

From-SVN: r248664

8 years agobackport: re PR c++/80141 (ICE with pragma omp declare)
Jakub Jelinek [Tue, 30 May 2017 08:17:54 +0000 (10:17 +0200)] 
backport: re PR c++/80141 (ICE with pragma omp declare)

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

PR c++/80141
* semantics.c (finish_omp_clause) <case OMP_CLAUSE_SIMDLEN,
case OMP_CLAUSE_ALIGNED>: Call maybe_constant_value only when not
processing_template_decl.

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

From-SVN: r248663

8 years agobackport: re PR c++/80129 (wrong code with ternary struct assignment to const)
Jakub Jelinek [Tue, 30 May 2017 08:17:18 +0000 (10:17 +0200)] 
backport: re PR c++/80129 (wrong code with ternary struct assignment to const)

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

PR c++/80129
* gimplify.c (gimplify_modify_expr_rhs) <case COND_EXPR>: Clear
TREE_READONLY on result if writing it more than once.

* g++.dg/torture/pr80129.C: New test.

From-SVN: r248662

8 years agobackport: re PR c/80097 (internal compiler error in c_fully_fold_internal with std...
Jakub Jelinek [Tue, 30 May 2017 08:16:31 +0000 (10:16 +0200)] 
backport: re PR c/80097 (internal compiler error in c_fully_fold_internal with std=c89 and -fsanitize=float-divide-by-zero)

Backported from mainline
2017-03-21  Jakub Jelinek  <jakub@redhat.com>

PR c/80097
* c-typeck.c (build_binary_op): Add EXCESS_PRECISION_EXPR only around
optional COMPOUND_EXPR with ubsan instrumentation.

* gcc.dg/ubsan/pr80097.c: New test.

From-SVN: r248661

8 years agobackport: re PR c++/79896 (ICE in gimplify_expr, at gimplify.c:11950 on non-int128...
Jakub Jelinek [Tue, 30 May 2017 08:15:55 +0000 (10:15 +0200)] 
backport: re PR c++/79896 (ICE in gimplify_expr, at gimplify.c:11950 on non-int128 target)

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

PR c++/79896
* decl.c (finish_enum_value_list): If value is error_mark_node,
don't copy it and change its type.
* init.c (constant_value_1): Return error_mark_node if DECL_INITIAL
of CONST_DECL is error_mark_node.

* g++.dg/ext/int128-5.C: New test.

From-SVN: r248660

8 years agobackport: re PR c++/79896 (ICE in gimplify_expr, at gimplify.c:11950 on non-int128...
Jakub Jelinek [Tue, 30 May 2017 08:15:05 +0000 (10:15 +0200)] 
backport: re PR c++/79896 (ICE in gimplify_expr, at gimplify.c:11950 on non-int128 target)

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

PR c++/79896
* decl.c (finish_enum_value_list): If value is error_mark_node,
don't copy it and change its type.
* init.c (constant_value_1): Return error_mark_node if DECL_INITIAL
of CONST_DECL is error_mark_node.

* g++.dg/ext/int128-5.C: New test.

From-SVN: r248659

8 years agobackport: re PR sanitizer/79944 (asan: incorrect instrumentation of atomic operations)
Jakub Jelinek [Tue, 30 May 2017 08:13:33 +0000 (10:13 +0200)] 
backport: re PR sanitizer/79944 (asan: incorrect instrumentation of atomic operations)

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

PR sanitizer/79944
* asan.c (get_mem_refs_of_builtin_call): For BUILT_IN_ATOMIC* and
BUILT_IN_SYNC*, determine the access type from the size suffix and
always build a MEM_REF with that type.  Handle forgotten
BUILT_IN_SYNC_FETCH_AND_NAND_16 and BUILT_IN_SYNC_NAND_AND_FETCH_16.

* c-c++-common/asan/pr79944.c: New test.

From-SVN: r248658

8 years agobackport: re PR target/79932 (_mm512_packus_epi32 does not compile under -O0)
Jakub Jelinek [Tue, 30 May 2017 08:09:40 +0000 (10:09 +0200)] 
backport: re PR target/79932 (_mm512_packus_epi32 does not compile under -O0)

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

PR target/79932
* config/i386/avx512vlintrin.h (_mm256_cmpge_epi32_mask,
_mm256_cmpge_epi64_mask, _mm256_cmpge_epu32_mask,
_mm256_cmpge_epu64_mask, _mm256_cmple_epi32_mask,
_mm256_cmple_epi64_mask, _mm256_cmple_epu32_mask,
_mm256_cmple_epu64_mask, _mm256_cmplt_epi32_mask,
_mm256_cmplt_epi64_mask, _mm256_cmplt_epu32_mask,
_mm256_cmplt_epu64_mask, _mm256_cmpneq_epi32_mask,
_mm256_cmpneq_epi64_mask, _mm256_cmpneq_epu32_mask,
_mm256_cmpneq_epu64_mask, _mm256_mask_cmpge_epi32_mask,
_mm256_mask_cmpge_epi64_mask, _mm256_mask_cmpge_epu32_mask,
_mm256_mask_cmpge_epu64_mask, _mm256_mask_cmple_epi32_mask,
_mm256_mask_cmple_epi64_mask, _mm256_mask_cmple_epu32_mask,
_mm256_mask_cmple_epu64_mask, _mm256_mask_cmplt_epi32_mask,
_mm256_mask_cmplt_epi64_mask, _mm256_mask_cmplt_epu32_mask,
_mm256_mask_cmplt_epu64_mask, _mm256_mask_cmpneq_epi32_mask,
_mm256_mask_cmpneq_epi64_mask, _mm256_mask_cmpneq_epu32_mask,
_mm256_mask_cmpneq_epu64_mask, _mm_cmpge_epi32_mask,
_mm_cmpge_epi64_mask, _mm_cmpge_epu32_mask, _mm_cmpge_epu64_mask,
_mm_cmple_epi32_mask, _mm_cmple_epi64_mask, _mm_cmple_epu32_mask,
_mm_cmple_epu64_mask, _mm_cmplt_epi32_mask, _mm_cmplt_epi64_mask,
_mm_cmplt_epu32_mask, _mm_cmplt_epu64_mask, _mm_cmpneq_epi32_mask,
_mm_cmpneq_epi64_mask, _mm_cmpneq_epu32_mask, _mm_cmpneq_epu64_mask,
_mm_mask_cmpge_epi32_mask, _mm_mask_cmpge_epi64_mask,
_mm_mask_cmpge_epu32_mask, _mm_mask_cmpge_epu64_mask,
_mm_mask_cmple_epi32_mask, _mm_mask_cmple_epi64_mask,
_mm_mask_cmple_epu32_mask, _mm_mask_cmple_epu64_mask,
_mm_mask_cmplt_epi32_mask, _mm_mask_cmplt_epi64_mask,
_mm_mask_cmplt_epu32_mask, _mm_mask_cmplt_epu64_mask,
_mm_mask_cmpneq_epi32_mask, _mm_mask_cmpneq_epi64_mask,
_mm_mask_cmpneq_epu32_mask, _mm_mask_cmpneq_epu64_mask): Move
definitions outside of __OPTIMIZE__ guarded section.

* gcc.target/i386/pr79932-2.c: New test.

From-SVN: r248657

8 years agobackport: re PR target/79932 (_mm512_packus_epi32 does not compile under -O0)
Jakub Jelinek [Tue, 30 May 2017 08:08:59 +0000 (10:08 +0200)] 
backport: re PR target/79932 (_mm512_packus_epi32 does not compile under -O0)

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

PR target/79932
* config/i386/avx512bwintrin.h (_mm512_packs_epi32,
_mm512_maskz_packs_epi32, _mm512_mask_packs_epi32,
_mm512_packus_epi32, _mm512_maskz_packus_epi32,
_mm512_mask_packus_epi32): Move definitions outside of __OPTIMIZE__
guarded section.

* gcc.target/i386/pr79932-1.c: New test.

From-SVN: r248656

8 years agobackport: re PR rtl-optimization/79901 (ICE in prepare_cmp_insn, at optabs.c:3904)
Jakub Jelinek [Tue, 30 May 2017 08:08:24 +0000 (10:08 +0200)] 
backport: re PR rtl-optimization/79901 (ICE in prepare_cmp_insn, at optabs.c:3904)

Backported from mainline
2017-03-07  Jakub Jelinek  <jakub@redhat.com>

PR rtl-optimization/79901
* config/i386/sse.md (*avx512bw_<code><mode>3<mask_name>): Renamed to
...
(*avx512f_<code><mode>3<mask_name>): ... this.
(<code><mode>3 with maxmin code iterator): Use VI8_AVX2_AVX512F
iterator instead of VI8_AVX2_AVX512BW.

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

From-SVN: r248655

8 years agobackport: re PR rtl-optimization/79901 (ICE in prepare_cmp_insn, at optabs.c:3904)
Jakub Jelinek [Tue, 30 May 2017 08:07:30 +0000 (10:07 +0200)] 
backport: re PR rtl-optimization/79901 (ICE in prepare_cmp_insn, at optabs.c:3904)

Backported from mainline
2017-03-07  Jakub Jelinek  <jakub@redhat.com>

PR rtl-optimization/79901
* expr.c (expand_expr_real_2): For vector MIN/MAX, if there is no
min/max expander, expand it using expand_vec_cond_expr.

From-SVN: r248654

8 years agobackport: re PR target/79807 (ICE in extract_insn, at recog.c:2311 (error: unrecogniz...
Jakub Jelinek [Tue, 30 May 2017 08:07:03 +0000 (10:07 +0200)] 
backport: re PR target/79807 (ICE in extract_insn, at recog.c:2311 (error: unrecognizable insn))

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

PR target/79807
* config/i386/i386.c (ix86_expand_multi_arg_builtin): If target
is a memory operand, increase num_memory.
(ix86_expand_args_builtin): Likewise.

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

From-SVN: r248653

8 years agobackport: re PR target/79729 (ICE in ix86_print_operand, at config/i386/i386.c:18231)
Jakub Jelinek [Tue, 30 May 2017 08:06:28 +0000 (10:06 +0200)] 
backport: re PR target/79729 (ICE in ix86_print_operand, at config/i386/i386.c:18231)

Backported from mainline
2017-02-28  Jakub Jelinek  <jakub@redhat.com>

PR target/79729
* config/i386/i386.c (ix86_print_operand) <case 'R'>: Replace
gcc_unreachable with output_operand_lossage.

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

From-SVN: r248652

8 years agobackport: re PR middle-end/79396 (ICE (verify_flow_info failed) with -fnon-call-excep...
Jakub Jelinek [Tue, 30 May 2017 08:05:47 +0000 (10:05 +0200)] 
backport: re PR middle-end/79396 (ICE (verify_flow_info failed) with -fnon-call-exceptions -O2 -march=haswell)

Backported from mainline
2017-02-25  Jakub Jelinek  <jakub@redhat.com>

PR middle-end/79396
* tree-eh.c (operation_could_trap_p, stmt_could_throw_1_p): Handle
FMA_EXPR like tcc_binary or tcc_unary.

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

From-SVN: r248651

8 years agobackport: re PR c++/79664 (ICE with #pragma omp parallel in constexpr function)
Jakub Jelinek [Tue, 30 May 2017 08:04:55 +0000 (10:04 +0200)] 
backport: re PR c++/79664 (ICE with #pragma omp parallel in constexpr function)

Backported from mainline
2017-02-22  Jakub Jelinek  <jakub@redhat.com>

PR c++/79664
* parser.c (cp_parser_omp_teams, cp_parser_omp_target): Use
SET_EXPR_LOCATION on OMP_TARGET/OMP_TEAMS tree.
* constexpr.c (potential_constant_expression_1): Handle
OMP_*, OACC_* and CILK_* trees.

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

From-SVN: r248650

8 years agobackport: re PR target/79570 (ICE in sel-sched-ir.c:4534 in pr69956.c)
Jakub Jelinek [Tue, 30 May 2017 08:03:03 +0000 (10:03 +0200)] 
backport: re PR target/79570 (ICE in sel-sched-ir.c:4534 in pr69956.c)

Backported from mainline
2017-02-21  Jakub Jelinek  <jakub@redhat.com>

PR target/79570
* sel-sched.c (moveup_expr_cached): Don't call sel_bb_head
on temporarily removed DEBUG_INSNs.

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

From-SVN: r248649

8 years agobackport: re PR c++/79641 (ICE with const variable and attribute)
Jakub Jelinek [Tue, 30 May 2017 08:02:18 +0000 (10:02 +0200)] 
backport: re PR c++/79641 (ICE with const variable and attribute)

Backported from mainline
2017-02-21  Jakub Jelinek  <jakub@redhat.com>

PR c++/79641
* c-common.c (handle_mode_attribute): Use build_qualified_type to
preserve quals.

* c-c++-common/pr79641.c: New test.

From-SVN: r248648

8 years agobackport: re PR target/79494 (ICE in maybe_record_trace_start, at dwarf2cfi.c:2330)
Jakub Jelinek [Tue, 30 May 2017 08:01:31 +0000 (10:01 +0200)] 
backport: re PR target/79494 (ICE in maybe_record_trace_start, at dwarf2cfi.c:2330)

Backported from mainline
2017-02-21  Jakub Jelinek  <jakub@redhat.com>

PR target/79494
* config/i386/i386.c (ix86_expand_split_stack_prologue): Call
make_reg_eh_region_note_nothrow_nononlocal on call_insn.

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

From-SVN: r248646

8 years agobackport: re PR target/79568 (ICE in extract_insn, at recog.c:2311 for pr70325.c...
Jakub Jelinek [Tue, 30 May 2017 08:00:48 +0000 (10:00 +0200)] 
backport: re PR target/79568 (ICE in extract_insn, at recog.c:2311 for pr70325.c (with -mavx512bw))

Backported from mainline
2017-02-20  Jakub Jelinek  <jakub@redhat.com>

PR target/79568
* config/i386/i386.c (ix86_expand_builtin): Handle
OPTION_MASK_ISA_AVX512VL and OPTION_MASK_ISA_64BIT in
ix86_builtins_isa[fcode].isa as a requirement of those
flags and any other flag in the bitmask.
(ix86_init_mmx_sse_builtins): Use 0 instead of
~OPTION_MASK_ISA_64BIT as mask.
* config/i386/i386-builtin.def (bdesc_special_args,
bdesc_args): Likewise.

* gcc.target/i386/pr79568-1.c: New test.
* gcc.target/i386/pr79568-2.c: New test.
* gcc.target/i386/pr79568-3.c: New test.

From-SVN: r248645

8 years agobackport: re PR target/79559 (ICE in ix86_print_operand, at config/i386/i386.c:18189)
Jakub Jelinek [Tue, 30 May 2017 07:59:29 +0000 (09:59 +0200)] 
backport: re PR target/79559 (ICE in ix86_print_operand, at config/i386/i386.c:18189)

Backported from mainline
2017-02-18  Jakub Jelinek  <jakub@redhat.com>

PR target/79559
* config/i386/i386.c (ix86_print_operand): Use output_operand_lossage
instead of gcc_assert for K, r and R code checks.  Formatting fixes.

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

From-SVN: r248644

8 years agobackport: re PR c++/79512 (ICE: Segfault in gimple_build_call_1, at gimple.c:218)
Jakub Jelinek [Tue, 30 May 2017 07:58:55 +0000 (09:58 +0200)] 
backport: re PR c++/79512 (ICE: Segfault in gimple_build_call_1, at gimple.c:218)

Backported from mainline
2017-02-16  Jakub Jelinek  <jakub@redhat.com>

PR c++/79512
* c-parser.c (c_parser_omp_target): For -fopenmp-simd
ignore #pragma omp target even when not followed by identifier.

* parser.c (cp_parser_omp_target): For -fopenmp-simd
ignore #pragma omp target even when not followed by identifier.

* c-c++-common/gomp/pr79512.c: New test.

From-SVN: r248643

8 years agobackport: re PR tree-optimization/79411 (ICE: SSA corruption (fail_abnormal_edge_coal...
Jakub Jelinek [Tue, 30 May 2017 07:58:01 +0000 (09:58 +0200)] 
backport: re PR tree-optimization/79411 (ICE: SSA corruption (fail_abnormal_edge_coalesce))

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

PR tree-optimization/79411
* tree-ssa-reassoc.c (is_reassociable_op): Return false if
stmt operands are SSA_NAMEs used in abnormal phis.
(can_reassociate_p): Return false if op is SSA_NAME used in abnormal
phis.

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

From-SVN: r248642

8 years agobackport: re PR middle-end/79399 (GCC fails to compile big source at -O0)
Jakub Jelinek [Tue, 30 May 2017 07:57:10 +0000 (09:57 +0200)] 
backport: re PR middle-end/79399 (GCC fails to compile big source at -O0)

Backported from mainline
2017-02-07  Jakub Jelinek  <jakub@redhat.com>
    Richard Biener  <rguenther@suse.de>

PR middle-end/79399
* ira-int.h (struct target_ira_int): Change x_max_struct_costs_size
type from int to size_t.
* ira-costs.c (struct_costs_size): Change type from int to size_t.

From-SVN: r248641

8 years agobackport: re PR target/79197 (ICE in extract_insn in gcc/recog.c:2311)
Jakub Jelinek [Tue, 30 May 2017 07:56:11 +0000 (09:56 +0200)] 
backport: re PR target/79197 (ICE in extract_insn in gcc/recog.c:2311)

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

PR target/79197
* config/rs6000/rs6000.md (*fixuns_trunc<mode>di2_fctiduz): Rename to ...
(fixuns_trunc<mode>di2): ... this, remove previous expander.  Put all
conditions on a single line.

* gcc.target/powerpc/pr79197.c: New test.
* gcc.c-torture/compile/pr79197.c: New test.

From-SVN: r248640

8 years agobackport: re PR c++/78341 (ICE on invalid C++ code on x86_64-linux-gnu (internal...
Jakub Jelinek [Tue, 30 May 2017 07:55:06 +0000 (09:55 +0200)] 
backport: re PR c++/78341 (ICE on invalid C++ code on x86_64-linux-gnu  (internal compiler error: in cp_parser_std_attribute_spec, at cp/parser.c:24597))

Backported from mainline
2017-01-11  Jakub Jelinek  <jakub@redhat.com>

PR c++/78341
* parser.c (cp_parser_std_attribute_spec): Remove over-eager
assertion.  Formatting fix.

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

From-SVN: r248639

8 years agobackport: re PR middle-end/50199 (wrong code with -flto -fno-merge-constants)
Jakub Jelinek [Tue, 30 May 2017 07:54:21 +0000 (09:54 +0200)] 
backport: re PR middle-end/50199 (wrong code with -flto -fno-merge-constants)

Backported from mainline
2017-01-11  Jakub Jelinek  <jakub@redhat.com>

PR middle-end/50199
* lto-lang.c (lto_post_options): Force flag_merge_constants = 1
if it was 0.

* gcc.dg/lto/pr50199_0.c: New test.

From-SVN: r248638

8 years agobackport: re PR c++/78949 (incorrect "unused variable" warning with SSE2)
Jakub Jelinek [Tue, 30 May 2017 07:53:35 +0000 (09:53 +0200)] 
backport: re PR c++/78949 (incorrect "unused variable" warning with SSE2)

Backported from mainline
2017-01-04  Jakub Jelinek  <jakub@redhat.com>

PR c++/78949
* typeck.c (cp_build_unary_op): Call mark_rvalue_use on arg if it has
vector type.

* c-c++-common/Wunused-var-16.c: New test.

From-SVN: r248637

8 years agobackport: re PR fortran/78866 (ICE in gimplify_adjust_omp_clauses_1, at gimplify...
Jakub Jelinek [Tue, 30 May 2017 07:52:55 +0000 (09:52 +0200)] 
backport: re PR fortran/78866 (ICE in gimplify_adjust_omp_clauses_1, at gimplify.c:8721)

Backported from mainline
2016-12-21  Jakub Jelinek  <jakub@redhat.com>

PR fortran/78866
* openmp.c (resolve_omp_clauses): Diagnose assumed size arrays in
OpenMP map, to and from clauses.
* trans-openmp.c: Include diagnostic-core.h, temporarily redefining
GCC_DIAG_STYLE to __gcc_tdiag__.
(gfc_omp_finish_clause): Diagnose implicitly mapped assumed size
arrays.

* gfortran.dg/gomp/map-1.f90: Add expected error.
* gfortran.dg/gomp/pr78866-1.f90: New test.
* gfortran.dg/gomp/pr78866-2.f90: New test.

From-SVN: r248636

8 years agobackport: re PR c/77767 (Side-effect from VLA array parameters lost)
Jakub Jelinek [Tue, 30 May 2017 07:51:58 +0000 (09:51 +0200)] 
backport: re PR c/77767 (Side-effect from VLA array parameters lost)

Backported from mainline
2016-12-21  Jakub Jelinek  <jakub@redhat.com>

PR c/77767
* c-decl.c (grokdeclarator): If *expr is non-NULL, append expression
to *expr instead of overwriting it.

* gcc.c-torture/execute/pr77767.c: New test.

From-SVN: r248635

8 years agobackport: re PR ipa/77905 (ICE at -Os and above in both 32-bit and 64-bit modes on...
Jakub Jelinek [Tue, 30 May 2017 07:51:12 +0000 (09:51 +0200)] 
backport: re PR ipa/77905 (ICE at -Os and above in both 32-bit and 64-bit modes on x86_64-linux-gnu (internal compiler error: in ipa_comdats, at ipa-comdats.c:352))

Backported from mainline
2016-12-13  Jakub Jelinek  <jakub@redhat.com>

PR ipa/77905
* ipa-pure-const.c (cdtor_p): Return true for
DECL_STATIC_{CON,DE}STRUCTOR even when it is
DECL_LOOPING_CONST_OR_PURE_P.

* g++.dg/ipa/pr77905.C: New test.

From-SVN: r248634

8 years agobackport: re PR target/78796 (TLS fails to link on aarch64 with -mcmodel=large)
Jakub Jelinek [Tue, 30 May 2017 07:48:57 +0000 (09:48 +0200)] 
backport: re PR target/78796 (TLS fails to link on aarch64 with -mcmodel=large)

Backported from mainline
2016-12-14  Wilco Dijkstra  <wdijkstr@arm.com>
    Jakub Jelinek  <jakub@redhat.com>

PR target/78796
* config/aarch64/aarch64.c (aarch64_classify_symbol): Merge large
model checks into switch.

* gcc.dg/tls/pr78796.c: New test.

From-SVN: r248632

8 years agobackport: re PR c++/78761 (C++14, compiler generate mangled name that can not be...
Jakub Jelinek [Tue, 30 May 2017 07:47:05 +0000 (09:47 +0200)] 
backport: re PR c++/78761 (C++14, compiler generate mangled name that can not be demangled)

Backported from mainline
2016-12-13  Jakub Jelinek  <jakub@redhat.com>

PR c++/78761
* cp-demangle.c (cplus_demangle_type): Demangle Dc as decltype(auto).
* testsuite/demangle-expected: Add test for decltype(auto).

From-SVN: r248631

8 years agobackport: re PR c++/78649 (ICE on invalid C++ code on x86_64-linux-gnu (internal...
Jakub Jelinek [Tue, 30 May 2017 07:46:27 +0000 (09:46 +0200)] 
backport: re PR c++/78649 (ICE on invalid C++ code on x86_64-linux-gnu (internal compiler error: tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in build_value_init_noctor, at cp/init.c:380))

Backported from mainline
2016-12-02  Jakub Jelinek  <jakub@redhat.com>

PR c++/78649
* pt.c (tsubst_init): Don't call build_value_init if decl's type
is error_mark_node.

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

From-SVN: r248630

8 years agobackport: re PR fortran/78298 (ICE in lookup_decl_in_outer_ctx, bei omp-low.c:4115)
Jakub Jelinek [Tue, 30 May 2017 07:45:47 +0000 (09:45 +0200)] 
backport: re PR fortran/78298 (ICE in lookup_decl_in_outer_ctx, bei omp-low.c:4115)

Backported from mainline
2016-11-28  Jakub Jelinek  <jakub@redhat.com>

PR fortran/78298
* tree-nested.c (convert_local_reference_stmt): After adding
shared (FRAME.NN) clause to omp parallel, task or target,
add it also to all outer omp parallel, task or target constructs.

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

From-SVN: r248629

8 years agobackport: re PR middle-end/69183 (ICE when using OpenMP PRIVATE keyword in OMP DO...
Jakub Jelinek [Tue, 30 May 2017 07:44:51 +0000 (09:44 +0200)] 
backport: re PR middle-end/69183 (ICE when using OpenMP PRIVATE keyword in OMP DO loop not explicitly encapsulated in OMP PARALLEL region)

Backported from mainline
2016-11-23  Jakub Jelinek  <jakub@redhat.com>

PR middle-end/69183
* omp-low.c (build_outer_var_ref): Change lastprivate argument
to code, pass it recursively, adjust uses.  For OMP_CLAUSE_PRIVATE
on worksharing constructs, treat it like clauses on simd construct.
Formatting fix.
(lower_rec_input_clauses): For OMP_CLAUSE_PRIVATE_OUTER_REF pass
OMP_CLAUSE_PRIVATE as last argument to build_outer_var_ref.
(lower_lastprivate_clauses): Pass OMP_CLAUSE_LASTPRIVATE instead
of true as last argument to build_outer_var_ref.

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

From-SVN: r248628