Commit Graph

153079 Commits

Author SHA1 Message Date
Jason Merrill
222a78553a PR c++/80840 - ICE with constexpr and reference
* pt.c (convert_nontype_argument): Don't test whether a decl is
	value-dependent when binding to a reference.

From-SVN: r248755
2017-05-31 13:53:20 -04:00
Jason Merrill
78578b7e04 PR c++/80856 - ICE with local extern in template
* semantics.c (finish_call_expr): Replace a local extern overload
	set in a template with the IDENTIFIER_NODE.

From-SVN: r248754
2017-05-31 13:53:12 -04:00
Jason Merrill
bb399e300f PR c++/80605 - __is_standard_layout and empty base
* class.c (check_bases): Ignore empty bases.
	* class.c (check_bases): Use DECL_FIELD_IS_BASE.

From-SVN: r248753
2017-05-31 13:53:06 -04:00
Jason Merrill
0634d9fe36 PR c++/66297, DR 1684 - literal class and constexpr member fns
* constexpr.c (is_valid_constexpr_fn): Only complain about
	non-literal enclosing class in C++11.
	* class.c (finalize_literal_type_property): Likewise.

From-SVN: r248752
2017-05-31 13:52:58 -04:00
Jason Merrill
f0e95f2ca0 PR c++/80179 - ICE with initialized flexible array member.
* constexpr.c (verify_ctor_sanity): Handle flexible array members.

From-SVN: r248751
2017-05-31 13:52:44 -04:00
Martin Jambor
7a928bc1d7 [PR 80293] Dont totally-scalarize char arrays
2017-05-31  Martin Jambor  <mjambor@suse.cz>

        Backport from mainline
        2017-04-24  Martin Jambor  <mjambor@suse.cz>

        PR tree-optimization/80293
        * tree-sra.c (scalarizable_type_p): New parameter const_decl, make
        char arrays not totally scalarizable if it is false.
        (analyze_all_variable_accesses): Pass correct value in the new
        parameter.  Add a statistics counter.

testsuite/
        * g++.dg/tree-ssa/pr80293.C: New test.

From-SVN: r248724
2017-05-31 10:45:23 +02:00
Max Filippov
23558e4988 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: r248720
2017-05-31 00:28:16 +00:00
GCC Administrator
72d003c3a3 Daily bump.
From-SVN: r248718
2017-05-31 00:16:17 +00:00
GCC Administrator
3c92cc1a38 Daily bump.
From-SVN: r248590
2017-05-30 00:16:13 +00:00
Eric Botcazou
1d7226694d install.texi (Options specification): Restore entry of --enable-sjlj-exceptions.
* doc/install.texi (Options specification): Restore entry of
	--enable-sjlj-exceptions.

From-SVN: r248583
2017-05-29 21:08:29 +00:00
Alexandre Oliva
df01733f52 [libcc1] drop unused field from C++ lang_identifier
for  gcc/cp/ChangeLog

	* cp-tree.h (lang_identifier): Drop oracle_looked_up, unused.

From-SVN: r248581
2017-05-29 20:30:56 +00:00
Andreas Krebbel
8de0f875d0 S/390: Fix PR80725.
gcc/ChangeLog:

2017-05-29  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

	Backport from mainline
	2017-05-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

	PR target/80725
	* config/s390/s390.c (s390_check_qrst_address): Check incoming
	address against address_operand predicate.
	* config/s390/s390.md ("*indirect_jump"): Swap alternatives.

gcc/testsuite/ChangeLog:

2017-05-29  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

	Backport from mainline
	2017-05-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

	* gcc.target/s390/pr80725.c: New test.

From-SVN: r248557
2017-05-29 07:54:13 +00:00
GCC Administrator
a60c747f6d Daily bump.
From-SVN: r248551
2017-05-29 00:16:16 +00:00
Uros Bizjak
460f27038f backport: i386.md (*movdi_internal): Remove SSE4 alternative 18 (?r, *v).
Backport from mainline
	2017-05-23  Uros Bizjak  <ubizjak@gmail.com>

	* config/i386/i386.md (*movdi_internal): Remove SSE4
	alternative 18 (?r, *v).  Update insn attributes.
	(*movsi_internal): Remove SSE4 alternative 13 (?r, *v).
	Update insn attributes.
	(*zero_extendsidi2): Remove SSE4 alternative (?r, *x).
	Update insn attributes.
	* config/i386/sse.md (vec_extract<ssevecmodelower>_0): Remove SSE4
	alternative 1 (r, v). Remove isa attribute.
	* config/i386/i386.c (dimode_scalar_chain::make_vector_copies):
	Always move value through stack for !TARGET_INTER_UNIT_MOVES_TO_VEC
	and !TARGET_INTER_UNIT_MOVES_TO_VEC targets.

	2017-05-16  Uros Bizjak  <ubizjak@gmail.com>

	* config/i386/i386.md (*movsi_internal): Split (?rm,*y) alternative
	to (?r,*Yn) and (?m,*y) alternatives, and (?*y,rm) to (?*Ym,r)
	and (?*y,m).  Update insn attributes.

