[C++ PATCH] [PR87768] do not suppress location wrappers when tsubsting

2018-12-30 Thread Alexandre Oliva
Concepts-checking and other kinds of early tsubsting may often take place while location wrappers are suppressed, e.g. because we've triggered template instantiation within template parameter lists. With that, exprs that are usually wrapped by VIEW_CONVERT_EXPRs location wrappers may end up wrappe

Re: [PATCH] PR target/86814

2018-12-30 Thread augustine.sterl...@gmail.com
On Sun, Dec 30, 2018 at 1:06 AM Max Filippov wrote: > > Xtensa architecture is not affected by speculation. > > gcc/ > 2018-12-30 Max Filippov > > * config/xtensa/xtensa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): > Define to speculation_safe_value_not_needed. Approved.

[committed] Minor logic cleanup in get_range_strlen

2018-12-30 Thread Jeff Law
Just a trivial cleanup from Martin's work. if (x == CONST) do something; else return value; Turns into if (x != CONST) return value; do something; Again no behavior changes, but makes it easier to find the nuggets in the rest of Martin's work. Bootstrapped, regression tested on x86_64

[committed] Replace type/fuzzy arguments with a single enum

2018-12-30 Thread Jeff Law
This is another chunk of Martin's work that I've extracted. It removes the "type" and "fuzzy" parameters we pass to get_range_strlen and replaces them with a strlen_range_kind enum. Mostly this cleans up the API and avoids the possibility of bogus combinations of "type" and "fuzzy". It has one e

Re: [patch, fortran] Handle missing optional MASK for intrinsics

