]> git.ipfire.org Git - thirdparty/gcc.git/log
thirdparty/gcc.git
5 years ago * c-c++-common/patchable_function_entry-decl.c: Add -fno-pie on SPARC.
ebotcazou [Sat, 16 Feb 2019 14:40:53 +0000 (14:40 +0000)] 
* c-c++-common/patchable_function_entry-decl.c: Add -fno-pie on SPARC.
* c-c++-common/patchable_function_entry-default.c: Likewise.
* c-c++-common/patchable_function_entry-definition.c: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268958 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago PR rtl-optimization/66152
jakub [Sat, 16 Feb 2019 11:20:33 +0000 (11:20 +0000)] 
PR rtl-optimization/66152
* builtins.h (c_readstr): Declare.
* builtins.c (c_readstr): Remove forward declaration.  Add
null_terminated_p argument, if false, read all bytes from the
string instead of stopping after '\0'.
* expr.c (string_cst_read_str): New function.
(store_expr): Use string_cst_read_str instead of
builtin_strncpy_read_str.  Try to store by pieces the whole
exp_len first, and only if that fails, split it up into
store by pieces followed by clear_storage.  Formatting fix.

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

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268957 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago * config/i386/i386.md (*movqi_internal): Remove static from
jakub [Sat, 16 Feb 2019 10:05:16 +0000 (10:05 +0000)] 
* config/i386/i386.md (*movqi_internal): Remove static from
buf variable.  Use output_asm_insn (buf, operands); return "";
instead of return buf;.
* config/i386/sse.md (<sse>_andnot<mode>3<mask_name>,
*<code><mode>3<mask_name>, *andnot<mode>3, *andnottf3, *<code><mode>3,
*<code>tf3, <mask_codefor><code><mode>3<mask_name>): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268956 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoDaily bump.
gccadmin [Sat, 16 Feb 2019 00:16:34 +0000 (00:16 +0000)] 
Daily bump.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268955 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago compiler,runtime: use __builtin_dwarf_cfa for getcallersp
ian [Fri, 15 Feb 2019 23:22:29 +0000 (23:22 +0000)] 
compiler,runtime: use __builtin_dwarf_cfa for getcallersp

    Currently, the compiler lowers runtime.getcallersp to
    __builtin_frame_address(1). In the C side of the runtime,
    getcallersp is defined as __builtin_frame_address(0). They don't
    match. Further, neither of them actually returns the caller's SP.
    On AMD64, __builtin_frame_address(0) just returns the frame
    pointer. __builtin_frame_address(1) returns the memory content
    where the frame pointer points to, which is typically the
    caller's frame pointer but can also be garbage if the frame
    pointer is not enabled.

    This CL changes it to use __builtin_dwarf_cfa(), which returns
    the caller's SP at the call site. This matches the SP we get
    from unwinding the stack.

    Currently getcallersp is not used for anything real. It will be
    used for precise stack scan (a new version of CL 159098).

    Reviewed-on: https://go-review.googlesource.com/c/162905

* go-gcc.cc (Gcc_backend::Gcc_backend): Define __builtin_dwarf_cfa
instead of __builtin_frame_address.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268952 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago * g++.dg/asan/asan_oob_test.cc: Skip OOB_int on SPARC.
ebotcazou [Fri, 15 Feb 2019 23:16:25 +0000 (23:16 +0000)] 
* g++.dg/asan/asan_oob_test.cc: Skip OOB_int on SPARC.
* g++.dg/asan/function-argument-3.C: Tweak for 32-bit SPARC.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268951 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago * config/sparc/linux.h (ASAN_CC1_SPEC): Define.
ebotcazou [Fri, 15 Feb 2019 23:08:49 +0000 (23:08 +0000)] 
* config/sparc/linux.h (ASAN_CC1_SPEC): Define.
(CC1_SPEC): Use GNU_USER_TARGET_CC1_SPEC and ASAN_CC1_SPEC.
* config/sparc/linux64.h (ASAN_CC1_SPEC): Likewise.
(CC1_SPEC): Likewise.
* config/sparc/sparc.c (sparc_asan_shadow_offset): Adjust for 64-bit.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268950 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago * asan.c (asan_emit_stack_protection): Use full-sized mask to align
ebotcazou [Fri, 15 Feb 2019 21:40:24 +0000 (21:40 +0000)] 
* asan.c (asan_emit_stack_protection): Use full-sized mask to align
the base address on 64-bit strict-alignment platforms.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268949 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago PR go/89368
ian [Fri, 15 Feb 2019 21:04:58 +0000 (21:04 +0000)] 
PR go/89368
    compiler: write barrier check nil-check policy tweak

    Tweak the recipe for generating writeBarrier loads to insure that the
    dereference expr is marked as not requiring a nil check (not needed
    for gccgo, but needed for gollvm).

    Fixes https://gcc.gnu.org/PR89368

    Reviewed-on: https://go-review.googlesource.com/c/162904

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268948 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoi386: Fix ')' in VALID_MMX_REG_MODE
hjl [Fri, 15 Feb 2019 20:47:31 +0000 (20:47 +0000)] 
i386: Fix ')' in VALID_MMX_REG_MODE

Replace "(MODE == V1DImode)" with "(MODE) == V1DImode".

* config/i386/i386.h (VALID_MMX_REG_MODE): Correct the misplaced
')'.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268947 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago * config/i386/darwin.h (TARGET_FPMATH_DEFAULT_P): New define.
uros [Fri, 15 Feb 2019 18:02:50 +0000 (18:02 +0000)] 
* config/i386/darwin.h (TARGET_FPMATH_DEFAULT_P): New define.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268944 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoArm: Remove alternative from neon_softfp_fp16 directive.
tnfchris [Fri, 15 Feb 2019 17:17:17 +0000 (17:17 +0000)] 
Arm: Remove alternative from neon_softfp_fp16 directive.

There's a bit of a disconnect between the feature flags that don't test the fpu
and ones that do when the test itself also forces an architecture.  The forcing
of the architecture would change the defaults and without explicitly giving the
correct fpu again the test would fail.

I don't see a good way to solve this problem, really the feature tests should
ideally contain the extra options the test adds too, but for this specific case
it can be solved by always testing the fpu explicitly.

Committed under the GCC obvious

gcc/testsuite/ChangeLog:

* lib/target-supports.exp
(check_effective_target_arm_neon_softfp_fp16_ok_nocache): Drop non-fpu
checking alternative.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268943 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago2019-02-15 Aaron Sawdey <acsawdey@linux.ibm.com>
acsawdey [Fri, 15 Feb 2019 15:41:25 +0000 (15:41 +0000)] 
2019-02-15  Aaron Sawdey  <acsawdey@linux.ibm.com>