From-SVN: r248545
2017-05-28 13:45:48 +02:00
GCC Administrator
b247e3e55c Daily bump.
From-SVN: r248543
2017-05-28 00:16:19 +00:00
GCC Administrator
0ebcbbc1ff Daily bump.
From-SVN: r248531
2017-05-27 00:16:27 +00:00
Richard Henderson
b7a489b025 re PR libgcc/80037 (Bad .eh_frame data in crtend.o)
PR libgcc/80037

 Backport from mainline
 * config/alpha/t-alpha (CRTSTUFF_T_CFLAGS): New.

From-SVN: r248525
2017-05-26 12:29:46 -07:00
Sheldon Lobo
810113dfca backport: sparc.md (length): Return the correct value for -mflat sibcalls to match output_sibcall.
Backported from mainline
	2017-05-24  Sheldon Lobo  <smlobo@sheldon.us.oracle.com>

	* config/sparc/sparc.md (length): Return the correct value for -mflat
	sibcalls to match output_sibcall.

From-SVN: r248523
2017-05-26 18:46:47 +00:00
Marek Polacek
015cf5d1d1 re PR sanitizer/80659 (-fsanitize=address evokes ICE in in gimplify_switch_expr)
PR sanitizer/80659
	* c-decl.c (build_compound_literal): Set DECL_ARTIFICIAL and
	DECL_IGNORED_P even for non-static compound literals.

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

From-SVN: r248491
2017-05-26 11:17:34 +00:00
Marek Polacek
9e2248e6d3 re PR sanitizer/80875 (UBSAN: compile time crash in fold_binary_loc at fold-const.c:9817)
PR sanitizer/80875
	* fold-const.c (fold_binary_loc) <case MULT_EXPR>: Check if OP1
	can be negated.

	* c-c++-common/ubsan/pr80875.c: New test.

From-SVN: r248490
2017-05-26 11:15:37 +00:00
Jakub Jelinek
9f67f1462d backport: re PR middle-end/80809 (Multi-free error for variable size array used within OpenMP task)
Backported from mainline
	2017-05-22  Jakub Jelinek  <jakub@redhat.com>

	PR middle-end/80809
	* omp-low.c (finish_taskreg_remap): New function.
	(finish_taskreg_scan): If unit size of ctx->record_type
	is non-constant, unshare the size expression and replace
	decls in it with possible outer var refs.

	* testsuite/libgomp.c/pr80809-2.c: New test.
	* testsuite/libgomp.c/pr80809-3.c: New test.

From-SVN: r248488
2017-05-26 12:14:37 +02:00
Jakub Jelinek
e8f1beb231 backport: re PR middle-end/80809 (Multi-free error for variable size array used within OpenMP task)
Backported from mainline
	2017-05-22  Jakub Jelinek  <jakub@redhat.com>
 
	PR middle-end/80809
	* gimplify.c (omp_add_variable): For GOVD_DEBUG_PRIVATE use
	GOVD_SHARED rather than GOVD_PRIVATE with it.
	(gimplify_adjust_omp_clauses_1, gimplify_adjust_omp_clauses): Expect
	GOVD_SHARED rather than GOVD_PRIVATE with GOVD_DEBUG_PRIVATE.

	* testsuite/libgomp.c/pr80809-1.c: New test.

From-SVN: r248487
2017-05-26 12:13:34 +02:00
Jakub Jelinek
3528deed9d backport: re PR middle-end/80853 (OpenMP ICE in build_outer_var_ref with array reduction)
Backported from mainline
	2017-05-22  Jakub Jelinek  <jakub@redhat.com>

	PR middle-end/80853
	* omp-low.c (lower_reduction_clauses): Pass OMP_CLAUSE_PRIVATE
	as last argument to build_outer_var_ref for pointer bases of array
	section reductions.

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

