[Bug tree-optimization/66826] Unused result from dlsym in constructor results in a segfault

2017-01-13 Thread tetra2005 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66826

--- Comment #6 from Yuri Gribov  ---
(In reply to Rich Felker from comment #5)
> maybe there are workarounds glibc could do to prevent tco without needing a
> new attribute...

X-posted to Glibc BZ: https://sourceware.org/bugzilla/show_bug.cgi?id=21050

[Bug middle-end/61912] Missed (partial) dead store elimination for structures on GIMPLE

2017-01-13 Thread law at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61912

--- Comment #8 from Jeffrey A. Law  ---
Author: law
Date: Sat Jan 14 06:16:23 2017
New Revision: 244461

URL: https://gcc.gnu.org/viewcvs?rev=244461=gcc=rev
Log:
PR tree-optimization/33562
PR tree-optimization/61912
PR tree-optimization/77485
* tree-ssa-dse.c (delete_dead_call): Accept gsi rather than
a statement.
(delete_dead_assignment): Likewise.
(dse_dom_walker::dse_optimize_stmt): Pass in the gsi rather than
statement to delete_dead_call and delete_dead_assignment.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/tree-ssa-dse.c

[Bug tree-optimization/77485] Missed dead store elimination of aggregate store followed by partial stores

2017-01-13 Thread law at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77485

--- Comment #15 from Jeffrey A. Law  ---
Author: law
Date: Sat Jan 14 06:16:23 2017
New Revision: 244461

URL: https://gcc.gnu.org/viewcvs?rev=244461=gcc=rev
Log:
PR tree-optimization/33562
PR tree-optimization/61912
PR tree-optimization/77485
* tree-ssa-dse.c (delete_dead_call): Accept gsi rather than
a statement.
(delete_dead_assignment): Likewise.
(dse_dom_walker::dse_optimize_stmt): Pass in the gsi rather than
statement to delete_dead_call and delete_dead_assignment.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/tree-ssa-dse.c

[Bug tree-optimization/33562] [5/6 Regression] aggregate DSE disabled

2017-01-13 Thread law at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=33562

--- Comment #30 from Jeffrey A. Law  ---
Author: law
Date: Sat Jan 14 06:16:23 2017
New Revision: 244461

URL: https://gcc.gnu.org/viewcvs?rev=244461=gcc=rev
Log:
PR tree-optimization/33562
PR tree-optimization/61912
PR tree-optimization/77485
* tree-ssa-dse.c (delete_dead_call): Accept gsi rather than
a statement.
(delete_dead_assignment): Likewise.
(dse_dom_walker::dse_optimize_stmt): Pass in the gsi rather than
statement to delete_dead_call and delete_dead_assignment.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/tree-ssa-dse.c

[Bug tree-optimization/79088] New: wrong code at -O2 on x86_64-linux-gnu

2017-01-13 Thread su at cs dot ucdavis.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79088

Bug ID: 79088
   Summary: wrong code at -O2 on x86_64-linux-gnu
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: su at cs dot ucdavis.edu
  Target Milestone: ---

It seems to be a recent regression. 

$ gcc-trunk -v
Using built-in specs.
COLLECT_GCC=gcc-trunk
COLLECT_LTO_WRAPPER=/usr/local/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/7.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-source-trunk/configure --enable-languages=c,c++,lto
--prefix=/usr/local/gcc-trunk --disable-bootstrap
Thread model: posix
gcc version 7.0.0 20170113 (experimental) [trunk revision 244397] (GCC) 
$ 
$ gcc-trunk -Os small.c
$ ./a.out
$ 
$ gcc-trunk -O2 small.c
$ timeout -s 9 5 ./a.out
Killed
$ 





int a, b, c, d, e = 1;

int main ()
{
  int f;
  if (a)
goto L;
  for (f = 0; f < e; e++)
{
L:
  if (d)
continue;
  if (c)
goto L;
  for (a = 0; a < 6; a++)
for (f = 0; f < 3; f++)
  while (b)
c++;
}
  return 0;
}

[Bug c++/79086] Localtime_r does a spinlock unnecessarily killing performance when run millions of times

2017-01-13 Thread dgotwisn at netscout dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79086

--- Comment #2 from Dave Gotwisner  ---
Thanks.  There's an equivalent bug over there.

[Bug fortran/79087] New: CPATH environment variable not recognised.

2017-01-13 Thread w6ws at earthlink dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79087

Bug ID: 79087
   Summary: CPATH environment variable not recognised.
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: w6ws at earthlink dot net
  Target Milestone: ---

The ENVIRONMENT portion of the gfortran man page states:

   The gfortran compiler currently does not make use of any environment
   variables to control its operation above and beyond those that affect
   the operation of gcc.

Then referring to the ENVIRONMENT portion of the gcc man page, under CPATH, it
states:

   CPATH specifies a list of directories to be searched as if
   specified with -I, but after any paths given with -I options on the
   command line.  This environment variable is used regardless of
   which language is being preprocessed.

Unfortunately gfortran does not seem to recognize CPATH:

wws@w6ws-4:~$ cd /tmp
wws@w6ws-4:/tmp$ mkdir include
wws@w6ws-4:/tmp$ cat > include/inc.inc
  integer, parameter :: answer = 42
wws@w6ws-4:/tmp$ export CPATH=/tmp/include
wws@w6ws-4:/tmp$ cat > junk.f90
program junk
  include "inc.inc"
  print *, answer
end program
wws@w6ws-4:/tmp$ gfortran junk.f90
junk.f90:2: Error: Can't open included file 'inc.inc'
wws@w6ws-4:/tmp$ gfortran -I$CPATH junk.f90
wws@w6ws-4:/tmp$ a.out
  42
wws@w6ws-4:/tmp$ /tmp$ gfortran --version
GNU Fortran (GCC) 7.0.0 20160831 (experimental)
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

wws@w6ws-4:/tmp$ 

Intel Fortran does support this.  It is handy when used in conjunction with the
"module" package that is often used at sites to select various software
packages.

This ticket might be a duplicate of PR 65998, but that ticket seems more
pre-processor (cpp) and architecture oriented.

[Bug c++/79086] Localtime_r does a spinlock unnecessarily killing performance when run millions of times

2017-01-13 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79086

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |MOVED

--- Comment #1 from Andrew Pinski  ---
Localtime_r  is provided by your libc which in this case is most likely glibc. 
Please report this to glibc: http://sourceware.org/bugzilla/ .

[Bug c++/79086] New: Localtime_r does a spinlock unnecessarily killing performance when run millions of times

2017-01-13 Thread dgotwisn at netscout dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79086

Bug ID: 79086
   Summary: Localtime_r does a spinlock unnecessarily killing
performance when run millions of times
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: dgotwisn at netscout dot com
  Target Milestone: ---

gcc (GCC) 4.8.1
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Linux nfw-devperf-01.newwireless.com 2.6.32-431.23.3.el6.x86_64 #1 SMP Thu Jul
31 17:20:51 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

Libc version libc-2.12.so

Running perf top to look at what's going on in my app shows 7% of CPU in
_tz_convert and 5% in spin lock, with no locks being done in my code.  This
means that we are spending almost as much time in spin lock (without ever
waiting on it) as we are in the rest of _tz_convert.

The code in question is a single threaded tight loop iterating (c++11 for (auto
: mymap)) a std::multimap with a significant number of lines of code, only a
few of which call into libc (or any other library).  What goes into the
libraries are array accessors and iterator accessors to the std::multimap
(which has no locks) and the following code block:

struct tm t;
localtime_r(_sec, ).

Nowtime is a struct timeval (previously filled by gettimeofday() calls by
another program run days before).

This is called once per record (my test case has We also call once per record,
there are 157,669,045 records (for my small test sample)).

For every record, we also call fwrite_unlocked(), which according to the manual
page doesn't have a lock (and by the name).

In looking inside localtime_r via
http://code.metager.de/source/xref/gnu/glibc/time/localtime.c, the code is as
follows:

struct tm *
localtime (const time_t *t)
{
  return __tz_convert (t, 1, &_tmbuf);
}
libc_hidden_def (localtime)

Drilling down into __tz_convert (website
http://osxr.org:8080/glibc/source/time/tzset.c?v=glibc-2.18), we have the
following block of code:


   __libc_lock_lock (tzset_lock);

   /* Update internal database according to current TZ setting.
  POSIX.1 8.3.7.2 says that localtime_r is not required to set tzname.
  This is a good idea since this allows at least a bit more parallelism. 
*/
   tzset_internal (tp == &_tmbuf && use_localtime, 1);

followed by much more code that access tp and calls various other _tz_
routines.

The correct solution should only be to lock if tp ==  (or the equivalent
for gmtime vs gmtime_r).

The lock prevents the parallelism mentioned in the comment.

To test this, create a routine that iterates for a long time calling
localtime_r for a given time_t value (it doesn't matter what the value is, as
long as it's valid).  Then view with "perf top -p " of the program.  Run
this with permissions so you can see into the kernel.

A routine that uses a user-provided buffer and has no shared resources should
never need a lock.  If "spin lock" shows up, the bug exists.  If it doesn't
show up, the bug was fixed.

[Bug target/78660] [7 Regression] 7.0 bootstrap fail on mips64el-unknow-linux: configure-stage2-target-libgcc' failed

2017-01-13 Thread mpf at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78660

mpf at gcc dot gnu.org changed:

   What|Removed |Added

   Priority|P3  |P2
 Status|WAITING |ASSIGNED
 CC||mpf at gcc dot gnu.org
   Assignee|unassigned at gcc dot gnu.org  |mpf at gcc dot gnu.org
   Severity|normal  |major

--- Comment #10 from mpf at gcc dot gnu.org ---
While mips64el-unknown-linux is not a specific primary platform I see no reason
why this bug would not show on mipsisa64-elf. Bumping to P2.

[Bug target/78660] [7 Regression] 7.0 bootstrap fail on mips64el-unknow-linux: configure-stage2-target-libgcc' failed

2017-01-13 Thread matthew.fortune at imgtec dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78660

Matthew Fortune  changed:

   What|Removed |Added

 CC||ebotcazou at gcc dot gnu.org

--- Comment #9 from Matthew Fortune  ---
@eric: adding you following our discussion on PR rtl-optimization/59461

I have added my findings so far on this ticket.

[Bug target/78660] [7 Regression] 7.0 bootstrap fail on mips64el-unknow-linux: configure-stage2-target-libgcc' failed

2017-01-13 Thread matthew.fortune at imgtec dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78660

--- Comment #8 from Matthew Fortune  ---
Created attachment 40518
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40518=edit
testcase

I have narrowed this bug down to a mis-compilation of gcc/c/c-decl.c where
there are a few code differences after applying yunqiang's partial revert. A
reduced and pre-processed c-decl.c file is attached.

mips64el-linux-gnu-g++ -fno-PIE -c  -DIN_GCC_FRONTEND  -O2 -DIN_GCC
-fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing
-Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual
-pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings
-fno-common  -o c-decl.me.o c-decl.me.c

The key (I think) is that the following sequence of 3 instructions ends up
being combined into 1 but the resulting instruction leaves the upper 32-bits of
reg 316 entirely undefined. Eventually this leads to reg 316 being spilled to
the stack where it is allocated a 64-bit slot but this spill only writes
32-bits whereas consumers read 64-bit and even if the value will only ever be
operated on as 32-bit or less then logical and branch operations on the
reloaded value will go wrong and normal 32-bit operations will be (strictly)
undefined.

(insn 56 55 57 3 (set (reg:SI 470)
(ne:SI (reg/f:DI 469 [ current_scope.1_1->bindings ])
(const_int 0 [0])))
"/althome/mips/v6/src/gcc/gcc/c/c-decl.me.c":915 501 {*sne_zero_disi}
 (expr_list:REG_DEAD (reg/f:DI 469 [ current_scope.1_1->bindings ])
(nil)))
(insn 57 56 58 3 (set (reg:QI 468)
(subreg:QI (reg:SI 470) 0))
"/althome/mips/v6/src/gcc/gcc/c/c-decl.me.c":915 360 {*movqi_internal}
 (expr_list:REG_DEAD (reg:SI 470)
(nil)))
(insn 58 57 59 3 (set (reg:DI 316 [ iftmp.3_114 ])
(zero_extend:DI (reg:QI 468)))
"/althome/mips/v6/src/gcc/gcc/c/c-decl.me.c":915 214 {*zero_extendqidi2}
 (expr_list:REG_DEAD (reg:QI 468)
(nil)))

combines to...

(insn 58 57 59 3 (set (subreg:SI (reg:DI 316 [ iftmp.3_114 ]) 0)
(ne:SI (reg/f:DI 469 [ current_scope.1_1->bindings ])
(const_int 0 [0])))
"/althome/mips/v6/src/gcc/gcc/c/c-decl.me.c":915 501 {*sne_zero_disi}
 (expr_list:REG_DEAD (reg/f:DI 469 [ current_scope.1_1->bindings ])
(nil)))

The relevant fragment of combine is:

Trying 57 -> 58:
Successfully matched this instruction:
(set (reg:DI 316 [ iftmp.3_114 ])
(subreg:DI (reg:SI 470) 0))
allowing combination of insns 57 and 58
original costs 4 + 4 = 8
replacement cost 4
deferring deletion of insn with uid = 57.
modifying insn i358: r316:DI=r470:SI#0
  REG_DEAD r470:SI
deferring rescan insn with uid = 58.

Trying 56 -> 58:
Successfully matched this instruction:
(set (subreg:SI (reg:DI 316 [ iftmp.3_114 ]) 0)
(ne:SI (reg/f:DI 469 [ current_scope.1_1->bindings ])
(const_int 0 [0])))
allowing combination of insns 56 and 58
original costs 4 + 4 = 8
replacement cost 4
deferring deletion of insn with uid = 56.
modifying insn i358: r316:DI#0=r469:DI!=0
  REG_DEAD r469:DI
deferring rescan insn with uid = 58.

I've not started investigating why exactly this decision is made.

[Bug c++/69375] GCC allows PMF type "void (T::*)()" to be caught as "void (T::*)() const"

2017-01-13 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69375

--- Comment #5 from Jonathan Wakely  ---
For the attached reproducer this condition is never true in
cp_build_qualified_type_real

  /* But preserve any function-cv-quals on a FUNCTION_TYPE.  */
  if (TREE_CODE (type) == FUNCTION_TYPE)
type_quals |= type_memfn_quals (type);

As far as I can tell this is what's supposed to put the cv-quals back onto the
function type, so we'd have a pointee of type void() const not void().

[Bug tree-optimization/77485] Missed dead store elimination of aggregate store followed by partial stores

2017-01-13 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77485
Bug 77485 depends on bug 33562, which changed state.

Bug 33562 Summary: [5/6 Regression] aggregate DSE disabled
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=33562

   What|Removed |Added

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

[Bug tree-optimization/33562] [5/6 Regression] aggregate DSE disabled

2017-01-13 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=33562

Jeffrey A. Law  changed:

   What|Removed |Added

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

--- Comment #29 from Jeffrey A. Law  ---
It's still a regression for 5/6, so it should stay open until those releases
are no longer supported.  Note the "7" in the regression marker is gone.

[Bug c++/69375] GCC allows PMF type "void (T::*)()" to be caught as "void (T::*)() const"

2017-01-13 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69375

--- Comment #4 from Jonathan Wakely  ---
My front-end debugging skills are pitiful, but I've found something suspicious.
ptm_initializer uses TYPE_PTRMEM_POINTED_TO_TYPE to get that pointee type. For
this case that expands to TYPE_PTRMEMFUNC_FN_TYPE which is a call to
cp_build_qualified_type with the qualifiers from cp_type_quals.

But cp_type_quals tries pretty hard to ensure we never get cv-quals for a
function type. For the purposes of RTTI, where we really do care about the
difference between void() and void()const, do we want the memfn quals instead?

[Bug middle-end/50199] [5/6 Regression] wrong code with -flto -fno-merge-constants

2017-01-13 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50199

Jakub Jelinek  changed:

   What|Removed |Added

Summary|[5/6/7 Regression] wrong|[5/6 Regression] wrong code
   |code with -flto |with -flto
   |-fno-merge-constants|-fno-merge-constants

--- Comment #29 from Jakub Jelinek  ---
Fixed on the trunk.

[Bug tree-optimization/77485] Missed dead store elimination of aggregate store followed by partial stores

2017-01-13 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77485
Bug 77485 depends on bug 33562, which changed state.

Bug 33562 Summary: [5/6 Regression] aggregate DSE disabled
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=33562

   What|Removed |Added

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

[Bug tree-optimization/33562] [5/6 Regression] aggregate DSE disabled

2017-01-13 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=33562

Martin Sebor  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||msebor at gcc dot gnu.org
 Resolution|--- |FIXED

--- Comment #28 from Martin Sebor  ---
Based on comment #26 and comment #27 it sounds as though this is resolved.

[Bug target/78176] [MIPS] miscompiles ldxc1 with large pointers on 32-bits

2017-01-13 Thread doug.gilmore at imgtec dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78176

Doug Gilmore  changed:

   What|Removed |Added

 CC||doug.gilmore at imgtec dot com

--- Comment #12 from Doug Gilmore  ---
Bisected the problem to commit r216501:

commit 9a416363e99c9f2d48fa810e220bc2f7904f1788
Author: zqchen 
Date:   Tue Oct 21 03:38:37 2014 +

2014-10-21  Zhenqiang Chen  

* cfgloopanal.c (seq_cost): Delete.
* rtl.h (seq_cost): New prototype.
* rtlanal.c (seq_cost): New function.
* tree-ssa-loop-ivopts.c (seq_cost): Delete.


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

More analysis to follow.

Given the short time until the release, we plan submit a patch to
provide a target flag and build option to avoid the bug.

[Bug c++/69375] GCC allows PMF type "void (T::*)()" to be caught as "void (T::*)() const"

2017-01-13 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69375

Jonathan Wakely  changed:

   What|Removed |Added

 CC||jason at gcc dot gnu.org
  Component|libstdc++   |c++

--- Comment #3 from Jonathan Wakely  ---
When compiled with clang the pointees are different, so the match fails when
comparing them.

Using Clang:

(gdb) step
__cxxabiv1::__pbase_type_info::__pointer_catch (this=0x401cc0 , thrown_type=0x401d10 ,
thr_obj=0x7fffd220, outer=0)
at
/usr/lib/gcc/x86_64-redhat-linux/6.3.1/../../../../include/c++/6.3.1/cxxabi.h:309
(gdb) step
std::type_info::__do_catch (this=0x401c90 ,
thr_type=0x401cf8 ) at
../../../../libstdc++-v3/libsupc++/tinfo.cc:71
(gdb) p *this
$3 = {_vptr.type_info = 0x6030b0 , __name = 0x401c89  "KFvvE"}
(gdb) p *thr_type
$4 = {_vptr.type_info = 0x6030b0 , __name = 0x401cf0  "FvvE"}
(gdb) 


But using GCC the two pointee types are the same:

(gdb) p *this
$1 = {_vptr.type_info = 0x6030e8 , __name = 0x401c50  "FvvE"}
(gdb) p *thr_type
$2 = {_vptr.type_info = 0x6030e8 , __name = 0x401c50  "FvvE"}

So it looks like the problem is in the front-end where the typeinfo object for
a pointer to cv-qualified member function has the wrong pointee type.

[Bug target/79058] [7 Regression] ARM: internal compiler error: in extract_constrain_insn, at recog.c:2213

2017-01-13 Thread arnd at linaro dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79058

--- Comment #21 from Arnd Bergmann  ---
// reduced version of 0xB0981CD0 file

long a;
struct {
  int su_flags;
} * b;
struct nilfs_segment_usage *e;
void fn1();
enum { NILFS_SEGMENT_USAGE_ACTIVE, NILFS_SEGMENT_USAGE_DIRTY } fn2() {
  return b->su_flags & 1 << NILFS_SEGMENT_USAGE_DIRTY;
}
void fn3(long long p1) {
  fn1();
  long c = p1;
  unsigned d = a;
  a = d + c;
}
void fn4() {
  void *f;
  int g;
  f = fn1;
  e = f;
  g = fn2();
  fn3(g ? -1 : 0);
}

[Bug libstdc++/69375] GCC allows PMF type "void (T::*)()" to be caught as "void (T::*)() const"

2017-01-13 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69375

Jonathan Wakely  changed:

   What|Removed |Added

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

--- Comment #2 from Jonathan Wakely  ---
Hmm, we don't seem to have the cv-quals in __flags. That's a problem.

[Bug bootstrap/78616] Poison strndup in system.h

2017-01-13 Thread dmalcolm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78616

--- Comment #13 from David Malcolm  ---
(In reply to Jeffrey A. Law from comment #12)
> Regression fixed (regression marker removed).  All that's left is to poison
> strndup in system.h

Candidate patch:
  https://gcc.gnu.org/ml/gcc-patches/2017-01/msg00998.html

[Bug libstdc++/69375] GCC allows PMF type "void (T::*)()" to be caught as "void (T::*)() const"

2017-01-13 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69375

Jonathan Wakely  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
  Component|c++ |libstdc++
   Assignee|unassigned at gcc dot gnu.org  |redi at gcc dot gnu.org

--- Comment #1 from Jonathan Wakely  ---
We're missing a check for cv-qualifiers in
__pointer_to_member_type_info::__pointer_catch that needs to be done before we
compare the pointees. Both pointees have type void() so we need to compare the
cv-quals before that info is lost.

[Bug middle-end/63184] [5/6/7 Regression] Fails to simplify comparison

2017-01-13 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63184

Jeffrey A. Law  changed:

   What|Removed |Added

 CC||law at redhat dot com

--- Comment #8 from Jeffrey A. Law  ---
So while we don't optimize this on the tree level, the addressing lowering that
was introduced for gcc-6 sets things up so the RTL optimizers can detect the
equivalences and remove the tests.

So ISTM we can do two things here.  Keep this as a regression since it'd be
nice for the SSA/gimple optimizers to catch this.  Or mark it was fixed for
gcc-6 and gcc-7 since the RTL optimizers are able to clean this stuff up.

[Bug c++/69375] GCC allows PMF type "void (T::*)()" to be caught as "void (T::*)() const"

2017-01-13 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69375

Jonathan Wakely  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-01-13
 Ever confirmed|0   |1

[Bug libstdc++/65411] Unsafe(?) repeated call to fclose() in config/io/basic_file_stdio.cc

2017-01-13 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65411

Jonathan Wakely  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |FIXED
   Target Milestone|--- |7.0

--- Comment #2 from Jonathan Wakely  ---
Fixed for gcc 7.

[Bug c++/77561] Unclear diagnostic for invalid declaration of partial specialization as friend

2017-01-13 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77561

Jonathan Wakely  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-01-13
 Ever confirmed|0   |1

[Bug c++/64095] [C++14] Ellipsis at end of generic lambda parameter-declaration-clause should be parsed as a parameter pack

2017-01-13 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64095

--- Comment #4 from Jonathan Wakely  ---
(In reply to Ed Catmur from comment #0)
> Clang is similarly incorrect;

Clang 3.5 had the same bug, but it was fixed for 3.6

[Bug c++/79078] Warnings from deprecated attribute are too noisy

2017-01-13 Thread egall at gwmail dot gwu.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79078

Eric Gallager  changed:

   What|Removed |Added

 CC||egall at gwmail dot gwu.edu

--- Comment #7 from Eric Gallager  ---
Another way to make deprecation warnings less noisy would be to split
-Wdeprecated-declarations into separate individually controllable flags, for
example, one that only warns about where the "deprecated" attribute is used
with the optional string following it. It could be called
-Wdeprecated-declarations-with-reasons or something, and then it'd make it
easier just to focus on the deprecated things for which there are replacements.
Another way to split it up would be by whether it's deprecated with the
C++-style attribute [-Wc++-deprecated-declarations] or a GNU-style attribute
[-Wgnu-deprecated-declarations]. Just focusing on one or the other might be
easier than trying to deal with warnings from each at the same time. Then
there's also splitting it by the kind of declaration, similar to how -Wunused
is an umbrella warning for several other more specific flags.

[Bug c++/64095] [C++14] Ellipsis at end of generic lambda parameter-declaration-clause should be parsed as a parameter pack

2017-01-13 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64095

Jonathan Wakely  changed:

   What|Removed |Added

 CC||gnu-9fbaow at upsuper dot org

--- Comment #3 from Jonathan Wakely  ---
*** Bug 77451 has been marked as a duplicate of this bug. ***

[Bug c++/77451] Cannot convert lambda [](auto&&...){} to std::function<void()>

2017-01-13 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77451

Jonathan Wakely  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
  Component|libstdc++   |c++
 Resolution|--- |DUPLICATE
  Known to fail||5.4.0, 6.3.0, 7.0

--- Comment #3 from Jonathan Wakely  ---
(In reply to TC from comment #1)
> This is not a libstdc++ bug. It's caused by GCC misparsing the ... in
> [](auto&&...) {} (i.e., a dup of bug 64095).
> 
> Under the mistaken parse (which is equivalent to [](auto&&, ...) {}),
> std::function's constructor correctly refuses to accept the lambda.

Ah that explains it, thanks.

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

[Bug libstdc++/77451] Cannot convert lambda [](auto&&...){} to std::function<void()>

2017-01-13 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77451

--- Comment #2 from Jonathan Wakely  ---
This is a compiler bug not a library one:

int main()
{
  auto l = [](auto&&...) {};
  l();
}

l.cc: In function ‘int main()’:
l.cc:4:5: error: no match for call to ‘(main()::) ()’
   l();
 ^
l.cc:3:24: note: candidate: template main()::::operator decltype (((const main()::*)((const
main()::*
const)0))->operator()(static_cast())) (*)(auto:1&&, ...)()
const 
   auto l = [](auto&&...) {};
^
l.cc:3:24: note:   template argument deduction/substitution failed:
l.cc:4:5: note:   candidate expects 1 argument, 0 provided
   l();
 ^
l.cc:3:24: note: candidate: template main()::
   auto l = [](auto&&...) {};
^
l.cc:3:24: note:   template argument deduction/substitution failed:
l.cc:4:5: note:   candidate expects 1 argument, 0 provided
   l();
 ^


It works fine if you call it as l(1) or l(1, 2).

Not a regression, it's failed the same way since generic lambdas were added to
4.9

[Bug target/79058] [7 Regression] ARM: internal compiler error: in extract_constrain_insn, at recog.c:2213

2017-01-13 Thread arnd at linaro dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79058

--- Comment #20 from Arnd Bergmann  ---
// new reduced test case, build with "arm-linux-gnueabi-gcc-7.0.0 -c -Os
-mbig-endian"
struct nilfs_segment_usage {
  int su_flags;
} a;
enum { NILFS_SEGMENT_USAGE_ACTIVE, NILFS_SEGMENT_USAGE_DIRTY } fn1();
int b;
void fn2(int *, long long);
void fn3() {
  int c, d;
  struct nilfs_segment_usage e = a;
  fn1();
  c = e.su_flags & 1 << NILFS_SEGMENT_USAGE_DIRTY;
  d = c;
  fn2(, d ? -1 : 0);
}
arnd@wuerfel:~/creduce/0x2F25F020$ cp old.i
cp: missing destination file operand after 'old.i'
Try 'cp --help' for more information.
arnd@wuerfel:~/creduce/0x2F25F020$ cat > old.i

enum { NILFS_SEGMENT_USAGE_ACTIVE, NILFS_SEGMENT_USAGE_DIRTY } a;

void fn2 (long long);
-
ICE after applying patch from comment 16
sufile-0x2F25F020.i: In function 'fn3':
sufile-0x2F25F020.i:14:1: error: insn does not satisfy its constraints:
 }
 ^
(insn 11 9 21 2 (set (reg:DI 0 r0 [118])
(and:DI (reg:DI 1 r1 [orig:116+-4 ] [116])
(const_int 1 [0x1]))) "sufile-0x2F25F020.i":13 79 {*anddi3_insn}
 (nil))
sufile-0x2F25F020.i:14:1: internal compiler error: in extract_constrain_insn,
at recog.c:2213
0x98a923 _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
/home/arnd/git/gcc/gcc/rtl-error.c:108
0x98a94f _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
/home/arnd/git/gcc/gcc/rtl-error.c:119
0x95f05d extract_constrain_insn(rtx_insn*)
/home/arnd/git/gcc/gcc/recog.c:2213
0x93c54c reload_cse_simplify_operands
/home/arnd/git/gcc/gcc/postreload.c:391
0x93f355 reload_cse_simplify
/home/arnd/git/gcc/gcc/postreload.c:179
0x93f355 reload_cse_regs_1
/home/arnd/git/gcc/gcc/postreload.c:218
0x93f423 reload_cse_regs
/home/arnd/git/gcc/gcc/postreload.c:64
0x93f423 execute
/home/arnd/git/gcc/gcc/postreload.c:2342

void fn1() {
  int b = a & 1 << NILFS_SEGMENT_USAGE_DIRTY;
  fn2 (b ? (long long) -1 : 0);
}

[Bug c/78304] [7 Regression] -Wformat doesn't warn anymore for inttypes.h format string argument type mismatches

2017-01-13 Thread dmalcolm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78304

David Malcolm  changed:

   What|Removed |Added

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

--- Comment #7 from David Malcolm  ---
Should be fixed by r244453.  Marking as resolved.

[Bug c/78304] [7 Regression] -Wformat doesn't warn anymore for inttypes.h format string argument type mismatches

2017-01-13 Thread dmalcolm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78304

--- Comment #6 from David Malcolm  ---
Author: dmalcolm
Date: Fri Jan 13 19:27:43 2017
New Revision: 244453

URL: https://gcc.gnu.org/viewcvs?rev=244453=gcc=rev
Log:
Don't suppress bogus usage of macros from system headers in -Wformat (PR
c/78304)

gcc/ChangeLog:
PR c/78304
* substring-locations.c (format_warning_va): Strengthen case 1 so
that both endpoints of the substring must be within the format
range for just the substring to be printed.

gcc/testsuite/ChangeLog:
PR c/78304
* gcc.dg/format/diagnostic-ranges.c (test_macro): Undef INT_FMT.
(test_macro_2): New test.
(test_macro_3): New test.
(test_macro_4): New test.
(test_non_contiguous_strings): Convert line number to line offset.
* gcc.dg/format/pr78304-2.c: New test case.
* gcc.dg/format/pr78304.c: New test case.


Added:
trunk/gcc/testsuite/gcc.dg/format/pr78304-2.c
trunk/gcc/testsuite/gcc.dg/format/pr78304.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/substring-locations.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.dg/format/diagnostic-ranges.c

[Bug tree-optimization/63537] [5/6 Regression] Missed optimization: Loop unrolling adds extra copy when returning aggregate

2017-01-13 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63537

Jeffrey A. Law  changed:

   What|Removed |Added

 CC||law at redhat dot com
Summary|[5/6/7 Regression] Missed   |[5/6 Regression] Missed
   |optimization: Loop  |optimization: Loop
   |unrolling adds extra copy   |unrolling adds extra copy
   |when returning aggregate|when returning aggregate

--- Comment #8 from Jeffrey A. Law  ---
This was fixed by Jan's change from June 16:

commit 8c1879bcebc5decbb6c0e7081f7a13c6a740b590
Author: hubicka 
Date:   Thu Jun 16 12:54:31 2016 +

* g++.dg/vect/pr36648.cc: Disable cunrolli
* tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Fix estimation
of comparsions in the last iteration.


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

[Bug ipa/70583] [6/7 Regression] FAIL: g++.old-deja/g++.abi/vtable2.C -std=gnu++98 execution test

2017-01-13 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70583

Jeffrey A. Law  changed:

   What|Removed |Added

   Priority|P2  |P4
 CC||law at redhat dot com

[Bug target/71321] [6 Regression] x86: worse code for uint8_t % 10 and / 10

2017-01-13 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71321

Jeffrey A. Law  changed:

   What|Removed |Added

 CC||law at redhat dot com
Summary|[6/7 Regression] x86: worse |[6 Regression] x86: worse
   |code for uint8_t % 10 and / |code for uint8_t % 10 and /
   |10  |10

--- Comment #7 from Jeffrey A. Law  ---
THe regression relative to gcc-5 has been fixed on the trunk.

It would be worth creating a separate bug for the unnecessary AND when
compiling with -Os that all versions of GCC exhibit.

[Bug c/32643] [5/6/7 Regression] Wrong error message with unsigned char a = uchar&512

2017-01-13 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=32643

Martin Sebor  changed:

   What|Removed |Added

 CC||msebor at gcc dot gnu.org

--- Comment #23 from Martin Sebor  ---
Bernd, intuitively, I would not expect a warning in the case you ask about.

-Woverflow is documented to "warn about compile-time overflow in constant
expressions."  A strict reading of this single sentence would suggest that
since none of the initialization expressions in the original test case is a
constant expression no warning should be issued (and the initialization
expressions should perhaps be diagnosed as not constant).

Alternatively, the documentation for the warning should explain what GCC
considers a constant expression (if more than what's required by the C
standard) and in what contexts and under what circumstances (e.g., per
Josephs's description in the post referenced in comment #10).  Otherwise, what
should or shouldn't be expected to be diagnosed is open to debate.

FWIW, to illustrate, GCC rejects some expressions with an error and not others
based on what it considers a constant expression (i.e., what it folds).  In my
view, that's more of a problem than the warning.

$ cat t.c && gcc t.c
unsigned char p;

char p2 = p & 512;
char p3 = p & 2;
t.c:3:11: warning: overflow in implicit constant conversion [-Woverflow]
 char p2 = p & 512;
   ^
t.c:4:11: error: initializer element is not constant
 char p3 = p & 2;
   ^

With -Wpedantic there is also a redundant warning:

t.c:3:11: warning: overflow in implicit constant conversion [-Woverflow]
 char p2 = p & 512;
   ^
t.c:3:1: warning: overflow in constant expression [-Woverflow]
 char p2 = p & 512;
 ^~~~
t.c:4:11: error: initializer element is not constant
 char p3 = p & 2;
   ^

[Bug target/77728] [5/6/7 Regression] Miscompilation multiple vector iteration on ARM

2017-01-13 Thread yyc1992 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77728

--- Comment #5 from Yichao Yu  ---
Ping again? Anything new or I can help with here?

[Bug libstdc++/77451] Cannot convert lambda [](auto&&...){} to std::function<void()>

2017-01-13 Thread rs2740 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77451

TC  changed:

   What|Removed |Added

 CC||rs2740 at gmail dot com

--- Comment #1 from TC  ---
This is not a libstdc++ bug. It's caused by GCC misparsing the ... in
[](auto&&...) {} (i.e., a dup of bug 64095).

Under the mistaken parse (which is equivalent to [](auto&&, ...) {}),
std::function's constructor correctly refuses to accept the lambda.

[Bug libstdc++/65411] Unsafe(?) repeated call to fclose() in config/io/basic_file_stdio.cc

2017-01-13 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65411

--- Comment #1 from Jonathan Wakely  ---
Author: redi
Date: Fri Jan 13 17:52:34 2017
New Revision: 244451

URL: https://gcc.gnu.org/viewcvs?rev=244451=gcc=rev
Log:
PR65411 don't retry fclose on EINTR

PR libstdc++/65411
* config/io/basic_file_stdio.cc (__basic_file::close()): Don't
retry fclose on EINTR.

Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/config/io/basic_file_stdio.cc

[Bug c++/36016] for-loop scoping problem: Method gets called after destructor

2017-01-13 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36016

Martin Sebor  changed:

   What|Removed |Added

 CC||msebor at gcc dot gnu.org
  Known to fail||4.1.0, 4.8.3, 4.9.3, 5.3.0,
   ||6.3.0, 7.0

--- Comment #4 from Martin Sebor  ---
The problem still exists in recent top of trunk (GCC 7.0).

[Bug c++/35098] ICE with attribute unused in template

2017-01-13 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=35098

Martin Sebor  changed:

   What|Removed |Added

   Last reconfirmed|2008-02-06 12:25:16 |2017-1-13
 CC||msebor at gcc dot gnu.org
  Known to fail||4.3.0, 4.8.3, 4.9.3, 5.3.0,
   ||6.3.0, 7.0

--- Comment #2 from Martin Sebor  ---
This week's top of trunk (GCC 7.0) still fails:

$ gcc -S t.C
t.C:3:30: internal compiler error: in layout_type, at stor-layout.c:2385
   T a, __attribute((unused)) b;
  ^
0x113e828 layout_type(tree_node*)
/src/gcc/svn/gcc/stor-layout.c:2385
0x14a636b type_hash_canon(unsigned int, tree_node*)
/src/gcc/svn/gcc/tree.c:7130
0x149e792 build_type_attribute_qual_variant(tree_node*, tree_node*, int)
/src/gcc/svn/gcc/tree.c:4875
0x149f908 build_type_attribute_variant(tree_node*, tree_node*)
/src/gcc/svn/gcc/tree.c:5101
0xacef81 decl_attributes(tree_node**, tree_node*, int)
/src/gcc/svn/gcc/attribs.c:608
0x816e1f grokdeclarator(cp_declarator const*, cp_decl_specifier_seq*,
decl_context, int, tree_node**)
/src/gcc/svn/gcc/cp/decl.c:10778
0x902aae grokfield(cp_declarator const*, cp_decl_specifier_seq*, tree_node*,
bool, tree_node*, tree_node*)
/src/gcc/svn/gcc/cp/decl2.c:806
0x957d30 cp_parser_member_declaration
/src/gcc/svn/gcc/cp/parser.c:23363
0x9570b9 cp_parser_member_specification_opt
/src/gcc/svn/gcc/cp/parser.c:22910
0x954d28 cp_parser_class_specifier_1
/src/gcc/svn/gcc/cp/parser.c:22066
0x955a71 cp_parser_class_specifier
/src/gcc/svn/gcc/cp/parser.c:22318
0x949f35 cp_parser_type_specifier
/src/gcc/svn/gcc/cp/parser.c:16409
0x944f08 cp_parser_decl_specifier_seq
/src/gcc/svn/gcc/cp/parser.c:13326
0x95da7d cp_parser_single_declaration
/src/gcc/svn/gcc/cp/parser.c:26576
0x95cd4f cp_parser_template_declaration_after_parameters
/src/gcc/svn/gcc/cp/parser.c:26271
0x95d91c cp_parser_explicit_template_declaration
/src/gcc/svn/gcc/cp/parser.c:26503
0x95d973 cp_parser_template_declaration_after_export
/src/gcc/svn/gcc/cp/parser.c:26521
0x9470d5 cp_parser_template_declaration
/src/gcc/svn/gcc/cp/parser.c:14667
0x9434f5 cp_parser_declaration
/src/gcc/svn/gcc/cp/parser.c:12438
0x943257 cp_parser_declaration_seq_opt
/src/gcc/svn/gcc/cp/parser.c:12365
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

[Bug middle-end/33699] [5/6/7 regression] missing optimization on const addr area store

2017-01-13 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=33699

Martin Sebor  changed:

   What|Removed |Added

 CC||msebor at gcc dot gnu.org
  Known to fail||6.3.0, 7.0

--- Comment #23 from Martin Sebor  ---
No progress in GCC 7.0 which emits the following code for powerpc64le at -O2
(-Os is slightly different but the same size):

 :
   0:   00 00 20 39 li  r9,0
   4:   00 00 c0 38 li  r6,0
   8:   00 00 e0 38 li  r7,0
   c:   00 00 00 39 li  r8,0
  10:   00 00 40 39 li  r10,0
  14:   ad de 29 61 ori r9,r9,57005
  18:   d0 fe c6 60 ori r6,r6,65232
  1c:   d8 fe e7 60 ori r7,r7,65240
  20:   e0 fe 08 61 ori r8,r8,65248
  24:   e8 fe 4a 61 ori r10,r10,65256
  28:   00 00 26 91 stw r9,0(r6)
  2c:   00 00 27 91 stw r9,0(r7)
  30:   00 00 28 91 stw r9,0(r8)
  34:   00 00 2a 91 stw r9,0(r10)
  38:   20 00 80 4e blr


Clang in contrast emits the following more compact code:

 :
   0:   00 00 60 3c lis r3,0
   4:   00 00 80 38 li  r4,0
   8:   01 00 a0 3c lis r5,1
   c:   ad de 63 60 ori r3,r3,57005
  10:   d0 fe 84 60 ori r4,r4,65232
  14:   d0 fe 65 90 stw r3,-304(r5)
  18:   08 00 64 90 stw r3,8(r4)
  1c:   10 00 64 90 stw r3,16(r4)
  20:   18 00 64 90 stw r3,24(r4)
  24:   20 00 80 4e blr

[Bug libstdc++/68307] [mingw32] Missing enum values in std::errc

2017-01-13 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68307

Jonathan Wakely  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #2 from Jonathan Wakely  ---
Fixed via PR 71444

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

[Bug libstdc++/71444] Error constants for MinGW-w64

2017-01-13 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71444

Jonathan Wakely  changed:

   What|Removed |Added

 CC||beck.ct at gmail dot com

--- Comment #5 from Jonathan Wakely  ---
*** Bug 68307 has been marked as a duplicate of this bug. ***

[Bug c++/65255] std::thread does not work for cross compiling on ARM

2017-01-13 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65255

--- Comment #10 from Jonathan Wakely  ---
(In reply to Jonathan Wakely from comment #8)
> I have a patch for std::thread which would mean it doesn't use shared_ptr,
> so this wouldn't be a problem even if you don't use the same arm version.

This change was made for GCC 6.1, see PR 65393

[Bug libstdc++/67214] undefined behaviour in std::num_get::_M_extract_int()

2017-01-13 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67214

Jonathan Wakely  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-01-13
 Ever confirmed|0   |1

[Bug c++/55004] [meta-bug] constexpr issues

2017-01-13 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55004
Bug 55004 depends on bug 71166, which changed state.

Bug 71166 Summary: [7 Regression] ICE with nested constexpr/initializer
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71166

   What|Removed |Added

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

[Bug c++/71166] [7 Regression] ICE with nested constexpr/initializer

2017-01-13 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71166

Marek Polacek  changed:

   What|Removed |Added

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

--- Comment #15 from Marek Polacek  ---
Fixed.

[Bug c++/71166] [7 Regression] ICE with nested constexpr/initializer

2017-01-13 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71166

--- Comment #14 from Marek Polacek  ---
Author: mpolacek
Date: Fri Jan 13 17:27:54 2017
New Revision: 244450

URL: https://gcc.gnu.org/viewcvs?rev=244450=gcc=rev
Log:
PR c++/71166
* g++.dg/cpp0x/constexpr-array18.C: New test.

Added:
trunk/gcc/testsuite/g++.dg/cpp0x/constexpr-array18.C
Modified:
trunk/gcc/testsuite/ChangeLog

[Bug c++/79085] New: ICE with placement new to unaligned location

2017-01-13 Thread thopre01 at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79085

Bug ID: 79085
   Summary: ICE with placement new to unaligned location
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: thopre01 at gcc dot gnu.org
CC: jason at gcc dot gnu.org
  Target Milestone: ---

Created attachment 40517
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40517=edit
Placement new to unaligned location

Hi,

The attached file ICE when compiled with -Os. The ICE is due to the assert in
assign_temp when called from expand_call because TREE_ADDRESSABLE(type) is
true. This is set from the C++ frontend in finish_struct_bits because there is
a non default constructor and expand_call calls assign_temp because the
location in which the return value optimization is not sufficiently aligned.

Due to the check to SLOW_UNALIGNED_ACCESS in expand_call, this does not affect
all targets. I was able to reproduce the bug can be reproduced on
alpha-linux-gnu by adapting size_t and ptrdiff_t accordingly.

Setting the component to C++ based on the comment regarding the assertion of
TREE_ADDRESSABLE in assign_temp.

[Bug tree-optimization/33315] stores not commoned by sinking

2017-01-13 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=33315

Martin Sebor  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||msebor at gcc dot gnu.org
 Resolution|--- |FIXED

--- Comment #8 from Martin Sebor  ---
With today's top of trunk (GCC 7.0) I see the following in the optimized dump. 
The redundant stores seem to have been eliminated (they are still present in
GCC 6).  Therefore resolving as fixed (please reopen if I missed something).

test ()
{
  int i;

   [100.00%]:
  i_8 = num;
  if (i_8 == 1)
goto ; [34.00%]
  else
goto ; [66.00%]

   [34.00%]:
  MEM[(int *)] = 0;
  goto ; [100.00%]

   [34.00%]:
  MEM[(int *) + 4B] = 0;

   [100.00%]:
  MEM[(int *) + 8B] = 0;
  return;

   [66.00%]:
  MEM[(int *)] = 0;
  if (i_8 == 2)
goto ; [51.52%]
  else
goto ; [48.48%]

   [32.00%]:
  MEM[(int *) + 4B] = 0;
  goto ; [100.00%]

}

[Bug rtl-optimization/11832] Optimization of common stores in switch statements

2017-01-13 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=11832
Bug 11832 depends on bug 33315, which changed state.

Bug 33315 Summary: stores not commoned by sinking
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=33315

   What|Removed |Added

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

[Bug libstdc++/64865] std::allocator::construct/destroy not called for specialization of std::allocator

2017-01-13 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64865

Jonathan Wakely  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |INVALID

--- Comment #4 from Jonathan Wakely  ---
DR 2218 gave me what I want, which means there's no guarantee that your
specialization is used for calls to construct/destroy. The container could
rebind the allocator to std::allocator<__super_secret_type> which you haven't
specialized, and then use its construct/destroy. So I think these optimizations
are allowed.

[Bug tree-optimization/32199] jc1: out of memory allocating 4072 bytes after a total of 805021000 bytes

2017-01-13 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=32199

Martin Sebor  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 CC||msebor at gcc dot gnu.org
 Resolution|--- |WORKSFORME

--- Comment #19 from Martin Sebor  ---
Java has been removed from GCC.  I also cannot reproduce any errors with the C
test case attached in comment #16, either natively on x86_64 or with a
hppa2.0w-hp-hpux11.11 (or hppa64-hp-hpux11.11) cross compiler.  Resolving as
WORKSFORSOME.  Please reopen if the problem still exists.

[Bug c++/70996] regression - infinite compilation of sequence overrided operator<

2017-01-13 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70996

Jonathan Wakely  changed:

   What|Removed |Added

   Keywords||compile-time-hog
 Status|UNCONFIRMED |RESOLVED
  Known to work||6.2.0
 Resolution|--- |FIXED
   Target Milestone|--- |6.2
  Known to fail||6.1.0

--- Comment #4 from Jonathan Wakely  ---
I can reproduce the problem with 6.1 but it seems to be fixed in GCC 6.2

[Bug lto/78407] [5/6/7 Regression] LTO breaks separate overriding of symbol aliases

2017-01-13 Thread hubicka at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78407

--- Comment #2 from Jan Hubicka  ---
The following patch fixes the issue
===
--- symtab.c(revision 244386)
+++ symtab.c(working copy)
@@ -1989,13 +1989,12 @@ symtab_node::equal_address_to (symtab_no
   if (rs1 != rs2 && avail1 >= AVAIL_AVAILABLE && avail2 >= AVAIL_AVAILABLE)
 binds_local1 = binds_local2 = true;

-  if ((binds_local1 ? rs1 : this)
-   == (binds_local2 ? rs2 : s2))
+  if (binds_local1 && binds_local2 && rs1 == rs2)
 {
   /* We made use of the fact that alias is not weak.  */
-  if (binds_local1 && rs1 != this)
+  if (rs1 != this)
 refuse_visibility_changes = true;
-  if (binds_local2 && rs2 != s2)
+  if (rs2 != s2)
 s2->refuse_visibility_changes = true;
   return 1;
 }

the problem is that if one of symbols is interposable, we can not compare
symbols for equality by comparing their alias targets.  I will think a bit if
this is too conservative.

Honza

[Bug fortran/78534] Use a larger integer type for character lengths on 64-bit targets

2017-01-13 Thread jb at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78534

--- Comment #18 from Janne Blomqvist  ---
Author: jb
Date: Fri Jan 13 17:05:48 2017
New Revision: 28

URL: https://gcc.gnu.org/viewcvs?rev=28=gcc=rev
Log:
PR 78534 Change character length from int to size_t

In order to handle large character lengths on (L)LP64 targets, switch
the GFortran character length from an int to a size_t.

This is an ABI change, as procedures with character arguments take
hidden arguments with the character length.

I also changed the _size member in vtables from int to size_t, as
there were some cases where character lengths and sizes were
apparently mixed up and caused regressions otherwise. Although I
haven't tested, this might enable very large derived types as well.

Also, as there are some places in the frontend were negative character
lengths are used as special flag values, in the frontend the character
length is handled as a signed variable of the same size as a size_t,
although in the runtime library it really is size_t.

I haven't changed the character length variables for the co-array
intrinsics, as this is something that may need to be synchronized with
OpenCoarrays.

This is v4 of the patch. v3 was applied but had to reverted due to
breaking bootstrap. The fix is in resolve.c:resolve_charlen, where
it's necessary to check that an expression is constant before using
mpz_sgn.

Overview of v3 of the patch: All the issues pointed out by FX's review
of v2 have been fixed. In particular, there are now new functions
gfc_mpz_get_hwi and gfc_mpz_set_hwi, similar to the GMP functions
mpz_get_si and mpz_set_si, except that they get/set a HOST_WIDE_INT
instead of a long value. Similarly, gfc_get_int_expr now takes a
HOST_WIDE_INT instead of a long, gfc_extract_long is replaced by
gfc_extract_hwi. Also, the preliminary work to handle
gfc_charlen_type_node being unsigned has been removed.

Regtested on x86_64-pc-linux-gnu and i686-pc-linux-gnu.

frontend:

2017-01-13  Janne Blomqvist  

PR fortran/78534
PR fortran/66310
* class.c (gfc_find_derived_vtab): Use gfc_size_kind instead of
hardcoded kind.
(find_intrinsic_vtab): Likewise.
* expr.c (gfc_get_character_expr): Length parameter of type
gfc_charlen_t.
(gfc_get_int_expr): Value argument of type HOST_WIDE_INT.
(gfc_extract_hwi): New function.
(simplify_const_ref): Make string_len of type gfc_charlen_t.
(gfc_simplify_expr): Use HOST_WIDE_INT for substring refs.
* gfortran.h (gfc_mpz_get_hwi): New prototype.
(gfc_mpz_set_hwi): Likewise.
(gfc_charlen_t): New typedef.
(gfc_expr): Use gfc_charlen_t for character lengths.
(gfc_size_kind): New extern variable.
(gfc_extract_hwi): New prototype.
(gfc_get_character_expr): Use gfc_charlen_t for character length.
(gfc_get_int_expr): Use HOST_WIDE_INT type for value argument.
* iresolve.c (gfc_resolve_repeat): Pass string length directly without
temporary, use gfc_charlen_int_kind.
* match.c (select_intrinsic_set_tmp): Use HOST_WIDE_INT for charlen.
* misc.c (gfc_mpz_get_hwi): New function.
(gfc_mpz_set_hwi): New function.
* module.c (atom_int): Change type from int to HOST_WIDE_INT.
(parse_integer): Don't complain about large integers.
(write_atom): Use HOST_WIDE_INT for integers.
(mio_integer): Handle integer type mismatch.
(mio_hwi): New function.
(mio_intrinsic_op): Use HOST_WIDE_INT.
(mio_array_ref): Likewise.
(mio_expr): Likewise.
* resolve.c (resolve_select_type): Use HOST_WIDE_INT for charlen,
use snprintf.
(resolve_substring_charlen): Use gfc_charlen_int_kind.
(resolve_charlen): Use mpz_sgn to determine sign.
* simplify.c (gfc_simplify_repeat): Use HOST_WIDE_INT/gfc_charlen_t
instead of long.
* target-memory.c (size_character): Length argument of type
gfc_charlen_t.
(gfc_encode_character): Likewise.
(gfc_interpret_character): Use gfc_charlen_t.
* target-memory.h (gfc_encode_character): Modify prototype.
* trans-array.c (get_array_ctor_var_strlen): Use
gfc_conv_mpz_to_tree_type.
* trans-const.c (gfc_conv_mpz_to_tree_type): New function.
* trans-const.h (gfc_conv_mpz_to_tree_type): New prototype.
* trans-expr.c (gfc_class_len_or_zero_get): Build const of type
gfc_charlen_type_node.
(gfc_conv_intrinsic_to_class): Use gfc_charlen_int_kind instead of
4, fold_convert to correct type.
(gfc_conv_class_to_class): Build const of type size_type_node for
size.
(gfc_copy_class_to_class): Likewise.
(gfc_conv_string_length): Use same type in expression.
(gfc_conv_substring): Likewise, use HOST_WIDE_INT for charlen.
(gfc_conv_string_tmp): Make sure len is of the right type.
 

[Bug fortran/66310] Problems with intrinsic repeat for large number of copies

2017-01-13 Thread jb at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66310

--- Comment #16 from Janne Blomqvist  ---
Author: jb
Date: Fri Jan 13 17:05:48 2017
New Revision: 28

URL: https://gcc.gnu.org/viewcvs?rev=28=gcc=rev
Log:
PR 78534 Change character length from int to size_t

In order to handle large character lengths on (L)LP64 targets, switch
the GFortran character length from an int to a size_t.

This is an ABI change, as procedures with character arguments take
hidden arguments with the character length.

I also changed the _size member in vtables from int to size_t, as
there were some cases where character lengths and sizes were
apparently mixed up and caused regressions otherwise. Although I
haven't tested, this might enable very large derived types as well.

Also, as there are some places in the frontend were negative character
lengths are used as special flag values, in the frontend the character
length is handled as a signed variable of the same size as a size_t,
although in the runtime library it really is size_t.

I haven't changed the character length variables for the co-array
intrinsics, as this is something that may need to be synchronized with
OpenCoarrays.

This is v4 of the patch. v3 was applied but had to reverted due to
breaking bootstrap. The fix is in resolve.c:resolve_charlen, where
it's necessary to check that an expression is constant before using
mpz_sgn.

Overview of v3 of the patch: All the issues pointed out by FX's review
of v2 have been fixed. In particular, there are now new functions
gfc_mpz_get_hwi and gfc_mpz_set_hwi, similar to the GMP functions
mpz_get_si and mpz_set_si, except that they get/set a HOST_WIDE_INT
instead of a long value. Similarly, gfc_get_int_expr now takes a
HOST_WIDE_INT instead of a long, gfc_extract_long is replaced by
gfc_extract_hwi. Also, the preliminary work to handle
gfc_charlen_type_node being unsigned has been removed.

Regtested on x86_64-pc-linux-gnu and i686-pc-linux-gnu.

frontend:

2017-01-13  Janne Blomqvist  

PR fortran/78534
PR fortran/66310
* class.c (gfc_find_derived_vtab): Use gfc_size_kind instead of
hardcoded kind.
(find_intrinsic_vtab): Likewise.
* expr.c (gfc_get_character_expr): Length parameter of type
gfc_charlen_t.
(gfc_get_int_expr): Value argument of type HOST_WIDE_INT.
(gfc_extract_hwi): New function.
(simplify_const_ref): Make string_len of type gfc_charlen_t.
(gfc_simplify_expr): Use HOST_WIDE_INT for substring refs.
* gfortran.h (gfc_mpz_get_hwi): New prototype.
(gfc_mpz_set_hwi): Likewise.
(gfc_charlen_t): New typedef.
(gfc_expr): Use gfc_charlen_t for character lengths.
(gfc_size_kind): New extern variable.
(gfc_extract_hwi): New prototype.
(gfc_get_character_expr): Use gfc_charlen_t for character length.
(gfc_get_int_expr): Use HOST_WIDE_INT type for value argument.
* iresolve.c (gfc_resolve_repeat): Pass string length directly without
temporary, use gfc_charlen_int_kind.
* match.c (select_intrinsic_set_tmp): Use HOST_WIDE_INT for charlen.
* misc.c (gfc_mpz_get_hwi): New function.
(gfc_mpz_set_hwi): New function.
* module.c (atom_int): Change type from int to HOST_WIDE_INT.
(parse_integer): Don't complain about large integers.
(write_atom): Use HOST_WIDE_INT for integers.
(mio_integer): Handle integer type mismatch.
(mio_hwi): New function.
(mio_intrinsic_op): Use HOST_WIDE_INT.
(mio_array_ref): Likewise.
(mio_expr): Likewise.
* resolve.c (resolve_select_type): Use HOST_WIDE_INT for charlen,
use snprintf.
(resolve_substring_charlen): Use gfc_charlen_int_kind.
(resolve_charlen): Use mpz_sgn to determine sign.
* simplify.c (gfc_simplify_repeat): Use HOST_WIDE_INT/gfc_charlen_t
instead of long.
* target-memory.c (size_character): Length argument of type
gfc_charlen_t.
(gfc_encode_character): Likewise.
(gfc_interpret_character): Use gfc_charlen_t.
* target-memory.h (gfc_encode_character): Modify prototype.
* trans-array.c (get_array_ctor_var_strlen): Use
gfc_conv_mpz_to_tree_type.
* trans-const.c (gfc_conv_mpz_to_tree_type): New function.
* trans-const.h (gfc_conv_mpz_to_tree_type): New prototype.
* trans-expr.c (gfc_class_len_or_zero_get): Build const of type
gfc_charlen_type_node.
(gfc_conv_intrinsic_to_class): Use gfc_charlen_int_kind instead of
4, fold_convert to correct type.
(gfc_conv_class_to_class): Build const of type size_type_node for
size.
(gfc_copy_class_to_class): Likewise.
(gfc_conv_string_length): Use same type in expression.
(gfc_conv_substring): Likewise, use HOST_WIDE_INT for charlen.
(gfc_conv_string_tmp): Make sure len is of the right type.
 

[Bug tree-optimization/32306] [5/6/7 Regression] redundant && || not eliminated

2017-01-13 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=32306

Martin Sebor  changed:

   What|Removed |Added

 Status|NEW |WAITING
 CC||msebor at gcc dot gnu.org

--- Comment #31 from Martin Sebor  ---
With GCC 7.0 I don't see much of a difference between the code emitted for the
original test case and for the smaller one from comment #19.  Can this bug be
resolved or am I missing something?

For convenience, here are both test cases:

#if !ORIGINAL

void bar (short *array,
  short b1, short b2, short b3, short b4,
  short b5, short b6, short b7, short b8)
{
  array[0] = b1 && b2 && b3 && b4 && b5 && b6 && b7 && b8;
  array[1] = b1 && b2 && b3 && b4 && b5 && b6 && b7 && b8;
}

#else

void bar (short *array,
  short b1, short b2, short b3, short b4,
  short b5, short b6, short b7, short b8,
  short b9, short b10, short b11, short b12)
{
  array[0] = b1 && b2 && b3 && b4 && b5 && b6 && b7 && b8 && b9 && b10 && b11
&& b12;
  array[1] = b1 && b2 && b3 && b4 && b5 && b6 && b7 && b8 && b9 && b10 && b11
&& b12;
  array[2] = b1 && b2 && b3 && b4 && b5 && b6 && b7 && b8 && b9 && b10 && b11
&& b12;
  array[3] = b1 && b2 && b3 && b4 && b5 && b6 && b7 && b8 && b9 && b10 && b11
&& b12;
  array[4] = b1 && b2 && b3 && b4 && b5 && b6 && b7 && b8 && b9 && b10 && b11
&& b12;
  array[5] = b1 && b2 && b3 && b4 && b5 && b6 && b7 && b8 && b9 && b10 && b11
&& b12;
  array[6] = b1 && b2 && b3 && b4 && b5 && b6 && b7 && b8 && b9 && b10 && b11
&& b12;
  array[7] = b1 && b2 && b3 && b4 && b5 && b6 && b7 && b8 && b9 && b10 && b11
&& b12;
  array[8] = b1 && b2 && b3 && b4 && b5 && b6 && b7 && b8 && b9 && b10 && b11
&& b12;
  array[9] = b1 && b2 && b3 && b4 && b5 && b6 && b7 && b8 && b9 && b10 && b11
&& b12;
  array[10] = b1 && b2 && b3 && b4 && b5 && b6 && b7 && b8 && b9 && b10 && b11
&& b12;
}
#endif

[Bug pch/78508] valgrind error in gt_pch_note_object when compiling C++

2017-01-13 Thread dcb314 at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78508

--- Comment #3 from David Binderman  ---
Still broken, a couple of months later, in gcc dated 2017 Jan 13.

[Bug c++/77451] Cannot convert lambda [](auto&&...){} to std::function<void()>

2017-01-13 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77451

Jonathan Wakely  changed:

   What|Removed |Added

   Keywords||rejects-valid
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-01-13
 Ever confirmed|0   |1

[Bug c++/77442] error: ‘free’ is not a member of ‘std’ std::free(ptr);

2017-01-13 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77442

Jonathan Wakely  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |INVALID

--- Comment #2 from Jonathan Wakely  ---
Closing due to lack of testcase etc.

[Bug bootstrap/79076] bootstrap comparison failure with Sun tools

2017-01-13 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79076

--- Comment #3 from Eric Botcazou  ---
> I forgot to mention that this was happening with 5.4.0 and 6.3.0 as well.

Then try with a standard configuration, in particular remove the in-tree
binutils if you don't use them!  You can drop cloog and isl too.

[Bug target/79058] [7 Regression] ARM: internal compiler error: in extract_constrain_insn, at recog.c:2213

2017-01-13 Thread arnd at linaro dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79058

--- Comment #19 from Arnd Bergmann  ---
Created attachment 40516
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40516=edit
preprocessed linux-4.10/fs/nilfs2/sufile.c source, 0xB0981CD0 build

Another version of the source file, also still showing the problem.

[Bug target/79058] [7 Regression] ARM: internal compiler error: in extract_constrain_insn, at recog.c:2213

2017-01-13 Thread arnd at linaro dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79058

--- Comment #18 from Arnd Bergmann  ---
Created attachment 40515
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40515=edit
preprocessed linux-4.10/fs/nilfs2/sufile.c source,  0x2F25F020 build

The file is slightly different, because of different kernel configuration
options, it still shows the problem with the patch from comment #16 that fixed
the problem in attachment 40502.

[Bug target/78397] The stack is not 8 bytes aligned on ARM

2017-01-13 Thread rearnsha at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78397

--- Comment #5 from Richard Earnshaw  ---
(In reply to Alexandre Martins from comment #4)
> Unfortunatly, it's not crashing into the __aeabi_read_tp function, but into
> the dynamic linker of freebsd (rtld-elf). For info, this function is located
> into the libc on freebsd.
> 
> Must the dynamic linker assume the stack can be miss aligned and re-align it
> if the function called is a 'public interface' ?

The dynamic linker cannot assume ABI privileges in this respect.  Ever.

That really is a bug in your dynamic linker.

[Bug c++/79078] Warnings from deprecated attribute are too noisy

2017-01-13 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79078

Martin Sebor  changed:

   What|Removed |Added

 CC||msebor at gcc dot gnu.org

--- Comment #6 from Martin Sebor  ---
This also affects C (and possibly Objective C/C++).  Not sure what Component
might cover both (or all) or if they each need their own bug.

$ cat t.c && gcc -S t.c
struct __attribute__ ((deprecated ("D is bad mmmkay"))) D { };

struct D d1, d2;
t.c:3:8: warning: ‘D’ is deprecated: D is bad mmmkay
[-Wdeprecated-declarations]
 struct D d1, d2;
^
t.c:1:57: note: declared here
 struct __attribute__ ((deprecated ("D is bad mmmkay"))) D { };
 ^
t.c:3:8: warning: ‘D’ is deprecated: D is bad mmmkay
[-Wdeprecated-declarations]
 struct D d1, d2;
^
t.c:1:57: note: declared here
 struct __attribute__ ((deprecated ("D is bad mmmkay"))) D { };
 ^

[Bug target/79058] [7 Regression] ARM: internal compiler error: in extract_constrain_insn, at recog.c:2213

2017-01-13 Thread arnd at linaro dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79058

--- Comment #17 from Arnd Bergmann  ---
(In reply to Dominik Vogt from comment #16)
> Or rather this one which avoids triggering an assertion failure in
> in_hard_reg_set_p ():

I tried this version, and while it fixes the test case I originally reported, I
have a total of nine randconfig runs that originally showed the same symptom,
all while compiling the same source file.

With your patch, four of them are fixed, the other five are unchanged. I'll try
to see what is different for those.

[Bug libstdc++/79075] Lots of tests fail with _GLIBCXX_USE_CXX11_ABI=0

2017-01-13 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79075

Jonathan Wakely  changed:

   What|Removed |Added

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

--- Comment #3 from Jonathan Wakely  ---
Fixed.

String views are supported in the old ABI now, and tests that depend on the new
ABI are skipped when it's not in use.

[Bug c/79082] -Wformat-truncation inconsistent behaviour

2017-01-13 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79082

Martin Sebor  changed:

   What|Removed |Added

   See Also||https://gcc.gnu.org/bugzill
   ||a/show_bug.cgi?id=77708

--- Comment #3 from Martin Sebor  ---
See also bug 77708 for some relevant background on -Wformat-truncation.

[Bug c/79084] New: No warning for implicit double with complex specifier

2017-01-13 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79084

Bug ID: 79084
   Summary: No warning for implicit double with complex specifier
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Keywords: diagnostic
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: redi at gcc dot gnu.org
  Target Milestone: ---

#include 
complex c;

This doesn't issue the expected pedwarn when compiled with -Wpedantic, because
the "complex" macro is defined in a system header.

With -Wsystem-headers you do get a warning:

In file included from c.c:1:0:
c.c:2:1: warning: ISO C does not support plain ‘complex’ meaning ‘double
complex’ [-Wpedantic]
 complex c;
 ^

As the location (c.c:2:1) is not in a system header the warning should not be
suppressed. When user code misuses a macro defined in a system header that is
not system code, and should not be suppressed.

[Bug rtl-optimization/78626] [7 Regression] ICE in rtl_verify_bb_insns, at cfgrtl.c:2656 (error: flow control insn inside a basic block)

2017-01-13 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78626

Jeffrey A. Law  changed:

   What|Removed |Added

 CC||law at redhat dot com

--- Comment #14 from Jeffrey A. Law  ---
Bernd is on PTO right now.  I'm going to try and pick up state on this and
78727.

[Bug c/47931] missing -Waddress warning for comparison with NULL

2017-01-13 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47931

--- Comment #8 from Martin Sebor  ---
It did fail yesterday because of a SNAFU on my part (sorry about that) but in
r244378 I committed a fix that should have resolved the failure.  Please check
again and let me know if it still shows up (I don't see it in the test results
reported earlier today on gcc-testresults:
https://gcc.gnu.org/ml/gcc-testresults/2017-01/msg01329.html).

[Bug c/79082] -Wformat-truncation inconsistent behaviour

2017-01-13 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79082

Martin Sebor  changed:

   What|Removed |Added

   Severity|normal  |enhancement

--- Comment #2 from Martin Sebor  ---
This is true and as Richard explained in comment #1, the inconsistency is
unavoidable in general.  It is also documented in the manual:

When the exact number of bytes written by a format directive cannot be
determined at compile-time it is estimated based on heuristics that depend on
the level argument and on optimization. While enabling optimization will in
most cases improve the accuracy of the warning, it may also result in false
positives.

It's not possible to detect the exact same set of conditions at all
optimization levels by a warning that depends on optimization.

It may, however,  be possible to suppress the warnings at -O0 when the
directives' argument values are indeterminate and their ranges are unavailable,
and issue the warnings only for certain truncation.  That might be an
enhancement worth considering for GCC 8 (it's too late for GCC 7), perhaps
under a new level.

Until then (but even with this possible enhancement) the recommended solution
is to defensively allocate buffers that are sufficiently large for even the
largest argument values, or for %s, use precision, and for integer directives,
use the appropriate length modifiers to constrain the number of bytes output by
individual directives.  This holds true for both -Wformat-overflow and
-Wformat-truncation.  For the latter (and snprintf) specifically, the warnings
can also be avoided by checking the return value.  Calls to snprintf that don't
check their return value are often hidden bugs because subsequent code is
rarely prepared to deal with the truncation.

So for example, the first call to snprintf could be constrained to 4 bytes
(including the terminating NUL) like so:

  snprintf(buffer, 4, "%2hhd", val % 100);

This is 1 byte more than can actually be output by the call.  If that is
unacceptable then I would recommend disabling the warning at -O0 by specifying
-Wno-format-truncation.

[Bug libstdc++/79075] Lots of tests fail with _GLIBCXX_USE_CXX11_ABI=0

2017-01-13 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79075

--- Comment #2 from Jonathan Wakely  ---
Author: redi
Date: Fri Jan 13 15:53:07 2017
New Revision: 25

URL: https://gcc.gnu.org/viewcvs?rev=25=gcc=rev
Log:
Add string_view support to COW std::string

PR libstdc++/79075
* include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI] (basic_string):
Make _If_sv private.
[!_GLIBCXX_USE_CXX11_ABI] (basic_string): Add member functions taking
basic_string_view arguments.

Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/include/bits/basic_string.h

[Bug bootstrap/79076] bootstrap comparison failure with Sun tools

2017-01-13 Thread phantall at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79076

--- Comment #2 from Brian Vandenberg  ---
> Right, the 4.9.x series is not longer supported.

I forgot to mention that this was happening with 5.4.0 and 6.3.0 as well.

[Bug tree-optimization/77485] Missed dead store elimination of aggregate store followed by partial stores

2017-01-13 Thread law at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77485

--- Comment #14 from Jeffrey A. Law  ---
Author: law
Date: Fri Jan 13 15:46:22 2017
New Revision: 23

URL: https://gcc.gnu.org/viewcvs?rev=23=gcc=rev
Log:
PR tree-optimization/61912
PR tree-optimization/77485
* tree-ssa-dse.c: Include expr.h.
(maybe_trim_constructor_store): New function.
(maybe_trim_partially_dead_store): Call maybe_trim_constructor_store.

PR tree-optimization/61912
PR tree-optimization/77485
* g++.dg/tree-ssa/ssa-dse-1.C: New test.
* gcc.dg/tree-ssa/pr30375: Adjust expected output.
* gcc.dg/tree-ssa/ssa-dse-24.c: New test.

Added:
trunk/gcc/testsuite/g++.dg/tree-ssa/ssa-dse-1.C
trunk/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-24.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.dg/tree-ssa/pr30375.c
trunk/gcc/tree-ssa-dse.c

[Bug middle-end/61912] Missed (partial) dead store elimination for structures on GIMPLE

2017-01-13 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61912

Jeffrey A. Law  changed:

   What|Removed |Added

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

--- Comment #7 from Jeffrey A. Law  ---
Fixed on the trunk.

[Bug middle-end/61912] Missed (partial) dead store elimination for structures on GIMPLE

2017-01-13 Thread law at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61912

--- Comment #6 from Jeffrey A. Law  ---
Author: law
Date: Fri Jan 13 15:46:22 2017
New Revision: 23

URL: https://gcc.gnu.org/viewcvs?rev=23=gcc=rev
Log:
PR tree-optimization/61912
PR tree-optimization/77485
* tree-ssa-dse.c: Include expr.h.
(maybe_trim_constructor_store): New function.
(maybe_trim_partially_dead_store): Call maybe_trim_constructor_store.

PR tree-optimization/61912
PR tree-optimization/77485
* g++.dg/tree-ssa/ssa-dse-1.C: New test.
* gcc.dg/tree-ssa/pr30375: Adjust expected output.
* gcc.dg/tree-ssa/ssa-dse-24.c: New test.

Added:
trunk/gcc/testsuite/g++.dg/tree-ssa/ssa-dse-1.C
trunk/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-24.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.dg/tree-ssa/pr30375.c
trunk/gcc/tree-ssa-dse.c

[Bug tree-optimization/77485] Missed dead store elimination of aggregate store followed by partial stores

2017-01-13 Thread law at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77485

--- Comment #12 from Jeffrey A. Law  ---
Author: law
Date: Fri Jan 13 15:37:09 2017
New Revision: 21

URL: https://gcc.gnu.org/viewcvs?rev=21=gcc=rev
Log:
PR tree-optimization/33562
PR tree-optimization/61912
PR tree-optimization/77485
* sbitmap.h (bitmap_count_bits): Prototype.
(bitmap_clear_range, bitmap_set_range): Likewise.
* sbitmap.c (bitmap_clear_range): New function.
(bitmap_set_range, sbitmap_popcount, bitmap_count_bits): Likewise.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/sbitmap.c
trunk/gcc/sbitmap.h

[Bug tree-optimization/33562] [5/6 Regression] aggregate DSE disabled

2017-01-13 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=33562

Jeffrey A. Law  changed:

   What|Removed |Added

Summary|[5/6/7 Regression]  |[5/6 Regression] aggregate
   |aggregate DSE disabled  |DSE disabled

--- Comment #27 from Jeffrey A. Law  ---
Fixed on the trunk.  No plans to backport.

[Bug tree-optimization/77485] Missed dead store elimination of aggregate store followed by partial stores

2017-01-13 Thread law at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77485

--- Comment #13 from Jeffrey A. Law  ---
Author: law
Date: Fri Jan 13 15:42:08 2017
New Revision: 22

URL: https://gcc.gnu.org/viewcvs?rev=22=gcc=rev
Log:
PR tree-optimization/33562
PR tree-optimization/61912
PR tree-optimization/77485
* doc/invoke.texi: Document new dse-max-object-size param.
* params.def (PARM_DSE_MAX_OBJECT_SIZE): New PARAM.
* tree-ssa-dse.c: Include params.h.
(dse_store_status): New enum.
(initialize_ao_ref_for_dse): New, partially extracted from
dse_optimize_stmt.
(valid_ao_ref_for_dse, normalize_ref): New.
(setup_live_bytes_from_ref, compute_trims): Likewise.
(clear_bytes_written_by, maybe_trim_complex_store): Likewise.
(maybe_trim_partially_dead_store): Likewise.
(maybe_trim_complex_store): Likewise.
(dse_classify_store): Renamed from dse_possibly_dead_store_p.
Track what bytes live from the original store.  Return tri-state
for dead, partially dead or live.
(dse_dom_walker): Add constructor, destructor and new private members.
(delete_dead_call, delete_dead_assignment): New extracted from
dse_optimize_stmt.
(dse_optimize_stmt): Make a member of dse_dom_walker.
Use initialize_ao_ref_for_dse.

PR tree-optimization/33562
PR tree-optimization/61912
PR tree-optimization/77485
* gcc.dg/tree-ssa/complex-4.c: Remove xfail.
* gcc.dg/tree-ssa/complex-5.c: Likewise.
* gcc.dg/tree-ssa/ssa-dse-9.c: Likewise.
* gcc.dg/tree-ssa/ssa-dse-18.c: New test.
* gcc.dg/tree-ssa/ssa-dse-19.c: Likewise.
* gcc.dg/tree-ssa/ssa-dse-20.c: Likewise.
* gcc.dg/tree-ssa/ssa-dse-21.c: Likewise.

Added:
trunk/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-18.c
  - copied, changed from r21,
trunk/gcc/testsuite/gcc.dg/tree-ssa/complex-4.c
trunk/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-19.c
  - copied, changed from r21,
trunk/gcc/testsuite/gcc.dg/tree-ssa/complex-4.c
trunk/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-20.c
  - copied, changed from r21,
trunk/gcc/testsuite/gcc.dg/tree-ssa/complex-5.c
trunk/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-21.c
  - copied, changed from r21,
trunk/gcc/testsuite/gcc.dg/tree-ssa/complex-5.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/doc/invoke.texi
trunk/gcc/params.def
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.dg/tree-ssa/complex-4.c
trunk/gcc/testsuite/gcc.dg/tree-ssa/complex-5.c
trunk/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-9.c
trunk/gcc/tree-ssa-dse.c

[Bug tree-optimization/33562] [5/6/7 Regression] aggregate DSE disabled

2017-01-13 Thread law at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=33562

--- Comment #26 from Jeffrey A. Law  ---
Author: law
Date: Fri Jan 13 15:42:08 2017
New Revision: 22

URL: https://gcc.gnu.org/viewcvs?rev=22=gcc=rev
Log:
PR tree-optimization/33562
PR tree-optimization/61912
PR tree-optimization/77485
* doc/invoke.texi: Document new dse-max-object-size param.
* params.def (PARM_DSE_MAX_OBJECT_SIZE): New PARAM.
* tree-ssa-dse.c: Include params.h.
(dse_store_status): New enum.
(initialize_ao_ref_for_dse): New, partially extracted from
dse_optimize_stmt.
(valid_ao_ref_for_dse, normalize_ref): New.
(setup_live_bytes_from_ref, compute_trims): Likewise.
(clear_bytes_written_by, maybe_trim_complex_store): Likewise.
(maybe_trim_partially_dead_store): Likewise.
(maybe_trim_complex_store): Likewise.
(dse_classify_store): Renamed from dse_possibly_dead_store_p.
Track what bytes live from the original store.  Return tri-state
for dead, partially dead or live.
(dse_dom_walker): Add constructor, destructor and new private members.
(delete_dead_call, delete_dead_assignment): New extracted from
dse_optimize_stmt.
(dse_optimize_stmt): Make a member of dse_dom_walker.
Use initialize_ao_ref_for_dse.

PR tree-optimization/33562
PR tree-optimization/61912
PR tree-optimization/77485
* gcc.dg/tree-ssa/complex-4.c: Remove xfail.
* gcc.dg/tree-ssa/complex-5.c: Likewise.
* gcc.dg/tree-ssa/ssa-dse-9.c: Likewise.
* gcc.dg/tree-ssa/ssa-dse-18.c: New test.
* gcc.dg/tree-ssa/ssa-dse-19.c: Likewise.
* gcc.dg/tree-ssa/ssa-dse-20.c: Likewise.
* gcc.dg/tree-ssa/ssa-dse-21.c: Likewise.

Added:
trunk/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-18.c
  - copied, changed from r21,
trunk/gcc/testsuite/gcc.dg/tree-ssa/complex-4.c
trunk/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-19.c
  - copied, changed from r21,
trunk/gcc/testsuite/gcc.dg/tree-ssa/complex-4.c
trunk/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-20.c
  - copied, changed from r21,
trunk/gcc/testsuite/gcc.dg/tree-ssa/complex-5.c
trunk/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-21.c
  - copied, changed from r21,
trunk/gcc/testsuite/gcc.dg/tree-ssa/complex-5.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/doc/invoke.texi
trunk/gcc/params.def
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.dg/tree-ssa/complex-4.c
trunk/gcc/testsuite/gcc.dg/tree-ssa/complex-5.c
trunk/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-9.c
trunk/gcc/tree-ssa-dse.c

[Bug middle-end/61912] Missed (partial) dead store elimination for structures on GIMPLE

2017-01-13 Thread law at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61912

--- Comment #5 from Jeffrey A. Law  ---
Author: law
Date: Fri Jan 13 15:42:08 2017
New Revision: 22

URL: https://gcc.gnu.org/viewcvs?rev=22=gcc=rev
Log:
PR tree-optimization/33562
PR tree-optimization/61912
PR tree-optimization/77485
* doc/invoke.texi: Document new dse-max-object-size param.
* params.def (PARM_DSE_MAX_OBJECT_SIZE): New PARAM.
* tree-ssa-dse.c: Include params.h.
(dse_store_status): New enum.
(initialize_ao_ref_for_dse): New, partially extracted from
dse_optimize_stmt.
(valid_ao_ref_for_dse, normalize_ref): New.
(setup_live_bytes_from_ref, compute_trims): Likewise.
(clear_bytes_written_by, maybe_trim_complex_store): Likewise.
(maybe_trim_partially_dead_store): Likewise.
(maybe_trim_complex_store): Likewise.
(dse_classify_store): Renamed from dse_possibly_dead_store_p.
Track what bytes live from the original store.  Return tri-state
for dead, partially dead or live.
(dse_dom_walker): Add constructor, destructor and new private members.
(delete_dead_call, delete_dead_assignment): New extracted from
dse_optimize_stmt.
(dse_optimize_stmt): Make a member of dse_dom_walker.
Use initialize_ao_ref_for_dse.

PR tree-optimization/33562
PR tree-optimization/61912
PR tree-optimization/77485
* gcc.dg/tree-ssa/complex-4.c: Remove xfail.
* gcc.dg/tree-ssa/complex-5.c: Likewise.
* gcc.dg/tree-ssa/ssa-dse-9.c: Likewise.
* gcc.dg/tree-ssa/ssa-dse-18.c: New test.
* gcc.dg/tree-ssa/ssa-dse-19.c: Likewise.
* gcc.dg/tree-ssa/ssa-dse-20.c: Likewise.
* gcc.dg/tree-ssa/ssa-dse-21.c: Likewise.

Added:
trunk/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-18.c
  - copied, changed from r21,
trunk/gcc/testsuite/gcc.dg/tree-ssa/complex-4.c
trunk/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-19.c
  - copied, changed from r21,
trunk/gcc/testsuite/gcc.dg/tree-ssa/complex-4.c
trunk/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-20.c
  - copied, changed from r21,
trunk/gcc/testsuite/gcc.dg/tree-ssa/complex-5.c
trunk/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-21.c
  - copied, changed from r21,
trunk/gcc/testsuite/gcc.dg/tree-ssa/complex-5.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/doc/invoke.texi
trunk/gcc/params.def
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.dg/tree-ssa/complex-4.c
trunk/gcc/testsuite/gcc.dg/tree-ssa/complex-5.c
trunk/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-9.c
trunk/gcc/tree-ssa-dse.c

[Bug tree-optimization/33562] [5/6/7 Regression] aggregate DSE disabled

2017-01-13 Thread law at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=33562

--- Comment #25 from Jeffrey A. Law  ---
Author: law
Date: Fri Jan 13 15:37:09 2017
New Revision: 21

URL: https://gcc.gnu.org/viewcvs?rev=21=gcc=rev
Log:
PR tree-optimization/33562
PR tree-optimization/61912
PR tree-optimization/77485
* sbitmap.h (bitmap_count_bits): Prototype.
(bitmap_clear_range, bitmap_set_range): Likewise.
* sbitmap.c (bitmap_clear_range): New function.
(bitmap_set_range, sbitmap_popcount, bitmap_count_bits): Likewise.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/sbitmap.c
trunk/gcc/sbitmap.h

[Bug middle-end/61912] Missed (partial) dead store elimination for structures on GIMPLE

2017-01-13 Thread law at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61912

--- Comment #4 from Jeffrey A. Law  ---
Author: law
Date: Fri Jan 13 15:37:09 2017
New Revision: 21

URL: https://gcc.gnu.org/viewcvs?rev=21=gcc=rev
Log:
PR tree-optimization/33562
PR tree-optimization/61912
PR tree-optimization/77485
* sbitmap.h (bitmap_count_bits): Prototype.
(bitmap_clear_range, bitmap_set_range): Likewise.
* sbitmap.c (bitmap_clear_range): New function.
(bitmap_set_range, sbitmap_popcount, bitmap_count_bits): Likewise.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/sbitmap.c
trunk/gcc/sbitmap.h

[Bug ipa/71190] [7 Regression] ICE in assemble_variable_contents, at varasm.c:2054

2017-01-13 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71190

--- Comment #12 from Markus Trippelsdorf  ---
(In reply to Martin Liška from comment #11)
> Do you have still Markus the pre-processed source files available on the
> machine? Can you give me access?

No, I removed them some time ago. 
But, as I wrote, to reproduce just build Firefox on gcc112 with
""-flto=60 --param lto-partitions=60".

[Bug tree-optimization/71076] [6/7 Regression] error: missing PHI def

2017-01-13 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71076

Martin Liška  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||marxin at gcc dot gnu.org
 Resolution|--- |FIXED

--- Comment #6 from Martin Liška  ---
Fixed on trunk by Richi's commit r241955 and gcc 6 branch is also fine.
Closing as resolved.

[Bug ipa/71190] [7 Regression] ICE in assemble_variable_contents, at varasm.c:2054

2017-01-13 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71190

--- Comment #11 from Martin Liška  ---
Do you have still Markus the pre-processed source files available on the
machine? Can you give me access?

[Bug libstdc++/79075] Lots of tests fail with _GLIBCXX_USE_CXX11_ABI=0

2017-01-13 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79075

--- Comment #1 from Jonathan Wakely  ---
Author: redi
Date: Fri Jan 13 14:57:33 2017
New Revision: 20

URL: https://gcc.gnu.org/viewcvs?rev=20=gcc=rev
Log:
Define cxx11-abi effective target for libstdc++ tests

PR libstdc++/79075
* testsuite/lib/libstdc++.exp (check_v3_target_filesystem_ts): Remove
redundant option from cxxflags.
(check_effective_target_cxx11-abi): Define.
* testsuite/21_strings/basic_string/allocator/71964.cc: Use cxx11-abi
effective target.
* testsuite/21_strings/basic_string/allocator/char/copy.cc: Likewise.
* testsuite/21_strings/basic_string/allocator/char/copy_assign.cc:
Likewise.
* testsuite/21_strings/basic_string/allocator/char/minimal.cc:
Likewise.
* testsuite/21_strings/basic_string/allocator/char/move.cc: Likewise.
* testsuite/21_strings/basic_string/allocator/char/move_assign.cc:
Likewise.
* testsuite/21_strings/basic_string/allocator/char/noexcept.cc:
Likewise.
* testsuite/21_strings/basic_string/allocator/char/swap.cc: Likewise.
* testsuite/21_strings/basic_string/allocator/wchar_t/copy.cc:
Likewise.
* testsuite/21_strings/basic_string/allocator/wchar_t/copy_assign.cc:
Likewise.
* testsuite/21_strings/basic_string/allocator/wchar_t/minimal.cc:
Likewise.
* testsuite/21_strings/basic_string/allocator/wchar_t/move.cc:
Likewise.
* testsuite/21_strings/basic_string/allocator/wchar_t/move_assign.cc:
Likewise.
* testsuite/21_strings/basic_string/allocator/wchar_t/noexcept.cc:
Likewise.
* testsuite/21_strings/basic_string/allocator/wchar_t/swap.cc:
Likewise.
* testsuite/23_containers/list/61347.cc: Likewise.
* testsuite/27_io/basic_fstream/cons/base.cc: Likewise.
* testsuite/27_io/ios_base/failure/cxx11.cc: Likewise.

Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/testsuite/21_strings/basic_string/allocator/71964.cc
trunk/libstdc++-v3/testsuite/21_strings/basic_string/allocator/char/copy.cc
   
trunk/libstdc++-v3/testsuite/21_strings/basic_string/allocator/char/copy_assign.cc
   
trunk/libstdc++-v3/testsuite/21_strings/basic_string/allocator/char/minimal.cc
trunk/libstdc++-v3/testsuite/21_strings/basic_string/allocator/char/move.cc
   
trunk/libstdc++-v3/testsuite/21_strings/basic_string/allocator/char/move_assign.cc
   
trunk/libstdc++-v3/testsuite/21_strings/basic_string/allocator/char/noexcept.cc
trunk/libstdc++-v3/testsuite/21_strings/basic_string/allocator/char/swap.cc
   
trunk/libstdc++-v3/testsuite/21_strings/basic_string/allocator/wchar_t/copy.cc
   
trunk/libstdc++-v3/testsuite/21_strings/basic_string/allocator/wchar_t/copy_assign.cc
   
trunk/libstdc++-v3/testsuite/21_strings/basic_string/allocator/wchar_t/minimal.cc
   
trunk/libstdc++-v3/testsuite/21_strings/basic_string/allocator/wchar_t/move.cc
   
trunk/libstdc++-v3/testsuite/21_strings/basic_string/allocator/wchar_t/move_assign.cc
   
trunk/libstdc++-v3/testsuite/21_strings/basic_string/allocator/wchar_t/noexcept.cc
   
trunk/libstdc++-v3/testsuite/21_strings/basic_string/allocator/wchar_t/swap.cc
trunk/libstdc++-v3/testsuite/23_containers/list/61347.cc
trunk/libstdc++-v3/testsuite/27_io/basic_fstream/cons/base.cc
trunk/libstdc++-v3/testsuite/27_io/ios_base/failure/cxx11.cc
trunk/libstdc++-v3/testsuite/lib/libstdc++.exp

[Bug target/79058] [7 Regression] ARM: internal compiler error: in extract_constrain_insn, at recog.c:2213

2017-01-13 Thread vogt at linux dot vnet.ibm.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79058

--- Comment #16 from Dominik Vogt  ---
Or rather this one which avoids triggering an assertion failure in
in_hard_reg_set_p ():

diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c
--- a/gcc/lra-constraints.c
+++ b/gcc/lra-constraints.c
@@ -1463,6 +1463,7 @@ static bool
 simplify_operand_subreg (int nop, machine_mode reg_mode)
 {
   int hard_regno;
+  int tmp_regno;
   rtx_insn *before, *after;
   machine_mode mode, innermode;
   rtx reg, new_reg;
@@ -1685,8 +1686,14 @@ simplify_operand_subreg (int nop, machine_mode reg_mode)
   < hard_regno_nregs[hard_regno][mode])
   && (regclass = lra_get_allocno_class (REGNO (reg)))
   && (type != OP_IN
-  || !in_hard_reg_set_p (reg_class_contents[regclass],
- mode, hard_regno)))
+  || (BYTES_BIG_ENDIAN
+  && ((tmp_regno
+   = hard_regno - hard_regno_nregs[hard_regno][mode] + 1)
+  < 0
+  || !HARD_REGISTER_NUM_P (tmp_regno)))
+  || (!in_hard_reg_set_p (reg_class_contents[regclass], mode,
+  (BYTES_BIG_ENDIAN
+   ? tmp_regno : hard_regno)
 {
   /* The class will be defined later in curr_insn_transform.  */
   enum reg_class rclass

[Bug tree-optimization/78604] [7 regression] test case gcc.target/powerpc/p8vector-vectorize-1.c fails starting with r242750

2017-01-13 Thread wschmidt at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78604

Bill Schmidt  changed:

   What|Removed |Added

 CC||meissner at gcc dot gnu.org

--- Comment #5 from Bill Schmidt  ---
Mike, can you respond to c#4?

[Bug c++/71166] [7 Regression] ICE with nested constexpr/initializer

2017-01-13 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71166

Marek Polacek  changed:

   What|Removed |Added

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

--- Comment #13 from Marek Polacek  ---
Adding the testcase.

[Bug libstdc++/78389] list::merge and list::sort are not exception safe

2017-01-13 Thread ville.voutilainen at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78389

Ville Voutilainen  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||ville.voutilainen at gmail dot 
com
 Resolution|--- |FIXED

--- Comment #2 from Ville Voutilainen  ---
Fixed on trunk.

[Bug c++/71406] [7 Regression] ICE on valid C++ code on x86_64-linux-gnu: in finish_class_member_access_expr, at cp/typeck.c:2782

2017-01-13 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71406

Marek Polacek  changed:

   What|Removed |Added

 CC||mpolacek at gcc dot gnu.org

--- Comment #2 from Marek Polacek  ---
This one is in the same basket as Bug 71710 / Bug 77508.

  1   2   >