[Bug ada/80626] [7/8 Regression] Ada x32 multilib build failure for a-cfinve.ads

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

H.J. Lu  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-05-10
Summary|Ada x32 multilib build  |[7/8 Regression] Ada x32
   |failure for a-cfinve.ads|multilib build failure for
   ||a-cfinve.ads
 Ever confirmed|0   |1

--- Comment #3 from H.J. Lu  ---
We need something similar to

commit 5821cbd2fa002acf67add968862c6d4fe847fa89
Author: krebbel 
Date:   Tue Apr 4 11:45:37 2017 +

[Ada][S/390] Fix Memory_Size definition.

-m31 -mzarch uses 64 as word size instead of 32.  This must not affect
the Address type definition which is based on Memory_Size.

gcc/ada/ChangeLog:

2017-04-04  Andreas Krebbel  

* system-linux-s390.ads: Use Long_Integer'Size to define
Memory_Size.

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

Please try

diff --git a/gcc/ada/system-linux-x86.ads b/gcc/ada/system-linux-x86.ads
index 22a212e..533d94e 100644
--- a/gcc/ada/system-linux-x86.ads
+++ b/gcc/ada/system-linux-x86.ads
@@ -70,7 +70,7 @@ package System is

Storage_Unit : constant := 8;
Word_Size: constant := Standard'Word_Size;
-   Memory_Size  : constant := 2 ** Word_Size;
+   Memory_Size  : constant := 2 ** Long_Integer'Size;

--  Address comparison

[Bug libstdc++/79135] null pointer dereference in std::_Bit_reference::operator=(bool) (stl_bvector.h:87)

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

Brian 'geeknik' Carpenter  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |WORKSFORME

