[Bug testsuite/80678] [6 Regression] g++.dg/cpp1y/constexpr-79681-2.C fails with ICE starting with r247678

2017-05-09 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80678

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P1
  Component|other   |testsuite
   Target Milestone|--- |6.4
Summary|g++.dg/cpp1y/constexpr-7968 |[6 Regression]
   |1-2.C fails with ICE|g++.dg/cpp1y/constexpr-7968
   |starting with r247678   |1-2.C fails with ICE
   ||starting with r247678

[Bug ipa/80680] dead code elimination fails to remove unreferenced function

2017-05-09 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80680

Richard Biener  changed:

   What|Removed |Added

   Keywords||missed-optimization
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-05-09
 CC||hubicka at gcc dot gnu.org
  Component|tree-optimization   |ipa
Version|6.3.1   |7.1.1
 Ever confirmed|0   |1

--- Comment #1 from Richard Biener  ---
Confirmed.  IPA-CP / inlining fail to optimize the indirect call and thus the
node is not removed.  So after inlining we have



   [100.00%]:
  # iftmp.0_4 = PHI 
  iftmp.0_4 ();

that _could_ have been simplified by IPA-CP / devirt?

[Bug target/80687] New: VLA usage in libgfortran; nvptx target: "sorry, unimplemented: target cannot support alloca"

2017-05-09 Thread tschwinge at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80687

Bug ID: 80687
   Summary: VLA usage in libgfortran; nvptx target: "sorry,
unimplemented: target cannot support alloca"
   Product: gcc
   Version: 8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: tschwinge at gcc dot gnu.org
CC: bernds at gcc dot gnu.org, tkoenig at gcc dot gnu.org
Depends on: 65181
  Target Milestone: ---
Target: nvptx

After the r247753 (Git 65a1b327b171135d6b591a7b63ef444de27dd600) commit for
PR80602:

[...]/libgfortran/generated/matmul_i1.c: In function 'matmul_i1':
[...]/libgfortran/generated/matmul_i1.c:2583:21: sorry, unimplemented:
target cannot support alloca.
   GFC_INTEGER_1 t1[t1_dim]; /* was [256][256] */
 ^~
Makefile:3727: recipe for target 'matmul_i1.lo' failed
make[3]: *** [matmul_i1.lo] Error 1

Etc.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65181
[Bug 65181] Support for alloca in nvptx

[Bug middle-end/77709] specified destination size warning does not work when cross-compiling from 64 host to 32bit target

2017-05-09 Thread thopre01 at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77709

--- Comment #2 from Thomas Preud'homme  ---
Ping?

[Bug ipa/53896] nonreturning function suggested as 'pure' candidate

2017-05-09 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53896

Martin Liška  changed:

   What|Removed |Added

 Status|RESOLVED|ASSIGNED
 Resolution|WONTFIX |---

--- Comment #4 from Martin Liška  ---
Ok, I'll prepare a documentation fix for that.

[Bug testsuite/80643] NA->FAIL: gcc.dg/pr79214.c gcc.dg/pr79222.c gcc.dg/pr79223.c gcc.dg/tree-ssa/builtins-folding-gimple-ub.c

2017-05-09 Thread thopre01 at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80643

Thomas Preud'homme  changed:

   What|Removed |Added

 Status|RESOLVED|UNCONFIRMED
 Resolution|FIXED   |---
 Ever confirmed|1   |0

--- Comment #4 from Thomas Preud'homme  ---
Hi Martin,

