[Bug libstdc++/70654] New: failbit is not set sometimes on stream reading double outside presentable range

2016-04-13 Thread osternhase at gmx dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70654

Bug ID: 70654
   Summary: failbit is not set sometimes on stream reading double
outside presentable range
   Product: gcc
   Version: 4.8.4
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libstdc++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: osternhase at gmx dot de
  Target Milestone: ---

I am using Ubuntu 14.04 64-bit (x86_64). Following code snippet:

#include 
#include 

using namespace std;

int main(int argc, char *argv[])
{

istringstream a("-1.3E+4");
double d;

a >> d;
if (a.fail())
cout << "Ok\n";
else
cout << "Bug\n";

istringstream b("-1.3E-4\n");
b >> d;
if (b.fail())
cout << "Ok\n";
else
cout << "Bug\n";
return 0;
}
Compile:
  g++ t.cpp -o t

result:

  Ok
  Bug

expected:

  Ok
  Ok


g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.8/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu
4.8.4-2ubuntu1~14.04.1' --with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs
--enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.8 --enable-shared --enable-linker-build-id
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls
--with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug
--enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libmudflap
--enable-plugin --with-system-zlib --disable-browser-plugin
--enable-java-awt=gtk --enable-gtk-cairo
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64/jre --enable-java-home
--with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64
--with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-amd64
--with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar
--enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686
--with-abi=m64 --with-multilib-list=m32,m64,mx32 --with-tune=generic
--enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu
--target=x86_64-linux-gnu
Thread model: posix
gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.1)

strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep LIBCXX :
GLIBCXX_3.4
GLIBCXX_3.4.1
GLIBCXX_3.4.2
GLIBCXX_3.4.3
GLIBCXX_3.4.4
GLIBCXX_3.4.5
GLIBCXX_3.4.6
GLIBCXX_3.4.7
GLIBCXX_3.4.8
GLIBCXX_3.4.9
GLIBCXX_3.4.10
GLIBCXX_3.4.11
GLIBCXX_3.4.12
GLIBCXX_3.4.13
GLIBCXX_3.4.14
GLIBCXX_3.4.15
GLIBCXX_3.4.16
GLIBCXX_3.4.17
GLIBCXX_3.4.18
GLIBCXX_3.4.19
GLIBCXX_DEBUG_MESSAGE_LENGTH

[Bug c/70651] ICE on valid code on x86_64-linux-gnu in build_va_arg, at c-family/c-common.c:5728

2016-04-13 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70651

Jakub Jelinek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-04-14
 CC||jakub at gcc dot gnu.org
   Target Milestone|--- |6.0
 Ever confirmed|0   |1

--- Comment #1 from Jakub Jelinek  ---
Started with r223286.  I wouldn't call this valid, for valid code the type
needs to be va_list and there needs to be va_start that initializes the va_list
object (or va_copy) and corresponding va_end.

[Bug bootstrap/70650] [6 regression] bootstrap failure: ICE in emit_move_insn, at expr.c:3546

2016-04-13 Thread ro at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70650

--- Comment #5 from Rainer Orth  ---
Created attachment 38260
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38260&action=edit
preprocessed input

[Bug bootstrap/70650] [6 regression] bootstrap failure: ICE in emit_move_insn, at expr.c:3546

2016-04-13 Thread ro at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70650

Rainer Orth  changed:

   What|Removed |Added

 Target|x86_64-apple-darwin15   |x86_64-apple-darwin15,
   ||sparc-sun-solaris2.12
 CC||ro at gcc dot gnu.org
   Host|x86_64-apple-darwin15   |x86_64-apple-darwin15,
   ||sparc-sun-solaris2.12
   Target Milestone|--- |6.0
Summary|bootstrap failure on x86_64 |[6 regression] bootstrap
   |darwin  |failure: ICE  in
   ||emit_move_insn, at
   ||expr.c:3546
  Build|x86_64-apple-darwin15   |x86_64-apple-darwin15,
   ||sparc-sun-solaris2.12

--- Comment #4 from Rainer Orth  ---
I'm seeing the same on Solaris/SPARC.

In stage1, boils down to

$ cc1plus -fpreprocessed bitmap_allocator.ii -quiet -mcpu=v9 -std=gnu++98 -o
bitmap_allocator.s

[Bug bootstrap/70650] bootstrap failure on x86_64 darwin

2016-04-13 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70650

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #3 from Jakub Jelinek  ---
Please attach preprocessed source for string-inst.cc

[Bug c++/70649] [6 Regression] Incorrect C++ warning on zero-sized array passing

2016-04-13 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70649

Jason Merrill  changed:

   What|Removed |Added

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

[Bug c++/70613] -fabi-version docs don't match implementation

2016-04-13 Thread wilson at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70613

--- Comment #3 from Jim Wilson  ---
Patch posted for review here
https://gcc.gnu.org/ml/gcc-patches/2016-04/msg00480.html

[Bug bootstrap/70650] bootstrap failure on x86_64 darwin

2016-04-13 Thread howarth.at.gcc at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70650

--- Comment #2 from Jack Howarth  ---
This regression is caused by the commit...


r234959 | jason | 2016-04-13 16:11:20 -0400 (Wed, 13 Apr 2016) | 7 lines

Pass empty class parameters like C.

* call.c (pass_as_empty_struct, empty_class_arg): New.
(type_passed_as, build_x_va_arg): Use pass_as_empty_struct.
(build_call_a): Use empty_class_arg.
* cp-tree.h (CPTI_EMPTY_STRUCT, empty_struct_type): New.
* decl.c (cxx_init_decl_processing): Create empty_struct_type.

[Bug c++/70613] -fabi-version docs don't match implementation

2016-04-13 Thread wilson at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70613

--- Comment #2 from Jim Wilson  ---
Patch posted for review here
https://gcc.gnu.org/ml/gcc-patches/2016-04/msg00480.html

[Bug tree-optimization/70130] [6 Regression] h264ref fails with verification error starting with r231674 (r224221 is the true start of the problem)

2016-04-13 Thread wschmidt at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70130

--- Comment #22 from Bill Schmidt  ---
The most suspicious thing I see in r224221 is following the gap adjustment:

  vect__39.29_261 = REALIGN_LOAD ;
  vectp_s.20_260 = vectp_s.20_278 + 18446744073709551560;
  vect__39.30_247 = VEC_PERM_EXPR ;
  vect__39.31_246 = VEC_PERM_EXPR ;
  vect__39.32_243 = VEC_PERM_EXPR ;
  vect__39.33_242 = VEC_PERM_EXPR ;
  _39 = *_38[1];
  vect__40.34_229 = VEC_PACK_TRUNC_EXPR ;
  vect__40.34_228 = VEC_PACK_TRUNC_EXPR ;
  _40 = (short int) _39;

Instead of interleaving results from the two vectors, this is splatting the
first element of one of them.  Compare the code from r224220:

  vect__39.61_161 = REALIGN_LOAD ;
  vect_perm_even_143 = VEC_PERM_EXPR ;
  vect_perm_odd_125 = VEC_PERM_EXPR ;
  _39 = *_38[1];
  vect__40.62_107 = VEC_PACK_TRUNC_EXPR ;
  _40 = (short int) _39;

I walked through the code enough to see that SLP_TREE_LOAD_PERMUTATION for the
SLP tree was just zeros, presumably uninitialized, when read in
tree-vect-slp.c:vect_transform_slp_perm_load.  But I don't know enough about
this code to go further with this tonight.

[Bug c++/70653] New: bubble sorting algorithm fail to run on the compiler giving a bug in it

2016-04-13 Thread waleed-rider at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70653

Bug ID: 70653
   Summary: bubble sorting algorithm fail to run on the compiler
giving a bug in it
   Product: gcc
   Version: 3.0.4
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: waleed-rider at hotmail dot com
  Target Milestone: ---

Created attachment 38259
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38259&action=edit
wrong output can't find the bug

[Bug tree-optimization/70130] [6 Regression] h264ref fails with verification error starting with r231674 (r224221 is the true start of the problem)

2016-04-13 Thread wschmidt at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70130

--- Comment #21 from Bill Schmidt  ---
Created attachment 38258
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38258&action=edit
Vectorization dump for r224221

[Bug tree-optimization/70130] [6 Regression] h264ref fails with verification error starting with r231674 (r224221 is the true start of the problem)

2016-04-13 Thread wschmidt at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70130

--- Comment #20 from Bill Schmidt  ---
Created attachment 38257
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38257&action=edit
Vectorization dump for r224220

[Bug bootstrap/70652] [6 Regression] r234966 causes bootstrap to fail

2016-04-13 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70652

H.J. Lu  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-04-14
   Target Milestone|--- |6.0
 Ever confirmed|0   |1

--- Comment #1 from H.J. Lu  ---
GCC was configured with

--with-arch=corei7 --with-cpu=corei7 --prefix=/usr/6.0.0 --enable-clocale=gnu
--with-system-zlib --enable-shared --with-demangler-in-ld --enable-libmpx
--with-fpmath=sse --enable-languages=c,c++,fortran,java,lto,objc

[Bug bootstrap/70652] New: [6 Regression] r234966 causes bootstrap to fail

2016-04-13 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70652

Bug ID: 70652
   Summary: [6 Regression] r234966 causes bootstrap to fail
   Product: gcc
   Version: 6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: bootstrap
  Assignee: unassigned at gcc dot gnu.org
  Reporter: hjl.tools at gmail dot com
CC: msebor at gcc dot gnu.org
  Target Milestone: ---

On Linux/x86-64, r234966 caused:

libtool: link: /export/gnu/import/git/gcc-test-intel64corei7/bld/./gcc/xgcc
-shared-libgcc -B/export/gnu/import/git/gcc-test-intel64corei7/bld/./gcc
-nostdinc++
-L/export/gnu/import/git/gcc-test-intel64corei7/bld/x86_64-pc-linux-gnu/32/libstdc++-v3/src
-L/export/gnu/import/git/gcc-test-intel64corei7/bld/x86_64-pc-linux-gnu/32/libstdc++-v3/src/.libs
-L/export/gnu/import/git/gcc-test-intel64corei7/bld/x86_64-pc-linux-gnu/32/libstdc++-v3/libsupc++/.libs
-B/usr/6.0.0/x86_64-pc-linux-gnu/bin/ -B/usr/6.0.0/x86_64-pc-linux-gnu/lib/
-isystem /usr/6.0.0/x86_64-pc-linux-gnu/include -isystem
/usr/6.0.0/x86_64-pc-linux-gnu/sys-include  -m32  -fPIC -DPIC -shared -nostdlib
/lib/../lib/crti.o
/export/gnu/import/git/gcc-test-intel64corei7/bld/./gcc/32/crtbeginS.o 
.libs/gij.o   -Wl,-rpath
-Wl,/export/gnu/import/git/gcc-test-intel64corei7/bld/x86_64-pc-linux-gnu/32/libjava/.libs
-Wl,-rpath -Wl,/usr/6.0.0/lib/../lib
-L/export/gnu/import/git/gcc-test-intel64corei7/bld/x86_64-pc-linux-gnu/32/libjava/.libs
-L/export/gnu/import/git/gcc-test-intel64corei7/bld/x86_64-pc-linux-gnu/32/libstdc++-v3/src
-L/export/gnu/import/git/gcc-test-intel64corei7/bld/x86_64-pc-linux-gnu/32/libstdc++-v3/src/.libs
-L/export/gnu/import/git/gcc-test-intel64corei7/bld/x86_64-pc-linux-gnu/32/libstdc++-v3/libsupc++/.libs
./.libs/libgcj.so
-L/export/gnu/import/git/gcc-test-intel64corei7/bld/x86_64-pc-linux-gnu/32/libjava
-lpthread -lrt -ldl -lz
-L/export/gnu/import/git/gcc-test-intel64corei7/bld/./gcc/32 -L/lib/../lib
-L/usr/lib/../lib -L/export/gnu/import/git/gcc-test-intel64corei7/bld/./gcc -lc
-lgcc_s /export/gnu/import/git/gcc-test-intel64corei7/bld/./gcc/32/crtendS.o
/lib/../lib/crtn.o  -m32 -m32 -m32 -Wl,-Bsymbolic   -Wl,-soname
-Wl,libgij.so.17 -o .libs/libgij.so.17.0.0
./.libs/libgcj.so: undefined reference to `__cxa_throw_bad_array_length'
collect2: error: ld returned 1 exit status
Makefile:9534: recipe for target 'jv-convert' failed
make[8]: *** [jv-convert] Error 1
make[8]: *** Waiting for unfinished jobs
./.libs/libgcj.so: undefined reference to `__cxa_throw_bad_array_length'
collect2: error: ld returned 1 exit status
Makefile:9481: recipe for target 'gcj-dbtool' failed
make[8]: *** [gcj-dbtool] Error 1

