[Bug middle-end/68983] [6 Regression] ICE: in store_field, at expr.c:6659

2016-01-06 Thread lucdanton at free dot fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68983

--- Comment #8 from lucdanton at free dot fr ---
(In reply to Jason Merrill from comment #7)
> (In reply to lucdanton from comment #6)
> > I've independently run into this bug and applying this patch to HEAD doesn't
> > help on my end, the same ICE happens (except it is now pointing to line 
> > 6660 of
> > course).
> 
> Good to know.  Please attach a testcase?

Compiled with: g++-trunk -std=c++11 main.cpp

class A {
public:
  A m_fn1();
  A(A const &);
  int *L;
  int ref;
};
struct B : A {
  using base_type = A;
  B();
};
B::B() : base_type((0, m_fn1())) {}

[Bug middle-end/68983] [6 Regression] ICE: in store_field, at expr.c:6659

2016-01-06 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68983

--- Comment #7 from Jason Merrill  ---
(In reply to lucdanton from comment #6)
> I've independently run into this bug and applying this patch to HEAD doesn't
> help on my end, the same ICE happens (except it is now pointing to line 6660 
> of
> course).

Good to know.  Please attach a testcase?

[Bug target/62273] doc: Invoke.texi -mkernel mentions undocumented option

2016-01-06 Thread egall at gwmail dot gwu.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62273

Eric Gallager  changed:

   What|Removed |Added

 CC||egall at gwmail dot gwu.edu

--- Comment #2 from Eric Gallager  ---
In the version of the manual for Apple's version of GCC, the option is
documented like this:

-fapple-kext
-findirect-virtual-calls
-fterminated-vtables
Alter vtables, destructors, and other implementation details to more closely
resemble the GCC 2.95 ABI for PowerPC and 32-bit i386. This is to make kernel
extensions loadable by Darwin kernels, and is required to build any Darwin
kernel extension. In addition, virtual calls are not made directly, instead,
code is generated to always go through the virtual table, as virtual tables can
be patched by the kernel module loader. Vtables are altered by adding a zero
word at the end of every vtable. -findirect-virtual-calls and
-fterminated-vtables are accepted for backwards compatibility but will be
removed in the future. Additionally implies most of -mkernel except for
-msoft-float and -mlong-branch for PowerPC targets. (APPLE ONLY) 

Ref: http://opensource.apple.com/source/gcc/gcc-5666.3/gcc/doc/invoke.texi

[Bug boehm-gc/66848] boehm-gc fails test suite on x86_64-apple-darwin15

2016-01-06 Thread egall at gwmail dot gwu.edu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66848

Eric Gallager  changed:

   What|Removed |Added

 CC||egall at gwmail dot gwu.edu

--- Comment #31 from Eric Gallager  ---
(In reply to Jack Howarth from comment #30)
> 
> It certainly would be worthwhile getting some level of support for SIP in
> gcc 6 as we really don't want to encourage users to disable that feature.

Why wouldn't we want to encourage users to disable it? Does it actually do
anything useful? Judging by this thread, it seems more like an unnecessary
hassle to me, and further justification for my decision to stay on an old
version of OS X that isn't encumbered by such hassles...

[Bug middle-end/68983] [6 Regression] ICE: in store_field, at expr.c:6659

2016-01-06 Thread lucdanton at free dot fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68983

lucdanton at free dot fr changed:

   What|Removed |Added

 CC||lucdanton at free dot fr

--- Comment #6 from lucdanton at free dot fr ---
(In reply to Jason Merrill from comment #5)
> Created attachment 37245 [details]
> possible patch
> 
> Would this be an appropriate fix?  It seems that if the source is a ref we
> won't copy anything onto the stack.

I've independently run into this bug and applying this patch to HEAD doesn't
help
on my end, the same ICE happens (except it is now pointing to line 6660 of
course).

[Bug c++/66735] [C++14] lambda init-capture fails for const references

2016-01-06 Thread lichray at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66735

Zhihao Yuan  changed:

   What|Removed |Added

 CC||lichray at gmail dot com

--- Comment #3 from Zhihao Yuan  ---
As the standardization of `std::as_const`, this bug becomes a blocker.

[Bug c++/63192] non-mutable lambda capture by value on reference does not apply const

2016-01-06 Thread lichray at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63192

--- Comment #4 from Zhihao Yuan  ---
(In reply to Zhihao Yuan from comment #3)
> Confirmed, please fix.  As the standardization of `std::as_const`, this bug
> becomes significant.

Never mind, I will create another bug report to demonstrate my issue (very
likely to have the same cause but with different result).

[Bug c++/63192] non-mutable lambda capture by value on reference does not apply const

2016-01-06 Thread lichray at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63192

Zhihao Yuan  changed:

   What|Removed |Added

 CC||lichray at gmail dot com

--- Comment #3 from Zhihao Yuan  ---
Confirmed, please fix.  As the standardization of `std::as_const`, this bug
becomes significant.

[Bug target/62273] doc: Invoke.texi -mkernel mentions undocumented option

2016-01-06 Thread sandra at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62273

sandra at gcc dot gnu.org changed:

   What|Removed |Added

 CC||sandra at gcc dot gnu.org

--- Comment #1 from sandra at gcc dot gnu.org ---
I also see that the related driver options -findirect-virtual-calls and
-fterminated-vtables (which appear in DARWIN_CC1_SPEC) are not documented
either.  And, I just filed PR 69179 for missing documentation of the
"apple_kext_compatibility" attribute which is also tied to -fapple-kext.

[Bug target/69179] New: undocumented darwin attributes "apple_kext_compatibility" and "weak_import"

2016-01-06 Thread sandra at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69179

Bug ID: 69179
   Summary: undocumented darwin attributes
"apple_kext_compatibility" and "weak_import"
   Product: gcc
   Version: 6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sandra at gcc dot gnu.org
  Target Milestone: ---

config/darwin.c defines attributes "apple_kext_compatibility" and "weak_import"
which have no documentation in the GCC manual.

"apple_kext_compatibility" seems related to the also-undocumented -fapple-kext
command-line option (see PR 62273).  Reading the code, I'm wondering if a
feature intended to provide backwards compatibility with GCC 2.95 is even
relevant to modern versions of Darwin, or whether this might be a candidate for
deletion as obsolete.

"weak_import" seems related to the normal "weak" attribute, but just from
reading the code I cannot figure out how to explain the difference in a concise
but user-friendly way.

Can a Darwin expert help fill in the missing docs?

[Bug bootstrap/69123] [6 Regression] --with-build-config='bootstrap-O3 bootstrap-debug' miscompiled stage 2

2016-01-06 Thread aoliva at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69123

Alexandre Oliva  changed:

   What|Removed |Added

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

--- Comment #14 from Alexandre Oliva  ---
Mine.

H.J., thanks for the reduced testcase.  I'm afraid the patch is not right,
though.  All the test you removed does is to allow an optimization in the
comparison between two dataflow sets, namely, to refrain from comparing each
element of the second set with corresponding element in the first, after
comparing each element of the first set with the corresponding element in the
second.  There's a comment at the end of dataflow_set_different_p to that
effect, and removing the optimization will result in incorrect dataflow
analysis, because GCC won't notice when entries have been added to the new
dataflow set.

I'm looking into it to figure out why it's oscillating.

[Bug other/68813] [openacc] lto1: internal compiler error: in input_varpool_node, at lto-cgraph.c

2016-01-06 Thread cesar at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68813

--- Comment #5 from cesar at gcc dot gnu.org ---
Author: cesar
Date: Thu Jan  7 03:28:05 2016
New Revision: 232121

URL: https://gcc.gnu.org/viewcvs?rev=232121&root=gcc&view=rev
Log:
PR other/68813

gcc/
* omp-low.c (is_oacc_reduction_private): Delete.
(build_outer_var_ref): Remove special handling for private reductions
in openacc.
(scan_sharing_clauses): Likewise.
(lower_rec_input_clauses): Likewise.
(lower_oacc_reductions): Update support for private reductions.

libgomp/
* testsuite/libgomp.oacc-fortran/pr68813.f90: New test.
* testsuite/libgomp.oacc-fortran/reduction-7.f90: New test.


Added:
branches/gomp-4_0-branch/libgomp/testsuite/libgomp.oacc-fortran/pr68813.f90
   
branches/gomp-4_0-branch/libgomp/testsuite/libgomp.oacc-fortran/reduction-7.f90
Modified:
branches/gomp-4_0-branch/gcc/ChangeLog.gomp
branches/gomp-4_0-branch/gcc/omp-low.c
branches/gomp-4_0-branch/libgomp/ChangeLog.gomp

[Bug testsuite/68629] FAIL: c-c++-common/attr-simd-3.c

2016-01-06 Thread thopre01 at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68629

--- Comment #8 from Thomas Preud'homme  ---
It does fix it for arm-none-eabi targets, the test is now unsupported. I should
have done it myself. Jakub was talking about moving it in the cilk-plus
directory. Do you think it's still necessary?

[Bug bootstrap/38866] [Regression] --enable-gstreamer-peer + multilib + 32 bit boot = broken build

2016-01-06 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38866

Andrew Pinski  changed:

   What|Removed |Added

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

--- Comment #1 from Andrew Pinski  ---
--enable-gstreamer-peer

says it works for all multi-libs.  It is not GCC/libjava's responsibility to
make sure that is true.

i386-pc-solaris2.11 defaults to be being a multi-lib (multi-arch) by default so
you need to disable multi-lib if you only want 32bit support.

[Bug libstdc++/69092] [4.9/5/6 Regression] basic_string constructor and throwing iterators

2016-01-06 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69092

Jonathan Wakely  changed:

   What|Removed |Added

  Known to work||4.8.3
Summary|basic_string constructor|[4.9/5/6 Regression]
   |and throwing iterators  |basic_string constructor
   ||and throwing iterators
  Known to fail||4.9.3, 5.3.0, 6.0

--- Comment #3 from Jonathan Wakely  ---
This worked OK in 4.8, and still works OK in C++03 mode (if tweaked to remove
the C++11 features):

#include
#include

struct hate_T_iterator : std::iterator {
explicit hate_T_iterator(char* p) : p(p) {}
char* p;
hate_T_iterator& operator++() { ++p; return *this; }
hate_T_iterator operator++(int) { hate_T_iterator r = *this; ++*this;
return r; }
char& operator*() const { if(*p == 'T') throw 1; else return *p; }
char* operator->() const { return p; }
bool operator== (hate_T_iterator other) const { return p == other.p;}
bool operator!= (hate_T_iterator other) const { return p != other.p;}
};

int main(){
char test_str[4] = "ATA";
try {
std::string s(hate_T_iterator(test_str), hate_T_iterator(test_str+3));
}
catch(...) {
}
}

[Bug target/45927] autoconf regression wrt .quad availability targeting amd64 from biarch cross compiler

2016-01-06 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=45927

--- Comment #1 from Andrew Pinski  ---
Does this still happen in GCC 5?

[Bug tree-optimization/51049] A regression caused by "Improve handling of conditional-branches on targets with high branch costs"

2016-01-06 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51049

--- Comment #1 from Andrew Pinski  ---
I think this has been fixed or at least for most cases.  That is the & part is
redone during the combineif pass.

[Bug c++/69178] [concepts] An invalid expression in a requires-expression is evaluated too eagerly

2016-01-06 Thread ville.voutilainen at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69178

--- Comment #1 from Ville Voutilainen  ---
This check happens in check_bases(), which doesn't take complain flags, so
wherever that check fails, it's always a hard error. I suppose the checking
function call chains that go to that function should accept complain flags
and then decide whether to produce a hard error or not?

[Bug tree-optimization/60890] Performance regression in 4.8 for memory postinc

2016-01-06 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60890

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||missed-optimization

--- Comment #4 from Andrew Pinski  ---
Can you try GCC 5.x and/or the trunk?  There has been many IVOPTs improvements
since 4.8.x.

[Bug c++/69178] New: [concepts] An invalid expression in a requires-expression is evaluated too eagerly

2016-01-06 Thread ville.voutilainen at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69178

Bug ID: 69178
   Summary: [concepts] An invalid expression in a
requires-expression is evaluated too eagerly
   Product: gcc
   Version: 6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: ville.voutilainen at gmail dot com
  Target Milestone: ---

Test snippet:

template  struct S : T {};
template  concept bool ConcreteDerivableFrom()
{
return requires()
{
S();
};
}

struct X final {};

template 
void f() {}

template 
void f() {}

int main()
{
f();
}

Fails with

prog.cc: In instantiation of 'struct S':
prog.cc:20:10:   required from here
prog.cc:1:27: error: cannot derive from 'final' base 'X' in derived type 'S'
 template  struct S : T {};
   ^

[Bug middle-end/68983] [6 Regression] ICE: in store_field, at expr.c:6659

2016-01-06 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68983

--- Comment #5 from Jason Merrill  ---
Created attachment 37245
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37245&action=edit
possible patch

Would this be an appropriate fix?  It seems that if the source is a ref we
won't copy anything onto the stack.

[Bug target/69176] [6 Regression] ICE in in final_scan_insn, at final.c:2981 on aarch64-linux-gnu

2016-01-06 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69176

--- Comment #2 from Andrew Pinski  ---
Note -g is not needed to reproduce the bug and speeds up the compiling a lot.

[Bug tree-optimization/67755] [5/6 Regression] Bad edge probability/block freqency for tree jump threading

2016-01-06 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67755

Jeffrey A. Law  changed:

   What|Removed |Added

 CC||law at redhat dot com

--- Comment #3 from Jeffrey A. Law  ---
It looks like the code to estimate the on/off path edge data is mucking things
up in the case where we've got a join block.

What's strange here is the way we estimate the probability/counts for the
outgoing edges of the join block's duplicate.  ISTM that in the absence of
additional information, the right thing to do is apply the probabilities from
the join block to the duplicate of the join block to get the counts for the
on/off path.

I'm going to shovel some snow and ponder.

[Bug c++/67824] constexpr char* compare operations not constexpr, but char[] operations ARE

2016-01-06 Thread erich.keane at intel dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67824

--- Comment #1 from Erich Keane  ---
I just reconfirmed this in 5.3.1 on Fedora:
gcc (GCC) 5.3.1 20151207 (Red Hat 5.3.1-2)
Copyright (C) 2015 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.

Error message for the previous example is:
constexpr_gcc_bug.cpp: In function ‘int main()’:
constexpr_gcc_bug.cpp:8:5: error: non-constant condition for static assertion
 static_assert(root2 < root2 + 1, "This fails");
 ^
constexpr_gcc_bug.cpp:8:25: error: ‘(((const char*)"12") < (((const char*)"12")
+ 1u))’ is not a constant expression
 static_assert(root2 < root2 + 1, "This fails");

[Bug libstdc++/69092] basic_string constructor and throwing iterators

2016-01-06 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69092

--- Comment #2 from Jonathan Wakely  ---
Author: redi
Date: Wed Jan  6 20:34:41 2016
New Revision: 232112

URL: https://gcc.gnu.org/viewcvs?rev=232112&root=gcc&view=rev
Log:
Remove noexcept from function template that can throw

PR libstdc++/69092
* include/bits/basic_string.h (basic_string::_S_copy_chars<_Iterator>):
Remove _GLIBCXX_NOEXCEPT.
testsuite/21_strings/basic_string/cons/char/69092.cc: New.

Added:
trunk/libstdc++-v3/testsuite/21_strings/basic_string/cons/char/69092.cc
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/include/bits/basic_string.h

[Bug target/69140] stack alignment + O1 breaks with Microsoft ABI

2016-01-06 Thread uros at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69140

--- Comment #17 from uros at gcc dot gnu.org ---
Author: uros
Date: Wed Jan  6 20:19:04 2016
New Revision: 232111

URL: https://gcc.gnu.org/viewcvs?rev=232111&root=gcc&view=rev
Log:
PR target/69140
* config/i386/i386.c (ix86_expand_prologue): Declare fs.sp_valid
depending on frame_pointer_needed before remaining integer and SSE
registers are saved.

testsuite/ChangeLog:

PR target/69140
* gcc.target/i386/pr69140.c: New test


Added:
trunk/gcc/testsuite/gcc.target/i386/pr69140.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/i386/i386.c
trunk/gcc/testsuite/ChangeLog

[Bug fortran/69154] [6 Regression] ICE in gfc_trans_where_2, at fortran/trans-stmt.c:5005 on *-linux

2016-01-06 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69154

Thomas Koenig  changed:

   What|Removed |Added

 Blocks||37131

--- Comment #4 from Thomas Koenig  ---
Inlined matmul is causing problems.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=37131
[Bug 37131] inline matmul for small matrix sizes

[Bug target/69176] [6 Regression] ICE in in final_scan_insn, at final.c:2981 on aarch64-linux-gnu

2016-01-06 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69176

--- Comment #1 from Andrew Pinski  ---
Happens with r231970 also.

[Bug rtl-optimization/69032] [5/6 Regression] ICE: in cfg_preds_1, at sel-sched-ir.c:4809 with -fsched-pressure -fsel-sched-pipelining -fselective-scheduling

2016-01-06 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69032

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |5.4

[Bug c++/68819] Invalid "-Wmisleading-indentation" warning if location_t >=LINE_MAP_MAX_LOCATION_WITH_COLS

2016-01-06 Thread dmalcolm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68819

David Malcolm  changed:

   What|Removed |Added

 Depends on||69177

--- Comment #11 from David Malcolm  ---
I've opened PR preprocessor/69177 to track the increased tendency to hit the
LINE_MAP_MAX_LOCATION_WITH_COLS limit.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69177
[Bug 69177] Bit-packing optimization makes it too easy to have location_t >=
LINE_MAP_MAX_LOCATION_WITH_COLS

[Bug c++/68998] [5 Regression] Wrong code generated regarding constexpr arrays

2016-01-06 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68998

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||wrong-code
   Target Milestone|--- |5.4

[Bug preprocessor/69177] New: Bit-packing optimization makes it too easy to have location_t >= LINE_MAP_MAX_LOCATION_WITH_COLS

2016-01-06 Thread dmalcolm at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69177

Bug ID: 69177
   Summary: Bit-packing optimization makes it too easy to have
location_t >= LINE_MAP_MAX_LOCATION_WITH_COLS
   Product: gcc
   Version: 6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: preprocessor
  Assignee: unassigned at gcc dot gnu.org
  Reporter: dmalcolm at gcc dot gnu.org
  Target Milestone: ---

[splitting this off from PR c++/68819, and from
https://gcc.gnu.org/ml/gcc-patches/2015-12/msg01921.html, to ensure that we fix
this]

libcpp has a degraded fallback mode for large source files where if a
location_t > LINE_MAP_MAX_LOCATION_WITH_COLS we fall back to just tracking
lines, not columns&ranges (currently 0x6000), and every location_t expands
to having a column == 0.

Sadly we're more likely to see this case in gcc 6 than in gcc 5 since we're
using up 5 bits of location_t for packing short ranges into them (to avoid
needing to go to the ad-hoc lookaside during tokenization; this change was part
of r230331).

I've seen us hit this limit on our own code during bootstrap; for example,
gimple-match.c is hitting the LINE_MAP_MAX_LOCATION_WITH_COLS limit; I've seen
a diagnostic at line 50437 column 0.

The bit-packing optimization is causing us to hit that
LINE_MAP_MAX_LOCATION_WITH_COLS limit earlier than before, and presumably this
will affect people with other very large source files (e.g. as in the initial
PR c++/68819 report).

Rough calculations, assuming 7 bits of columns,
LINE_MAP_MAX_LOCATION_WITH_COLS == 0x6000

gcc 5:
  0x6000 / 128 per line = 12,582,912 lines of code before
  hitting the has-column-information limit.

gcc 6 trunk:
  0x6000 / (128 * 32) per line = 393,216 lines of code before
  hitting the has-column-information limit.

These numbers will be less in the face of lines longer than
127 characters.

I've posted a proposed fix for this as:
  https://gcc.gnu.org/ml/gcc-patches/2015-12/msg01921.html
which gives us a "longer runway", though this is mixed up with changes to
-Wmisleading-indentation

[Bug c++/69029] [6 Regression] bogus -Wmisleading-indentation warning on one-line loops

2016-01-06 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69029

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |6.0

[Bug target/69171] [6 Regression] error: unrecognizable insn: on x86_64 with -O2

2016-01-06 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69171

--- Comment #3 from H.J. Lu  ---
Created attachment 37244
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37244&action=edit
A patch

[Bug tree-optimization/68976] [6 Regression] ICE w/ -O2 (and above) -fgraphite-identity (or -floop-nest-optimize)

2016-01-06 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68976

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |6.0

[Bug c++/68979] [6 Regression] error: left operand of shift expression ‘(-1 << 4)’ is negative

2016-01-06 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68979

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |6.0

[Bug target/69176] [6 Regression] ICE in in final_scan_insn, at final.c:2981 on aarch64-linux-gnu

2016-01-06 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69176

Andrew Pinski  changed:

   What|Removed |Added

 CC||pinskia at gcc dot gnu.org
   Target Milestone|--- |6.0

[Bug target/69176] New: [6 Regression] ICE in in final_scan_insn, at final.c:2981 on aarch64-linux-gnu

2016-01-06 Thread doko at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69176

Bug ID: 69176
   Summary: [6 Regression] ICE in in final_scan_insn, at
final.c:2981 on aarch64-linux-gnu
   Product: gcc
   Version: 6.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: ---

Created attachment 37243
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37243&action=edit
preprocessed source

trunk r232077, aarch64-linux-gnu:

g++ src/faust-dsp-standalone.cpp -g -O2 -fstack-protector-strong -Wformat
-Werror=format-security -fPIC -DVERSI
ON=1.3.0 -I/usr/lib/faust -Isrc/ -Iinclude/ -DPREFIX=/usr -Wall -c -o
src/faust-dsp-standalone.o
In file included from src/faust-dsp-standalone.cpp:31:0:
src/../gen/yc20-dsp-standalone.cpp: In member function 'virtual void
mydsp::compute(int, float**, float**)':
src/../gen/yc20-dsp-standalone.cpp:1659:15: note: variable tracking size limit
exceeded with -fvar-tracking-ass
ignments, retrying without
  virtual void compute (int fullcount, FAUSTFLOAT** input, FAUSTFLOAT** output)
{
   ^~~

In file included from src/faust-dsp-standalone.cpp:31:0:
src/../gen/yc20-dsp-standalone.cpp:19015:2: error: could not split insn
  }
  ^

(insn 152068 64217 64221 (set (reg:DI 1 x1 [88028])
(plus:DI (reg/f:DI 29 x29)
(const_int 129024 [0x1f800])))
src/../gen/yc20-dsp-standalone.cpp:10746 95 {*adddi3_pluslong}
 (nil))
src/../gen/yc20-dsp-standalone.cpp:19015:2: internal compiler error: in
final_scan_insn, at final.c:2981
0xa0e9a7 _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
../../src/gcc/rtl-error.c:108
0x83f67b final_scan_insn(rtx_insn*, _IO_FILE*, int, int, int*)
../../src/gcc/final.c:2981
0x83f927 final(rtx_insn*, _IO_FILE*, int)
../../src/gcc/final.c:2044
0x83fe8f rest_of_handle_final
../../src/gcc/final.c:4440
0x83fe8f execute
../../src/gcc/final.c:4515
Please submit a full bug report,
with preprocessed source if appropriate.

currently reducing, build takes 10min ...

[Bug c++/69158] [6 Regression] ICE in in cxx_eval_indirect_ref, at cp/constexpr.c:2598

2016-01-06 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69158

--- Comment #3 from Andrew Pinski  ---
Is this valid code?  That is IdHdr is used during the initialization of itself.

[Bug c++/69158] [6 Regression] ICE in in cxx_eval_indirect_ref, at cp/constexpr.c:2598

2016-01-06 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69158

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |6.0

[Bug fortran/69154] [6 Regression] ICE in gfc_trans_where_2, at fortran/trans-stmt.c:5005 on *-linux

2016-01-06 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69154

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |6.0

[Bug target/69175] [6 Regression] ICE in haifa_luid_for_non_insn, at haifa-sched.c:7895

2016-01-06 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69175

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |6.0

[Bug tree-optimization/69173] [6 Regression] ICE (segfault) in vinfo_for_stmt

2016-01-06 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69173

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |6.0

[Bug target/69171] [6 Regression] error: unrecognizable insn: on x86_64 with -O2

2016-01-06 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69171

H.J. Lu  changed:

   What|Removed |Added

   Assignee|unassigned at gcc dot gnu.org  |hjl.tools at gmail dot 
com
   Target Milestone|--- |6.0

[Bug tree-optimization/69172] [6 Regression] ICE in make_ssa_name_fn, at tree-ssanames.c:266

2016-01-06 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69172

Andrew Pinski  changed:

   What|Removed |Added

 Target|powerpc64le-linux-gnu   |powerpc64le-linux-gnu
   ||aarch64-linux-gnu
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-01-06
   Target Milestone|--- |6.0
 Ever confirmed|0   |1

--- Comment #1 from Andrew Pinski  ---
Confirmed on aarch64-linux-gnu also.
apinski@arm64:~/src/local$ gcc -O3 t9.c
t9.c: In function ‘sd_inode_set_vid’:
t9.c:10:1: internal compiler error: in make_ssa_name_fn, at tree-ssanames.c:266
 }
 ^

0xcd958b make_ssa_name_fn(function*, tree_node*, gimple*)
/home/apinski/src/local/gcc/gcc/tree-ssanames.c:263
0x86f817 make_ssa_name
/home/apinski/src/local/gcc/gcc/tree-ssanames.h:110
0x86f817 gimple_build(gimple**, unsigned int, tree_code, tree_node*,
tree_node*)
/home/apinski/src/local/gcc/gcc/gimple-fold.c:5985
0x8772b3 gimple_fold_builtin_memory_chk
/home/apinski/src/local/gcc/gcc/gimple-fold.c:1713
0x8772b3 gimple_fold_builtin
/home/apinski/src/local/gcc/gcc/gimple-fold.c:2836
0x87889b gimple_fold_call
/home/apinski/src/local/gcc/gcc/gimple-fold.c:3112
0x87889b fold_stmt_1
/home/apinski/src/local/gcc/gcc/gimple-fold.c:3716
0xc70337 substitute_and_fold_dom_walker::before_dom_children(basic_block_def*)
/home/apinski/src/local/gcc/gcc/tree-ssa-propagate.c:1232
0xfc581b dom_walker::walk(basic_block_def*)
/home/apinski/src/local/gcc/gcc/domwalk.c:265
0xc6f5e3 substitute_and_fold(tree_node* (*)(tree_node*), bool
(*)(gimple_stmt_iterator*), bool)
/home/apinski/src/local/gcc/gcc/tree-ssa-propagate.c:1332
0xbdeb63 ccp_finalize
/home/apinski/src/local/gcc/gcc/tree-ssa-ccp.c:947
0xbdf197 do_ssa_ccp
/home/apinski/src/local/gcc/gcc/tree-ssa-ccp.c:2409
0xbdf197 execute
/home/apinski/src/local/gcc/gcc/tree-ssa-ccp.c:2452
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

[Bug tree-optimization/69170] [6 Regression] ICE (segfault) in find_uses_to_rename_use

2016-01-06 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69170

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |6.0

[Bug target/69175] New: [6 Regression] ICE in haifa_luid_for_non_insn, at haifa-sched.c:7895

2016-01-06 Thread doko at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69175

Bug ID: 69175
   Summary: [6 Regression] ICE in haifa_luid_for_non_insn, at
haifa-sched.c:7895
   Product: gcc
   Version: 6.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: ---

trunk r232077, arm-linux-gnueabihf, works with -O1

reduced test case:

struct A {
  A *moreRU, *lessRU;
} a;
class B {
  A *mostRU;
  A *leastRU;
  void m_fn1();
};
void *b;
void B::m_fn1() {
  if (b) {
A *n = (A *)b;
if (b == mostRU)
  if (n == leastRU)
mostRU = __null;
  else
mostRU->moreRU = __null;
else
  n->lessRU->moreRU = &a;
n->lessRU = mostRU;
if (mostRU == __null)
  mostRU = leastRU = n;
else
  mostRU = n;
  }
}

$ g++ -c -g -O2 -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16 -mthumb data.ii
data.ii: In member function 'void B::m_fn1()':
data.ii:26:1: internal compiler error: in haifa_luid_for_non_insn, at
haifa-sched.c:7895
 }
 ^

0x8600e5 haifa_luid_for_non_insn
../../src/gcc/haifa-sched.c:7895
0x864ccb sched_init_insn_luid(rtx_insn*)
../../src/gcc/haifa-sched.c:9037
0x8650d3 sched_init_luids(vec)
../../src/gcc/haifa-sched.c:9066
0x8652a1 haifa_sched_init()
../../src/gcc/haifa-sched.c:7427
0x4a880f schedule_insns()
../../src/gcc/sched-rgn.c:3504
0x4a8d6f schedule_insns()
../../src/gcc/sched-rgn.c:3498
0x4a8d6f rest_of_handle_sched2
../../src/gcc/sched-rgn.c:3737
0x4a8d6f execute
../../src/gcc/sched-rgn.c:3873
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.

[Bug tree-optimization/69169] [6 Regression] ICE (segfault) on powerpc64le-linux-gnu

2016-01-06 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69169

Andrew Pinski  changed:

   What|Removed |Added

 Target|powerpc64le-linux-gnu   |powerpc64le-linux-gnu
   ||aarch64-linux-gnu
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-01-06
   Target Milestone|--- |6.0
 Ever confirmed|0   |1

--- Comment #1 from Andrew Pinski  ---
Confirmed on aarch64-linux-gnu also.
apinski@arm64:~/src/local$ gcc -O2 t9.c
gcc: internal compiler error: Segmentation fault (program cc1)
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.

[Bug tree-optimization/69168] [6 Regression] ICE in vect_analyze_loop_2, at tree-vect-loop.c:2182

2016-01-06 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69168

Andrew Pinski  changed:

   What|Removed |Added

 Target|powerpc64le-linux-gnu   |powerpc64le-linux-gnu
   ||aarch64-linux-gnu
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-01-06
   Target Milestone|--- |6.0
 Ever confirmed|0   |1

--- Comment #1 from Andrew Pinski  ---
Confirmed on aarch64-linux-gnu also.

t9.c: In function ‘fn1’:
t9.c:4:6: internal compiler error: in vect_analyze_loop_2, at
tree-vect-loop.c:2182
 void fn1() {
  ^~~

0xd1b4a3 vect_analyze_loop_2
/home/apinski/src/local/gcc/gcc/tree-vect-loop.c:2182
0xd1b4a3 vect_analyze_loop(loop*)
/home/apinski/src/local/gcc/gcc/tree-vect-loop.c:2251
0xd3081b vectorize_loops()
/home/apinski/src/local/gcc/gcc/tree-vectorizer.c:532
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

[Bug tree-optimization/69167] [6 Regression] internal compiler error: SSA corruption

2016-01-06 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69167

Andrew Pinski  changed:

   What|Removed |Added

 Target|powerpc64le-linux-gnu   |powerpc64le-linux-gnu
   ||aarch64-linux-gnu
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-01-06
 Ever confirmed|0   |1

--- Comment #1 from Andrew Pinski  ---
Confirmed on aarch64-linux-gnu also.

[Bug tree-optimization/69167] [6 Regression] internal compiler error: SSA corruption

2016-01-06 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69167

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |6.0

[Bug tree-optimization/69174] [6 Regression] ICE (segfault) in operand_equal_p

2016-01-06 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69174

--- Comment #1 from Andrew Pinski  ---
r231970 I get a different ICE:
t99.c: In function ‘fn1’:
t99.c:8:6: internal compiler error: in operator[], at vec.h:714
 void fn1() {
  ^~~

0xd2868f vec::operator[](unsigned int)
/home/apinski/src/local/gcc/gcc/vec.h:714
0xd2868f vec::operator[](unsigned int)
/home/apinski/src/local/gcc/gcc/vec.h:1180
0xd2868f vect_create_mask_and_perm
/home/apinski/src/local/gcc/gcc/tree-vect-slp.c:3213
0xd2868f vect_transform_slp_perm_load(_slp_tree*, vec, gimple_stmt_iterator*, int, _slp_instance*, bool)
/home/apinski/src/local/gcc/gcc/tree-vect-slp.c:3377
0xd059bb vectorizable_load
/home/apinski/src/local/gcc/gcc/tree-vect-stmts.c:6816
0xd0f037 vect_transform_stmt(gimple*, gimple_stmt_iterator*, bool*, _slp_tree*,
_slp_instance*)
/home/apinski/src/local/gcc/gcc/tree-vect-stmts.c:8185
0xd2717f vect_schedule_slp_instance
/home/apinski/src/local/gcc/gcc/tree-vect-slp.c:3537
0xd26f6b vect_schedule_slp_instance
/home/apinski/src/local/gcc/gcc/tree-vect-slp.c:3412
0xd26f6b vect_schedule_slp_instance
/home/apinski/src/local/gcc/gcc/tree-vect-slp.c:3412
0xd28a27 vect_schedule_slp(vec_info*)
/home/apinski/src/local/gcc/gcc/tree-vect-slp.c:3609
0xd1503b vect_transform_loop(_loop_vec_info*)
/home/apinski/src/local/gcc/gcc/tree-vect-loop.c:6848
0xd30cc7 vectorize_loops()
/home/apinski/src/local/gcc/gcc/tree-vectorizer.c:554
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

[Bug tree-optimization/69174] [6 Regression] ICE (segfault) in operand_equal_p

2016-01-06 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69174

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||ice-on-valid-code
   Target Milestone|--- |6.0

[Bug tree-optimization/69174] New: [6 Regression] ICE (segfault) in operand_equal_p

2016-01-06 Thread doko at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69174

Bug ID: 69174
   Summary: [6 Regression] ICE (segfault) in operand_equal_p
   Product: gcc
   Version: 6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: doko at gcc dot gnu.org
  Target Milestone: ---

trunk r232077, aarch64-linux-gnu, works with -O2

reduced test case:

typedef int pixval;
typedef struct { pixval r, g, b; } xel;
int convertRow_sample, convertRaster_col;
short *convertRow_samplebuf;
xel *convertRow_xelrow;
short convertRow_spp;
void fn1() {
  int *alpharow;
  for (; convertRaster_col;
   ++convertRaster_col, convertRow_sample += convertRow_spp) {
convertRow_xelrow[convertRaster_col].r =
convertRow_xelrow[convertRaster_col].g =
convertRow_xelrow[convertRaster_col].b =
convertRow_samplebuf[convertRow_sample];
alpharow[convertRaster_col] = convertRow_samplebuf[convertRow_sample + 3];
  }
}

$ gcc -c -g -O3 tifftopnm.i
tifftopnm.i: In function 'fn1':
tifftopnm.i:7:6: internal compiler error: Segmentation fault
 void fn1() {
  ^~~

0x96082f crash_signal
../../src/gcc/toplev.c:334
0x73e424 operand_equal_p(tree_node const*, tree_node const*, unsigned int)
../../src/gcc/fold-const.c:2742
0xae8a13 lower_vec_perm
../../src/gcc/tree-vect-generic.c:1247
0xae9463 expand_vector_operations_1
../../src/gcc/tree-vect-generic.c:1518
0xae9463 expand_vector_operations
../../src/gcc/tree-vect-generic.c:1767
0xae9463 execute
../../src/gcc/tree-vect-generic.c:1851
Please submit a full bug report,
with preprocessed source if appropriate.

[Bug target/69171] [6 Regression] error: unrecognizable insn: on x86_64 with -O2

2016-01-06 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69171

--- Comment #2 from Dominique d'Humieres  ---
On x86_64-apple-darwin15, between r232062 and r232092, when compiling
gcc.c-torture/compile/SFset.c with -O1 I get

opt/gcc/_clean/gcc/testsuite/gcc.c-torture/compile/SFset.c: In function
'indreg0limm1_set':
/opt/gcc/_clean/gcc/testsuite/gcc.c-torture/compile/SFset.c:73:1: error:
unrecognizable insn:
 {indreg0 = limm1;  }
 ^

(insn 28 27 19 2 (set (reg:V4SF 21 xmm0 [104])
(vec_merge:V4SF (vec_duplicate:V4SF (float:SF (mem/u/c:SI (const:DI
(unspec:DI [
(symbol_ref:DI ("glob1") [flags 0x1000]
)
] UNSPEC_GOTPCREL)) [3  S4 A8])))
(reg:V4SF 21 xmm0 [104])
(const_int 1 [0x1])))
/opt/gcc/_clean/gcc/testsuite/gcc.c-torture/compile/SFset.c:73 -1
 (nil))
/opt/gcc/_clean/gcc/testsuite/gcc.c-torture/compile/SFset.c:73:1: internal
compiler error: in extract_insn, at recog.c:2286

Is this the same bug?

[Bug lto/69082] Final link fails on ARM using lto

2016-01-06 Thread tulipawn at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69082

--- Comment #6 from PeteVine  ---
The two lines read:

movwr0, #:lower16:.LANCHOR0+32768
movtr0, #:upper16:.LANCHOR0+32768

[Bug tree-optimization/69173] New: [6 Regression] ICE (segfault) in vinfo_for_stmt

2016-01-06 Thread doko at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69173

Bug ID: 69173
   Summary: [6 Regression] ICE (segfault) in vinfo_for_stmt
   Product: gcc
   Version: 6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: doko at gcc dot gnu.org
  Target Milestone: ---

trunk r232077, powerpc64le-linux-gnu, works with -O2

reduced test case:

unsigned a;
unsigned *b;
void fn1() {
  char c;
  while (b < (unsigned *)fn1) {
a += b[2] + c;
b++;
  }
}

$ gcc -c -g -O3 woff.i
woff.i: In function 'fn1':
woff.i:3:6: internal compiler error: Segmentation fault
 void fn1() {
  ^~~

0x106c33b3 crash_signal
../../src/gcc/toplev.c:334
0x108e9adc vinfo_for_stmt
../../src/gcc/tree-vectorizer.h:704
0x108e9adc vect_fixup_reduc_chain
../../src/gcc/tree-vect-loop.c:966
0x108e9adc vect_fixup_scalar_cycles_with_patterns
../../src/gcc/tree-vect-loop.c:988
0x108e9adc vect_analyze_loop_2
../../src/gcc/tree-vect-loop.c:1836
0x108e9adc vect_analyze_loop(loop*)
../../src/gcc/tree-vect-loop.c:2251
0x1090002f vectorize_loops()
../../src/gcc/tree-vectorizer.c:532
0x108167eb execute
../../src/gcc/tree-ssa-loop.c:420
Please submit a full bug report,
with preprocessed source if appropriate.

[Bug target/69171] [6 Regression] error: unrecognizable insn: on x86_64 with -O2

2016-01-06 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69171

Markus Trippelsdorf  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-01-06
 CC||hjl.tools at gmail dot com,
   ||trippels at gcc dot gnu.org
Summary|error: unrecognizable insn: |[6 Regression] error:
   |on x86_64 with -O2  |unrecognizable insn: on
   ||x86_64 with -O2
 Ever confirmed|0   |1

--- Comment #1 from Markus Trippelsdorf  ---
trippels@CFARM-IUT-TLSE3 ~ % cat bug261.c
#pragma pack(2)
struct {
  int n;
} a;
float b;
int c;
void fn1() { fn2(c, fn1, b * a.n); }

trippels@CFARM-IUT-TLSE3 ~ % gcc -w -c -O2 bug261.c
bug261.c: In function ‘fn1’:
bug261.c:7:1: error: unrecognizable insn:
 void fn1() { fn2(c, fn1, b * a.n); }
 ^~~~

(insn 18 17 6 2 (set (reg:V4SF 21 xmm0 [93])
(vec_merge:V4SF (vec_duplicate:V4SF (float:SF (mem/c:SI (symbol_ref:DI
("a") [flags 0x2] ) [2 a.n+0 S4 A16])))
(reg:V4SF 21 xmm0 [93])
(const_int 1 [0x1]))) bug261.c:7 -1
 (nil))
bug261.c:7:1: internal compiler error: in extract_insn, at recog.c:2286
0xa6541a _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
../../gcc/gcc/rtl-error.c:108
0xa65449 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
../../gcc/gcc/rtl-error.c:116
0xa32857 extract_insn(rtx_insn*)
../../gcc/gcc/recog.c:2286
0xa328d4 extract_insn_cached(rtx_insn*)
../../gcc/gcc/recog.c:2177
0x7f4fed cleanup_subreg_operands(rtx_insn*)
../../gcc/gcc/final.c:3103
0xa30037 split_insn
../../gcc/gcc/recog.c:2899
0xa34ba7 split_all_insns()
../../gcc/gcc/recog.c:2953
0xa34c28 rest_of_handle_split_after_reload
../../gcc/gcc/recog.c:3889
0xa34c28 execute
../../gcc/gcc/recog.c:3918

[Bug tree-optimization/68911] [6 Regression] wrong code with -O1 -ftree-vrp

2016-01-06 Thread amker at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68911

amker at gcc dot gnu.org changed:

   What|Removed |Added

   Last reconfirmed|2016-01-04 00:00:00 |2015-12-15 0:00

--- Comment #6 from amker at gcc dot gnu.org ---
Here is the situation:
  scev_probably_wraps_p returns:
 A) true, in this case there is nothing to do;
 B) false.  since this information only indicates no-overflow when
may_be_zero is false.  We then have three sub-cases:
B.1) may_be_zero is false.  The current code logic works.
B.2) may_be_zero is true, and scev will overflow after nit(bound)
iterations.
B.3) may_be_zero is true, and scev doesn't overflow after nit(bound)
iterations.

So simply bypass and return when loop may exit at its first iteration is not
optimal.  Because case B.3) will be missed.

I think the right fix is add overflow check in below code:

  /* We are only entering here for loop header PHI nodes, so using
 the number of latch executions is the correct thing to use.  */
  if (max_loop_iterations (loop, &nit))
{
  value_range maxvr = VR_INITIALIZER;
  signop sgn = TYPE_SIGN (TREE_TYPE (step));
  bool overflow;

  widest_int wtmp = wi::mul (wi::to_widest (step), nit, sgn,
 &overflow);
  /* If the multiplication overflowed we can't do a meaningful
 adjustment.  Likewise if the result doesn't fit in the type
 of the induction variable.  For a signed type we have to
 check whether the result has the expected signedness which
 is that of the step as number of iterations is unsigned.  */
  if (!overflow
  && wi::fits_to_tree_p (wtmp, TREE_TYPE (init))
  && (sgn == UNSIGNED
  || wi::gts_p (wtmp, 0) == wi::gts_p (step, 0)))
{
  tem = wide_int_to_tree (TREE_TYPE (init), wtmp);
  extract_range_from_binary_expr (&maxvr, PLUS_EXPR,
  TREE_TYPE (init), init, tem);
  /* Likewise if the addition did.  */
  if (maxvr.type == VR_RANGE)
{

  //  <---HERE

  tmin = maxvr.min;
  tmax = maxvr.max;
}
}
}

This overflow check is specifically for scev when may_be_zero is true. 
Actually I think it might be possible for us to remove the call to
scev_probably_wraps_p, since this new check together with the variable
"overflow" can cover the case when scev does overflow when may_be_zero is
false.

I am testing a patch for this.

[Bug fortran/69080] No automatic deallocation of allocatable function results

2016-01-06 Thread mikael at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69080

Mikael Morin  changed:

   What|Removed |Added

 CC||mikael at gcc dot gnu.org

--- Comment #12 from Mikael Morin  ---
(In reply to kargl from comment #11)
> (In reply to Mueller from comment #9)
> > (In reply to Mueller from comment #8)
> > > I think, in theory, the compiler could detect something like
> > > 
> > > call some_subroutine(function_returning_allocatable())
> > > 
> > > to be a potential case for automatic deallocation of the returned
> > > allocatable. But, as was pointed out above (if I understood correctly),
> > > automatic deallocation of allocatable function results is not part of the
> > > standard.
> > 
> > Now that I'm thinking about the example above: Isn't the allocatable
> > function result here a local (temporary) variable and should thus be
> > deallocated automatically?
> 
> No, it is not a local temporary variable.  If the function
> result is deallocated prior to returning from the function,
> what exactly is going to be returned?  Whatever had been stored
> in the memory associated with the allocated function result
> variable would be gone.  That is, you can't reference 
> unallocated memory.
> 
I think by local temporary he was meaning local to the _outer_ procedure call,
not local to the inner procedure body.
For the following code
  call foo(some_func())
a temporary variable is made to hold the value of some_func() before calling
foo, and it is cleaned up after foo has returned.

I think the point is not whether the return value should be deallocated before
returning (it should not as stated by Steve), it is instead whether it should
be deallocated after being used as actual argument (in my opinion it makes
sense to do it).

[Bug tree-optimization/69172] New: [6 Regression] ICE in make_ssa_name_fn, at tree-ssanames.c:266

2016-01-06 Thread doko at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69172

Bug ID: 69172
   Summary: [6 Regression] ICE in make_ssa_name_fn, at
tree-ssanames.c:266
   Product: gcc
   Version: 6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: doko at gcc dot gnu.org
  Target Milestone: ---

r232077, powerpc64le-linux-gnu, works with -O2

reduced test case:

int a;
__inline __attribute__((__always_inline__)) void *mempcpy(void *p1, void *p2,
  long p3) {
  return __builtin___mempcpy_chk(p1, p2, p3, 0);
}

void sd_inode_set_vid() {
  int *b = &a, *c = &a;
  mempcpy(c, b, sizeof(int));
}

$ gcc -c -g -O3 sd_inode.i
sd_inode.i: In function 'sd_inode_set_vid':
sd_inode.i:10:1: internal compiler error: in make_ssa_name_fn, at
tree-ssanames.c:266
 }
 ^

0x108af2bf make_ssa_name_fn(function*, tree_node*, gimple*)
../../src/gcc/tree-ssanames.c:263
0x1043d077 make_ssa_name
../../src/gcc/tree-ssanames.h:110
0x1043d077 gimple_build(gimple**, unsigned int, tree_code, tree_node*,
tree_node*)
../../src/gcc/gimple-fold.c:5985
0x10443e27 gimple_fold_builtin_memory_chk
../../src/gcc/gimple-fold.c:1713
0x10443e27 gimple_fold_builtin
../../src/gcc/gimple-fold.c:2836
0x104451f7 gimple_fold_call
../../src/gcc/gimple-fold.c:3112
0x104451f7 fold_stmt_1
../../src/gcc/gimple-fold.c:3716
0x1084270f
substitute_and_fold_dom_walker::before_dom_children(basic_block_def*)
../../src/gcc/tree-ssa-propagate.c:1232
0x10cbb2bf dom_walker::walk(basic_block_def*)
../../src/gcc/domwalk.c:265
0x10841bd7 substitute_and_fold(tree_node* (*)(tree_node*), bool
(*)(gimple_stmt_iterator*), bool)
../../src/gcc/tree-ssa-propagate.c:1332
0x107b2373 ccp_finalize
../../src/gcc/tree-ssa-ccp.c:947
0x107b2373 do_ssa_ccp
../../src/gcc/tree-ssa-ccp.c:2409
0x107b2373 execute
../../src/gcc/tree-ssa-ccp.c:2452
Please submit a full bug report,
with preprocessed source if appropriate.

[Bug target/69171] New: error: unrecognizable insn: on x86_64 with -O2

2016-01-06 Thread dcb314 at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69171

Bug ID: 69171
   Summary: error: unrecognizable insn: on x86_64 with -O2
   Product: gcc
   Version: 6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

Created attachment 37242
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37242&action=edit
gzipped C source code

The attached code, when compiled by gcc trunk dated 20160106, revision 232102,
says this:

$ ../results/bin/gcc -c -O2 bug261.c
./argus_util.c: In function ‘ArgusPrintSum’:
./argus_util.c:5856:1: error: unrecognizable insn:

(insn 213 212 36 6 (set (reg:V4SF 21 xmm0 [122])
(vec_merge:V4SF (vec_duplicate:V4SF (float:SF (mem:SI (plus:DI
(reg/v/f:DI 0 ax [orig:90 agr ] [90])
(const_int 24 [0x18])) [2 agr_11->act.n+0 S4
A16])))
(reg:V4SF 21 xmm0 [122])
(const_int 1 [0x1]))) ./argus_util.c:5830 -1
 (nil))
./argus_util.c:5856:1: internal compiler error: in extract_insn, at
recog.c:2286
0xa8c259 _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
../../src/trunk/gcc/rtl-error.c:108
0xa8c27e _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
../../src/trunk/gcc/rtl-error.c:116
0xa503da extract_insn(rtx_insn*)
../../src/trunk/gcc/recog.c:2277
0xa549ca extract_insn_cached(rtx_insn*)
../../src/trunk/gcc/recog.c:2177

[Bug other/67627] libatomic parallel build failure

2016-01-06 Thread nsz at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67627

nsz at gcc dot gnu.org changed:

   What|Removed |Added

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

--- Comment #5 from nsz at gcc dot gnu.org ---
Fixed in r232102, backported to gcc-5 and gcc-49 branches.

[Bug other/67627] libatomic parallel build failure

2016-01-06 Thread nsz at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67627

--- Comment #4 from nsz at gcc dot gnu.org ---
Author: nsz
Date: Wed Jan  6 17:43:24 2016
New Revision: 232107

URL: https://gcc.gnu.org/viewcvs?rev=232107&root=gcc&view=rev
Log:
2016-01-06  Szabolcs Nagy  

Backport from mainline:
2016-01-06  Szabolcs Nagy  

PR other/67627
* Makefile.am (all-multi): Add dependency.
* Makefile.in: Regenerate.


Modified:
branches/gcc-4_9-branch/libatomic/ChangeLog
branches/gcc-4_9-branch/libatomic/Makefile.am
branches/gcc-4_9-branch/libatomic/Makefile.in

[Bug tree-optimization/69170] New: [6 Regression] ICE (segfault) in find_uses_to_rename_use

2016-01-06 Thread doko at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69170

Bug ID: 69170
   Summary: [6 Regression] ICE (segfault) in
find_uses_to_rename_use
   Product: gcc
   Version: 6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: doko at gcc dot gnu.org
  Target Milestone: ---

trunk r232077, powerpc64le-linux-gnu, works with -O2 or without -fPIC

reduced test case:

typedef long sha2_word_t;
typedef struct {
  sha2_word_t length_upper, length_lower;
  char buf[];
} hash_state;
int a;
hash_state b;
void fn1() {
  a = 0;
  for (; a < 8; a++)
b.buf[a + 1024 / 8] = b.length_upper >> (1 - a) * 5;
  a = 0;
  for (; a < 8; a++)
b.buf[a + 1024 / 8 + 8] = b.length_lower >> (1 - a) * 5;
}

$ gcc -std=c99 -c -g -O3 -fno-strict-aliasing -fPIC hash_SHA2_template.i
hash_SHA2_template.i: In function 'fn1':
hash_SHA2_template.i:8:6: internal compiler error: Segmentation fault
 void fn1() {
  ^~~

0x106c33b3 crash_signal
../../src/gcc/toplev.c:334
0x1080027c find_uses_to_rename_use
../../src/gcc/tree-ssa-loop-manip.c:368
0x1080095f find_uses_to_rename_use
../../src/gcc/ssa-iterators.h:566
0x1080095f find_uses_to_rename_stmt
../../src/gcc/tree-ssa-loop-manip.c:425
0x1080095f find_uses_to_rename_bb
../../src/gcc/tree-ssa-loop-manip.c:457
0x10802e3f find_uses_to_rename
../../src/gcc/tree-ssa-loop-manip.c:479
0x10802e3f rewrite_into_loop_closed_ssa_1(bitmap_head*, unsigned int, int,
loop*)
../../src/gcc/tree-ssa-loop-manip.c:642
0x10913b83 execute_vrp
../../src/gcc/tree-vrp.c:10303
0x10913b83 execute
../../src/gcc/tree-vrp.c:10405
Please submit a full bug report,
with preprocessed source if appropriate.

(gdb) bt
#0  0x1080027c in find_uses_to_rename_use (bb=0x3fffb59802d8,
use=0x3fffb59236d8, 
use_blocks=0x11687400, need_phis=0x115fb580) at
../../src/gcc/tree-ssa-loop-manip.c:368
#1  0x10800960 in find_uses_to_rename_use (need_phis=,
use_blocks=, 
use=, bb=0x3fffb59802d8) at
../../src/gcc/ssa-iterators.h:566
#2  find_uses_to_rename_stmt (use_flags=, need_phis=, 
use_blocks=, stmt=0x3fffb5a73ca0) at
../../src/gcc/tree-ssa-loop-manip.c:425
#3  find_uses_to_rename_bb (bb=0x3fffb59802d8, use_blocks=0x11687400,
need_phis=0x115fb580, use_flags=1)
at ../../src/gcc/tree-ssa-loop-manip.c:457
#4  0x10802e40 in find_uses_to_rename (use_flags=1,
need_phis=0x115fb580, use_blocks=0x11687400, 
changed_bbs=) at ../../src/gcc/tree-ssa-loop-manip.c:479
#5  rewrite_into_loop_closed_ssa_1 (changed_bbs=,
update_flag=, 
use_flags=, loop=0x0) at
../../src/gcc/tree-ssa-loop-manip.c:642
#6  0x10913b84 in execute_vrp (warn_array_bounds_p=false) at
../../src/gcc/tree-vrp.c:10303
#7  (anonymous namespace)::pass_vrp::execute (this=) at
../../src/gcc/tree-vrp.c:10405
#8  0x105de3b4 in execute_one_pass (pass=0x114ef0d0) at
../../src/gcc/passes.c:2336
#9  0x105dea38 in execute_pass_list_1 (pass=0x114ef0d0) at
../../src/gcc/passes.c:2410
#10 0x105dea50 in execute_pass_list_1 (pass=0x114ed010) at
../../src/gcc/passes.c:2411
#11 0x105deaf8 in execute_pass_list (fn=,
pass=)
at ../../src/gcc/passes.c:2421
#12 0x102e0800 in cgraph_node::expand (this=0x3fffb5930cf0) at
../../src/gcc/cgraphunit.c:1971
#13 0x102e22c8 in expand_all_functions () at
../../src/gcc/cgraphunit.c:2107
#14 symbol_table::compile (this=0x3fffb58d) at
../../src/gcc/cgraphunit.c:2463
#15 0x102e4724 in symbol_table::compile (this=0x3fffb58d) at
../../src/gcc/cgraphunit.c:2368
#16 symbol_table::finalize_compilation_unit (this=0x3fffb58d) at
../../src/gcc/cgraphunit.c:2553
#17 0x106c3854 in compile_file () at ../../src/gcc/toplev.c:489
#18 0x10170abc in do_compile () at ../../src/gcc/toplev.c:1985
#19 toplev::main (this=, argc=21, argv=0x33c8) at
../../src/gcc/toplev.c:2092
#20 0x10172a98 in main (argc=, argv=0x33c8) at
../../src/gcc/main.c:39