PR rtl-optimization/88308
* shrink-wrap.c (move_insn_for_shrink_wrap): Fix LABEL_NUSES counts
on copied instruction.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268942 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago PR go/89123
ian [Fri, 15 Feb 2019 14:51:10 +0000 (14:51 +0000)] 
PR go/89123
    internal/cpu, runtime: add S/390 CPU capability support

    Patch by Robin Dapp.

    Updates https://gcc.gnu.org/PR89123

    Reviewed-on: https://go-review.googlesource.com/c/162887

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268941 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago runtime: include <syscall.h> and <sys/syscall.h> if available
ian [Fri, 15 Feb 2019 14:25:12 +0000 (14:25 +0000)] 
runtime: include <syscall.h> and <sys/syscall.h> if available

    Fixes Solaris build.

    Reviewed-on: https://go-review.googlesource.com/c/162885

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268940 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago runtime: add type cast for non-split-stack calls to scanstackblock
ian [Fri, 15 Feb 2019 13:54:45 +0000 (13:54 +0000)] 
runtime: add type cast for non-split-stack calls to scanstackblock

    Reviewed-on: https://go-review.googlesource.com/c/162884

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268939 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago * gcc.target/sparc/struct-ret-check-1.c: Add -fno-pie option.
ebotcazou [Fri, 15 Feb 2019 10:55:50 +0000 (10:55 +0000)] 
* gcc.target/sparc/struct-ret-check-1.c: Add -fno-pie option.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268934 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago * c-c++-common/patchable_function_entry-decl.c: Do not run on Visium.
ebotcazou [Fri, 15 Feb 2019 10:50:27 +0000 (10:50 +0000)] 
* c-c++-common/patchable_function_entry-decl.c: Do not run on Visium.
* c-c++-common/patchable_function_entry-default.c: Likewise.
* c-c++-common/patchable_function_entry-definition.c: Likewise.
* gcc.dg/tree-ssa/pr84859.c: Add -ftree-cselim switch.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268932 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agolibgcc/
ebotcazou [Fri, 15 Feb 2019 10:40:34 +0000 (10:40 +0000)] 
libgcc/
* config/visium/lib2funcs.c (__set_trampoline_parity): Replace
TRAMPOLINE_SIZE with __LIBGCC_TRAMPOLINE_SIZE__.
gcc/
* final.c (insn_current_reference_address): Replace test on JUMP_P
with test on jump_to_label_p.
* config/visium/visium-passes.def: New file.
* config/visium/t-visium (PASSES_EXTRA): Define.
* config/visium/visium-protos.h (make_pass_visium_reorg): Declare.
* config/visium/visium.h (TRAMPOLINE_SIZE): Adjust.
(TRAMPOLINE_ALIGNMENT): Define.
* config/visium/visium.c (visium_option_override): Do not register
the machine-specific reorg pass here.
(visium_trampoline_init): Align the BRA insn on a 64-bit boundary
for the GR6.
(output_branch): Adjust threshold for long branch instruction.
* config/visium/visium.md (cpu): Move around.
(length): Adjust for the GR6.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268931 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago PR other/69006
jakub [Fri, 15 Feb 2019 07:52:50 +0000 (07:52 +0000)] 
PR other/69006
PR testsuite/88920
* lib/gcc-dg.exp: If llvm_binutils effective target, set
allow_blank_lines to 2 during initialization.
(dg-allow-blank-lines-in-output): Set allow_blank_lines to 1 only if
it was previously zero.
(gcc-dg-prune): Don't check for llvm_binutils effective target here.
Clear allow_blank_lines afterwards whenever it was 1.
* gdc.test/gdc-test.exp (dmd2dg): Don't call
dg-allow-blank-lines-in-output here.
(gdc-do-test): Set allow_blank_lines to 3 if it is 0 before running
the tests and restore it back at the end.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268930 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago * c-c++-common/ubsan/opts-1.c: New test.
jakub [Fri, 15 Feb 2019 07:51:38 +0000 (07:51 +0000)] 
* c-c++-common/ubsan/opts-1.c: New test.
* c-c++-common/ubsan/opts-2.c: New test.
* c-c++-common/ubsan/opts-3.c: New test.
* c-c++-common/ubsan/opts-4.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268929 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago PR tree-optimization/89278
jakub [Fri, 15 Feb 2019 07:39:45 +0000 (07:39 +0000)] 
PR tree-optimization/89278
* tree-loop-distribution.c: Include tree-eh.h.
(generate_memset_builtin, generate_memcpy_builtin): Call
rewrite_to_non_trapping_overflow on builtin->size before passing it
to force_gimple_operand_gsi.

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

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268927 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago PR c/89340
jakub [Fri, 15 Feb 2019 07:38:09 +0000 (07:38 +0000)] 
PR c/89340
* c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
before c_decl_attributes rather than after it.

* gcc.dg/pr89340.c: New test.
* gcc.dg/torture/pr57036-2.c (jpgDecode_convert): Expect a warning
that leaf attribute on nested function is useless.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268926 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago PR other/89342
jakub [Fri, 15 Feb 2019 07:17:24 +0000 (07:17 +0000)] 
PR other/89342
* optc-save-gen.awk: Handle optimize_fast like optimize_size or
optimize_debug.
* opth-gen.awk: Likewise.

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

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268924 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago compiler, runtime: harmonize types referenced by both C and Go
ian [Fri, 15 Feb 2019 01:57:51 +0000 (01:57 +0000)] 
compiler, runtime: harmonize types referenced by both C and Go

    Compiling with LTO revealed a number of cases in the runtime and
    standard library where C and Go disagreed about the type of an object or
    function (or where Go and code generated by the compiler disagreed). In
    all cases the underlying representation was the same (e.g., uintptr vs.
    void*), so this wasn't causing actual problems, but it did result in a
    number of annoying warnings when compiling with LTO.

    Reviewed-on: https://go-review.googlesource.com/c/160700

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268923 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago PR go/89168
ian [Fri, 15 Feb 2019 00:36:50 +0000 (00:36 +0000)] 
PR go/89168
    libgo: change gotest to run examples with output

    Change the gotest script to act like "go test" and run examples that
    have "output" comments.  This is not done with full generality, but
    just enough to run the libgo tests.  Other packages should be tested
    with "go test" as usual.

    While we're here clean up some old bits of gotest, and only run
    TestXXX functions that are actually in *_test.go files.  The latter
    change should fix https://gcc.gnu.org/PR89168.

    Reviewed-on: https://go-review.googlesource.com/c/162139

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268922 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago * go-backend.c (go_imported_unsafe): Update
ian [Fri, 15 Feb 2019 00:29:41 +0000 (00:29 +0000)] 
* go-backend.c (go_imported_unsafe): Update
optimization_default_node.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268921 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoDaily bump.
gccadmin [Fri, 15 Feb 2019 00:16:44 +0000 (00:16 +0000)] 
Daily bump.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268920 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago * config/i386/i386.h (TARGET_SUBTARGET64_ISA_DEFAULT):
uros [Thu, 14 Feb 2019 23:54:25 +0000 (23:54 +0000)] 
* config/i386/i386.h (TARGET_SUBTARGET64_ISA_DEFAULT):
Enable MMX, SSE and SSE2 by default.
* config/i386/i386.c (ix86_option_override_internal): Do not
explicitly set MMX, SSE and SSE2 flags for TARGET_64BIT here.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268917 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago PR rtl-optimization/89354
jakub [Thu, 14 Feb 2019 23:10:47 +0000 (23:10 +0000)] 
PR rtl-optimization/89354
* combine.c (make_extraction): Punt if extraction_mode is narrower
than len bits.

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

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268913 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago * gcc.target/i386/ssse3-pabsb.c: Re-enable 64-bit form on AVX targets.
uros [Thu, 14 Feb 2019 21:54:36 +0000 (21:54 +0000)] 
* gcc.target/i386/ssse3-pabsb.c: Re-enable 64-bit form on AVX targets.
* gcc.target/i386/ssse3-pabsd.c: Ditto.
* gcc.target/i386/ssse3-pabsw.c: Ditto.
* gcc.target/i386/ssse3-palignr.c: Ditto.
* gcc.target/i386/ssse3-phaddd.c: Ditto.
* gcc.target/i386/ssse3-phaddsw.c: Ditto.
* gcc.target/i386/ssse3-phaddw.c: Ditto.
* gcc.target/i386/ssse3-phsubd.c: Ditto.
* gcc.target/i386/ssse3-phsubsw.c: Ditto.
* gcc.target/i386/ssse3-phsubw.c: Ditto.
* gcc.target/i386/ssse3-pmaddubsw.c: Ditto.
* gcc.target/i386/ssse3-pmulhrsw.c: Ditto.
* gcc.target/i386/ssse3-pshufb.c: Ditto.
* gcc.target/i386/ssse3-psignb.c: Ditto.
* gcc.target/i386/ssse3-psignd.c: Ditto.
* gcc.target/i386/ssse3-psignw.c: Ditto.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268907 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoPR 81552 Improve and document -flag-init-integer
jb [Thu, 14 Feb 2019 21:33:29 +0000 (21:33 +0000)] 
PR 81552 Improve and document -flag-init-integer