[Bug c/70651] New: ICE on valid code on x86_64-linux-gnu in build_va_arg, at c-family/c-common.c:5728

2016-04-13 Thread su at cs dot ucdavis.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70651

Bug ID: 70651
   Summary: ICE on valid code on x86_64-linux-gnu in build_va_arg,
at c-family/c-common.c:5728
   Product: gcc
   Version: 6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: su at cs dot ucdavis.edu
  Target Milestone: ---

The following code causes an ICE when compiled with the current gcc trunk on
x86_64-linux-gnu in both 32-bit and 64-bit modes.  

It is a regression from 5.3.x. 


$ 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/6.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 6.0.0 20160413 (experimental) [trunk revision 234931] (GCC)
$
$ gcc-5.3 -c small.c
$
$ gcc-trunk -c small.c
small.c: In function ‘fn1’:
small.c:4:3: internal compiler error: in build_va_arg, at
c-family/c-common.c:5728
   __builtin_va_arg (a, char **);
   ^~~~
0x6addfb build_va_arg(unsigned int, tree_node*, tree_node*)
../../gcc-source-trunk/gcc/c-family/c-common.c:5728
0x648643 c_parser_postfix_expression
../../gcc-source-trunk/gcc/c/c-parser.c:7615
0x64ab9a c_parser_unary_expression
../../gcc-source-trunk/gcc/c/c-parser.c:6890
0x64b9aa c_parser_cast_expression
../../gcc-source-trunk/gcc/c/c-parser.c:6719
0x64bbb4 c_parser_binary_expression
../../gcc-source-trunk/gcc/c/c-parser.c:6528
0x64c865 c_parser_conditional_expression
../../gcc-source-trunk/gcc/c/c-parser.c:6299
0x64cee0 c_parser_expr_no_commas
../../gcc-source-trunk/gcc/c/c-parser.c:6216
0x64d5e2 c_parser_expression
../../gcc-source-trunk/gcc/c/c-parser.c:8403
0x64e049 c_parser_expression_conv
../../gcc-source-trunk/gcc/c/c-parser.c:8436
0x66435c c_parser_statement_after_labels
../../gcc-source-trunk/gcc/c/c-parser.c:5272
0x666139 c_parser_compound_statement_nostart
../../gcc-source-trunk/gcc/c/c-parser.c:4856
0x6669ce c_parser_compound_statement
../../gcc-source-trunk/gcc/c/c-parser.c:4692
0x667bf7 c_parser_declaration_or_fndef
../../gcc-source-trunk/gcc/c/c-parser.c:2104
0x670d15 c_parser_external_declaration
../../gcc-source-trunk/gcc/c/c-parser.c:1548
0x6715a9 c_parser_translation_unit
../../gcc-source-trunk/gcc/c/c-parser.c:1429
0x6715a9 c_parse_file()
../../gcc-source-trunk/gcc/c/c-parser.c:17842
0x6d2c52 c_common_parse_file()
../../gcc-source-trunk/gcc/c-family/c-opts.c:1064
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
$


--


void fn1 ()
{ 
  char **a = 0;
  __builtin_va_arg (a, char **);
}

[Bug tree-optimization/70130] [6 Regression] h264ref fails with verification error starting with r231674 (r224221 is the true start of the problem)

2016-04-13 Thread wschmidt at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70130

Bill Schmidt  changed:

   What|Removed |Added

Summary|[6 Regression] h264ref  |[6 Regression] h264ref
   |fails with verification |fails with verification
   |error starting with r231674 |error starting with r231674
   ||(r224221 is the true start
   ||of the problem)

--- Comment #19 from Bill Schmidt  ---
So, bisecting with -fno-vect-cost-model points the finger at
https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=224221.

[Bug bootstrap/70650] bootstrap failure on x86_64 darwin

2016-04-13 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70650

Dominique d'Humieres  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-04-14
 Ever confirmed|0   |1

--- Comment #1 from Dominique d'Humieres  ---
Confirmed at revision r234962:

[Book15] f90/bug% gcc6 /opt/gcc/work/libstdc++-v3/src/c++11/string-inst.cc -O2
-c
In file included from /opt/gcc/gcc6w/include/c++/6.0.0/string:53:0,
 from /opt/gcc/work/libstdc++-v3/src/c++11/string-inst.cc:38:
/opt/gcc/gcc6w/include/c++/6.0.0/bits/basic_string.tcc: In member function
'void std::__cxx11::basic_string<_CharT, _Traits,
_Alloc>::_M_construct(_InIterator, _InIterator, std::forward_iterator_tag)
[with _FwdIterator = char*; _CharT = char; _Traits = std::char_traits;
_Alloc = std::allocator]':
/opt/gcc/gcc6w/include/c++/6.0.0/bits/basic_string.tcc:206:7: internal compiler
error: in emit_move_insn, at expr.c:3546
   basic_string<_CharT, _Traits, _Alloc>::
   ^

[Bug target/64971] [5/6 Regression] gcc.c-torture/compile/pr37433.c ICEs with -mabi=ilp32

2016-04-13 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64971

Jeffrey A. Law  changed:

   What|Removed |Added

 CC||ramana at gcc dot gnu.org

--- Comment #10 from Jeffrey A. Law  ---
Ramana, do you want to give this to someone on your team to wrap up?

[Bug bootstrap/70650] New: bootstrap failure on x86_64 darwin

2016-04-13 Thread howarth.at.gcc at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70650

Bug ID: 70650
   Summary: bootstrap failure on x86_64 darwin
   Product: gcc
   Version: 6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: bootstrap
  Assignee: unassigned at gcc dot gnu.org
  Reporter: howarth.at.gcc at gmail dot com
  Target Milestone: ---

At r234969, the bootstrap of x86_64-apple-darwin15 fails with...

libtool: compile:  /sw/src/fink.build/gcc6-6.0.0-1/darwin_objdir/./gcc/xgcc
-shared-libgcc -B/sw/src/fink.build/gcc6-6.0.0-1/darwin_objdir/./gcc
-nostdinc++
-L/sw/src/fink.build/gcc6-6.0.0-1/darwin_objdir/x86_64-apple-darwin15.5.0/libstdc++-v3/src
-L/sw/src/fink.build/gcc6-6.0.0-1/darwin_objdir/x86_64-apple-darwin15.5.0/libstdc++-v3/src/.libs
-L/sw/src/fink.build/gcc6-6.0.0-1/darwin_objdir/x86_64-apple-darwin15.5.0/libstdc++-v3/libsupc++/.libs
-B/sw/lib/gcc6/x86_64-apple-darwin15.5.0/bin/
-B/sw/lib/gcc6/x86_64-apple-darwin15.5.0/lib/ -isystem
/sw/lib/gcc6/x86_64-apple-darwin15.5.0/include -isystem
/sw/lib/gcc6/x86_64-apple-darwin15.5.0/sys-include
-I/sw/src/fink.build/gcc6-6.0.0-1/gcc-6-20160413/libstdc++-v3/../libgcc
-I/sw/src/fink.build/gcc6-6.0.0-1/darwin_objdir/x86_64-apple-darwin15.5.0/libstdc++-v3/include/x86_64-apple-darwin15.5.0
-I/sw/src/fink.build/gcc6-6.0.0-1/darwin_objdir/x86_64-apple-darwin15.5.0/libstdc++-v3/include
-I/sw/src/fink.build/gcc6-6.0.0-1/gcc-6-20160413/libstdc++-v3/libsupc++
-I/sw/include -I/sw/include -std=gnu++11 -D_GLIBCXX_SHARED
-fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi
-fdiagnostics-show-location=once -fvisibility-inlines-hidden
-ffunction-sections -fdata-sections -frandom-seed=string-inst.lo -g -O2 -c
../../../../../gcc-6-20160413/libstdc++-v3/src/c++11/string-inst.cc 
-fno-common -DPIC -D_GLIBCXX_SHARED -o string-inst.o
In file included from
/sw/src/fink.build/gcc6-6.0.0-1/darwin_objdir/x86_64-apple-darwin15.5.0/libstdc++-v3/include/string:53:0,
 from
../../../../../gcc-6-20160413/libstdc++-v3/src/c++11/string-inst.cc:38:
/sw/src/fink.build/gcc6-6.0.0-1/darwin_objdir/x86_64-apple-darwin15.5.0/libstdc++-v3/include/bits/basic_string.tcc:
In member function ‘void std::__cxx11::basic_string<_CharT, _Traits,
_Alloc>::_M_construct(_InIterator, _InIterator, std::forward_iterator_tag)
[with _FwdIterator = char*; _CharT = char; _Traits = std::char_traits;
_Alloc = std::allocator]’:
/sw/src/fink.build/gcc6-6.0.0-1/darwin_objdir/x86_64-apple-darwin15.5.0/libstdc++-v3/include/bits/basic_string.tcc:206:7:
internal compiler error: in emit_move_insn, at expr.c:3546
   basic_string<_CharT, _Traits, _Alloc>::
   ^
libbacktrace could not find executable to open
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
Makefile:545: recipe for target 'string-inst.lo' failed
make[6]: *** [string-inst.lo] Error 1
make[6]: Leaving directory
'/sw/src/fink.build/gcc6-6.0.0-1/darwin_objdir/x86_64-apple-darwin15.5.0/libstdc++-v3/src/c++11'
Making all in filesystem
make[6]: Entering directory
'/sw/src/fink.build/gcc6-6.0.0-1/darwin_objdir/x86_64-apple-darwin15.5.0/libstdc++-v3/src/filesystem'
make[6]: Nothing to be done for 'all'.
make[6]: Leaving directory
'/sw/src/fink.build/gcc6-6.0.0-1/darwin_objdir/x86_64-apple-darwin15.5.0/libstdc++-v3/src/filesystem'
make[6]: Entering directory
'/sw/src/fink.build/gcc6-6.0.0-1/darwin_objdir/x86_64-apple-darwin15.5.0/libstdc++-v3/src'
make[6]: *** No rule to make target '../src/c++11/libc++11convenience.la',
needed by 'libstdc++-symbols.explist'.  Stop.
make[6]: Leaving directory
'/sw/src/fink.build/gcc6-6.0.0-1/darwin_objdir/x86_64-apple-darwin15.5.0/libstdc++-v3/src'
Makefile:638: recipe for target 'all-recursive' failed
make[5]: *** [all-recursive] Error 1
make[5]: Leaving directory
'/sw/src/fink.build/gcc6-6.0.0-1/darwin_objdir/x86_64-apple-darwin15.5.0/libstdc++-v3/src'
Makefile:507: recipe for target 'all-recursive' failed
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory
'/sw/src/fink.build/gcc6-6.0.0-1/darwin_objdir/x86_64-apple-darwin15.5.0/libstdc++-v3'
Makefile:414: recipe for target 'all' failed
make[3]: *** [all] Error 2
make[3]: Leaving directory
'/sw/src/fink.build/gcc6-6.0.0-1/darwin_objdir/x86_64-apple-darwin15.5.0/libstdc++-v3'
Makefile:12290: recipe for target 'all-stage1-target-libstdc++-v3' failed
make[2]: *** [all-stage1-target-libstdc++-v3] Error 2
make[2]: Leaving directory '/sw/src/fink.build/gcc6-6.0.0-1/darwin_objdir'
Makefile:21196: recipe for target 'stage1-bubble' failed
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory '/sw/src/fink.build/gcc6-6.0.0-1/darwin_objdir'
Makefile:21500: recipe for target 'bootstrap' failed
make: *** [bootstrap] Error 2