[Bug other/67627] libatomic parallel build failure

2016-01-06 Thread nsz at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67627

--- Comment #3 from nsz at gcc dot gnu.org ---
Author: nsz
Date: Wed Jan  6 17:32:41 2016
New Revision: 232105

URL: https://gcc.gnu.org/viewcvs?rev=232105&root=gcc&view=rev
Log:
2016-01-06  Szabolcs Nagy  

Backport from mainline:
2016-01-06  Szabolcs Nagy  

PR other/67627
* Makefile.am (all-multi): Add dependency.
* Makefile.in: Regenerate.


Modified:
branches/gcc-5-branch/libatomic/ChangeLog
branches/gcc-5-branch/libatomic/Makefile.am
branches/gcc-5-branch/libatomic/Makefile.in

[Bug tree-optimization/66856] [6 Regression] ICE in compute_live_loop_exits, at tree-ssa-loop-manip.c:234

2016-01-06 Thread doko at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66856

Matthias Klose  changed:

   What|Removed |Added

 CC||doko at gcc dot gnu.org

--- Comment #6 from Matthias Klose  ---
seen as well on powerpc64le-linux-gnu

typedef int uint32_t;
int c, e, f, g, h;
short *d;
uint32_t fn1(uint32_t p1, uint32_t p2) {
  uint32_t a, b;
  a = p1 >> 3 & p2;
  b = p1 & 072;
  a |= a >> 5;
  a |= b >> 5;
  return a;
}