Make the option handling code parse the -flag-init-integer value as a
C long type, allowing a larger range on systems where long is a larger
type than int.  Document the behavior.

Regtested on x86_64-pc-linux-gnu, committed as obvious.

2019-02-14  Janne Blomqvist  <jb@gcc.gnu.org>

        PR fortran/81552
        * gfortran.h (gfc_option_t): Make flag_init_integer_value a long.
        * options.c (gfc_handle_option): Use strtol instead of atoi.
        * invoke.texi: Document -finit-integer behavior in more detail

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268906 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoAdd netbsd support for D compiler and runtime
ibuclaw [Thu, 14 Feb 2019 21:25:39 +0000 (21:25 +0000)] 
Add netbsd support for D compiler and runtime

Merges upstream druntime fb4bda91.

2019-02-14  Maya Rashish  <coypu@sdf.org>

gcc/ChangeLog:

* config.gcc (*-*-netbsd*): Add netbsd-d.o
* config/netbsd-d.c: New file.
* config/t-netbsd: Add netbsd-d.o

gcc/d/ChangeLog:

* d-system.h: NetBSD is POSIX.

libphobos/ChangeLog:

* configure.tgt: Add netbsd/x86 as supported target.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268905 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago PR go/89321
ian [Thu, 14 Feb 2019 21:07:13 +0000 (21:07 +0000)] 
PR go/89321
    compiler: copy has_padding field from converted struct

    Test case is https://golang.org/cl/162617.

    Fixes https://gcc.gnu.org/PR89321

    Reviewed-on: https://go-review.googlesource.com/c/162618

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268904 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago2018-02-14 Steve Ellcey <sellcey@marvell.com>
sje [Thu, 14 Feb 2019 21:05:48 +0000 (21:05 +0000)] 
2018-02-14  Steve Ellcey  <sellcey@marvell.com>

* gcc.target/aarch64/pcs_attribute.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268903 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago2018-02-14 Steve Ellcey <sellcey@marvell.com>
sje [Thu, 14 Feb 2019 21:04:12 +0000 (21:04 +0000)] 
2018-02-14  Steve Ellcey  <sellcey@marvell.com>

* config/aarch64/aarch64.c (aarch64_attribute_table): Change
affects_type_identity to true for aarch64_vector_pcs.
(aarch64_comp_type_attributes): New function.
(TARGET_COMP_TYPE_ATTRIBUTES): New macro.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268902 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago * da.po: Update.
jsm28 [Thu, 14 Feb 2019 20:50:51 +0000 (20:50 +0000)] 
* da.po: Update.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268901 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago * da.po: Update.
jsm28 [Thu, 14 Feb 2019 20:49:37 +0000 (20:49 +0000)] 
* da.po: Update.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268900 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago2019-02-14 Harald Anlauf <anlauf@gmx.de>
anlauf [Thu, 14 Feb 2019 20:24:54 +0000 (20:24 +0000)] 
2019-02-14  Harald Anlauf  <anlauf@gmx.de>

PR fortran/88248
* symbol.c: Move check for labeled DO statement from
gfc_define_st_label to gfc_reference_st_label.

PR fortran/88248
* gfortran.dg/pr88248.f90: New test.
* gfortran.dg/f2018_obs.f90: Updated test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268895 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago compiler: check duplicate string keys in map composite literals
ian [Thu, 14 Feb 2019 19:26:20 +0000 (19:26 +0000)] 
compiler: check duplicate string keys in map composite literals

    Updates golang/go#28104

    Reviewed-on: https://go-review.googlesource.com/c/161357

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268891 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoArm: Fix testism in pr88850 testcase.
tnfchris [Thu, 14 Feb 2019 18:29:06 +0000 (18:29 +0000)] 
Arm: Fix testism in pr88850 testcase.

gcc/testsuite/ChangeLog:

* gcc.target/arm/pr88850.c: change options to additional option.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268887 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoProvide __start_minfo/__stop_minfo for linkers that don't (PR d/87864)
ro [Thu, 14 Feb 2019 17:47:49 +0000 (17:47 +0000)] 
Provide __start_minfo/__stop_minfo for linkers that don't (PR d/87864)

libphobos:
PR d/87864
* configure.ac (DRTSTUFF_SPEC): New variable.
Substitute it.
* libdruntime/m4/druntime/os.m4 (DRUNTIME_OS_MINFO_BRACKETING):
New automake conditional.
* configure: Regenerate.
* libdruntime/gcc/drtstuff.c: New file.
* libdruntime/Makefile.am [!DRUNTIME_OS_MINFO_BRACKETING]
(DRTSTUFF, toolexeclib_DATA): New variables.
(gcc/drtbegin.lo, gcc/drtend.lo): New rules.
(libgdruntime_la_LDFLAGS): Use -Wc instead of -Xcompiler.
Add -dstartfiles -B../src -Bgcc.
(libgdruntime_la_DEPENDENCIES): New variable.
(unittest_static_LDFLAGS): Use -Wc instead of -Xcompiler.
(libgdruntime_t_la_LDFLAGS): Likewise.
(unittest_LDFLAGS): Likewise.
* src/Makefile.am (libgphobos_la_LDFLAGS): Use -Wc instead of
-Xcompiler.
Add -dstartfiles -B../libdruntime/gcc.
(unittest_static_LDFLAGS): Use -Wc instead of -Xcompiler.
(libgphobos_t_la_LDFLAGS): Likewise.
(unittest_LDFLAGS): Likewise.
* libdruntime/Makefile.in, src/Makefile.in: Regenerate.
* Makefile.in, testsuite/Makefile.in: Regenerate.
* libdruntime/rt/sections_elf_shared.d (Minfo_Bracketing): Don't
assert.
* libdruntime/gcc/config.d.in (Minfo_Bracketing): Remove.
* src/drtstuff.spec: New file.
* src/libgphobos.spec.in (DRTSTUFF_SPEC): Substitute.
(*lib): Only pass SPEC_PHOBOS_DEPS without -debuglib, -defaultlib,
-nophoboslib.
* testsuite/testsuite_flags.in <--gdcldflags> (GDCLDFLAGS): Add
-B${BUILD_DIR}/libdruntime/gcc.

gcc/d:
PR d/87864
* lang.opt (dstartfiles): New option.
* d-spec.cc (need_spec): New variable.
(lang_specific_driver) <OPT_dstartfiles>: Enable need_spec.
(lang_specific_pre_link): Also load libgphobos.spec if need_spec.

gcc/testsuite:
PR d/87864
* lib/gdc.exp (gdc_link_flags): Add path to drtbegin.o/drtend.o if
present.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268886 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoUpdate libstdc++ documentation for C++2a implementation status
redi [Thu, 14 Feb 2019 17:46:26 +0000 (17:46 +0000)] 
Update libstdc++ documentation for C++2a implementation status