[Bug c++/70543] [6 Regression] wrong non-const error for enable_if and constexpr function

2016-04-13 Thread ppalka at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70543

Patrick Palka  changed:

   What|Removed |Added

 CC||ppalka at gcc dot gnu.org

--- Comment #4 from Patrick Palka  ---
Reduced further:

template 
struct X
{
  template 
  static constexpr int
  calc (void)
  {
return 0;
  }

  static constexpr unsigned int value = calc (); // <<<

  char foo[value];
};

[Bug c++/70649] [6 Regression] Incorrect C++ warning on zero-sized array passing

2016-04-13 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70649

H.J. Lu  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-04-14
   Target Milestone|--- |6.0
 Ever confirmed|0   |1

[Bug c++/70649] New: [6 Regression] Incorrect C++ warning on zero-sized array passing

2016-04-13 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70649

Bug ID: 70649
   Summary: [6 Regression] Incorrect C++ warning on zero-sized
array passing
   Product: gcc
   Version: 6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: hjl.tools at gmail dot com
CC: jason at redhat dot com
  Target Milestone: ---

[hjl@gnu-6 pr60336d]$ cat x.i
struct dummy0 { int i; };
struct dummy { struct dummy0 d[0]; };
extern void fun(struct dummy, int);
void
foo (void)
{
  struct dummy d;
  fun(d, 1);
}
[hjl@gnu-6 pr60336d]$ g++ -S -Wabi=9 x.i 
[hjl@gnu-6 pr60336d]$ cat x.s
.file   "x.i"
.text
.globl  _Z3foov
.type   _Z3foov, @function
_Z3foov:
.LFB0:
.cfi_startproc
pushq   %rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
movq%rsp, %rbp
.cfi_def_cfa_register 6
movl$1, %edi
call_Z3fun5dummyi
nop
popq%rbp
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE0:
.size   _Z3foov, .-_Z3foov
.ident  "GCC: (GNU) 5.3.1 20160406 (Red Hat 5.3.1-6)"
.section.note.GNU-stack,"",@progbits
[hjl@gnu-6 pr60336d]$ /export/build/gnu/gcc-x32/build-x86_64-linux/gcc/xg++
-B/export/build/gnu/gcc-x32/build-x86_64-linux/gcc/ -S -Wabi=9 x.i 
x.i: In function ‘void foo()’:
x.i:8:12: warning: call to ‘fun’: empty class ‘dummy’ parameter passing ABI
changes in -fabi-version=10 (GCC 6) [-Wabi]
   fun(d, 1);
^
[hjl@gnu-6 pr60336d]$ cat x.s
.file   "x.i"
.text
.globl  _Z3foov
.type   _Z3foov, @function
_Z3foov:
.LFB0:
.cfi_startproc
pushq   %rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
movq%rsp, %rbp
.cfi_def_cfa_register 6
movl$1, %edi
call_Z3fun5dummyi
nop
popq%rbp
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE0:
.size   _Z3foov, .-_Z3foov
    .ident  "GCC: (GNU) 6.0.0 20160413 (experimental)"
.section.note.GNU-stack,"",@progbits
[hjl@gnu-6 pr60336d]$ 

The warning is incorrect since there is no change in zero-sized array passing.

[Bug c++/16994] [meta-bug] VLA and C++

2016-04-13 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=16994
Bug 16994 depends on bug 70588, which changed state.

Bug 70588 Summary: SIGBUS on a VLA larger than SIZE_MAX / 2
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70588

   What|Removed |Added

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

[Bug c++/70588] SIGBUS on a VLA larger than SIZE_MAX / 2

2016-04-13 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70588

Martin Sebor  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
  Known to work||6.0
 Resolution|--- |FIXED
   Target Milestone|--- |6.0
  Known to fail|6.0 |

--- Comment #8 from Martin Sebor  ---
Fixed in 6.0 by r234966.

[Bug c++/16994] [meta-bug] VLA and C++

2016-04-13 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=16994
Bug 16994 depends on bug 70019, which changed state.

Bug 70019 Summary: VLA size overflow not detected
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70019

   What|Removed |Added

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

[Bug c++/70019] VLA size overflow not detected

2016-04-13 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70019

Martin Sebor  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
  Known to work||6.0
 Resolution|--- |FIXED
   Target Milestone|--- |6.0
  Known to fail||5.3.0

--- Comment #5 from Martin Sebor  ---
Fixed in 6.0 by r234966.

[Bug c++/69517] [5 regression] SEGV on a VLA with excess initializer elements

2016-04-13 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69517

Martin Sebor  changed:

   What|Removed |Added

  Known to work||4.9.3, 6.0
Summary|[5/6 regression] SEGV on a  |[5 regression] SEGV on a
   |VLA with excess initializer |VLA with excess initializer
   |elements|elements
  Known to fail|6.0 |

--- Comment #10 from Martin Sebor  ---
Fixed in 6.0 by r234966.

[Bug c++/69517] [5/6 regression] SEGV on a VLA with excess initializer elements

2016-04-13 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69517

--- Comment #9 from Martin Sebor  ---
Author: msebor
Date: Wed Apr 13 23:26:41 2016
New Revision: 234966

URL: https://gcc.gnu.org/viewcvs?rev=234966&root=gcc&view=rev
Log:
PR c++/69517 - [5/6 regression] SEGV on a VLA with excess initializer elements
PR c++/70019 - VLA size overflow not detected
PR c++/70588 - SIGBUS on a VLA larger than SIZE_MAX / 2

gcc/testsuite/ChangeLog:
2016-04-13  Martin Sebor  

PR c++/69517
PR c++/70019
PR c++/70588
* c-c++-common/ubsan/vla-1.c (main): Catch exceptions.
* g++.dg/cpp1y/vla11.C: New test.
* g++.dg/cpp1y/vla12.C: New test.
* g++.dg/cpp1y/vla13.C: New test.
* g++.dg/cpp1y/vla14.C: New test.
* g++.dg/cpp1y/vla3.C: Restore deleted test.
* gcc/testsuite/g++.dg/init/array24.C: Fully brace VLA initializer.
* g++.dg/ubsan/vla-1.C: Disable exceptions.

gcc/cp/ChangeLog:
2016-04-13  Martin Sebor  

PR c++/69517
PR c++/70019
PR c++/70588
* cp-tree.h (throw_bad_array_length, build_vla_check): Declare new
functions.
* decl.c (check_initializer, cp_finish_decl): Call them.
(reshape_init_r): Reject incompletely braced intializer-lists
for VLAs.
* init.c (throw_bad_array_length, build_vla_check)
(build_vla_size_check, build_vla_init_check): Define new functions.
* typeck2.c (split_nonconstant_init_1): Use variably_modified_type_p()
to detect a VLA.
(store_init_value): Same.

gcc/doc/ChangeLog:
2016-04-13  Martin Sebor  

PR c++/69517
PR c++/70019
PR c++/70588
* extend.texi (Variable Length): Document C++ specifics.

libstdc++-v3/ChangeLog:
2016-04-13  Martin Sebor  

PR c++/69517
* testsuite/25_algorithms/rotate/moveable2.cc: Make sure VLA
   upper bound is positive.

Added:
trunk/gcc/testsuite/g++.dg/cpp1y/vla11.C
trunk/gcc/testsuite/g++.dg/cpp1y/vla12.C
trunk/gcc/testsuite/g++.dg/cpp1y/vla13.C
trunk/gcc/testsuite/g++.dg/cpp1y/vla14.C
trunk/gcc/testsuite/g++.dg/cpp1y/vla3.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/cp-tree.h
trunk/gcc/cp/decl.c
trunk/gcc/cp/init.c
trunk/gcc/cp/typeck2.c
trunk/gcc/doc/extend.texi
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/c-c++-common/ubsan/vla-1.c
trunk/gcc/testsuite/g++.dg/init/array24.C
trunk/gcc/testsuite/g++.dg/ubsan/vla-1.C
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/testsuite/25_algorithms/rotate/moveable2.cc

[Bug c++/70588] SIGBUS on a VLA larger than SIZE_MAX / 2

2016-04-13 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70588

--- Comment #7 from Martin Sebor  ---
Author: msebor
Date: Wed Apr 13 23:26:41 2016
New Revision: 234966

URL: https://gcc.gnu.org/viewcvs?rev=234966&root=gcc&view=rev
Log:
PR c++/69517 - [5/6 regression] SEGV on a VLA with excess initializer elements
PR c++/70019 - VLA size overflow not detected
PR c++/70588 - SIGBUS on a VLA larger than SIZE_MAX / 2

gcc/testsuite/ChangeLog:
2016-04-13  Martin Sebor  

PR c++/69517
PR c++/70019
PR c++/70588
* c-c++-common/ubsan/vla-1.c (main): Catch exceptions.
* g++.dg/cpp1y/vla11.C: New test.
* g++.dg/cpp1y/vla12.C: New test.
* g++.dg/cpp1y/vla13.C: New test.
* g++.dg/cpp1y/vla14.C: New test.
* g++.dg/cpp1y/vla3.C: Restore deleted test.
* gcc/testsuite/g++.dg/init/array24.C: Fully brace VLA initializer.
* g++.dg/ubsan/vla-1.C: Disable exceptions.

gcc/cp/ChangeLog:
2016-04-13  Martin Sebor  

PR c++/69517
PR c++/70019
PR c++/70588
* cp-tree.h (throw_bad_array_length, build_vla_check): Declare new
functions.
* decl.c (check_initializer, cp_finish_decl): Call them.
(reshape_init_r): Reject incompletely braced intializer-lists
for VLAs.
* init.c (throw_bad_array_length, build_vla_check)
(build_vla_size_check, build_vla_init_check): Define new functions.
* typeck2.c (split_nonconstant_init_1): Use variably_modified_type_p()
to detect a VLA.
(store_init_value): Same.

gcc/doc/ChangeLog:
2016-04-13  Martin Sebor  

PR c++/69517
PR c++/70019
PR c++/70588
* extend.texi (Variable Length): Document C++ specifics.

libstdc++-v3/ChangeLog:
2016-04-13  Martin Sebor  

PR c++/69517
* testsuite/25_algorithms/rotate/moveable2.cc: Make sure VLA
   upper bound is positive.

Added:
trunk/gcc/testsuite/g++.dg/cpp1y/vla11.C
trunk/gcc/testsuite/g++.dg/cpp1y/vla12.C
trunk/gcc/testsuite/g++.dg/cpp1y/vla13.C
trunk/gcc/testsuite/g++.dg/cpp1y/vla14.C
trunk/gcc/testsuite/g++.dg/cpp1y/vla3.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/cp-tree.h
trunk/gcc/cp/decl.c
trunk/gcc/cp/init.c
trunk/gcc/cp/typeck2.c
trunk/gcc/doc/extend.texi
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/c-c++-common/ubsan/vla-1.c
trunk/gcc/testsuite/g++.dg/init/array24.C
trunk/gcc/testsuite/g++.dg/ubsan/vla-1.C
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/testsuite/25_algorithms/rotate/moveable2.cc