From-SVN: r248486
2017-05-26 12:05:39 +02:00
Michael Meissner
e722c0f728 backport: re PR target/80510 (Optimize Power7/power8 Altivec load/stores)
[gcc]
2017-05-25  Michael Meissner  <meissner@linux.vnet.ibm.com>

	Backport from trunk
	2017-05-18  Michael Meissner  <meissner@linux.vnet.ibm.com>

	PR target/80510
	* config/rs6000/predicates.md (simple_offsettable_mem_operand):
	New predicate.

	* config/rs6000/rs6000.md (ALTIVEC_DFORM): New iterator.
	(define_peephole2 for Altivec d-form load): Add peepholes to catch
	cases where the register allocator uses a move and an offsettable
	memory operation to/from a FPR register on ISA 2.06/2.07.
	(define_peephole2 for Altivec d-form store): Likewise.

	Backport from trunk
	2017-05-09  Michael Meissner  <meissner@linux.vnet.ibm.com>

	PR target/68163
	* config/rs6000/rs6000.md (f32_lr): Delete mode attributes that
	are now unused after splitting mov{sf,sd}_hardfloat.
	(f32_lr2): Likewise.
	(f32_lm): Likewise.
	(f32_lm2): Likewise.
	(f32_li): Likewise.
	(f32_li2): Likewise.
	(f32_lv): Likewise.
	(f32_sr): Likewise.
	(f32_sr2): Likewise.
	(f32_sm): Likewise.
	(f32_sm2): Likewise.
	(f32_si): Likewise.
	(f32_si2): Likewise.
	(f32_sv): Likewise.
	(f32_dm): Likewise.
	(f32_vsx): Likewise.
	(f32_av): Likewise.
	(mov<mode>_hardfloat): Split into separate movsf and movsd pieces.
	For movsf, order stores so the VSX stores occur before the GPR
	store which encourages the register allocator to use a traditional
	FPR instead of a GPR.  For movsd, order the stores so that the GPR
	store comes before the VSX stores to allow the power6 to work.
	This is due to the power6 not having a 32-bit integer store
	instruction from a FPR.
	(movsf_hardfloat): Likewise.
	(movsd_hardfloat): Likewise.

[gcc/testsuite]
2017-05-25  Michael Meissner  <meissner@linux.vnet.ibm.com>

	Backport from trunk
	2017-05-18  Michael Meissner  <meissner@linux.vnet.ibm.com>

	PR target/80510
	* gcc.target/powerpc/pr80510-1.c: New test.
	* gcc.target/powerpc/pr80510-2.c: Likewise.

	Backport from trunk
	2017-05-09  Michael Meissner  <meissner@linux.vnet.ibm.com>

	PR target/68163
	* gcc.target/powerpc/pr68163.c: New test.

From-SVN: r248480
2017-05-26 01:52:24 +00:00
GCC Administrator
d96e4338b2 Daily bump.
From-SVN: r248478
2017-05-26 00:16:14 +00:00
Wilco Dijkstra
4c4df91e9c When lra-remat rematerializes an instruction with a clobber, it checks that the clobber does not kill live registers.
When lra-remat rematerializes an instruction with a clobber, it checks
that the clobber does not kill live registers.  However it fails to check
that the clobber also doesn't overlap with the destination register of the 
final rematerialized instruction.  As a result it is possible to generate
illegal instructions with the same hard register as the destination and a
clobber.  Fix this by also checking for overlaps with the destination
register.

	Backport from mainline
	PR rtl-optimization/80754
	* lra-remat.c (do_remat): Add overlap checks for dst_regno.

From-SVN: r248463
2017-05-25 15:12:49 +00:00
Wilco Dijkstra
d82c5a2230 Move an use-after-free access before the delete.
Backport from mainline
	PR target/80671
	* config/aarch64/cortex-a57-fma-steering.c (merge_forest):
	Move member access before delete.

From-SVN: r248461
2017-05-25 15:10:01 +00:00
GCC Administrator
8a3d56f8cc Daily bump.
From-SVN: r248440
2017-05-25 00:16:14 +00:00
GCC Administrator
34fa0b3034 Daily bump.
From-SVN: r248397
2017-05-24 00:16:16 +00:00
Matthias Klose
8cf4727e02 gcc_release (XZ): Default to xz --best.
2017-05-23  Matthias Klose  <doko@ubuntu.com>

        * gcc_release (XZ): Default to xz --best.

