[Bug rtl-optimization/82778] New: crash: insn does not satisfy its constraints

2017-10-30 Thread babokin at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82778

Bug ID: 82778
   Summary: crash: insn does not satisfy its constraints
   Product: gcc
   Version: 8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: rtl-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: babokin at gmail dot com
  Target Milestone: ---

gcc trunk rev254211, x86_64.

> cat f.cpp
template  struct c {
  typedef a d[b];
  static a e(d f, int g) { return f[g]; }
};
template  struct B {
  typedef c h;
  typename h::d i;
  long j;
  a at() { return h::e(i, j); }
};
int k, m, r, s, t;
char l, n, q;
short o, p, w;
struct C {
  int u;
};
B v;
void x() {
  if (((p > (q ? v.at().u : k)) >> l - 226) + !(n ^ r * m))
s = ((-(((p > (q ? v.at().u : k)) >> l - 226) + !(n ^ r * m)) < 0) /
 (-(((p > (q ? v.at().u : k)) >> l - 226) + !(n ^ r * m)) ^
  -25 & o) &&
 p) >>
(0 <= 0
 ? 0 ||
   (-(((p > (q ? v.at().u : k)) >> l - 226) + !(n ^ r * m)) <
0) /
   (-(((p > (q ? v.at().u : k)) >> l - 226) +
  !(n ^ r * m)) ^
-25 & o)
 : 0);
  w = (p > (q ? v.at().u : k)) >> l - 226;
  t = !(n ^ r * m);
}

> gcc -O2 -c f.cpp
f.cpp: In function ‘void x()’:
f.cpp:34:1: error: insn does not satisfy its constraints:
 }
 ^
(insn 77 75 37 4 (parallel [
(set (reg:CCZ 17 flags)
(compare:CCZ (plus:SI (reg:SI 0 ax [orig:95 _9 ] [95])
(reg:SI 1 dx [orig:102 _16 ] [102]))
(const_int 0 [0])))
(set (reg:SI 2 cx [orig:103 _17 ] [103])
(plus:SI (reg:SI 0 ax [orig:95 _9 ] [95])
(reg:SI 1 dx [orig:102 _16 ] [102])))
]) "f.cpp":19 225 {*addsi_2}
 (expr_list:REG_UNUSED (reg:SI 2 cx [orig:103 _17 ] [103])
(nil)))
during RTL pass: cprop_hardreg
f.cpp:34:1: internal compiler error: in extract_constrain_insn, at recog.c:2207
0x61c877 _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
../../gcc/gcc/rtl-error.c:108
0x61c89d _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
../../gcc/gcc/rtl-error.c:118
0xdf60bd extract_constrain_insn(rtx_insn*)
../../gcc/gcc/recog.c:2207
0xdff55f copyprop_hardreg_forward_1
../../gcc/gcc/regcprop.c:790
0xe001df execute
../../gcc/gcc/regcprop.c:1296
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

[Bug target/82674] ICE with -fstack-clash-protection

2017-10-30 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82674

--- Comment #7 from Jeffrey A. Law  ---
Cool.  I've got systems here that are primed for testing, so if you could pass
the patch along I can do spins fairly easily.

[Bug libstdc++/82777] incorrect result of std::filesystem::path::lexically_normal

2017-10-30 Thread hotwatermorning at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82777

--- Comment #1 from hotwatermorning at gmail dot com ---
I apologize that the snippet has typos. ( s/except/expect/ )

[Bug libstdc++/82777] New: incorrect result of std::filesystem::path::lexically_normal

2017-10-30 Thread hotwatermorning at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82777

Bug ID: 82777
   Summary: incorrect result of
std::filesystem::path::lexically_normal
   Product: gcc
   Version: 8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libstdc++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: hotwatermorning at gmail dot com
  Target Milestone: ---

With gcc HEAD 8.0.0 20171029, std::filesystem::path::lexically_normal() returns
an incorrect path.

And maybe because of this bug, std::filesystem::weakly_canonical() also returns
an incorrect path.

#include 
#include 
namespace fs = std::filesystem;

using namespace std;

int main()
{
fs::create_directories("./a/b");

fs::path p("./a/b/c/../.././b/c");

// except "a/b/c"
// but the result will be "a/b/../b/c"
cout << "lexically canonical :" << p.lexically_normal() << endl;
// except "/path-to/current-dir/a/b/c"
// but the result will be "/path-to/current-dir/a/b/b/c"
cout << "weakly_canonical : " << fs::weakly_canonical(p) << endl;
}

An executable version is here.
https://wandbox.org/permlink/FFxvS5OwA51iyQ5B

[Bug tree-optimization/82485] [8 Regression] ICE in sp_valid_at, at config/i386/i386.c:13232

2017-10-30 Thread daniel.santos at pobox dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82485

--- Comment #4 from Daniel Santos  ---
Can you please mark this as a duplicate of pr82002?  I have a fix submitted. 
Thanks!

[Bug target/82712] [8 Regression] ICE in sp_valid_at, at config/i386/i386.c:11383

2017-10-30 Thread daniel.santos at pobox dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82712

--- Comment #1 from Daniel Santos  ---
Could you please close this as a duplicate of pr82002?  I've got a (full) fix
submitted now.  Thanks.

[Bug tree-optimization/82776] New: Unable to optimize the loop when iteration count is unavailable.

2017-10-30 Thread hiraditya at msn dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82776

Bug ID: 82776
   Summary: Unable to optimize the loop when iteration count is
unavailable.
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: hiraditya at msn dot com
  Target Milestone: ---

Compiling with 

g++ -O2 --std=c++14 -msse4 -DENABLE_FORLOOP
vs.
g++ -O2 --std=c++14 -msse4

gives dramatically different results in the sense that the loop is completely
optimized when for-loop is present instead of `while(true)` loop. Reproduces
with g++-7.2 and g++-trunk.


$ cat test.cpp

#include 
#include 
#include 
#include 
#include 
#include 
#include 

struct Chunk {
  std::array tags_;
  uint8_t control_;

  bool eof() const {
return (control_ & 1) != 0;
  }

  static constexpr unsigned kFullMask = (1 << 14) - 1;

  __m128i const* tagVector() const {
return static_cast<__m128i const*>(static_cast(_[0]));
  }

  unsigned emptyMask() const {
auto tagV = _mm_load_si128(tagVector());
auto emptyTagV = _mm_cmpeq_epi8(tagV, _mm_setzero_si128());
return _mm_movemask_epi8(emptyTagV) & kFullMask;
  }

  unsigned occupiedMask() const {
return emptyMask() ^ kFullMask;
  }
};

#define LIKELY(x) __builtin_expect((x), true)
#define UNLIKELY(x) __builtin_expect((x), false)

struct Iter {
  Chunk* chunk_;
  std::size_t index_;