(In reply to Martin Sebor from comment #3)
> The failures should be fixed in r247652
> (https://gcc.gnu.org/ml/gcc-patches/2017-05/msg00443.html).

I'm still seeing:

FAIL: c-c++-common/Wsizeof-pointer-memaccess2.c  -Wc++-compat  (test for excess
errors)
Excess errors:
gcc/testsuite/c-c++-common/Wsizeof-pointer-memaccess2.c:11:30: warning:
'__builtin_memcpy' reading 4 bytes from a region of size 0
[-Wstringop-overflow=]
gcc/testsuite/c-c++-common/Wsizeof-pointer-memaccess2.c:12:31: warning:
'__builtin_memcpy' reading 4 bytes from a region of size 0
[-Wstringop-overflow=]
gcc/testsuite/c-c++-common/Wsizeof-pointer-memaccess2.c:11:30: warning:
'__builtin_memcpy' reading 4 bytes from a region of size 0
[-Wstringop-overflow=]
gcc/testsuite/c-c++-common/Wsizeof-pointer-memaccess2.c:12:31: warning:
'__builtin_memcpy' reading 4 bytes from a region of size 0
[-Wstringop-overflow=]
gcc/testsuite/c-c++-common/Wsizeof-pointer-memaccess2.c:11:30: warning:
'__builtin_memcpy' reading 4 bytes from a region of size 1
[-Wstringop-overflow=]
gcc/testsuite/c-c++-common/Wsizeof-pointer-memaccess2.c:12:31: warning:
'__builtin_memcpy' reading 4 bytes from a region of size 1
[-Wstringop-overflow=]
gcc/testsuite/c-c++-common/Wsizeof-pointer-memaccess2.c:11:30: warning:
'__builtin_memcpy' reading 4 bytes from a region of size 1
[-Wstringop-overflow=]
gcc/testsuite/c-c++-common/Wsizeof-pointer-memaccess2.c:12:31: warning:
'__builtin_memcpy' reading 4 bytes from a region of size 1
[-Wstringop-overflow=]

[Bug target/80671] config/aarch64/cortex-a57-fma-steering.c:416: bad statement order ?

2017-05-09 Thread ktkachov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80671

ktkachov at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-05-09
 CC||ktkachov at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from ktkachov at gcc dot gnu.org ---
Agreed, that looks buggy

[Bug target/80687] VLA usage in libgfortran; nvptx target: "sorry, unimplemented: target cannot support alloca"

2017-05-09 Thread tschwinge at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80687

--- Comment #1 from Thomas Schwinge  ---
*** Bug 80686 has been marked as a duplicate of this bug. ***

[Bug target/80686] New: VLA usage in libgfortran; nvptx target: "sorry, unimplemented: target cannot support alloca"

2017-05-09 Thread tschwinge at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80686

Bug ID: 80686
   Summary: VLA usage in libgfortran; nvptx target: "sorry,
unimplemented: target cannot support alloca"
   Product: gcc
   Version: 8.0
Status: RESOLVED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: tschwinge at gcc dot gnu.org
CC: bernds at gcc dot gnu.org, tkoenig at gcc dot gnu.org
Depends on: 65181
  Target Milestone: ---
Target: nvptx
Status: RESOLVED
Resolution: DUPLICATE

After the r247753 (Git 65a1b327b171135d6b591a7b63ef444de27dd600) commit for
PR80602:

[...]/libgfortran/generated/matmul_i1.c: In function 'matmul_i1':
[...]/libgfortran/generated/matmul_i1.c:2583:21: sorry, unimplemented:
target cannot support alloca.
   GFC_INTEGER_1 t1[t1_dim]; /* was [256][256] */
 ^~
Makefile:3727: recipe for target 'matmul_i1.lo' failed
make[3]: *** [matmul_i1.lo] Error 1

Etc.

--- Comment #1 from Thomas Schwinge  ---
Ran into a "gateway timeout" (?) (lost the precise error message) when filing
this one; it never made it to . 
Retrying, I again got that error, but PR80687 got filed, and is visible on
.

*** This bug has been marked as a duplicate of bug 80687 ***


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65181
[Bug 65181] Support for alloca in nvptx

[Bug tree-optimization/80622] [8 Regression] wrong code at -O1 and above in both 32-bit and 64-bit modes on x86_64-linux-gnu

2017-05-09 Thread jamborm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80622

Martin Jambor  changed:

   What|Removed |Added

URL||https://gcc.gnu.org/ml/gcc-
   ||patches/2017-05/msg00306.ht
   ||ml
Version|7.0.1   |8.0

--- Comment #9 from Martin Jambor  ---
Fixed.

[Bug tree-optimization/80622] [8 Regression] wrong code at -O1 and above in both 32-bit and 64-bit modes on x86_64-linux-gnu

2017-05-09 Thread jamborm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80622

Martin Jambor  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #10 from Martin Jambor  ---
And I even meant to mark as fixed.

[Bug sanitizer/80659] [7/8 Regression] -fsanitize=address evokes ICE in in gimplify_switch_expr

2017-05-09 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80659

Martin Liška  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
 CC||marxin at gcc dot gnu.org
   Assignee|unassigned at gcc dot gnu.org  |marxin at gcc dot 
gnu.org

--- Comment #2 from Martin Liška  ---
Mine.

[Bug target/80687] [8 Regression] VLA usage in libgfortran; nvptx target: "sorry, unimplemented: target cannot support alloca"

2017-05-09 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80687

Thomas Koenig  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2017-05-09
   Assignee|unassigned at gcc dot gnu.org  |tkoenig at gcc dot 
gnu.org
   Target Milestone|--- |8.0
Summary|VLA usage in libgfortran;   |[8 Regression] VLA usage in
   |nvptx target: "sorry,   |libgfortran; nvptx target:
   |unimplemented: target   |"sorry, unimplemented:
   |cannot support alloca"  |target cannot support
   ||alloca"
 Ever confirmed|0   |1

--- Comment #2 from Thomas Koenig  ---
So we need to make this patch conditional on
the compiler supporting VLAs. 

Otherwise, I think we should just go for malloc/free
(to reduce the stack usage anyway).  Or would this also
be problematic on nvptx?

I'll look at this tonight.

[Bug testsuite/80643] NA->FAIL: gcc.dg/pr79214.c gcc.dg/pr79222.c gcc.dg/pr79223.c gcc.dg/tree-ssa/builtins-folding-gimple-ub.c

2017-05-09 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80643

Martin Liška  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed|2017-05-05 00:00:00 |2017-05-09
 CC||marxin at gcc dot gnu.org
 Ever confirmed|0   |1

[Bug go/64238] ICE in get_partitioning_class, at symtab.c:1775

2017-05-09 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64238

--- Comment #5 from Martin Liška  ---
(In reply to Ian Lance Taylor from comment #4)
> This appears to work in GCC 7.  At least, I can see a crash when using GCC
> 6, but I don't see a crash when using revision 246286.  Which revision are
> you using for the crash you see?
> 
> I'm afraid that I do not have the time to track down a failure in GCC 5 or 6
> if it is working on trunk.

I can reproduce it with current trunk revision r247781. It's a checking assert,
so that's maybe reason why you can't see it. I have to install the compiler and
invoke:

$ gcc bytes_decl.go bytes.go -flto -o a.out

[Bug c/80653] Enhancement: better location info for -Wunsafe-loop-optimizations

2017-05-09 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80653

Martin Liška  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-05-09
 CC||dmalcolm at gcc dot gnu.org,
   ||marxin at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Martin Liška  ---
Confirmed, I have the same experience with usage of location for gimple
statements. Adding David Malcolm.

[Bug fortran/80657] [7/8 Regression] Loop in character function declaration

2017-05-09 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80657

Martin Liška  changed:

   What|Removed |Added

 CC||marxin at gcc dot gnu.org,
   ||pault at gcc dot gnu.org
Summary|Loop in character function  |[7/8 Regression] Loop in
   |declaration |character function
   ||declaration

--- Comment #3 from Martin Liška  ---
Confirmed, started with r243478.

[Bug ipa/80663] signed integer overflow in ipa-split.c

2017-05-09 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80663

Martin Liška  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-05-09
 CC||marxin at gcc dot gnu.org
   Assignee|unassigned at gcc dot gnu.org  |marxin at gcc dot 
gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Martin Liška  ---
I'll fix that.

[Bug target/80582] Missing intrinsics _mm256_set_m128*

2017-05-09 Thread julia.koval at intel dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80582

Yulia Koval  changed:

   What|Removed |Added

 CC||julia.koval at intel dot com

--- Comment #1 from Yulia Koval  ---
Patch posted at https://gcc.gnu.org/ml/gcc-patches/2017-05/msg00611.html

[Bug target/80689] New: 128 loads generated for structure copying with gcc 7.10 and leads to STLF stalls in avx2 targets.

2017-05-09 Thread venkataramanan.kumar at amd dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80689

Bug ID: 80689
   Summary: 128 loads generated for structure copying with gcc
7.10 and leads to STLF stalls in avx2 targets.
   Product: gcc
   Version: 7.1.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: venkataramanan.kumar at amd dot com
  Target Milestone: ---

For the below test case, GCC 7.1.0 started generating 128 bit loads and stores
while copying the structure elements. 

This pattern is observed in some benchmarks and leads to STLF stalls for few
AVX2 targets.

typedef struct st1
{
long unsigned int a,b;
long int c,d;
}R;

typedef struct st2
{
int  t;
R  reg;
}N;

void Set (const R *region,  N *n_info );

void test(N  *n_obj ,const long unsigned int a, const long unsigned int b, 
const long int c,const long int d)
{
R reg;

reg.a=a;
reg.b=b;
reg.c=c;
reg.d=d;
Set (®, n_obj);

}

void Set (const R *reg,  N *n_obj )
{
n_obj->reg=(*reg);
}

 flag: -fno-inline -O2 

 GCC 6.3.0 

Set:
.LFB1:
.cfi_startproc
movq(%rdi), %rax
movq%rax, 8(%rsi)
movq8(%rdi), %rax
movq%rax, 16(%rsi)
movq16(%rdi), %rax
movq%rax, 24(%rsi)
movq24(%rdi), %rax
movq%rax, 32(%rsi)
ret
.cfi_endproc
.LFE1:
.size   Set, .-Set
.p2align 4,,15
.globl  test
.type   test, @function
test:
.LFB0:
.cfi_startproc
subq$40, %rsp
   .cfi_def_cfa_offset 48
movq%rsi, (%rsp)
movq%rdi, %rsi
movq%rsp, %rdi
movq%rdx, 8(%rsp)
movq%rcx, 16(%rsp)
movq%r8, 24(%rsp)
callSet
addq$40, %rsp
.cfi_def_cfa_offset 8
ret


GCC 7.1.0 

Set:
.LFB1:
.cfi_startproc
movdqu  (%rdi), %xmm0 <== 128 bit loads
movups  %xmm0, 8(%rsi)
movdqu  16(%rdi), %xmm0  <== 128 bit loads
movups  %xmm0, 24(%rsi)
ret
.cfi_endproc
.LFE1:
.size   Set, .-Set
.p2align 4,,15
.globl  test
.type   test, @function
test:
.LFB0:
.cfi_startproc
subq$40, %rsp
.cfi_def_cfa_offset 48
movq%rsi, (%rsp)
movq%rdi, %rsi
movq%rsp, %rdi
movq%rdx, 8(%rsp)
movq%rcx, 16(%rsp)
movq%r8, 24(%rsp)
callSet
addq$40, %rsp
.cfi_def_cfa_offset 8
ret

[Bug fortran/79929] [7/8 Regression] Bogus Warning: '__builtin_memset': specified size 4294967291 exceeds maximum object size 2147483647

2017-05-09 Thread aivchenk at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79929

Alexander Ivchenko  changed:

   What|Removed |Added

 CC||aivchenk at gmail dot com

--- Comment #20 from Alexander Ivchenko  ---
Not sure whether it is connected, but when I bootstrap with:
>../gcc_ref/configure  --with-system-zlib --with-demangler-in-ld 
>--with-arch=corei7 --with-cpu=corei7 --with-fpmath=sse 
>--enable-shared --enable-host-shared --enable-clocale=gnu 
>--enable-cloog-backend=isl --enable-languages=c --enable-libmpx=yes 
>--with-build-config=bootstrap-lto
>make

In function ‘rtvec_alloc’,
inlined from ‘copy_rtx_for_iterators’ at
../../gcc_ref/gcc/read-rtl.c:448:32:
../../gcc_ref/gcc/rtl.c:155:10: error: ‘memset’: specified size
18446744073709551608 exceeds maximum object size 9223372036854775807
[-Werror=stringop-overflow=]
   memset (&rt->elem[0], 0, n * sizeof (rtx));

[Bug target/80687] [8 Regression] VLA usage in libgfortran; nvptx target: "sorry, unimplemented: target cannot support alloca"

2017-05-09 Thread tschwinge at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80687

--- Comment #3 from Thomas Schwinge  ---
(In reply to Thomas Koenig from comment #2)
> So we need to make this patch conditional on
> the compiler supporting VLAs. 

ACK.

> Otherwise, I think we should just go for malloc/free
> (to reduce the stack usage anyway).  Or would this also
> be problematic on nvptx?

As malloc/free are supported on nvptx, falling back to these will resolve the
compilation problem.  And it will then be our problem ;-) to get the
performance right.  (As necessary; PR65181 or something else -- curious if
there are optimization possibilities, when the size of the memory region can
actually be determined during compilation (?), can the compiler move this into
an sufficiently-sized PTX ".local" region, avoiding the malloc/free calls?)

> I'll look at this tonight.

Thanks!  I'll be available for testing any patches.

[Bug target/80689] 128 loads generated for structure copying with gcc 7.1.0 and leads to STLF stalls in avx2 targets.

2017-05-09 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80689

Richard Biener  changed:

   What|Removed |Added

   Keywords||missed-optimization
 Target||x86_64-*-*

--- Comment #1 from Richard Biener  ---
That you use noinline tells that glibc memcpy has the very same issue.  Note
that similarly having bytes/shorts in the structure and using longs or ints
to implement inlined memcpy has the same issue.

So I don't see how to easily fix this, or rather I don't think we can fix it at
all apart from the case where we can see both the struct copy and previous
stores to the source (thus when you enable inlining).

[Bug target/80689] 128 loads generated for structure copying with gcc 7.1.0 and leads to STLF stalls in avx2 targets.

2017-05-09 Thread venkataramanan.kumar at amd dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80689

--- Comment #2 from Venkataramanan  ---
(In reply to Richard Biener from comment #1)
> That you use noinline tells that glibc memcpy has the very same issue.  Note
> that similarly having bytes/shorts in the structure and using longs or ints
> to implement inlined memcpy has the same issue.
> 
> So I don't see how to easily fix this, or rather I don't think we can fix it
> at all apart from the case where we can see both the struct copy and previous
> stores to the source (thus when you enable inlining).

Actual benchmark from where I made the small test case is compiled with in
lining enabled. 

Just to show at the calling place "test" function, all stores happen in scalar
mode (4 * 64), I used  -fno-inline. Otherwise function "Set" gets inlined.

(snip)
movq%rsi, (%rsp)
movq%rdi, %rsi
movq%rsp, %rdi
movq%rdx, 8(%rsp)
movq%rcx, 16(%rsp)
movq%r8, 24(%rsp)
callSet
addq$40, %rsp
(snip)

[Bug libstdc++/80690] New: [7/8 Regression] clang rejects std::thread with -std=c++1z

2017-05-09 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80690

Bug ID: 80690
   Summary: [7/8 Regression] clang rejects std::thread with
-std=c++1z
   Product: gcc
   Version: 7.1.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libstdc++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: trippels at gcc dot gnu.org
  Target Milestone: ---

markus@x4 /tmp % cat thread.cpp
#include 
static void f() {}
int main() { std::thread t(f); }

markus@x4 /tmp % g++ -std=gnu++1z -pthread thread.cpp
markus@x4 /tmp % clang++ -std=c++14 -pthread thread.cpp
markus@x4 /tmp % clang++ -std=c++1z -pthread thread.cpp
In file included from thread.cpp:1:
In file included from
/usr/lib/gcc/x86_64-pc-linux-gnu/7.1.1/include/g++-v7/thread:39:
In file included from
/usr/lib/gcc/x86_64-pc-linux-gnu/7.1.1/include/g++-v7/memory:80:
In file included from
/usr/lib/gcc/x86_64-pc-linux-gnu/7.1.1/include/g++-v7/bits/unique_ptr.h:37:
/usr/lib/gcc/x86_64-pc-linux-gnu/7.1.1/include/g++-v7/tuple:165:13: error: data
member instantiated with function type 'void ()'
  _Head _M_head_impl;
^
/usr/lib/gcc/x86_64-pc-linux-gnu/7.1.1/include/g++-v7/tuple:344:15: note: in
instantiation of template class 'std::_Head_base<0, void (), false>' requested
here
: private _Head_base<_Idx, _Head>
  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/7.1.1/include/g++-v7/tuple:556:26: note: in
instantiation of template class 'std::_Tuple_impl<0, void ()>' requested here
class tuple : public _Tuple_impl<0, _Elements...>
 ^
/usr/lib/gcc/x86_64-pc-linux-gnu/7.1.1/include/g++-v7/thread:223:9: note: in
instantiation of template class 'std::tuple' requested here
_Tuple _M_t;
   ^
/usr/lib/gcc/x86_64-pc-linux-gnu/7.1.1/include/g++-v7/thread:127:8: note: in
instantiation of template class 'std::thread::_Invoker >'
requested here
  __make_invoker(std::forward<_Callable>(__f),
  ^
thread.cpp:3:26: note: in instantiation of function template specialization
'std::thread::thread' requested here
int main() { std::thread t(f); }
 ^
In file included from thread.cpp:1:
In file included from
/usr/lib/gcc/x86_64-pc-linux-gnu/7.1.1/include/g++-v7/thread:39:
In file included from
/usr/lib/gcc/x86_64-pc-linux-gnu/7.1.1/include/g++-v7/memory:80:
In file included from
/usr/lib/gcc/x86_64-pc-linux-gnu/7.1.1/include/g++-v7/bits/unique_ptr.h:37:
/usr/lib/gcc/x86_64-pc-linux-gnu/7.1.1/include/g++-v7/tuple:1452:14: error: no
matching conversion for functional-style cast from 'void ()' to '__result_type'
  (aka 'tuple')
  return __result_type(std::forward<_Elements>(__args)...);
 ^
/usr/lib/gcc/x86_64-pc-linux-gnu/7.1.1/include/g++-v7/thread:259:11: note: in
instantiation of function template specialization 'std::make_tuple'
requested here
std::make_tuple(std::forward<_Callable>(__callable),
 ^
/usr/lib/gcc/x86_64-pc-linux-gnu/7.1.1/include/g++-v7/thread:127:8: note: in
instantiation of function template specialization
'std::thread::__make_invoker' requested
  here
  __make_invoker(std::forward<_Callable>(__f),
  ^
thread.cpp:3:26: note: in instantiation of function template specialization
'std::thread::thread' requested here
int main() { std::thread t(f); }
 ^
/usr/lib/gcc/x86_64-pc-linux-gnu/7.1.1/include/g++-v7/tuple:660:17: note:
candidate constructor not viable: no known conversion from 'void ()' to 'const
std::tuple' for
  1st argument
  constexpr tuple(const tuple&) = default;
^
/usr/lib/gcc/x86_64-pc-linux-gnu/7.1.1/include/g++-v7/tuple:662:17: note:
candidate constructor not viable: no known conversion from 'void ()' to
'std::tuple' for 1st
  argument
  constexpr tuple(tuple&&) = default;
^
/usr/lib/gcc/x86_64-pc-linux-gnu/7.1.1/include/g++-v7/tuple:602:18: note:
candidate template ignored: disabled by 'enable_if' [with _Dummy = void]
 _TCC<_Dummy>::template
 ^
/usr/lib/gcc/x86_64-pc-linux-gnu/7.1.1/include/g++-v7/tuple:613:18: note:
candidate template ignored: disabled by 'enable_if' [with _Dummy = void]
 _TCC<_Dummy>::template
 ^
/usr/lib/gcc/x86_64-pc-linux-gnu/7.1.1/include/g++-v7/tuple:640:5: note:
candidate template ignored: disabled by 'enable_if' [with _UElements = ]
  _TMC<_UElements...>::template
  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/7.1.1/include/g++-v7/tuple:651:5: note:
candidate template ignored: disabled by 'enable_if' [with _UElements = ]
  _TMC<_UElements...>::template
  ^
/usr/lib/gcc/x86_64-pc-linux-gnu/7.1.1/include/g++-v7/tuple:678:19: note:
candidate template ignored: could not match 'tuple'
against 'void ()'
constex

[Bug libstdc++/80690] [7/8 Regression] clang rejects std::thread with -std=c++1z

2017-05-09 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80690

Jonathan Wakely  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2017-05-09
   Assignee|unassigned at gcc dot gnu.org  |redi at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Jonathan Wakely  ---
Looks like the DECAY_COPY isn't decaying the function reference to a function
pointer.

[Bug target/80689] 128 loads generated for structure copying with gcc 7.1.0 and leads to STLF stalls in avx2 targets.

2017-05-09 Thread rohitarulraj at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80689

Rohit  changed:

   What|Removed |Added

 CC||rohitarulraj at gmail dot com

--- Comment #3 from Rohit  ---
Code generated with ICC17 (-O2 -march=core-avx2)

test(st2*, unsigned long, unsigned long, long, long):
movq  %rsi, 8(%rdi) #29.9
movq  %rdx, 16(%rdi)#29.9
movq  %rcx, 24(%rdi)#29.9
movq  %r8, 32(%rdi) #29.9
ret #25.1
Set(st1 const*, st2*):
movq  (%rdi), %rax  #29.22
movq  %rax, 8(%rsi) #29.9
movq  8(%rdi), %rdx #29.22
movq  %rdx, 16(%rsi)#29.9
movq  16(%rdi), %rcx#29.22
movq  %rcx, 24(%rsi)#29.9
movq  24(%rdi), %r8 #29.22
movq  %r8, 32(%rsi) #29.9
ret

[Bug c++/80691] New: Narrowing conversion in {} allowed in a SFINAE context

2017-05-09 Thread griwes at griwes dot info
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80691

Bug ID: 80691
   Summary: Narrowing conversion in {} allowed in a SFINAE context
   Product: gcc
   Version: 7.1.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: griwes at griwes dot info
  Target Milestone: ---

There seems to be a regression in GCC 7.1 in how the compiler treats narrowing
conversions in braced initialization, when using a user-provided constructor
for a type. The following code compiles with GCC 6.3 and several recent
versions of Clang (and some older too, if you implement void_t yourself), but
the second static_assert fails on GCC 7.1.

#include 
#include 

using std::void_t;

template
struct is_nonnarrowing_conversion : std::false_type {};

template
struct is_nonnarrowing_conversion() })>> : std::true_type {};

template
class wrapper
{
public:
wrapper(T) {}
};

static_assert(!is_nonnarrowing_conversion());
static_assert(!is_nonnarrowing_conversion, float>());

As I read it, this explicitly violates [dcl.init.list]3.6
(http://eel.is/c++draft/dcl.init.list#3.6).

[Bug c/80692] New: _Decimal64 -0 != 0 unless optimization is turned off

2017-05-09 Thread sisyphus1 at optusnet dot com.au
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80692

Bug ID: 80692
   Summary: _Decimal64 -0 != 0 unless optimization is turned off
   Product: gcc
   Version: 7.1.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sisyphus1 at optusnet dot com.au
  Target Milestone: ---

Created attachment 41334
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41334&action=edit
C program exhibits bug if compiled with optimization

Hi,

The attached program is fine if compiled without any optimization.
Otherwise it indicates that a variable holding the value -0.DD is not equal to
0.DD, though still accepts that -0.DD == -0.DD.

This happens on MS Windows (for a range of gcc versions from 4.7.0 through to
7.1.0).
On Linux (Ubuntu 16.04) I have tested only with gcc-5.4.0 where the same
behaviour occurs.

I haven't struck a gcc compiler that supports decimal floats but doesn't
exhibit the same behaviour.

The _Decimal128 type is similarly afflicted - I haven't checked _Decimal32.

Cheers,
Rob

[Bug libstdc++/80690] [7/8 Regression] clang rejects std::thread with -std=c++1z

2017-05-09 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80690

--- Comment #2 from Jonathan Wakely  ---
Our std::is_function is not compatible with Clang:

struct true_type { static constexpr bool value = true; };
struct false_type { static constexpr bool value = false; };

template
  struct is_function
  : public false_type { };

#if __cpp_noexcept_function_type
template
  struct is_function<_Res(_ArgTypes...) noexcept(ne)>
  : public true_type { };
#else
template
  struct is_function<_Res(_ArgTypes...)>
  : public true_type { };
#endif

template struct remove_reference { using type = T; };
template struct remove_reference { using type = T; };
template struct remove_reference { using type = T; };

static_assert( is_function::value, "" );


prog.cc:10:10: error: class template partial specialization contains a template
parameter that cannot be deduced; this partial specialization will never be
used [-Wunusable-partial-specialization]
  struct is_function<_Res(_ArgTypes...) noexcept(ne)>
 ^~~~
prog.cc:9:53: note: non-deducible template parameter 'ne'
template
^
prog.cc:22:1: error: static_assert failed ""
static_assert( is_function::value, "" );
^  ~~
2 errors generated.


I think it's a Clang bug, that should be deducible.

[Bug c++/80682] __is_trivially_constructible(void, int) returns true.

2017-05-09 Thread ville.voutilainen at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80682

Ville Voutilainen  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-05-09
   Assignee|unassigned at gcc dot gnu.org  |ville.voutilainen at 
gmail dot com
 Ever confirmed|0   |1

--- Comment #1 from Ville Voutilainen  ---
I'll see what I can do. is_trivially_xible seems to return true here, dunno why
yet. I'll debug it. Chances are we merely need to treat void specially in that
function, because the functions it calls that check for conversions and
standard conversions are fine as is, because they have other callers and int is
certainly convertible to void.

[Bug libstdc++/80690] [7/8 Regression] clang rejects std::thread with -std=c++1z

2017-05-09 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80690

Jonathan Wakely  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |MOVED

--- Comment #3 from Jonathan Wakely  ---
Reported to https://bugs.llvm.org/show_bug.cgi?id=32974

[Bug rtl-optimization/80693] New: [6/7/8 Regression] wrong code with -O -fno-tree-coalesce-vars

2017-05-09 Thread zsojka at seznam dot cz
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80693

Bug ID: 80693
   Summary: [6/7/8 Regression] wrong code with -O
-fno-tree-coalesce-vars
   Product: gcc
   Version: 8.0
Status: UNCONFIRMED
  Keywords: wrong-code
  Severity: normal
  Priority: P3
 Component: rtl-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: zsojka at seznam dot cz
  Target Milestone: ---

Created attachment 41335
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41335&action=edit
reduced testcase

Output:
$ x86_64-pc-linux-gnu-gcc -O -fno-tree-coalesce-vars testcase.c
$ ./a.out
Aborted

The .combine dump shows:
...
Trying 18, 19 -> 20:
Failed to match this instruction:
(set (reg:HI 116)
(and:HI (not:HI (reg/v:HI 112 [ u16_1D.1800 ]))
(const_int 1 [0x1])))
Successfully matched this instruction:
(set (reg:HI 117)
(not:HI (reg/v:HI 112 [ u16_1D.1800 ])))
Successfully matched this instruction:
(set (reg:HI 116)
(and:HI (reg:HI 117)
(const_int 1 [0x1])))
allowing combination of insns 18, 19 and 20
original costs 0 + 4 + 4 = 0
replacement costs 4 + 4 = 8
deferring deletion of insn with uid = 18.
modifying insn i219: r117:HI=!r112:HI
deferring rescan insn with uid = 19.
modifying insn i320: {r116:HI=r117:HI&0x1;clobber flags:CC;}
  REG_UNUSED flags:CC
  REG_DEAD r117:HI
deferring rescan insn with uid = 20.
...
Trying 19 -> 20:
Successfully matched this instruction:
(parallel [
(set (reg:HI 116)
(xor:HI (reg/v:HI 112 [ u16_1D.1800 ])
(const_int 1 [0x1])))
(clobber (reg:CC 17 flags))
])
allowing combination of insns 19 and 20
original costs 4 + 4 = 8
replacement cost 4
deferring deletion of insn with uid = 19.
modifying insn i320: {r116:HI=r112:HI^0x1;clobber flags:CC;}
  REG_UNUSED flags:CC
deferring rescan insn with uid = 20.
...


Which looks wrong, since it changes "r116:HI=!r112:HI&1" (can be 0 or 1) to
"r116:HI=r112:HI^0x1" (can be anything).

Also, the costs dump in the first replacement looks wrong:
original costs 0 + 4 + 4 = 0

$ x86_64-pc-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-247635-checking-yes-rtl-df-extra-nographite-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/8.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++
--enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra
--without-cloog --without-ppl --without-isl --build=x86_64-pc-linux-gnu
--host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu
--with-ld=/usr/bin/x86_64-pc-linux-gnu-ld
--with-as=/usr/bin/x86_64-pc-linux-gnu-as --disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-247635-checking-yes-rtl-df-extra-nographite-amd64
Thread model: posix
gcc version 8.0.0 20170505 (experimental) (GCC) 


Tested revisions:
trunk r247635 - FAIL
7-branch r247545 - FAIL
6-branch r247359 - FAIL
5-branch r247456 - OK

[Bug c/80525] -Wlogical-op confused by undefined integer overflow

2017-05-09 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80525

--- Comment #2 from Marek Polacek  ---
Author: mpolacek
Date: Tue May  9 11:21:14 2017
New Revision: 247786

URL: https://gcc.gnu.org/viewcvs?rev=247786&root=gcc&view=rev
Log:
PR c/80525
* c-warn.c (unwrap_c_maybe_const): New.
(warn_logical_operator): Call it.

* c-c++-common/Wlogical-op-1.c: Don't use -fwrapv anymore.
* c-c++-common/Wlogical-op-2.c: New test.

Added:
trunk/gcc/testsuite/c-c++-common/Wlogical-op-2.c
Modified:
trunk/gcc/c-family/ChangeLog
trunk/gcc/c-family/c-warn.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/c-c++-common/Wlogical-op-1.c

[Bug c/80525] -Wlogical-op confused by undefined integer overflow

2017-05-09 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80525

Marek Polacek  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #3 from Marek Polacek  ---
Fixed for GCC 8.

[Bug libstdc++/79283] read_symlink fails with /proc symlinks

2017-05-09 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79283

Jonathan Wakely  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-05-09
 Ever confirmed|0   |1

[Bug rtl-optimization/80693] [6/7/8 Regression] wrong code with -O -fno-tree-coalesce-vars

2017-05-09 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80693

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P2
  Known to work||5.4.1
   Target Milestone|--- |6.4

[Bug target/80689] 128 loads generated for structure copying with gcc 7.1.0 and leads to STLF stalls in avx2 targets.

2017-05-09 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80689

--- Comment #4 from Richard Biener  ---
What does ICC do if you use int and/or short fields in st1?  Does it perform
struct copying member-wise?

[Bug libstdc++/79839] malloc(0) returns 0 on AIX even with _LINUX_SOURCE_COMPAT

2017-05-09 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79839

Jonathan Wakely  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-05-09
 Ever confirmed|0   |1

--- Comment #1 from Jonathan Wakely  ---
I can reproduce this on AIX 7.1.3.0 but it returns a valid pointer on AIX
7.2.0.0

[Bug target/80689] 128 loads generated for structure copying with gcc 7.1.0 and leads to STLF stalls in avx2 targets.

2017-05-09 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80689

--- Comment #5 from Richard Biener  ---
Note that using unaligned 128bit moves might involve an even larger STLF
penalty than if the loads/stores were aligned due to the fact they might cross
a cache-line boundary and how store queues usually are laid out on cache-line
arrangement.

[Bug c++/80682] __is_trivially_constructible(void, int) returns true.

2017-05-09 Thread ville.voutilainen at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80682

--- Comment #2 from Ville Voutilainen  ---
Initial patch: https://gcc.gnu.org/ml/gcc-patches/2017-05/msg00632.html

[Bug target/79839] malloc(0) returns 0 on AIX even with _LINUX_SOURCE_COMPAT

2017-05-09 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79839

Jonathan Wakely  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
  Component|libstdc++   |target
 Resolution|--- |FIXED
   Target Milestone|--- |6.2

--- Comment #2 from Jonathan Wakely  ---
N.B. with GCC 6 and later you get the same behaviour for  because
that includes  now.

My tests on AIX 7.1.3.0 were not the same GCC version, it looks like this was
fixed for GCC 6.2.0 by r233029 (and r237394 on trunk). The fixed header now
has:

# 748
"/home/jwakely/gcc/6/lib/gcc/powerpc-ibm-aix7.2.0.0/6.3.1/include-fixed/stdlib.h"
3 4
extern void *__linux_malloc(size_t);
extern void *__linux_realloc(void *, size_t);
extern void *__linux_calloc(size_t, size_t);
extern void *__linux_valloc(size_t);

extern void *malloc(size_t) __asm__("__linux_malloc");
extern void *calloc(size_t, size_t) __asm__("__linux_calloc");
extern void *realloc(void *, size_t) __asm__("__linux_realloc");
extern void *valloc(size_t) __asm__("__linux_valloc");

This is necessary because the C++ standard explicitly forbids malloc and other
functions from the C library from being defined as macros, they must be defined
as functions.

[Bug target/79839] malloc(0) returns 0 on AIX even with _LINUX_SOURCE_COMPAT

2017-05-09 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79839

Jonathan Wakely  changed:

   What|Removed |Added

   Target Milestone|6.2 |5.5

--- Comment #3 from Jonathan Wakely  ---
It was also fixed on the gcc-5-branch by r237479

[Bug bootstrap/71510] [7 Regression] Failed to bootstrap with --with-arch=corei7 --with-cpu=intel

2017-05-09 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71510

--- Comment #7 from Jakub Jelinek  ---
Author: jakub
Date: Tue May  9 12:24:53 2017
New Revision: 247789

URL: https://gcc.gnu.org/viewcvs?rev=247789&root=gcc&view=rev
Log:
PR testsuite/80678
2016-06-14  Richard Biener  

PR middle-end/71310
PR bootstrap/71510
* expr.h (get_bit_range): Declare.
* expr.c (get_bit_range): Export.
* fold-const.c (optimize_bit_field_compare): Use get_bit_range and
word_mode again to constrain the bitfield access.

2016-06-11  Segher Boessenkool  

PR middle-end/71310
* fold-const.c (optimize_bit_field_compare): Don't try to use
word_mode unconditionally for reading the bit field, look at
DECL_BIT_FIELD_REPRESENTATIVE instead.

* gcc.target/powerpc/pr71310.c: New testcase.

Added:
branches/gcc-6-branch/gcc/testsuite/gcc.target/powerpc/pr71310.c
Modified:
branches/gcc-6-branch/gcc/ChangeLog
branches/gcc-6-branch/gcc/expr.c
branches/gcc-6-branch/gcc/expr.h
branches/gcc-6-branch/gcc/fold-const.c
branches/gcc-6-branch/gcc/testsuite/ChangeLog

[Bug middle-end/71310] Bitfields cause load hit store with smaller store and larger load

2017-05-09 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71310

--- Comment #12 from Jakub Jelinek  ---
Author: jakub
Date: Tue May  9 12:24:53 2017
New Revision: 247789

URL: https://gcc.gnu.org/viewcvs?rev=247789&root=gcc&view=rev
Log:
PR testsuite/80678
2016-06-14  Richard Biener  

PR middle-end/71310
PR bootstrap/71510
* expr.h (get_bit_range): Declare.
* expr.c (get_bit_range): Export.
* fold-const.c (optimize_bit_field_compare): Use get_bit_range and
word_mode again to constrain the bitfield access.

2016-06-11  Segher Boessenkool  

PR middle-end/71310
* fold-const.c (optimize_bit_field_compare): Don't try to use
word_mode unconditionally for reading the bit field, look at
DECL_BIT_FIELD_REPRESENTATIVE instead.

* gcc.target/powerpc/pr71310.c: New testcase.

Added:
branches/gcc-6-branch/gcc/testsuite/gcc.target/powerpc/pr71310.c
Modified:
branches/gcc-6-branch/gcc/ChangeLog
branches/gcc-6-branch/gcc/expr.c
branches/gcc-6-branch/gcc/expr.h
branches/gcc-6-branch/gcc/fold-const.c
branches/gcc-6-branch/gcc/testsuite/ChangeLog

[Bug testsuite/80678] [6 Regression] g++.dg/cpp1y/constexpr-79681-2.C fails with ICE starting with r247678

2017-05-09 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80678

--- Comment #3 from Jakub Jelinek  ---
Author: jakub
Date: Tue May  9 12:24:53 2017
New Revision: 247789

URL: https://gcc.gnu.org/viewcvs?rev=247789&root=gcc&view=rev
Log:
PR testsuite/80678
2016-06-14  Richard Biener  

PR middle-end/71310
PR bootstrap/71510
* expr.h (get_bit_range): Declare.
* expr.c (get_bit_range): Export.
* fold-const.c (optimize_bit_field_compare): Use get_bit_range and
word_mode again to constrain the bitfield access.

2016-06-11  Segher Boessenkool  

PR middle-end/71310
* fold-const.c (optimize_bit_field_compare): Don't try to use
word_mode unconditionally for reading the bit field, look at
DECL_BIT_FIELD_REPRESENTATIVE instead.

* gcc.target/powerpc/pr71310.c: New testcase.

Added:
branches/gcc-6-branch/gcc/testsuite/gcc.target/powerpc/pr71310.c
Modified:
branches/gcc-6-branch/gcc/ChangeLog
branches/gcc-6-branch/gcc/expr.c
branches/gcc-6-branch/gcc/expr.h
branches/gcc-6-branch/gcc/fold-const.c
branches/gcc-6-branch/gcc/testsuite/ChangeLog

[Bug tree-optimization/80334] [5/6 Regression] Segfault when taking address of copy of unaligned struct

2017-05-09 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80334

--- Comment #8 from Richard Biener  ---
Author: rguenth
Date: Tue May  9 12:27:24 2017
New Revision: 247790

URL: https://gcc.gnu.org/viewcvs?rev=247790&root=gcc&view=rev
Log:
2017-05-09  Richard Biener  

Backport from mainline
2017-03-28  Richard Biener  

PR middle-end/80222
* gimple-fold.c (gimple_fold_indirect_ref): Do not touch
TYPE_REF_CAN_ALIAS_ALL references.
* fold-const.c (fold_indirect_ref_1): Likewise.

* g++.dg/pr80222.C: New testcase.

2017-04-06  Richard Biener  

PR tree-optimization/80262
* tree-sra.c (build_ref_for_offset): Preserve address-space
information.
* tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address):
Drop useless address-space information on MEM_REF offsets.

* gcc.target/i386/pr80262.c: New testcase.

2017-04-03  Richard Biener  

PR tree-optimization/80275
* fold-const.c (split_address_to_core_and_offset): Handle
POINTER_PLUS_EXPR.

* g++.dg/opt/pr80275.C: New testcase.

2017-04-06  Richard Biener  

PR tree-optimization/80334
* tree-ssa-loop-ivopts.c (rewrite_use_address): Properly
preserve alignment of accesses.

* g++.dg/torture/pr80334.C: New testcase.

2017-04-10  Richard Biener  

PR middle-end/80362
* fold-const.c (fold_binary_loc): Look at unstripped ops when
looking for NEGATE_EXPR in -A / -B to A / B folding.

* gcc.dg/torture/pr80362.c: New testcase.

2017-04-25  Richard Biener  

PR tree-optimization/80492
* alias.c (compare_base_decls): Handle registers with asm
specification conservatively.

* gcc.dg/pr80492.c: New testcase.

2017-04-27  Richard Biener  

PR middle-end/80539
* tree-chrec.c (chrec_fold_plus_poly_poly): Deal with not
being in loop-closed SSA form conservatively.
(chrec_fold_multiply_poly_poly): Likewise.

* gcc.dg/torture/pr80539.c: New testcase.

Added:
branches/gcc-6-branch/gcc/testsuite/g++.dg/opt/pr80275.C
branches/gcc-6-branch/gcc/testsuite/g++.dg/pr80222.C
branches/gcc-6-branch/gcc/testsuite/g++.dg/torture/pr80334.C
branches/gcc-6-branch/gcc/testsuite/gcc.dg/pr80492.c
branches/gcc-6-branch/gcc/testsuite/gcc.dg/torture/pr80362.c
branches/gcc-6-branch/gcc/testsuite/gcc.dg/torture/pr80539.c
branches/gcc-6-branch/gcc/testsuite/gcc.target/i386/pr80262.c
Modified:
branches/gcc-6-branch/gcc/ChangeLog
branches/gcc-6-branch/gcc/alias.c
branches/gcc-6-branch/gcc/fold-const.c
branches/gcc-6-branch/gcc/gimple-fold.c
branches/gcc-6-branch/gcc/testsuite/ChangeLog
branches/gcc-6-branch/gcc/tree-chrec.c
branches/gcc-6-branch/gcc/tree-sra.c
branches/gcc-6-branch/gcc/tree-ssa-loop-ivopts.c
branches/gcc-6-branch/gcc/tree-ssa-sccvn.c

[Bug middle-end/80362] [5/6 Regression] gcc miscompiles arithmetic with signed char

2017-05-09 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80362

--- Comment #6 from Richard Biener  ---
Author: rguenth
Date: Tue May  9 12:27:24 2017
New Revision: 247790

URL: https://gcc.gnu.org/viewcvs?rev=247790&root=gcc&view=rev
Log:
2017-05-09  Richard Biener  

Backport from mainline
2017-03-28  Richard Biener  

PR middle-end/80222
* gimple-fold.c (gimple_fold_indirect_ref): Do not touch
TYPE_REF_CAN_ALIAS_ALL references.
* fold-const.c (fold_indirect_ref_1): Likewise.

* g++.dg/pr80222.C: New testcase.

2017-04-06  Richard Biener  

PR tree-optimization/80262
* tree-sra.c (build_ref_for_offset): Preserve address-space
information.
* tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address):
Drop useless address-space information on MEM_REF offsets.

* gcc.target/i386/pr80262.c: New testcase.

2017-04-03  Richard Biener  

PR tree-optimization/80275
* fold-const.c (split_address_to_core_and_offset): Handle
POINTER_PLUS_EXPR.

* g++.dg/opt/pr80275.C: New testcase.

2017-04-06  Richard Biener  

PR tree-optimization/80334
* tree-ssa-loop-ivopts.c (rewrite_use_address): Properly
preserve alignment of accesses.

* g++.dg/torture/pr80334.C: New testcase.

2017-04-10  Richard Biener  

PR middle-end/80362
* fold-const.c (fold_binary_loc): Look at unstripped ops when
looking for NEGATE_EXPR in -A / -B to A / B folding.

* gcc.dg/torture/pr80362.c: New testcase.

2017-04-25  Richard Biener  

PR tree-optimization/80492
* alias.c (compare_base_decls): Handle registers with asm
specification conservatively.

* gcc.dg/pr80492.c: New testcase.

2017-04-27  Richard Biener  

PR middle-end/80539
* tree-chrec.c (chrec_fold_plus_poly_poly): Deal with not
being in loop-closed SSA form conservatively.
(chrec_fold_multiply_poly_poly): Likewise.

* gcc.dg/torture/pr80539.c: New testcase.

Added:
branches/gcc-6-branch/gcc/testsuite/g++.dg/opt/pr80275.C
branches/gcc-6-branch/gcc/testsuite/g++.dg/pr80222.C
branches/gcc-6-branch/gcc/testsuite/g++.dg/torture/pr80334.C
branches/gcc-6-branch/gcc/testsuite/gcc.dg/pr80492.c
branches/gcc-6-branch/gcc/testsuite/gcc.dg/torture/pr80362.c
branches/gcc-6-branch/gcc/testsuite/gcc.dg/torture/pr80539.c
branches/gcc-6-branch/gcc/testsuite/gcc.target/i386/pr80262.c
Modified:
branches/gcc-6-branch/gcc/ChangeLog
branches/gcc-6-branch/gcc/alias.c
branches/gcc-6-branch/gcc/fold-const.c
branches/gcc-6-branch/gcc/gimple-fold.c
branches/gcc-6-branch/gcc/testsuite/ChangeLog
branches/gcc-6-branch/gcc/tree-chrec.c
branches/gcc-6-branch/gcc/tree-sra.c
branches/gcc-6-branch/gcc/tree-ssa-loop-ivopts.c
branches/gcc-6-branch/gcc/tree-ssa-sccvn.c

[Bug middle-end/80262] address space gets lost in memory access

2017-05-09 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80262

--- Comment #11 from Richard Biener  ---
Author: rguenth
Date: Tue May  9 12:27:24 2017
New Revision: 247790

URL: https://gcc.gnu.org/viewcvs?rev=247790&root=gcc&view=rev
Log:
2017-05-09  Richard Biener  

Backport from mainline
2017-03-28  Richard Biener  

PR middle-end/80222
* gimple-fold.c (gimple_fold_indirect_ref): Do not touch
TYPE_REF_CAN_ALIAS_ALL references.
* fold-const.c (fold_indirect_ref_1): Likewise.

* g++.dg/pr80222.C: New testcase.

2017-04-06  Richard Biener  

PR tree-optimization/80262
* tree-sra.c (build_ref_for_offset): Preserve address-space
information.
* tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address):
Drop useless address-space information on MEM_REF offsets.

* gcc.target/i386/pr80262.c: New testcase.

2017-04-03  Richard Biener  

PR tree-optimization/80275
* fold-const.c (split_address_to_core_and_offset): Handle
POINTER_PLUS_EXPR.

* g++.dg/opt/pr80275.C: New testcase.

2017-04-06  Richard Biener  

PR tree-optimization/80334
* tree-ssa-loop-ivopts.c (rewrite_use_address): Properly
preserve alignment of accesses.

* g++.dg/torture/pr80334.C: New testcase.

2017-04-10  Richard Biener  

PR middle-end/80362
* fold-const.c (fold_binary_loc): Look at unstripped ops when
looking for NEGATE_EXPR in -A / -B to A / B folding.

* gcc.dg/torture/pr80362.c: New testcase.

2017-04-25  Richard Biener  

PR tree-optimization/80492
* alias.c (compare_base_decls): Handle registers with asm
specification conservatively.

* gcc.dg/pr80492.c: New testcase.

2017-04-27  Richard Biener  

PR middle-end/80539
* tree-chrec.c (chrec_fold_plus_poly_poly): Deal with not
being in loop-closed SSA form conservatively.
(chrec_fold_multiply_poly_poly): Likewise.

* gcc.dg/torture/pr80539.c: New testcase.

Added:
branches/gcc-6-branch/gcc/testsuite/g++.dg/opt/pr80275.C
branches/gcc-6-branch/gcc/testsuite/g++.dg/pr80222.C
branches/gcc-6-branch/gcc/testsuite/g++.dg/torture/pr80334.C
branches/gcc-6-branch/gcc/testsuite/gcc.dg/pr80492.c
branches/gcc-6-branch/gcc/testsuite/gcc.dg/torture/pr80362.c
branches/gcc-6-branch/gcc/testsuite/gcc.dg/torture/pr80539.c
branches/gcc-6-branch/gcc/testsuite/gcc.target/i386/pr80262.c
Modified:
branches/gcc-6-branch/gcc/ChangeLog
branches/gcc-6-branch/gcc/alias.c
branches/gcc-6-branch/gcc/fold-const.c
branches/gcc-6-branch/gcc/gimple-fold.c
branches/gcc-6-branch/gcc/testsuite/ChangeLog
branches/gcc-6-branch/gcc/tree-chrec.c
branches/gcc-6-branch/gcc/tree-sra.c
branches/gcc-6-branch/gcc/tree-ssa-loop-ivopts.c
branches/gcc-6-branch/gcc/tree-ssa-sccvn.c

[Bug tree-optimization/80275] [6 Regression] Poor (but valid) code generated by optimizer passing optimizer list to function

2017-05-09 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80275

--- Comment #6 from Richard Biener  ---
Author: rguenth
Date: Tue May  9 12:27:24 2017
New Revision: 247790

URL: https://gcc.gnu.org/viewcvs?rev=247790&root=gcc&view=rev
Log:
2017-05-09  Richard Biener  

Backport from mainline
2017-03-28  Richard Biener  

PR middle-end/80222
* gimple-fold.c (gimple_fold_indirect_ref): Do not touch
TYPE_REF_CAN_ALIAS_ALL references.
* fold-const.c (fold_indirect_ref_1): Likewise.

* g++.dg/pr80222.C: New testcase.

2017-04-06  Richard Biener  

PR tree-optimization/80262
* tree-sra.c (build_ref_for_offset): Preserve address-space
information.
* tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address):
Drop useless address-space information on MEM_REF offsets.

* gcc.target/i386/pr80262.c: New testcase.

2017-04-03  Richard Biener  

PR tree-optimization/80275
* fold-const.c (split_address_to_core_and_offset): Handle
POINTER_PLUS_EXPR.

* g++.dg/opt/pr80275.C: New testcase.

2017-04-06  Richard Biener  

PR tree-optimization/80334
* tree-ssa-loop-ivopts.c (rewrite_use_address): Properly
preserve alignment of accesses.

* g++.dg/torture/pr80334.C: New testcase.

2017-04-10  Richard Biener  

PR middle-end/80362
* fold-const.c (fold_binary_loc): Look at unstripped ops when
looking for NEGATE_EXPR in -A / -B to A / B folding.

* gcc.dg/torture/pr80362.c: New testcase.

2017-04-25  Richard Biener  

PR tree-optimization/80492
* alias.c (compare_base_decls): Handle registers with asm
specification conservatively.

* gcc.dg/pr80492.c: New testcase.

2017-04-27  Richard Biener  

PR middle-end/80539
* tree-chrec.c (chrec_fold_plus_poly_poly): Deal with not
being in loop-closed SSA form conservatively.
(chrec_fold_multiply_poly_poly): Likewise.

* gcc.dg/torture/pr80539.c: New testcase.

Added:
branches/gcc-6-branch/gcc/testsuite/g++.dg/opt/pr80275.C
branches/gcc-6-branch/gcc/testsuite/g++.dg/pr80222.C
branches/gcc-6-branch/gcc/testsuite/g++.dg/torture/pr80334.C
branches/gcc-6-branch/gcc/testsuite/gcc.dg/pr80492.c
branches/gcc-6-branch/gcc/testsuite/gcc.dg/torture/pr80362.c
branches/gcc-6-branch/gcc/testsuite/gcc.dg/torture/pr80539.c
branches/gcc-6-branch/gcc/testsuite/gcc.target/i386/pr80262.c
Modified:
branches/gcc-6-branch/gcc/ChangeLog
branches/gcc-6-branch/gcc/alias.c
branches/gcc-6-branch/gcc/fold-const.c
branches/gcc-6-branch/gcc/gimple-fold.c
branches/gcc-6-branch/gcc/testsuite/ChangeLog
branches/gcc-6-branch/gcc/tree-chrec.c
branches/gcc-6-branch/gcc/tree-sra.c
branches/gcc-6-branch/gcc/tree-ssa-loop-ivopts.c
branches/gcc-6-branch/gcc/tree-ssa-sccvn.c

[Bug middle-end/80539] [5 Regression] gcc ICE at -O2 and above on valid code on x86_64-linux-gnu in "chrec_fold_plus_poly_poly"

2017-05-09 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80539

--- Comment #6 from Richard Biener  ---
Author: rguenth
Date: Tue May  9 12:27:24 2017
New Revision: 247790

URL: https://gcc.gnu.org/viewcvs?rev=247790&root=gcc&view=rev
Log:
2017-05-09  Richard Biener  

Backport from mainline
2017-03-28  Richard Biener  

PR middle-end/80222
* gimple-fold.c (gimple_fold_indirect_ref): Do not touch
TYPE_REF_CAN_ALIAS_ALL references.
* fold-const.c (fold_indirect_ref_1): Likewise.

* g++.dg/pr80222.C: New testcase.

2017-04-06  Richard Biener  

PR tree-optimization/80262
* tree-sra.c (build_ref_for_offset): Preserve address-space
information.
* tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address):
Drop useless address-space information on MEM_REF offsets.

* gcc.target/i386/pr80262.c: New testcase.

2017-04-03  Richard Biener  

PR tree-optimization/80275
* fold-const.c (split_address_to_core_and_offset): Handle
POINTER_PLUS_EXPR.

* g++.dg/opt/pr80275.C: New testcase.

2017-04-06  Richard Biener  

PR tree-optimization/80334
* tree-ssa-loop-ivopts.c (rewrite_use_address): Properly
preserve alignment of accesses.

* g++.dg/torture/pr80334.C: New testcase.

2017-04-10  Richard Biener  

PR middle-end/80362
* fold-const.c (fold_binary_loc): Look at unstripped ops when
looking for NEGATE_EXPR in -A / -B to A / B folding.

* gcc.dg/torture/pr80362.c: New testcase.

2017-04-25  Richard Biener  

PR tree-optimization/80492
* alias.c (compare_base_decls): Handle registers with asm
specification conservatively.

* gcc.dg/pr80492.c: New testcase.

2017-04-27  Richard Biener  

PR middle-end/80539
* tree-chrec.c (chrec_fold_plus_poly_poly): Deal with not
being in loop-closed SSA form conservatively.
(chrec_fold_multiply_poly_poly): Likewise.

* gcc.dg/torture/pr80539.c: New testcase.

Added:
branches/gcc-6-branch/gcc/testsuite/g++.dg/opt/pr80275.C
branches/gcc-6-branch/gcc/testsuite/g++.dg/pr80222.C
branches/gcc-6-branch/gcc/testsuite/g++.dg/torture/pr80334.C
branches/gcc-6-branch/gcc/testsuite/gcc.dg/pr80492.c
branches/gcc-6-branch/gcc/testsuite/gcc.dg/torture/pr80362.c
branches/gcc-6-branch/gcc/testsuite/gcc.dg/torture/pr80539.c
branches/gcc-6-branch/gcc/testsuite/gcc.target/i386/pr80262.c
Modified:
branches/gcc-6-branch/gcc/ChangeLog
branches/gcc-6-branch/gcc/alias.c
branches/gcc-6-branch/gcc/fold-const.c
branches/gcc-6-branch/gcc/gimple-fold.c
branches/gcc-6-branch/gcc/testsuite/ChangeLog
branches/gcc-6-branch/gcc/tree-chrec.c
branches/gcc-6-branch/gcc/tree-sra.c
branches/gcc-6-branch/gcc/tree-ssa-loop-ivopts.c
branches/gcc-6-branch/gcc/tree-ssa-sccvn.c

[Bug middle-end/80222] may_alias folded away

2017-05-09 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80222

--- Comment #4 from Richard Biener  ---
Author: rguenth
Date: Tue May  9 12:27:24 2017
New Revision: 247790

URL: https://gcc.gnu.org/viewcvs?rev=247790&root=gcc&view=rev
Log:
2017-05-09  Richard Biener  

Backport from mainline
2017-03-28  Richard Biener  

PR middle-end/80222
* gimple-fold.c (gimple_fold_indirect_ref): Do not touch
TYPE_REF_CAN_ALIAS_ALL references.
* fold-const.c (fold_indirect_ref_1): Likewise.

* g++.dg/pr80222.C: New testcase.

2017-04-06  Richard Biener  

PR tree-optimization/80262
* tree-sra.c (build_ref_for_offset): Preserve address-space
information.
* tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address):
Drop useless address-space information on MEM_REF offsets.