2018-12-30 Thread Steve Kargl
On Sun, Dec 30, 2018 at 09:37:20AM -0800, Steve Kargl wrote: > On Sun, Dec 30, 2018 at 06:10:14PM +0100, Thomas Koenig wrote: > > > + { > > + tree present; > > + tree type; > > + > > + type = TREE_TYPE (maskse.expr); > > + present = gfc_conv_expr_present (maskexpr->symtree->n.sym

Re: [PATCH] fortran/88342 -- interaction of -ffpe-trap and IEEE_VALUE

2018-12-30 Thread Steve Kargl
On Sun, Dec 30, 2018 at 09:32:43AM -0800, H.J. Lu wrote: > On Sun, Dec 30, 2018 at 9:09 AM Steve Kargl > wrote: > > > > On Sun, Dec 30, 2018 at 08:06:40AM -0800, H.J. Lu wrote: > > > > > > > > OK Steve, thanks. > > > > > > The test fails on Linux/x86: > > > > > > https://gcc.gnu.org/bugzilla/show_

Re: [patch, fortran] Handle missing optional MASK for intrinsics

2018-12-30 Thread Steve Kargl
On Sun, Dec 30, 2018 at 06:10:14PM +0100, Thomas Koenig wrote: > Index: gcc/fortran/trans-expr.c > === > --- gcc/fortran/trans-expr.c (Revision 267347) > +++ gcc/fortran/trans-expr.c (Arbeitskopie) > @@ -5760,17 +5760,21 @@ gfc_conv

Re: [PATCH] fortran/88342 -- interaction of -ffpe-trap and IEEE_VALUE

2018-12-30 Thread H.J. Lu
On Sun, Dec 30, 2018 at 9:09 AM Steve Kargl wrote: > > On Sun, Dec 30, 2018 at 08:06:40AM -0800, H.J. Lu wrote: > > > > > > OK Steve, thanks. > > > > The test fails on Linux/x86: > > > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88639 > > > > The test works on both i586-*-freebsd and x86_64-*-f

Re: [PATCH] fortran/88342 -- interaction of -ffpe-trap and IEEE_VALUE

2018-12-30 Thread Steve Kargl
On Sun, Dec 30, 2018 at 08:06:40AM -0800, H.J. Lu wrote: > > > > OK Steve, thanks. > > The test fails on Linux/x86: > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88639 > The test works on both i586-*-freebsd and x86_64-*-freebsd. What does -- Steve

Re: V2 [PATCH] i386: Add pass_remove_partial_avx_dependency

2018-12-30 Thread H.J. Lu
k; } [hjl@gnu-cfl-1 pr87007]$ make test2.s /export/build/gnu/tools-build/gcc-debug/build-x86_64-linux/gcc/xgcc -B/export/build/gnu/tools-build/gcc-debug/build-x86_64-linux/gcc/ -O2 -mavx -S test2.i [hjl@gnu-cfl-1 pr87007]$ cat test2.s .file "test2.i" .text .p2align 4 .globl foo .type foo, @function foo: .LFB0: .cfi_startproc vmovss .LC0(%rip), %xmm0 cmpl $1, %edi je .L15 vmovss .LC1(%rip), %xmm0 cmpl $4, %edi je .L15 vxorps %xmm0, %xmm0, %xmm0 testl %edi, %edi je .L3 leal -1(%rdi), %ecx xorl %eax, %eax jmp .L6 .p2align 4,,10 .p2align 3 .L17: vcvtsi2ss i1(,%rax,4), %xmm0, %xmm1 leaq 1(%rax), %rdx vmovss %xmm1, f1(,%rax,4) cmpq %rcx, %rax je .L3 .L9: movq %rdx, %rax .L6: cmpl $100, (%rsi,%rax,4) jg .L17 vcvtsi2ss i2(,%rax,4), %xmm0, %xmm1 leaq 1(%rax), %rdx vmovss %xmm1, f2(,%rax,4) cmpq %rcx, %rax jne .L9 .L3: vcvtsi2ss %edi, %xmm0, %xmm0 .L15: ret .cfi_endproc .LFE0: .size foo, .-foo .section .rodata.cst4,"aM",@progbits,4 .align 4 .LC0: .long 1065353216 .align 4 .LC1: .long 1084227584 .ident "GCC: (GNU) 9.0.0 20181230 (experimental)" .section .note.GNU-stack,"",@progbits [hjl@gnu-cfl-1 pr87007]$ The placement is optimal. -- H.J.

Re: V2 [PATCH] i386: Add pass_remove_partial_avx_dependency

2018-12-30 Thread H.J. Lu
On Wed, Nov 28, 2018 at 12:17 PM Jeff Law wrote: > > On 11/28/18 12:48 PM, H.J. Lu wrote: > > On Mon, Nov 5, 2018 at 7:29 AM Jan Hubicka wrote: > >> > >>> On 11/5/18 7:21 AM, Jan Hubicka wrote: > > > > Did you mean "the nearest common dominator"? > > If the nearest common domina

C++ PATCH for c++/88631, CTAD failing for value-initialization

2018-12-30 Thread Marek Polacek
This PR points out that while we are able to deduce the template arguments for A{}, we fail for A(). For A{}, the deduction happens in finish_compound_literal: 2789 if (tree anode = type_uses_auto (type)) 2790 if (CLASS_PLACEHOLDER_TEMPLATE (anode)) 2791 { 2792 type = do_auto_d

Re: [PATCH] fortran/88342 -- interaction of -ffpe-trap and IEEE_VALUE

2018-12-30 Thread H.J. Lu
On Fri, Dec 28, 2018 at 4:38 PM Jerry DeLisle wrote: > > On 12/28/18 10:43 AM, Steve Kargl wrote: > > Ping. > > > > On Mon, Dec 24, 2018 at 11:59:50AM -0800, Steve Kargl wrote: > >> All, > >> > >> The IEEE modules and -ffpe-trap are to some extent orthogonal > >> features of gfortran. Unfortunate

[PATCH] Check requested alignment in SET_{DECL,TYPE}_ALIGN is pow2_or_zerop before aligning on targets with partial int modes

2018-12-30 Thread Jozef Lawrynowicz
There have been some ICEs in the past for msp430-elf with the large memory model (20-bit pointers), caused by SET_{DECL,TYPE}_ALIGN being called with an argument which resolves to 20 i.e. POINTER_SIZE, or the default value of TARGET_VTABLE_ENTRY_ALIGN (which is POINTER_SIZE). The attached patch ad

[PATCH] PR target/86814

2018-12-30 Thread Max Filippov
Xtensa architecture is not affected by speculation. gcc/ 2018-12-30 Max Filippov * config/xtensa/xtensa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to speculation_safe_value_not_needed. --- gcc/config/xtensa/xtensa.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gc