[Bug libstdc++/79136] read outside of buffer in char* std::__copy_move<false, false, std::random_access_iterator_tag>::__copy_m(unsigned char const*, unsigned char const*,

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

Brian 'geeknik' Carpenter  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |WORKSFORME

[Bug target/79038] Improve PowerPC ISA 3.0 conversion between integers and hardware _Float128

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

--- Comment #8 from Michael Meissner  ---
Author: meissner
Date: Tue May  9 23:49:37 2017
New Revision: 247820

URL: https://gcc.gnu.org/viewcvs?rev=247820=gcc=rev
Log:
[gcc]
2017-05-09  Michael Meissner  

Back port from mainline
2017-05-05  Michael Meissner  

PR target/79038
PR target/79202
PR target/79203
* config/rs6000/rs6000.md (u code attribute): Add FIX and
UNSIGNED_FIX.
(extendsi2): Add support for doing sign extension via
VUPKHSW and XXPERMDI if the value is in Altivec registers and we
don't have ISA 3.0 instructions.
(extendsi2 splitter): Likewise.
(fix_truncsi2): If we are at ISA 2.07 (VSX small integer),
generate the normal insns since SImode can now go in vector
registers.  Disallow the special UNSPECs needed for previous
machines to hide SImode being used.  Add new insns
fctiw{,w}__smallint if SImode can go in vector registers.
(fix_truncsi2_stfiwx): Likewise.
(fix_truncsi2_internal): Likewise.
(fixuns_truncsi2): Likewise.
(fixuns_truncsi2_stfiwx): Likewise.
(fctiwz__smallint): Likewise.
(fctiwz__mem): New combiner pattern to prevent conversion
of floating point to 32-bit integer from doing a direct move to
the GPR registers to do a store.
(fctiwz_): Break long line.

[gcc/testsuite]
2017-05-09  Michael Meissner  

Back port from mainline
2017-05-05  Michael Meissner  

PR target/79038
PR target/79202
PR target/79203
* gcc.target/powerpc/ppc-round3.c: New test.
* gcc.target/powerpc/ppc-round2.c: Update expected code.


Added:
branches/gcc-7-branch/gcc/testsuite/gcc.target/powerpc/ppc-round3.c
  - copied unchanged from r247808,
trunk/gcc/testsuite/gcc.target/powerpc/ppc-round3.c
Modified:
branches/gcc-7-branch/gcc/ChangeLog
branches/gcc-7-branch/gcc/config/rs6000/rs6000.md
branches/gcc-7-branch/gcc/testsuite/ChangeLog
branches/gcc-7-branch/gcc/testsuite/gcc.target/powerpc/ppc-round2.c

[Bug target/79203] Update PowerPC double->int conversions to know about -mvsx-small-integer

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

--- Comment #3 from Michael Meissner  ---
Author: meissner
Date: Tue May  9 23:49:37 2017
New Revision: 247820

URL: https://gcc.gnu.org/viewcvs?rev=247820=gcc=rev
Log:
[gcc]
2017-05-09  Michael Meissner  

Back port from mainline
2017-05-05  Michael Meissner  

PR target/79038
PR target/79202
PR target/79203
* config/rs6000/rs6000.md (u code attribute): Add FIX and
UNSIGNED_FIX.
(extendsi2): Add support for doing sign extension via
VUPKHSW and XXPERMDI if the value is in Altivec registers and we
don't have ISA 3.0 instructions.
(extendsi2 splitter): Likewise.
(fix_truncsi2): If we are at ISA 2.07 (VSX small integer),
generate the normal insns since SImode can now go in vector
registers.  Disallow the special UNSPECs needed for previous
machines to hide SImode being used.  Add new insns
fctiw{,w}__smallint if SImode can go in vector registers.
(fix_truncsi2_stfiwx): Likewise.
(fix_truncsi2_internal): Likewise.
(fixuns_truncsi2): Likewise.
(fixuns_truncsi2_stfiwx): Likewise.
(fctiwz__smallint): Likewise.
(fctiwz__mem): New combiner pattern to prevent conversion
of floating point to 32-bit integer from doing a direct move to
the GPR registers to do a store.
(fctiwz_): Break long line.

[gcc/testsuite]
2017-05-09  Michael Meissner  

Back port from mainline
2017-05-05  Michael Meissner  

PR target/79038
PR target/79202
PR target/79203
* gcc.target/powerpc/ppc-round3.c: New test.
* gcc.target/powerpc/ppc-round2.c: Update expected code.


Added:
branches/gcc-7-branch/gcc/testsuite/gcc.target/powerpc/ppc-round3.c
  - copied unchanged from r247808,
trunk/gcc/testsuite/gcc.target/powerpc/ppc-round3.c
Modified:
branches/gcc-7-branch/gcc/ChangeLog
branches/gcc-7-branch/gcc/config/rs6000/rs6000.md
branches/gcc-7-branch/gcc/testsuite/ChangeLog
branches/gcc-7-branch/gcc/testsuite/gcc.target/powerpc/ppc-round2.c

[Bug target/79202] On Power8, consider using vupkhsw/xxpermdi to sign extend an int in a vector register instead of mfvsrwz/mtvsrwa

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

--- Comment #7 from Michael Meissner  ---
Author: meissner
Date: Tue May  9 23:49:37 2017
New Revision: 247820

URL: https://gcc.gnu.org/viewcvs?rev=247820=gcc=rev
Log:
[gcc]
2017-05-09  Michael Meissner  

Back port from mainline
2017-05-05  Michael Meissner  

PR target/79038
PR target/79202
PR target/79203
* config/rs6000/rs6000.md (u code attribute): Add FIX and
UNSIGNED_FIX.
(extendsi2): Add support for doing sign extension via
VUPKHSW and XXPERMDI if the value is in Altivec registers and we
don't have ISA 3.0 instructions.
(extendsi2 splitter): Likewise.
(fix_truncsi2): If we are at ISA 2.07 (VSX small integer),
generate the normal insns since SImode can now go in vector
registers.  Disallow the special UNSPECs needed for previous
machines to hide SImode being used.  Add new insns
fctiw{,w}__smallint if SImode can go in vector registers.
(fix_truncsi2_stfiwx): Likewise.
(fix_truncsi2_internal): Likewise.
(fixuns_truncsi2): Likewise.
(fixuns_truncsi2_stfiwx): Likewise.
(fctiwz__smallint): Likewise.
(fctiwz__mem): New combiner pattern to prevent conversion
of floating point to 32-bit integer from doing a direct move to
the GPR registers to do a store.
(fctiwz_): Break long line.

[gcc/testsuite]
2017-05-09  Michael Meissner  

Back port from mainline
2017-05-05  Michael Meissner  

PR target/79038
PR target/79202
PR target/79203
* gcc.target/powerpc/ppc-round3.c: New test.
* gcc.target/powerpc/ppc-round2.c: Update expected code.


Added:
branches/gcc-7-branch/gcc/testsuite/gcc.target/powerpc/ppc-round3.c
  - copied unchanged from r247808,
trunk/gcc/testsuite/gcc.target/powerpc/ppc-round3.c
Modified:
branches/gcc-7-branch/gcc/ChangeLog
branches/gcc-7-branch/gcc/config/rs6000/rs6000.md
branches/gcc-7-branch/gcc/testsuite/ChangeLog
branches/gcc-7-branch/gcc/testsuite/gcc.target/powerpc/ppc-round2.c

[Bug libstdc++/79136] read outside of buffer in char* std::__copy_move<false, false, std::random_access_iterator_tag>::__copy_m(unsigned char const*, unsigned char const*,

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

--- Comment #3 from Jonathan Wakely  ---
Be sure to include which version of the draco code to check out; master?

[Bug lto/59000] lto can't merge user-defined weak builtin functions

2017-05-09 Thread wgh at beyondunreal dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59000

wgh at beyondunreal dot com changed:

   What|Removed |Added

 CC||wgh at beyondunreal dot com

--- Comment #6 from wgh at beyondunreal dot com ---
Same problem as above when compiling qemu with lto with GCC-5.4.0.

[Bug libstdc++/79135] null pointer dereference in std::_Bit_reference::operator=(bool) (stl_bvector.h:87)

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

Jonathan Wakely  changed:

   What|Removed |Added

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

--- Comment #1 from Jonathan Wakely  ---
See PR 79136 comment 2

[Bug libstdc++/79136] read outside of buffer in char* std::__copy_move<false, false, std::random_access_iterator_tag>::__copy_m(unsigned char const*, unsigned char const*,

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

Jonathan Wakely  changed:

   What|Removed |Added

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

--- Comment #2 from Jonathan Wakely  ---
I can't reproduce this, every time I run the draco_encoder executable with the
test input (both from here and PR 79135) it says:

$ ./draco_encoder -i ../draco/test030
Failed loading the input mesh.

I've tried a debug build, and a relwithdebinfo build, with libstdc++ debug
mode, with Asan ... it's teh same every time.

Please provide a reproducable testcase or proper instructions for reproducing
this, and ideally with an actual release. I have no idea what snapshot of GCC
you're using, 6.2.1 is not a release (and that's why you were asked to read
https://gcc.gnu.org/bugs and provide the info requested there, including the
output of 'gcc -v').

[Bug target/80697] New: On PowerPC, the spec 2006 benchmark milc had a 5.6% regression under GCC 7.1 compared to GCC 6.3.

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

Bug ID: 80697
   Summary: On PowerPC, the spec 2006 benchmark milc had a 5.6%
regression under GCC 7.1 compared to GCC 6.3.
   Product: gcc
   Version: 8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: meissner at gcc dot gnu.org
  Target Milestone: ---

After GCC 7.1 came out, I ran the spec 2006 benchmark suite.  The milc
benchmark had a 5.6% regression with GCC 7.1 compared to GCC 6.3.

In particular, the function mult_adj_su3_mat_vec was 48% slower with GCC 7.1
compared to GCC 6.3.

[Bug target/68163] GCC on power8 does not issue the stxsspx instruction on power8

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

--- Comment #3 from Michael Meissner  ---
Author: meissner
Date: Tue May  9 21:25:23 2017
New Revision: 247819

URL: https://gcc.gnu.org/viewcvs?rev=247819=gcc=rev
Log:
[gcc]
2017-05-09  Michael Meissner  

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

[gcc/testsuite]
2017-05-09  Michael Meissner  

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


Added:
trunk/gcc/testsuite/gcc.target/powerpc/pr68163.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/rs6000/rs6000.md
trunk/gcc/testsuite/ChangeLog

[Bug fortran/37336] [F03] Finish derived-type finalization

2017-05-09 Thread janus at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37336
Bug 37336 depends on bug 79311, which changed state.

Bug 79311 Summary: [OOP] ICE in generate_finalization_wrapper, at 
fortran/class.c:1992
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79311

   What|Removed |Added

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

[Bug fortran/79311] [OOP] ICE in generate_finalization_wrapper, at fortran/class.c:1992

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

janus at gcc dot gnu.org changed:

   What|Removed |Added

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

--- Comment #9 from janus at gcc dot gnu.org ---
Fixed on 8-trunk with r247818. Closing.

Thanks for the report!

[Bug fortran/79311] [OOP] ICE in generate_finalization_wrapper, at fortran/class.c:1992

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

--- Comment #8 from janus at gcc dot gnu.org ---
Author: janus
Date: Tue May  9 20:55:38 2017
New Revision: 247818

URL: https://gcc.gnu.org/viewcvs?rev=247818=gcc=rev
Log:
2017-05-09  Janus Weil  

PR fortran/79311
* resolve.c (gfc_resolve_finalizers): Ensure that derived-type
components have a their finalizers resolved, also if the superordinate
type itself has a finalizer.

2017-05-09  Janus Weil  

PR fortran/79311
* gfortran.dg/finalize_32.f90: New test.

Added:
trunk/gcc/testsuite/gfortran.dg/finalize_32.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/resolve.c
trunk/gcc/testsuite/ChangeLog

[Bug libstdc++/79136] read outside of buffer in char* std::__copy_move<false, false, std::random_access_iterator_tag>::__copy_m(unsigned char const*, unsigned char const*,

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

--- Comment #1 from Jonathan Wakely  ---
Are you sure this is not just a bug in Draco's use of the std::lib?

I'll try checking out the code and building it with _GLIBCXX_DEBUG defined, and
see if I can reproduce the crash.

[Bug c++/70979] [C++14] g++ falsely accepts constexpr function returning a lambda

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

--- Comment #7 from Jason Merrill  ---
Author: jason
Date: Tue May  9 20:37:51 2017
New Revision: 247814

URL: https://gcc.gnu.org/viewcvs?rev=247814=gcc=rev
Log:
PR c++/70979 - literal class and closure types

* class.c (finalize_literal_type_property): Handle closures
specifically.
(explain_non_literal_class): Likewise.

Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/class.c
trunk/gcc/testsuite/g++.dg/cpp1z/constexpr-lambda15.C

[Bug c++/66297] [C++14] [DR 1684] constexpr non-static member functions of non-literal types

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

--- Comment #7 from Jason Merrill  ---
Author: jason
Date: Tue May  9 20:37:44 2017
New Revision: 247813

URL: https://gcc.gnu.org/viewcvs?rev=247813=gcc=rev
Log:
PR c++/66297, DR 1684 - literal class and constexpr member fns

* constexpr.c (is_valid_constexpr_fn): Only complain about
non-literal enclosing class in C++11.
* class.c (finalize_literal_type_property): Likewise.

Added:
trunk/gcc/testsuite/g++.dg/cpp1y/constexpr-dr1684.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/class.c
trunk/gcc/cp/constexpr.c
trunk/gcc/testsuite/g++.dg/cpp0x/constexpr-data1.C
trunk/gcc/testsuite/g++.dg/cpp0x/constexpr-diag1.C
trunk/gcc/testsuite/g++.dg/cpp0x/constexpr-diag3.C
trunk/gcc/testsuite/g++.dg/cpp0x/constexpr-memfn1.C
trunk/gcc/testsuite/g++.dg/cpp0x/constexpr-neg1.C

[Bug c++/66297] [C++14] [DR 1684] constexpr non-static member functions of non-literal types

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

--- Comment #6 from Jason Merrill  ---
(In reply to Freddie Chopin from comment #5)
> Any chance for merging the fix for GCC 7? It would be a pity to wait for a
> fixed release for another year...

I'll put it in 7.2.

[Bug c++/80670] Member specialization of alias declaration from different namespace

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

TC  changed:

   What|Removed |Added

 CC||rs2740 at gmail dot com

--- Comment #2 from TC  ---
namespace A {
template class X { struct P; };
}

namespace B {
using Y = A::X;
}

namespace A {
template<> struct B::Y::P {};
}

main.cpp:10:29: error: declaration of 'struct A::X::P' in namespace 'A'
which does not enclose 'using Y = class A::X'
 template<> struct B::Y::P {};

[Bug c/35443] [4.2/4.3/4.4 regression] Completely broken diagnostic with bind_expr

2017-05-09 Thread reichelt at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=35443
Bug 35443 depends on bug 35441, which changed state.

Bug 35441 Summary: pretty-printer cannot handle some expressions
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=35441

   What|Removed |Added

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

[Bug c/35442] [4.2/4.3/4.4 Regression] Completely broken diagnostic with view_convert_expr

2017-05-09 Thread reichelt at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=35442
Bug 35442 depends on bug 35441, which changed state.

Bug 35441 Summary: pretty-printer cannot handle some expressions
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=35441

   What|Removed |Added

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

[Bug c/35742] [4.3 regression] Broken diagnostic: 'goto_expr' not supported by pp_c_expression

2017-05-09 Thread reichelt at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=35742
Bug 35742 depends on bug 35441, which changed state.

Bug 35441 Summary: pretty-printer cannot handle some expressions
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=35441

   What|Removed |Added

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

[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.

[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=gcc=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 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 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 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] 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 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=gcc=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 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 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 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 #9 from Marek Polacek  ---
Well, I hope we're not.  Very much related: PR80386.

[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 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=gcc=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 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 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 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 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 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 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 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::value, "");

[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 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=gcc=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/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 #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=gcc=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 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 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(), "");

[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 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 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 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 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 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 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 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=gcc=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 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, , 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, , 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, , 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, , 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, , 0B, 0\\);|_gfortran_caf_lock
> \\(caf_token.1, \\(3 - parm...dim\\\[0\\\].lbound\\) \\+ \\(MAX_EXPR
>  \\+ 1\\) \\* 
> \\(3
> - parm...dim\\\[1\\\].lbound\\), 0, 0B, , 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, , 0B, 0\\);|_gfortran_caf_unlock
> \\(caf_token.., \\(2 - parm...dim\\\[0\\\].lbound\\) \\+ \\(MAX_EXPR
>  \\+ 1\\) \\* 
> \\(3
> - parm...dim\\\[1\\\].lbound\\), 0, , 0B, 0\\);" 1 "original" } }
> 
>  ! { dg-final { scan-tree-dump-times "_gfortran_caf_lock \\(three.token, 0, 5 
> -
> \\(integer\\(kind=4\\)\\) three.dim\\\[0\\\].lbound, \[0-9\]+, 0B,
> 0B, 0\\);|_gfortran_caf_lock \\(three.token, 0, 5 - three.dim\\\[0\\\].lbound,
> \[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, , 0B,
> 0\\);|_gfortran_caf_unlock \\(three.token, 0, 8 - three.dim\\\[0\\\].lbound,
> , 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 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, , 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, , 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, , 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, , 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, , 0B, 0\\);|_gfortran_caf_lock
\\(caf_token.1, \\(3 - parm...dim\\\[0\\\].lbound\\) \\+ \\(MAX_EXPR
 \\+ 1\\) \\* \\(3
- parm...dim\\\[1\\\].lbound\\), 0, 0B, , 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, , 0B, 0\\);|_gfortran_caf_unlock
\\(caf_token.., \\(2 - parm...dim\\\[0\\\].lbound\\) \\+ \\(MAX_EXPR
 \\+ 1\\) \\* \\(3
- parm...dim\\\[1\\\].lbound\\), 0, , 0B, 0\\);" 1 "original" } }

 ! { dg-final { scan-tree-dump-times "_gfortran_caf_lock \\(three.token, 0, 5 -
\\(integer\\(kind=4\\)\\) three.dim\\\[0\\\].lbound, \[0-9\]+, 0B,
0B, 0\\);|_gfortran_caf_lock \\(three.token, 0, 5 - three.dim\\\[0\\\].lbound,
\[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, , 0B,
0\\);|_gfortran_caf_unlock \\(three.token, 0, 8 - three.dim\\\[0\\\].lbound,
, 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 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 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 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 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 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 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 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/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 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 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/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=gcc=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=gcc=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=gcc=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=gcc=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=gcc=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=gcc=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/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=gcc=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 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=gcc=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=gcc=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 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=gcc=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 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 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 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/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 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 #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 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 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 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 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=gcc=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 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=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 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 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

--- 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/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=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 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());

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

[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 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 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 ()'

[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)

  1   2   >