* gcc.target/i386/pr80262.c: New testcase.

2017-04-03  Richard Biener  

PR tree-optimization/80275
* fold-const.c (split_address_to_core_and_offset): Handle
POINTER_PLUS_EXPR.

* g++.dg/opt/pr80275.C: New testcase.

2017-04-06  Richard Biener  

PR tree-optimization/80334
* tree-ssa-loop-ivopts.c (rewrite_use_address): Properly
preserve alignment of accesses.

* g++.dg/torture/pr80334.C: New testcase.

2017-04-10  Richard Biener  

PR middle-end/80362
* fold-const.c (fold_binary_loc): Look at unstripped ops when
looking for NEGATE_EXPR in -A / -B to A / B folding.

* gcc.dg/torture/pr80362.c: New testcase.

2017-04-25  Richard Biener  

PR tree-optimization/80492
* alias.c (compare_base_decls): Handle registers with asm
specification conservatively.

* gcc.dg/pr80492.c: New testcase.

2017-04-27  Richard Biener  

PR middle-end/80539
* tree-chrec.c (chrec_fold_plus_poly_poly): Deal with not
being in loop-closed SSA form conservatively.
(chrec_fold_multiply_poly_poly): Likewise.

* gcc.dg/torture/pr80539.c: New testcase.

