[Bug fortran/69455] [5/6/7 Regression] [F08] Assembler error(s) when using intrinsic modules in two BLOCK

2016-11-20 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69455

--- Comment #11 from Dominique d'Humieres  ---
> A two line patch (or one rather long line) is sufficient to work
> around the brokeness of the intrinsics modules.

"Un qui sait vaut mieux que dix qui cherchent!" Could you please be kind enough
to post the patch?

[Bug target/48551] Following source code crashes the c++ compiler on coldfire platform.

2016-11-20 Thread law at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48551

--- Comment #3 from Jeffrey A. Law  ---
Author: law
Date: Mon Nov 21 05:29:36 2016
New Revision: 242648

URL: https://gcc.gnu.org/viewcvs?rev=242648=gcc=rev
Log:
2016-11-20  Jeff Law  

PR target/48551
* reload.h (struct target_reload): Make x_double_reg_address_ok
be per-mode rather.
* reload.c (find_reloads_address): Check if double_reg_address_ok
is true for the mode of the memory reference.
* reload1.c (init_reload): Initialize double_reg_address_ok for
each mode.

PR target/48551
* gcc.target/m68k/pr48551.c: New test.

Added:
trunk/gcc/testsuite/gcc.target/m68k/pr48551.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/reload.c
trunk/gcc/reload.h
trunk/gcc/reload1.c
trunk/gcc/testsuite/ChangeLog

[Bug target/48551] Following source code crashes the c++ compiler on coldfire platform.

2016-11-20 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48551

Jeffrey A. Law  changed:

   What|Removed |Added

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

--- Comment #4 from Jeffrey A. Law  ---
Fixed via reload change on the trunk.

[Bug objc++/78418] [7 Regression] Several failures in the obj-c++ test suite after revision r242377 on x86_64-apple-darwin16

2016-11-20 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78418

Jason Merrill  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED
   Assignee|unassigned at gcc dot gnu.org  |jason at gcc dot gnu.org
   Target Milestone|--- |7.0
 Status|NEW |RESOLVED
 Resolution|--- |FIXED
   Assignee|unassigned at gcc dot gnu.org  |jason at gcc dot gnu.org
   Target Milestone|--- |7.0

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

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

[Bug objc++/78418] [7 Regression] Several failures in the obj-c++ test suite after revision r242377 on x86_64-apple-darwin16

2016-11-20 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78418

Jason Merrill  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED
   Assignee|unassigned at gcc dot gnu.org  |jason at gcc dot gnu.org
   Target Milestone|--- |7.0
 Status|NEW |RESOLVED
 Resolution|--- |FIXED
   Assignee|unassigned at gcc dot gnu.org  |jason at gcc dot gnu.org
   Target Milestone|--- |7.0

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

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

[Bug objc++/78418] [7 Regression] Several failures in the obj-c++ test suite after revision r242377 on x86_64-apple-darwin16

2016-11-20 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78418

--- Comment #4 from Jason Merrill  ---
Author: jason
Date: Mon Nov 21 04:41:21 2016
New Revision: 242647

URL: https://gcc.gnu.org/viewcvs?rev=242647=gcc=rev
Log:
PR objc++/78418 - ICE in string tests on darwin

* tree.c (lvalue_kind): Guard DECL_HAS_VALUE_EXPR_P.

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

[Bug libstdc++/78442] New: [variant] std::get<...>(Variant) is not constexpr.

2016-11-20 Thread eric at efcs dot ca
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78442

Bug ID: 78442
   Summary: [variant] std::get<...>(Variant) is not constexpr.
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libstdc++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: eric at efcs dot ca
  Target Milestone: ---

See the below reproducer:

#include 

constexpr bool test() {
  std::variant v(42);
  auto const& cv = v;
  static_assert(std::get<0>(v) == 42, "");
  static_assert(std::get<0>(cv) == 42, "");
  return true;
}
static_assert(test(), "");

int main() {}

[Bug libstdc++/78441] New: [variant] variant_alternative doesn't allow cv qualifiers

2016-11-20 Thread eric at efcs dot ca
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78441

Bug ID: 78441
   Summary: [variant] variant_alternative doesn't allow cv
qualifiers
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libstdc++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: eric at efcs dot ca
  Target Milestone: ---

The below reproducer fails to compile.

// Reproducer
#include 

using V = std::variant;
using T = std::variant_alternative_t<0, const V>;
static_assert(std::is_same_v, "");

[Bug libstdc++/78360] [C++1z] missing throw()s in explicit instantiation declarations for has_facet()

2016-11-20 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78360

Markus Trippelsdorf  changed:

   What|Removed |Added

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

--- Comment #2 from Markus Trippelsdorf  ---
except.spec/5 says:
»In an explicit instantiation an exception-specification may be specified, but
is not required.«

[Bug c++/78440] [7 Regression] [c++17] Incompatible exception-specification not diagnosed in explicit instantiation

2016-11-20 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78440

Markus Trippelsdorf  changed:

   What|Removed |Added

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

--- Comment #2 from Markus Trippelsdorf  ---
»In an explicit instantiation an exception-specification may be specified, but
is not required.«
Closing as invalid, sorry for the noise.

[Bug c++/78440] [7 Regression] [c++17] Incompatible exception-specification not diagnosed in explicit instantiation

2016-11-20 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78440

--- Comment #1 from Markus Trippelsdorf  ---
except.spec/5:

»If any declaration of a function has an exception-specification that is not a
noexcept-specification allowing all exceptions, all declarations, including the
definition and any explicit specialization, of that function shall have a
compatible exception-specification. If any declaration of a pointer to
function, reference to function, or pointer to member function has an
exception-specification, all occurrences of that declaration shall have a
compatible exception-specification. If a declaration of a function has an
implicit exception specification, other declarations of the function shall not
specify an exception-specification. In an explicit instantiation an
exception-specification may be specified, but is not required. If an
exception-specification is specified in an explicit instantiation directive, it
shall be compatible with the exception-specifications of other declarations of
that function. A diagnostic is required only if the exception-specifications
are not compatible within a single translation unit.«

[Bug c++/78440] New: [7 Regression] [c++17] Incompatible exception-specification not diagnosed in explicit instantiation

2016-11-20 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78440

Bug ID: 78440
   Summary: [7 Regression] [c++17]  Incompatible
exception-specification not diagnosed in explicit
instantiation
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: trippels at gcc dot gnu.org
CC: jason at gcc dot gnu.org
  Target Milestone: ---

markus@x4 tmp % cat compat.ii
template  void foo() noexcept {}
template  void bar() throw() {}
template void foo();
template void bar();

markus@x4 tmp % g++ -Wall -Wextra -std=c++1z -c compat.ii
markus@x4 tmp % clang++ -std=c++1z -c compat.ii
compat.ii:3:15: error: explicit instantiation of 'foo' does not refer to a
function template, variable template, member function, member class, or static
data member
template void foo();
  ^
compat.ii:1:28: note: candidate template ignored: could not match 'void ()
noexcept' against 'void ()'
template  void foo() noexcept {}
   ^
compat.ii:4:15: error: explicit instantiation of 'bar' does not refer to a
function template, variable template, member function, member class, or static
data member
template void bar();
  ^