  void advance() {
// common case is packed entries
while (index_ > 0) {
  --index_;
  if (LIKELY(chunk_->tags_[index_] != 0)) {
return;
  }
}

// bar only skips the work of advance() if this loop can
// be guaranteed to terminate
#ifdef ENABLE_FORLOOP
for (std::size_t i = 1; i != 0; ++i) {
#else
while (true) {
#endif
  // exhausted the current chunk
  if (chunk_->eof()) {
chunk_ = nullptr;
break;
  }
  ++chunk_;
  auto m = chunk_->occupiedMask();
  if (m != 0) {
index_ = 31 - __builtin_clz(m);
break;
  }
}
  }
};

static Iter foo(Iter iter) {
  puts("hello");
  iter.advance();
  return iter;
}

void bar(Iter iter) {
  foo(iter);
}

[Bug gcov-profile/82702] gcov intermediate format is creating multiple 'gcov' files, it was creating a single file up to GCC 6

2017-10-30 Thread mcastelluccio at mozilla dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82702

--- Comment #7 from Marco Castelluccio  ---
(In reply to Martin Liška from comment #6)
> Marco is right that it started with the mentioned revision. But let me start
> in more general context:
> 
> Consider virtual.cpp file that includes some standard header files.
> In that case gcov tool can be invoked with arbitrary file extension, because
> the file name is only used to find a proper gc{da,no} file:
> 
> $ gcov virtual.abcdef
> File 'virtual.cpp'
> Lines executed:100.00% of 9
> Creating 'virtual.cpp.gcov'
> 
> File '/home/marxin/bin/gcc2/include/c++/7.2.1/iostream'
> Lines executed:100.00% of 1
> Creating 'iostream.gcov'
> 
> Even if you rename virtual.gcno and virtual.gcda to x.gcno (x.gcda
> respectively):
> 
> $ gcov x.gcda
> File 'virtual.cpp'
> Lines executed:100.00% of 9
> Creating 'virtual.cpp.gcov'
> 
> File '/home/marxin/bin/gcc2/include/c++/7.2.1/iostream'
> Lines executed:100.00% of 1
> Creating 'iostream.gcov'
> 
> Because each gcno file contains locations for all function, it has exactly
> one source file and multiple header files. Here we come to intermediate
> format. I would prefer to generate same sets of .gcov files for both normal
> and intermediate format. I consider it more stable.
> 
> In your use case, I would suggest to support -l (--long-names) in
> intermediate format and use the path for content of intermediate file:
> 
> file:/home/marxin/bin/gcc2/include/c++/7.2.1/iostream.gcov
> 
> Doing so, one can concatenate all *.gcov files and use it for tools like
> lcov. I know it's behavior change, but can help if you have problem with
> number of files that need to be filled to lcov?

We are not using directly lcov, but a replacement we rewrote in Rust.
We can easily support reading from multiple gcov files instead of one
(actually, we already support it when llvm is used, since it doesn't support
the intermediate format).
The only problem is that it slows down parsing for large projects, which is
unfortunate since I guess the intermediate format was introduced to speed-up
parsing. We have a lot of included files (e.g. I just run it with one of our
gcno files and it generated 160
gcov files), so clearly opening and reading thousands of files is faster than
opening and reading hundreds of thousands.

[Bug c++/81957] ICE decltype

2017-10-30 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81957

Paolo Carlini  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |paolo.carlini at oracle 
dot com

--- Comment #2 from Paolo Carlini  ---
Mine.

[Bug target/82725] [8 Regression] [x86_64] internal compiler error: in change_address_1, at emit-rtl.c:2162

2017-10-30 Thread ibuclaw at gdcproject dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82725

--- Comment #9 from Iain Buclaw  ---
Confirmed on my side, thanks.

[Bug c/82775] int += float different from int = int + float on Intel x87

2017-10-30 Thread jsm28 at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82775

Joseph S. Myers  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #1 from Joseph S. Myers  ---
Fixed for GCC 8.

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

[Bug c/82071] Error in assign-ops in combination with FLT_EVAL_METHOD

2017-10-30 Thread jsm28 at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82071

Joseph S. Myers  changed:

   What|Removed |Added

 CC||tydeman at tybor dot com

--- Comment #6 from Joseph S. Myers  ---
*** Bug 82775 has been marked as a duplicate of this bug. ***

[Bug c/82775] New: int += float different from int = int + float on Intel x87

2017-10-30 Thread tydeman at tybor dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82775

Bug ID: 82775
   Summary: int += float different from int = int + float on Intel
x87
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: tydeman at tybor dot com
  Target Milestone: ---

/* 
 * 3 different answers from 4 "same" expressions for Intel x87 (not sse2).
 * 5580 5556 5581 5581
 * CFLAGS="-H -std=gnu11 -O0 -march=native -mfpmath=387 -mieee-fp -fno-builtin
-frounding-math -ffloat-store -fexcess-precision=standard -fsignaling-nans"
 */

#include 

int main(void){
  int i1 = 0x;
  int i2 = 0x;
  int i3 = 0x;
  int i4 = 0x;
  float one = 1.f;

  i1 += one;
  i2 += 1.f;
  i3 = i3 + one;
  i4 = i4 + 1.f;
  (void)printf("%x %x %x %x\n", i1, i2, i3, i4);

  return 0;
}

[Bug c++/82293] [8 Regression] ICE in nonlambda_method_basetype at gcc/cp/lambda.c:886

2017-10-30 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82293

Paolo Carlini  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-10-30
 Ever confirmed|0   |1

[Bug c++/82279] [C++17] ICE in tsubst_pack_expansion, at cp/pt.c:11514

2017-10-30 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82279

Paolo Carlini  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #1 from Paolo Carlini  ---
Dup.

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

[Bug c++/82331] [7/8 Regression] ICE specializing template for function pointer

2017-10-30 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82331

Paolo Carlini  changed:

   What|Removed |Added

 CC||s.gesemann at gmail dot com

--- Comment #2 from Paolo Carlini  ---
*** Bug 82279 has been marked as a duplicate of this bug. ***

[Bug c++/67491] [meta-bug] concepts issues

2017-10-30 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67491
Bug 67491 depends on bug 67595, which changed state.

Bug 67595 Summary: concepts code causes segfault
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67595

   What|Removed |Added

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

[Bug c++/67595] concepts code causes segfault

2017-10-30 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67595

Paolo Carlini  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC|paolo.carlini at oracle dot com|
 Resolution|--- |FIXED
   Target Milestone|--- |6.2

--- Comment #7 from Paolo Carlini  ---
Fixed in 6.2.0.

[Bug c++/67595] concepts code causes segfault

2017-10-30 Thread paolo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67595

--- Comment #6 from paolo at gcc dot gnu.org  ---
Author: paolo
Date: Mon Oct 30 22:41:21 2017
New Revision: 254245

URL: https://gcc.gnu.org/viewcvs?rev=254245=gcc=rev
Log:
2017-10-30  Paolo Carlini  

PR c++/67595
* g++.dg/concepts/pr67595.C: New.

Added:
trunk/gcc/testsuite/g++.dg/concepts/pr67595.C
Modified:
trunk/gcc/testsuite/ChangeLog

[Bug libfortran/80850] Sourced allocate() fails to allocate a pointer

2017-10-30 Thread pault at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80850

--- Comment #24 from Paul Thomas  ---
Author: pault
Date: Mon Oct 30 22:07:25 2017
New Revision: 254244

URL: https://gcc.gnu.org/viewcvs?rev=254244=gcc=rev
Log:
2017-10-30  Paul Thomas  

PR fortran/80850
* trans_expr.c (gfc_conv_procedure_call): When passing a class
argument to an unlimited polymorphic dummy, it is wrong to cast
the passed expression as unlimited, unless it is unlimited. The
correct way is to assign to each of the fields and set the _len
field to zero.

2017-10-30  Paul Thomas  

PR fortran/80850
* gfortran.dg/class_64_f90 : New test.

Added:
trunk/gcc/testsuite/gfortran.dg/class_64.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/trans-expr.c
trunk/gcc/testsuite/ChangeLog

[Bug c++/82773] Function-type non-type template parameter not accepted

2017-10-30 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82773

Jonathan Wakely  changed:

   What|Removed |Added

   Keywords||rejects-valid
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-10-30
 Ever confirmed|0   |1

--- Comment #1 from Jonathan Wakely  ---
Yes, I think the type of foo should be adjusted to T*

[Bug fortran/82774] Structure constructor and deferred type parameter character component

2017-10-30 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82774

kargl at gcc dot gnu.org changed:

   What|Removed |Added

   Priority|P3  |P4
  Known to fail||8.0

--- Comment #1 from kargl at gcc dot gnu.org ---
A thread in c.l.f has exposed a problem with a structure
constructor and a deferred character components.  Consider
the code


% a.f90
program main
   implicit none
   type stuff
  character(:), allocatable :: key
   end type stuff
   type(stuff) nonsense, total
   nonsense = stuff('Xe')
   total = stuff(nonsense%key)
   if (nonsense%key /= total%key) call abort
   if (len(total%key) /= 2) call abort
end program main

% gfcx -o z a.f90 && ./z
Abort (core dumped)

If the line 

   total = stuff(nonsense%key)

is replaced by 

   total = stuff(trim(nonsense%key))

then the program compiles and runs correctly.
Thus, the reference to nonsense%key is not
being probably evaluated in the original 
program.  This can be seen in the dump file.


  {
struct stuff stuff.0;
struct stuff D.3538;

stuff.0.key = (character(kind=1)[1:0] *) __builtin_malloc (2);
stuff.0._key_length = 2;
(void) __builtin_memcpy ((void *) stuff.0.key, (void *) "Xe", 2);
D.3538 = nonsense;
nonsense = stuff.0;
if (D.3538.key != 0B)
  {
__builtin_free ((void *) D.3538.key);
D.3538.key = 0B;
  }
  }

  {
struct stuff stuff.1;
struct stuff D.3540;

stuff.1.key = (character(kind=1)[1:0] *) __builtin_malloc (1);
stuff.1._key_length = 0;
(void) __builtin_memcpy ((void *) stuff.1.key, (void *) nonsense.key,
(unsigned long) nonsense._key_length);
D.3540 = total;
total = stuff.1;
if (D.3540.key != 0B)
  {
__builtin_free ((void *) D.3540.key);
D.3540.key = 0B;
  }
  }

stuff.1 is clearly wrong.

[Bug fortran/82774] New: Structure constructor and deferred type parameter character component

2017-10-30 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82774

Bug ID: 82774
   Summary: Structure constructor and deferred type parameter
character component
   Product: gcc
   Version: 8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: kargl at gcc dot gnu.org
  Target Milestone: ---

[Bug c/82772] GCC crashes as compiling ags_thread.c source file on alpha architecture

2017-10-30 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82772

--- Comment #3 from Uroš Bizjak  ---
(In reply to Joël Krähemann from comment #1)
> Created attachment 42501 [details]
> gcc dump as tarball

I can't get the preprocessed source from the tarball. There is only one
gcc-dump.txt file inside, and its contents aren't parseable by the compiler.

Can you post instructions, how to get preprocessed source from the tarball?

That said, the fix is probably:

--cut here--
Index: config/alpha/sync.md
===
--- config/alpha/sync.md(revision 254212)
+++ config/alpha/sync.md(working copy)
@@ -24,7 +24,7 @@
   [(plus "add_operand") (minus "reg_or_8bit_operand")
(ior "or_operand") (xor "or_operand") (and "and_operand")])
 (define_code_attr fetchop_constr
-  [(plus "rKL") (minus "rI") (ior "rIN") (xor "rIN") (and "riNM")])
+  [(plus "rKL") (minus "rI") (ior "rIN") (xor "rIN") (and "rINM")])