From-SVN: r248393
2017-05-23 23:14:37 +00:00
Jerry DeLisle
90d2abbe74 backport: re PR fortran/80741 ([Regression 7/8] DTIO wrong code causes incorrect behaviour of namelist READ)
2017-05-23  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	Backport from trunk
	PR libgfortran/80741
	* transfer.c (finalize_transfer): Reset last_char to 'empty'.
	* file_pos.c (formatted_backspace): Likewise.
	(st_endfile): Likewise.
	(st_rewind): Likewise.
	(st_flush): Likewise.

	* trans-io.c (transfer_namelist_element): Change check from
	NULL_TREE to null_pointer_node.

	* gfortran.dg/read_4.f90: New test.

From-SVN: r248390
2017-05-23 22:05:56 +00:00
Jerry DeLisle
70e971cc61 backport: re PR fortran/80333 (Namelist dtio write of array of class does not traverse the array)
2017-05-23  Paul Thomas  <pault@gcc.gnu.org>

	Backport from trunk
	PR fortran/80333
	* trans-io.c (nml_get_addr_expr): If we are dealing with class
	type data set tmp tree to get that address.
	(transfer_namelist_element): Set the array spec to point to the
	the class data.

	* gfortran.dg/dtio_30.f03: New test.

	* list_read.c (nml_read_obj): Compute pointer into class/type
	arrays from the nl->dim information. Update it for each iteration
	of the loop for the given object.

From-SVN: r248388
2017-05-23 21:39:41 +00:00
Sheldon Lobo
112eba68ad backport: sparc.c (sparc_option_override): Set function alignment for -mcpu=niagara7 to 64 to match the I$ line.
Backport from mainline
	2017-05-18  Sheldon Lobo  <sheldon.lobo@oracle.com>

	* config/sparc/sparc.c (sparc_option_override): Set function
	alignment for -mcpu=niagara7 to 64 to match the I$ line.
	* config/sparc/sparc.h (BRANCH_COST): Set the SPARC M7 branch
	latency to 1.
	* config/sparc/sparc.h (BRANCH_COST): Set the SPARC T4 branch
	latency to 2.
	* config/sparc/sol2.h: Fix a ASM_CPU32_DEFAULT_SPEC typo.

	Backport from mainline
	2017-05-18  Sheldon Lobo  <sheldon.lobo@oracle.com>

	* gcc.target/sparc/niagara7-align.c: New test.

From-SVN: r248380
2017-05-23 18:39:44 +00:00
GCC Administrator
283f200379 Daily bump.
From-SVN: r248355
2017-05-23 00:16:14 +00:00
Bill Schmidt
69c3fc333a backport: p8-vec-xl-xst.c: Fix target string to LE-only.
2017-05-22  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	Backport from mainline
	2017-05-22  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	* gcc.target/powerpc/p8-vec-xl-xst.c: Fix target string to
	LE-only.

From-SVN: r248349
2017-05-22 19:47:43 +00:00
Joseph Myers
965b0f52fe * da.po, es.po: Update.
From-SVN: r248343
2017-05-22 18:12:05 +01:00
Eric Botcazou
3e193b8b8f decl.c (gnat_to_gnu_entity): Skip regular processing for Itypes that are E_Access_Subtype.
* gcc-interface/decl.c (gnat_to_gnu_entity): Skip regular processing
	for Itypes that are E_Access_Subtype.
	<E_Access_Subtype>: Use the DECL of the base type directly.

From-SVN: r248324
2017-05-22 09:39:46 +00:00
GCC Administrator
4a4c838432 Daily bump.
From-SVN: r248316
2017-05-22 00:16:25 +00:00
GCC Administrator
9165dfbd9a Daily bump.
From-SVN: r248311
2017-05-21 00:16:30 +00:00
GCC Administrator
f21201e159 Daily bump.
From-SVN: r248306
2017-05-20 00:16:23 +00:00
Andreas Tobler
f132a47f39 backport: unwind-arm.h: Make _Unwind_GetIP...
2017-05-19  Andreas Tobler  <andreast@gcc.gnu.org>

    Backport from mainline
    2017-05-17  Andreas Tobler  <andreast@gcc.gnu.org>

    * config/arm/unwind-arm.h: Make _Unwind_GetIP, _Unwind_GetIPInfo and
    _Unwind_SetIP available as functions for arm*-*-freebsd*.
    * config/arm/unwind-arm.c: Implement the above.

From-SVN: r248299
2017-05-19 20:38:22 +02:00
Uros Bizjak
a40583fba8 backport: re PR target/80799 (x86-32 bits generates MMX without EMMS)
Backport from mainline
	2017-05-18  Uros Bizjak  <ubizjak@gmail.com>

	PR target/80799
	* config/i386/mmx.md (*mov<mode>_internal): Enable
	alternatives 11, 12, 13 and 14 also for 32bit targets.
	Remove alternatives 15, 16, 17 and 18.
	* config/i386/sse.md (vec_concatv2di): Change
	alternative (!x, *y) to (x, ?!*Yn).