* doc/xml/manual/status_cxx2020.xml: Update P0887R1 status.
* doc/html/*: Regenerate.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268885 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoArm: Add HF modes to ANY iterators
tnfchris [Thu, 14 Feb 2019 17:17:20 +0000 (17:17 +0000)] 
Arm: Add HF modes to ANY iterators

The iterator ANY64 are used in various general split patterns and is supposed
to contain all 64 bit modes.

For some reason the pattern has HI but not HF.  This adds HF so that general
64 bit splits are generated for these modes as well.  These are required
by various split patterns that expect them to be there.

gcc/ChangeLog:

PR target/88850
* config/arm/iterators.md (ANY64): Add V4HF.

gcc/testsuite/ChangeLog:

PR target/88850
* gcc.target/arm/pr88850-2.c: New test.
* lib/target-supports.exp
(check_effective_target_arm_neon_softfp_fp16_ok_nocache,
check_effective_target_arm_neon_softfp_fp16_ok,
add_options_for_arm_neon_softfp_fp16): New.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268884 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoUpdate libstdc++ documentation for implementation status
redi [Thu, 14 Feb 2019 15:12:57 +0000 (15:12 +0000)] 
Update libstdc++ documentation for implementation status

* doc/xml/manual/status_cxx2017.xml: Add P0063R3 to status table.
* doc/html/*: Regenerate.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268883 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoDR 2586 fix value category in uses-allocator checks
redi [Thu, 14 Feb 2019 15:08:33 +0000 (15:08 +0000)] 
DR 2586 fix value category in uses-allocator checks

Because uses-allocator construction is invariably done with a const
lvalue the __uses_alloc helper should use a const lvalue for the
is_constructible checks. Otherwise, it can detect that the type can be
constructed from an rvalue, and then an error happens when a const
lvalue is passed to the constructor instead.

Prior to LWG DR 2586 scoped_allocator_adaptor incorrectly used an rvalue
type in the is_constructible check and then used a non-const lvalue for
the actual construction. The other components using uses-allocator
construction (tuple and polymorphic_allocator) have always done so with
a const lvalue allocator, although the use of __use_alloc in our
implementation meant they behaved the same as scoped_allocator_adaptor
and incorrectly used rvalues for the is_constructible checks.

In C++20 the P0591R4 changes mean that all uses-allocator construction
is defined in terms of the new uses_allocator_construction_args
functions, which always use a const lvalue allocator.

The changes in this patch ensure that the __use_alloc helper correctly
matches the requirements in the standard, consistently using a const
lvalue allocator for the is_constructible checks and the actual
constructor arguments.

* doc/xml/manual/intro.xml: Document LWG 2586 status.
* include/bits/uses_allocator.h (__uses_alloc): Use const lvalue
allocator type in is_constructible checks.
* testsuite/20_util/scoped_allocator/69293_neg.cc: Adjust dg-error.
* testsuite/20_util/scoped_allocator/dr2586.cc: New test.
* testsuite/20_util/tuple/cons/allocators.cc: Add test using
problematic type from LWG 2586 discussion.
* testsuite/20_util/uses_allocator/69293_neg.cc: Adjust dg-error.
* testsuite/20_util/uses_allocator/cons_neg.cc: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268882 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoWhen this testcase was introduced it failed to account for the possibility of
matmal01 [Thu, 14 Feb 2019 14:51:46 +0000 (14:51 +0000)] 
When this testcase was introduced it failed to account for the possibility of
targets that do not support arm mode or that do not support the ldrd/strd
instructions.

This patch accounts for both of these by adding some
dg-require-effective-target lines to the testcase.

This patch also adds a new effective-target procedure to check a target
supports ldrd/strd.

This patch also adds a new effective-target procedure to check a target
supports arm ldrd/strd.
The check uses the 'r' constraint to ensure SP is not used so that it will work
for thumb mode code generation as well as arm mode.

Tested by running this testcase with cross compilers using "-march=armv5t",
"-mcpu=cortex-m3", "-mcpu-arm7tdmi", "-mcpu=cortex-a9 -march=armv5t" for both
arm-none-eabi and arm-none-linux-gnueabihf.
Also ran this testcase with `make check` natively.

gcc/testsuite/ChangeLog:

2019-02-14  Matthew Malcomson  <matthew.malcomson@arm.com>

* gcc.dg/rtl/arm/ldrd-peepholes.c: Restrict testcase.
* lib/target-supports.exp: Add procedure to check for ldrd.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268881 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago PR lto/88677
hubicka [Thu, 14 Feb 2019 14:49:03 +0000 (14:49 +0000)] 
PR lto/88677
Fix PR number.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268880 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoAdd std::timespec and std::timespec_get for C++17
redi [Thu, 14 Feb 2019 14:10:25 +0000 (14:10 +0000)] 
Add std::timespec and std::timespec_get for C++17

* configure.ac: Check for C11 timespec_get function.
* crossconfig.m4 (freebsd, linux, gnu, cygwin, solaris, netbsd)
(openbsd): Likewise
* config.h.in: Regenerate.
* configure: Regenerate.
* include/c_global/ctime (timespec, timespec_get): Add to namespace
std for C++17 and up.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268879 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoLWG 2537 fix priority_queue constructors to establish invariant
redi [Thu, 14 Feb 2019 14:10:19 +0000 (14:10 +0000)] 
LWG 2537 fix priority_queue constructors to establish invariant

This change is safe to make now (in stage 4), because the constructors
are currently incorrect and unusable (unless the supplied container
already contains a heap, in which case the new make_heap calls are
redundant but harmless).

* doc/xml/manual/intro.xml: Document LWG 2537 status.
* include/bits/stl_queue.h
(priority_queue(const Compare&, const Container&, const Alloc&))
(priority_queue(const Compare&, Container&&, const Alloc&)): Call
make_heap.
* testsuite/23_containers/priority_queue/dr2537.cc: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268878 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoEnforce LWG DR 2566 requirement for container adaptors
redi [Thu, 14 Feb 2019 14:10:12 +0000 (14:10 +0000)] 
Enforce LWG DR 2566 requirement for container adaptors

Although there is no good use for stack<int, deque<double>> or similar
types with a mismatched value_type, it's possible somebody is doing that
and getting away with it currently. This patch only enforces the new
requirement for C++17 and later. During stage 1 we should consider
enforcing it for C++11 and C++14.

* doc/xml/manual/intro.xml: Document LWG 2566 status.
* include/bits/stl_queue.h (queue, priority_queue): Add static
assertions to enforce LWG 2566 requirement on value_type.
* include/bits/stl_stack.h (stack): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268877 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoFix PR72715 "ICE in gfc_trans_omp_do, at fortran/trans-openmp.c:3164"
tschwinge [Thu, 14 Feb 2019 13:44:19 +0000 (13:44 +0000)] 
Fix PR72715 "ICE in gfc_trans_omp_do, at fortran/trans-openmp.c:3164"

The OpenACC 'resolve_oacc_nested_loops' function duplicates most code of the
OpenMP 'resolve_omp_do', but didn't include the PR60127 "ICE with OpenMP and DO
CONCURRENT" (trunk r210331) changes.  (Probably the two functions should be
unified?)

The Fortran DO CONCURRENT construct is a way to tell the compiler that loop
iterations don't have any interdependencies -- which is information that would
very well be suitable for OpenACC/OpenMP loops.  There are some "details"
however, see the discussion/references in PR60127, so for the time being, make
this a compile-time error instead of an ICE.

gcc/fortran/
* openmp.c (resolve_oacc_nested_loops): Error on do concurrent
loops.

gcc/testsuite/
* gfortran.dg/goacc/loop-3-2.f95: Error on do concurrent loops.
* gfortran.dg/goacc/loop-3.f95: Likewise.
* gfortran.dg/goacc/pr72715.f90: New test.

Reviewed-by: Thomas Schwinge <thomas@codesourcery.com>
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268875 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoCall free_dominance_info when transformed in DCE (PR rtl-optimization/89242).
marxin [Thu, 14 Feb 2019 11:30:58 +0000 (11:30 +0000)] 
Call free_dominance_info when transformed in DCE (PR rtl-optimization/89242).

2019-02-14  Martin Liska  <mliska@suse.cz>

PR rtl-optimization/89242
* dce.c (delete_unmarked_insns): Call free_dominance_info we
process a transformation.
2019-02-14  Martin Liska  <mliska@suse.cz>

PR rtl-optimization/89242
* g++.dg/pr89242.C: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268873 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoPR middle-end/89303 add testcase for std::enable_shared_from_this
redi [Thu, 14 Feb 2019 09:40:02 +0000 (09:40 +0000)] 
PR middle-end/89303 add testcase for std::enable_shared_from_this

* testsuite/20_util/enable_shared_from_this/89303.cc: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268869 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago PR tree-optimization/89314
jakub [Thu, 14 Feb 2019 09:25:01 +0000 (09:25 +0000)] 
PR tree-optimization/89314
* fold-const.c (fold_binary_loc): Cast strlen argument to
const char * before dereferencing it.  Formatting fixes.

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

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268868 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoDocument LWG 2735 status and add test
redi [Thu, 14 Feb 2019 09:07:09 +0000 (09:07 +0000)] 
Document LWG 2735 status and add test

This DR was already resolved for GCC 7.1 by the implementation of DR
2192, but we didn't have an explicit test for the behaviour that 2735
guarantees.

* doc/xml/manual/intro.xml: Document LWG 2735 status.
* include/bits/std_abs.h: Add comment about LWG 2735.
* testsuite/26_numerics/headers/cstdlib/dr2735.cc: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268867 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago PR middle-end/89284
jakub [Thu, 14 Feb 2019 07:31:14 +0000 (07:31 +0000)] 
PR middle-end/89284
* passes.def: Swap pass_ubsan and pass_early_warn_uninitialized.

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

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268862 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago * go-gcc.cc: #include "opts.h".
ian [Thu, 14 Feb 2019 01:21:03 +0000 (01:21 +0000)] 
* go-gcc.cc: #include "opts.h".
(Gcc_backend::function): Compile thunks with -Os.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268861 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agogcc/:
ian [Thu, 14 Feb 2019 00:25:40 +0000 (00:25 +0000)] 
gcc/:
* optc-save-gen.awk: Set var_opt_hash for initial optimizations
and set current index for other optimizations.
gcc/testsuite/:
* gcc.dg/func-attr-1.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268860 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoDaily bump.
gccadmin [Thu, 14 Feb 2019 00:16:38 +0000 (00:16 +0000)] 
Daily bump.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268859 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoPR libstdc++/89345 Only define std::destroying_delete for C++2a
redi [Wed, 13 Feb 2019 22:13:45 +0000 (22:13 +0000)] 
PR libstdc++/89345 Only define std::destroying_delete for C++2a

Clang defines the __cpp_impl_destroying_delete macro unconditionally, so
that the feature is supported whenever the library type is defined. This
is incompatible with the current definition in libstdc++ because we use
constexpr and inline variables, which will give an error for older -std
modes.

This patch defines the destroying_delete_t type and destroying_delete
variable independently of the __cpp_impl_destroying_delete macro, but
only for C++2a (because the names aren't reserved for previous
standards). The __cpp_lib_destroying_delete macro is only defined when
both the library type and compiler macro are defined (i.e. when the type
can actually be used as intended).

PR libstdc++/89345
* include/std/version [__cpp_impl_destroying_delete]
(__cpp_lib_destroying_delete): Only define for C++2a and later.
* libsupc++/new [__cpp_impl_destroying_delete]
(__cpp_lib_destroying_delete): Likewise.
(destroying_delete_t, destroying_delete): Likewise, but define even
when __cpp_impl_destroying_delete is not defined.
* testsuite/18_support/destroying_delete.cc: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268856 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago * config/i386/sse.md (vec_set<VI4F_256_512:mode>_0): Use
uros [Wed, 13 Feb 2019 21:51:41 +0000 (21:51 +0000)] 
* config/i386/sse.md (vec_set<VI4F_256_512:mode>_0): Use
nonimmediate_operand as operand 2 predicate.
(vec_set<VF2_512_256:mode>_0): Ditto.
(vec_set<VI8_AVX_AVX512F:mode>_0): Ditto.
(*vec_concatv2si): Remove alternative 2.
(*vec_concatv4si_0): Use vm constraint for alternative 0.
(*vec_concatv4si_0): Remove preferred_for_speed attribute.
(vec_concatv2di): Split alternatives 4,5,6 to ...
(*vec_concatv2di_0) ... new pattern.

testsuite/ChangeLog:

* gcc.target/i386/sse2-init-v2di-2.c (dg-final): Update scan string.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268855 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago PR c++/89297 - ICE with OVERLOAD in template.
mpolacek [Wed, 13 Feb 2019 21:39:18 +0000 (21:39 +0000)] 
PR c++/89297 - ICE with OVERLOAD in template.
* semantics.c (finish_compound_literal): Call
instantiate_non_dependent_expr_sfinae.

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

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268854 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago[PR86379] do not use TREE_TYPE for USING_DECL_SCOPE
aoliva [Wed, 13 Feb 2019 19:08:52 +0000 (19:08 +0000)] 
[PR86379] do not use TREE_TYPE for USING_DECL_SCOPE

It's too risky to reuse the type field for USING_DECL_SCOPE.
Language-independent parts of the compiler, such as location and
non-lvalue wrappers, happily take the TREE_TYPE of a USING_DECL as if
it was a type rather than an unrelated scope.

For better or worse, USING_DECLs use the non-common struct so we can
use the otherwise unused result field.  Adjust fallout, from uses of
TREE_TYPE that were supposed to be USING_DECL_SCOPE, to other
accidental uses of TREE_TYPE of a USING_DECL.

for  gcc/cp/ChangeLog

PR c++/86379
* cp-tree.h (USING_DECL_SCOPE): Use result rather than type.
* name-lookup.c (strip_using_decl): Use USING_DECL_SCOPE.
* search.c (protected_accessible_p): Follow USING_DECL_DECLS.
(shared_member_p): Likewise.
(lookup_member): Likewise.
* decl.c (grok_special_member_properties): Skip USING_DECLs.
* semantics.c (finish_omp_declare_simd_methods): Likewise.
(finish_qualified_id_expr): Do not call shared_member_p with
a dependent expr.

for  gcc/testsuite/ChangeLog

PR c++/86379
* g++.dg/cpp0x/pr86379.C: New.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268851 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago[PR87322] move cp_evaluated up to tsubst all lambda parms
aoliva [Wed, 13 Feb 2019 17:42:39 +0000 (17:42 +0000)] 
[PR87322] move cp_evaluated up to tsubst all lambda parms

A lambda capture variable initialized with a lambda expr taking more
than one parameter got us confused.

The first problem was that the parameter list was cut short during
tsubsting because we tsubsted it with cp_unevaluated_operand.  We
reset it right after, to tsubst the function body, so I've moved the
reset up so that it's in effect while processing the parameters as
well.

The second problem was that the lambda expr appeared twice, once in a
decltype that gave the capture variable its type, and once in its
initializer.  This caused us to instantiate two separate lambda exprs
and closure types, and then to flag that the lambda expr in the
initializer could not be converted to the unrelated closure type
determined for the capture variable.  Recording the tsubsted expr in
the local specialization map, and retrieving it for reuse fixed it.
However, that required some care to avoid reusing the lambda expr
across different indices in pack expansions.

for  gcc/cp/ChangeLog

PR c++/87322
* pt.c (tsubst_lambda_expr): Avoid duplicate tsubsting.
Move cp_evaluated resetting before signature tsubsting.
(gen_elem_of_pack_expansion_instantiation): Separate local
specializations per index.

for  gcc/testsuite/ChangeLog

PR c++/87322
* g++.dg/cpp1y/pr87322.C: New.
* g++.dg/cpp0x/lambda/lambda-variadic5.C: Test that we
instantiate the expected number of lambda functions.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268850 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago PR c++/77304
mpolacek [Wed, 13 Feb 2019 16:35:44 +0000 (16:35 +0000)] 
PR c++/77304
* g++.dg/cpp2a/nontype-class13.C: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268849 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago[ARM] Fix Thumb-1 ldm (PR89190)
wilco [Wed, 13 Feb 2019 16:22:25 +0000 (16:22 +0000)] 
[ARM] Fix Thumb-1 ldm (PR89190)

This patch fixes an ICE in the Thumb-1 LDM peepholer.  Thumb-1 LDMs
always update the base register except if the base is loaded.
The current implementation rejects LDMs where the base is not dead,
however this doesn't exclude the case where the base is loaded as
well as dead.  Fix this by explicitly checking whether the base is
loaded.  Also enable LDMs which load the first register.

    gcc/
PR target/89190
* config/arm/arm.c (ldm_stm_operation_p) Set
addr_reg_in_reglist correctly for first register.
(load_multiple_sequence): Remove dead base check.
(gen_ldm_seq): Correctly set write_back for Thumb-1.

    testsuite/
PR target/89190
* gcc.target/arm/pr89190.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268848 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoC++ concepts: fix ICE with requires on dtors (PR c++/89036)
dmalcolm [Wed, 13 Feb 2019 15:48:37 +0000 (15:48 +0000)] 
C++ concepts: fix ICE with requires on dtors (PR c++/89036)

PR c++/89036 reports an ICE due to this assertion failing

1136   /* A class should never have more than one destructor.  */
1137   gcc_assert (!current_fns || via_using || !DECL_DESTRUCTOR_P (method));