[Bug c++/70019] VLA size overflow not detected

2016-04-13 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70019

--- Comment #4 from Martin Sebor  ---
Author: msebor
Date: Wed Apr 13 23:26:41 2016
New Revision: 234966

URL: https://gcc.gnu.org/viewcvs?rev=234966&root=gcc&view=rev
Log:
PR c++/69517 - [5/6 regression] SEGV on a VLA with excess initializer elements
PR c++/70019 - VLA size overflow not detected
PR c++/70588 - SIGBUS on a VLA larger than SIZE_MAX / 2

gcc/testsuite/ChangeLog:
2016-04-13  Martin Sebor  

PR c++/69517
PR c++/70019
PR c++/70588
* c-c++-common/ubsan/vla-1.c (main): Catch exceptions.
* g++.dg/cpp1y/vla11.C: New test.
* g++.dg/cpp1y/vla12.C: New test.
* g++.dg/cpp1y/vla13.C: New test.
* g++.dg/cpp1y/vla14.C: New test.
* g++.dg/cpp1y/vla3.C: Restore deleted test.
* gcc/testsuite/g++.dg/init/array24.C: Fully brace VLA initializer.
* g++.dg/ubsan/vla-1.C: Disable exceptions.

gcc/cp/ChangeLog:
2016-04-13  Martin Sebor  

PR c++/69517
PR c++/70019
PR c++/70588
* cp-tree.h (throw_bad_array_length, build_vla_check): Declare new
functions.
* decl.c (check_initializer, cp_finish_decl): Call them.
(reshape_init_r): Reject incompletely braced intializer-lists
for VLAs.
* init.c (throw_bad_array_length, build_vla_check)
(build_vla_size_check, build_vla_init_check): Define new functions.
* typeck2.c (split_nonconstant_init_1): Use variably_modified_type_p()
to detect a VLA.
(store_init_value): Same.

gcc/doc/ChangeLog:
2016-04-13  Martin Sebor  

PR c++/69517
PR c++/70019
PR c++/70588
* extend.texi (Variable Length): Document C++ specifics.

libstdc++-v3/ChangeLog:
2016-04-13  Martin Sebor  

PR c++/69517
* testsuite/25_algorithms/rotate/moveable2.cc: Make sure VLA
   upper bound is positive.

Added:
trunk/gcc/testsuite/g++.dg/cpp1y/vla11.C
trunk/gcc/testsuite/g++.dg/cpp1y/vla12.C
trunk/gcc/testsuite/g++.dg/cpp1y/vla13.C
trunk/gcc/testsuite/g++.dg/cpp1y/vla14.C
trunk/gcc/testsuite/g++.dg/cpp1y/vla3.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/cp-tree.h
trunk/gcc/cp/decl.c
trunk/gcc/cp/init.c
trunk/gcc/cp/typeck2.c
trunk/gcc/doc/extend.texi
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/c-c++-common/ubsan/vla-1.c
trunk/gcc/testsuite/g++.dg/init/array24.C
trunk/gcc/testsuite/g++.dg/ubsan/vla-1.C
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/testsuite/25_algorithms/rotate/moveable2.cc

[Bug target/70640] IEEE 128-bit floating point negative/abs has two thinkos

2016-04-13 Thread meissner at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70640

Michael Meissner  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |---

--- Comment #3 from Michael Meissner  ---
Test pr70640 fails on power7 system without power8 assembler.

[Bug c/70646] Corrupt truncated function

2016-04-13 Thread mednafen at sent dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70646

mednafen at sent dot com changed:

   What|Removed |Added

 CC||mednafen at sent dot com

--- Comment #7 from mednafen at sent dot com ---
Following code aborts on x86_64 4.9.2 and 5.3.0 at -O2, at least:

#pragma GCC optimize("no-unit-at-a-time")

typedef unsigned char u8;
typedef unsigned long long u64;

static inline __attribute__((always_inline)) u64 __swab64p(const u64 *p)
{
 return (__builtin_constant_p((u64)(*p)) ? ((u64)( (((u64)(*p) &
(u64)0x00ffULL) << 56) | (((u64)(*p) & (u64)0xff00ULL)
<< 40) | (((u64)(*p) & (u64)0x00ffULL) << 24) | (((u64)(*p) &
(u64)0xff00ULL) << 8) | (((u64)(*p) & (u64)0x00ffULL)
>> 8) | (((u64)(*p) & (u64)0xff00ULL) >> 24) | (((u64)(*p) &
(u64)0x00ffULL) >> 40) | (((u64)(*p) & (u64)0xff00ULL)
>> 56))) : __builtin_bswap64(*p));
}

static inline u64 wwn_to_u64(void *wwn)
{
 return __swab64p(wwn);
}

void __attribute__((noinline,noclone)) broken(u64* shost)
{
 u8 node_name[8] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF};
 *shost = wwn_to_u64(node_name);
}

void __attribute__((noinline,noclone)) dummy(void)
{
 __builtin_abort();
}

int main(int argc, char* argv[])
{
 u64 v;

 broken(&v);

 if(v != (u64)-1)
  __builtin_abort();

 return 0;
}

[Bug c++/19808] miss a warning about uninitialized member usage in member initializer list in constructor

2016-04-13 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19808

Manuel López-Ibáñez  changed:

   What|Removed |Added

 CC||matt at godbolt dot org

--- Comment #30 from Manuel López-Ibáñez  ---
*** Bug 70647 has been marked as a duplicate of this bug. ***

[Bug c++/70647] Feature request: warning for self-moving in constructors

2016-04-13 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70647

Manuel López-Ibáñez  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 CC||manu at gcc dot gnu.org
 Resolution|--- |DUPLICATE

--- Comment #1 from Manuel López-Ibáñez  ---
(In reply to Matt Godbolt from comment #0)
> In the move case, there's no such warning. I appreciate this is probably
> difficult (if not impossible) to detect, but if there's any way it can be
> done, it would save a painful debugging session or two!

I don't think "move" has anything to do with this. If you use "a + 1" or
"foo(a)", you are still initializing "a" with an uninitialized value.

In that sense, this is what PR19808 is about, for which there is a patch but,
sadly, nobody has had so far the time or interest to finish it and properly
submit it.

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

[Bug c++/70648] [6 Regression] adplug-xmms fails to compile

2016-04-13 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70648

Jakub Jelinek  changed:

   What|Removed |Added

   Target Milestone|--- |6.0

[Bug c++/70648] New: [6 Regression] adplug-xmms fails to compile

2016-04-13 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70648

Bug ID: 70648
   Summary: [6 Regression] adplug-xmms fails to compile
   Product: gcc
   Version: 6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: jakub at gcc dot gnu.org
CC: jason at gcc dot gnu.org
  Target Milestone: ---

template  struct C
{
  template 
  constexpr C (...) : c { static_cast(0)... } {}
  constexpr const V &operator[](T) { return c[0]; }
  V c[T::F];
};
enum D { E, F };
struct A
{
  struct G
  {
typedef int *H;
int g, h;
C i;
constexpr G () : g (), h (), i{} {}
constexpr G foo (H) { return G (0, 0, 0, 0, i[E]); }
constexpr G (int, int, H, H, H) : g (), h (), i{} {}
  };
};
struct B : A
{
  static constexpr auto b = G ().foo (0);
};

fails to compile with -std=c++11, starting with r234013.  No idea whether the
error is valid or not, and perhaps the reduced testcase also doesn't exactly
match the original, I've been reducing on accepted by r234009, rejected by
r234013.

[Bug c++/70641] [5 Regression] ICE on valid code at -O1 and above on x86_64-linux-gnu: verify_gimple failed

2016-04-13 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70641

Jakub Jelinek  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |jakub at gcc dot gnu.org
Summary|[5/6 Regression] ICE on |[5 Regression] ICE on valid
   |valid code at -O1 and above |code at -O1 and above on
   |on x86_64-linux-gnu:|x86_64-linux-gnu:
   |verify_gimple failed|verify_gimple failed

--- Comment #5 from Jakub Jelinek  ---
Should be fixed on the trunk so far.

[Bug c++/70594] [6 Regression] -fcompare-debug failure

2016-04-13 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70594

--- Comment #36 from Jakub Jelinek  ---
Tobias said he still sees some -fcompare-debug issue even with both of these
patches, so not closing this yet.

[Bug c++/70641] [5/6 Regression] ICE on valid code at -O1 and above on x86_64-linux-gnu: verify_gimple failed

2016-04-13 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70641

--- Comment #4 from Jakub Jelinek  ---
Author: jakub
Date: Wed Apr 13 20:43:10 2016
New Revision: 234962

URL: https://gcc.gnu.org/viewcvs?rev=234962&root=gcc&view=rev
Log:
PR c++/70641
* ipa-pure-const.c (pass_nothrow::execute): Call maybe_clean_eh_stmt
on all recursive call stmts.  Return TODO_cleanup_cfg if any dead
eh edges have been purged.

* g++.dg/opt/pr70641.C: New test.

Added:
trunk/gcc/testsuite/g++.dg/opt/pr70641.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/ipa-pure-const.c
trunk/gcc/testsuite/ChangeLog

[Bug c++/70594] [6 Regression] -fcompare-debug failure

2016-04-13 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70594

--- Comment #35 from Jakub Jelinek  ---
Author: jakub
Date: Wed Apr 13 20:35:59 2016
New Revision: 234961

URL: https://gcc.gnu.org/viewcvs?rev=234961&root=gcc&view=rev
Log:
PR c++/70594
* tree-sra.c (create_access_replacement,
get_replaced_param_substitute): Set DECL_NAMELESS on repl if it
gets fancy name.
* tree-pretty-print.c (dump_fancy_name): New function.
(dump_decl_name, dump_generic_node): Use it.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/tree-pretty-print.c
trunk/gcc/tree-sra.c

[Bug c++/70647] New: Feature request: warning for self-moving in constructors

2016-04-13 Thread matt at godbolt dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70647

Bug ID: 70647
   Summary: Feature request: warning for self-moving in
constructors
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: enhancement
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: matt at godbolt dot org
  Target Milestone: ---

Consider the following code:

#include  // for std::move
struct A {
  int a; int b;

  A(A &&o) 
: a(a), // I get a warning here...
  b(o.b) {}  
};
struct B { 
  int a; int b; 
  B(B &&o) 
: a(std::move(a)),  // but sadly not here
  b(std::move(o.b)) {}
};

[ c.f https://godbolt.org/g/v7zPYL ]

In the non-moving case, I get a warning that I've typoed and assigned a with
itself.

In the move case, there's no such warning. I appreciate this is probably
difficult (if not impossible) to detect, but if there's any way it can be done,
it would save a painful debugging session or two!

[Bug c/70646] Corrupt truncated function

2016-04-13 Thread vda.linux at googlemail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70646

--- Comment #6 from Denis Vlasenko  ---
I can collapse the chain of inlines down to this and still see the bug.
Removing "__attribute__((always_inline))", or merging __swab64p() and
wwn_to_u64(), makes bug disappear.


typedef unsigned char u8;
typedef unsigned int u32;
typedef unsigned long long u64;
static inline __attribute__((always_inline)) u64 __swab64p(const u64 *p)
{
 return (__builtin_constant_p((u64)(*p)) ? ((u64)( (((u64)(*p) &
(u64)0x00ffULL) << 56) | (((u64)(*p) & (u64)0xff00ULL)
<< 40) | (((u64)(*p) & (u64)0x00ffULL) << 24) | (((u64)(*p) &
(u64)0xff00ULL) << 8) | (((u64)(*p) & (u64)0x00ffULL)
>> 8) | (((u64)(*p) & (u64)0xff00ULL) >> 24) | (((u64)(*p) &
(u64)0x00ffULL) >> 40) | (((u64)(*p) & (u64)0xff00ULL)
>> 56))) : __builtin_bswap64(*p));
}
static inline u64 wwn_to_u64(void *wwn)
{
 return __swab64p(wwn);
}

struct Scsi_Host {
 void *shost_data;
 unsigned long hostdata[0];
};
static inline void *shost_priv(struct Scsi_Host *shost)
{
 return (void *)shost->hostdata;
}
typedef struct scsi_qla_host {
 u8 fabric_node_name[8];
 u32 device_flags;
} scsi_qla_host_t;
struct fc_host_attrs {
 u64 fabric_name;
};

static void
qla2x00_get_host_fabric_name(struct Scsi_Host *shost)
{
 scsi_qla_host_t *vha = shost_priv(shost);
 u8 node_name[8] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF};
 u64 fabric_name = wwn_to_u64(node_name);
 if (vha->device_flags & 0x1)
  fabric_name = wwn_to_u64(vha->fabric_node_name);
 (((struct fc_host_attrs *)(shost)->shost_data)->fabric_name) = fabric_name;
}

void *get_host_fabric_name = qla2x00_get_host_fabric_name;

[Bug c/70646] Corrupt truncated function

2016-04-13 Thread vda.linux at googlemail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70646

--- Comment #5 from Denis Vlasenko  ---
Even smaller reproducer.

Bug disappears if "__attribute__((always_inline))" is removed everywhere.


typedef unsigned char u8;
typedef unsigned int u32;
typedef unsigned long long u64;
static inline __attribute__((__const__)) u64 __fswab64(u64 val)
{
 return __builtin_bswap64(val);
}
static inline __attribute__((always_inline)) u64 __swab64p(const u64 *p)
{
 return (__builtin_constant_p((u64)(*p)) ? ((u64)( (((u64)(*p) &
(u64)0x00ffULL) << 56) | (((u64)(*p) & (u64)0xff00ULL)
<< 40) | (((u64)(*p) & (u64)0x00ffULL) << 24) | (((u64)(*p) &
(u64)0xff00ULL) << 8) | (((u64)(*p) & (u64)0x00ffULL)
>> 8) | (((u64)(*p) & (u64)0xff00ULL) >> 24) | (((u64)(*p) &
(u64)0x00ffULL) >> 40) | (((u64)(*p) & (u64)0xff00ULL)
>> 56))) : __fswab64(*p));
}
static inline __attribute__((always_inline)) u64 __be64_to_cpup(const u64 *p)
{
 return __swab64p((u64 *)p);
}
static inline __attribute__((always_inline)) u64 get_unaligned_be64(const void
*p)
{
 return __be64_to_cpup((u64 *)p);
}
static inline u64 wwn_to_u64(u8 *wwn)
{
 return get_unaligned_be64(wwn);
}

struct Scsi_Host {
 void *shost_data;
 unsigned long hostdata[0];
};
static inline void *shost_priv(struct Scsi_Host *shost)
{
 return (void *)shost->hostdata;
}
typedef struct scsi_qla_host {
 u8 fabric_node_name[8];
 u32 device_flags;
} scsi_qla_host_t;
struct fc_host_attrs {
 u64 fabric_name;
};

static void
qla2x00_get_host_fabric_name(struct Scsi_Host *shost)
{
 scsi_qla_host_t *vha = shost_priv(shost);
 u8 node_name[8] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF};
 u64 fabric_name = wwn_to_u64(node_name);
 if (vha->device_flags & 0x1)
  fabric_name = wwn_to_u64(vha->fabric_node_name);
 (((struct fc_host_attrs *)(shost)->shost_data)->fabric_name) = fabric_name;
}