Added:
branches/gcc-6-branch/gcc/testsuite/g++.dg/opt/pr80275.C
branches/gcc-6-branch/gcc/testsuite/g++.dg/pr80222.C
branches/gcc-6-branch/gcc/testsuite/g++.dg/torture/pr80334.C
branches/gcc-6-branch/gcc/testsuite/gcc.dg/pr80492.c
branches/gcc-6-branch/gcc/testsuite/gcc.dg/torture/pr80362.c
branches/gcc-6-branch/gcc/testsuite/gcc.dg/torture/pr80539.c
branches/gcc-6-branch/gcc/testsuite/gcc.target/i386/pr80262.c
Modified:
branches/gcc-6-branch/gcc/ChangeLog
branches/gcc-6-branch/gcc/alias.c
branches/gcc-6-branch/gcc/fold-const.c
branches/gcc-6-branch/gcc/gimple-fold.c
branches/gcc-6-branch/gcc/testsuite/ChangeLog
branches/gcc-6-branch/gcc/tree-chrec.c
branches/gcc-6-branch/gcc/tree-sra.c
branches/gcc-6-branch/gcc/tree-ssa-loop-ivopts.c
branches/gcc-6-branch/gcc/tree-ssa-sccvn.c

[Bug tree-optimization/80492] [5/6 Regression] Wrong code when unrolling a loop with inline asm and local regs