compat.ii:2:28: note: candidate template ignored: could not match 'void ()
throw()' against 'void ()'
template  void bar() throw() {}
   ^
2 errors generated.

copy_n should result in a one past the end input iterator

2016-11-20 Thread Robert Young
/*
gcc -Wall -Wextra -std=c++11 copy_n_vs_copy.cpp -lstdc++ -o copy_n_vs_copy

One Past the End
https://gcc.gnu.org/onlinedocs/libstdc++/manual/iterators.html#iterators.predefined.end

BUG location:
/usr/lib/gcc/x86_64-pc-linux-gnu/5.1.0/include/g++-v5/bits/stl_algo.h

*/

#include 
#include 
#include 
#include 

int main()
 {
  std::string i("abc");
  std::string o;
  std::istringstream t;

  t=std::istringstream(i);
  o.clear();
  assert(3==t.rdbuf()->in_avail());
  std::copy(std::istreambuf_iterator(t.rdbuf()),
   std::istreambuf_iterator(),back_inserter(o));
  std::cout<<"Test1(copy):\tResult_size:"<in_avail()); /* OK! */

  t=std::istringstream(i);
  o.clear();
  assert(3==t.rdbuf()->in_avail());
  std::copy_n(std::istreambuf_iterator(t.rdbuf()),
   3,back_inserter(o));
  std::cout<<"Test2(copy_n):\tResult_size:"<in_avail()); /* WHY? */

  return(0);
 }

/*
Test1(copy):  Result_size:3   Result:"abc"in_avail:0
Test2(copy_n):  Result_size:3   Result:"abc"in_avail:1
*/
--- /usr/lib/gcc/x86_64-pc-linux-gnu/5.1.0/include/g++-v5/bits/stl_algo.h   
2015-02-19 20:57:40.0 +
+++ /usr/lib/gcc/x86_64-pc-linux-gnu/5.1.0/include/g++-v5/bits/stl_algo.h   
2015-02-19 20:57:40.0 +
@@ -762,9 +762,8 @@
{
  *__result = *__first;
  ++__result;
- if (--__n > 0)
-   ++__first;
- else
+ ++__first;
+ if (--__n <= 0)
break;
}
}


[Bug c++/38522] -Wconversion does not handle complex bitwise expressions

2016-11-20 Thread oss at florianjw dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38522

Florian J. Weber  changed:

   What|Removed |Added

 CC||oss at florianjw dot de

--- Comment #9 from Florian J. Weber  ---
While I agree that Olegs example shouldn't trigger the warnings, I believe that
it is different from the initial one, in that the intermediate types are ints
due to integer-promotion.

I do however have an example that is definitely broken and doesn't make any
sense by any metric:


using byte = unsigned char;

struct boxed_array {
byte data[1];
byte& get(){return data[0];}
const byte& get()const{return data[0];}
};

void xor_blocks(boxed_array& lhs, const boxed_array& rhs) {
// warns with current GCC 6.2 as distributed by Debian
lhs.get() ^=  rhs.get();
// does not warn:
lhs.get() = lhs.get() ^ rhs.get();
}

int main() {}


I could accept the inverse, as the second case involves integer-promotion to
int, but this doesn't even happen in the first one, making this highly absurd
behavior.

[Bug go/78432] [7 Regression] -fdump-go-spec ICEs for aligned causing x32 libgo library to fail to build

2016-11-20 Thread doko at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78432

Matthias Klose  changed:

   What|Removed |Added

 Target|x86_64-linux-gnu|x86_64-linux-gnu,
   ||s390-linux-gnu

--- Comment #2 from Matthias Klose  ---
seen on s390x-linux-gnu as well, when building the m31/32 multilib variant

https://buildd.debian.org/status/fetch.php?pkg=gcc-snapshot=s390x=20161120-1=1479682317

[Bug target/78439] New: [7 Regression] error: insn does not satisfy its constraints (arm-linux-gnueabihf)

2016-11-20 Thread doko at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78439

Bug ID: 78439
   Summary: [7 Regression] error: insn does not satisfy its
constraints (arm-linux-gnueabihf)
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: doko at gcc dot gnu.org
  Target Milestone: ---

seen with current trunk,

complete build log at
https://buildd.debian.org/status/fetch.php?pkg=gcc-snapshot=armhf=20161120-1=1479669284

// Target: arm-linux-gnueabihf
// Configured with: ../src/configure -v --with-pkgversion='Debian 20161120-1'
--with-bugurl=file:///usr/share/doc/gcc-snapshot/README.Bugs
--enable-languages=c,ada,c++,go,fortran,objc,obj-c++
--prefix=/usr/lib/gcc-snapshot --program-prefix= --enable-shared
--enable-linker-build-id --disable-nls --with-sysroot=/ --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes
--with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libitm
--disable-libquadmath --enable-plugin --enable-default-pie --with-system-zlib
--enable-objc-gc=auto --enable-multiarch --disable-sjlj-exceptions
--with-arch=armv7-a --with-fpu=vfpv3-d16 --with-float=hard --disable-werror
--enable-checking=yes --build=arm-linux-gnueabihf --host=arm-linux-gnueabihf
--target=arm-linux-gnueabihf
// Thread model: posix
// gcc version 7.0.0 20161120 (experimental) [trunk revision 242638] (Debian
20161120-1) 
// 
// ../../src/libiberty/cp-demangle.c: In function 'is_ctor_or_dtor':
// ../../src/libiberty/cp-demangle.c:6490:1: error: insn does not satisfy its
constraints:
//  }
//  ^
// (insn 157 24 65 2 (set (mem/c:DI (plus:SI (reg/f:SI 11 fp)
// (const_int -56 [0xffc8])) [3 di.num_comps+0 S8
A32])
// (reg:DI 12 ip)) "../../src/libiberty/cp-demangle.c":6442 633
{*movdi_vfp_cortexa8}
//  (nil))
// ../../src/libiberty/cp-demangle.c:6490:1: internal compiler error: in
extract_constrain_insn, at recog.c:2213
// 0x8663d9 _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
//  ../../src/gcc/rtl-error.c:108
// 0x86641b _fatal_insn_not_found(rtx_def const*, char const*, int, char
const*)
//  ../../src/gcc/rtl-error.c:119
// 0x82455f extract_constrain_insn(rtx_insn*)
//  ../../src/gcc/recog.c:2213
// 0x829933 copyprop_hardreg_forward_1
//  ../../src/gcc/regcprop.c:794
// 0x82ac5d execute
//  ../../src/gcc/regcprop.c:1301
// Please submit a full bug report,
// with preprocessed source if appropriate.

[Bug target/78438] New: incorrect comparison optimization

2016-11-20 Thread babokin at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78438

Bug ID: 78438
   Summary: incorrect comparison optimization
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: babokin at gmail dot com
  Target Milestone: ---

Created attachment 40093
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40093=edit
reproducer

> g++ -O0 main.cpp func.cpp -o no_opt; ./no_opt
0
> g++ -O1 main.cpp func.cpp -o opt; ./opt
2

> cat main.cpp
#include 

char C = 0;
int I = 197412621;

void foo();

int main() {
  foo();
  printf("%d\n", C);
}