on this template with a pair of dtors, with
mutually exclusive "requires" clauses:

template<typename T>
struct Y {
    ~Y() requires(true) = default;
    ~Y() requires(false) {}
};

Nathan introduced this assertion as part of:

  ca9219bf18c68a001d62ecb981bc9176b0feaf12 (aka r251340):
    2017-08-24  Nathan Sidwell  <nathan@acm.org>
       Conversion operators kept on single overload set

which, amongst other changes to add_method had this:
     /* A class should never have more than one destructor.  */
  -  if (current_fns && DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P (method))
  -    return false;
  +  gcc_assert (!current_fns || !DECL_DESTRUCTOR_P (method));

The following patch drops the assertion (I already had to generalize
the assertion in r268041 to fix PR c++/88699).

gcc/cp/ChangeLog:
PR c++/89036
* class.c (add_method): Drop destructor assertion.

gcc/testsuite/ChangeLog:
PR c++/89036
* g++.dg/concepts/pr89036.C: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268847 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoAArch64: Allow any offset for SVE addressing modes before reload.
tnfchris [Wed, 13 Feb 2019 14:04:41 +0000 (14:04 +0000)] 
AArch64: Allow any offset for SVE addressing modes before reload.

On AArch64 aarch64_classify_address has a case for when it's non-strict
that will allow it to accept any byte offset from a reg when validating
an address in a given addressing mode.