2017-05-09 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80492

--- Comment #19 from Richard Biener  ---
Author: rguenth
Date: Tue May  9 12:27:24 2017
New Revision: 247790

URL: https://gcc.gnu.org/viewcvs?rev=247790&root=gcc&view=rev
Log:
2017-05-09  Richard Biener  

Backport from mainline
2017-03-28  Richard Biener  

PR middle-end/80222
* gimple-fold.c (gimple_fold_indirect_ref): Do not touch
TYPE_REF_CAN_ALIAS_ALL references.
* fold-const.c (fold_indirect_ref_1): Likewise.

* g++.dg/pr80222.C: New testcase.

2017-04-06  Richard Biener  

PR tree-optimization/80262
* tree-sra.c (build_ref_for_offset): Preserve address-space
information.
* tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address):
Drop useless address-space information on MEM_REF offsets.

* gcc.target/i386/pr80262.c: New testcase.

2017-04-03  Richard Biener  

PR tree-optimization/80275
* fold-const.c (split_address_to_core_and_offset): Handle
POINTER_PLUS_EXPR.

* g++.dg/opt/pr80275.C: New testcase.

2017-04-06  Richard Biener  

PR tree-optimization/80334
* tree-ssa-loop-ivopts.c (rewrite_use_address): Properly
preserve alignment of accesses.

* g++.dg/torture/pr80334.C: New testcase.

2017-04-10  Richard Biener  

PR middle-end/80362
* fold-const.c (fold_binary_loc): Look at unstripped ops when
looking for NEGATE_EXPR in -A / -B to A / B folding.

* gcc.dg/torture/pr80362.c: New testcase.

2017-04-25  Richard Biener  

PR tree-optimization/80492
* alias.c (compare_base_decls): Handle registers with asm
specification conservatively.

* gcc.dg/pr80492.c: New testcase.

2017-04-27  Richard Biener  

PR middle-end/80539
* tree-chrec.c (chrec_fold_plus_poly_poly): Deal with not
being in loop-closed SSA form conservatively.
(chrec_fold_multiply_poly_poly): Likewise.

* gcc.dg/torture/pr80539.c: New testcase.

Added:
branches/gcc-6-branch/gcc/testsuite/g++.dg/opt/pr80275.C
branches/gcc-6-branch/gcc/testsuite/g++.dg/pr80222.C
branches/gcc-6-branch/gcc/testsuite/g++.dg/torture/pr80334.C
branches/gcc-6-branch/gcc/testsuite/gcc.dg/pr80492.c
branches/gcc-6-branch/gcc/testsuite/gcc.dg/torture/pr80362.c
branches/gcc-6-branch/gcc/testsuite/gcc.dg/torture/pr80539.c
branches/gcc-6-branch/gcc/testsuite/gcc.target/i386/pr80262.c
Modified:
branches/gcc-6-branch/gcc/ChangeLog
branches/gcc-6-branch/gcc/alias.c
branches/gcc-6-branch/gcc/fold-const.c
branches/gcc-6-branch/gcc/gimple-fold.c
branches/gcc-6-branch/gcc/testsuite/ChangeLog
branches/gcc-6-branch/gcc/tree-chrec.c
branches/gcc-6-branch/gcc/tree-sra.c
branches/gcc-6-branch/gcc/tree-ssa-loop-ivopts.c
branches/gcc-6-branch/gcc/tree-ssa-sccvn.c

[Bug libstdc++/80478] Calling `std::bind` on member functions marked as `noexcept` fails to compile with -std=c++1z

2017-05-09 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80478

Jonathan Wakely  changed:

   What|Removed |Added

   Keywords||rejects-valid
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-05-09
Version|7.0.1   |7.1.0
 Ever confirmed|0   |1

[Bug tree-optimization/80275] [6 Regression] Poor (but valid) code generated by optimizer passing optimizer list to function

2017-05-09 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80275

Richard Biener  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
  Known to work||6.3.1
 Resolution|--- |FIXED
  Known to fail|6.3.1   |6.3.0

--- Comment #7 from Richard Biener  ---
Fixed.

[Bug middle-end/80262] address space gets lost in memory access

2017-05-09 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80262

Richard Biener  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
  Known to work||6.3.1
 Resolution|--- |FIXED
  Known to fail||6.3.0

--- Comment #12 from Richard Biener  ---
Fixed for GCC 6.4.

[Bug target/80556] [8 Regression] bootstrap failure for Ada compiler

2017-05-09 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80556

--- Comment #11 from Dominique d'Humieres  ---
Any chance to see this PR fixed soon?

[Bug middle-end/35560] Missing CSE/PRE for memory operations involved in virtual call.

2017-05-09 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=35560

Richard Biener  changed:

   What|Removed |Added

 Status|ASSIGNED|NEW
 CC||hubicka at gcc dot gnu.org
   Assignee|davidxl at gcc dot gnu.org |unassigned at gcc dot 
gnu.org

--- Comment #14 from Richard Biener  ---
The devirt machinery nowadays might have enough tools to do the disambiguation.
 IIRC david is no longer working on GCC so unassigning him.

Current GIMPLE IL is

   [100.00%]:
  _1 = ap_9(D)->_vptr.A;
  _2 = *_1;
  _12 = OBJ_TYPE_REF(_2;(struct A)ap_9(D)->0) (ap_9(D), i_10(D));
  _3 = ap_9(D)->_vptr.A;
  _4 = MEM[(int (*__vtbl_ptr_type) () *)_3 + 8B];
  _14 = OBJ_TYPE_REF(_4;(struct A)ap_9(D)->1) (ap_9(D), i_10(D));
  _5 = _12 + _14;
  _6 = ap_9(D)->_vptr.A;
  _7 = *_6;
  _16 = OBJ_TYPE_REF(_7;(struct A)ap_9(D)->0) (ap_9(D), i_10(D));
  _17 = _5 + _16;
  return _17;

I believe our representation of virtual calls is less than optimal here for
the purpose of CSE and disambiguation.

[Bug sanitizer/80536] [6/7/8 Regression] UBSAN: compile time segfault

2017-05-09 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80536

--- Comment #3 from Marek Polacek  ---
Better testcase:

int
foo (int i)
{
  return ((i * (unsigned long long) (-0 + 1UL)) * 2) % 1;
}

[Bug target/80556] [8 Regression] bootstrap failure for Ada compiler

2017-05-09 Thread gingold at adacore dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80556

--- Comment #12 from Tristan Gingold  ---
On 09/05/2017 14:43, dominiq at lps dot ens.fr wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80556
>
> --- Comment #11 from Dominique d'Humieres  ---
> Any chance to see this PR fixed soon?

Did you try to get gnat1 built without -static-libgcc ?

[Bug libstdc++/80285] `std::make_shared` performs two separate allocations with `-fno-rtti`

2017-05-09 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80285

Jonathan Wakely  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2017-05-09
Version|7.0.1   |7.1.0
   Assignee|unassigned at gcc dot gnu.org  |redi at gcc dot gnu.org
 Ever confirmed|0   |1
   Severity|normal  |enhancement

