159167 Commits

Author SHA1 Message Date
Ian Lance Taylor
5d15877758 Makefile.am (GOTOOLS_TEST_TIMEOUT): Define.
* Makefile.am (GOTOOLS_TEST_TIMEOUT): Define.
	(check-go-tool): Pass -test.timeout with GOTOOLS_TEST_TIMEOUT.
	(check-cgo-test, check-carchive-test, check-vet): Likewise.
	* Makefile.in: Rebuild.

From-SVN: r256876
2018-01-19 05:04:51 +00:00
Ian Lance Taylor
ddc606cef7 mksysinfo: force Passwd.Pw_[ug]id from int32 to uint32
Solaris 10 uses int32 for the Pw_uid and Pw_gid fields of Passwd,
    but most systems, including Solaris 11, use uint32.  Force uint32
    for consistency and to fix the build.
    
    Reviewed-on: https://go-review.googlesource.com/88195

From-SVN: r256875
2018-01-19 04:52:12 +00:00
Ian Lance Taylor
674dddfe2d runtime: no escape for some functions on AIX
Reviewed-on: https://go-review.googlesource.com/88236

From-SVN: r256874
2018-01-19 04:48:51 +00:00
Ian Lance Taylor
219f9bad83 cmd/go: recognize AIX objects and archives
Reviewed-on: https://go-review.googlesource.com/88275

From-SVN: r256873
2018-01-19 04:27:38 +00:00
Ian Lance Taylor
549e4febc3 runtime: add go:noescape declaration for Solaris
Patch by Rainer Orth.
    
    Reviewed-on: https://go-review.googlesource.com/88376

From-SVN: r256872
2018-01-19 04:09:55 +00:00
John David Anglin
502a18ca45 pr52451.c (main): Skip long double test on hppa*-*-hpux*.
* gcc.dg/torture/pr52451.c (main): Skip long double test on
	hppa*-*-hpux*.

From-SVN: r256871
2018-01-19 00:22:33 +00:00
GCC Administrator
90e04a348b Daily bump.
From-SVN: r256870
2018-01-19 00:16:14 +00:00
Jakub Jelinek
9736f5769d re PR ipa/83619 (ICE in inliner: caller edge count does not match BB count)
PR ipa/83619
	PR testsuite/83934
	* g++.dg/torture/pr83619.C (e): Define before first use instead of
	forward declaration.

From-SVN: r256867
2018-01-19 00:39:26 +01:00
Jason Merrill
b4cda6a6b7 Fix template/inherit4.C.
PR c++/83714
	* search.c (any_dependent_bases_p): Handle null TREE_BINFO.
	* pt.c (instantiation_dependent_scope_ref_p): True if
	any_dependent_bases_p.