void *get_host_fabric_name = qla2x00_get_host_fabric_name;

[Bug c/70646] Corrupt truncated function

2016-04-13 Thread vda.linux at googlemail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70646

--- Comment #4 from Denis Vlasenko  ---
Shorter reproducer:

typedef __signed__ char __s8;
typedef unsigned char __u8;
typedef __signed__ short __s16;
typedef unsigned short __u16;
typedef __signed__ int __s32;
typedef unsigned int __u32;
__extension__ typedef __signed__ long long __s64;
__extension__ typedef unsigned long long __u64;
typedef signed char s8;
typedef unsigned char u8;
typedef signed short s16;
typedef unsigned short u16;
typedef signed int s32;
typedef unsigned int u32;
typedef signed long long s64;
typedef unsigned long long u64;
typedef __u64 __be64;
static inline __attribute__((no_instrument_function))
__attribute__((__const__)) __u64 __fswab64(__u64 val)
{
 return __builtin_bswap64(val);
}
static inline __attribute__((no_instrument_function))
__attribute__((always_inline)) __u64 __swab64p(const __u64 *p)
{
 return (__builtin_constant_p((__u64)(*p)) ? ((__u64)( (((__u64)(*p) &
(__u64)0x00ffULL) << 56) | (((__u64)(*p) &
(__u64)0xff00ULL) << 40) | (((__u64)(*p) &
(__u64)0x00ffULL) << 24) | (((__u64)(*p) &
(__u64)0xff00ULL) << 8) | (((__u64)(*p) &
(__u64)0x00ffULL) >> 8) | (((__u64)(*p) &
(__u64)0xff00ULL) >> 24) | (((__u64)(*p) &
(__u64)0x00ffULL) >> 40) | (((__u64)(*p) &
(__u64)0xff00ULL) >> 56))) : __fswab64(*p));
}
static inline __attribute__((no_instrument_function))
__attribute__((always_inline)) __u64 __be64_to_cpup(const __be64 *p)
{
 return __swab64p((__u64 *)p);
}
static inline __attribute__((no_instrument_function))
__attribute__((always_inline)) u64 get_unaligned_be64(const void *p)
{
 return __be64_to_cpup((__be64 *)p);
}
static inline __attribute__((no_instrument_function)) u64 wwn_to_u64(u8 *wwn)
{
 return get_unaligned_be64(wwn);
}