> cat func.cpp
extern char C;
extern int I;
void foo() {
  C = 0 > (short) (I >> 11);
}

> g++ -v

Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/home/dybaboki/gcc/bin/libexec/gcc/x86_64-pc-linux-gnu/7.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc/configure --with-arch=corei7 --with-cpu=corei7
--enable-clocale=gnu --with-system-zlib --enable-shared --with-demangler-in-ld
--enable-cloog-backend=isl --with-fpmath=sse --prefix=/home/dybaboki/gcc/bin
--enable-languages=c,c++,fortran,lto : (reconfigured) ../gcc/configure
--with-arch=corei7 --with-cpu=corei7 --enable-clocale=gnu --with-system-zlib
--enable-shared --with-demangler-in-ld --enable-cloog-backend=isl
--with-fpmath=sse --prefix=/home/dybaboki/gcc/bin
--enable-languages=c,c++,fortran,lto : (reconfigured) ../gcc/configure
--with-arch=corei7 --with-cpu=corei7 --enable-clocale=gnu --with-system-zlib
--enable-shared --with-demangler-in-ld --enable-cloog-backend=isl
--with-fpmath=sse --prefix=/home/dybaboki/gcc/bin
--enable-languages=c,c++,fortran,lto : (reconfigured) ../gcc_github/configure
--with-arch=corei7 --with-cpu=corei7 --enable-clocale=gnu --with-system-zlib
--enable-shared --with-demangler-in-ld --enable-cloog-backend=isl
--with-fpmath=sse --prefix=/home/dybaboki/gcc/bin
--enable-languages=c,c++,fortran,lto --no-create --no-recursion :
(reconfigured) ../gcc/configure --with-arch=corei7 --with-cpu=corei7
--enable-clocale=gnu --with-system-zlib --enable-shared --with-demangler-in-ld
--enable-cloog-backend=isl --with-fpmath=sse --prefix=/home/dybaboki/gcc/bin
--enable-languages=c,c++,fortran,lto --no-create --no-recursion
Thread model: posix
gcc version 7.0.0 20161119 (experimental) (GCC)

[Bug rtl-optimization/78437] New: [7 Regression]: Invalid sign-extend conversion in REE pass

2016-11-20 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78437

Bug ID: 78437
   Summary: [7 Regression]: Invalid sign-extend conversion in REE
pass
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: rtl-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: ubizjak at gmail dot com
  Target Milestone: ---

Created attachment 40092
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40092=edit
Preprocessed source

Attached testcase triggers invalid sign-extend conversion in REE pass.

The problem can be triggered with a crosscompiler to alpha-linux-gnu using:

~/gcc-build-alpha/gcc/cc1 -O2 -std=c11 -mcpu=ev67 -mexplicit-relocs
-fpreprocessed att.i