void fn2() {
  uint32_t *i;
  uint32_t j;
  while (c -= 4) {
fn1(e, j);
fn1(f, j) * fn1(g, j) * fn1(h, j);
*d++ = fn1(*i++, j);
*d++ = fn1(*i++, j);
  }
}

$ gcc -c -g -O3 pixman-fast-path.i
pixman-fast-path.i: In function 'fn2':
pixman-fast-path.i:13:6: internal compiler error: in compute_live_loop_exits,
at tree-ssa-loop-manip.c:229
 void fn2() {
  ^~~

0x1080260f compute_live_loop_exits
../../src/gcc/tree-ssa-loop-manip.c:229
0x1080260f add_exit_phis_var
../../src/gcc/tree-ssa-loop-manip.c:316
0x1080260f add_exit_phis
../../src/gcc/tree-ssa-loop-manip.c:338
0x1080260f rewrite_into_loop_closed_ssa_1(bitmap_head*, unsigned int, int,
loop*)
../../src/gcc/tree-ssa-loop-manip.c:654
0x109002eb vectorize_loops()
../../src/gcc/tree-vectorizer.c:634
0x108167eb execute
../../src/gcc/tree-ssa-loop.c:420
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.

[Bug c/23087] Misleading warning, "... differ in signedness"

2016-01-06 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=23087

Marek Polacek  changed:

   What|Removed |Added

 CC||mpolacek at gcc dot gnu.org

--- Comment #14 from Marek Polacek  ---
I think I might have a fix, but there's this thing about e.g.

void
foo (void)
{
  char *p = "";
  signed char *ps = "";
  unsigned char *pu = "";
}

with this issue fixed, we'd warn like this
$ xgcc z.c -c
z.c: In function ‘foo’:
z.c:5:21: warning: initialization from incompatible pointer type
[-Wincompatible-pointer-types]
   signed char *ps = "";
 ^~

z.c:6:23: warning: initialization from incompatible pointer type
[-Wincompatible-pointer-types]
   unsigned char *pu = "";
   ^~
whereas older gcc would be silent on that.  I.e., -Wincompatible-pointer-types
is a warning that is enabled by default, but -Wpointer-sign is enabled by
-Wpedantic || -Wall.  I.e., we'd be more verbose.  Maybe this is a non-issue as
most of the people are using -Wall anyway.

In any case I agree that the message about signedness is wrong.

[Bug libstdc++/63218] More compact std::bitset for small n

2016-01-06 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63218

--- Comment #4 from H.J. Lu  ---
(In reply to Marc Glisse from comment #3)
> (In reply to H.J. Lu from comment #2)
> > X32 also wants long long.
> 
> Is there a good way to ask for the longest of the integer types that are
> fast? stdint.h has things like int_fastN_t (btw, I don't like some of the
> choices I see for them in glibc (probably imposed by the ABI though)), but
> this is a different question. That may not be so well-defined though.

typedef int word_type __attribute__ ((mode (__word__)));

is the closest thing I can think of.

[Bug tree-optimization/69169] New: [6 Regression] ICE (segfault) on powerpc64le-linux-gnu

2016-01-06 Thread doko at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69169

Bug ID: 69169
   Summary: [6 Regression] ICE (segfault) on powerpc64le-linux-gnu
   Product: gcc
   Version: 6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: doko at gcc dot gnu.org
  Target Milestone: ---

trunk r232077, powerpc64le-linux-gnu, works with -O1

reduced test case:

struct pgm_slist_t {
  struct pgm_slist_t *__restrict next;
} fn1(struct pgm_slist_t p1) {
}

$ gcc -c -g -O2 slist.i 
gcc: internal compiler error: Segmentation fault (program cc1)
Please submit a full bug report,
with preprocessed source if appropriate.

infinite recursion?

#0  0x3fffb7936308 in ?? () from /lib/powerpc64le-linux-gnu/libc.so.6
#1  0x3fffb7939708 in malloc () from /lib/powerpc64le-linux-gnu/libc.so.6
#2  0x10e3efb8 in xrealloc (oldmem=, size=136) at
../../src/libiberty/xmalloc.c:178
#3  0x1087419c in va_heap::reserve (exact=,
reserve=, 
v=) at ../../src/gcc/vec.h:288
#4  vec::reserve (exact=false, nelems=1,
this=)
at ../../src/gcc/vec.h:1406
#5  vec::safe_push (obj=..., this=)
at ../../src/gcc/vec.h:1515
#6  push_fields_onto_fieldstack (type=0x3fffb5c6e508,
fieldstack=0x3c000320, offset=0)
at ../../src/gcc/tree-ssa-structalias.c:5499
#7  0x1087f9e0 in create_variable_info_for_1 (decl=0x20852020,
name=0x10f93cf8 "PARM_NOALIAS", 
add_id=true, handle_param=true) at
../../src/gcc/tree-ssa-structalias.c:5810
#8  0x1087fe0c in create_variable_info_for_1 (decl=0x20851f00,
name=0x10f93cf8 "PARM_NOALIAS", 
add_id=true, handle_param=true) at
../../src/gcc/tree-ssa-structalias.c:5911
#9  0x1087fe0c in create_variable_info_for_1 (decl=0x20851de0,
name=0x10f93cf8 "PARM_NOALIAS", 
add_id=true, handle_param=true) at
../../src/gcc/tree-ssa-structalias.c:5911
#10 0x1087fe0c in create_variable_info_for_1 (decl=0x20851cc0,
name=0x10f93cf8 "PARM_NOALIAS", 
add_id=true, handle_param=true) at
../../src/gcc/tree-ssa-structalias.c:5911
#11 0x1087fe0c in create_variable_info_for_1 (decl=0x20851ba0,
name=0x10f93cf8 "PARM_NOALIAS", 
add_id=true, handle_param=true) at
../../src/gcc/tree-ssa-structalias.c:5911
#12 0x1087fe0c in create_variable_info_for_1 (decl=0x20851a80,
name=0x10f93cf8 "PARM_NOALIAS", 
add_id=true, handle_param=true) at
../../src/gcc/tree-ssa-structalias.c:5911
#13 0x1087fe0c in create_variable_info_for_1 (decl=0x20851960,
name=0x10f93cf8 "PARM_NOALIAS", 
add_id=true, handle_param=true) at
../../src/gcc/tree-ssa-structalias.c:5911
#14 0x1087fe0c in create_variable_info_for_1 (decl=0x20851840,
name=0x10f93cf8 "PARM_NOALIAS", 
add_id=true, handle_param=true) at
../../src/gcc/tree-ssa-structalias.c:5911
#15 0x1087fe0c in create_variable_info_for_1 (decl=0x20851720,
name=0x10f93cf8 "PARM_NOALIAS", 
add_id=true, handle_param=true) at
../../src/gcc/tree-ssa-structalias.c:5911
#16 0x1087fe0c in create_variable_info_for_1 (decl=0x20851600,
name=0x10f93cf8 "PARM_NOALIAS", 
add_id=true, handle_param=true) at
../../src/gcc/tree-ssa-structalias.c:5911
#17 0x1087fe0c in create_variable_info_for_1 (decl=0x208514e0,
name=0x10f93cf8 "PARM_NOALIAS", 
add_id=true, handle_param=true) at
../../src/gcc/tree-ssa-structalias.c:5911
#18 0x1087fe0c in create_variable_info_for_1 (decl=0x208513c0,
name=0x10f93cf8 "PARM_NOALIAS", 
add_id=true, handle_param=true) at
../../src/gcc/tree-ssa-structalias.c:5911
#19 0x1087fe0c in create_variable_info_for_1 (decl=0x208512a0,
name=0x10f93cf8 "PARM_NOALIAS", 
add_id=true, handle_param=true) at
../../src/gcc/tree-ssa-structalias.c:5911
#20 0x1087fe0c in create_variable_info_for_1 (decl=0x20851180,
name=0x10f93cf8 "PARM_NOALIAS", 
add_id=true, handle_param=true) at
../../src/gcc/tree-ssa-structalias.c:5911
#21 0x1087fe0c in create_variable_info_for_1 (decl=0x20851060,
name=0x10f93cf8 "PARM_NOALIAS", 
add_id=true, handle_param=true) at
../../src/gcc/tree-ssa-structalias.c:5911