struct Scsi_Host {
 unsigned long base;
 unsigned long io_port;
 unsigned char n_io_port;
 unsigned char dma_channel;
 unsigned int irq;
 void *shost_data;
 unsigned long hostdata[0]
  __attribute__ ((aligned (sizeof(unsigned long;
};
static inline __attribute__((no_instrument_function)) void *shost_priv(struct
Scsi_Host *shost)
{
 return (void *)shost->hostdata;
}
typedef struct scsi_qla_host {
 u8 fabric_node_name[8];
 u32 device_flags;
} scsi_qla_host_t;
struct fc_host_attrs {
 u64 node_name;
 u64 port_name;
 u64 permanent_port_name;
 u32 supported_classes;
 u8 supported_fc4s[32];
 u32 supported_speeds;
 u32 maxframe_size;
 u16 max_npiv_vports;
 char serial_number[80];
 char manufacturer[80];
 char model[256];
 char model_description[256];
 char hardware_version[64];
 char driver_version[64];
 char firmware_version[64];
 char optionrom_version[64];
 u32 port_id;
 u8 active_fc4s[32];
 u32 speed;
 u64 fabric_name;
};

static void
qla2x00_get_host_fabric_name(struct Scsi_Host *shost)
{
 scsi_qla_host_t *vha = shost_priv(shost);
 u8 node_name[8] = { 0xFF, 0xFF, 0xFF, 0xFF,
  0xFF, 0xFF, 0xFF, 0xFF};
 u64 fabric_name = wwn_to_u64(node_name);

 if (vha->device_flags & 0x1)
  fabric_name = wwn_to_u64(vha->fabric_node_name);

 (((struct fc_host_attrs *)(shost)->shost_data)->fabric_name) = fabric_name;
}

void *get_host_fabric_name = qla2x00_get_host_fabric_name;

[Bug c/70646] Corrupt truncated function

2016-04-13 Thread vda.linux at googlemail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70646

Denis Vlasenko  changed:

   What|Removed |Added

 CC||vda.linux at googlemail dot com

--- Comment #3 from Denis Vlasenko  ---
I can reproduce it with:

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/5.3.1/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --enable-bootstrap
--enable-languages=c,c++,objc,obj-c++,fortran,ada,go,lto --prefix=/usr
--mandir=/usr/share/man --infodir=/usr/share/info
--with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared
--enable-threads=posix --enable-checking=release --enable-multilib
--with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions
--enable-gnu-unique-object --enable-linker-build-id
--with-linker-hash-style=gnu --enable-plugin --enable-initfini-array
--disable-libgcj --with-isl --enable-libmpx --enable-gnu-indirect-function
--with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 5.3.1 20160406 (Red Hat 5.3.1-6) (GCC) 

No fancy compiler flags are necessary to thigger it.

Without "-fno-omit-frame-pointer", function loses its two remaining insns, I
see an empty body:

.type   qla2x00_get_host_fabric_name, @function
qla2x00_get_host_fabric_name:
.LFB4504:
.cfi_startproc
.cfi_endproc
.LFE4504:
.size   qla2x00_get_host_fabric_name, .-qla2x00_get_host_fabric_name

Simple "gcc -Os qla_attr.i.c -S" would do.

gcc -O2 produces a normally-looking function.

[Bug testsuite/68242] FAIL: libgomp.oacc-c-c++-common/reduction-2.c, and other OpenACC reduction test case "oddities"

2016-04-13 Thread cesar at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68242

cesar at gcc dot gnu.org changed:

   What|Removed |Added

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

--- Comment #8 from cesar at gcc dot gnu.org ---
Fixed in r234957.

[Bug testsuite/68242] FAIL: libgomp.oacc-c-c++-common/reduction-2.c, and other OpenACC reduction test case "oddities"

2016-04-13 Thread cesar at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68242

--- Comment #7 from cesar at gcc dot gnu.org ---
Author: cesar
Date: Wed Apr 13 18:54:41 2016
New Revision: 234957

URL: https://gcc.gnu.org/viewcvs?rev=234957&root=gcc&view=rev
Log:
libgomp/
PR testsuite/68242
* testsuite/libgomp.oacc-c-c++-common/reduction-1.c: Adjust test.
* testsuite/libgomp.oacc-c-c++-common/reduction-2.c: Likewise.


Modified:
trunk/libgomp/ChangeLog
trunk/libgomp/testsuite/libgomp.oacc-c-c++-common/reduction-1.c
trunk/libgomp/testsuite/libgomp.oacc-c-c++-common/reduction-2.c

[Bug target/70568] [4.9/5/6 regression] PowerPC64: union of floating and fixed doesn't use POWER8 GPR/VSR moves

2016-04-13 Thread acsawdey at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70568

acsawdey at gcc dot gnu.org changed:

   What|Removed |Added

 CC||vmakarov at gcc dot gnu.org
Summary|PowerPC64: union of |[4.9/5/6 regression]
   |floating and fixed doesn't  |PowerPC64: union of
   |use POWER8 GPR/VSR moves|floating and fixed doesn't
   ||use POWER8 GPR/VSR moves

--- Comment #3 from acsawdey at gcc dot gnu.org ---
Tracked this back to 210824, and in particular this change:

@@ -860,10 +897,15 @@
}
}

- /* If the alternative actually allows memory, make
-things a bit cheaper since we won't need an extra
-insn to load it.  */
- if (op_class != NO_REGS)
+ if (op_class == NO_REGS)
+   /* Although we don't need insn to reload from
+  memory, still accessing memory is usually more
+  expensive than a register.  */
+   pp->mem_cost = frequency;
+ else
+   /* If the alternative actually allows memory, make
+  things a bit cheaper since we won't need an
+  extra insn to load it.  */
pp->mem_cost
  = ((out_p ? ira_memory_move_cost[mode][op_class][0] : 0)
 + (in_p ? ira_memory_move_cost[mode][op_class][1] : 0)

Without this change, you get this from IRA costs:

a0 (r157,l0) best GENERAL_REGS, allocno GENERAL_REGS
a0(r157,l0) costs: BASE_REGS:4000,4000 GENERAL_REGS:4000,4000
LINK_REGS:16000,16000 CTR_REGS:16000,16000 LINK_OR_CTR_REGS:16000,16000
SPEC_OR_GEN_REGS:16000,16000 MEM:4000,4000

and we pick the pattern for xscvdpspn. 

With the change, you get

a0 (r157,l0) best NO_REGS, allocno NO_REGS
a0(r157,l0) costs: BASE_REGS:3000,3000 GENERAL_REGS:3000,3000
LINK_REGS:15000,15000 CTR_REGS:15000,15000 LINK_OR_CTR_REGS:15000,15000
SPEC_OR_GEN_REGS:15000,15000 MEM:2000,2000

And this gets done via memory instead of the register moves.

[Bug c++/70627] [6 Regression] internal compiler error: verify_type failed

2016-04-13 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70627

Jason Merrill  changed:

   What|Removed |Added

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

--- Comment #9 from Jason Merrill  ---
Fixed.

[Bug c++/70627] [6 Regression] internal compiler error: verify_type failed

2016-04-13 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70627

--- Comment #8 from Jason Merrill  ---
Author: jason
Date: Wed Apr 13 18:32:11 2016
New Revision: 234956

URL: https://gcc.gnu.org/viewcvs?rev=234956&root=gcc&view=rev
Log:
PR c++/70627

* decl.c (start_enum): Don't change an existing ENUM_UNDERLYING_TYPE.

Added:
trunk/gcc/testsuite/g++.dg/cpp0x/enum_base3.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/decl.c

[Bug rtl-optimization/68749] FAIL: gcc.dg/ifcvt-4.c scan-rtl-dump ce1 "2 true changes made"

2016-04-13 Thread ro at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68749

--- Comment #9 from Rainer Orth  ---
SPARC V9 part fixed for 6.1.

[Bug rtl-optimization/68749] FAIL: gcc.dg/ifcvt-4.c scan-rtl-dump ce1 "2 true changes made"

2016-04-13 Thread ro at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68749

--- Comment #8 from Rainer Orth  ---
Author: ro
Date: Wed Apr 13 18:13:31 2016
New Revision: 234955

URL: https://gcc.gnu.org/viewcvs?rev=234955&root=gcc&view=rev
Log:
Fix gcc.dg/ifcvt-4.c on 64-bit SPARC (PR rtl-optimization/68749)

PR rtl-optimization/68749
* gcc.dg/ifcvt-4.c: Use "word_mode" rather than "int" to limit the
effects of argument promotions.
Remove default args to dg-skip-if.

Modified:
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.dg/ifcvt-4.c

[Bug target/65344] Exception is not catched on AIX - class with more ancestors, virtual method throws

2016-04-13 Thread jezz at hkfree dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65344

Miroslav Jezbera  changed:

   What|Removed |Added

Version|4.8.3   |5.3.1

--- Comment #1 from Miroslav Jezbera  ---
Reproduced also in version 5.3.1.

[Bug bootstrap/70173] make distclean: leaves stage_final and libcc1/compiler-name.h

2016-04-13 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70173

--- Comment #7 from Segher Boessenkool  ---
Author: segher
Date: Wed Apr 13 18:02:08 2016
New Revision: 234954

URL: https://gcc.gnu.org/viewcvs?rev=234954&root=gcc&view=rev
Log:
Make distclean clean up more (PR70173)

Currently, distclean does not remove the libcc1, gnattools, and gotools
directories, and not the stage_final file either.  Fix that.


PR bootstrap/70173
* Makefile.tpl (local-distclean): Delete the libcc1, gnattools,
and gotools directories.  Delete the stage_final file.
* Makefile.in: Regenerate.

Modified:
trunk/ChangeLog
trunk/Makefile.in
trunk/Makefile.tpl

[Bug c++/70635] [4.9/5 Regression] ICE on (and rejects) valid code on x86_64-linux-gnu: Segmentation fault (program cc1plus)

2016-04-13 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70635

Paolo Carlini  changed:

   What|Removed |Added

Summary|[4.9/5/6 Regression] ICE on |[4.9/5 Regression] ICE on
   |(and rejects) valid code on |(and rejects) valid code on
   |x86_64-linux-gnu:   |x86_64-linux-gnu:
   |Segmentation fault (program |Segmentation fault (program
   |cc1plus)|cc1plus)

--- Comment #5 from Paolo Carlini  ---
Fixed in trunk so far.

[Bug c++/70635] [4.9/5/6 Regression] ICE on (and rejects) valid code on x86_64-linux-gnu: Segmentation fault (program cc1plus)

2016-04-13 Thread paolo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70635

--- Comment #4 from paolo at gcc dot gnu.org  ---
Author: paolo
Date: Wed Apr 13 17:11:03 2016
New Revision: 234953

URL: https://gcc.gnu.org/viewcvs?rev=234953&root=gcc&view=rev
Log:
/cp
2016-04-13  Paolo Carlini  

PR c++/70635
* pt.c (resolve_typename_type): Fix typos in infinite recursion
avoidance mechanism.

/testsuite
2016-04-13  Paolo Carlini  

PR c++/70635
* g++.dg/parse/pr70635.C: New.

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

[Bug rtl-optimization/70461] [6 Regression] Performance regression after r234527

2016-04-13 Thread afomin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70461

Alexander Fomin  changed:

   What|Removed |Added

 Status|RESOLVED|CLOSED

--- Comment #6 from Alexander Fomin  ---
Please consider my previous comment irrelevant.
I close this one, thanks.

[Bug c++/70639] internal compiler error: in guard_tinfo_to_string, at c-family/c-indentation.c:560

2016-04-13 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70639

--- Comment #5 from Marek Polacek  ---
Author: mpolacek
Date: Wed Apr 13 16:28:46 2016
New Revision: 234952

URL: https://gcc.gnu.org/viewcvs?rev=234952&root=gcc&view=rev
Log:
PR c++/70639
* c-indentation.c (should_warn_for_misleading_indentation): Bail out
for switch statements, too.

* c-c++-common/Wmisleading-indentation-4.c: New test.

Added:
trunk/gcc/testsuite/c-c++-common/Wmisleading-indentation-4.c
Modified:
trunk/gcc/c-family/ChangeLog
trunk/gcc/c-family/c-indentation.c
trunk/gcc/testsuite/ChangeLog

[Bug c++/70639] internal compiler error: in guard_tinfo_to_string, at c-family/c-indentation.c:560

2016-04-13 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70639

Marek Polacek  changed:

   What|Removed |Added

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

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

[Bug c++/70639] internal compiler error: in guard_tinfo_to_string, at c-family/c-indentation.c:560

2016-04-13 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70639

Marek Polacek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2016-04-13
   Assignee|unassigned at gcc dot gnu.org  |mpolacek at gcc dot 
gnu.org
   Target Milestone|--- |6.0
 Ever confirmed|0   |1

[Bug c/70436] [4.9/5/6 Regression] -Wparentheses missing ambiguous else warning

2016-04-13 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70436

Marek Polacek  changed:

   What|Removed |Added

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

--- Comment #17 from Marek Polacek  ---
Should be fixed now.

[Bug c/70436] [4.9/5/6 Regression] -Wparentheses missing ambiguous else warning

2016-04-13 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70436

--- Comment #16 from Marek Polacek  ---
Author: mpolacek
Date: Wed Apr 13 16:00:52 2016
New Revision: 234949

URL: https://gcc.gnu.org/viewcvs?rev=234949&root=gcc&view=rev
Log:
PR c/70436
* c-parser.c (c_parser_statement_after_labels): Add IF_P argument and
adjust callers.
(c_parser_statement): Likewise.
(c_parser_c99_block_statement): Likewise.
(c_parser_while_statement): Likewise.
(c_parser_for_statement): Likewise.
(c_parser_if_body): Don't set IF_P here.
(c_parser_if_statement): Add IF_P argument.  Set IF_P here.  Warn
about dangling else here.
* c-tree.h (c_finish_if_stmt): Adjust declaration.
* c-typeck.c (c_finish_if_stmt): Remove NESTED_IF parameter.  Don't
warn about dangling else here.

* testsuite/gcc.dg/Wparentheses-12.c: New test.
* testsuite/gcc.dg/Wparentheses-13.c: New test.

Added:
trunk/gcc/testsuite/gcc.dg/Wparentheses-12.c
trunk/gcc/testsuite/gcc.dg/Wparentheses-13.c
Modified:
trunk/gcc/c/ChangeLog
trunk/gcc/c/c-parser.c
trunk/gcc/c/c-tree.h
trunk/gcc/c/c-typeck.c
trunk/gcc/testsuite/ChangeLog

[Bug c++/70634] [4.9/5 Regression] ICE on valid code on x86_64-linux-gnu: Segmentation fault (program cc1plus)

2016-04-13 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70634

Jason Merrill  changed:

   What|Removed |Added

Summary|[4.9/5/6 Regression] ICE on |[4.9/5 Regression] ICE on
   |valid code on   |valid code on
   |x86_64-linux-gnu:   |x86_64-linux-gnu:
   |Segmentation fault (program |Segmentation fault (program
   |cc1plus)|cc1plus)

--- Comment #4 from Jason Merrill  ---
Fixed for GCC 6 so far.

[Bug testsuite/70150] Additonal test failures with --enable-default-pie

2016-04-13 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70150

--- Comment #14 from H.J. Lu  ---
(In reply to psturm from comment #13)
> (In reply to H.J. Lu from comment #12)
> > Patches are posted at
> > 
> > https://gcc.gnu.org/ml/gcc-patches/2016-03/msg00929.html
> > https://gcc.gnu.org/ml/gcc-patches/2016-03/msg00995.html
> 
> https://gcc.gnu.org/ml/gcc-patches/2016-03/msg00929.html patch does not
> apply because it appears it conflicts with another change made for HPPA:

Please try patches on hjl/pr70150 branch.

[Bug c++/70627] [6 Regression] internal compiler error: verify_type failed

2016-04-13 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70627

Jason Merrill  changed:

   What|Removed |Added

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

[Bug fortran/67039] Documentation of pseudorandom number intrinsics is incorrect

2016-04-13 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67039

Dominique d'Humieres  changed:

   What|Removed |Added

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

--- Comment #9 from Dominique d'Humieres  ---
Jerry,

Thanks for the review.

> I think this word should be singular. 
> > +@code{RANDOM_SEED} to initialize the pseudo-random numbers <= no 's'

Done, closing as FIXED.

[Bug c++/70594] [6 Regression] -fcompare-debug failure

2016-04-13 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70594

--- Comment #34 from Jason Merrill  ---
(In reply to Jakub Jelinek from comment #33)
>   (pop_labels): During named_labels traversal, just push the slot
>   pointers into a vector, then qsort it by DECL_UID and only then
>   call pop_label and chain it into BLOCK_VARS.

Tobias, does this fix your testcase?

[Bug c++/58822] Segfault when calling make_shared

2016-04-13 Thread michi at triodia dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58822

--- Comment #30 from Michi Henning  ---
(In reply to Jonathan Wakely from comment #29)
> > make_shared(args) doesn't always do the same thing as shared_ptr(new
> > T(args))
> 
> It does do effectively the same thing. The difference in behaviour is
> because when you use shared_ptr(new T(this)) the implicit cast happens
> inside the class, and the compiler can resolve it without inspecting the
> stable.

Yes, I understand why it happens, and why the current behavior conforms to the
standard. It's just that, from an application programmer's point of view, this
is in the "ultra-unexpected category".

> It should be possible to add a warning for the case where the cast happens
> inside the class (which doesn't crash, but is still UB) but it won't be
> possible to warn for the other cases, because at the site of the implicit
> cast the compiler doesn't know whether the pointer refers to a constructed
> object or not. I've created PR 70644.

Most sterling, thank you!

Michi.

[Bug c++/70615] [6 Regression] ICE on valid code at -O1 and above on x86_64-linux-gnu in add_expr, at tree.c:7870

2016-04-13 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70615

Jason Merrill  changed:

   What|Removed |Added

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

--- Comment #5 from Jason Merrill  ---
Fixed.

[Bug c/70646] Corrupt truncated function

2016-04-13 Thread jpoimboe at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70646

--- Comment #1 from Josh Poimboeuf  ---
Created attachment 38256
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38256&action=edit
Linux kernel config

[Bug c/70646] New: Corrupt truncated function

2016-04-13 Thread jpoimboe at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70646

Bug ID: 70646
   Summary: Corrupt truncated function
   Product: gcc
   Version: 5.3.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: jpoimboe at redhat dot com
  Target Milestone: ---

Created attachment 38255
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38255&action=edit
qla_attr.i.gz

The linux kernel has a new tool named "objtool" which follows all possible code
paths for every .o file, looking for abnormalities.  In one rare case it has
discovered a corrupt truncated function.

From the disassembly of drivers/scsi/qla2xxx/qla_attr.o:

2f53 :
2f53:   55  push   %rbp
2f54:   48 89 e5mov%rsp,%rbp

2f57 :
2f57:   55  push   %rbp
2f58:   b9 e8 00 00 00  mov$0xe8,%ecx
2f5d:   48 89 e5mov%rsp,%rbp
...

Note that qla2x00_get_host_fabric_name() is inexplicably truncated after
setting up the frame pointer.  It falls through to the next function, which is
very bad.

I can recreate it with gcc 5.3.1 or gcc 6.0 on the upstream Linux kernel at tag
v4.6-rc3.

The call chain which appears to trigger the problem is:

qla2x00_get_host_fabric_name()
  wwn_to_u64()
get_unaligned_be64()
  be64_to_cpup()
__be64_to_cpup()

It occurs with the combination of the following two recent Linux commits:

- bc27fb68aaad ("include/uapi/linux/byteorder, swab: force inlining of some
byteswap operations")
- ef3fb2422ffe ("scsi: fc: use get/put_unaligned64 for wwn access")


The gzipped .i file is attached.  I'll also attach the kernel .config file.

[Bug tree-optimization/70604] switch statement optimization creates dead code

2016-04-13 Thread jpoimboe at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70604

Josh Poimboeuf  changed:

   What|Removed |Added

 CC||rguenth at gcc dot gnu.org

--- Comment #4 from Josh Poimboeuf  ---
Richard, just realized you weren't on CC for my response to your question.

[Bug c/70646] Corrupt truncated function

2016-04-13 Thread jpoimboe at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70646

--- Comment #2 from Josh Poimboeuf  ---
$ gcc -Wp,-MD,drivers/scsi/qla2xxx/.qla_attr.o.d  -nostdinc -isystem
/usr/lib/gcc/x86_64-redhat-linux/5.3.1/include -I./arch/x86/include
-Iarch/x86/include/generated/uapi -Iarch/x86/include/generated  -Iinclude
-I./arch/x86/include/uapi -Iarch/x86/include/generated/uapi -I./include/uapi
-Iinclude/generated/uapi -include ./include/linux/kconfig.h -D__KERNEL__ -Wall
-Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common
-Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -mno-sse
-mno-mmx -mno-sse2 -mno-3dnow -mno-avx -m64 -falign-jumps=1 -falign-loops=1
-mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup
-mtune=generic -mno-red-zone -mcmodel=kernel -funit-at-a-time
-maccumulate-outgoing-args -DCONFIG_X86_X32_ABI -DCONFIG_AS_CFI=1
-DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1
-DCONFIG_AS_SSSE3=1 -DCONFIG_AS_CRC32=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1
-DCONFIG_AS_SHA1_NI=1 -DCONFIG_AS_SHA256_NI=1 -pipe -Wno-sign-compare
-fno-asynchronous-unwind-tables -fno-delete-null-pointer-checks -Os
-Wno-maybe-uninitialized --param=allow-store-data-races=0
-Wframe-larger-than=2048 -fno-stack-protector -Wno-unused-but-set-variable
-fno-omit-frame-pointer -fno-optimize-sibling-calls
-fno-var-tracking-assignments -fno-inline-functions-called-once
-Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow
-fconserve-stack -Werror=implicit-int -Werror=strict-prototypes
-Werror=date-time -Werror=incompatible-pointer-types -DCC_HAVE_ASM_GOTO   
-D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(qla_attr)" 
-D"KBUILD_MODNAME=KBUILD_STR(qla2xxx)" -c -o drivers/scsi/qla2xxx/qla_attr.o
drivers/scsi/qla2xxx/qla_attr.c

$ gcc -v
Using built-in specs.
COLLECT_GCC=/usr/bin/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/5.3.1/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --enable-bootstrap
--enable-languages=c,c++,objc,obj-c++,fortran,ada,go,lto --prefix=/usr
--mandir=/usr/share/man --infodir=/usr/share/info
--with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared
--enable-threads=posix --enable-checking=release --enable-multilib
--with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions
--enable-gnu-unique-object --enable-linker-build-id
--with-linker-hash-style=gnu --enable-plugin --enable-initfini-array
--disable-libgcj --with-default-libstdcxx-abi=gcc4-compatible --with-isl
--enable-libmpx --enable-gnu-indirect-function --with-tune=generic
--with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 5.3.1 20151207 (Red Hat 5.3.1-2) (GCC)

[Bug fortran/67039] Documentation of pseudorandom number intrinsics is incorrect

2016-04-13 Thread dominiq at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67039

--- Comment #8 from dominiq at gcc dot gnu.org ---
Author: dominiq
Date: Wed Apr 13 15:04:57 2016
New Revision: 234946

URL: https://gcc.gnu.org/viewcvs?rev=234946&root=gcc&view=rev
Log:
2016-04-13  Dominique d'Humieres  

PR fortran/67039
* intrinsic.texi: Correct the documentation of pseudorandom
number intrinsics.


Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/intrinsic.texi

[Bug c++/70634] [4.9/5/6 Regression] ICE on valid code on x86_64-linux-gnu: Segmentation fault (program cc1plus)

2016-04-13 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70634

--- Comment #3 from Jason Merrill  ---
Author: jason
Date: Wed Apr 13 15:02:23 2016
New Revision: 234945

URL: https://gcc.gnu.org/viewcvs?rev=234945&root=gcc&view=rev
Log:
PR c++/70634

* pt.c (instantiation_dependent_uneval_expression_p): Split out
from instantiation_dependent_expression_p.
(value_dependent_expression_p): Use it for unevaluated operands.
(instantiation_dependent_r): Don't check value-dependence.
(instantiation_dependent_expression_p): Check
value-dependence of the expression as a whole.
* cp-tree.h: Declare instantiation_dependent_uneval_expression_p.
* semantics.c (finish_decltype_type): Use it.

Added:
trunk/gcc/testsuite/g++.dg/template/dependent-expr10.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/cp-tree.h
trunk/gcc/cp/pt.c
trunk/gcc/cp/semantics.c

[Bug c++/70594] [6 Regression] -fcompare-debug failure

2016-04-13 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70594

--- Comment #33 from Jakub Jelinek  ---
Author: jakub
Date: Wed Apr 13 14:45:46 2016
New Revision: 234942

URL: https://gcc.gnu.org/viewcvs?rev=234942&root=gcc&view=rev
Log:
PR c++/70594
* decl.c (pop_labels_1): Removed.
(note_label, sort_labels): New functions.
(pop_labels): During named_labels traversal, just push the slot
pointers into a vector, then qsort it by DECL_UID and only then
call pop_label and chain it into BLOCK_VARS.

Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/decl.c

[Bug c++/70615] [6 Regression] ICE on valid code at -O1 and above on x86_64-linux-gnu in add_expr, at tree.c:7870

2016-04-13 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70615

--- Comment #4 from Jason Merrill  ---
Author: jason
Date: Wed Apr 13 14:33:53 2016
New Revision: 234940

URL: https://gcc.gnu.org/viewcvs?rev=234940&root=gcc&view=rev
Log:
PR c++/70615
* cp-gimplify.c (cp_genericize_r): Expand PTRMEM_CST here.
(cp_gimplify_expr): Not here.

Added:
trunk/gcc/testsuite/g++.dg/opt/ptrmem7.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/cp-gimplify.c

[Bug c++/70639] internal compiler error: in guard_tinfo_to_string, at c-family/c-indentation.c:560

2016-04-13 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70639

--- Comment #4 from Marek Polacek  ---
So I think rather this one:

--- a/gcc/c-family/c-indentation.c
+++ b/gcc/c-family/c-indentation.c
@@ -239,10 +239,11 @@ should_warn_for_misleading_indentation (const
token_indent_info &guard_tinfo,
   if (line_table->seen_line_directive)
 return false;

-  /* We can't usefully warn about do-while statements since the bodies of
these
- statements are always explicitly delimited at both ends, so control flow
is
- quite obvious.  */
-  if (guard_tinfo.keyword == RID_DO)
+  /* We can't usefully warn about do-while and switch statements since the
+ bodies of these statements are always explicitly delimited at both ends,
+ so control flow is quite obvious.  */
+  if (guard_tinfo.keyword == RID_DO
+  || guard_tinfo.keyword == RID_SWITCH)
 return false;

   /* If the token following the body is a close brace or an "else"

[Bug ada/70645] New: [4.9/5/6 Regression] -fguess-branch-probability breaks debug-information, only in Ada

2016-04-13 Thread demoonlit at panathenaia dot halfmoon.jp
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70645

Bug ID: 70645
   Summary: [4.9/5/6 Regression] -fguess-branch-probability breaks
debug-information, only in Ada
   Product: gcc
   Version: 6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: ada
  Assignee: unassigned at gcc dot gnu.org
  Reporter: demoonlit at panathenaia dot halfmoon.jp
  Target Milestone: ---

I can not debug some executable files generated by recent gcc Ada frontend,
with all optimization-levels including -fguess-branch-probability.
(I'm troubled with -Og. I've understood that -Og is intended to debug.)

gcc-4.9, gcc-5, and gcc-6 have failed.
However, gcc-4.8 works well.

C/C++ and Fortran frontends work well on all versions.

Note, I tried gdb from 7.9 to 7.11 as debugger.

% cat hello.adb
with Ada.Text_IO;
procedure Hello is
begin
   Ada.Text_IO.Put_Line ("Hello.");
end Hello;

% gcc -v
gcc (GCC) 6.0.0 20160401 (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.

% gnatmake -g -Og hello
gcc -c -g -Og hello.adb
gnatbind -x hello.ali
gnatlink hello.ali -g -Og

% gdb hello 
GNU gdb (GDB) 7.11
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin10.8.0".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
.
Find the GDB manual and other documentation resources online at:
.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from hello...Reading symbols from
hello.dSYM/Contents/Resources/DWARF/hello...done.
done.
(gdb) start
Temporary breakpoint 1 at 0x114f1
Starting program: hello 

Temporary breakpoint 1, 0x000114f1 in hello ()
(gdb) s
Single stepping until exit from function _ada_hello,
which has no line number information. #  Please look here 
Hello.
main (argc=, argv=, envp=)
at b~hello.adb:197
197   adafinal;
(gdb) quit
A debugging session is active.

Inferior 1 [process 45663] will be killed.

Quit anyway? (y or n) y

% gnatmake -f -g -Og -fno-guess-branch-probability hello
gcc -c -g -Og -fno-guess-branch-probability hello.adb
gnatbind -x hello.ali
gnatlink hello.ali -g -Og -fno-guess-branch-probability

% gdb hello 
GNU gdb (GDB) 7.11
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin10.8.0".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
.
Find the GDB manual and other documentation resources online at:
.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from hello...Reading symbols from
hello.dSYM/Contents/Resources/DWARF/hello...done.
done.
(gdb) start
Temporary breakpoint 1 at 0x1154e: file hello.adb, line 2.
Starting program: hello 

Temporary breakpoint 1, _ada_hello () at hello.adb:2
2   procedure Hello is
(gdb) s
4  Ada.Text_IO.Put_Line ("Hello."); #  It works fine.
(gdb) s
ada__text_io__put_line__2 (item=...) at a-textio.adb:1424
1424   procedure Put_Line (Item : String) is
(gdb) quit
A debugging session is active.

Inferior 1 [process 45704] will be killed.

Quit anyway? (y or n) y


#  Example of gcc-4.8 from here: 


% gcc --version
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.

% gnatmake -f -g -Og hello
gcc -c -g -Og hello.adb
gnatbind -x hello.ali
gnatlink hello.ali -g -Og

% gdb hello   
GNU gdb (GDB) 7.11
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin10.8.0".
Type "show con

[Bug tree-optimization/70623] [4.9/5/6 Regression] ICE in compute_antic at -O2

2016-04-13 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70623

--- Comment #6 from Richard Biener  ---
"Patch" in testing.  Note that the issue seems to be oscillating values because
of bitmap_set_and only taking expressions from 'dest', pruning out those
for which the value-and removed their value.  But

mem_ref<0B>,addr_expr<&av>}@.MEM_5 (0005)
mem_ref<0B>,av.0_8}@.MEM_7(D) (0006)
_9 (0006)

and with only 0006 in the value-and but mem_ref<0B>,av.0_8}@.MEM_7(D) (0006)
in the expr-set we get 0006 dropped in clean ().  In a different iteration
mem_ref<0B>,av.0_8}@.MEM_7(D) gets exchanged for _9 (0006) and it re-appears.

The solution seems to be to union the expr-sets in bitmap_set_and before
pruning expressions no longer in the value-intersection.

But then clean () uses bitmap_remove_from_set which does

  unsigned int val  = get_expr_value_id (expr);
  if (!value_id_constant_p (val))
{ 
  bitmap_clear_bit (&set->values, val);
  bitmap_clear_bit (&set->expressions, get_expression_id (expr));
}

and thus seems to rely on there being exactly one expression for each value
in a bitmap-set.  bitmap_find_leader does

  if (bitmap_set_contains_value (set, val))
{
  unsigned int i;
  bitmap_iterator bi;
  bitmap exprset = value_expressions[val];

  EXECUTE_IF_AND_IN_BITMAP (exprset, &set->expressions, 0, i, bi)
return expression_for_id (i);

so kind-of would agree with that.

[Bug c++/70641] [5/6 Regression] ICE on valid code at -O1 and above on x86_64-linux-gnu: verify_gimple failed

2016-04-13 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70641

--- Comment #3 from Jakub Jelinek  ---
Created attachment 38254
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38254&action=edit
gcc6-pr70641.patch

Untested fix.

[Bug tree-optimization/70130] [6 Regression] h264ref fails with verification error starting with r231674

2016-04-13 Thread wschmidt at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70130

--- Comment #18 from Bill Schmidt  ---
Never mind, it would get zero initialization, and specifying that directly
doesn't help.

[Bug tree-optimization/70130] [6 Regression] h264ref fails with verification error starting with r231674

2016-04-13 Thread wschmidt at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70130

--- Comment #17 from Bill Schmidt  ---
Though as I look at it, the "p" field is undefined in Alan's test.  Let me fix
that and see what we get.

[Bug tree-optimization/70130] [6 Regression] h264ref fails with verification error starting with r231674

2016-04-13 Thread wschmidt at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70130

--- Comment #16 from Bill Schmidt  ---
Created attachment 38253
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38253&action=edit
Vectorization dump with patch applied

[Bug tree-optimization/70130] [6 Regression] h264ref fails with verification error starting with r231674

2016-04-13 Thread wschmidt at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70130

--- Comment #15 from Bill Schmidt  ---
Created attachment 38252
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38252&action=edit
Vectorization dump without patch

[Bug debug/70628] [5 regression] ICE in get_reg_rtx, at emit-rtl.c:1025

2016-04-13 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70628

--- Comment #12 from Jakub Jelinek  ---
Author: jakub
Date: Wed Apr 13 13:57:29 2016
New Revision: 234937

URL: https://gcc.gnu.org/viewcvs?rev=234937&root=gcc&view=rev
Log:
PR debug/70628
* explow.c (convert_memory_address_addr_space_1): Formatting fix.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/explow.c

[Bug tree-optimization/70130] [6 Regression] h264ref fails with verification error starting with r231674

2016-04-13 Thread wschmidt at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70130

--- Comment #14 from Bill Schmidt  ---
Unfortunately the patch doesn't help with Alan's streamlined test.  It still
fails (tested on powerpc64le).

[Bug libstdc++/70607] The return type of std::conj must be std::complex

2016-04-13 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70607

--- Comment #5 from Jonathan Wakely  ---
Aha, that DR was reverted by http://wg21.link/lwg1522 (I failed to find it
because the deleted text says "All the specified ..." and I searched for "All
of the specified ..."

[Bug fortran/58000] Accept OPEN( ... NAME=) with -std=legacy

2016-04-13 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58000

Dominique d'Humieres  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #6 from Dominique d'Humieres  ---
Jerry,

Thanks for the review.

Documented as not implemented, closing as WONTFIX.

[Bug fortran/58000] Accept OPEN( ... NAME=) with -std=legacy

2016-04-13 Thread dominiq at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58000

--- Comment #5 from dominiq at gcc dot gnu.org ---
Author: dominiq
Date: Wed Apr 13 13:17:45 2016
New Revision: 234936

URL: https://gcc.gnu.org/viewcvs?rev=234936&root=gcc&view=rev
Log:
2016-04-13  Dominique d'Humieres  

PR fortran/58000
* gfortran.texi: Document OPEN( ... NAME=) as not implemented
in GNU Fortran


Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/gfortran.texi

[Bug middle-end/70638] transaction_wrap: too strict compatibility check and transaction_pure wrappers fail to wrap

2016-04-13 Thread hillel.avni at huawei dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70638

--- Comment #4 from Hillel Avni  ---
(In reply to torvald from comment #3)
> (In reply to Hillel Avni from comment #2)
> > On gcc-linaro-4.9-2014.11, I must declare the wrapper as pure. 
> 
> But using that version the wrapper was indeed used and not the original
> function, right?  In that case, this part of this bug report would be a
> regression.

Yes, the wrapper is used.

[Bug c++/70641] [5/6 Regression] ICE on valid code at -O1 and above on x86_64-linux-gnu: verify_gimple failed

2016-04-13 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70641

--- Comment #2 from Jakub Jelinek  ---
Guess in the   
  if (callee_t && recursive_call_p (current_function_decl, callee_t))
continue;
case we should set some bool flag, and if we decide to set nothrow flag at the
end and we saw some recursive calls, we should adjust them.

[Bug middle-end/70638] transaction_wrap: too strict compatibility check and transaction_pure wrappers fail to wrap

2016-04-13 Thread torvald at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70638

--- Comment #3 from torvald at gcc dot gnu.org ---
(In reply to Hillel Avni from comment #2)
> On gcc-linaro-4.9-2014.11, I must declare the wrapper as pure. 

But using that version the wrapper was indeed used and not the original
function, right?  In that case, this part of this bug report would be a
regression.

[Bug c++/70627] [6 Regression] internal compiler error: verify_type failed

2016-04-13 Thread jseward at acm dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70627

--- Comment #7 from jseward at acm dot org ---
I tried the fix at PR70029 comment 7 (disabling a check) but that
doesn't help, at least for the original, unreduced test case
(Unified_cpp_dom_animation0.ii).

[Bug debug/70628] [5 regression] ICE in get_reg_rtx, at emit-rtl.c:1025

2016-04-13 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70628

Jakub Jelinek  changed:

   What|Removed |Added

Summary|[5/6 regression] ICE in |[5 regression] ICE in
   |get_reg_rtx, at |get_reg_rtx, at
   |emit-rtl.c:1025 |emit-rtl.c:1025

--- Comment #11 from Jakub Jelinek  ---
Fixed on the trunk so far.

[Bug target/70633] [5 Regression] ICE on valid code at -Os (in 32-bit mode) on x86_64-linux-gnu: output_operand: invalid expression as operand

2016-04-13 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70633

Jakub Jelinek  changed:

   What|Removed |Added

Summary|[5/6 Regression] ICE on |[5 Regression] ICE on valid
   |valid code at -Os (in   |code at -Os (in 32-bit
   |32-bit mode) on |mode) on x86_64-linux-gnu:
   |x86_64-linux-gnu:   |output_operand: invalid
   |output_operand: invalid |expression as operand
   |expression as operand   |

--- Comment #6 from Jakub Jelinek  ---
Fixed on the trunk so far.

[Bug c++/70641] [5/6 Regression] ICE on valid code at -O1 and above on x86_64-linux-gnu: verify_gimple failed

2016-04-13 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70641

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P2
 CC||hubicka at gcc dot gnu.org

[Bug tree-optimization/70130] [6 Regression] h264ref fails with verification error starting with r231674

2016-04-13 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70130

--- Comment #13 from Richard Biener  ---
Does the following fix it?  I'm not entirely happy with it because of the
comment.

Index: gcc/tree-vect-stmts.c
===
--- gcc/tree-vect-stmts.c   (revision 234894)
+++ gcc/tree-vect-stmts.c   (working copy)
@@ -6876,6 +6875,12 @@ vectorizable_load (gimple *stmt, gimple_
   gcc_assert (!load_lanes_p
  || alignment_support_scheme == dr_aligned
  || alignment_support_scheme == dr_unaligned_supported);
+  /* If vectors are not adjacent we can't do dr_explicit_realign_optimized.
+ ???  This fails to account for the cost of this but it's messy to
+ compute all this from within vect_supportable_dr_alignment.  */
+  if (group_gap_adj != 0
+  && alignment_support_scheme == dr_explicit_realign_optimized)
+alignment_support_scheme = dr_explicit_realign;

   /* In case the vectorization factor (VF) is bigger than the number
  of elements that we can fit in a vectype (nunits), we have to generate

[Bug target/70633] [5/6 Regression] ICE on valid code at -Os (in 32-bit mode) on x86_64-linux-gnu: output_operand: invalid expression as operand

2016-04-13 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70633

--- Comment #5 from Jakub Jelinek  ---
Author: jakub
Date: Wed Apr 13 12:27:52 2016
New Revision: 234934

URL: https://gcc.gnu.org/viewcvs?rev=234934&root=gcc&view=rev
Log:
PR middle-end/70633
* gimplify.c (gimplify_init_constructor): Clear TREE_STATIC if
gimplification turns some element into non-constant.

* gcc.c-torture/compile/pr70633.c: New test.

Added:
trunk/gcc/testsuite/gcc.c-torture/compile/pr70633.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/gimplify.c
trunk/gcc/testsuite/ChangeLog

  1   2   >