From-SVN: r256866
2018-01-18 17:15:32 -05:00
Paolo Carlini
48cdaab9d7 cp-tree.h: Fix comment typo (DECL_NON_TRIVIALLY_INITIALIZED_P vs...
2018-01-18  Paolo Carlini  <paolo.carlini@oracle.com>

	* cp-tree.h: Fix comment typo (DECL_NON_TRIVIALLY_INITIALIZED_P
	vs DECL_NONTRIVIALLY_INITIALIZED_P).

From-SVN: r256865
2018-01-18 20:56:08 +00:00
Carl Love
3480ed3a8f builtins-6.h (foo): Add missing closing bracket to the function.
gcc/testsuite/ChangeLog:

2018-01-18  Carl Love  <cel@us.ibm.com>
	* gcc.target/powerpc/builtins-6.h (foo): Add missing closing bracket
	to the function.

From-SVN: r256864
2018-01-18 20:38:41 +00:00
Jakub Jelinek
6aee2fd064 re PR sanitizer/81715 (asan-stack=1 redzone allocation is too inflexible)
PR sanitizer/81715
	PR testsuite/83882
	* function.h (gimplify_parameters): Add gimple_seq * argument.
	* function.c: Include gimple.h and options.h.
	(gimplify_parameters): Add cleanup argument, add CLOBBER stmts
	for the added local temporaries if needed.
	* gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
	if there are any parameter cleanups, wrap whole body into a
	try/finally with the cleanups.

From-SVN: r256861
2018-01-18 21:30:33 +01:00
Jason Merrill
d3a9902e52 PR c++/82461 - constexpr list-initialized member
* constexpr.c (potential_constant_expression_1): Check
	TARGET_EXPR_DIRECT_INIT_P.

From-SVN: r256860
2018-01-18 15:02:06 -05:00
Uros Bizjak
dac867c90a configure.ac (AC_CHECK_HEADERS): Add linux/types.h.
* configure.ac (AC_CHECK_HEADERS): Add linux/types.h.  Conditionally
	include linux/types.h when checking linux/random.h header.
	* config.h.in: Regenerate.
	* configure: Ditto.
	* src/c++11/random.cc: Conditionally include linux/types.h.

From-SVN: r256859
2018-01-18 20:52:16 +01:00
Paolo Carlini
50b27938f7 re PR c++/81013 (ICE with invalid union in class hierarchy)
/cp
2018-01-18  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/81013
	* decl.c (xref_basetypes): Early return upon error about derived
	union.

/testsuite
2018-01-18  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/81013
	* g++.dg/inherit/union3.C: New.

From-SVN: r256856
2018-01-18 17:11:43 +00:00
Wilco Dijkstra
9f7b87cad7 [AArch64] Fix fp16 test failures after PR82964 fix
This fixes test failures in gcc.target/aarch64/f16_mov_immediate_*.c
after fixing PR82964.  The check for a scalar floating point constant
didn't include 16-bit floating point modes, so use GET_MODE_CLASS
instead.

    gcc/
	PR target/82964
	* config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
	Use GET_MODE_CLASS for scalar floating point.

From-SVN: r256854
2018-01-18 16:37:44 +00:00
Jan Hubicka
cbb4e4ca11 re PR ipa/82256 (clones created by create_version_clone_with_body are not observable to insertion hooks)
PR ipa/82256
	patch by PaX Team
	* cgraphclones.c (cgraph_node::create_version_clone_with_body):
	Fix call of call_cgraph_insertion_hooks.

From-SVN: r256853
2018-01-18 16:26:54 +00:00
Martin Sebor
8ca07d928c Be clear about virtual table pointer corruptuion rather than the vtable itself.
From-SVN: r256852
2018-01-18 09:26:14 -07:00
Christophe Lyon
00850e40be [arm] Enable gcc.dg/rtl/arm/stl-cond.c on armeb.
2018-01-18  Christophe Lyon <christophe.lyon@linaro.org>

	* gcc.dg/rtl/arm/stl-cond.c: Enable on arm*.

From-SVN: r256851
2018-01-18 17:14:31 +01:00
Jan Hubicka
8b2d991b03 re PR ipa/83619 (ICE in inliner: caller edge count does not match BB count)
PR ipa/83619
	* g++.dg/torture/pr83619.C: New testcase.
	* cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
	frequencies.

From-SVN: r256850
2018-01-18 15:57:48 +00:00
Christophe Lyon
1f0267acfd [ARM,testsuite] Make arm_arch_FUNC_ok more robust
2018-01-18  Christophe Lyon <christophe.lyon@linaro.org>

	* lib/target-supports.exp (check_effective_target_arm_arch_FUNC_ok):
	Add function body to force error messages in some configurations.

From-SVN: r256849
2018-01-18 15:54:41 +01:00
Kyrylo Tkachov
215054684a [arm] Fix gcc.target/arm/pr70278.c
This test needs an armv4t Thumb1 target but doesn't add the right effective target checks.
This patch adds them so the test is skipped appropriately on Thumb2 hard-float tarets.

     * gcc.target/arm/pr70278.c: Add effective target checks for armv4t
     and arm_thumb1_ok.

From-SVN: r256848
2018-01-18 14:26:02 +00:00
Boris Kolpackov
7365279fca Add ability to remap file names in __FILE__, etc (PR other/70268)
This commit adds the -fmacro-prefix-map option that allows remapping of file
names in __FILE__, __BASE_FILE__, and __builtin_FILE(), similar to how
-fdebug-prefix-map allows to do the same for debug information.

Additionally, it adds -ffile-prefix-map which can be used to specify both
mappings with a single option (and, should we need to add more -f*-prefix-map
options in the future, those as well).

libcpp/ChangeLog:

2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>

        PR other/70268
        * include/cpplib.h (cpp_callbacks::remap_filename): New callback.
        * libcpp/macro.c (_cpp_builtin_macro_text): Call remap_filename for
        __FILE__ and __BASE_FILE__.


gcc/ChangeLog:

2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>

        PR other/70268
        * common.opt: (-ffile-prefix-map): New option.
        * opts.c (common_handle_option): Defer it.
        * opts-global.c (handle_common_deferred_options): Handle it.
        * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
        * file-prefix-map.h: New file.
        (remap_debug_filename, add_debug_prefix_map): ...here.
        (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
        * final.c (debug_prefix_map, add_debug_prefix_map
        remap_debug_filename): Move to...
        * file-prefix-map.c: New file.
        (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
        generalize, get rid of alloca(), use strrchr() instead of strchr().
        (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
        Implement in terms of add_prefix_map().
        (remap_macro_filename, remap_debug_filename): Implement in term of
        remap_filename().
        * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
        * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
        * dbxout.c: Include file-prefix-map.h.
        * varasm.c: Likewise.
        * vmsdbgout.c: Likewise.
        * xcoffout.c: Likewise.
        * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
        * doc/cppopts.texi (-fmacro-prefix-map): Document.
        * doc/invoke.texi (-ffile-prefix-map): Document.
	(-fdebug-prefix-map): Update description.


gcc/c-family/ChangeLog:

2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>

        PR other/70268
        * c-family/c.opt (-fmacro-prefix-map): New option.
        * c-family/c-opts.c (c_common_handle_option): Handle it.
        * c-family/c-lex.c (init_c_lex): Set remap_filename cpp callback.
        * c-family/c-ppoutput.c (init_pp_output): Likewise.


gcc/testsuite/ChangeLog:

2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>

        PR other/70268
        * c-c++-common/ffile-prefix-map.c: New test.
        * c-c++-common/fmacro-prefix-map.c: New test.
        * c-c++-common/cpp/ffile-prefix-map.c: New test.
        * c-c++-common/cpp/fmacro-prefix-map.c: New test.

From-SVN: r256847
2018-01-18 13:17:37 +00:00
Martin Liska
82a7bb2dff Small retpoline clean-up.
2018-01-18  Martin Liska  <mliska@suse.cz>

	* config/i386/i386.c (indirect_thunk_name): Document that also
	lfence is emitted.
	(output_indirect_thunk): Document why both instructions
	(pause and lfence) are generated.
2018-01-18  Martin Liska  <mliska@suse.cz>

	* gcc.target/i386/indirect-thunk-3.c: Remove duplicate options.
	* gcc.target/i386/indirect-thunk-4.c: Likewise.
	* gcc.target/i386/indirect-thunk-6.c: Likewise.
	* gcc.target/i386/indirect-thunk-bnd-4.c: Likewise.
	* gcc.target/i386/ret-thunk-10.c: Likewise.
	* gcc.target/i386/ret-thunk-11.c: Likewise.
	* gcc.target/i386/ret-thunk-12.c: Likewise.
	* gcc.target/i386/ret-thunk-15.c: Likewise.
	* gcc.target/i386/ret-thunk-9.c: Likewise.

From-SVN: r256846
2018-01-18 13:13:23 +00:00
Christophe Lyon
5b06990f1a [arm] Fix gcc.target/arm/xor-and.c
2018-01-18  Christophe Lyon  <christophe.lyon@linaro.org>

	* gcc.target/arm/xor-and.c: Fix dg-options and dg-add-options
	order.

From-SVN: r256845
2018-01-18 14:04:04 +01:00
Boris Kolpackov
7b7f78d7bd Add Boris Kolpackov <boris@codesynthesis.com> to MAINTAINERS
From-SVN: r256844
2018-01-18 12:36:31 +00:00
Nathan Sidwell
5a752e3f79 PR c++/83160] local ref to capture
https://gcc.gnu.org/ml/gcc-patches/2018-01/msg01638.html
	PR c++/83160
	* cp-tree.h (mark_use): Declare.
	* expr.c (mark_use): Make extern.
	* call.c (direct_reference_binding): Set inner conv's
	rvaluedness_matches_p, if it is an identity.
	(convert_like_real): Mark lvalue or rvalue use for identity as
	rvaledness_matches_p demands.

	PR c++/83160
	* g++.dg/cpp0x/pr83160.C: New.

From-SVN: r256842
2018-01-18 11:53:50 +00:00
Richard Biener
7467ab4232 re PR tree-optimization/83887 ([graphite] ICE in verify_dominators, at dominance.c:1184 (error: dominator of 3 should be 21, not 18))
2018-01-18  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/83887
	* graphite-scop-detection.c
	(scop_detection::get_nearest_dom_with_single_entry): Remove.
	(scop_detection::get_nearest_pdom_with_single_exit): Likewise.
	(scop_detection::merge_sese): Re-implement with a flood-fill
	algorithm that properly finds a SESE region if it exists.

	* gcc.dg/graphite/pr83887.c: New testcase.
	* gfortran.dg/graphite/pr83887.f90: Likewise.
	* gfortran.dg/graphite/pr83887.f: Likewise.

From-SVN: r256841
2018-01-18 10:59:33 +00:00
Kyrylo Tkachov
c5affc0451 [arm] PR target/65578: Fix builtin-bswap16-1.c and builtin-bswap-1.c
The builtin-bswap-1.c and builtin-bswap16-1.c are pretty annoying at the moment.
They force an explicit armv6 option that is a thumb1 target, so if you're testing a toolchain
configured with something like --with-cpu=cortex-a15 --with-float=hard --with-mode=thumb
you'll get those pesky errors about Thumb1 hard-float not being implemented, even though
the tests don't relate to floating-point functionality at all. I *think* this is also due
to the wrong order of dg-options and dg-require-effective-target directives that might
end up not doing a proper effective target check.

The solution in this patch is to commonise the code and create a couple of tests for each.
One tests an armv6t2 target. This allows us to test an ARM or a Thumb2 target.
The second one sets an armv6-m target, which is a Thumb1 target.
The dg-add-options machinery for arm_arch_v6m knows how to add the right -mfloat-abi=soft option.

With this patch we end up testing all of ARM, Thumb1, Thumb2 codegen whereas before we only
ever tried testing Thumb1, if the multilib options happened to line up just right, and would
give an ugly error otherwise.  Now, if the multilib options don't allow the test it should just
appear as UNSUPPORTED.

	PR target/65578
	* gcc.target/arm/builtin-bswap.x: New file.
	* gcc.target/arm/builtin-bswap-1.c: Include the above.  Add checks
	and options for armv6t2.
	* gcc.target/arm/builtin-bswap-2.c: Include the above.  Add checks
	and options for Thumb1.
	* gcc.target/arm/builtin-bswap16.x: New file.
	* gcc.target/arm/builtin-bswap16-1.c: Include the above.  Add checks
	and options for armv6t2.
	* gcc.target/arm/builtin-bswap16-2.c: Include the above.  Add checks
	and options for Thumb1.

From-SVN: r256840
2018-01-18 09:30:58 +00:00
Christophe Lyon
f2f4f2442c [arm] Fix gcc.target/arm/pr40887.c directives
2018-01-18  Christophe Lyon  <christophe.lyon@linaro.org>

	* gcc.target/arm/pr40887.c: Fix dg-options and dg-add-options
	order.

From-SVN: r256839
2018-01-18 10:13:27 +01:00
Jakub Jelinek
8ae438811f re PR c/61240 (Incorrect warning "integer overflow in expression" on pointer-pointer subtraction)
PR c/61240
	* match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
	pointer_diff optimizations use view_convert instead of convert.

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

From-SVN: r256838
2018-01-18 09:29:14 +01:00
Harald Anlauf
fcf7923742 re PR fortran/83864 (ICE in gfc_apply_init, at fortran/expr.c:4271)
2018-01-17  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/83864
	* expr.c (add_init_expr_to_sym): Do not dereference NULL pointer.

2018-01-17  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/83864
	* gfortran.dg/pr83864.f90: New test.

From-SVN: r256837
2018-01-18 07:54:17 +00:00
Siddhesh Poyarekar
3c1f3bf69d Add myself to the MAINTAINERS file
* MAINTAINERS (write after approval): Add myself.

From-SVN: r256836
2018-01-18 06:58:52 +00:00
Ian Lance Taylor
a9411cce01 re PR go/83787 (Many 32-bit Solaris/SPARC Go tests FAIL after Go1.10beta1 update)
PR go/83787
    compiler: pass int to makechan, call makechan64 when appropriate
    
    The update to 1.10beta1 changed makechan to take int instead of int64,
    and added a makechan64 call for large values.  Since the size is the
    last argument to makechan, the old compiler which always passed a
    64-bit int worked fine on 64-bit systems and little-endian 32-bit
    systems, but broke on big-endian 32-bit systems.  This CL fixes the
    compiler to use the appropriate types.
    
    This fixes GCC PR 83787.
    
    Reviewed-on: https://go-review.googlesource.com/88077

From-SVN: r256835
2018-01-18 04:24:48 +00:00
Jeff Law
b7e60023a2 re PR testsuite/83883 (FAIL: gcc.dg/tree-ssa/ssa-dse-26.c scan-tree-dump-times dse1 "Deleted dead store" 2 (found 4 times))
PR testsuite/83883
	* gcc.dg/tree-ssa/ssa-dse-26.c: Tighten expected output.

From-SVN: r256833
2018-01-17 21:05:27 -07:00
Bill Schmidt
fe1b6f0d41 rs6000.md (*call_indirect_nonlocal_sysv<mode>): Generate different code for -mno-speculate-indirect-jumps.
[gcc]

2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	* config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
	Generate different code for -mno-speculate-indirect-jumps.
	(*call_value_indirect_nonlocal_sysv<mode>): Likewise.
	(*call_indirect_aix<mode>): Disable for
	-mno-speculate-indirect-jumps.
	(*call_indirect_aix<mode>_nospec): New define_insn.
	(*call_value_indirect_aix<mode>): Disable for
	-mno-speculate-indirect-jumps.
	(*call_value_indirect_aix<mode>_nospec): New define_insn.
	(*sibcall_nonlocal_sysv<mode>): Generate different code for
	-mno-speculate-indirect-jumps.
	(*sibcall_value_nonlocal_sysv<mode>): Likewise.

[gcc/testsuite]

2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	* gcc.target/powerpc/safe-indirect-jump-1.c: Remove endian
	restriction, but still restrict to 64-bit.
	* gcc.target/powerpc/safe-indirect-jump-7.c: New file.
	* gcc.target/powerpc/safe-indirect-jump-8.c: New file.

From-SVN: r256831
2018-01-18 01:21:50 +00:00
GCC Administrator
e91478f6c7 Daily bump.
From-SVN: r256827
2018-01-18 00:16:22 +00:00
Harald Anlauf
c004a3413e re PR fortran/83874 (ICE initializing character array from derived type)
2018-01-17  Harald Anlauf  <anlauf@gmx.de>

	PR fortran/83874
	* decl.c (add_init_expr_to_sym): Do not dereference NULL pointer.


2018-01-17  Harald Anlauf  <anlauf@gmx.de>
                         
	PR fortran/83874
	* gfortran.dg/pr83874.f90: New test.

From-SVN: r256824
2018-01-17 23:50:02 +00:00
Jakub Jelinek
cfb14840b8 re PR c++/83824 (ICE on invalid C++ code with alignas: in chainon, at tree.c:3037)
PR c++/83824
	* parser.c (attr_chainon): New function.
	(cp_parser_label_for_labeled_statement, cp_parser_decl_specifier_seq,
	cp_parser_namespace_definition, cp_parser_init_declarator,
	cp_parser_type_specifier_seq, cp_parser_parameter_declaration,
	cp_parser_gnu_attributes_opt): Use it.
	(cp_parser_member_declaration, cp_parser_objc_class_ivars,
	cp_parser_objc_struct_declaration): Likewise.  Don't reset
	prefix_attributes if attributes is error_mark_node.

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

From-SVN: r256823
2018-01-18 00:42:36 +01:00
Michael Meissner
a3b11faf7e rs6000.c (rs6000_emit_move): If we load or store a long double type...
[gcc]
2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>

	* config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
	long double type, set the flags for noting the default long double
	type, even if we don't pass or return a long double type.

[gcc/testsuite]
2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>

	* gcc.target/powerpc/gnuattr1.c: New test to make sure we set the
	appropriate .gnu_attribute for the long double type, if we use the
	long double type, but do not generate any calls.
	* gcc.target/powerpc/gnuattr2.c: Likewise.
	* gcc.target/powerpc/gnuattr3.c: Likewise.

From-SVN: r256822
2018-01-17 23:16:03 +00:00
Paolo Carlini
a533fc7635 re PR c++/78344 (ICE on invalid c++ code on x86_64-linux-gnu (internal compiler error: tree check: expected tree_list, have error_mark in cp_check_const_attributes, at cp/decl2.c:1347))
/cp
2018-01-17  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/78344
	* decl.c (grokdeclarator): Do not append the error_mark_node
	due to an erroneous optional attribute-specifier-seq.

/testsuite
2018-01-17  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/78344
	* g++.dg/cpp0x/alignas13.C: New.

From-SVN: r256821
2018-01-17 21:29:59 +00:00
Ian Lance Taylor
06b6c63064 compiler: enable escape analysis for runtime
The runtime package was hard-coded non-escape, and the escape
    analysis was not run for the runtime package. This CL removes
    the hard-code, and lets the escape analysis decide. It is not
    allowed for local variables and closures in the runtime to be
    heap allocated. This CL adds the check that make sure that they
    indeed do not escape.
    
    The escape analysis is always run when compiling the runtime
    now.
    
    Fixes golang/go#17431
    
    Reviewed-on: https://go-review.googlesource.com/86246

From-SVN: r256820
2018-01-17 21:24:41 +00:00
Jakub Jelinek
78a5fce091 re PR c++/83897 (Useless __builtin_unreachable () emitted by the C++ FE)
PR c++/83897
	* cp-gimplify.c (cp_maybe_instrument_return): Handle
	CLEANUP_POINT_EXPR.

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

From-SVN: r256819
2018-01-17 22:08:36 +01:00
Jan Hubicka
a99670f923 re PR ipa/83051 (ICE on valid code at -O3: in edge_badness, at ipa-inline.c:1024)
PR ipa/83051
	* ipa-inline.c (flatten_function): Do not overwrite final inlining
	failure.
	* gcc.c-torture/compile/pr83051-2.c: New testcase.

From-SVN: r256818
2018-01-17 20:40:46 +00:00
Paolo Carlini
8fca809b59 re PR c++/81054 (ICE with volatile variable in constexpr function)
/cp
2018-01-17  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/81054
	* constexpr.c (ensure_literal_type_for_constexpr_object): Return
	error_mark_node when we give an error.
	* decl.c (cp_finish_decl): Use the latter.

/testsuite
2018-01-17  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/81054
	* g++.dg/cpp0x/constexpr-ice19.C: New.

From-SVN: r256817
2018-01-17 20:29:25 +00:00
Paolo Carlini
9638f320ec re PR c++/81054 (ICE with volatile variable in constexpr function)
/cp
2018-01-17  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/81054
	* constexpr.c (ensure_literal_type_for_constexpr_object): Return
	error_mark_node when we give an error.
	* decl.c (cp_finish_decl): Use the latter.

/testsuite
2018-01-17  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/81054
	* g++.dg/cpp0x/constexpr-ice19.C: New.

From-SVN: r256816
2018-01-17 20:28:47 +00:00
Will Schmidt
95f94b38bb fold-vec-mergehl-char.c: New.
[testsuite]

2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>

	* gcc.target/powerpc/fold-vec-mergehl-char.c: New.
	* gcc.target/powerpc/fold-vec-mergehl-double.c: New.
	* gcc.target/powerpc/fold-vec-mergehl-float.c: New.
	* gcc.target/powerpc/fold-vec-mergehl-int.c: New.
	* gcc.target/powerpc/fold-vec-mergehl-longlong.c: New.
	* gcc.target/powerpc/fold-vec-mergehl-pixel.c: New.
	* gcc.target/powerpc/fold-vec-mergehl-short.c: New.
	* gcc.target/powerpc/builtins-1-be-folded.c: New.
	* gcc.target/powerpc/builtins-1-le-folded.c: New.
	* gcc.target/powerpc/builtins-1.fold.h: New.

From-SVN: r256815
2018-01-17 19:44:45 +00:00
Will Schmidt
355bae9212 rs6000.c (rs6000_gimple_builtin): Add gimple folding support for merge[hl].
[gcc]

2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>

	* config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
	support for merge[hl].
	(fold_mergehl_helper): New helper function.
	(tree-vector-builder.h): New #include for tree_vector_builder usage.
	* config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
	(altivec_vmrglw_direct): Add xxmrglw insn.

[testsuite]

2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>

	* gcc.target/powerpc/fold-vec-mergehl-char.c: New.
	* gcc.target/powerpc/fold-vec-mergehl-double.c: New.
	* gcc.target/powerpc/fold-vec-mergehl-float.c: New.
	* gcc.target/powerpc/fold-vec-mergehl-int.c: New.
	* gcc.target/powerpc/fold-vec-mergehl-longlong.c: New.
	* gcc.target/powerpc/fold-vec-mergehl-pixel.c: New.
	* gcc.target/powerpc/fold-vec-mergehl-short.c: New.
	* gcc.target/powerpc/builtins-1-be.c: Disable gimple-folding.
	* gcc.target/powerpc/builtins-1-le.c: Disable gimple-folding.
	* gcc.target/powerpc/builtins-1-be-folded.c: New.
	* gcc.target/powerpc/builtins-1-le-folded.c: New.
	* gcc.target/powerpc/builtins-1.fold.h: New.

From-SVN: r256814
2018-01-17 19:41:02 +00:00
Rainer Orth
2d509539db Guard against undefined weak symbols before Mac OS X 10.9 (PR sanitizer/82825)
PR sanitizer/82825
	* sanitizer_common/sanitizer_internal_defs.h: Cherry-pick upstream
	r??????.

From-SVN: r256813
2018-01-17 19:31:43 +00:00
Kyrylo Tkachov
a4d4d2f5cf [arm] Fix gcc.target/arm/g2.c and scd42-2.c for --with-mode=thumb hardfloat targets
These -mcpu=xscale tests are ARM-only tests and they go to great pains to reject
explicit overriding options, but they're missing the -marm in their dg-options, which means
they will still give that nasty Thumb1 hard-float error when testing an implicit --with-mode=thumb
toolchain (--with-cpu=cortex-a15 --with-fpu=neon-vfpv4 --with-float=hard --with-mode=thumb, for example).

This patch adds the missing -marm and all is good again.

     * gcc.target/arm/g2.c: Add -marm to dg-options.
     * gcc.target/arm/scd42-2.c: Likewise.

From-SVN: r256812
2018-01-17 19:11:15 +00:00