[Bug tree-optimization/69168] New: [6 Regression] ICE in vect_analyze_loop_2, at tree-vect-loop.c:2182

2016-01-06 Thread doko at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69168

Bug ID: 69168
   Summary: [6 Regression] ICE in vect_analyze_loop_2, at
tree-vect-loop.c:2182
   Product: gcc
   Version: 6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: doko at gcc dot gnu.org
  Target Milestone: ---

trunk r232077, powerpc64le-linux-gnu, works with -O2

reduced test case:

long a, b, e;
short *c;
int *d;
void fn1() {
  int i;
  for (; e; e--) {
i = 2;
for (; i; i--)
  a = b = *d++ / (1 << 9);
b = b ? 8 : a;
*c++ = *c++ = b;
  }
}

$ gcc -c -g -O3 virtch2.i
virtch2.i: In function 'fn1':
virtch2.i:4:6: internal compiler error: in vect_analyze_loop_2, at
tree-vect-loop.c:2182
 void fn1() {
  ^~~

0x108ea7fb vect_analyze_loop_2
../../src/gcc/tree-vect-loop.c:2182
0x108ea7fb vect_analyze_loop(loop*)
../../src/gcc/tree-vect-loop.c:2251
0x1090002f vectorize_loops()
../../src/gcc/tree-vectorizer.c:532
0x108167eb execute
../../src/gcc/tree-ssa-loop.c:420
Please submit a full bug report,
with preprocessed source if appropriate.

[Bug fortran/69080] No automatic deallocation of allocatable function results

2016-01-06 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69080

kargl at gcc dot gnu.org changed:

   What|Removed |Added

 CC|kargl at gcc dot gnu.org   |

--- Comment #11 from kargl at gcc dot gnu.org ---
(In reply to Mueller from comment #9)
> (In reply to Mueller from comment #8)
> > I think, in theory, the compiler could detect something like
> > 
> > call some_subroutine(function_returning_allocatable())
> > 
> > to be a potential case for automatic deallocation of the returned
> > allocatable. But, as was pointed out above (if I understood correctly),
> > automatic deallocation of allocatable function results is not part of the
> > standard.
> 
> Now that I'm thinking about the example above: Isn't the allocatable
> function result here a local (temporary) variable and should thus be
> deallocated automatically?

No, it is not a local temporary variable.  If the function
result is deallocated prior to returning from the function,
what exactly is going to be returned?  Whatever had been stored
in the memory associated with the allocated function result
variable would be gone.  That is, you can't reference 
unallocated memory.

Please bugzilla is not a forum for learning Fortran.

[Bug fortran/69080] No automatic deallocation of allocatable function results

2016-01-06 Thread kargl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69080

kargl at gcc dot gnu.org changed:

   What|Removed |Added

 CC||kargl at gcc dot gnu.org

--- Comment #10 from kargl at gcc dot gnu.org ---
(In reply to Mueller from comment #7)
> (In reply to kargl from comment #5)
> > When the execution of a procedure is terminated by execution of a
> > RETURN or END statement, an allocatable variable that is a named
> > local variable of the procedure retains its allocation and definition
> > status if it has the SAVE attribute or is a function result variable
> > or a subobject thereof; otherwise, it is deallocated.
> 
> If you are stating it like that it sounds like these are the directives of
> the current Fortran standard. I've read a little bit of the standard before
> posting my question here, but could not really figure out the meaning in
> terms of allocatable function results. So if what you stated is standard
> Fortran, I'm thanking you for clearing this up.

It is a verbatim quote from the Fortran 2003 standard.

[Bug tree-optimization/69167] New: [6 Regression] internal compiler error: SSA corruption

2016-01-06 Thread doko at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69167

Bug ID: 69167
   Summary: [6 Regression] internal compiler error: SSA corruption
   Product: gcc
   Version: 6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: doko at gcc dot gnu.org
  Target Milestone: ---

trunk r232077, powerpc64le-linux-gnu, works with -O0

reduced test case:

enum { SEND_TOFILE } __sigsetjmp();
void fclose();
void foldergets();
void sendpart_stats(int *p1) {
  int *a = p1;
  fclose();
  p1 = 0;
  if (__sigsetjmp())
while (foldergets)
  fclose(a ? sendpart_stats : 0);
  if (p1)
fclose();
}

$ gcc -c -g -O1 send.i 

Unable to coalesce ssa_names 2 and 8 which are marked as MUST COALESCE.
p1_2(ab) and  p1_8(D)(ab)
send.i: In function 'sendpart_stats':
send.i:4:6: internal compiler error: SSA corruption
 void sendpart_stats(int *p1) {
  ^~

0x107c0b23 fail_abnormal_edge_coalesce
../../src/gcc/tree-ssa-coalesce.c:936
0x107c0b23 coalesce_partitions
../../src/gcc/tree-ssa-coalesce.c:1337
0x107c0b23 coalesce_ssa_name()
../../src/gcc/tree-ssa-coalesce.c:1821
0x10762e6b remove_ssa_form
../../src/gcc/tree-outof-ssa.c:974
0x10762e6b rewrite_out_of_ssa(ssaexpand*)
../../src/gcc/tree-outof-ssa.c:1198
0x102a7efb execute
../../src/gcc/cfgexpand.c:6124
Please submit a full bug report,
with preprocessed source if appropriate.

[Bug tree-optimization/69164] New: [6 Regression] ICE in create_tmp_var, at gimple-expr.c:468

2016-01-06 Thread doko at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69164

Bug ID: 69164
   Summary: [6 Regression] ICE in create_tmp_var, at
gimple-expr.c:468
   Product: gcc
   Version: 6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: doko at gcc dot gnu.org
  Target Milestone: ---

trunk r232077, i686-linux-gnu, works with -O0

reduced test case:

class A {
public:
  class B {
friend A;
B() {}
bool : 1;
  };
  B m_fn1() {
B r;
return r;
  }
};

class C {
public:
  class D {
  public:
D(C *p1) : m_label(p1->m_assembler.m_fn1()) {}
A::B m_label;
  };
  A m_assembler;
};

enum YarrCharSize {};
class F : C {
  D generateDotStarEnclosure_findEOLLoop = this;

public:
  F(int, YarrCharSize) {}
};
YarrCharSize a;
int b;
void fn1() { F(b, a); }

$ g++ -c -march=i686 -g -O3 -std=gnu++11  -Wno-invalid-offsetof YarrJIT.ii
YarrJIT.ii: In constructor 'C::D::D(C*)':
YarrJIT.ii:33:23: internal compiler error: in analyze_access_subtree, at
tree-sra.c:2340
 void fn1() { F(b, a); }
   ^

0x876134e analyze_access_subtree
../../src/gcc/tree-sra.c:2339
0x87610c7 analyze_access_subtree
../../src/gcc/tree-sra.c:2312
0x87669dd analyze_access_trees
../../src/gcc/tree-sra.c:2402
0x87669dd analyze_all_variable_accesses
../../src/gcc/tree-sra.c:2655
0x8766dad perform_intra_sra
../../src/gcc/tree-sra.c:3631
Please submit a full bug report,
with preprocessed source if appropriate.

[Bug target/69053] [6 Regression] ICE in build_vector_from_val

2016-01-06 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69053

Markus Trippelsdorf  changed:

   What|Removed |Added

 CC||doko at gcc dot gnu.org

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

[Bug tree-optimization/69166] [6 Regression] ICE in get_initial_def_for_reduction, at tree-vect-loop.c:4188

2016-01-06 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69166

Markus Trippelsdorf  changed:

   What|Removed |Added

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

--- Comment #1 from Markus Trippelsdorf  ---
Another dup.
https://gcc.gnu.org/bugzilla/buglist.cgi?quicksearch=get_initial_def_for_reduction&list_id=135280

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

[Bug tree-optimization/69166] New: [6 Regression] ICE in get_initial_def_for_reduction, at tree-vect-loop.c:4188

2016-01-06 Thread doko at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69166

Bug ID: 69166
   Summary: [6 Regression] ICE in get_initial_def_for_reduction,
at tree-vect-loop.c:4188
   Product: gcc
   Version: 6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: doko at gcc dot gnu.org
  Target Milestone: ---

trunk r232077, powerpc64le-linux-gnu, works with -O2

reduced test case:

double a;
int b, c, d;
void fn1();
void fn2() {
  double *e;
  b = 0;
  for (; b < d; b++) {
c = 0;
for (; c < d; c++)
  e[b] /= a;
  }
  fn1();
}

$ gcc -c -g -O3 fft.i 
fft.i: In function 'fn2':
fft.i:4:6: internal compiler error: in get_initial_def_for_reduction, at
tree-vect-loop.c:4188
 void fn2() {
  ^~~

0x108e4b83 get_initial_def_for_reduction(gimple*, tree_node*, tree_node**)
../../src/gcc/tree-vect-loop.c:4188
0x1015e5ff vect_create_epilog_for_reduction
../../src/gcc/tree-vect-loop.c:4347
0x108e6517 vectorizable_reduction(gimple*, gimple_stmt_iterator*, gimple**,
_slp_tree*)
../../src/gcc/tree-vect-loop.c:6175
0x108dd16b vect_transform_stmt(gimple*, gimple_stmt_iterator*, bool*,
_slp_tree*, _slp_instance*)
../../src/gcc/tree-vect-stmts.c:8232
0x108e1e7f vect_transform_loop(_loop_vec_info*)
../../src/gcc/tree-vect-loop.c:6868
0x109005d3 vectorize_loops()
../../src/gcc/tree-vectorizer.c:554
0x108167eb execute
../../src/gcc/tree-ssa-loop.c:420
Please submit a full bug report,
with preprocessed source if appropriate.

[Bug tree-optimization/69163] [6 Regression] ICE in rewrite_use_nonlinear_expr, at tree-ssa-loop-ivopts.c:7086

2016-01-06 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69163

Markus Trippelsdorf  changed:

   What|Removed |Added

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

--- Comment #1 from Markus Trippelsdorf  ---
dup. (Please check for dups before reporting. Thanks)

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

[Bug tree-optimization/68021] [6 Regression] ice in rewrite_use_nonlinear_expr with -O3

2016-01-06 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68021

Markus Trippelsdorf  changed:

   What|Removed |Added

 CC||doko at gcc dot gnu.org

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

[Bug tree-optimization/69164] [6 Regression] ICE in create_tmp_var, at gimple-expr.c:468

2016-01-06 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69164

--- Comment #2 from Marek Polacek  ---
*** Bug 69165 has been marked as a duplicate of this bug. ***

[Bug tree-optimization/69165] [6 Regression] ICE in create_tmp_var, at gimple-expr.c:468

2016-01-06 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69165

Marek Polacek  changed:

   What|Removed |Added

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

--- Comment #1 from Marek Polacek  ---
Dup?

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

[Bug tree-optimization/69164] [6 Regression] ICE in create_tmp_var, at gimple-expr.c:468

2016-01-06 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69164

Marek Polacek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-01-06
 CC||mpolacek at gcc dot gnu.org
   Target Milestone|--- |6.0
 Ever confirmed|0   |1

--- Comment #1 from Marek Polacek  ---
Confirmed.

commit 8a36d0ec201ef1511b372523f72a763b836107b0
Author: jason 
Date:   Wed Apr 15 21:17:29 2015 +

* constexpr.c (cxx_eval_store_expression): Ignore clobbers.
(build_constexpr_constructor_member_initializers): Loop to find
the BIND_EXPR.
* decl.c (start_preparsed_function): Clobber the object at the
beginning of a constructor.

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

[Bug tree-optimization/69165] New: [6 Regression] ICE in create_tmp_var, at gimple-expr.c:468

2016-01-06 Thread doko at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69165

Bug ID: 69165
   Summary: [6 Regression] ICE in create_tmp_var, at
gimple-expr.c:468
   Product: gcc
   Version: 6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: doko at gcc dot gnu.org
  Target Milestone: ---

trunk r232077, i686-linux-gnu, works with -O0

reduced test case:

class A {
public:
  class B {
friend A;
B() {}
bool : 1;
  };
  B m_fn1() { return B(); }
};

class C {
  void m_fn2(int *&);
  class D {
  public:
C *Label_masm;
D() : m_label(Label_masm->m_assembler.m_fn1()) {}
A::B m_label;
  };
  A m_assembler;
};

void C::m_fn2(int *&) { D(); }

$ g++ -march=i686 -c -std=c++11 -g -O2 -c JITArithmetic.ii  
JITArithmetic.ii: In constructor 'C::D::D()':
JITArithmetic.ii:22:30: internal compiler error: in analyze_access_subtree, at
tree-sra.c:2340
 void C::m_fn2(int *&) { D(); }
  ^

0x876134e analyze_access_subtree
../../src/gcc/tree-sra.c:2339
0x87610c7 analyze_access_subtree
../../src/gcc/tree-sra.c:2312
0x87669dd analyze_access_trees
../../src/gcc/tree-sra.c:2402
0x87669dd analyze_all_variable_accesses
../../src/gcc/tree-sra.c:2655
0x8766dad perform_intra_sra
../../src/gcc/tree-sra.c:3631
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.

[Bug fortran/69154] [6 Regression] ICE in gfc_trans_where_2, at fortran/trans-stmt.c:5005 on *-linux

2016-01-06 Thread Joost.VandeVondele at mat dot ethz.ch
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69154

Joost VandeVondele  changed:

   What|Removed |Added

 CC||Joost.VandeVondele at mat dot 
ethz
   ||.ch

--- Comment #3 from Joost VandeVondele  
---
reduced

MODULE m_numeric_tools
 INTEGER, PARAMETER :: dp=8
CONTAINS
subroutine llsfit_svd(xx,yy,sigma,nfuncs,funcs,chisq,par,var,cov,info)
 real(dp),intent(in) :: xx(:),yy(:),sigma(:)
 real(dp),dimension(SIZE(xx)) :: bb,sigm1
 real(dp) :: tmp(nfuncs)
 real(dp),allocatable :: work(:),Vt(:,:),U(:,:),S(:)
 WHERE (S>TOL_*MAXVAL(S))
  tmp=MATMUL(bb,U)/S
 END WHERE
end subroutine llsfit_svd
END MODULE m_numeric_tools

[Bug tree-optimization/69163] New: [6 Regression] ICE in rewrite_use_nonlinear_expr, at tree-ssa-loop-ivopts.c:7086

2016-01-06 Thread doko at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69163

Bug ID: 69163
   Summary: [6 Regression] ICE in rewrite_use_nonlinear_expr, at
tree-ssa-loop-ivopts.c:7086
   Product: gcc
   Version: 6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: doko at gcc dot gnu.org
  Target Milestone: ---

trunk r232077, powerpc64le-linux-gnu, works with -O2

reduced test case:

void fn1(char *p1, char *p2, int p3, int p4) {
  int x, y;
  for (; y; y++) {
x = 0;
for (; x < p4; x++) {
  *p1 = *p2;
  p1--;
  p2--;
}
p2 += p3;
  }
}

$ g++ -c -g -O3 -Wno-strict-aliasing svga_cirrus.ii
svga_cirrus.ii: In function 'void fn1(char*, char*, int, int)':
svga_cirrus.ii:1:6: internal compiler error: in rewrite_use_nonlinear_expr, at
tree-ssa-loop-ivopts.c:7086
 void fn1(char *p1, char *p2, int p3, int p4) {
  ^~~

0x1094dfbf rewrite_use_nonlinear_expr
../../src/gcc/tree-ssa-loop-ivopts.c:7086
0x1094dfbf rewrite_use
../../src/gcc/tree-ssa-loop-ivopts.c:7347
0x1094dfbf rewrite_uses
../../src/gcc/tree-ssa-loop-ivopts.c:7380
0x109567f3 tree_ssa_iv_optimize_loop
../../src/gcc/tree-ssa-loop-ivopts.c:7726
0x109567f3 tree_ssa_iv_optimize()
../../src/gcc/tree-ssa-loop-ivopts.c:7758
0x1096f23b execute
../../src/gcc/tree-ssa-loop.c:554
Please submit a full bug report,
with preprocessed source if appropriate.

[Bug fortran/69154] [6 Regression] ICE in gfc_trans_where_2, at fortran/trans-stmt.c:5005 on *-linux

2016-01-06 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69154

Dominique d'Humieres  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-01-06
 Ever confirmed|0   |1

--- Comment #2 from Dominique d'Humieres  ---
> To check for an obvious suspect:
>
> What do you get if you compile with "-O0 -ffrontend-optimize" ?

This gives the ICE. The test compiles with -O1 -fno-frontend-optimize. 

I see the ICE with r222875, but not with r222822. Likely revision r222864.

[Bug libstdc++/63218] More compact std::bitset for small n

2016-01-06 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63218

--- Comment #3 from Marc Glisse  ---
(In reply to H.J. Lu from comment #2)
> X32 also wants long long.

Is there a good way to ask for the longest of the integer types that are fast?
stdint.h has things like int_fastN_t (btw, I don't like some of the choices I
see for them in glibc (probably imposed by the ABI though)), but this is a
different question. That may not be so well-defined though.

[Bug other/67627] libatomic parallel build failure

2016-01-06 Thread nsz at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67627

--- Comment #2 from nsz at gcc dot gnu.org ---
Author: nsz
Date: Wed Jan  6 14:51:35 2016
New Revision: 232102

URL: https://gcc.gnu.org/viewcvs?rev=232102&root=gcc&view=rev
Log:
Fix libatomic multilib parallel build (PR other/67627)

The all-multi target may be built in parallel with the %_.lo
targets which generate make dependencies that are parsed during
the build of all-multi.

This patch forces all-multi to only run after the *_.lo targets
are done.

libatomic:
PR other/67627
* Makefile.am (all-multi): Add dependency.
* Makefile.in: Regenerate.


Modified:
trunk/libatomic/ChangeLog
trunk/libatomic/Makefile.am
trunk/libatomic/Makefile.in

[Bug tree-optimization/69162] [6 Regression] ICE in create_tmp_var, at gimple-expr.c:468

2016-01-06 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69162

Marek Polacek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-01-06
 CC||mpolacek at gcc dot gnu.org
   Target Milestone|--- |6.0
 Ever confirmed|0   |1

--- Comment #1 from Marek Polacek  ---
Confirmed.

commit 82fc0e0a3a4f82770e7e076cab5309bb1bd9fe87
Author: vries 
Date:   Fri Apr 17 09:26:59 2015 +

Postpone expanding va_arg until pass_stdarg

2015-04-17  Tom de Vries  
Michael Matz  

* gimple-iterator.c (update_modified_stmts): Remove static.
* gimple-iterator.h (update_modified_stmts): Declare.
* gimplify.c (gimplify_modify_expr): Handle IFN_VA_ARG.
(gimplify_va_arg_internal): New function.
(gimplify_va_arg_expr): Use IFN_VA_ARG.
* gimplify.h (gimplify_va_arg_internal): Declare.
* internal-fn.c (expand_VA_ARG): New unreachable function.
* internal-fn.def (VA_ARG): New DEF_INTERNAL_FN.
* tree-stdarg.c (gimple_call_ifn_va_arg_p, expand_ifn_va_arg_1)
(expand_ifn_va_arg): New function.
(pass_data_stdarg): Add PROP_gimple_lva to properties_provided field.
(pass_stdarg::execute): Call expand_ifn_va_arg.
(pass_data_lower_vaarg): New pass_data.
(pass_lower_vaarg): New gimple_opt_pass.
(pass_lower_vaarg::gate, pass_lower_vaarg::execute)
(make_pass_lower_vaarg): New function.
* cfgexpand.c (pass_data_expand): Add PROP_gimple_lva to
properties_required field.
* passes.def (all_passes): Add pass_lower_vaarg.
* tree-pass.h (PROP_gimple_lva): Add define.
(make_pass_lower_vaarg): Declare.

* gcc.dg/tree-ssa/stdarg-2.c: Change f15 scan-tree-dump for target
x86_64-*-*.

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

[Bug tree-optimization/66856] [6 Regression] ICE in compute_live_loop_exits, at tree-ssa-loop-manip.c:234

2016-01-06 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66856

Markus Trippelsdorf  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-01-06
 CC||trippels at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #5 from Markus Trippelsdorf  ---
markus@x4 tmp % cat pix.i
short c;
int d;
int fn1(int p1, int p2) {
  int a, b;
  a = p1 >> 3 & p2;
  b = p1 & 072;
  a |= a >> 5;
  a |= b >> 5;
  return a;
}
void fn2() {
  short *e = &c;
  int *f;
  int g;
  while (d -= 4) {
fn1(1, 1);
fn1(1, 1) * fn1(1, 1) * fn1(1, 1);
*e++ = fn1(*f++, g);
*e++ = fn1(*f++, g);
  }
}

markus@x4 tmp % gcc -c -mavx2 -O3 pix.i
pix.i: In function ‘fn2’:
pix.i:11:6: internal compiler error: in compute_live_loop_exits, at
tree-ssa-loop-manip.c:229
 void fn2() {
  ^~~

0xc46f92 compute_live_loop_exits
../../gcc/gcc/tree-ssa-loop-manip.c:229
0xc46f92 add_exit_phis_var
../../gcc/gcc/tree-ssa-loop-manip.c:316
0xc46f92 add_exit_phis
../../gcc/gcc/tree-ssa-loop-manip.c:338
0xc46f92 rewrite_into_loop_closed_ssa_1(bitmap_head*, unsigned int, int, loop*)
../../gcc/gcc/tree-ssa-loop-manip.c:654
0xd491cd vectorize_loops()
../../gcc/gcc/tree-vectorizer.c:634
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

[Bug tree-optimization/66856] [6 Regression] ICE in compute_live_loop_exits, at tree-ssa-loop-manip.c:234

2016-01-06 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66856

--- Comment #4 from Martin Liška  ---
Created attachment 37241
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37241&action=edit
reduced testcase

Compile command line:

gcc -O3 tc.ii -march=bdver1 -mmmx -mno-3dnow -msse -msse2 -msse3 -mssse3
-msse4a -mcx16 -msahf -mno-movbe -maes -mno-sha -mpclmul -mpopcnt -mabm -mlwp
-mno-fma -mfma4 -mxop -mno-bmi -mno-bmi2 -mno-tbm -mavx -mno-avx2 -msse4.2
-msse4.1 -mlzcnt -mno-rtm -mno-hle -mno-rdrnd -mno-f16c -mno-fsgsbase
-mno-rdseed -mprfchw -mno-adx -mfxsr -mxsave -mno-xsaveopt -mno-avx512f
-mno-avx512er -mno-avx512cd -mno-avx512pf -mno-prefetchwt1 -mno-clflushopt
-mno-xsavec -mno-xsaves -mno-avx512dq -mno-avx512bw -mno-avx512vl
-mno-avx512ifma -mno-avx512vbmi -mno-clwb -mno-pcommit -mno-mwaitx -mno-clzero
-mno-pku --param l1-cache-size=16 --param l1-cache-line-size=64 --param
l2-cache-size=2048 -mtune=bdver1 -fpermissive

[Bug tree-optimization/69162] New: [6 Regression] ICE in create_tmp_var, at gimple-expr.c:468

2016-01-06 Thread doko at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69162

Bug ID: 69162
   Summary: [6 Regression] ICE in create_tmp_var, at
gimple-expr.c:468
   Product: gcc
   Version: 6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: doko at gcc dot gnu.org
  Target Milestone: ---

trunk r232077, i686-linux-gnu, works with -O0

reduced test case:

void fn1() {
  void *a;
  __builtin_va_list *b = a;
  __builtin_va_arg(*b, struct _CK_ATTRIBUTE *);
}

$ gcc -g -O2 -c attrs.i 
attrs.i: In function 'fn1':
attrs.i:4:24: internal compiler error: in create_tmp_var, at gimple-expr.c:468
   __builtin_va_arg(*b, struct _CK_ATTRIBUTE *);
   ~^~~

0x83d3de7 create_tmp_var(tree_node*, char const*)
../../src/gcc/gimple-expr.c:468
0x83f13e7 create_tmp_from_val
../../src/gcc/gimplify.c:498
0x83f13e7 lookup_tmp_var
../../src/gcc/gimplify.c:519
0x83f13e7 internal_get_tmp_var
../../src/gcc/gimplify.c:563
0x85c2fae std_gimplify_va_arg_expr(tree_node*, tree_node*, gimple**, gimple**)
../../src/gcc/targhooks.c:1828
0x881d631 ix86_gimplify_va_arg
../../src/gcc/config/i386/i386.c:10288
0x8748e59 expand_ifn_va_arg_1
../../src/gcc/tree-stdarg.c:1043
0x8748e59 expand_ifn_va_arg
../../src/gcc/tree-stdarg.c:
0x874a100 execute
../../src/gcc/tree-stdarg.c:1164
Please submit a full bug report,
with preprocessed source if appropriate.

[Bug tree-optimization/66856] [6 Regression] ICE in compute_live_loop_exits, at tree-ssa-loop-manip.c:234

2016-01-06 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66856

--- Comment #3 from Martin Liška  ---
(In reply to Jan Hubicka from comment #2)
> Created attachment 37239 [details]
> unreduced testcase
> 
> Compile with 
> gcc -O3 pix.i -flto -r -nostdlib -std=gnu99 -fgnu89-inline
> -fno-strict-aliasing -ffunction-sections  -fno-omit-frame-pointer -fPIC
> --verbose -march=bdver1 -mmmx -mno-3dnow -msse -msse2 -msse3 -mssse3 -msse4a
> -mcx16 -msahf -mno-movbe -maes -mno-sha -mpclmul -mpopcnt -mabm -mlwp
> -mno-fma -mfma4 -mxop -mno-bmi -mno-bmi2 -mno-tbm -mavx -mno-avx2 -msse4.2
> -msse4.1 -mlzcnt -mno-rtm -mno-hle -mno-rdrnd -mno-f16c -mno-fsgsbase
> -mno-rdseed -mprfchw -mno-adx -mfxsr -mxsave -mno-xsaveopt -mno-avx512f
> -mno-avx512er -mno-avx512cd -mno-avx512pf -mno-prefetchwt1 -mno-clflushopt
> -mno-xsavec -mno-xsaves -mno-avx512dq -mno-avx512bw -mno-avx512vl
> -mno-avx512ifma -mno-avx512vbmi -mno-clwb -mno-pcommit -mno-mwaitx
> -mno-clzero -mno-pku --param l1-cache-size=16 --param l1-cache-line-size=64
> --param l2-cache-size=2048 -mtune=bdver1

Reducing Honza's test-case.

[Bug libstdc++/63218] More compact std::bitset for small n

2016-01-06 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63218

H.J. Lu  changed:

   What|Removed |Added

 CC||hjl.tools at gmail dot com

--- Comment #2 from H.J. Lu  ---
(In reply to Marc Glisse from comment #0)
> (another ABI-breaking change in bitset would be to set _WordT to unsigned
> long long on win64)

X32 also wants long long.

[Bug fortran/69154] [6 Regression] ICE in gfc_trans_where_2, at fortran/trans-stmt.c:5005 on *-linux

2016-01-06 Thread tkoenig at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69154

Thomas Koenig  changed:

   What|Removed |Added

 CC||tkoenig at gcc dot gnu.org

--- Comment #1 from Thomas Koenig  ---
To check for an obvious suspect:

What do you get if you compile with "-O0 -ffrontend-optimize" ?

[Bug rtl-optimization/69161] [6 Regression] ICE in simplify_const_unary_operation, at simplify-rtx.c:1633

2016-01-06 Thread ktkachov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69161

ktkachov at gcc dot gnu.org changed:

   What|Removed |Added

  Known to work||5.3.1
   Target Milestone|--- |6.0
  Known to fail||6.0

[Bug rtl-optimization/69161] New: [6 Regression] ICE in simplify_const_unary_operation, at simplify-rtx.c:1633

2016-01-06 Thread ktkachov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69161

Bug ID: 69161
   Summary: [6 Regression] ICE in simplify_const_unary_operation,
at simplify-rtx.c:1633
   Product: gcc
   Version: 6.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: rtl-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: ktkachov at gcc dot gnu.org
  Target Milestone: ---
Target: aarch64

Created attachment 37240
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37240&action=edit
testcase

The attached testcases ICEs on aarch64 with -O3 -w:
besttry.c: In function 'func_40':
besttry.c:860:1: internal compiler error: in simplify_const_unary_operation, at
simplify-rtx.c:1633
 }
 ^

0xa872ea simplify_const_unary_operation(rtx_code, machine_mode, rtx_def*,
machine_mode)
$SRC/gcc/simplify-rtx.c:1633
0xa84d8f simplify_unary_operation(rtx_code, machine_mode, rtx_def*,
machine_mode)
$SRC/gcc/simplify-rtx.c:838
0xfa1b2a combine_simplify_rtx
$SRC/gcc/combine.c:5506
0xfa4317 subst
$SRC/gcc/combine.c:5456
0xfa41bb subst
$SRC/gcc/combine.c:5401
0xfa757c try_combine
$SRC/gcc/combine.c:3264
0xfac385 combine_instructions
$SRC/gcc/combine.c:1267
0xfac385 rest_of_handle_combine
$SRC/gcc/combine.c:14311
0xfac385 execute
$SRC/gcc/combine.c:14354
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

The assert:
if (!VECTOR_MODE_P (GET_MODE (op)))
  gcc_assert (GET_MODE_INNER (mode) == GET_MODE (op));

in simplify-rtx.c gets triggered when trying to simplify:
(vec_duplicate:V4SI (eq:CC_NZ (reg:CC_NZ 66 cc)
(const_int 0 [0])))

I think we shouldn't be asserting here but rather returning zero to indicate
that no simplification is possible.

I think this bug is latent on previous releases, but this testcases ICEs only
on trunk

[Bug tree-optimization/66856] [6 Regression] ICE in compute_live_loop_exits, at tree-ssa-loop-manip.c:234

2016-01-06 Thread hubicka at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66856

--- Comment #2 from Jan Hubicka  ---
Created attachment 37239
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37239&action=edit
unreduced testcase

Compile with 
gcc -O3 pix.i -flto -r -nostdlib -std=gnu99 -fgnu89-inline -fno-strict-aliasing
-ffunction-sections  -fno-omit-frame-pointer -fPIC --verbose -march=bdver1
-mmmx -mno-3dnow -msse -msse2 -msse3 -mssse3 -msse4a -mcx16 -msahf -mno-movbe
-maes -mno-sha -mpclmul -mpopcnt -mabm -mlwp -mno-fma -mfma4 -mxop -mno-bmi
-mno-bmi2 -mno-tbm -mavx -mno-avx2 -msse4.2 -msse4.1 -mlzcnt -mno-rtm -mno-hle
-mno-rdrnd -mno-f16c -mno-fsgsbase -mno-rdseed -mprfchw -mno-adx -mfxsr -mxsave
-mno-xsaveopt -mno-avx512f -mno-avx512er -mno-avx512cd -mno-avx512pf
-mno-prefetchwt1 -mno-clflushopt -mno-xsavec -mno-xsaves -mno-avx512dq
-mno-avx512bw -mno-avx512vl -mno-avx512ifma -mno-avx512vbmi -mno-clwb
-mno-pcommit -mno-mwaitx -mno-clzero -mno-pku --param l1-cache-size=16 --param
l1-cache-line-size=64 --param l2-cache-size=2048 -mtune=bdver1

[Bug tree-optimization/66856] [6 Regression] ICE in compute_live_loop_exits, at tree-ssa-loop-manip.c:234

2016-01-06 Thread hubicka at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66856

Jan Hubicka  changed:

   What|Removed |Added

 CC||hubicka at gcc dot gnu.org

--- Comment #1 from Jan Hubicka  ---
I am seeing same bug. Is there any chance to get a testcase? :))

  1   2   >