The _.split2 dump will have:

   ...
   50: $22:QI=$8:QI
  REG_EQUAL [`expected']
   43: [$2:DI+low(`expected')]=$8:QI
   51: $3:DI=sign_extend($22:QI)
   ...

this sequence is converted in REE pass:

Trying to eliminate extension:
(insn 51 43 53 7 (set (reg:DI 3 $3 [orig:110 expected ] [110])
(sign_extend:DI (reg:QI 22 $22 [orig:111 expected ] [111]))) "att.c":27
70 {*extendqidi2_bwx}
 (nil))
Tentatively merged extension with definition (copy needed):
(insn 50 52 43 7 (set (reg:DI 3 $3)
(sign_extend:DI (reg:QI 8 $8 [106]))) "att.c":27 -1
 (nil))
deferring rescan insn with uid = 50.
All merges were successful.
Eliminated the extension.

   ...
   50: $3:DI=sign_extend($8:QI)
  141: $22:DI=$3:DI
   43: [$2:DI+low(`expected')]=$8:QI
   ...

However, $22 is used later in a DImode in:

(insn 63 62 65 8 (parallel [
(set (reg:DI 7 $7 [119])
(unspec_volatile:DI [
(const_int 0 [0])
] UNSPECV_CMPXCHG))
(set (reg:DI 3 $3 [123])
(zero_extend:DI (unspec_volatile:QI [
(const_int 0 [0])
] UNSPECV_CMPXCHG)))
(set (mem/v:QI (reg/f:DI 1 $1 [138]) [-1  S1 A8])
(unspec_volatile:QI [
(mem/v:QI (reg/f:DI 1 $1 [138]) [-1  S1 A8])
(reg:DI 22 $22 [orig:111 expected ] [111])
(const_int 0 [0])
(reg:DI 4 $4 [90])
(const_int 0 [0])
(const_int 3 [0x3])
(const_int 2 [0x2])
] UNSPECV_CMPXCHG))
(clobber (reg:DI 23 $23))
]) "att.c":30 304 {atomic_compare_and_swapqi_1}
 (nil))

so the converted sequence is *not* equal as long as $22 is concerned.

[Bug target/78436] New: incorrect write to larger-than-type bitfield (signed char x:9)

2016-11-20 Thread babokin at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78436

Bug ID: 78436
   Summary: incorrect write to larger-than-type bitfield (signed
char x:9)
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: babokin at gmail dot com
  Target Milestone: ---

Created attachment 40091
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40091=edit
reproducer

The test is correct C++ program with bitfield larger than its base type, i.e.
signed char : 9.
-O2 produces incorrect result.

The C++14 standard states explicitly the following (9.3.1, [class.bit]):
The value of the integral constant expression may be larger than the number of
bits in the object representation (3.9) of the bit-field’s type; in such cases
the extra bits are used as padding bits and do not participate in the value
representation (3.9) of the bit-field.

> g++ -O0 -w -o no_opt bitfield.cpp main.cpp;./no_opt
0
> g++ -O2 -w -o opt bitfield.cpp main.cpp;./opt
-1

> cat bitfield.h
struct S {
long int  : 23;
long int m0 : 24;
long int m1 : 10;
long int m2 : 24;
signed char m3 : 9;
};

extern struct S s1;

> cat bitfield.cpp
#include "bitfield.h"

void foo() {
  s1.m3 = 0;
  s1.m2 = -1193165L;
}

> cat main.cpp
#include 
#include "bitfield.h"

struct S s1;

void init () {
s1.m0 = 0L;
s1.m1 = 0L;
s1.m2 = 0L;
s1.m3 = 0;
}

void foo();

int main() {
  init();
  foo();
  printf("%d\n",s1.m3);
  return 0;
}

> g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/home/dybaboki/gcc/bin/libexec/gcc/x86_64-pc-linux-gnu/7.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc/configure --with-arch=corei7 --with-cpu=corei7
--enable-clocale=gnu --with-system-zlib --enable-shared --with-demangler-in-ld
--enable-cloog-backend=isl --with-fpmath=sse --prefix=/home/dybaboki/gcc/bin
--enable-languages=c,c++,fortran,lto : (reconfigured) ../gcc/configure
--with-arch=corei7 --with-cpu=corei7 --enable-clocale=gnu --with-system-zlib
--enable-shared --with-demangler-in-ld --enable-cloog-backend=isl
--with-fpmath=sse --prefix=/home/dybaboki/gcc/bin
--enable-languages=c,c++,fortran,lto : (reconfigured) ../gcc/configure
--with-arch=corei7 --with-cpu=corei7 --enable-clocale=gnu --with-system-zlib
--enable-shared --with-demangler-in-ld --enable-cloog-backend=isl
--with-fpmath=sse --prefix=/home/dybaboki/gcc/bin
--enable-languages=c,c++,fortran,lto : (reconfigured) ../gcc_github/configure
--with-arch=corei7 --with-cpu=corei7 --enable-clocale=gnu --with-system-zlib
--enable-shared --with-demangler-in-ld --enable-cloog-backend=isl
--with-fpmath=sse --prefix=/home/dybaboki/gcc/bin
--enable-languages=c,c++,fortran,lto --no-create --no-recursion :
(reconfigured) ../gcc/configure --with-arch=corei7 --with-cpu=corei7
--enable-clocale=gnu --with-system-zlib --enable-shared --with-demangler-in-ld
--enable-cloog-backend=isl --with-fpmath=sse --prefix=/home/dybaboki/gcc/bin
--enable-languages=c,c++,fortran,lto --no-create --no-recursion
Thread model: posix
gcc version 7.0.0 20161119 (experimental) (GCC)

[Bug libfortran/78379] Processor-specific versions for matmul

2016-11-20 Thread jvdelisle at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78379

--- Comment #17 from Jerry DeLisle  ---
On a hunch, this brings it back.

$(patsubst %.c,%.lo,$(notdir $(i_matmul_c))): AM_CFLAGS += -ffast-math
-ftree-vectorize -funroll-loops --param max-unroll-times=4 -march=native

So -march=native fixes it. not quite as fast as -prefer-avx128, but close
enough

[Bug libfortran/78379] Processor-specific versions for matmul

2016-11-20 Thread jvdelisle at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78379

--- Comment #16 from Jerry DeLisle  ---
(In reply to Thomas Koenig from comment #15)
> OMG, the world of processors is more complicated than I thought.
> So, these rather modern AMD chips support AVX, but suck at it.
> 
> Two questions:
> 
> - Can you check if -mfma3 and/or -mfma4 make any difference?
> 
> - If you start any program compiled with -g under the debugger, break
>   anywhere (for example at the beginning of the main program)
>   and do a "p __cpu_model", what do you get?

The A10-5800K
p __cpu_model
$1 = {__cpu_vendor = 2, __cpu_type = 5, __cpu_subtype = 8, 
  __cpu_features = {883711}}


The A8:
p __cpu_model
$2 = {__cpu_vendor = 2, __cpu_type = 9, __cpu_subtype = 0, 
  __cpu_features = {855039}}


The A6:
p __cpu_model
$1 = {__cpu_vendor = 2, __cpu_type = 0, __cpu_subtype = 0, 
  __cpu_features = {2111}}

neither -mfma nor -mfma4 help

[Bug fortran/69741] Bad error in forall with array loop counters

2016-11-20 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69741

kargl at gcc dot gnu.org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED
   Target Milestone|--- |5.5

--- Comment #15 from kargl at gcc dot gnu.org ---
Harald's patch committed to 5-branch, 6-branch, and trunk.  Closing.

[Bug fortran/69741] Bad error in forall with array loop counters

2016-11-20 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69741

--- Comment #14 from kargl at gcc dot gnu.org ---
Author: kargl
Date: Sun Nov 20 20:14:18 2016
New Revision: 242643

URL: https://gcc.gnu.org/viewcvs?rev=242643=gcc=rev
Log:
2016-11-20  Harald Anlauf  

PR fortran/69741
* resolve.c (gfc_resolve_forall): Check for nonscalar index variables.

2016-11-20  Harald Anlauf  

PR fortran/69741
* gfortran.dg/forall_18.f90: New testcase.

Added:
branches/gcc-5-branch/gcc/testsuite/gfortran.dg/forall_18.f90
Modified:
branches/gcc-5-branch/gcc/fortran/ChangeLog
branches/gcc-5-branch/gcc/fortran/resolve.c
branches/gcc-5-branch/gcc/testsuite/ChangeLog

[Bug fortran/69741] Bad error in forall with array loop counters

2016-11-20 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69741

--- Comment #13 from kargl at gcc dot gnu.org ---
Author: kargl
Date: Sun Nov 20 20:12:18 2016
New Revision: 242642

URL: https://gcc.gnu.org/viewcvs?rev=242642=gcc=rev
Log:
2016-11-20  Harald Anlauf  

PR fortran/69741
* resolve.c (gfc_resolve_forall): Check for nonscalar index variables.

2016-11-20  Harald Anlauf  

PR fortran/69741
* gfortran.dg/forall_18.f90: New testcase.

Added:
branches/gcc-6-branch/gcc/testsuite/gfortran.dg/forall_18.f90
Modified:
branches/gcc-6-branch/gcc/fortran/ChangeLog
branches/gcc-6-branch/gcc/fortran/resolve.c
branches/gcc-6-branch/gcc/testsuite/ChangeLog

[Bug fortran/69741] Bad error in forall with array loop counters

2016-11-20 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69741

--- Comment #12 from kargl at gcc dot gnu.org ---
Author: kargl
Date: Sun Nov 20 18:43:16 2016
New Revision: 242641

URL: https://gcc.gnu.org/viewcvs?rev=242641=gcc=rev
Log:
2016-11-20  Harald Anlauf  

PR fortran/69741
* resolve.c (gfc_resolve_forall): Check for nonscalar index variables.

2016-11-20  Harald Anlauf  

PR fortran/69741
* gfortran.dg/forall_18.f90: New testcase.

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

[Bug middle-end/61409] [5/6 regression] -Wmaybe-uninitialized false-positive with -O2

2016-11-20 Thread aldyh at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61409

Aldy Hernandez  changed:

   What|Removed |Added

Summary|[5/6/7 regression]  |[5/6 regression]
   |-Wmaybe-uninitialized   |-Wmaybe-uninitialized
   |false-positive with -O2 |false-positive with -O2

--- Comment #26 from Aldy Hernandez  ---
Fixed in mainline.  Removing tag for GCC7.

[Bug driver/49726] [4.4/5/6/7 Regression] -g0 file.S -g does not produce debug info

2016-11-20 Thread jan.kratochvil at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49726

Jan Kratochvil  changed:

   What|Removed |Added

Summary|-g0 file.S -g does not  |[4.4/5/6/7 Regression] -g0
   |produce debug info  |file.S -g does not produce
   ||debug info

--- Comment #3 from Jan Kratochvil  ---
I have forgotten this PR and I have hit it again:

PASS: gcc (GCC) 4.2.5 20090330 (prerelease)
FAIL: gcc (GCC) 4.4.7
FAIL: gcc (GCC) 7.0.0 20161107 (experimental)
PASS: gcc-4.1.2-55.el5.x86_64
FAIL: gcc-6.2.1-2.fc24.x86_64
FAIL: gcc-4.4.7-17.el6.x86_64
FAIL: gcc-4.8.5-4.el7.x86_64

Unaware if it is a 4.3 regression or not, I do not have that version ready
here.

[Bug middle-end/61409] [5/6/7 regression] -Wmaybe-uninitialized false-positive with -O2

2016-11-20 Thread aldyh at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61409

--- Comment #25 from Aldy Hernandez  ---
Author: aldyh
Date: Sun Nov 20 18:34:06 2016
New Revision: 242639

URL: https://gcc.gnu.org/viewcvs?rev=242639=gcc=rev
Log:
PR middle-end/61409
* tree-ssa-uninit.c: Define new global max_phi_args.
(compute_uninit_opnds_pos): Use max_phi_args.
(prune_uninit_phi_opnds): Same.
(use_pred_not_overlap_with_undef_path_pred): Remove reference to
missing NUM_PREDS in function comment.
(can_one_predicate_be_invalidated_p): New.
(can_chain_union_be_invalidated_p): New.
(flatten_out_predicate_chains): New.
(uninit_ops_invalidate_phi_use): New.
(is_use_properly_guarded): Call uninit_ops_invalidate_phi_use.

Added:
trunk/gcc/testsuite/gcc.dg/uninit-pr61409.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/tree-ssa-uninit.c

[Bug middle-end/78433] [7 Regression] glibc posix/execvpe.c gets miscompiled with -O3

2016-11-20 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78433

--- Comment #4 from Markus Trippelsdorf  ---
On X86_64:

--- good2016-11-20 19:12:27.353412333 +0100
+++ bad 2016-11-20 19:13:37.738531151 +0100
@@ -892,7 +892,7 @@
leaq1(%rax), %rdx
cmpq$0, -8(%r12,%rdx,8)
jne .L115
-   leaq38(,%rax,8), %rax
+   leaq31(,%rax,8), %rax
movq%rsp, %r14
andq$-16, %rax
subq%rax, %rsp
@@ -1009,7 +1009,7 @@
leaq1(%rdx), %rax
cmpq$0, -8(%r12,%rax,8)
jne .L132
-   leaq38(,%rdx,8), %rdx
+   leaq31(,%rdx,8), %rdx
movq%rsp, -112(%rbp)
movq-56(%rbp), %rcx
andq$-16, %rdx

[Bug middle-end/78433] [7 Regression] glibc posix/execvpe.c gets miscompiled with -O3

2016-11-20 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78433

Markus Trippelsdorf  changed:

   What|Removed |Added

 Target|powerpc |
  Component|target  |middle-end

--- Comment #3 from Markus Trippelsdorf  ---
This happens on all targets.

[Bug go/78432] [7 Regression] -fdump-go-spec ICEs for aligned causing x32 libgo library to fail to build

2016-11-20 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78432

--- Comment #1 from Andrew Pinski  ---
PR 78431 might be the same issue and has the revision ranges where this might
be introduced too.

[Bug go/78431] [7 regression] ICE in go_append_padding, at godump.c:636

2016-11-20 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78431

--- Comment #1 from Andrew Pinski  ---
PR 78432 might be the same issue even with a reduced testcase.

[Bug go/78432] [7 Regression] -fdump-go-spec ICEs for aligned causing x32 libgo library to fail to build

2016-11-20 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78432

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||build
 Target|x86_64-linux-gnu,   |x86_64-linux-gnu
   |x86_64-linux-gnux32,|
   |i686-linux-gnu  |
 CC||cmang at google dot com
  Component|bootstrap   |go
   Assignee|unassigned at gcc dot gnu.org  |ian at airs dot com
   Target Milestone|--- |7.0
Summary|[7 Regression] bootstrap|[7 Regression]
   |broken on x86_64-linux-gnu  |-fdump-go-spec ICEs for
   |(libgo x32 multilibs)   |aligned causing x32 libgo
   ||library to fail to build

[Bug middle-end/78433] [7 Regression] glibc posix/execvpe.c gets miscompiled with -O3

2016-11-20 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78433

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |7.0

[Bug libstdc++/58638] libstdc++ builds as non-PIC when --with-pic is specified

2016-11-20 Thread neotheuser at ymail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58638

Alec Ari  changed:

   What|Removed |Added

 CC||neotheuser at ymail dot com

--- Comment #11 from Alec Ari  ---
This fix worked for me:

--- a/libstdc++-v3/configure.ac
+++ b/libstdc++-v3/configure.ac
@@ -121,8 +121,8 @@ if test "$enable_shared" = yes; then
   glibcxx_compiler_shared_flag="-D_GLIBCXX_SHARED"

 else
-  glibcxx_lt_pic_flag=
-  glibcxx_compiler_pic_flag=
+  glibcxx_lt_pic_flag="-prefer-pic"
+  glibcxx_compiler_pic_flag="$lt_prog_compiler_pic_CXX"
   glibcxx_compiler_shared_flag=
 fi

(no elif / no else if)

Thanks guys, finally having GCC compiled!

[Bug libstdc++/28811] --with-pic vs static libraries and libstdc++

2016-11-20 Thread neotheuser at ymail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=28811

--- Comment #26 from Alec Ari  ---
To avoid fully recompiling GCC, I modified libstdc++-v3/configure (not .ac) and
made the following change:

--- a/libstdc++-v3/configure
+++ b/libstdc++-v3/configure
@@ -15014,8 +15014,8 @@ if test "$enable_shared" = yes; then
   glibcxx_compiler_shared_flag="-D_GLIBCXX_SHARED"

 else
-  glibcxx_lt_pic_flag=
-  glibcxx_compiler_pic_flag=
+  glibcxx_lt_pic_flag="-prefer-pic"
+  glibcxx_compiler_pic_flag="$lt_prog_compiler_pic_CXX"
   glibcxx_compiler_shared_flag=
 fi

Special thanks to the guys in this thread, problem solved.

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58638

[Bug libgcc/77813] __TMC_END__ - __TMC_LIST__ == 0

2016-11-20 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77813

Marc Glisse  changed:

   What|Removed |Added

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

--- Comment #4 from Marc Glisse  ---
.

[Bug middle-end/78435] New: bogus array subscript warning

2016-11-20 Thread bernd.edlinger at hotmail dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78435

Bug ID: 78435
   Summary: bogus array subscript warning
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: middle-end
  Assignee: unassigned at gcc dot gnu.org
  Reporter: bernd.edlinger at hotmail dot de
  Target Milestone: ---

Created attachment 40090
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40090=edit
reproducer

just another example:

gcc -c -Wall -O2 -c xpath.c
xpath.c:79:6: warning: array subscript is above array bounds [-Warray-bounds]
  work[buffersize - 1] = 0;
  ^~~~

[Bug c++/78434] Incorrect warning about missing align_val_t for placement new

2016-11-20 Thread marc.mutz at kdab dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78434

--- Comment #1 from Marc Mutz  ---
Created attachment 40089
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40089=edit
Testcase, compile with g++ -Wall -o 78434{,.cpp}

Actual Output:

  78434.cpp:11:30: warning: ‘new’ of type ‘Align128’ with extended alignment
128 [-Waligned-new=]
 new (buf) Align128{1.0, 2.0};
^
  78434.cpp:11:30: note: uses ‘void* operator new(std::size_t, void*)’, which
does not have an alignment parameter
  78434.cpp:11:30: note: use ‘-faligned-new’ to enable C++17 over-aligned new
support

Expected Output: none. placement new has no overload taking std::align_val_t.

[Bug c++/78434] New: Incorrect warning about missing align_val_t for placement new

2016-11-20 Thread marc.mutz at kdab dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78434

Bug ID: 78434
   Summary: Incorrect warning about missing align_val_t for
placement new
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: marc.mutz at kdab dot com
  Target Milestone: ---

GCC incorrectly warns about a missing std::align_val_t argument on a
placement-new expression:

  qtbase-5.6/src/corelib/tools/qvector.h:663:5: warning: ‘new’ of type
‘Aligned128’ with extended alignment 128 [-Waligned-new=]
   new (d->end()) T(std::move(t));
   ^~
  qtbase-5.6/src/corelib/tools/qvector.h:663:5: note: uses ‘void* operator
new(std::size_t, void*)’, which does not have an alignment parameter
  qtbase-5.6/src/corelib/tools/qvector.h:663:5: note: use ‘-faligned-new’ to
enable C++17 over-aligned new support

This is with g++ -v

  Using built-in specs.
  COLLECT_GCC=/d/gcc/trunk/bin/g++
 
COLLECT_LTO_WRAPPER=/d/gcc/trunk/libexec/gcc/x86_64-pc-linux-gnu/7.0.0/lto-wrapper
  Target: x86_64-pc-linux-gnu
  Configured with: ../gcc/configure --prefix=/d/gcc/trunk
--enable-checking=release --enable-languges=c,c++,fortran,lto,objc,obj-c++
  Thread model: posix
  gcc version 7.0.0 20161005 (experimental) (GCC)

[Bug fortran/78395] [OOP] error on polymorphic assignment

2016-11-20 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78395

--- Comment #9 from vehre at gcc dot gnu.org ---
Author: vehre
Date: Sun Nov 20 14:21:43 2016
New Revision: 242637

URL: https://gcc.gnu.org/viewcvs?rev=242637=gcc=rev
Log:
gcc/testsuite/ChangeLog:

2016-11-20  Andre Vehreschild  

PR fortran/78395
* gfortran.dg/typebound_operator_21.f03: New test.

gcc/fortran/ChangeLog:

2016-11-20  Andre Vehreschild  

PR fortran/78395
* resolve.c (resolve_typebound_function): Prevent stripping of refs,
when the base-expression is a class' typed one.


Added:
trunk/gcc/testsuite/gfortran.dg/typebound_operator_21.f03
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/resolve.c
trunk/gcc/testsuite/ChangeLog

[Bug libgcc/77813] __TMC_END__ - __TMC_LIST__ == 0

2016-11-20 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77813

--- Comment #3 from Marc Glisse  ---
Author: glisse
Date: Sun Nov 20 13:35:27 2016
New Revision: 242635

URL: https://gcc.gnu.org/viewcvs?rev=242635=gcc=rev
Log:
Protect __TMC_END__ - __TMC_LIST__ == 0

2016-11-20  Marc Glisse  

PR libgcc/77813
* crtstuff.c (deregister_tm_clones, register_tm_clones): Hide
__TMC_END__ behind a passthrough asm.


Modified:
trunk/libgcc/ChangeLog
trunk/libgcc/crtstuff.c

[Bug tree-optimization/78433] [7 Regression] glibc posix/execvpe.c gets miscompiled with -O3

2016-11-20 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78433

--- Comment #2 from Markus Trippelsdorf  ---
On pcc64le this is the assembly diff:

--- good2016-11-20 12:43:40.318860969 +
+++ bad 2016-11-20 12:42:57.277928999 +
@@ -178,7 +178,7 @@
sldi 9,9,3
ld 10,0(1)
mr 26,1
-   addi 9,9,38
+   addi 9,9,31
addis 25,2,.LC2@toc@ha
rldicr 9,9,0,59
addi 25,25,.LC2@toc@l
@@ -286,7 +286,7 @@
sldi 9,9,3
ld 10,0(1)
mr 23,1
-   addi 9,9,38
+   addi 9,9,31
cmpdi 7,5,1
rldicr 9,9,0,59
neg 9,9

[Bug tree-optimization/78433] [7 Regression] glibc posix/execvpe.c gets miscompiled with -O3

2016-11-20 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78433

Markus Trippelsdorf  changed:

   What|Removed |Added

   Keywords||wrong-code
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-11-20
 CC||krebbel at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Markus Trippelsdorf  ---
Started with r242590:

commit 35d8be37ee5f4bc13bb3ee30b55c0c379e9a89a2
Author: krebbel 
Date:   Fri Nov 18 14:44:54 2016 +

Re-apply: Drop excess size used for run time allocated stack variables.

The patch got reverted after hitting PR77359 which turned out to be a
rs6000 backend problem.  Reapplying after the PR got fixed.

[Bug c++/47877] -fvisibility-inlines-hidden does not hide member template functions

2016-11-20 Thread jengelh at inai dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47877

Jan Engelhardt  changed:

   What|Removed |Added

 CC||jengelh at inai dot de,
   ||rguenther at suse dot de

--- Comment #1 from Jan Engelhardt  ---
The issue persists with gcc 6.2.1 and was also posted at
https://www.spinics.net/lists/gcchelp/msg46007.html with more detail.

[Bug tree-optimization/78433] New: [7 Regression] glibc posix/execvpe.c gets miscompiled with -O3

2016-11-20 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78433

Bug ID: 78433
   Summary: [7 Regression] glibc posix/execvpe.c gets miscompiled
with -O3
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: trippels at gcc dot gnu.org
  Target Milestone: ---

Created attachment 40088
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40088=edit
unreduced testcase

glibc's posix/execvpe.c gets miscompiled with -O3:

markus@x4 posix % ./tst-vfork3
script 1
script 1
script 1
script 1
script 1
/bin/sh: : No such file or directory
script2.sh failed with status 32512

12912 execve("/tmp/tst-vfork3.Ox2RZ9/script2.sh", ["script2.sh", "2"], [/* 53
vars */]) = -1 ENOEXEC (Exec format error)  
12912 execve("/bin/sh", ["/bin/sh", "\1", "2"], [/* 53 vars */]  

Notice the bogus "\1" in the second execve call.

 36 /* The file is accessible but it is not an executable file.  Invoke 
 37the shell to interpret it as a script.  */   
 38 static void 
 39 maybe_script_execute (const char *file, char *const argv[], char *const
envp[]) 
 40 {   
 41   ptrdiff_t argc = 0;   
 42   while (argv[argc++] != NULL)  
 43 {   
 44   if (argc == INT_MAX - 1)  
 45 {   
 46   errno = E2BIG;
 47   return;   
 48 }   
 49 }   
 50 
 51   /* Construct an argument list for the shell.  */  
 52   char *new_argv[argc + 1]; 
 53   new_argv[0] = (char *) _PATH_BSHELL;  
 54   new_argv[1] = (char *) file;  
 55   if (argc > 1) 
 56 memcpy (new_argv + 2, argv + 1, argc * sizeof(char *)); 
 57   else  
 58 new_argv[2] = NULL; 
 59 
 60   /* Execute the shell.  */ 
 61   __execve (new_argv[0], new_argv, envp);   
 62 }   
 63 
 64 
 65 /* Execute FILE, searching in the `PATH' environment variable if it
contains
 66no slashes, with arguments ARGV and environment from ENVP.  */   
 67 int 
 68 __execvpe (const char *file, char *const argv[], char *const envp[])
 69 {   
 70   /* We check the simple case first. */ 
 71   if (*file == '\0')
 72 {   
 73   __set_errno (ENOENT); 
 74   return -1;
 75 }   
 76 
 77   /* Don't search when it contains a slash.  */ 
 78   if (strchr (file, '/') != NULL)   
 79 {   
 80   __execve (file, argv, envp);  
 81 
 82   if (errno == ENOEXEC)   

[Bug bootstrap/78432] New: [7 Regression] bootstrap broken on x86_64-linux-gnu (libgo x32 multilibs)

2016-11-20 Thread doko at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78432

Bug ID: 78432
   Summary: [7 Regression] bootstrap broken on x86_64-linux-gnu
(libgo x32 multilibs)
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: bootstrap
  Assignee: unassigned at gcc dot gnu.org
  Reporter: doko at gcc dot gnu.org
  Target Milestone: ---

trunk fails to bootstrap with r242629, with go enabled and x32 multilibs
(--with-multilib-list=m32,m64,mx32)

$ cat sysinfo.i
typedef enum { a } b;
typedef struct { b abi; } c __attribute__((aligned));

$ /home/packages/gcc/snap/gcc-snapshot-20161119/build/gcc/xgcc
-B/home/packages/gcc/snap/gcc-snapshot-20161119/build/gcc/ -mx32
-fdump-go-spec=tmp-gen-sysinfo.go -std=gnu99 -S -o sysinfo.s sysinfo.i
sysinfo.i:2:16: internal compiler error: in go_append_padding, at godump.c:636
 typedef struct { b abi; } c __attribute__((aligned));
^
0x916b4a go_append_padding
../../src/gcc/godump.c:636
0x91800c go_format_type
../../src/gcc/godump.c:1014
0x9196f2 go_output_typedef
../../src/gcc/godump.c:1192
0x9196f2 go_finish
../../src/gcc/godump.c:1407
Please submit a full bug report,
with preprocessed source if appropriate.

[Bug go/78431] [7 regression] ICE in go_append_padding, at godump.c:636

2016-11-20 Thread ro at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78431

Rainer Orth  changed:

   What|Removed |Added

   Target Milestone|--- |7.0

[Bug go/78431] New: [7 regression] ICE in go_append_padding, at godump.c:636

2016-11-20 Thread ro at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78431

Bug ID: 78431
   Summary: [7 regression] ICE in go_append_padding, at
godump.c:636
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: go
  Assignee: ian at airs dot com
  Reporter: ro at gcc dot gnu.org
CC: cmang at google dot com
  Target Milestone: ---
  Host: sparc*-sun-solaris2.*
Target: sparc*-sun-solaris2.*
 Build: sparc*-sun-solaris2.*

Between 20161117 (r242574) and 20161118 (r242587), Solaris/SPARC bootstrap
began
to fail building libgo:

/var/gcc/regression/trunk/12-gcc/build/./gcc/xgcc
-B/var/gcc/regression/trunk/12-gcc/build/./gcc/
-B/vol/gcc/sparc-sun-solaris2.12/bin/ -B/vol/gcc/sparc-sun-solaris2.12/lib/
-isystem /vol/gcc/sparc-sun-solaris2.12/include -isystem
/vol/gcc/sparc-sun-solaris2.12/sys-include-DHAVE_CONFIG_H -I.
-I/vol/gcc/src/hg/trunk/local/libgo  -I
/vol/gcc/src/hg/trunk/local/libgo/runtime
-I/vol/gcc/src/hg/trunk/local/libgo/../libffi/include -I../libffi/include
-pthread  -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O
-fdump-go-spec=tmp-gen-sysinfo.go -std=gnu99 -S -o sysinfo.s
/vol/gcc/src/hg/trunk/local/libgo/sysinfo.c
/vol/gcc/src/hg/trunk/local/libgo/sysinfo.c:273:1: internal compiler error: in
go_append_padding, at godump.c:636
 };
 ^
0x766b3f go_append_padding
/vol/gcc/src/hg/trunk/local/gcc/godump.c:636
0x767a67 go_format_type
/vol/gcc/src/hg/trunk/local/gcc/godump.c:1014
0x7699eb go_output_typedef
/vol/gcc/src/hg/trunk/local/gcc/godump.c:1192
0x7699eb go_finish
/vol/gcc/src/hg/trunk/local/gcc/godump.c:1407

This boils down to

$ cc1 -fpreprocessed sysinfo.i -quiet -fdump-go-spec=tmp-gen-sysinfo.go -o
sysinfo.s

Thread 2 hit Breakpoint 1, fancy_abort (
file=file@entry=0x2b9bb0 "/vol/gcc/src/hg/trunk/local/gcc/godump.c", 
line=line@entry=636, 
function=function@entry=0x2b9f60 
"go_append_padding") at /vol/gcc/src/hg/trunk/local/gcc/diagnostic.c:1446
1446{
(gdb) where
#0  fancy_abort (
file=file@entry=0x2b9bb0 "/vol/gcc/src/hg/trunk/local/gcc/godump.c", 
line=line@entry=636, 
function=function@entry=0x2b9f60 
"go_append_padding") at /vol/gcc/src/hg/trunk/local/gcc/diagnostic.c:1446
#1  0x00766b40 in go_append_padding (ob=ob@entry=0xffbff7b4, from_offset=32, 
to_offset=28, align_units=, index=0, 
ret_offset=ret_offset@entry=0xffbff63c)
at /vol/gcc/src/hg/trunk/local/gcc/godump.c:636
#2  0x00767a68 in go_format_type (container=container@entry=0xffbff768, 
type=, use_type_name=use_type_name@entry=false, 
is_func_ok=is_func_ok@entry=false, p_art_i=0xffbff638, p_art_i@entry=0x0, 
is_anon_record_or_union=is_anon_record_or_union@entry=false)
at /vol/gcc/src/hg/trunk/local/gcc/godump.c:1014
#3  0x007699ec in go_output_typedef (decl=0xfb61ebb0, container=0xffbff768)
at /vol/gcc/src/hg/trunk/local/gcc/godump.c:1192
#4  go_finish (filename=)
at /vol/gcc/src/hg/trunk/local/gcc/godump.c:1407
#5  0x009e6b08 in compile_file ()
at /vol/gcc/src/hg/trunk/local/gcc/toplev.c:541
#6  0x009e8dd8 in do_compile ()
at /vol/gcc/src/hg/trunk/local/gcc/toplev.c:2007
#7  toplev::main (this=this@entry=0xffbff93e, argc=, 
argc@entry=7, argv=, argv@entry=0xffbff9a4)
at /vol/gcc/src/hg/trunk/local/gcc/toplev.c:2141
#8  0x0104ffac in main (argc=7, argv=0xffbff9a4)
at /vol/gcc/src/hg/trunk/local/gcc/main.c:39

[Bug sanitizer/78267] [7 Regression] libsanitizer breaks bootstrap on x86_64-apple-darwin16 at r241977

2016-11-20 Thread ro at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78267

--- Comment #55 from Rainer Orth  ---
Author: ro
Date: Sun Nov 20 10:51:53 2016
New Revision: 242634

URL: https://gcc.gnu.org/viewcvs?rev=242634=gcc=rev
Log:
Add PR sanitizer/78267 patch to libsanitizer/LOCAL_PATCHES

Modified:
trunk/libsanitizer/ChangeLog
trunk/libsanitizer/LOCAL_PATCHES

[Bug sanitizer/78267] [7 Regression] libsanitizer breaks bootstrap on x86_64-apple-darwin16 at r241977

2016-11-20 Thread ro at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78267

--- Comment #54 from Rainer Orth  ---
Author: ro
Date: Sun Nov 20 10:49:47 2016
New Revision: 242633

URL: https://gcc.gnu.org/viewcvs?rev=242633=gcc=rev
Log:
Fix libsanitizer build on OS X 10.1[01], macOS 10.12 (PR sanitizer/78267)

fixincludes:
PR sanitizer/78267
* inclhack.def (darwin_availabilityinternal, darwin_os_trace_1)
(darwin_os_trace_2, darwin_os_trace_3): New fixes.
(hpux_stdint_least_fast): Remove spurious _EOFix_.
* fixincl.x: Regenerate.
* tests/bases/AvailabilityInternal.h: New file.
* tests/bases/os/trace.h: New file.

2016-11-20  Jack Howarth  

libsanitizer:
PR sanitizer/78267
* sanitizer_common/sanitizer_mac.cc: Include  only if
compiler supports blocks extension.

Added:
trunk/fixincludes/tests/base/AvailabilityInternal.h
trunk/fixincludes/tests/base/os/
trunk/fixincludes/tests/base/os/trace.h
Modified:
trunk/fixincludes/ChangeLog
trunk/fixincludes/fixincl.x
trunk/fixincludes/inclhack.def
trunk/libsanitizer/ChangeLog
trunk/libsanitizer/sanitizer_common/sanitizer_mac.cc

[Bug libstdc++/78430] libstc++-v3 Build failed

2016-11-20 Thread aa-c-aa at mail dot ru
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78430

--- Comment #1 from Armleo  ---
System: Ubuntu server 16.04 x64 Azure

[Bug libfortran/78379] Processor-specific versions for matmul

2016-11-20 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78379

--- Comment #15 from Thomas Koenig  ---
OMG, the world of processors is more complicated than I thought.
So, these rather modern AMD chips support AVX, but suck at it.

Two questions:

- Can you check if -mfma3 and/or -mfma4 make any difference?

- If you start any program compiled with -g under the debugger, break
  anywhere (for example at the beginning of the main program)
  and do a "p __cpu_model", what do you get?

I am halfway tempted to restrict the AVX* stuff to Intel processors
only.  At least, this way we will not make things worse for AMD
processors.

[Bug libstdc++/78430] New: libstc++-v3 Build failed

2016-11-20 Thread aa-c-aa at mail dot ru
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78430

Bug ID: 78430
   Summary: libstc++-v3 Build failed
   Product: gcc
   Version: 6.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libstdc++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: aa-c-aa at mail dot ru
  Target Milestone: ---

Hello! I have problem building GCC Toolchain
Configure from `~/mips-tc/` with gcc in `~/gcc-6.2.0`:
../gcc-6.2.0/configure --prefix=$HOME/mips-tc --target=mips-elf
--without-headers --with-gnu-ld --with-gnu-as --disable-libssp --disable-nls
--enable-c99 --enable-long-long --disable-libatomic --disable-libgomp
--disable-libquadmath --disable-libmudflap --disable-shared --disable-threads
--disable-multilib --enable-languages=c,c++

make
And in `make` stage after a 3 nights of compilation i am getting this error:

/home/armleo/gcc-bu/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs/libstdc++.a:
error adding symbols: Bad value
collect2: error: ld returned 1 exit status
Makefile:439: recipe for target 'libcc1.la' failed
make[3]: *** [libcc1.la] Error 1
make[3]: Leaving directory '/home/armleo/gcc-bu/libcc1'
Makefile:321: recipe for target 'all' failed
make[2]: *** [all] Error 2
make[2]: Leaving directory '/home/armleo/gcc-bu/libcc1'
Makefile:15586: recipe for target 'all-libcc1' failed
make[1]: *** [all-libcc1] Error 2
make[1]: Leaving directory '/home/armleo/gcc-bu'
Makefile:918: recipe for target 'all' failed
make: *** [all] Error 2

What means this error and what i can do?
THX for ant help!

[Bug c/78429] New: ice on valid C code on x86_64-linux-gnu at -O3 in both 32-bit and 64-bit modes (internal compiler error: in set_value_range, at tree-vrp.c:361)

2016-11-20 Thread chengniansun at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78429

Bug ID: 78429
   Summary: ice on valid C code on x86_64-linux-gnu at -O3 in both
32-bit and 64-bit modes (internal compiler error: in
set_value_range, at tree-vrp.c:361)
   Product: gcc
   Version: 7.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: chengniansun at gmail dot com
  Target Milestone: ---

$ 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 20161119 (experimental) [trunk revision 242629] (GCC)
$
$ gcc-trunk small.c -O3
small.c: In function ‘main’:
small.c:6:5: internal compiler error: in set_value_range, at tree-vrp.c:361
 int main() {
 ^~~~
0xe7fe08 set_value_range
../../gcc-source-trunk/gcc/tree-vrp.c:360
0xe85ce7 set_and_canonicalize_value_range
../../gcc-source-trunk/gcc/tree-vrp.c:1527
0xe85ce7 extract_range_for_var_from_comparison_expr
../../gcc-source-trunk/gcc/tree-vrp.c:1579
0xe96cbd extract_range_from_assert
../../gcc-source-trunk/gcc/tree-vrp.c:1777
0xe96cbd extract_range_from_assignment
../../gcc-source-trunk/gcc/tree-vrp.c:4144
0xe978d0 vrp_visit_assignment_or_call
../../gcc-source-trunk/gcc/tree-vrp.c:7115
0xe978d0 extract_range_from_stmt
../../gcc-source-trunk/gcc/tree-vrp.c:7903
0xe98e94 vrp_visit_stmt
../../gcc-source-trunk/gcc/tree-vrp.c:7924
0xd9b73e simulate_stmt
../../gcc-source-trunk/gcc/tree-ssa-propagate.c:241
0xd9d1f7 simulate_block
../../gcc-source-trunk/gcc/tree-ssa-propagate.c:375
0xd9d1f7 ssa_propagate(ssa_prop_result (*)(gimple*, edge_def**, tree_node**),
ssa_prop_result (*)(gphi*))
../../gcc-source-trunk/gcc/tree-ssa-propagate.c:808
0xe8e881 execute_vrp
../../gcc-source-trunk/gcc/tree-vrp.c:11204
0xe8e881 execute
../../gcc-source-trunk/gcc/tree-vrp.c:11291
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.
$
$ cat small.c
int a[6];
char b;
unsigned c;
short d;
volatile int e;
int main() {
  int f;
  for (; c <= 2; c++) {
d = 3;
for (; d >= 0; d--) {
  int g = b;
  f = a[d] || b;
}
f || e;
  }
  return 0;
}