 (define_expand "memory_barrier"
--cut here--

[Bug c++/82773] New: Function-type non-type template parameter not accepted

2017-10-30 Thread support at neoee dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82773

Bug ID: 82773
   Summary: Function-type non-type template parameter not accepted
   Product: gcc
   Version: 7.2.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: support at neoee dot net
  Target Milestone: ---

When instantiating a C++ function template passing a function-type non-typed
template parameter (e.g. one of type void(int)), the compiler will reject
compilation with the message "error: 'void(int)' is not a valid type for a
template non-type parameter". As far as I can tell, this should flawlessly
work.

void foobar(int);

// decltype(foo) should be evaluating to void (*)(int), acc. to §14.1.8
[temp.param]
template  
void bar();

template 
void baz();

template 
struct E {
template 
void bar();
};

int main() {
baz(); // ok
E{ }.bar(); // ok
bar(); // not ok
}

[Bug c++/82085] [6 Regression] ICE: Template variable reference used in nested template alias

2017-10-30 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82085

Paolo Carlini  changed:

   What|Removed |Added

Summary|[6/7/8 Regression] ICE: |[6 Regression] ICE:
   |Template variable reference |Template variable reference
   |used in nested template |used in nested template
   |alias   |alias

--- Comment #7 from Paolo Carlini  ---
Fixed trunk and 7.3.0 so far.

[Bug c++/82085] [6/7/8 Regression] ICE: Template variable reference used in nested template alias

2017-10-30 Thread paolo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82085

--- Comment #6 from paolo at gcc dot gnu.org  ---
Author: paolo
Date: Mon Oct 30 19:17:40 2017
New Revision: 254240

URL: https://gcc.gnu.org/viewcvs?rev=254240=gcc=rev
Log:
/cp
2017-10-30  Paolo Carlini  

PR c++/82085
* pt.c (tsubst_copy_and_build, [INDIRECT_REF]): For a REFERENCE_REF_P,
unconditionally call convert_from_reference.

/testsuite
2017-10-30  Paolo Carlini  

PR c++/82085
* g++.dg/cpp1y/var-templ56.C: New.

Added:
branches/gcc-7-branch/gcc/testsuite/g++.dg/cpp1y/var-templ56.C
Modified:
branches/gcc-7-branch/gcc/cp/ChangeLog
branches/gcc-7-branch/gcc/cp/pt.c
branches/gcc-7-branch/gcc/testsuite/ChangeLog

[Bug c++/82085] [6/7/8 Regression] ICE: Template variable reference used in nested template alias

2017-10-30 Thread paolo at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82085

--- Comment #5 from paolo at gcc dot gnu.org  ---
Author: paolo
Date: Mon Oct 30 19:16:29 2017
New Revision: 254239

URL: https://gcc.gnu.org/viewcvs?rev=254239=gcc=rev
Log:
/cp
2017-10-30  Paolo Carlini  

PR c++/82085
* pt.c (tsubst_copy_and_build, [INDIRECT_REF]): For a REFERENCE_REF_P,
unconditionally call convert_from_reference.

/testsuite
2017-10-30  Paolo Carlini  

PR c++/82085
* g++.dg/cpp1y/var-templ56.C: New.

Added:
trunk/gcc/testsuite/g++.dg/cpp1y/var-templ56.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/pt.c
trunk/gcc/testsuite/ChangeLog

[Bug c/82772] GCC crashes as compiling ags_thread.c source file on alpha architecture

2017-10-30 Thread jkraehemann at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82772

--- Comment #2 from Joël Krähemann  ---
Just inspected the line it was crashing. There is a call to pthread_exit().

[Bug c/82772] GCC crashes as compiling ags_thread.c source file on alpha architecture

2017-10-30 Thread jkraehemann at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82772

Joël Krähemann  changed:

   What|Removed |Added

 CC||jkraehemann at gmail dot com

--- Comment #1 from Joël Krähemann  ---
Created attachment 42501
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42501=edit
gcc dump as tarball

[Bug c/82772] New: GCC crashes as compiling ags_thread.c source file on alpha architecture

2017-10-30 Thread jkraehemann at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82772

Bug ID: 82772
   Summary: GCC crashes as compiling ags_thread.c source file on
alpha architecture
   Product: gcc
   Version: 7.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: jkraehemann at gmail dot com
  Target Milestone: ---

Hi,

As building the GSequencer package gcc was crashed by ICE.

http://nongnu.org/gsequencer
https://buildd.debian.org/status/fetch.php?pkg=gsequencer=alpha=1.1.4-1=1508767199=0

Here are the configure flags:

dh_auto_configure --  --enable-alsa --disable-oss --enable-libinstpatch
--enable-gtk-doc --enable-gtk-doc-html
./configure --build=alpha-linux-gnu --prefix=/usr
--includedir=\${prefix}/include --mandir=\${prefix}/share/man
--infodir=\${prefix}/share/info --sysconfdir=/etc --localstatedir=/var
--disable-silent-rules --libdir=\${prefix}/lib/alpha-linux-gnu
--libexecdir=\${prefix}/lib/alpha-linux-gnu --disable-maintainer-mode
--disable-dependency-tracking --enable-alsa --disable-oss --enable-libinstpatch
--enable-gtk-doc --enable-gtk-doc-html
configure: WARNING: unrecognized options: --disable-maintainer-mode

Here is the problematic call to gcc:

/bin/bash ./libtool  --tag=CC   --mode=compile gcc
-DLOCALEDIR=\"/usr/share/locale\" -DHAVE_CONFIG_H -I. -I./ags  -std=gnu99
-include /usr/include/errno.h -I. -DSRCDIR=\".\" -DDESTDIR=\"/usr/share\"
-DPACKAGE_VERSION=\"1.1.4\" -DAGS_LIBRARY_SUFFIX=\".so\" -D_FORTIFY_SOURCE=2
-Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2
-DAGS_RC_FILENAME=\"/usr/share/gsequencer/styles/ags.rc\"
-DAGS_ANIMATION_FILENAME=\"/usr/share/gsequencer/images/ags_supermoon-800x450.png\"
-DAGS_LOGO_FILENAME=\"/usr/share/gsequencer/images/ags.png\"
-DAGS_LICENSE_FILENAME=\"/usr/share/common-licenses/GPL-3\" -g -O2
-fdebug-prefix-map=/<>=. -Wformat -Werror=format-security   -O
-I./ -I/usr/include -I/usr/include/libxml2 -pthread -I/usr/include/glib-2.0
-I/usr/lib/alpha-linux-gnu/glib-2.0/include -g -O2
-fdebug-prefix-map=/<>=. -Wformat -Werror=format-security -c -o
ags/thread/libags_thread_la-ags_thread-posix.lo `test -f
'ags/thread/ags_thread-posix.c' || echo './'`ags/thread/ags_thread-posix.c
/bin/bash ./libtool  --tag=CC   --mode=compile gcc
-DLOCALEDIR=\"/usr/share/locale\" -DHAVE_CONFIG_H -I. -I./ags  -std=gnu99
-include /usr/include/errno.h -I. -DSRCDIR=\".\" -DDESTDIR=\"/usr/share\"
-DPACKAGE_VERSION=\"1.1.4\" -DAGS_LIBRARY_SUFFIX=\".so\" -D_FORTIFY_SOURCE=2
-Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2
-DAGS_RC_FILENAME=\"/usr/share/gsequencer/styles/ags.rc\"
-DAGS_ANIMATION_FILENAME=\"/usr/share/gsequencer/images/ags_supermoon-800x450.png\"
-DAGS_LOGO_FILENAME=\"/usr/share/gsequencer/images/ags.png\"
-DAGS_LICENSE_FILENAME=\"/usr/share/common-licenses/GPL-3\" -g -O2
-fdebug-prefix-map=/<>=. -Wformat -Werror=format-security   -O
-I./ -I/usr/include -I/usr/include/libxml2 -pthread -I/usr/include/glib-2.0
-I/usr/lib/alpha-linux-gnu/glib-2.0/include -g -O2
-fdebug-prefix-map=/<>=. -Wformat -Werror=format-security -c -o
ags/thread/libags_thread_la-ags_timestamp_factory.lo `test -f
'ags/thread/ags_timestamp_factory.c' || echo
'./'`ags/thread/ags_timestamp_factory.c
libtool: compile:  gcc -DLOCALEDIR=\"/usr/share/locale\" -DHAVE_CONFIG_H -I.
-I./ags -std=gnu99 -include /usr/include/errno.h -I. -DSRCDIR=\".\"
-DDESTDIR=\"/usr/share\" -DPACKAGE_VERSION=\"1.1.4\"
-DAGS_LIBRARY_SUFFIX=\".so\" -D_FORTIFY_SOURCE=2 -Wformat
-Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2
-DAGS_RC_FILENAME=\"/usr/share/gsequencer/styles/ags.rc\"
-DAGS_ANIMATION_FILENAME=\"/usr/share/gsequencer/images/ags_supermoon-800x450.png\"
-DAGS_LOGO_FILENAME=\"/usr/share/gsequencer/images/ags.png\"
-DAGS_LICENSE_FILENAME=\"/usr/share/common-licenses/GPL-3\" -g -O2
-fdebug-prefix-map=/<>=. -Wformat -Werror=format-security -O -I./
-I/usr/include -I/usr/include/libxml2 -pthread -I/usr/include/glib-2.0
-I/usr/lib/alpha-linux-gnu/glib-2.0/include -g -O2
-fdebug-prefix-map=/<>=. -Wformat -Werror=format-security -c
ags/thread/ags_thread-posix.c  -fPIC -DPIC -o
ags/thread/.libs/libags_thread_la-ags_thread-posix.o
ags/thread/ags_thread-posix.c: In function 'ags_thread_init':
ags/thread/ags_thread-posix.c:428:20: warning: assignment from incompatible
pointer type [-Wincompatible-pointer-types]
   thread->obj_cond =
^
ags/thread/ags_thread-posix.c: In function 'ags_thread_real_start':
ags/thread/ags_thread-posix.c:2846:13: warning: assignment from incompatible
pointer type [-Wincompatible-pointer-types]
   main_loop = ags_thread_get_toplevel(thread);
 ^
ags/thread/ags_thread-posix.c: In function 'ags_thread_loop':
ags/thread/ags_thread-posix.c:3355:7: warning: implicit declaration of function
'pthread_yield'; did you mean 'g_thread_yield'?
[-Wimplicit-function-declaration]
   

[Bug other/21823] MAXPATHLEN usage in [gcc]/fixincludes

2017-10-30 Thread ams at gnu dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=21823

--- Comment #4 from Alfred M. Szmidt  ---
   > Created attachment 9857 [details]
   > Don't use arbitrary limits.
   > 
   > The following fixes fixincludes.
   > 
   > fixincludes/ChangeLog
   > 2005-09-16  Alfred M. Szmidt  
   > 
   >* fixincl.c (quoted_file_exists): Use xmalloc to allocate memory
   >for FNAME.
   >(create_file): Use xmalloc to allocate memory for FNAME.
   > 
   >* server.c (server_setup): Use dynamic allocation for BUFF.

   Please send this patch to the gcc-patches mailing list for review, if it
still
   applies

MAXPATHLEN is still used in fixincludes.  Seeing that this patch is
over 10 years, I am not sure it even applies and thus a good idea to
forward it to gcc-patches for review.  The fix is simple enough in
fixincludes (simply use xmalloc).

[Bug hsa/82771] New: FAIL: brig.dg/test/gimple/packed.hsail (internal compiler error)

2017-10-30 Thread jamborm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82771

Bug ID: 82771
   Summary: FAIL: brig.dg/test/gimple/packed.hsail (internal
compiler error)
   Product: gcc
   Version: 8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: hsa
  Assignee: unassigned at gcc dot gnu.org
  Reporter: jamborm at gcc dot gnu.org
CC: jamborm at gcc dot gnu.org, marxin at gcc dot gnu.org
  Target Milestone: ---

Since r254000 we get the following ICE when compiling
gcc/bisect/obj/gcc/testsuite/brig/packed.hsail.brig

during RTL pass: expand
In function '_Kernel':
brig1: internal compiler error: in brig_langhook_type_for_mode, at
brig/brig-lang.c:297
0x6172f7 brig_langhook_type_for_mode
/home/mjambor/gcc/bisect/src/gcc/brig/brig-lang.c:297
0x6171d9 brig_langhook_type_for_mode
/home/mjambor/gcc/bisect/src/gcc/brig/brig-lang.c:274
0x81eb5b get_stack_local_alignment
/home/mjambor/gcc/bisect/src/gcc/function.c:274
0x82be6a assign_stack_temp_for_type(machine_mode, long, tree_node*)
/home/mjambor/gcc/bisect/src/gcc/function.c:785
0xe9307b ix86_expand_vector_extract(bool, rtx_def*, rtx_def*, int)
/home/mjambor/gcc/bisect/src/gcc/config/i386/i386.c:42816
0x10c0cb3 gen_vec_extractv2sfsf(rtx_def*, rtx_def*, rtx_def*)
/home/mjambor/gcc/bisect/src/gcc/config/i386/mmx.md:650
0xa10928 maybe_expand_insn(insn_code, unsigned int, expand_operand*)
/home/mjambor/gcc/bisect/src/gcc/optabs.c:7128
0x7af97b extract_bit_field_1
/home/mjambor/gcc/bisect/src/gcc/expmed.c:1672
0x7b01e3 extract_bit_field(rtx_def*, unsigned long, unsigned long, int,
rtx_def*, machine_mode, machine_mode, bool, rtx_def**)
/home/mjambor/gcc/bisect/src/gcc/expmed.c:1991
0x7bfa7b expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
/home/mjambor/gcc/bisect/src/gcc/expr.c:10723
0x7c2653 expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
/home/mjambor/gcc/bisect/src/gcc/expr.c:9791
0x7d1b9e expand_normal
/home/mjambor/gcc/bisect/src/gcc/expr.h:282
0x7d1b9e store_constructor
/home/mjambor/gcc/bisect/src/gcc/expr.c:6694
0x7d3be5 expand_constructor
/home/mjambor/gcc/bisect/src/gcc/expr.c:8006
0x7c1181 expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
/home/mjambor/gcc/bisect/src/gcc/expr.c:10105
0x7c2653 expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
/home/mjambor/gcc/bisect/src/gcc/expr.c:9791
0x7c0283 expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
/home/mjambor/gcc/bisect/src/gcc/expr.c:10915
0x7cdf83 store_expr_with_bounds(tree_node*, rtx_def*, int, bool, bool,
tree_node*)
/home/mjambor/gcc/bisect/src/gcc/expr.c:5551
0x7cf787 expand_assignment(tree_node*, tree_node*, bool)
/home/mjambor/gcc/bisect/src/gcc/expr.c:5319
0x6a8dc8 expand_gimple_stmt_1
/home/mjambor/gcc/bisect/src/gcc/cfgexpand.c:3676

[Bug middle-end/22141] [5/6/7 Regression] Missing optimization when storing structures

2017-10-30 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=22141

--- Comment #48 from Jakub Jelinek  ---
Author: jakub
Date: Mon Oct 30 16:20:24 2017
New Revision: 254228

URL: https://gcc.gnu.org/viewcvs?rev=254228=gcc=rev
Log:
PR middle-end/22141
* gimple-ssa-store-merging.c (merged_store_group::apply_stores): Fix
arguments to clear_bit_region_be.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/gimple-ssa-store-merging.c

[Bug libstdc++/82745] Fails to warn on narrowing conversion by std::forward (e.g. when calling make_unique)

2017-10-30 Thread helge at penne dot no
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82745

--- Comment #11 from helge at penne dot no ---
(In reply to Jonathan Wakely from comment #10)
> This is still the same known problem already described in PR 80472 and PR
> 58876.

It is the same root cause, yes.  PR 58876 is about a different warning. 
Depending on how this is to be fixed, changes may be needed a different part of
the libstdc++ code base to fix the problem I found with make_unique.  So
perhaps not a straight duplicate, but very closely related.

The push/pop solution mentioned in PR 58876 seems interesting, but depends on
PR 80472 being fixed first.  I hope someone can get around to this, given that
it blocks the "easy" fix for PR 58876 and this make_unique issue.

I guess I have to sit tight for a while then, and hope that PR 58876 gets
assigned to someone, so that PR 80472 and this one has a chance of getting
fixed as well.

In the mean time, we'll probably solve this in our own code base by writing our
own wrapper for make_unique to make it safe.

Thank you for your patience. :-)

[Bug target/82767] [8 regression] gcc.target/i386/pr71321.c scan-assembler-times fail

2017-10-30 Thread sebastian.peryt at intel dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82767

Sebastian Peryt  changed:

   What|Removed |Added

 CC||sebastian.peryt at intel dot 
com

--- Comment #1 from Sebastian Peryt  ---
Fix seems to be basic for this case. My proposition below:

diff --git a/gcc/testsuite/gcc.target/i386/pr71321.c
b/gcc/testsuite/gcc.target/i386/pr71321.c
index 7b00097..4931b88 100644
--- a/gcc/testsuite/gcc.target/i386/pr71321.c
+++ b/gcc/testsuite/gcc.target/i386/pr71321.c
@@ -12,5 +12,5 @@ unsigned cvt_to_2digit_ascii(uint8_t i)
 {
   return cvt_to_2digit(i, 10) + 0x0a3030;
 }
-/* { dg-final { scan-assembler-times "lea.\t\\(%\[0-9a-z\]+,%\[0-9a-z\]+,4" 3
} } */
+/* { dg-final { scan-assembler-times "lea.\t\\(%\[0-9a-z\]+,%\[0-9a-z\]+,4" 2
} } */
 /* { dg-final { scan-assembler-times "lea.\t\\(%\[0-9a-z\]+,%\[0-9a-z\]+,8" 1
} } */

[Bug c++/81702] [7/8 Regression] ICE in gimple_get_virt_method_for_vtable

2017-10-30 Thread nathan at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81702

--- Comment #8 from Nathan Sidwell  ---
Ah, I remember now.  The ABI specifies the data layout of the various RTTI
objects like _ZTVN10__cxxabiv117__class_type_infoE.  It does not specify the
vtable layout -- implementations are free to add additional member functions:

(ABI doc) 2.9.4 The class definitions below are to be interpreted as implying a
memory layout following the class layout rules for the host ABI. They specify
data members only, except for the Standard-specified member functions of the
std::type_info class given below, and do not imply anything about the member
functions of these classes. Virtual member functions of these classes may only
be used within the target systems' respective runtime libraries. The data
members must be laid out exactly as specified. 

So the vtable is defined when the definition(s) of our implementations of those
structures is seen.

>From random user code, we generate the type info object and reference the
(undefined) vtable.

Ergo, I believe eliding the assert is the right thing.

[Bug lto/82770] New: [8 regression] gcc.dg/pr78768.c xpass

2017-10-30 Thread andrey.y.guskov at intel dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82770

Bug ID: 82770
   Summary: [8 regression] gcc.dg/pr78768.c xpass
   Product: gcc
   Version: 8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: lto
  Assignee: unassigned at gcc dot gnu.org
  Reporter: andrey.y.guskov at intel dot com
CC: marxin at gcc dot gnu.org
  Target Milestone: ---

r248035 triggers this unexpected pass:

XPASS: gcc.dg/pr78768.c -Wformat-overflow (test for warnings, line 12)

Tagging as LTO since it is LTO-related:
/* PR c/78768 - -Walloca-larger-than and -Wformat-overflow warnings disabled
   by -flto
  { dg-do link }
  { dg-require-effective-target lto }
  { dg-require-linker-plugin "" }
  { dg-options "-O2 -Walloca-larger-than=10 -Wformat -Wformat-overflow -flto" }
*/

Option set:
-with-system-zlib --with-demangler-in-ld --with-fpmath=sse --enable-shared
--enable-host-shared --enable-clocale=gnu --enable-cloog-backend=isl
--enable-languages=c,c++,fortran,jit,lto -with-arch=haswell --with-cpu=haswell

[Bug libstdc++/82745] Fails to warn on narrowing conversion by std::forward (e.g. when calling make_unique)

2017-10-30 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82745

--- Comment #10 from Jonathan Wakely  ---
This is still the same known problem already described in PR 80472 and PR
58876.

[Bug libfortran/80850] Sourced allocate() fails to allocate a pointer

2017-10-30 Thread liakhdi at ornl dot gov
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80850

--- Comment #23 from DIL  ---
Paul,

Great work! Thanks a lot for fixing this. This bug was a stopper for me for 6
months, so I am really looking forward to fully switching back to my favorite
gcc/gfortran compiler :)

[Bug c++/67595] concepts code causes segfault

2017-10-30 Thread Casey at Carter dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67595

--- Comment #5 from Casey Carter  ---
The original program submission is ill-formed due to the requirement on line
270 being poorly designed:

requires std::is_same::value;

for a random access iterator x, "x - (x - x)" is typically a prvalue of the
same type as x, whereas "x += (x - x)" is typically an lvalue of that type. X
and X& are obviously not the same type.

[Bug c++/81702] [7/8 Regression] ICE in gimple_get_virt_method_for_vtable

2017-10-30 Thread jamborm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81702

Martin Jambor  changed:

   What|Removed |Added

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

--- Comment #7 from Martin Jambor  ---
Let me un-assign myself because I do not think I can do more than the
analysis in comment #3 and we are only waiting for Nathan to decide
whether this is a bug (in C++ FE) or not anyway.

[Bug debug/82769] New: [8 regression] gcc.dg/guality/pr68037-1.c multiple fails

2017-10-30 Thread andrey.y.guskov at intel dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82769

Bug ID: 82769
   Summary: [8 regression] gcc.dg/guality/pr68037-1.c multiple
fails
   Product: gcc
   Version: 8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: debug
  Assignee: unassigned at gcc dot gnu.org
  Reporter: andrey.y.guskov at intel dot com
  Target Milestone: ---

Created attachment 42500
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42500=edit
Fail log

r250721 triggers multiple fails in gcc.dg/guality/pr68037-1.c, see attachment.

Option set:
-with-system-zlib --with-demangler-in-ld --with-fpmath=sse --enable-shared
--enable-host-shared --enable-clocale=gnu --enable-cloog-backend=isl
--enable-languages=c,c++,fortran,jit,lto -with-arch=haswell --with-cpu=haswell

[Bug other/79872] document placeholder %K in gcc-internal-format

2017-10-30 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79872

Manuel López-Ibáñez  changed:

   What|Removed |Added

   Keywords||diagnostic

--- Comment #3 from Manuel López-Ibáñez  ---
%K is designed to print the inline stack, but I cannot see this documented
anywhere (and as far as I know, only the C++ front-end uses it).

[Bug other/79872] document placeholder %K in gcc-internal-format

2017-10-30 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79872

Manuel López-Ibáñez  changed:

   What|Removed |Added