[Bug target/80556] [8 Regression] bootstrap failure for Ada compiler

2017-05-09 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80556

--- Comment #13 from Dominique d'Humieres  ---
> Did you try to get gnat1 built without -static-libgcc ?

How am I supposed to do that? I have used the same clean configure 

../p_work/configure --prefix=/opt/gcc/gcc8p-247298p1
--enable-languages=c,c++,lto,fortran,ada,objc,obj-c++ --with-gmp=/opt/mp-new
--with-system-zlib --enable-checking=release --with-isl=/opt/mp-new
--enable-lto --enable-plugin --with-arch=corei7 --with-cpu=corei7

and bootstrap for r247298 (bootstraps) and r247302 (fails).

The bootstrap compiler is 

gcc version 8.0.0 20170425 (experimental) [trunk revision 247256]

configured with

../_clean/configure --prefix=/opt/gcc/gcc8a
--enable-languages=c,c++,fortran,ada,lto --with-gmp=/opt/mp-new
--with-system-zlib --enable-checking=release --with-isl=/opt/mp-new
--enable-lto --enable-plugin

[Bug target/80556] [8 Regression] bootstrap failure for Ada compiler

2017-05-09 Thread gingold at adacore dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80556

--- Comment #14 from Tristan Gingold  ---
On 09/05/2017 15:14, dominiq at lps dot ens.fr wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80556
>
> --- Comment #13 from Dominique d'Humieres  ---
>> Did you try to get gnat1 built without -static-libgcc ?
>
> How am I supposed to do that? I have used the same clean configure
>
> ../p_work/configure --prefix=/opt/gcc/gcc8p-247298p1
> --enable-languages=c,c++,lto,fortran,ada,objc,obj-c++ --with-gmp=/opt/mp-new
> --with-system-zlib --enable-checking=release --with-isl=/opt/mp-new
> --enable-lto --enable-plugin --with-arch=corei7 --with-cpu=corei7
>
> and bootstrap for r247298 (bootstraps) and r247302 (fails).
>
> The bootstrap compiler is
>
> gcc version 8.0.0 20170425 (experimental) [trunk revision 247256]
>
> configured with
>
> ../_clean/configure --prefix=/opt/gcc/gcc8a
> --enable-languages=c,c++,fortran,ada,lto --with-gmp=/opt/mp-new
> --with-system-zlib --enable-checking=release --with-isl=/opt/mp-new
> --enable-lto --enable-plugin

You should add:

--with-stage1-ldflags=-static-libstdc++ 
--with-boot-ldflags=-static-libstdc++

to your configure line.

[Bug testsuite/80611] [8 regression] test case gfortran.dg/coarray_lock_7.f90 fails starting with r247495

2017-05-09 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80611

--- Comment #2 from Dominique d'Humieres  ---
The following patch fixes the failures:

--- ../_clean/gcc/testsuite/gfortran.dg/coarray_lock_7.f90  2016-09-19
18:03:55.0 +0200
+++ gcc/testsuite/gfortran.dg/coarray_lock_7.f902017-05-09
15:37:16.0 +0200
@@ -35,8 +35,8 @@ end
 ! { dg-final { scan-tree-dump-times "_gfortran_caf_lock \\(caf_token.., 0, 0,
0B, 0B, 0B, 0\\);" 1 "original" } }
 ! { dg-final { scan-tree-dump-times "_gfortran_caf_unlock \\(caf_token.., 0,
0, 0B, 0B, 0\\);" 1 "original" } }

-! { dg-final { scan-tree-dump-times "_gfortran_caf_lock \\(caf_token.., \\(3 -
\\(integer\\(kind=4\\)\\) parm...dim\\\[0\\\].lbound\\) \\+
\\(integer\\(kind=4\\)\\) MAX_EXPR <\\(parm...dim\\\[0\\\].ubound -
parm...dim\\\[0\\\].lbound\\) \\+ 1, 0> \\* \\(3 - \\(integer\\(kind=4\\)\\)
parm...dim\\\[1\\\].lbound\\), 0, 0B, &ii, 0B, 0\\);|_gfortran_caf_lock
\\(caf_token.1, \\(3 - parm...dim\\\[0\\\].lbound\\) \\+ MAX_EXPR
<\\(parm...dim\\\[0\\\].ubound - parm...dim\\\[0\\\].lbound\\) \\+ 1, 0> \\*
\\(3 - parm...dim\\\[1\\\].lbound\\), 0, 0B, &ii, 0B, 0\\);" 1 "original" } }
-! { dg-final { scan-tree-dump-times "_gfortran_caf_unlock \\(caf_token.., \\(2
- \\(integer\\(kind=4\\)\\) parm...dim\\\[0\\\].lbound\\) \\+
\\(integer\\(kind=4\\)\\) MAX_EXPR <\\(parm...dim\\\[0\\\].ubound -
parm...dim\\\[0\\\].lbound\\) \\+ 1, 0> \\* \\(3 - \\(integer\\(kind=4\\)\\)
parm...dim\\\[1\\\].lbound\\), 0, &ii, 0B, 0\\);|_gfortran_caf_unlock
\\(caf_token.., \\(2 - parm...dim\\\[0\\\].lbound\\) \\+ MAX_EXPR
<\\(parm...dim\\\[0\\\].ubound - parm...dim\\\[0\\\].lbound\\) \\+ 1, 0> \\*
\\(3 - parm...dim\\\[1\\\].lbound\\), 0, &ii, 0B, 0\\);" 1 "original" } }
+! { dg-final { scan-tree-dump-times "_gfortran_caf_lock \\(caf_token.., \\(3 -
\\(integer\\(kind=4\\)\\) parm...dim\\\[0\\\].lbound\\) \\+
\\(integer\\(kind=4\\)\\) \\(MAX_EXPR  \\+ 1\\) \\* \\(3 - \\(integer\\(kind=4\\)\\)
parm...dim\\\[1\\\].lbound\\), 0, 0B, &ii, 0B, 0\\);|_gfortran_caf_lock
\\(caf_token.1, \\(3 - parm...dim\\\[0\\\].lbound\\) \\+ \\(MAX_EXPR
 \\+ 1\\) \\* \\(3
- parm...dim\\\[1\\\].lbound\\), 0, 0B, &ii, 0B, 0\\);" 1 "original" } }
+! { dg-final { scan-tree-dump-times "_gfortran_caf_unlock \\(caf_token.., \\(2
- \\(integer\\(kind=4\\)\\) parm...dim\\\[0\\\].lbound\\) \\+
\\(integer\\(kind=4\\)\\) \\(MAX_EXPR  \\+ 1\\) \\* \\(3 - \\(integer\\(kind=4\\)\\)
parm...dim\\\[1\\\].lbound\\), 0, &ii, 0B, 0\\);|_gfortran_caf_unlock
\\(caf_token.., \\(2 - parm...dim\\\[0\\\].lbound\\) \\+ \\(MAX_EXPR
 \\+ 1\\) \\* \\(3
- parm...dim\\\[1\\\].lbound\\), 0, &ii, 0B, 0\\);" 1 "original" } }

 ! { dg-final { scan-tree-dump-times "_gfortran_caf_lock \\(three.token, 0, 5 -
\\(integer\\(kind=4\\)\\) three.dim\\\[0\\\].lbound, &acquired.\[0-9\]+, 0B,
0B, 0\\);|_gfortran_caf_lock \\(three.token, 0, 5 - three.dim\\\[0\\\].lbound,
&acquired.\[0-9\]+, 0B, 0B, 0\\);" 1 "original" } }
 ! { dg-final { scan-tree-dump-times "_gfortran_caf_unlock \\(three.token, 0, 8
- \\(integer\\(kind=4\\)\\) three.dim\\\[0\\\].lbound, &ii, 0B,
0\\);|_gfortran_caf_unlock \\(three.token, 0, 8 - three.dim\\\[0\\\].lbound,
&ii, 0B, 0\\);" 1 "original" } }

I didn't try to find which revision replaced

MAX_EXPR <(parm.9.dim[0].ubound - parm.9.dim[0].lbound) + 1, 0>

with

(MAX_EXPR  + 1)

[Bug testsuite/80611] [8 regression] test case gfortran.dg/coarray_lock_7.f90 fails starting with r247495

2017-05-09 Thread rguenther at suse dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80611

--- Comment #3 from rguenther at suse dot de  ---
On Tue, 9 May 2017, dominiq at lps dot ens.fr wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80611
> 
> --- Comment #2 from Dominique d'Humieres  ---
> The following patch fixes the failures:
> 
> --- ../_clean/gcc/testsuite/gfortran.dg/coarray_lock_7.f90  2016-09-19
> 18:03:55.0 +0200
> +++ gcc/testsuite/gfortran.dg/coarray_lock_7.f902017-05-09
> 15:37:16.0 +0200
> @@ -35,8 +35,8 @@ end
>  ! { dg-final { scan-tree-dump-times "_gfortran_caf_lock \\(caf_token.., 0, 0,
> 0B, 0B, 0B, 0\\);" 1 "original" } }
>  ! { dg-final { scan-tree-dump-times "_gfortran_caf_unlock \\(caf_token.., 0,
> 0, 0B, 0B, 0\\);" 1 "original" } }
> 
> -! { dg-final { scan-tree-dump-times "_gfortran_caf_lock \\(caf_token.., \\(3 
> -
> \\(integer\\(kind=4\\)\\) parm...dim\\\[0\\\].lbound\\) \\+
> \\(integer\\(kind=4\\)\\) MAX_EXPR <\\(parm...dim\\\[0\\\].ubound -
> parm...dim\\\[0\\\].lbound\\) \\+ 1, 0> \\* \\(3 - \\(integer\\(kind=4\\)\\)
> parm...dim\\\[1\\\].lbound\\), 0, 0B, &ii, 0B, 0\\);|_gfortran_caf_lock
> \\(caf_token.1, \\(3 - parm...dim\\\[0\\\].lbound\\) \\+ MAX_EXPR
> <\\(parm...dim\\\[0\\\].ubound - parm...dim\\\[0\\\].lbound\\) \\+ 1, 0> \\*
> \\(3 - parm...dim\\\[1\\\].lbound\\), 0, 0B, &ii, 0B, 0\\);" 1 "original" } }
> -! { dg-final { scan-tree-dump-times "_gfortran_caf_unlock \\(caf_token.., 
> \\(2
> - \\(integer\\(kind=4\\)\\) parm...dim\\\[0\\\].lbound\\) \\+
> \\(integer\\(kind=4\\)\\) MAX_EXPR <\\(parm...dim\\\[0\\\].ubound -
> parm...dim\\\[0\\\].lbound\\) \\+ 1, 0> \\* \\(3 - \\(integer\\(kind=4\\)\\)
> parm...dim\\\[1\\\].lbound\\), 0, &ii, 0B, 0\\);|_gfortran_caf_unlock
> \\(caf_token.., \\(2 - parm...dim\\\[0\\\].lbound\\) \\+ MAX_EXPR
> <\\(parm...dim\\\[0\\\].ubound - parm...dim\\\[0\\\].lbound\\) \\+ 1, 0> \\*
> \\(3 - parm...dim\\\[1\\\].lbound\\), 0, &ii, 0B, 0\\);" 1 "original" } }
> +! { dg-final { scan-tree-dump-times "_gfortran_caf_lock \\(caf_token.., \\(3 
> -
> \\(integer\\(kind=4\\)\\) parm...dim\\\[0\\\].lbound\\) \\+
> \\(integer\\(kind=4\\)\\) \\(MAX_EXPR  parm...dim\\\[0\\\].lbound, -1> \\+ 1\\) \\* \\(3 - \\(integer\\(kind=4\\)\\)
> parm...dim\\\[1\\\].lbound\\), 0, 0B, &ii, 0B, 0\\);|_gfortran_caf_lock
> \\(caf_token.1, \\(3 - parm...dim\\\[0\\\].lbound\\) \\+ \\(MAX_EXPR
>  \\+ 1\\) \\* 
> \\(3
> - parm...dim\\\[1\\\].lbound\\), 0, 0B, &ii, 0B, 0\\);" 1 "original" } }
> +! { dg-final { scan-tree-dump-times "_gfortran_caf_unlock \\(caf_token.., 
> \\(2
> - \\(integer\\(kind=4\\)\\) parm...dim\\\[0\\\].lbound\\) \\+
> \\(integer\\(kind=4\\)\\) \\(MAX_EXPR  parm...dim\\\[0\\\].lbound, -1> \\+ 1\\) \\* \\(3 - \\(integer\\(kind=4\\)\\)
> parm...dim\\\[1\\\].lbound\\), 0, &ii, 0B, 0\\);|_gfortran_caf_unlock
> \\(caf_token.., \\(2 - parm...dim\\\[0\\\].lbound\\) \\+ \\(MAX_EXPR
>  \\+ 1\\) \\* 
> \\(3
> - parm...dim\\\[1\\\].lbound\\), 0, &ii, 0B, 0\\);" 1 "original" } }
> 
>  ! { dg-final { scan-tree-dump-times "_gfortran_caf_lock \\(three.token, 0, 5 
> -
> \\(integer\\(kind=4\\)\\) three.dim\\\[0\\\].lbound, &acquired.\[0-9\]+, 0B,
> 0B, 0\\);|_gfortran_caf_lock \\(three.token, 0, 5 - three.dim\\\[0\\\].lbound,
> &acquired.\[0-9\]+, 0B, 0B, 0\\);" 1 "original" } }
>  ! { dg-final { scan-tree-dump-times "_gfortran_caf_unlock \\(three.token, 0, 
> 8
> - \\(integer\\(kind=4\\)\\) three.dim\\\[0\\\].lbound, &ii, 0B,
> 0\\);|_gfortran_caf_unlock \\(three.token, 0, 8 - three.dim\\\[0\\\].lbound,
> &ii, 0B, 0\\);" 1 "original" } }
> 
> I didn't try to find which revision replaced
> 
> MAX_EXPR <(parm.9.dim[0].ubound - parm.9.dim[0].lbound) + 1, 0>
> 
> with
> 
> (MAX_EXPR  + 1)

The one enabling strict overflow by default for sure.  Thanks for fixing
and please commit!

[Bug c++/70167] Some const array prvalues are incorrectly treated as lvalues

2017-05-09 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70167

--- Comment #4 from Jason Merrill  ---
Author: jason
Date: Tue May  9 13:48:58 2017
New Revision: 247793

URL: https://gcc.gnu.org/viewcvs?rev=247793&root=gcc&view=rev
Log:
PR c++/70167 - array prvalue treated as lvalue

* cp-tree.h (CONSTRUCTOR_C99_COMPOUND_LITERAL): New.
(enum fcl_t): New.
* semantics.c (finish_compound_literal): Add fcl_context parameter.
Only make a static variable for C99 syntax.
* parser.c (cp_parser_postfix_expression): Pass it.
* pt.c (tsubst_copy_and_build): Likewise.
* call.c (extend_ref_init_temps): Set
DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P.

Added:
trunk/gcc/testsuite/g++.dg/cpp0x/initlist-array6.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/call.c
trunk/gcc/cp/cp-tree.h
trunk/gcc/cp/parser.c
trunk/gcc/cp/pt.c
trunk/gcc/cp/semantics.c

[Bug target/80689] 128 loads generated for structure copying with gcc 7.1.0 and leads to STLF stalls in avx2 targets.

2017-05-09 Thread venkataramanan.kumar at amd dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80689

--- Comment #6 from Venkataramanan  ---
(In reply to Richard Biener from comment #4)
> What does ICC do if you use int and/or short fields in st1?  Does it perform
> struct copying member-wise?

It copies member wise. -O2 /-O2 -march=core-avx2

For "int" member  types
test(st2*, unsigned long, unsigned long, long, long):
mov   DWORD PTR [4+rdi], esi#29.9
mov   DWORD PTR [8+rdi], edx#29.9
mov   DWORD PTR [12+rdi], ecx   #29.9
mov   DWORD PTR [16+rdi], r8d   #29.9
ret #25.1
Set(st1 const*, st2*):
mov   eax, DWORD PTR [rdi]  #29.22
mov   DWORD PTR [4+rsi], eax#29.9
mov   edx, DWORD PTR [4+rdi]#29.22
mov   DWORD PTR [8+rsi], edx#29.9
mov   ecx, DWORD PTR [8+rdi]#29.22
mov   DWORD PTR [12+rsi], ecx   #29.9
mov   r8d, DWORD PTR [12+rdi]   #29.22
mov   DWORD PTR [16+rsi], r8d   #29.9
ret

 for "short" member type  
 test(st2*, unsigned long, unsigned long, long, long):
 mov   WORD PTR [4+rdi], si  #29.9
 mov   WORD PTR [6+rdi], dx  #29.9
 mov   WORD PTR [8+rdi], cx  #29.9
 mov   WORD PTR [10+rdi], r8w#29.9
 ret #25.1
 Set(st1 const*, st2*):
 movzx eax, WORD PTR [rdi]   #29.22
 mov   WORD PTR [4+rsi], ax  #29.9
 movzx edx, WORD PTR [2+rdi] #29.22
 mov   WORD PTR [6+rsi], dx  #29.9
 movzx ecx, WORD PTR [4+rdi] #29.22
 mov   WORD PTR [8+rsi], cx  #29.9
 movzx r8d, WORD PTR [6+rdi] #29.22
 mov   WORD PTR [10+rsi], r8w#29.9
ret #30.1

[Bug fortran/79929] [7/8 Regression] Bogus Warning: '__builtin_memset': specified size 4294967291 exceeds maximum object size 2147483647

2017-05-09 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79929

--- Comment #21 from Martin Sebor  ---
The rtl.c error was discussed in the context of some other bug having to do
with profiledbootstrap failure (I can't find the bug now).  If I recall, it's
due to the same signed <-> unsigned conversion issue as a number of other
warnings of this kind, i.e., rtvec_alloc taking a signed int argument that's
being converted to size_t.  Besides configuring with the --disable-werror
recommended for profiledbootstrap, adding a gcc_assert(n >= 0) fixed it. 
Strangely, though, changing the function's argument to unsigned seemed to
tickle some latent bug somewhere and caused GCC to crash during bootstrap.  I
never investigated why.

[Bug testsuite/80694] New: [8 regression] test cases gcc.dg/vect/vect-44.c and vect-50.c fail starting with r247780

2017-05-09 Thread seurer at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80694

Bug ID: 80694
   Summary: [8 regression] test cases gcc.dg/vect/vect-44.c and
vect-50.c fail starting with r247780
   Product: gcc
   Version: 8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: testsuite
  Assignee: unassigned at gcc dot gnu.org
  Reporter: seurer at gcc dot gnu.org
  Target Milestone: ---

r247780 updated (well, reverted) these two test cases and now they are failing
on powerpc64le.

spawn /home/seurer/gcc/build/gcc-test/gcc/xgcc
-B/home/seurer/gcc/build/gcc-test/gcc/
/home/seurer/gcc/gcc-test/gcc/testsuite/gcc.dg/vect/vect-50.c
-fno-diagnostics-show-caret -fdiagnostics-color=never -maltivec -mpower8-vector
-ftree-vectorize -fno-vect-cost-model -fno-common -O2 -fdump-tree-vect-details
-lm -o ./vect-50.exe
PASS: gcc.dg/vect/vect-50.c (test for excess errors)
Setting LD_LIBRARY_PATH to
:/home/seurer/gcc/build/gcc-test/gcc::/home/seurer/gcc/build/gcc-test/gcc:/home/seurer/gcc/build/gcc-test/./gmp/.libs:/home/seurer/gcc/build/gcc-test/./prev-gmp/.libs:/home/seurer/gcc/build/gcc-test/./mpfr/src/.libs:/home/seurer/gcc/build/gcc-test/./prev-mpfr/src/.libs:/home/seurer/gcc/build/gcc-test/./mpc/src/.libs:/home/seurer/gcc/build/gcc-test/./prev-mpc/src/.libs:/home/seurer/gcc/build/gcc-test/./isl/.libs:/home/seurer/gcc/build/gcc-test/./prev-isl/.libs:/home/seurer/gcc/install/gcc-6.2.0/lib64
spawn [open ...]
PASS: gcc.dg/vect/vect-50.c execution test
PASS: gcc.dg/vect/vect-50.c scan-tree-dump-times vect "vectorized 1 loops" 1
FAIL: gcc.dg/vect/vect-50.c scan-tree-dump-times vect "Vectorizing an unaligned
access" 2
FAIL: gcc.dg/vect/vect-50.c scan-tree-dump-times vect "Vectorizing an unaligned
access" 2
FAIL: gcc.dg/vect/vect-50.c scan-tree-dump-times vect "Alignment of access
forced using peeling" 1
Executing on host: /home/seurer/gcc/build/gcc-test/gcc/xgcc
-B/home/seurer/gcc/build/gcc-test/gcc/
/home/seurer/gcc/gcc-test/gcc/testsuite/gcc.dg/vect/vect-50.c 
-fno-diagnostics-show-caret -fdiagnostics-color=never  -flto -ffat-lto-objects
-maltivec -mpower8-vector -ftree-vectorize -fno-vect-cost-model -fno-common -O2
-fdump-tree-vect-details  -lm-o ./vect-50.exe(timeout = 300)
spawn /home/seurer/gcc/build/gcc-test/gcc/xgcc
-B/home/seurer/gcc/build/gcc-test/gcc/
/home/seurer/gcc/gcc-test/gcc/testsuite/gcc.dg/vect/vect-50.c
-fno-diagnostics-show-caret -fdiagnostics-color=never -flto -ffat-lto-objects
-maltivec -mpower8-vector -ftree-vectorize -fno-vect-cost-model -fno-common -O2
-fdump-tree-vect-details -lm -o ./vect-50.exe
PASS: gcc.dg/vect/vect-50.c -flto -ffat-lto-objects (test for excess errors)
Setting LD_LIBRARY_PATH to
:/home/seurer/gcc/build/gcc-test/gcc::/home/seurer/gcc/build/gcc-test/gcc:/home/seurer/gcc/build/gcc-test/./gmp/.libs:/home/seurer/gcc/build/gcc-test/./prev-gmp/.libs:/home/seurer/gcc/build/gcc-test/./mpfr/src/.libs:/home/seurer/gcc/build/gcc-test/./prev-mpfr/src/.libs:/home/seurer/gcc/build/gcc-test/./mpc/src/.libs:/home/seurer/gcc/build/gcc-test/./prev-mpc/src/.libs:/home/seurer/gcc/build/gcc-test/./isl/.libs:/home/seurer/gcc/build/gcc-test/./prev-isl/.libs:/home/seurer/gcc/install/gcc-6.2.0/lib64
spawn [open ...]
PASS: gcc.dg/vect/vect-50.c -flto -ffat-lto-objects execution test
PASS: gcc.dg/vect/vect-50.c -flto -ffat-lto-objects  scan-tree-dump-times vect
"vectorized 1 loops" 1
FAIL: gcc.dg/vect/vect-50.c -flto -ffat-lto-objects  scan-tree-dump-times vect
"Vectorizing an unaligned access" 2
FAIL: gcc.dg/vect/vect-50.c -flto -ffat-lto-objects  scan-tree-dump-times vect
"Vectorizing an unaligned access" 2
FAIL: gcc.dg/vect/vect-50.c -flto -ffat-lto-objects  scan-tree-dump-times vect
"Alignment of access forced using peeling" 1
testcase /home/seurer/gcc/gcc-test/gcc/testsuite/gcc.dg/vect/vect.exp completed
in 1 seconds

=== gcc Summary ===

# of expected passes6
# of unexpected failures6

[Bug c++/80691] Narrowing conversion in {} allowed in a SFINAE context

2017-05-09 Thread griwes at griwes dot info
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80691

--- Comment #1 from Michał Dominiak  ---
This bug makes it seem (in SFINAE contexts) that std::string is constructible
from double with an initializer-list constructor, without narrowing:

#include 
#include 

using std::void_t;

template
struct is_nonnarrowing_conversion : std::false_type {};

template
struct is_nonnarrowing_conversion() })>> : std::true_type {};

static_assert(!is_nonnarrowing_conversion());

[Bug middle-end/77709] specified destination size warning does not work when cross-compiling from 64 host to 32bit target

2017-05-09 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77709

Martin Sebor  changed:

   What|Removed |Added

 Status|ASSIGNED|WAITING

--- Comment #3 from Martin Sebor  ---
Sorry, I forgot about this bug.  The test has changed and the line numbers in
the failures don't correspond to the same assertions in the latest revision but
the problem should be fixed.  I don't see any failures in this test in the
results reported for arm-none-eabi or other 32-bit targets.  If you still see
failures on trunk, can you post the current output?

[Bug middle-end/77709] specified destination size warning does not work when cross-compiling from 64 host to 32bit target

2017-05-09 Thread thopre01 at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77709

Thomas Preud'homme  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |FIXED

--- Comment #4 from Thomas Preud'homme  ---
(In reply to Martin Sebor from comment #3)
> Sorry, I forgot about this bug.  The test has changed and the line numbers
> in the failures don't correspond to the same assertions in the latest
> revision but the problem should be fixed.  I don't see any failures in this
> test in the results reported for arm-none-eabi or other 32-bit targets.  If
> you still see failures on trunk, can you post the current output?

My bad, it's only PASS now, I should have checked before pinging. Sorry for the
noise

[Bug target/80673] sparcv9-solaris2.11 bootstrap error: cannot convert ‘format_std_version {enum}’ to ‘const char*’ in initialization

2017-05-09 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80673

Martin Sebor  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2017-05-09
   Assignee|unassigned at gcc dot gnu.org  |msebor at gcc dot 
gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Martin Sebor  ---
Looks like the error might actually be caused by my own patch for bug 80280
(now committed).  Let me fix it.

[Bug c++/80691] Narrowing conversion in {} allowed in a SFINAE context

2017-05-09 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80691

Jonathan Wakely  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-05-09
 Ever confirmed|0   |1

--- Comment #2 from Jonathan Wakely  ---
This only happens in C++17 mode. With -std=gnu++14 it compiles OK, and also
with -std=c++14 if you make it C++14-compatible:

#include 
#include 

template using void_t = void;

template
struct is_nonnarrowing_conversion : std::false_type {};

template
struct is_nonnarrowing_conversion() })>> : std::true_type {};

template
class wrapper
{
public:
wrapper(T) {}
};

static_assert(!is_nonnarrowing_conversion(), "");
static_assert(!is_nonnarrowing_conversion, float>(), "");

[Bug fortran/80668] wrong error message with -finit-derived

2017-05-09 Thread foreese at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80668

Fritz Reese  changed:

   What|Removed |Added

 Status|ASSIGNED|WAITING

--- Comment #2 from Fritz Reese  ---
Patch submitted, pending trunk:

https://gcc.gnu.org/ml/fortran/2017-05/msg00030.html

[Bug translation/80280] Missing closing quote (%>) c/semantics.c and c/c-typeck.c

2017-05-09 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80280

--- Comment #8 from Martin Sebor  ---
Author: msebor
Date: Tue May  9 15:39:54 2017
New Revision: 247801

URL: https://gcc.gnu.org/viewcvs?rev=247801&root=gcc&view=rev
Log:
gcc/ChangeLog:

PR translation/80280
* config/i386/msformat-c.c (ms_printf_flag_specs): Initialize new
data member added in r247778.
(ms_scanf_flag_specs, ms_strftime_flag_specs): Same.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/i386/msformat-c.c

[Bug target/80556] [8 Regression] bootstrap failure for Ada compiler

2017-05-09 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80556

--- Comment #15 from Dominique d'Humieres  ---
> You should add:
>
> --with-stage1-ldflags=-static-libstdc++ 
> --with-boot-ldflags=-static-libstdc++
>
> to your configure line.

With these lines added to my configure line I have been able to bootstrap
revision r247792. However this addition was not necessary before and I don't
think it is the end user responsibility to do the addition.

[Bug translation/80280] Missing closing quote (%>) c/semantics.c and c/c-typeck.c

2017-05-09 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80280

--- Comment #9 from Martin Sebor  ---
Author: msebor
Date: Tue May  9 15:55:05 2017
New Revision: 247804

URL: https://gcc.gnu.org/viewcvs?rev=247804&root=gcc&view=rev
Log:
gcc/ChangeLog:

PR translation/80280
* config/sol2-c.c (cmn_err_flag_specs): Initialize new data member
added in r247778.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/sol2-c.c

[Bug target/80673] sparcv9-solaris2.11 bootstrap error: cannot convert ‘format_std_version {enum}’ to ‘const char*’ in initialization

2017-05-09 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80673

Martin Sebor  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #2 from Martin Sebor  ---
Fixed via r247804.  The bootstrap succeeds.

[Bug c++/80691] Narrowing conversion in {} allowed in a SFINAE context

2017-05-09 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80691

--- Comment #3 from Jonathan Wakely  ---
Standalone testcase that compiles as C++11 or C++14, fails as C++17:

struct true_type { static constexpr bool value = true; };
struct false_type { static constexpr bool value = false; };
template using void_t = void;
template T&& declval();

template
struct is_nonnarrowing_conversion : false_type {};

template
struct is_nonnarrowing_conversion() })>> : true_type {};

template
class wrapper
{
public:
wrapper(T) {}
};

static_assert(!is_nonnarrowing_conversion::value, "");
static_assert(!is_nonnarrowing_conversion, float>::value, "");

[Bug testsuite/80611] [8 regression] test case gfortran.dg/coarray_lock_7.f90 fails starting with r247495

2017-05-09 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80611

Dominique d'Humieres  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

--- Comment #4 from Dominique d'Humieres  ---
Revision 247803

Author: dominiq
Date:   Tue May 9 15:47:02 2017 UTC (11 minutes, 52 seconds ago)
Changed paths:  2
Log Message:
2017-05-09  Dominique d'Humieres  

PR testsuite/80611
* gfortran.dg/coarray_lock_7.f90: Fix dg-final regexps.

[Bug sanitizer/80536] [6/7/8 Regression] UBSAN: compile time segfault

2017-05-09 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80536

--- Comment #4 from Jakub Jelinek  ---
Would dropping the fold call from save_expr fix this?

[Bug sanitizer/80536] [6/7/8 Regression] UBSAN: compile time segfault

2017-05-09 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80536

--- Comment #5 from Jakub Jelinek  ---
To expand on that, I think we want to drop that call from there and instead be
able to simplify somehow a SAVE_EXPR if after c_fully_fold or cp_fold it
becomes simple enough not to require any saving.

[Bug sanitizer/80536] [6/7/8 Regression] UBSAN: compile time segfault

2017-05-09 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80536

--- Comment #6 from Marek Polacek  ---
Yeah, it helps with this particular testcase (and I agree we want to get rid of
that fold() call in save_expr -- I'll take care of it), but I wonder if this
issue is something separate: starting with r230506 we can generate expressions
such as
i * ((unsigned long) -0 + 1) * 2
and given how fold() works we don't get to simplify the sub-expression
"(unsigned long) -0 + 1)" so this expression isn't folded to "i * 2".  So I
wonder if we want something like

--- a/gcc/convert.c
+++ b/gcc/convert.c
@@ -524,7 +524,13 @@ convert_to_integer_1 (tree type, tree expr, bool dofold)
return expr;
   return build2_loc (EXPR_LOCATION (expr), COMPOUND_EXPR, TREE_TYPE (t),
 TREE_OPERAND (expr, 0), t);
-}
+}
+
+  /* -0 is 0, so get rid of the NEGATE_EXPR.  */
+  if (0 && ex_form == NEGATE_EXPR
+  && TREE_CODE (TREE_OPERAND (expr, 0)) == INTEGER_CST
+  && integer_zerop (TREE_OPERAND (expr, 0)))
+return convert_to_integer_maybe_fold (type, TREE_OPERAND (expr, 0),
dofold);

   /* Convert e.g. (long)round(d) -> lround(d).  */
   /* If we're converting to char, we may encounter differing behavior

[Bug sanitizer/80536] [6/7/8 Regression] UBSAN: compile time segfault

2017-05-09 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80536

--- Comment #7 from Marek Polacek  ---
I.e. I'm worried we could trigger the endless recursion also if we happen to
call fold() on that expression via a different path than from save_expr.

[Bug sanitizer/80536] [6/7/8 Regression] UBSAN: compile time segfault

2017-05-09 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80536

--- Comment #8 from Jakub Jelinek  ---
But we ideally shouldn't be folding anything until we actually c_fully_fold or
cp_fold recursively, starting with the leafs.  Most of the folders heavily rely
on that.

[Bug c++/80186] ICE on C++ code with invalid constructor: Segmentation fault (program cc1plus)

2017-05-09 Thread paolo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80186

--- Comment #3 from paolo at gcc dot gnu.org  ---
Author: paolo
Date: Tue May  9 16:56:34 2017
New Revision: 247807

URL: https://gcc.gnu.org/viewcvs?rev=247807&root=gcc&view=rev
Log:
/cp
2017-05-09  Paolo Carlini  

PR c++/80186
* pt.c (tsubst_decl): Early return error_mark_node if
grok_ctor_properties returns false.

/testsuite
2017-05-09  Paolo Carlini  

PR c++/80186
* g++.dg/template/crash126.C: New.

Added:
trunk/gcc/testsuite/g++.dg/template/crash126.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/pt.c
trunk/gcc/testsuite/ChangeLog

[Bug c++/80186] ICE on C++ code with invalid constructor: Segmentation fault (program cc1plus)

2017-05-09 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80186

Paolo Carlini  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED
   Assignee|paolo.carlini at oracle dot com|unassigned at gcc dot 
gnu.org
   Target Milestone|--- |8.0

--- Comment #4 from Paolo Carlini  ---
Fixed.

[Bug sanitizer/80536] [6/7/8 Regression] UBSAN: compile time segfault

2017-05-09 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80536

--- Comment #9 from Marek Polacek  ---
Well, I hope we're not.  Very much related: PR80386.

[Bug sanitizer/80386] UBSAN: false positive - constant folding and reassosiation before instrumentation

2017-05-09 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80386

Marek Polacek  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |mpolacek at gcc dot 
gnu.org

[Bug sanitizer/80536] [6/7/8 Regression] UBSAN: compile time segfault

2017-05-09 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80536

--- Comment #10 from Marek Polacek  ---
Removing the fold() call doesn't regress anything, btw.

[Bug testsuite/80643] NA->FAIL: gcc.dg/pr79214.c gcc.dg/pr79222.c gcc.dg/pr79223.c gcc.dg/tree-ssa/builtins-folding-gimple-ub.c

2017-05-09 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80643

Martin Sebor  changed:

   What|Removed |Added

   Keywords||diagnostic
 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #5 from Martin Sebor  ---
Fixed in r247808.

[Bug testsuite/80643] NA->FAIL: gcc.dg/pr79214.c gcc.dg/pr79222.c gcc.dg/pr79223.c gcc.dg/tree-ssa/builtins-folding-gimple-ub.c

2017-05-09 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80643

--- Comment #6 from Martin Sebor  ---
Author: msebor
Date: Tue May  9 17:32:59 2017
New Revision: 247808

URL: https://gcc.gnu.org/viewcvs?rev=247808&root=gcc&view=rev
Log:
gcc/testsuite/ChangeLog:

PR testsuite/80643
* c-c++-common/Wsizeof-pointer-memaccess2.c: Prune -Wformat-overflow
output.

Modified:
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/c-c++-common/Wsizeof-pointer-memaccess2.c

[Bug target/80695] New: gratuitous use of stxvx to store multiple pointers

2017-05-09 Thread acsawdey at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80695

Bug ID: 80695
   Summary: gratuitous use of stxvx to store multiple pointers
   Product: gcc
   Version: 7.1.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: acsawdey at gcc dot gnu.org
CC: meissner at gcc dot gnu.org, wschmidt at gcc dot gnu.org
  Target Milestone: ---
Target: powerpc64*-*-* power9

Testing 7.1.0 on power9, compiling the following code with -O3 -mcpu=power9

typedef struct _IO_FILE {
  int _flags;   /* High-order word is _IO_MAGIC; rest is flags. */
  char* _IO_read_ptr;   /* Current read pointer */
  char* _IO_read_end;   /* End of get area. */
  char* _IO_read_base;  /* Start of putback+get area. */
  char* _IO_write_base; /* Start of put area. */
  char* _IO_write_ptr;  /* Current put pointer. */
  char* _IO_write_end;  /* End of put area. */
  char* _IO_buf_base;   /* Start of reserve area. */
  char* _IO_buf_end;/* End of reserve area. */
} _IO_FILE;
int
_IO_new_file_overflow (_IO_FILE *f, int ch)
{
  if (f->_IO_read_ptr == f->_IO_buf_end)
f->_IO_read_end = f->_IO_read_ptr = f->_IO_buf_base;
  f->_IO_write_ptr = f->_IO_read_ptr;
  f->_IO_write_base = f->_IO_write_ptr;
  f->_IO_write_end = f->_IO_buf_end;
  f->_IO_read_base = f->_IO_read_ptr = f->_IO_read_end;
  return (unsigned char) ch;
}

results in this generated code:

_IO_new_file_overflow:
ld 10,8(3)
ld 8,64(3)
mr 9,3
cmpld 7,10,8
beq 7,.L2
ld 7,16(3)
mtvsrdd 0,8,10
li 8,24
rlwinm 3,4,0,0xff
mtvsrdd 12,10,7
li 10,40
std 7,8(9)
stxvx 12,9,8
stxvx 0,9,10
blr
.p2align 4,,15
.L2:
ld 10,56(3)
mr 7,10
mtvsrdd 0,8,10
std 10,16(3)
li 8,24
rlwinm 3,4,0,0xff
mtvsrdd 12,10,7
li 10,40
std 7,8(9)
stxvx 12,9,8
stxvx 0,9,10
blr

This is an improvement over gcc6 which used multiple mtvsrd plus xxpermdi to
accomplish the same thing. However it seems to me it would still be better just
to generate 4 std instructions. We then get rid of 2 mtvsrdd, 2 stxvx, and 2 li
instructions.

[Bug fortran/80696] New: [8 Regression] New Failures to do with matmul

2017-05-09 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80696

Bug ID: 80696
   Summary: [8 Regression] New Failures to do with matmul
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: tkoenig at gcc dot gnu.org
  Target Milestone: ---

There are some new failures with matmul with -m32, reported e.g. at

https://gcc.gnu.org/ml/fortran/2017-05/msg00027.html (testsuite
failures) and https://gcc.gnu.org/ml/fortran/2017-05/msg00026.html
(SPEC failure).

These failures are _really_ strange.  One of the failing test
cases is generic_20.f90.

$ gfortran -O0 generic_20.f90
$ ./a.out
$ gfortran -m32 -O0 generic_20.f90
$ ./a.out
-559038737
0 2.00

There isn't even a write statement in the patch, so this
points towards some kind of memory corruption, so it
is probably not the front end patch.

Investigating.

[Bug target/80695] gratuitous use of stxvx to store multiple pointers

2017-05-09 Thread wschmidt at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80695

Bill Schmidt  changed:

   What|Removed |Added

   Assignee|unassigned at gcc dot gnu.org  |wschmidt at gcc dot 
gnu.org
   Target Milestone|--- |7.2

[Bug target/80695] gratuitous use of stxvx to store multiple pointers

2017-05-09 Thread wschmidt at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80695

Bill Schmidt  changed:

   What|Removed |Added

   Target Milestone|7.2 |8.0

[Bug target/80695] gratuitous use of stxvx to store multiple pointers

2017-05-09 Thread acsawdey at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80695

--- Comment #1 from acsawdey at gcc dot gnu.org ---
Note that compiling with -fno-tree-slp-vectorize results in this much better
code:

_IO_new_file_overflow:
ld 9,8(3)
ld 10,64(3)
cmpld 7,9,10
beq 7,.L2
ld 8,16(3)
std 9,40(3)
std 9,32(3)
std 10,48(3)
std 8,8(3)
std 8,24(3)
rlwinm 3,4,0,0xff
blr
.p2align 4,,15
.L2:
ld 9,56(3)
std 10,48(3)
mr 8,9
std 9,16(3)
std 9,40(3)
std 9,32(3)
std 8,8(3)
std 8,24(3)
rlwinm 3,4,0,0xff
blr

[Bug c/35441] pretty-printer cannot handle some expressions

2017-05-09 Thread reichelt at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=35441

--- Comment #11 from Volker Reichelt  ---
Author: reichelt
Date: Tue May  9 19:09:22 2017
New Revision: 247810

URL: https://gcc.gnu.org/viewcvs?rev=247810&root=gcc&view=rev
Log:
PR c/35441
* c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
(c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
(c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
RDIV_EXPR.
(pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.

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


Added:
trunk/gcc/testsuite/gcc.dg/pr35441.c
Modified:
trunk/gcc/c-family/ChangeLog
trunk/gcc/c-family/c-pretty-print.c
trunk/gcc/testsuite/ChangeLog

[Bug c/35441] pretty-printer cannot handle some expressions

2017-05-09 Thread reichelt at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=35441

Volker Reichelt  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #12 from Volker Reichelt  ---
Fixed on trunk for GCC 8.

  1   2   >