This because reload would later make the address valid. SVE however requires
the address always be valid, but currently allows any address when a MEM +
offset is used.  This causes an ICE as nothing later forces the address to be
legitimate.

The patch forces aarch64_emit_sve_pred_move via expand_insn to ensure that
the addressing mode is valid for any loads/stores it creates, which follows
the SVE way of handling address classifications.

gcc/ChangeLog:

PR target/88847
* config/aarch64/aarch64-sve.md (*pred_mov<mode>, pred_mov<mode>):
Expose as @aarch64_pred_mov.
* config/aarch64/aarch64.c (aarch64_classify_address):
Use expand_insn which legitimizes operands.

gcc/testsuite/ChangeLog:

PR target/88847
* gcc.target/aarch64/sve/pr88847.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268845 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoClean up MPX-related stuff.
marxin [Wed, 13 Feb 2019 13:49:34 +0000 (13:49 +0000)] 
Clean up MPX-related stuff.

2019-02-13  Martin Liska  <mliska@suse.cz>

* builtins.h (expand_builtin_with_bounds): Remove declaration.
* calls.c (struct arg_data): Remove special_slot, pointer_arg
and pointer_offset fields.
(initialize_argument_information): Remove usage of dead
fields.
* cgraph.h (struct cgraph_thunk_info): Remove
add_pointer_bounds_args.
* cgraphunit.c (cgraph_node::expand_thunk): Remove usage of dead
fields.
(cgraph_node::assemble_thunks_and_aliases): Remove usage of dead
fields.
* config/i386/i386.c (ix86_function_arg_advance): Remove
unrelated comment.
(struct builtin_isa): Remove leaf_p and nothrow_p fields.
(def_builtin):  Remove usage of dead
fields.
(ix86_add_new_builtins): Likewise.
* ipa-fnsummary.c (compute_fn_summary): Likewise.
* ipa-icf.c (sem_function::equals_wpa): Likewise.
(sem_function::init): Likewise.
(sem_variable::merge): Likewise.
* ipa-visibility.c (function_and_variable_visibility): Likewise.
* ipa.c (symbol_table::remove_unreachable_nodes): Likewise.
* lto-cgraph.c (lto_output_node): Likewise.
(lto_output_varpool_node): Likewise.
(input_node): Likewise.
(input_varpool_node): Likewise.
* lto-streamer-out.c (lto_output): Likewise.
* tree-inline.c (expand_call_inline): Remove usage of
assign_stmts.
* tree-inline.h (struct copy_body_data): Likewise.
* varpool.c (varpool_node::dump): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268844 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago2019-02-13 Jakub Jelinek <jakub@redhat.com>
jakub [Wed, 13 Feb 2019 13:32:00 +0000 (13:32 +0000)] 
2019-02-13  Jakub Jelinek  <jakub@redhat.com>

PR middle-end/89303
* tree-ssa-structalias.c (set_uids_in_ptset): Or in vi->is_heap_var
into pt->vars_contains_escaped_heap instead of setting
pt->vars_contains_escaped_heap to it.

2019-02-13  Jonathan Wakely  <jwakely@redhat.com>
    Jakub Jelinek  <jakub@redhat.com>

PR middle-end/89303
* g++.dg/torture/pr89303.C: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268843 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoFix -fdec simplification (PR fortran/88649).
marxin [Wed, 13 Feb 2019 13:04:56 +0000 (13:04 +0000)] 
Fix -fdec simplification (PR fortran/88649).

2019-02-13  Martin Liska  <mliska@suse.cz>

PR fortran/88649
* resolve.c (resolve_operator): Initialize 't' right
after function entry.  Skip switch (e->value.op.op)
for -fdec operands that become function calls.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268842 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago PR middle-end/89281
jakub [Wed, 13 Feb 2019 12:12:09 +0000 (12:12 +0000)] 
PR middle-end/89281
* optabs.c (prepare_cmp_insn): Use UINTVAL (size) instead of
INTVAL (size), compare it to GET_MODE_MASK instead of
1 << GET_MODE_BITSIZE.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268841 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago/cp
paolo [Wed, 13 Feb 2019 10:34:49 +0000 (10:34 +0000)] 
/cp
2019-02-13  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/88986
* decl.c (make_typename_type): Allow for TYPE_PACK_EXPANSION as
context (the first argument).
* pt.c (tsubst, case TYPENAME_TYPE): Handle TYPE_PACK_EXPANSION
as context.

/testsuite
2019-02-13  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/88986
* g++.dg/cpp1z/using4.C: New.
* g++.dg/cpp1z/using5.C: Likewise.
* g++.dg/cpp1z/using6.C: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268839 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago PR target/89290
jakub [Wed, 13 Feb 2019 08:45:37 +0000 (08:45 +0000)] 
PR target/89290
* config/i386/predicates.md (x86_64_immediate_operand): Allow
TLS UNSPECs offsetted by signed 32-bit CONST_INT even with
-mcmodel=large.

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

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268837 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agolibphobos: Fallback on UnwindBacktrace if LibBacktrace not defined.
ibuclaw [Wed, 13 Feb 2019 07:14:46 +0000 (07:14 +0000)] 
libphobos: Fallback on UnwindBacktrace if LibBacktrace not defined.