testsuite/ChangeLog:

	Backport from mainline
	2017-05-18  Uros Bizjak  <ubizjak@gmail.com>

	PR target/80799
	* g++.dg/other/i386-11.C: New test.

From-SVN: r248284
2017-05-19 16:09:45 +02:00
Janne Blomqvist
563a18bc20 Don't assume __secure_getenv is available
Glibc 2.17 made __secure_getenv an officially supported function, and
renamed it secure_getenv. The libgfortran configure has checked for
both of these, per
https://sourceware.org/glibc/wiki/Tips_and_Tricks/secure_getenv.

Unfortunately, while the dynamical library (libc.so) retains the
__secure_getenv symbol for backwards compatibility, the static library
(libc.a) does not. This means that a libgfortran.a compiled against an
older glibc will not work if one tries to link against a newer
libc.a. This creates problems for providing gfortran binary
distributions that work on as many target systems as possible.

Thus, retain the support for __secure_getenv but call it only via a
weak reference.

Backported from trunk.

2017-05-19  Janne Blomqvist  <jb@gcc.gnu.org>

	* libgfortran.h: HAVE_SECURE_GETENV: Don't check
	HAVE___SECURE_GETENV.
	* environ/runtime.c (secure_getenv): Use __secure_getenv via a
        weak reference.

From-SVN: r248273
2017-05-19 16:25:21 +03:00
Jonathan Wakely
ee791c3ab1 PR libstdc++/80796 Add new std::search overload for C++17
PR libstdc++/80796
	* include/bits/stl_algo.h (search): Add new overload for C++17.
	* testsuite/25_algorithms/search/searcher.cc: New.

From-SVN: r248267
2017-05-19 13:28:28 +01:00
GCC Administrator
07276c2b61 Daily bump.
From-SVN: r248259
2017-05-19 00:16:23 +00:00
Matthias Klose
0fa2764280 gcc_release (build_gzip): Build xz tarball instead of bz2 tarball.
2017-05-18  Matthias Klose  <doko@ubuntu.com>

        * gcc_release (build_gzip): Build xz tarball instead of bz2 tarball.
        (build_diffs): Handle building diffs from either bz2 or xz tarballs,
        compress diffs using xz instead of bz2.
        (build_diff): Likewise.
        (upload_files): Check for *.xz files instead of *.bz2 files.
        (announce_snapshot): Announce xz tarball instead of bz2 tarball.
        (XZ): New definition.
        (<toplevel>): Look for both bz2 and xz compressed old tarballs.

From-SVN: r248252
2017-05-18 18:50:52 +00:00
Ian Lance Taylor
8851d1ce68 compiler: ignore struct field tags for type conversion
Go 1.8 includes a language change (https://golang.org/doc/go1.8#language):
    in an explicit conversion from one struct type to another, any field
    tags are ignored.
    
    This CL implements this language change in the gofrontend.  The tests
    for this are in the gc testsuite, which will be copied into the gccgo
    repository in due course.
    
    Updates golang/go#16085.
    
    Reviewed-on: https://go-review.googlesource.com/43614

From-SVN: r248249
2017-05-18 18:04:51 +00:00
Jonathan Wakely
3481dfbf17 PR libstdc++/80478 make std::mem_fn work with noexcept functions
PR libstdc++/80478
	* include/std/functional (_Mem_fn_traits_base): Add specializations
	for noexcept member function types.
	* testsuite/20_util/function_objects/mem_fn/80478.cc: New test.

From-SVN: r248247
2017-05-18 19:04:15 +01:00
Jonathan Wakely
5862bdfc53 Fix typos in libstdc++ manual
* doc/xml/manual/policy_data_structures.xml: Fix typo.
	* doc/xml/manual/test_policy_data_structures.xml: Likewise.
	* doc/html/*: Regenerate.

From-SVN: r248190
2017-05-18 11:28:38 +01:00
Jonathan Wakely
d90d4ceea9 Update libstdc++ version info in manual
* doc/xml/manual/abi.xml: Document latest library versions.
	* doc/xml/manual/build_hacking.xml: Document requirement to update
	abi.xml when bumping library versions.
	* doc/html/*: Regenerate.

From-SVN: r248187
2017-05-18 11:10:12 +01:00