 CC||manu at gcc dot gnu.org

--- Comment #2 from Manuel López-Ibáñez  ---
I'd argue that %K is an aberration, since it doesn't control the printing of
its argument, but rather the location of the diagnostic. Instead, code such as:

error ("%Klane %wd out of range %wd - %wd", exp, lane, low, high - 1);

should be written as:

error_at (abstract_origin_of (exp), 
  "lane %wd out of range %wd - %wd", lane, low, high - 1);

[Bug target/82674] ICE with -fstack-clash-protection

2017-10-30 Thread segher at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82674

Segher Boessenkool  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|law at redhat dot com  |segher at gcc dot 
gnu.org

--- Comment #6 from Segher Boessenkool  ---
I have a patch; regchecking now.

[Bug c++/82768] New: ICE in synthesize_implicit_template_parm, at cp/parser.c:39338

2017-10-30 Thread gomboc at cs dot ucr.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82768

Bug ID: 82768
   Summary: ICE in synthesize_implicit_template_parm, at
cp/parser.c:39338
   Product: gcc
   Version: 8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: gomboc at cs dot ucr.edu
  Target Milestone: ---

$>/opt/gcc-git/bin/g++ --version
g++ (GCC) 8.0.0 20171029 (experimental)
Copyright (C) 2017 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.

$>/opt/gcc-git/bin/g++ -fconcepts ice_repro.cpp 
ice_repro.cpp:45:5: internal compiler error: in
synthesize_implicit_template_parm, at cp/parser.c:39338
 Addressable another_arbitrary_object
 ^~~
0x839bd8 synthesize_implicit_template_parm
/home/dave/gits/gcc/master/gcc/cp/parser.c:39338
0x839f17 cp_parser_maybe_constrained_type_specifier
/home/dave/gits/gcc/master/gcc/cp/parser.c:17478
0x83a041 cp_parser_nonclass_name
/home/dave/gits/gcc/master/gcc/cp/parser.c:17556
0x85d29f cp_parser_type_name
/home/dave/gits/gcc/master/gcc/cp/parser.c:17362
0x85d29f cp_parser_simple_type_specifier
/home/dave/gits/gcc/master/gcc/cp/parser.c:17234
0x85a175 cp_parser_type_specifier
/home/dave/gits/gcc/master/gcc/cp/parser.c:16880
0x868111 cp_parser_decl_specifier_seq
/home/dave/gits/gcc/master/gcc/cp/parser.c:13685
0x868881 cp_parser_parameter_declaration
/home/dave/gits/gcc/master/gcc/cp/parser.c:21550
0x8691f4 cp_parser_parameter_declaration_list
/home/dave/gits/gcc/master/gcc/cp/parser.c:21363
0x86971c cp_parser_parameter_declaration_clause
/home/dave/gits/gcc/master/gcc/cp/parser.c:21286
0x84e647 cp_parser_requirement_parameter_list
/home/dave/gits/gcc/master/gcc/cp/parser.c:25702
0x84e647 cp_parser_requires_expression
/home/dave/gits/gcc/master/gcc/cp/parser.c:25672
0x84e647 cp_parser_primary_expression
/home/dave/gits/gcc/master/gcc/cp/parser.c:5369
0x85de58 cp_parser_postfix_expression
/home/dave/gits/gcc/master/gcc/cp/parser.c:7022
0x86166a cp_parser_unary_expression
/home/dave/gits/gcc/master/gcc/cp/parser.c:8363
0x83ead9 cp_parser_cast_expression
/home/dave/gits/gcc/master/gcc/cp/parser.c:9131
0x83f317 cp_parser_binary_expression
/home/dave/gits/gcc/master/gcc/cp/parser.c:9232
0x840ce4 cp_parser_assignment_expression
/home/dave/gits/gcc/master/gcc/cp/parser.c:9519
0x83fd2b cp_parser_constant_expression
/home/dave/gits/gcc/master/gcc/cp/parser.c:9803
0x840c67 cp_parser_initializer_clause
/home/dave/gits/gcc/master/gcc/cp/parser.c:21963


$>g++ --version
g++ (Debian 7.2.0-12) 7.2.1 20171025
Copyright (C) 2017 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.

$>g++ -fconcepts ice_repro.cpp 
ice_repro.cpp:45:5: internal compiler error: in
synthesize_implicit_template_parm, at cp/parser.c:38789
 Addressable another_arbitrary_object


complete ice_repro.cpp:


#include 


template <
template  typename arbitrary_template_type,
typename... arbitrary_template_argument_types
> concept bool Template_type = requires {
typename arbitrary_template_type<
arbitrary_template_argument_types...
>;
};


template <
typename first_argument,
template  typename type_trait,
typename... any_remaining_arguments
> concept bool Satisfies =
Template_type<
type_trait,
first_argument,
any_remaining_arguments...
> &&
type_trait<
first_argument,
any_remaining_arguments...
>::value;


template 
concept bool Same = Satisfies;


template 
concept bool Addressable =
requires (arbitrary_type & ref, arbitrary_type const & cref) {
requires Same;
requires Same;
};


template 
concept bool InternalCompilerError = requires (
arbitrary_type arbitrary_object,
Addressable another_arbitrary_object
) {};

[Bug target/82767] [8 regression] gcc.target/i386/pr71321.c scan-assembler-times fail

2017-10-30 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82767

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|--- |8.0

[Bug target/82767] New: [8 regression] gcc.target/i386/pr71321.c scan-assembler-times fail

2017-10-30 Thread andrey.y.guskov at intel dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82767

Bug ID: 82767
   Summary: [8 regression] gcc.target/i386/pr71321.c
scan-assembler-times fail
   Product: gcc
   Version: 8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: andrey.y.guskov at intel dot com
  Target Milestone: ---

r253934 triggers this fail:

FAIL: gcc.target/i386/pr71321.c scan-assembler-times
lea.\t\\(%[0-9a-z]+,%[0-9a-z]+,4 3 (found 2 times)

Option set:
-with-system-zlib --with-demangler-in-ld --with-fpmath=sse --enable-shared
--enable-host-shared --enable-clocale=gnu --enable-cloog-backend=isl
--enable-languages=c,c++,fortran,jit,lto -with-arch=haswell --with-cpu=haswell

[Bug c/67224] UTF-8 support for identifier names in GCC

2017-10-30 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67224

Manuel López-Ibáñez  changed:

   What|Removed |Added

   Last reconfirmed|2015-08-17 00:00:00 |2017-10-30

--- Comment #24 from Manuel López-Ibáñez  ---
(In reply to s...@eircom.net from comment #23)
> An important patch. Is there a similar patch for versions later than 5.2.0
> of gcc?  I'm looking for gcc-7.2.1-2 patch for unicode idenfifiers.

The patch above is not recommended due to the problems mentioned above. 

The recommended work-around is given here:

https://gcc.gnu.org/wiki/FAQ#utf8_identifiers

Guidelines for a proper implementation are given in comment #21.

[Bug lto/82757] [8 regression] r251560 causes: plugin needed to handle lto object

2017-10-30 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82757

Markus Trippelsdorf  changed:

   What|Removed |Added

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

--- Comment #12 from Markus Trippelsdorf  ---
Fixed. Thanks.

--- Comment #13 from Markus Trippelsdorf  ---
Fixed. Thanks.

[Bug lto/82757] [8 regression] r251560 causes: plugin needed to handle lto object

2017-10-30 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82757

Markus Trippelsdorf  changed:

   What|Removed |Added

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

--- Comment #12 from Markus Trippelsdorf  ---
Fixed. Thanks.

--- Comment #13 from Markus Trippelsdorf  ---
Fixed. Thanks.

[Bug c++/82766] internal compiler error: tree check: expected tree that contains ‘decl common’ structure, have ‘identifier_node’ in get_inner_reference

2017-10-30 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82766

Markus Trippelsdorf  changed:

   What|Removed |Added

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

--- Comment #2 from Markus Trippelsdorf  ---
Thanks. Dup.

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

[Bug c++/82360] [8 Regression] tree check fail in get_inner_reference, at expr.c:6996

2017-10-30 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82360

Markus Trippelsdorf  changed:

   What|Removed |Added

 CC||hunter at openrobotics dot org

--- Comment #6 from Markus Trippelsdorf  ---
*** Bug 82766 has been marked as a duplicate of this bug. ***

[Bug c++/82766] internal compiler error: tree check: expected tree that contains ‘decl common’ structure, have ‘identifier_node’ in get_inner_reference

2017-10-30 Thread hunter at openrobotics dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82766

--- Comment #1 from Hunter L. Allen  ---
Created attachment 42499
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42499=edit
preprocessed sources

These are the three preprocessor files that threw internal compiler errors --
let me know if you need any others.

[Bug lto/82757] [8 regression] r251560 causes: plugin needed to handle lto object

2017-10-30 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82757

--- Comment #11 from Richard Biener  ---
Author: rguenth
Date: Mon Oct 30 12:48:53 2017
New Revision: 254219

URL: https://gcc.gnu.org/viewcvs?rev=254219=gcc=rev
Log:
2017-10-30  Richard Biener  

PR lto/82757
* simple-object-elf.c (simple_object_elf_copy_lto_debug_sections):
Strip two leading _s from the __gnu_lto_* symbols.

Modified:
trunk/libiberty/ChangeLog
trunk/libiberty/simple-object-elf.c

[Bug tree-optimization/82129] [8 Regression] ICE in compute_antic, at tree-ssa-pre.c:2447

2017-10-30 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82129

--- Comment #8 from Richard Biener  ---
Author: rguenth
Date: Mon Oct 30 12:45:53 2017
New Revision: 254218

URL: https://gcc.gnu.org/viewcvs?rev=254218=gcc=rev
Log:
2017-10-30  Richard Biener  

PR tree-optimization/82762
Revert
2017-10-23  Richard Biener  

PR tree-optimization/82129
Revert
2017-08-01  Richard Biener  

PR tree-optimization/81181
* tree-ssa-pre.c (compute_antic_aux): Defer clean() to ...
(compute_antic): ... end of iteration here.

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

Added:
trunk/gcc/testsuite/gcc.dg/torture/pr82762.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-ssa-pre.c

[Bug tree-optimization/82762] [8 Regression] ICE at -O3: in compute_antic, at tree-ssa-pre.c:2397

2017-10-30 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82762

--- Comment #4 from Richard Biener  ---
Author: rguenth
Date: Mon Oct 30 12:45:53 2017
New Revision: 254218

URL: https://gcc.gnu.org/viewcvs?rev=254218=gcc=rev
Log:
2017-10-30  Richard Biener  

PR tree-optimization/82762
Revert
2017-10-23  Richard Biener  

PR tree-optimization/82129
Revert
2017-08-01  Richard Biener  

PR tree-optimization/81181
* tree-ssa-pre.c (compute_antic_aux): Defer clean() to ...
(compute_antic): ... end of iteration here.

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

Added:
trunk/gcc/testsuite/gcc.dg/torture/pr82762.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-ssa-pre.c

[Bug tree-optimization/81181] [7 Regression] ICE in compute_antic, at tree-ssa-pre.c:2410

2017-10-30 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81181

--- Comment #8 from Richard Biener  ---
Author: rguenth
Date: Mon Oct 30 12:45:53 2017
New Revision: 254218

URL: https://gcc.gnu.org/viewcvs?rev=254218=gcc=rev
Log:
2017-10-30  Richard Biener  

PR tree-optimization/82762
Revert
2017-10-23  Richard Biener  

PR tree-optimization/82129
Revert
2017-08-01  Richard Biener  

PR tree-optimization/81181
* tree-ssa-pre.c (compute_antic_aux): Defer clean() to ...
(compute_antic): ... end of iteration here.

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

Added:
trunk/gcc/testsuite/gcc.dg/torture/pr82762.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-ssa-pre.c

[Bug tree-optimization/82762] [8 Regression] ICE at -O3: in compute_antic, at tree-ssa-pre.c:2397

2017-10-30 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82762

Richard Biener  changed:

   What|Removed |Added

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

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

[Bug c++/82766] New: internal compiler error: tree check: expected tree that contains ‘decl common’ structure, have ‘identifier_node’ in get_inner_reference

2017-10-30 Thread hunter at openrobotics dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82766

Bug ID: 82766
   Summary: internal compiler error: tree check: expected tree
that contains ‘decl common’ structure, have
‘identifier_node’ in get_inner_reference
   Product: gcc
   Version: 8.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: hunter at openrobotics dot org
  Target Milestone: ---

Hey all,

got a likely regression that popped up with the latest svn source.


```
$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/home/allenh1/libexec/gcc/x86_64-pc-linux-gnu/8.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-dev/configure --prefix=/home/allenh1
--enable-valgrind-annotations
--with-java-home=/etc/java-config-2/current-system-vm
--enable-languages=c,c++,fortran,lto,objc,go
Thread model: posix
gcc version 8.0.0 20171029 (experimental) (GCC) 

```

The full compiler output is rather lengthy, so I made a gist of it.

https://gist.github.com/allenh1/8c3c9fd5bade31d659699f773f6a8022

This is the important section, however:

```
/usr/include/asio/impl/read_until.hpp: In constructor
‘asio::detail::read_until_delim_string_op::read_until_delim_string_op(asio::detail::read_until_delim_string_op&&)’:
/usr/include/asio/impl/read_until.hpp:550:55: internal compiler error: tree
check: expected tree that contains ‘decl common’ structure, have
‘identifier_node’ in get_inner_reference, at expr.c:6999
 delim_(ASIO_MOVE_CAST(std::string)(other.delim_)),
   ^
0x698295 tree_contains_struct_check_failed(tree_node const*,
tree_node_structure_enum, char const*, int, char const*)
../../gcc-dev/gcc/tree.c:9268
0xb53b81 contains_struct_check(tree_node*, tree_node_structure_enum, char
const*, int, char const*)
../../gcc-dev/gcc/tree.h:3202
0xb53b81 get_inner_reference(tree_node*, long*, long*, tree_node**,
machine_mode*, int*, int*, int*)
../../gcc-dev/gcc/expr.c:6999
0xb9ac6b fold_unary_loc(unsigned int, tree_code, tree_node*, tree_node*)
../../gcc-dev/gcc/fold-const.c:7695
0xb9c139 fold_build1_loc(unsigned int, tree_code, tree_node*, tree_node*)
../../gcc-dev/gcc/fold-const.c:12068
In file included from /usr/include/asio/read_until.hpp:919:0,
 from /usr/include/asio.hpp:90,
 from
/home/allenh1/ros2_ws/src/eProsima/Fast-RTPS/include/fastrtps/rtps/resources/ResourceEvent.h:25,
 from
/home/allenh1/ros2_ws/src/eProsima/Fast-RTPS/src/cpp/rtps/resources/ResourceEvent.cpp:20:
/usr/include/asio/impl/read_until.hpp: In constructor
‘asio::detail::read_until_delim_string_op::read_until_delim_string_op(asio::detail::read_until_delim_string_op&&)’:
/usr/include/asio/impl/read_until.hpp:550:55: internal compiler error: tree
check: expected tree that contains ‘decl common’ structure, have
‘identifier_node’ in get_inner_reference, at expr.c:6999
 delim_(ASIO_MOVE_CAST(std::string)(other.delim_)),
   ^
0x77d5ac cp_fold_convert(tree_node*, tree_node*)
../../gcc-dev/gcc/cp/cvt.c:607
COLLECT_GCC_OPTIONS='-D' 'ASIO_STANDALONE' '-D' 'BOOST_ASIO_STANDALONE' '-D'
'FASTRTPS_SOURCE' '-D' 'fastrtps_EXPORTS' '-I' '/usr/local/include' '-I'
'/home/allenh1/ros2_ws/src/eProsima/Fast-RTPS/include' '-I'
'/home/allenh1/ros2_ws/build/fastrtps/include/fastrtps' '-I'
'/home/allenh1/ros2_ws/src/eProsima/Fast-RTPS/src/cpp' '-v' '-save-temps'
'-Wall' '-Wpedantic' '-Wextra' '-Wno-unknown-pragmas' '-std=c++11' '-std=c++11'
'-O3' '-D' 'NDEBUG' '-fPIC' '-o' 'CMakeFiles/fastrtps.dir/rtps/Endpoint.cpp.o'
'-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
 /home/allenh1/libexec/gcc/x86_64-pc-linux-gnu/8.0.0/cc1plus -fpreprocessed
Endpoint.ii -quiet -dumpbase Endpoint.cpp -mtune=generic -march=x86-64
-auxbase-strip CMakeFiles/fastrtps.dir/rtps/Endpoint.cpp.o -O3 -Wall -Wpedantic
-Wextra -Wno-unknown-pragmas -std=c++11 -std=c++11 -version -fPIC -o Endpoint.s
GNU C++11 (GCC) version 8.0.0 20171029 (experimental) (x86_64-pc-linux-gnu)
compiled by GNU C version 8.0.0 20171029 (experimental), GMP version
6.1.2, MPFR version 3.1.6, MPC version 1.0.3, isl version isl-0.18-GMP

GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
GNU C++11 (GCC) version 8.0.0 20171029 (experimental) (x86_64-pc-linux-gnu)
compiled by GNU C version 8.0.0 20171029 (experimental), GMP version
6.1.2, MPFR version 3.1.6, MPC version 1.0.3, isl version isl-0.18-GMP

GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
0x956de9 build_static_cast_1

[Bug c/82765] [6/7/8 Regression] ICE at -Os on valid code on x86_64-linux-gnu: in tree_to_shwi, at tree.c:6611

2017-10-30 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82765

--- Comment #5 from Richard Biener  ---
middle-end "fix"

Index: gcc/varasm.c
===
--- gcc/varasm.c(revision 254211)
+++ gcc/varasm.c(working copy)
@@ -2879,7 +2879,7 @@ static void
 decode_addr_const (tree exp, struct addr_const *value)
 {
   tree target = TREE_OPERAND (exp, 0);
-  int offset = 0;
+  HOST_WIDE_INT offset = 0;
   rtx x;

   while (1)
@@ -2893,8 +2893,9 @@ decode_addr_const (tree exp, struct addr
   else if (TREE_CODE (target) == ARRAY_REF
   || TREE_CODE (target) == ARRAY_RANGE_REF)
{
- offset += (tree_to_uhwi (TYPE_SIZE_UNIT (TREE_TYPE (target)))
-* tree_to_shwi (TREE_OPERAND (target, 1)));
+ /* Truncate big offset.  */
+ offset += (TREE_INT_CST_LOW (TYPE_SIZE_UNIT (TREE_TYPE (target)))
+* TREE_INT_CST_LOW (TREE_OPERAND (target, 1)));
  target = TREE_OPERAND (target, 0);
}
   else if (TREE_CODE (target) == MEM_REF

there's a lot more errors in it though.  For example it doesn't handle
an array domain low bound != 1 correctly ...  but maybe that's not
required (well, strictly speaking it probably is but it may be hard
to create a testcase that fails).

[Bug rtl-optimization/81803] [7/8 regression] miscompilation at -O1 on mips64el

2017-10-30 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81803

Eric Botcazou  changed:

   What|Removed |Added

  Component|target  |rtl-optimization

--- Comment #18 from Eric Botcazou  ---
Recategorizing.

[Bug c/82765] [6/7/8 Regression] ICE at -Os on valid code on x86_64-linux-gnu: in tree_to_shwi, at tree.c:6611

2017-10-30 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82765

Richard Biener  changed:

   What|Removed |Added

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

--- Comment #4 from Richard Biener  ---
(In reply to Jakub Jelinek from comment #3)
> Started with r172958.

Eh...

[Bug libstdc++/82745] Fails to warn on narrowing conversion by std::forward (e.g. when calling make_unique)

2017-10-30 Thread helge at penne dot no
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82745

--- Comment #9 from helge at penne dot no ---
I've tried compiling with -Wsystem-headers.  This results in a significant
number of warnings inside libstdc++ itself, due to conversions resulting in
potential sign changes and/or loss of precision, even when I compile the
example with an empty main().  So libstdc++ is simply not clean enough to
permit compiling with -Wsystem-headers along with -Werror.  Compiling with
-Wsystem-headers is thus not not a viable solution with the current libstdc++,
unless there are additional tweaks that I have not though of yet.

I think this all boils down to the following: I really do not think it is OK
that libstdc++ causes the compiler to suppress warnings for what is actually
problems in the user's code, not the library.

Suppressing system header warnings is perfectly reasonable for headers that
contain declarations for symbols in libraries, but perhaps not equally
acceptable in headers that define templates that get instantiated through
application code.  Such behaviour can evidently suppress important warnings for
issues caused by application source code, and that is a real problem.

[Bug lto/82757] [8 regression] r251560 causes: plugin needed to handle lto object

2017-10-30 Thread rguenther at suse dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82757

--- Comment #10 from rguenther at suse dot de  ---
On Mon, 30 Oct 2017, amodra at gmail dot com wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82757
> 
> --- Comment #9 from Alan Modra  ---
> If you start off with "___gnu_lto_", there is code in simple_object_elf.c to
> handle the extra '_', and now in binutils too.  Skipping just one '_' will
> leave you with a symbol that matches "__gnu_lto_", and will trigger the gold
> warning.  Skipping two chars will give you "_gnu_lto_" which ought to be fine.
> 
> Of course on x86_64, you'll start off with "__gnu_lto_", skip two chars to 
> give
> "gnu_lto_", which also ought to be fine.  Even if it matches some user symbol.

Ok.  I'll add two then..

[Bug lto/82757] [8 regression] r251560 causes: plugin needed to handle lto object

2017-10-30 Thread amodra at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82757

--- Comment #9 from Alan Modra  ---
If you start off with "___gnu_lto_", there is code in simple_object_elf.c to
handle the extra '_', and now in binutils too.  Skipping just one '_' will
leave you with a symbol that matches "__gnu_lto_", and will trigger the gold
warning.  Skipping two chars will give you "_gnu_lto_" which ought to be fine.

Of course on x86_64, you'll start off with "__gnu_lto_", skip two chars to give
"gnu_lto_", which also ought to be fine.  Even if it matches some user symbol.

[Bug target/81803] [7/8 regression] miscompilation at -O1 on mips64el

2017-10-30 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81803

--- Comment #17 from Eric Botcazou  ---
> If it ends up as a simple register move though then that shouldn't be
> harmful either as it would be a WORD_REGISTER_OPERATION. I have no objection
> to removing the restriction though; it is easier to reason about without the
> special case.

Yes, this would be my recommendation.  I just successfully tested this variant
of the fix on SPARC64/Linux.

[Bug c++/67737] [C++1z] ICE in make_decl_rtl, at varasm.c:1299

2017-10-30 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67737

Paolo Carlini  changed:

   What|Removed |Added

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

--- Comment #10 from Paolo Carlini  ---
Fixed in 6.2.0.

[Bug c++/67491] [meta-bug] concepts issues

2017-10-30 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67491
Bug 67491 depends on bug 67737, which changed state.

Bug 67737 Summary: [C++1z] ICE in make_decl_rtl, at varasm.c:1299
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67737

   What|Removed |Added

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

[Bug c++/67595] concepts code causes segfault

2017-10-30 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67595

Paolo Carlini  changed:

   What|Removed |Added

 CC||paolo.carlini at oracle dot com

--- Comment #4 from Paolo Carlini  ---
The ICE went away already in 6.2.0 but the code is rejected. If isn't supposed
to be well formed we can add the testcase and close the bug.

[Bug target/81803] [7/8 regression] miscompilation at -O1 on mips64el

2017-10-30 Thread mpf at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81803

--- Comment #16 from mpf at gcc dot gnu.org ---
(In reply to Eric Botcazou from comment #15)
> > I don't think the restriction is required for functional correctness but I
> > thought we may as well take advantage of a narrower load in the OP_IN case
> > if we could get away with it.
> 
> I don't think you're guaranteed that this reload will yield a load though.

If it ends up as a simple register move though then that shouldn't be harmful
either as it would be a WORD_REGISTER_OPERATION. I have no objection to
removing the restriction though; it is easier to reason about without the
special case.

[Bug middle-end/22141] [5/6/7 Regression] Missing optimization when storing structures

2017-10-30 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=22141

--- Comment #47 from Jakub Jelinek  ---
Author: jakub
Date: Mon Oct 30 11:04:49 2017
New Revision: 254213

URL: https://gcc.gnu.org/viewcvs?rev=254213=gcc=rev
Log:
PR middle-end/22141
* gimple-ssa-store-merging.c: Include rtl.h and expr.h.
(struct store_immediate_info): Add bitregion_start and bitregion_end
fields.
(store_immediate_info::store_immediate_info): Add brs and bre
arguments and initialize bitregion_{start,end} from those.
(struct merged_store_group): Add bitregion_start, bitregion_end,
align_base and mask fields.  Drop unnecessary struct keyword from
struct store_immediate_info.  Add do_merge method.
(clear_bit_region_be): Use memset instead of loop storing zeros.
(merged_store_group::do_merge): New method.
(merged_store_group::merge_into): Use do_merge.  Allow gaps in between
stores as long as the surrounding bitregions have no gaps.
(merged_store_group::merge_overlapping): Use do_merge.
(merged_store_group::apply_stores): Test that bitregion_{start,end}
is byte aligned, rather than requiring that start and width are
byte aligned.  Drop unnecessary struct keyword from
struct store_immediate_info.  Allocate and populate also mask array.
Make start of the arrays relative to bitregion_start rather than
start and size them according to bitregion_{end,start} difference.
(struct imm_store_chain_info): Drop unnecessary struct keyword from
struct store_immediate_info.
(pass_store_merging::gate): Punt if BITS_PER_UNIT or CHAR_BIT is not 8.
(pass_store_merging::terminate_all_aliasing_chains): Drop unnecessary
struct keyword from struct store_immediate_info.
(imm_store_chain_info::coalesce_immediate_stores): Allow gaps in
between stores as long as the surrounding bitregions have no gaps.
Formatting fixes.
(struct split_store): Add orig non-static data member.
(split_store::split_store): Initialize orig to false.
(find_constituent_stmts): Return store_immediate_info *, non-NULL
if there is exactly a single original stmt.  Change stmts argument
to pointer from reference, if NULL, don't push anything to it.  Add
first argument, use it to optimize skipping over orig stmts that
are known to be before bitpos already.  Simplify.
(split_group): Return unsigned int count how many stores are or
would be needed rather than a bool.  Add allow_unaligned argument.
Change split_stores argument from reference to pointer, if NULL,
only do a dry run computing how many stores would be produced.
Rewritten algorithm to use both alignment and misalign if
!allow_unaligned and handle bitfield stores with gaps.
(imm_store_chain_info::output_merged_store): Set start_byte_pos
from bitregion_start instead of start.  Compute allow_unaligned
here, if true, do 2 split_group dry runs to compute which one
produces fewer stores and prefer aligned if equal.  Punt if
new count is bigger or equal than original before emitting any
statements, rather than during that.  Remove no longer needed
new_ssa_names tracking.  Replace num_stmts with
split_stores.length ().  Use 32-bit stack allocated entries
in split_stores auto_vec.  Try to reuse original store lhs/rhs1
if possible.  Handle bitfields with gaps.
(pass_store_merging::execute): Ignore bitsize == 0 stores.
Compute bitregion_{start,end} for the stores and construct
store_immediate_info with that.  Formatting fixes.

* gcc.dg/store_merging_10.c: New test.
* gcc.dg/store_merging_11.c: New test.
* gcc.dg/store_merging_12.c: New test.
* g++.dg/pr71694.C: Add -fno-store-merging to dg-options.

Added:
trunk/gcc/testsuite/gcc.dg/store_merging_10.c
trunk/gcc/testsuite/gcc.dg/store_merging_11.c
trunk/gcc/testsuite/gcc.dg/store_merging_12.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/gimple-ssa-store-merging.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/g++.dg/pr71694.C

[Bug tree-optimization/81661] [7/8 Regression] ICE in gimplify_modify_expr, at gimplify.c:5638

2017-10-30 Thread rguenther at suse dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81661

--- Comment #7 from rguenther at suse dot de  ---
On Sat, 28 Oct 2017, pinskia at gcc dot gnu.org wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81661
> 
> --- Comment #6 from Andrew Pinski  ---
> (In reply to Richard Biener from comment #5)
> > One possibility is instead of using
> > 
> >  may_be_zero ? 0 : niter
> > 
> > as niter for code-generation use
> > 
> >  (may_be_zero ? 0 : 1) * niter
> > 
> > This avoids the gimplification issue.  We assemble this as
> > 
> > call__addvsi3
> > movl%eax, %esi
> > subl%ebp, %esi
> > cmpl%ebp, %eax
> > setge   %al
> > movzbl  %al, %eax
> > imull   %eax, %esi
> > 
> > so it definitely is ugly (we're lacking any pattern matching on this
> > turning it back to a COND_EXPR).
> 
> r250377 added a pattern which should have caught that ...

I suspect we're missing cond ? 0 : 1 -> (int) cond for it to
trigger.

[Bug tree-optimization/82672] [8 Regression][GRAPHITE] ICE in verify_gimple_in_cfg

2017-10-30 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82672

Richard Biener  changed:

   What|Removed |Added

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

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

[Bug c++/68630] [concepts] internal compiler error: in add_expr, at tree.c:7828

2017-10-30 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68630

Paolo Carlini  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |WORKSFORME

--- Comment #1 from Paolo Carlini  ---
Can't reproduce this anywhere. Maybe fixed together with PR68116. If somebody
can reproduce with a recent compiler, please provide details and re-open.

[Bug lto/82757] [8 regression] r251560 causes: plugin needed to handle lto object

2017-10-30 Thread rguenther at suse dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82757

--- Comment #8 from rguenther at suse dot de  ---
On Mon, 30 Oct 2017, amodra at gmail dot com wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82757
> 
> --- Comment #7 from Alan Modra  ---
> > Bump st_name by one for __gnu_lto_
> 
> Better make that two.  Some targets will have an extra '_' prefix.

But then we won't match __gnu_lto_ anyway and the visibility trick
fails?  Also gnu_lto_* might alias with another symbol so we might
end up with two undefs with the same name and conflicting visibility?

I fear that in the end I'll be writing code to actually remove
entries from symtab ... :/

[Bug c++/71129] [concepts] ICE on ill-formed explicit instantiation of a variable concept

2017-10-30 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71129

Paolo Carlini  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-10-30
 Ever confirmed|0   |1

[Bug target/81803] [7/8 regression] miscompilation at -O1 on mips64el

2017-10-30 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81803

--- Comment #15 from Eric Botcazou  ---
> I don't think the restriction is required for functional correctness but I
> thought we may as well take advantage of a narrower load in the OP_IN case
> if we could get away with it.

I don't think you're guaranteed that this reload will yield a load though.

> The patch has a serious bug that I started testing but failed to report
> here. The bracketing was wrong by one level, an updated version is attached.

Right, but the compiler fortunately complained.

[Bug target/82725] [8 Regression] [x86_64] internal compiler error: in change_address_1, at emit-rtl.c:2162

2017-10-30 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82725

Uroš Bizjak  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED
   Assignee|unassigned at gcc dot gnu.org  |ubizjak at gmail dot com

--- Comment #8 from Uroš Bizjak  ---
Fixed.

[Bug c++/71126] [concepts] ICE on ill-formed code declaring a variable with a non-type concept

2017-10-30 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71126

Paolo Carlini  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-10-30
 Ever confirmed|0   |1

[Bug target/82725] [8 Regression] [x86_64] internal compiler error: in change_address_1, at emit-rtl.c:2162

2017-10-30 Thread uros at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82725

--- Comment #7 from uros at gcc dot gnu.org ---
Author: uros
Date: Mon Oct 30 10:33:40 2017
New Revision: 254212

URL: https://gcc.gnu.org/viewcvs?rev=254212=gcc=rev
Log:
PR target/82725
* config/i386/i386.c (legitimate_pic_address_disp_p): Allow
UNSPEC_DTPOFF and UNSPEC_NTPOFF with SImode immediate offset.

testsuite/ChangeLog:

PR target/82725
* g++.dg/pr82725.C: New test.


Added:
trunk/gcc/testsuite/g++.dg/pr82725.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/i386/i386.c
trunk/gcc/testsuite/ChangeLog

[Bug lto/82757] [8 regression] r251560 causes: plugin needed to handle lto object

2017-10-30 Thread amodra at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82757

--- Comment #7 from Alan Modra  ---
> Bump st_name by one for __gnu_lto_

Better make that two.  Some targets will have an extra '_' prefix.

[Bug c/78829] bit-rotten "C99 mode" references in GCC manual

2017-10-30 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78829

Eric Gallager  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-10-30
 Ever confirmed|0   |1

--- Comment #2 from Eric Gallager  ---
Confirmed that these references still exist.

[Bug tree-optimization/82224] Strict-aliasing not noticing valid aliasing of two unions with active members

2017-10-30 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82224

--- Comment #12 from Richard Biener  ---
(In reply to Richard Biener from comment #9)
> One complication when deciding whether the downstream uses are fine is
> that we assign the same alias set to union accesses u->x and u->y.
> 
> That said, the union read/write pairs we remove essentially act as
> an optimization barrier - they "union" the alias sets of all components
> of the unions (not only of those accessed).  I think that's what other
> readings of the standard ask for (there's a bug about this as well).
> A mere declaration of a union needs to union the alias-sets and the
> following should be valid:
> 
> union { long l; long long ll; };
> 
> long foo (long *p)
> {
>   *p = 0;
>   *(long long *)p = 1;
>   return *p;
> }
> 
> this means (from an implementation perspective) that iff we do not
> want to go this far then accessing a union member via a non-union
> type isn't valid.
> 
> Anyway ;)  I don't see an easy way to fix the testcases in this PR
> without removing the optimization entirely.  It's currently guarded
> like
> 
>   /* If the TBAA state isn't the same for downstream reads
>  we cannot value-number the VDEFs the same.  */
>   alias_set_type set = get_alias_set (lhs);
>   if (! vnresult
>   || vnresult->set == set
>   || alias_set_subset_of (set, vnresult->set))
> 
> but we don't know whether vnresult is from a load or a store so we
> don't know whether it fully specifies the "TBAA state".  So even
> dumbing that down to
> 
>   if (vnresult->set != set
>   || set != get_alias_set (TREE_TYPE (lhs)))
> resultsame = false;
> 
> where the latter test sees if the alias set for the access and for an
> access using a pointer is the same might keep some holes open.
> 
> Some of the more interesting cases _did_ involve unions and the above
> would likely make them not optimized again (I remember sth with vector
> intrinsics and initialization / copying via unions).  Oh, even more
> trivial union->x = union->x; will stop from being optimized.
> 
> Index: gcc/tree-ssa-sccvn.c
> ===
> --- gcc/tree-ssa-sccvn.c(revision 254135)
> +++ gcc/tree-ssa-sccvn.c(working copy)
> @@ -3800,11 +3800,11 @@ visit_reference_op_store (tree lhs, tree
>resultsame = expressions_equal_p (result, op);
>if (resultsame)
> {
> - /* If the TBAA state isn't compatible for downstream reads
> + /* If the TBAA state isn't the same for downstream reads
>  we cannot value-number the VDEFs the same.  */
>   alias_set_type set = get_alias_set (lhs);
>   if (vnresult->set != set
> - && ! alias_set_subset_of (set, vnresult->set))
> + || set != get_alias_set (TREE_TYPE (lhs)))
> resultsame = false;
> }
>  }
> @@ -5628,9 +5628,9 @@ eliminate_dom_walker::before_dom_childre
>  at least all accesses the later one does or if the store
>  was to readonly memory storing the same value.  */
>   alias_set_type set = get_alias_set (lhs);
> - if (! vnresult
> - || vnresult->set == set
> - || alias_set_subset_of (set, vnresult->set))
> + if (vnresult
> + && vnresult->set == set
> + && set == get_alias_set (TREE_TYPE (lhs)))
> {
>   if (dump_file && (dump_flags & TDF_DETAILS))
> {
> Index: gcc/tree-ssa-dom.c
> ===
> --- gcc/tree-ssa-dom.c  (revision 254135)
> +++ gcc/tree-ssa-dom.c  (working copy)
> @@ -46,6 +46,7 @@ along with GCC; see the file COPYING3.
>  #include "gimplify.h"
>  #include "tree-cfgcleanup.h"
>  #include "dbgcnt.h"
> +#include "alias.h"
>  
>  /* This file implements optimizations on the dominator tree.  */
>  
> @@ -1953,7 +1954,8 @@ dom_opt_dom_walker::optimize_stmt (basic
>   gimple_set_vuse (new_stmt, gimple_vuse (stmt));
>   cached_lhs = m_avail_exprs_stack->lookup_avail_expr (new_stmt,
> false,
>false);
> - if (cached_lhs && operand_equal_p (rhs, cached_lhs, 0))
> + if (cached_lhs && operand_equal_p (rhs, cached_lhs, 0)
> + && get_alias_set (lhs) == get_alias_set (TREE_TYPE (lhs)))
> {
>   basic_block bb = gimple_bb (stmt);
>   unlink_stmt_vdef (stmt);
> 
> FAILs at least gcc.dg/tree-ssa/ssa-pre-26.c

And

FAIL: gnat.dg/opt39.adb scan-tree-dump-times optimized "MEM" 1 (found 9 times)

otherwise clean on x86_64-unknown-linux-gnu.

> as said I'm not 100% convinced the more strict handling avoids all of the
> cases.

[Bug c++/71127] [concepts] ICE on ill-formed code declaring a variable with a template concept

2017-10-30 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71127

Paolo Carlini  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-10-30
 Ever confirmed|0   |1

[Bug c++/71128] [concepts] ICE on ill-formed explicit instantiation of a function concept

2017-10-30 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71128

Paolo Carlini  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-10-30
 Ever confirmed|0   |1

[Bug lto/82757] [8 regression] r251560 causes: plugin needed to handle lto object

2017-10-30 Thread rguenther at suse dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82757

--- Comment #6 from rguenther at suse dot de  ---
On Mon, 30 Oct 2017, amodra at gmail dot com wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82757
> 
> --- Comment #5 from Alan Modra  ---
> Incidentally, the only reason ld.bfd gets past the "plugin needed" warning is
> that it only warns on a common symbol called __gnu_lto_slim, not an undefined
> one..  Bump st_name by one for __gnu_lto_ symbols, perhaps?

I guess that would work.  We already handle __gnu_lto_ symbols
specially by making them hidden.

Index: libiberty/simple-object-elf.c
===
--- libiberty/simple-object-elf.c   (revision 254211)
+++ libiberty/simple-object-elf.c   (working copy)
@@ -1384,7 +1384,12 @@ simple_object_elf_copy_lto_debug_section
  && p[1] == '_'
  && strncmp (p + (p[2] == '_'),
  "__gnu_lto_", 10) == 0)
-   other = STV_HIDDEN;
+   {
+ other = STV_HIDDEN;
+ ELF_SET_FIELD (type_functions, ei_class, 
Sym,
+ent, st_name, Elf_Word,
+st_name + 1);
+   }
}
}
  *st_other = other;

[Bug target/81803] [7/8 regression] miscompilation at -O1 on mips64el

2017-10-30 Thread mpf at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81803

mpf at gcc dot gnu.org changed:

   What|Removed |Added

  Attachment #42075|0   |1
is obsolete||

--- Comment #14 from mpf at gcc dot gnu.org ---
Created attachment 42498
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42498=edit
Updated fix

I'm really sorry for my lack of work on this. Too much going on in day to day
work for quite a while now.

(In reply to Eric Botcazou from comment #13)
> > I can't say that I am 100% convinced yet with my thinking here but I've
> > attached an updated version of the original patch with some changes:
> > 
> > * Incorporated Eric's feedback on the original patch to check
> > GET_MODE_PRECISION instead of GET_MODE_SIZE for comparing whether a mode is
> > strictly narrower
> > * Limited the test to word sized inner modes or smaller
> > * Limited the test to OP_OUT or OP_INOUT as I can't see any reason why it
> > would matter if we do a narrower input reload
> 
> I'm not convinced for the 3rd restriction though, as push_reload treats the
> IN and OUT cases exactly the same wrt WORD_REGISTER_OPERATIONS.

I don't think the restriction is required for functional correctness but I
thought we may as well take advantage of a narrower load in the OP_IN case if
we could get away with it.

The patch has a serious bug that I started testing but failed to report here.
The bracketing was wrong by one level, an updated version is attached.

[Bug lto/82757] [8 regression] r251560 causes: plugin needed to handle lto object

2017-10-30 Thread amodra at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82757

--- Comment #5 from Alan Modra  ---
Incidentally, the only reason ld.bfd gets past the "plugin needed" warning is
that it only warns on a common symbol called __gnu_lto_slim, not an undefined
one..  Bump st_name by one for __gnu_lto_ symbols, perhaps?

[Bug lto/82757] [8 regression] r251560 causes: plugin needed to handle lto object

2017-10-30 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82757

Richard Biener  changed:

   What|Removed |Added

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

--- Comment #4 from Richard Biener  ---
Bah, ok ...

[Bug lto/82757] [8 regression] r251560 causes: plugin needed to handle lto object

2017-10-30 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82757

Markus Trippelsdorf  changed:

   What|Removed |Added

Summary|[8 regression] plugin   |[8 regression] r251560
   |needed to handle lto object |causes: plugin needed to
   ||handle lto object

--- Comment #3 from Markus Trippelsdorf  ---
Indeed, it started with r251560.

[Bug target/81803] [7/8 regression] miscompilation at -O1 on mips64el

2017-10-30 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81803

--- Comment #13 from Eric Botcazou  ---
> I can't say that I am 100% convinced yet with my thinking here but I've
> attached an updated version of the original patch with some changes:
> 
> * Incorporated Eric's feedback on the original patch to check
> GET_MODE_PRECISION instead of GET_MODE_SIZE for comparing whether a mode is
> strictly narrower
> * Limited the test to word sized inner modes or smaller
> * Limited the test to OP_OUT or OP_INOUT as I can't see any reason why it
> would matter if we do a narrower input reload

I'm not convinced for the 3rd restriction though, as push_reload treats the IN
and OUT cases exactly the same wrt WORD_REGISTER_OPERATIONS.

[Bug c++/82764] [7/8 Regression] ICE in output_constructor_regular_field, at varasm.c:5030

2017-10-30 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82764

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jason at gcc dot gnu.org

--- Comment #5 from Jakub Jelinek  ---
Started with r241187.

[Bug lto/82757] [8 regression] plugin needed to handle lto object

2017-10-30 Thread amodra at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82757

Alan Modra  changed:

   What|Removed |Added

 CC||amodra at gmail dot com

--- Comment #2 from Alan Modra  ---
> Quite surely fallout of Alans changes...

Not so fast.  I have a build of gcc version 8.0.0 20170921 predating any
changes I made to simple-object-elf.c, that exhibits the same failure with
gold.

I strongly suspect the -fuse-ld=gold failure started with

commit cb194cb7e741bba8741c61cdd63cc4cbe3b0c3f2
Author: rguenth 
Date:   Thu Aug 31 11:21:40 2017 +

2017-08-31  Richard Biener  

PR lto/81968
* simple-object-elf.c (simple_object_elf_copy_lto_debug_section):
Keep names of removed global symbols.


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

[Bug target/82651] After r253879 GCC 8.0 can't build cross compiler for mingw32

2017-10-30 Thread mateuszb at poczta dot onet.pl
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82651

mateuszb at poczta dot onet.pl changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |FIXED

--- Comment #3 from mateuszb at poczta dot onet.pl ---
Fixed in r254211. Thanks!

[Bug c++/82764] [7/8 Regression] ICE in output_constructor_regular_field, at varasm.c:5030

2017-10-30 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82764

--- Comment #4 from Jakub Jelinek  ---
Bisecting...

[Bug c++/82764] [7/8 Regression] ICE in output_constructor_regular_field, at varasm.c:5030

2017-10-30 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82764

Jakub Jelinek  changed:

   What|Removed |Added

   Keywords|needs-bisection |
 CC||jakub at gcc dot gnu.org

--- Comment #3 from Jakub Jelinek  ---
Bisecting...

[Bug c/82765] [6/7/8 Regression] ICE at -Os on valid code on x86_64-linux-gnu: in tree_to_shwi, at tree.c:6611

2017-10-30 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82765

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #3 from Jakub Jelinek  ---
Started with r172958.

[Bug target/81803] [7/8 regression] miscompilation at -O1 on mips64el

2017-10-30 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81803

--- Comment #12 from Eric Botcazou  ---
(In reply to Chen Qi from comment #11)
> mpf,
> 
> I'm working on Yocto project. I also encountered a similar problem.
> 
> I used the patch you created in attachment. And things work correctly with
> '-O2'.

Great, thanks for testing.

> Is there any plan sending the patch to gcc mailing list?
> Is there any known problem about the patch?

I'm going to submit the patch for review.

  1   2   >