In the gcc.backtrace module, either one of LibBacktrace or
UnwindBacktrace will always be defined.  Giving UnwindBacktrace a higher
precedence over the libc backtrace as the default handler because the
latter depends on a rt.backtrace module that is not compiled in.

libphobos/ChangeLog:

* libdruntime/core/runtime.d (defaultTraceHandler): Give
UnwindBacktrace handler precedence over backtrace.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268836 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoRemove a barrier when EDGE_CROSSING is removed (PR lto/88858).
marxin [Wed, 13 Feb 2019 06:57:38 +0000 (06:57 +0000)] 
Remove a barrier when EDGE_CROSSING is removed (PR lto/88858).

2019-02-13  Martin Liska  <mliska@suse.cz>

PR lto/88858
* cfgrtl.c (remove_barriers_from_footer): New function.
(try_redirect_by_replacing_jump): Use it.
(cfg_layout_redirect_edge_and_branch): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268835 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agors6000: Add support for the vec_sbox_be, vec_cipher_be etc. builtins.
luoxhu [Wed, 13 Feb 2019 06:31:01 +0000 (06:31 +0000)] 
rs6000: Add support for the vec_sbox_be, vec_cipher_be etc. builtins.

The 5 new builtins vec_sbox_be, vec_cipher_be, vec_cipherlast_be, vec_ncipher_be
and vec_ncipherlast_be only support vector unsigned char type parameters.
Add new instruction crypto_vsbox_<mode> and crypto_<CR_insn>_<mode> to handle
them accordingly, where the new mode CR_vqdi can be expanded to vector unsigned
long long for none _be postfix builtins or vector unsigned char for _be postfix
builtins.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268834 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoDaily bump.
gccadmin [Wed, 13 Feb 2019 00:16:15 +0000 (00:16 +0000)] 
Daily bump.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268833 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago PR go/89193
ian [Wed, 13 Feb 2019 00:10:06 +0000 (00:10 +0000)] 
PR go/89193
* Makefile.am (mostlyclean-local): Avoid getting an error from
chmod.  Remove check-vet-dir and gocache-test.
* Makefile.in: Regenerate.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268830 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago * doc/invoke.texi (RS/6000 and PowerPC Options): Remove duplicate
pthaugen [Tue, 12 Feb 2019 22:03:00 +0000 (22:03 +0000)] 
* doc/invoke.texi (RS/6000 and PowerPC Options): Remove duplicate
-maltivec. Delete -maltivec=be and -maltivec=le documentation.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268829 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago syscall: don't assume that WIFCONTINUED is defined
ian [Tue, 12 Feb 2019 21:29:52 +0000 (21:29 +0000)] 
syscall: don't assume that WIFCONTINUED is defined

    It's not defined on the Hurd.

    Reviewed-on: https://go-review.googlesource.com/c/161963

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268828 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago PR c++/89144 - link error with constexpr initializer_list.
jason [Tue, 12 Feb 2019 21:18:51 +0000 (21:18 +0000)] 
PR c++/89144 - link error with constexpr initializer_list.

In this PR, we were unnecessarily rejecting a constexpr initializer_list
with no elements.  This seems like a fairly useless degenerate case, but it
makes sense to avoid allocating an underlying array at all if there are no
elements and instead use a null pointer, like the initializer_list default
constructor.

If the (automatic storage duration) list does have initializer elements, we
continue to reject the declaration, because the initializer_list ends up
referring to an automatic storage duration temporary array, which is not a
suitable constant initializer.  If we make it static, it should be OK
because we refer to a static array.  The second hunk fixes that case.  It
also means we won't diagnose some real errors in templates, but those
diagnostics aren't required, and we'll get them when the template is
instantiated.

* call.c (convert_like_real) [ck_list]: Don't allocate a temporary
array for an empty list.
* typeck2.c (store_init_value): Don't use cxx_constant_init in a
template.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268827 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoi386: Revert revision 268678 and revision 268657
hjl [Tue, 12 Feb 2019 19:00:35 +0000 (19:00 +0000)] 
i386: Revert revision 268678 and revision 268657

i386 backend has

INT_MODE (OI, 32);
INT_MODE (XI, 64);

So, XI_MODE represents 64 INTEGER bytes = 64 * 8 = 512 bit operation,
in case of const_1, all 512 bits set.

We can load zeros with narrower instruction, (e.g. 256 bit by inherent
zeroing of highpart in case of 128 bit xor), so TImode in this case.

Some targets prefer V4SF mode, so they will emit float xorps for zeroing

Then the introduction of AVX512F fubared everything by overloading the
meaning of insn mode.

How should we use INSN mode,  MODE_XI, in standard_sse_constant_opcode
and patterns which use standard_sse_constant_opcode? 2 options:

1.  MODE_XI should only used to check if EXT_REX_SSE_REG_P is true
in any register operand.  The operand size must be determined by operand
itself , not by MODE_XI.  The operand encoding size should be determined
by the operand size, EXT_REX_SSE_REG_P and AVX512VL.
2. MODE_XI should be used to determine the operand encoding size.
EXT_REX_SSE_REG_P and AVX512VL should be checked for encoding
instructions.

gcc/

PR target/89229
* config/i386/i386.md (*movoi_internal_avx): Revert revision
268678 and revision 268657.
(*movti_internal): Likewise.

gcc/testsuite/

PR target/89229
* gcc.target/i386/pr89229-1.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268811 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agolibphobos: Merge upstream phobos 791c5d240
ibuclaw [Tue, 12 Feb 2019 18:28:04 +0000 (18:28 +0000)] 
libphobos: Merge upstream phobos 791c5d240

Adds missing HPPA support in std.experimental.allocator.

Reviewed-on: https://github.com/dlang/phobos/pull/6838

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268810 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoS/390: Reject invalid Q/R/S/T addresses after LRA
iii [Tue, 12 Feb 2019 14:51:39 +0000 (14:51 +0000)] 
S/390: Reject invalid Q/R/S/T addresses after LRA

The following insn:

(insn (set (reg:DI %r2)
           (sign_extend:DI (mem:SI
            (const:DI (plus:DI (symbol_ref:DI ("*.LC0"))
                               (const_int 16)))))))

is correctly recognized by LRA as RIL alternative of extendsidi2
define_insn.  However, when recognition runs after LRA, it returns RXY
alternative, which is incorrect, since the offset 16 points past the
end of of *.LC0 literal pool entry.  Such addresses are normally
rejected by s390_decompose_address ().

This inconsistency confuses annotate_constant_pool_refs: the selected
alternative makes it proceed with annotation, only to find that the
annotated address is invalid, causing ICE.

This patch fixes the root cause, namely, that s390_check_qrst_address ()
behaves differently during and after LRA.

gcc/ChangeLog:

2019-02-12  Ilya Leoshkevich  <iii@linux.ibm.com>

PR target/89233
* config/s390/s390.c (s390_decompose_address): Update comment.
(s390_check_qrst_address): Reject invalid address forms after
LRA.

gcc/testsuite/ChangeLog:

2019-02-12  Ilya Leoshkevich  <iii@linux.ibm.com>

PR target/89233
* gcc.target/s390/pr89233.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268798 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago2018-01-12 Bill Schmidt <wschmidt@linux.ibm.com>
wschmidt [Tue, 12 Feb 2019 14:24:58 +0000 (14:24 +0000)] 
2018-01-12  Bill Schmidt  <wschmidt@linux.ibm.com>

* gcc.target/powerpc/vec-sld-modulo.c: Require p8vector_hw.
* gcc.target/powerpc/vec-srad-modulo.c: Likewise.
* gcc.target/powerpc/vec-srd-modulo.c: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268797 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago[libbacktrace] Handle bsearch with NULL base in dwarf_lookup_pc
vries [Tue, 12 Feb 2019 14:00:59 +0000 (14:00 +0000)] 
[libbacktrace] Handle bsearch with NULL base in dwarf_lookup_pc

The call to bsearch in dwarf_lookup_pc can have NULL as base argument when
the nmemb argument is 0.  The base argument is required to be pointing to the
initial member of an array of nmemb objects.  It is not specified what
constitutes a valid pointer to an array of 0 objects, but glibc declares base
with attribute non-null, so the NULL will trigger a sanitizer runtime error.

Fix this by only calling bsearch if nmemb != 0.

2019-02-12  Tom de Vries  <tdevries@suse.de>

PR libbacktrace/81983
* dwarf.c (dwarf_lookup_pc): Don't call bsearch if nmemb == 0.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268796 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoRevert a hunk from r261322 (PR lto/88876).
marxin [Tue, 12 Feb 2019 13:46:41 +0000 (13:46 +0000)] 
Revert a hunk from r261322 (PR lto/88876).

2019-02-12  Martin Liska  <mliska@suse.cz>

PR lto/88876
* ipa-pure-const.c (propagate_pure_const): Revert hunk as
we need default values of funct_state for a function that
is not optimized.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268795 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoFix splay tree KEY leak detected in GDB test gdb.base/macscp.exp
tromey [Tue, 12 Feb 2019 13:02:48 +0000 (13:02 +0000)] 
Fix splay tree KEY leak detected in GDB test gdb.base/macscp.exp

When a node is removed from a splay tree, the splay tree was
not using the function splay_tree_delete_key_fn to release the key.
This was causing a leak, fixed by Tom Tromey.

This patch fixes another key leak, that happens when a key equal to
a key already present is inserted.  In such a case, we have to release
the old KEY.
Note that this is based on the assumption that the caller always
allocates a new KEY when doing an insert.

Also, clarify the documentation about when the release functions are
called.

2019-02-11  Philippe Waroquiers  <philippe.waroquiers@skynet.be>

* splay-tree.h (splay_tree_delete_key_fn): Update comment.
(splay_tree_delete_value_fn): Likewise.

libiberty/ChangeLog
2019-02-11  Philippe Waroquiers  <philippe.waroquiers@skynet.be>

* splay-tree.c (splay_tree_insert): Also release old KEY in case
of insertion of a key equal to an already present key.
(splay_tree_new_typed_alloc): Update comment.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268793 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago * asan.c (asan_expand_mark_ifn): Take into account the alignment of
ebotcazou [Tue, 12 Feb 2019 12:23:08 +0000 (12:23 +0000)] 
* asan.c (asan_expand_mark_ifn): Take into account the alignment of
the object to pick the size of stores on strict-alignment platforms.

* config/sparc/sparc.md (*movsi_insn): Minor tweak.
(*movdi_insn_sp32): Likewise.
(*movdi_insn_sp64): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268792 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago PR lto/88777
hubicka [Tue, 12 Feb 2019 11:25:11 +0000 (11:25 +0000)] 
PR lto/88777
* cgraphunit.c (analyze_functions): Clear READONLY flag for external
types that needs constructiong.
* tree.h (may_be_aliased): Do not check TYPE_NEEDS_CONSTRUCTING.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268791 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago2019-02-12 Richard Biener <rguenther@suse.de>
rguenth [Tue, 12 Feb 2019 09:29:39 +0000 (09:29 +0000)] 
2019-02-12  Richard Biener  <rguenther@suse.de>

PR tree-optimization/89253
* tree-ssa-loop-split.c (tree_ssa_split_loops): Check we can
duplicate the loop.

* gfortran.dg/pr89253.f: New testcase.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268790 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agolinemap_line_start: protect against location_t overflow (PR lto/88147)
dmalcolm [Tue, 12 Feb 2019 01:09:31 +0000 (01:09 +0000)] 
linemap_line_start: protect against location_t overflow (PR lto/88147)

PR lto/88147 reports an assertion failure due to a bogus location_t value
when adding a line to a pre-existing line map, when there's a large
difference between the two line numbers.

For some "large differences", this leads to a location_t value that exceeds
LINE_MAP_MAX_LOCATION, in which case linemap_line_start returns 0.  This
isn't ideal, but at least should lead to safe degradation of location
information.

However, if the difference is very large, it's possible for the line
number offset (relative to the start of the map) to be sufficiently large
that overflow occurs when left-shifted by the column-bits, and hence
the check against the LINE_MAP_MAX_LOCATION limit fails, leading to
a seemingly-valid location_t value, but encoding the wrong location.  This
triggers the assertion failure:
  linemap_assert (SOURCE_LINE (map, r) == to_line);

The fix (thanks to Martin) is to check for overflow when determining
whether to reuse an existing map, and to not reuse it if it would occur.

gcc/ChangeLog: David Malcolm  <dmalcolm@redhat.com>
PR lto/88147
* input.c (selftest::test_line_offset_overflow): New selftest.
(selftest::input_c_tests): Call it.

libcpp/ChangeLog: Martin Liska  <mliska@suse.cz>
PR lto/88147
* line-map.c (linemap_line_start): Don't reuse the existing line
map if the line offset is sufficiently large to cause overflow
when computing location_t values.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268789 138bc75d-0d04-0410-961f-82ee72b054a4

5 years agoDaily bump.
gccadmin [Tue, 12 Feb 2019 00:16:20 +0000 (00:16 +0000)] 
Daily bump.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268788 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago mksysinfo: remove incorrect quotes in st_fsid handling for Hurd
ian [Tue, 12 Feb 2019 00:15:34 +0000 (00:15 +0000)] 
mksysinfo: remove incorrect quotes in st_fsid handling for Hurd

    Also stop converting st_dev on Hurd; it shouldn't appear, but if it
    somehow does we don't want to convert it.

    Reviewed-on: https://go-review.googlesource.com/c/161961

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268785 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago PR c++/89241 - ICE with __func__ in lambda in template.
jason [Mon, 11 Feb 2019 23:05:16 +0000 (23:05 +0000)] 
PR c++/89241 - ICE with __func__ in lambda in template.

When we're instantiating a generic lambda, its enclosing context will
have already been instantiated, so we need to look for that as well.

* pt.c (enclosing_instantiation_of): Also check
instantiated_lambda_fn_p for the template context.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268784 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago PR c++/89212 - ICE converting nullptr to pointer-to-member-function.
mpolacek [Mon, 11 Feb 2019 20:03:43 +0000 (20:03 +0000)] 
PR c++/89212 - ICE converting nullptr to pointer-to-member-function.
* pt.c (tsubst_copy_and_build) <case CONSTRUCTOR>: Return early for
null member pointer value.

* g++.dg/cpp0x/nullptr40.C: New test.
* g++.dg/cpp0x/nullptr41.C: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268781 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago PR c++/88977
jakub [Mon, 11 Feb 2019 20:00:16 +0000 (20:00 +0000)] 
PR c++/88977
* pt.c (convert_nontype_argument): Pass true as manifestly_const_eval
to maybe_constant_value calls.

* g++.dg/cpp2a/is-constant-evaluated7.C: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268780 138bc75d-0d04-0410-961f-82ee72b054a4

5 years ago * typeck2.c (digest_init_r): Remove commented code.
mpolacek [Mon, 11 Feb 2019 19:46:54 +0000 (19:46 +0000)] 
* typeck2.c (digest_init_r): Remove commented code.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@268779 138bc75d-0d04-0410-961f-82ee72b054a4