[Bug rtl-optimization/65980] [6 Regression] -fcompare-debug failure building Linux kernel

2015-12-16 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65980

--- Comment #5 from Jakub Jelinek  ---
Author: jakub
Date: Wed Dec 16 08:04:31 2015
New Revision: 231672

URL: https://gcc.gnu.org/viewcvs?rev=231672&root=gcc&view=rev
Log:
PR rtl-optimization/65980
* jump.c (rtx_renumbered_equal_p) : Use
next_nonnote_nondebug_insn instead of next_real_insn and
skip over CODE_LABELs too.

* gcc.dg/pr65980.c: New test.

Added:
trunk/gcc/testsuite/gcc.dg/pr65980.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/jump.c
trunk/gcc/testsuite/ChangeLog

[Bug c++/68929] GCC hangs in nested template instantiations even after static_assert fails.

2015-12-16 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68929

Markus Trippelsdorf  changed:

   What|Removed |Added

   Keywords||error-recovery, memory-hog
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2015-12-16
 CC||trippels at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #2 from Markus Trippelsdorf  ---
All supported gcc versions show this behavior.

[Bug tree-optimization/67781] [5/6 Regression] wrong code generated on big-endian with -O1 -fexpensive-optimizations

2015-12-16 Thread thopre01 at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67781

--- Comment #9 from Thomas Preud'homme  ---
I have a patch that seems to be working. Running regression testing and
bootstrap now.

[Bug ipa/68930] Aggregate replacements not applied to inline function bodies.

2015-12-16 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68930

Richard Biener  changed:

   What|Removed |Added

   Keywords||missed-optimization
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2015-12-16
 CC|rguenther at suse dot de   |rguenth at gcc dot 
gnu.org
 Ever confirmed|0   |1

--- Comment #2 from Richard Biener  ---
I suppose the dump is misleading in that the inline clone has

Modification phase of node q.constprop/5
 Aggregate replacements: 0[0]=1, 0[32]=2

applied to?

__attribute__((noinline))
q.constprop (struct a a)
{
  :

  :
  t (a);
  return;

}

instead would look like wrong-code.

Ah, IPA-CP doesn't actually remove "const" parameters.

So this report is reporting that IPA-CP thinks it does sth but in the
end it's a no-op clone.

I wonder why we don't simply add

  a.a = 1;
  a.b = 2;

at the start of q.constprop.  Or if we only know a partially then initialize
those parts from the know constants?

[Bug target/68923] SSE/AVX movq load (_mm_cvtsi64_si128) not being folded into pmovzx

2015-12-16 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68923

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org,
   ||uros at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek  ---
To match the -O3 -march=haswell code in the combiner we'd need a pattern
matching something like:
(set (reg:V8SI 94)
(zero_extend:V8SI (vec_select:V8QI (subreg:V16QI (vec_concat:V2DI (mem:DI
(reg/v/f:DI 93 [ p ]) [4 MEM[(uint64_t *)p_2(D)]+0 S8 A64])
(const_int 0 [0])) 0)
(parallel [
(const_int 0 [0])
(const_int 1 [0x1])
(const_int 2 [0x2])
(const_int 3 [0x3])
(const_int 4 [0x4])
(const_int 5 [0x5])
(const_int 6 [0x6])
(const_int 7 [0x7])
]
But e.g. for -O2 -mavx2 it is instead:
(set (reg:V8SI 94)
(zero_extend:V8SI (vec_select:V8QI (subreg:V16QI (vec_merge:V2DI
(vec_duplicate:V2DI (mem:DI (reg/v/f:DI 93 [ p ]) [4 MEM[(uint64_t *)p_2(D)]+0
S8 A64]))
(const_vector:V2DI [
(const_int 0 [0])
(const_int 0 [0])
])
(const_int 1 [0x1])) 0)
(parallel [
(const_int 0 [0])
(const_int 1 [0x1])
(const_int 2 [0x2])
(const_int 3 [0x3])
(const_int 4 [0x4])
(const_int 5 [0x5])
(const_int 6 [0x6])
(const_int 7 [0x7])
]

[Bug target/68928] AVX loops on unaligned arrays could generate more efficient startup/cleanup code when peeling

2015-12-16 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68928

Richard Biener  changed:

   What|Removed |Added

 Blocks||53947

--- Comment #1 from Richard Biener  ---
I'd say the easiest way is to avoid peeling for alignment on x86_64 and just
use unaligned ops... (we're still left with a epilogue for possible remaining
scalar
iters)


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53947
[Bug 53947] [meta-bug] vectorizer missed-optimizations

[Bug libstdc++/68921] [5/6 Regression] std::future::wait() makes invalid futex calls and spins

2015-12-16 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68921

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|--- |5.4

[Bug rtl-optimization/68920] [6 Regression] Undesirable if-conversion for a rarely taken branch

2015-12-16 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68920

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|--- |6.0

[Bug c++/68922] [4.9/5 Regression] g++ fails to generate code for catch clause with specific optimizations enabled

2015-12-16 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68922

Richard Biener  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |DUPLICATE
   Target Milestone|--- |5.4

--- Comment #1 from Richard Biener  ---
The fix fixes this bug as well.

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

[Bug c++/68184] [4.9/5 Regression] Exception from a virtual function does not get caught

2015-12-16 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68184

Richard Biener  changed:

   What|Removed |Added

 CC||alban.lefebvre at gmail dot com

--- Comment #8 from Richard Biener  ---
*** Bug 68922 has been marked as a duplicate of this bug. ***

[Bug tree-optimization/68919] Null-pointer store not removed

2015-12-16 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68919

Richard Biener  changed:

   What|Removed |Added

 CC||rguenth at gcc dot gnu.org

--- Comment #1 from Richard Biener  ---
It's not clear removing those is desirable, but yes.  PTA treats literal
addresses as pointing to anything while only literal zero points to the
null object.

I can't see how we can do "better" here.

[Bug c/68162] [5 Regression] Incompatible pointer type using a typedef

2015-12-16 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68162

--- Comment #17 from Richard Biener  ---
Author: rguenth
Date: Wed Dec 16 09:07:45 2015
New Revision: 231673

URL: https://gcc.gnu.org/viewcvs?rev=231673&root=gcc&view=rev
Log:
2015-12-16  Richard Biener  

Backport from mainline
2015-12-04  Richard Biener  

PR middle-end/68636
* builtins.c (get_pointer_alignment_1): Take care of byte to
bit alignment computation overflow.

2015-11-30  Richard Biener  

PR c/68162
* dwarf2out.c (gen_type_die_with_usage): Keep variant types
of arrays.

Modified:
branches/gcc-5-branch/gcc/ChangeLog
branches/gcc-5-branch/gcc/builtins.c
branches/gcc-5-branch/gcc/dwarf2out.c

[Bug rtl-optimization/68636] [5 Regression] unnecessary unaligned load on mips o32

2015-12-16 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68636

--- Comment #11 from Richard Biener  ---
Author: rguenth
Date: Wed Dec 16 09:07:45 2015
New Revision: 231673

URL: https://gcc.gnu.org/viewcvs?rev=231673&root=gcc&view=rev
Log:
2015-12-16  Richard Biener  

Backport from mainline
2015-12-04  Richard Biener  

PR middle-end/68636
* builtins.c (get_pointer_alignment_1): Take care of byte to
bit alignment computation overflow.

2015-11-30  Richard Biener  

PR c/68162
* dwarf2out.c (gen_type_die_with_usage): Keep variant types
of arrays.

Modified:
branches/gcc-5-branch/gcc/ChangeLog
branches/gcc-5-branch/gcc/builtins.c
branches/gcc-5-branch/gcc/dwarf2out.c

[Bug other/68899] [6 Regression] Invalid read of size: 3 occurences in get_line_width_without_trailing_whitespace (diagnostic-show-locus.c:413)

2015-12-16 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68899

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|--- |6.0

[Bug target/68910] [5/6 regression] huge stack frame and poor code with instruction scheduling at -O2

2015-12-16 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68910

Eric Botcazou  changed:

   What|Removed |Added

 Target|sparc-rtems |sparc-*-*
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2015-12-16
 CC||ebotcazou at gcc dot gnu.org
   Target Milestone|--- |5.4
Summary|SPARC/cypress: Poor code|[5/6 regression] huge stack
   |generation, huge stack  |frame and poor code with
   |frame   |instruction scheduling at
   ||-O2
 Ever confirmed|0   |1

--- Comment #3 from Eric Botcazou  ---
This looks like a spilling avalanche due to the first scheduling pass, so
either -fno-schedule-insns or -mtune=v7 (for cypress) or -mtune=v8 (for leon3)
can be passed to work around it.

[Bug target/68910] [5/6 regression] huge stack frame and poor code with instruction scheduling at -O2

2015-12-16 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68910

Eric Botcazou  changed:

   What|Removed |Added

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

--- Comment #4 from Eric Botcazou  ---
Looking into it.

[Bug target/68910] [5/6 regression] huge stack frame and poor code with instruction scheduling at -O2

2015-12-16 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68910

--- Comment #5 from Eric Botcazou  ---
I have the huge stack frame with the 4.9.x compiler too so the spilling effect
itself is probably not new.

[Bug tree-optimization/68892] [6 Regression] Excessive dead loads produced by BB vectorization

2015-12-16 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68892

Richard Biener  changed:

   What|Removed |Added

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

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

[Bug tree-optimization/68892] [6 Regression] Excessive dead loads produced by BB vectorization

2015-12-16 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68892

--- Comment #3 from Richard Biener  ---
Author: rguenth
Date: Wed Dec 16 09:21:04 2015
New Revision: 231674

URL: https://gcc.gnu.org/viewcvs?rev=231674&root=gcc&view=rev
Log:
2015-12-16  Richard Biener  

PR tree-optimization/68892
* tree-vect-slp.c (vect_analyze_slp_cost_1): Properly compute
cost for permuted loads.

* gcc.dg/vect/bb-slp-pr68892.c: New testcase.

Added:
trunk/gcc/testsuite/gcc.dg/vect/bb-slp-pr68892.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-vect-slp.c

[Bug target/68910] [5/6 regression] huge stack frame and poor code with instruction scheduling at -O2

2015-12-16 Thread sebastian.hu...@embedded-brains.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68910

--- Comment #6 from Sebastian Huber  ---
(In reply to Eric Botcazou from comment #5)
> I have the huge stack frame with the 4.9.x compiler too so the spilling
> effect itself is probably not new.

Yes, sorry for imprecise known-to-work information.  The huge stack frame is
also in 4.3.2 (2792 bytes), but it got worse with every GCC release.

[Bug c++/68763] [6 Regression] ICE: in verify_unstripped_args, at cp/pt.c:1132

2015-12-16 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68763

--- Comment #8 from Markus Trippelsdorf  ---
There is also this bogus error, before the ICE:

In file included from /usr/include/boost/xpressive/match_results.hpp:59:0,
 from /usr/include/boost/xpressive/detail/core/access.hpp:21,
 from /usr/include/boost/xpressive/detail/core/state.hpp:18,
 from
/usr/include/boost/xpressive/detail/core/matcher/alternate_end_matcher.hpp:20,
 from /usr/include/boost/xpressive/detail/core/matchers.hpp:17,
 from /usr/include/boost/xpressive/regex_primitives.hpp:22,
 from /usr/include/boost/xpressive/xpressive_static.hpp:24,
 from
/home/dcb/rpmbuild/BUILD/ledger-720c03b139d251c53f9deef491f5953e2fdb97ca/system.hh:217,
 from
/home/dcb/rpmbuild/BUILD/ledger-720c03b139d251c53f9deef491f5953e2fdb97ca/src/py_account.cc:32:
/usr/include/boost/xpressive/detail/utility/algorithm.hpp: In function ‘int
boost::xpressive::detail::toi(InIter&, InIter, const Traits&, int, int)’:
/usr/include/boost/xpressive/detail/utility/algorithm.hpp:67:28: error: lvalue
required as left operand of assignment
 if(max < ((i *= radix) += c))
^

[Bug middle-end/68870] [6 Regression] ICE on valid code at -O1, -O2 and -O3 on x86_64-linux-gnu

2015-12-16 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68870

Richard Biener  changed:

   What|Removed |Added

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

--- Comment #9 from Richard Biener  ---
So to complete my earlier fix we need to do sth like

Index: gcc/tree-cfgcleanup.c
===
--- gcc/tree-cfgcleanup.c   (revision 231673)
+++ gcc/tree-cfgcleanup.c   (working copy)
@@ -78,7 +78,8 @@ remove_fallthru_edge (vec *
at block BB.  */

 static bool
-cleanup_control_expr_graph (basic_block bb, gimple_stmt_iterator gsi)
+cleanup_control_expr_graph (basic_block bb, gimple_stmt_iterator gsi,
+   bool first_p)
 {
   edge taken_edge;
   bool retval = false;
@@ -95,15 +96,26 @@ cleanup_control_expr_graph (basic_block
   switch (gimple_code (stmt))
{
case GIMPLE_COND:
- {
-   code_helper rcode;
-   tree ops[3] = {};
-   if (gimple_simplify (stmt, &rcode, ops, NULL, no_follow_ssa_edges,
-no_follow_ssa_edges)
-   && rcode == INTEGER_CST)
- val = ops[0];
-   break;
- }
+ /* During a first iteration on the CFG only remove trivially
+dead edges but mark other conditions for re-evaluation.  */
+ if (first_p)
+   {
+ val = const_binop (gimple_cond_code (stmt), boolean_type_node,
+gimple_cond_lhs (stmt),
+gimple_cond_rhs (stmt));
+ if (! val)
+   bitmap_set_bit (cfgcleanup_altered_bbs, bb->index);
+   }
+ else
+   {
+ code_helper rcode;
+ tree ops[3] = {};
+ if (gimple_simplify (stmt, &rcode, ops, NULL,
no_follow_ssa_edges,
+  no_follow_ssa_edges)
+ && rcode == INTEGER_CST)
+   val = ops[0];
+   }
+ break;

case GIMPLE_SWITCH:
  val = gimple_switch_index (as_a  (stmt));
@@ -176,7 +188,7 @@ cleanup_call_ctrl_altering_flag (gimple
true if anything changes.  */

 static bool
-cleanup_control_flow_bb (basic_block bb)
+cleanup_control_flow_bb (basic_block bb, bool first_p)
 {
   gimple_stmt_iterator gsi;
   bool retval = false;
@@ -199,7 +211,7 @@ cleanup_control_flow_bb (basic_block bb)
   || gimple_code (stmt) == GIMPLE_SWITCH)
 {
   gcc_checking_assert (gsi_stmt (gsi_last_bb (bb)) == stmt);
-  retval |= cleanup_control_expr_graph (bb, gsi);
+  retval |= cleanup_control_expr_graph (bb, gsi, first_p);
 }
   else if (gimple_code (stmt) == GIMPLE_GOTO
   && TREE_CODE (gimple_goto_dest (stmt)) == ADDR_EXPR
@@ -680,7 +692,7 @@ cleanup_tree_cfg_1 (void)
 {
   bb = BASIC_BLOCK_FOR_FN (cfun, i);
   if (bb)
-   retval |= cleanup_control_flow_bb (bb);
+   retval |= cleanup_control_flow_bb (bb, true);
 }

   /* After doing the above SSA form should be valid (or an update SSA
@@ -708,7 +720,7 @@ cleanup_tree_cfg_1 (void)
   if (!bb)
continue;

-  retval |= cleanup_control_flow_bb (bb);
+  retval |= cleanup_control_flow_bb (bb, false);
   retval |= cleanup_tree_cfg_bb (bb);
 }

[Bug middle-end/68933] New: ICE when mixing "-fprofile-arcs -ftest-coverage" and "-fcoarray=lib"

2015-12-16 Thread fanfarillo.gcc at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68933

Bug ID: 68933
   Summary: ICE when mixing "-fprofile-arcs -ftest-coverage" and
"-fcoarray=lib"
   Product: gcc
   Version: 6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: middle-end
  Assignee: unassigned at gcc dot gnu.org
  Reporter: fanfarillo.gcc at gmail dot com
  Target Milestone: ---

Created attachment 37046
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37046&action=edit
coarray-based distributed transpose

Compiling the attached file with the following command:

gfortran -fcoarray=lib -fprofile-arcs -ftest-coverage
coarray_distributed_transpose.F90 -c

generates an ICE:

coarray_distributed_transpose.F90:107:0:

   use run_size


internal compiler error: Segmentation fault
0xb5d8df crash_signal
../../gcc/toplev.c:334
0x7b5baf coverage_checksum_string
../../gcc/coverage.c:500
0x7b6e36 coverage_compute_profile_id(cgraph_node*)
../../gcc/coverage.c:583
0xe1a906 init_node_map(bool)
../../gcc/value-prof.c:1240
0xc39b4e tree_profiling
../../gcc/tree-profile.c:516
0xc39b4e execute
../../gcc/tree-profile.c:642
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions


Using -fcoarray=single instead of -fcoarray=lib works fine.

Can it be related to bug 46989 

The bug has been found by Zaak Beekman.


The system is a x86_64-pc-linux-gnu.

gfortran -v
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/home/alex/Downloads/gcc/libexec/gcc/x86_64-pc-linux-gnu/6.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../configure --prefix=/home/alex/Downloads/gcc
--enable-languages=c,c++,fortran --disable-multilib --disable-libgcj
--disable-bootstrap
Thread model: posix
gcc version 6.0.0 20151210 (experimental) (GCC)

[Bug target/68841] [6 Regression] gcc.c-torture/execute/pr59358.c FAILs with custom compiler flags

2015-12-16 Thread ktkachov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68841

ktkachov at gcc dot gnu.org changed:

   What|Removed |Added

 Status|ASSIGNED|NEW

--- Comment #6 from ktkachov at gcc dot gnu.org ---
As mentioned above, I think this is a but in -flive-range-shrinkage exposed by
more aggressive if-conversion.

Unassigning myself as I'm not currently working on this.
Someone else can give it a shot if they want

[Bug target/68934] New: ARM using simd types should be rejected if not fpu=neon

2015-12-16 Thread chrbr at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68934

Bug ID: 68934
   Summary: ARM using simd types should be rejected if not
fpu=neon
   Product: gcc
   Version: 6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: chrbr at gcc dot gnu.org
  Target Milestone: ---

the declaration:

--
#pragma GCC target ("fpu=vfp")

__simd64_int8_t b;
--

legitimately fails with

error: unknown type name '__simd64_int8_t'

However, if the type was previously created as (for instance) with


#pragma GCC target ("fpu=neon")

__simd64_int8_t a;

#pragma GCC target ("fpu=vfp")

__simd64_int8_t b;
-

then it compiles, but this is wrong for 2 reasons:

1) it's not consistent (the user doesn't know if neon types are available or
not)
2) nothing prevents "b" to be latter used in a code compiled for NEON, creating
discrepancies between modes and possible wrong code (or ICEs)

A mechanism to deactivate SIMD types in arm_set_current_function is needed.

[Bug c++/67669] Wrong works fwrite or fread or both

2015-12-16 Thread beyzman at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67669

--- Comment #4 from Bernard  ---
(In reply to Martin Sebor from comment #3)
> I don't have access to a Windows machine and I can't confirm this on Linux,
> but 
> I doubt the problem is due to GCC and suspect it's more likely due to some
> bug/oddity in Windows and its newline handling (I did notice the "b" in the
> call to fopen which should avoid these problems but still).

Hi, I doubt that problem in Windows, because the same source compiled by
Borland C++ Builder works well.

[Bug c/68908] inefficient code for _Atomic operations

2015-12-16 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68908

Marek Polacek  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |mpolacek at gcc dot 
gnu.org
   Target Milestone|--- |6.0

--- Comment #9 from Marek Polacek  ---
Ok then, let me try that.

[Bug target/68648] [4.9/5/6 Regression][ARM] ICE: fail to generate BIC(immediate) instruction

2015-12-16 Thread ktkachov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68648

--- Comment #4 from ktkachov at gcc dot gnu.org ---
Author: ktkachov
Date: Wed Dec 16 10:01:48 2015
New Revision: 231675

URL: https://gcc.gnu.org/viewcvs?rev=231675&root=gcc&view=rev
Log:
[ARM] PR target/68648: Fold NOT of CONST_INT in andsi_iorsi3_notsi splitter

PR target/68648
* config/arm/arm.md (*andsi_iorsi3_notsi): Try to simplify
the complement of operands[3] during splitting.

* gcc.c-torture/execute/pr68648.c: New test.


Added:
trunk/gcc/testsuite/gcc.c-torture/execute/pr68648.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/arm/arm.md
trunk/gcc/testsuite/ChangeLog

[Bug target/68934] [ARM] using simd types should be rejected if not fpu=neon

2015-12-16 Thread chrbr at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68934

--- Comment #1 from chrbr at gcc dot gnu.org ---
run with cc1 -mfloat-abi=hard for a compiler configured with defaults

[Bug c++/68726] ice: tree check: expected tree_vec, have error_mark in comp_template_args_with_info, at cp/pt.c:7890

2015-12-16 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68726

Paolo Carlini  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2015-12-16
 Ever confirmed|0   |1

[Bug c++/68723] ice in pop_nested_namespace, at cp/name-lookup.c:3816

2015-12-16 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68723

Paolo Carlini  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2015-12-16
 Ever confirmed|0   |1

[Bug c++/68724] ice in unify, at cp/pt.c:19902

2015-12-16 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68724

Paolo Carlini  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2015-12-16
 Ever confirmed|0   |1

[Bug target/68934] [ARM] using simd types should be rejected if not fpu=neon

2015-12-16 Thread rearnsha at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68934

Richard Earnshaw  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #2 from Richard Earnshaw  ---
Realistically, this is never going to be feasible.  How would you expect the
compiler to distinguish between

#pragma GCC target ("fpu=neon")
typedef ... _some_simd_type;
typedef ... _some_nonsimd_type;

#pragma GCC target ("fpu=vfp")

_some_simd_type this_shouldnt_work;
_some_nonsimd_type this_should_work;

There's no practical way for the compiler to ever know which types should go
out of scope when the target attributes change.

Real code does not scope simd type definitions tightly enough to make this
feasible even if it were desirable.

[Bug testsuite/68935] New: ipa-cp.c changes cause guality test failures

2015-12-16 Thread vogt at linux dot vnet.ibm.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68935

Bug ID: 68935
   Summary: ipa-cp.c changes cause guality test failures
   Product: gcc
   Version: 6.0
   URL: http://gcc.gnu.org/ml/gcc-patches/2015-12/msg01083.htm
l
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: testsuite
  Assignee: unassigned at gcc dot gnu.org
  Reporter: vogt at linux dot vnet.ibm.com
  Target Milestone: ---
  Host: s390x
Target: s390x
 Build: s390x

Patch: https://gcc.gnu.org/ml/gcc-patches/2015-12/msg01083.html
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@231540 138bc75d-0d04-0410-96
git commit-id: 15a1fce36358508909f2013fd6d07e0b9fcad97a

Causes guality test failures on s390x:

+FAIL: gcc.dg/guality/pr36728-1.c   -O2 -flto -fuse-linker-plugin
-fno-fat-lto-objects  line 16 arg3 == 3
+FAIL: gcc.dg/guality/pr36728-1.c   -O2 -flto -fuse-linker-plugin
-fno-fat-lto-objects  line 16 arg4 == 4
+FAIL: gcc.dg/guality/pr36728-1.c   -O2 -flto -fuse-linker-plugin
-fno-fat-lto-objects  line 16 arg5 == 5
+FAIL: gcc.dg/guality/pr36728-1.c   -O2 -flto -fuse-linker-plugin
-fno-fat-lto-objects  line 16 arg6 == 6
+FAIL: gcc.dg/guality/pr36728-1.c   -O2 -flto -fuse-linker-plugin
-fno-fat-lto-objects  line 16 y == 2
+FAIL: gcc.dg/guality/pr36728-1.c   -O2 -flto -fuse-linker-plugin
-fno-fat-lto-objects  line 18 arg3 == 3
+FAIL: gcc.dg/guality/pr36728-1.c   -O2 -flto -fuse-linker-plugin
-fno-fat-lto-objects  line 18 arg4 == 4
+FAIL: gcc.dg/guality/pr36728-1.c   -O2 -flto -fuse-linker-plugin
-fno-fat-lto-objects  line 18 arg5 == 5
+FAIL: gcc.dg/guality/pr36728-1.c   -O2 -flto -fuse-linker-plugin
-fno-fat-lto-objects  line 18 arg6 == 6
+FAIL: gcc.dg/guality/pr36728-1.c   -O2 -flto -fuse-linker-plugin
-fno-fat-lto-objects  line 18 y == 2
+FAIL: gcc.dg/guality/pr36728-1.c   -O3 -g  line 16 arg3 == 3
+FAIL: gcc.dg/guality/pr36728-1.c   -O3 -g  line 16 arg4 == 4
+FAIL: gcc.dg/guality/pr36728-1.c   -O3 -g  line 16 arg5 == 5
+FAIL: gcc.dg/guality/pr36728-1.c   -O3 -g  line 16 arg6 == 6
+FAIL: gcc.dg/guality/pr36728-1.c   -O3 -g  line 16 y == 2
+FAIL: gcc.dg/guality/pr36728-1.c   -O3 -g  line 18 arg3 == 3
+FAIL: gcc.dg/guality/pr36728-1.c   -O3 -g  line 18 arg4 == 4
+FAIL: gcc.dg/guality/pr36728-1.c   -O3 -g  line 18 arg5 == 5
+FAIL: gcc.dg/guality/pr36728-1.c   -O3 -g  line 18 arg6 == 6
+FAIL: gcc.dg/guality/pr36728-1.c   -O3 -g  line 18 y == 2
 FAIL: gcc.dg/guality/pr36728-2.c   -O2  line 18 *x == (char) 25
 FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fno-use-linker-plugin
-flto-partition=none  line 18 *x == (char) 25
+FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin
-fno-fat-lto-objects  line 16 arg3 == 3
+FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin
-fno-fat-lto-objects  line 16 arg4 == 4
+FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin
-fno-fat-lto-objects  line 16 arg5 == 5
+FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin
-fno-fat-lto-objects  line 16 arg6 == 6
+FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin
-fno-fat-lto-objects  line 16 arg7 == 30
+FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin
-fno-fat-lto-objects  line 16 y == 2
 FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin
-fno-fat-lto-objects  line 18 *x == (char) 25
+FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin
-fno-fat-lto-objects  line 18 arg3 == 3
+FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin
-fno-fat-lto-objects  line 18 arg4 == 4
+FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin
-fno-fat-lto-objects  line 18 arg5 == 5
+FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin
-fno-fat-lto-objects  line 18 arg6 == 6
+FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin
-fno-fat-lto-objects  line 18 arg7 == 30
+FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin
-fno-fat-lto-objects  line 18 y == 2
+FAIL: gcc.dg/guality/pr36728-2.c   -O3 -g  line 16 arg3 == 3
+FAIL: gcc.dg/guality/pr36728-2.c   -O3 -g  line 16 arg4 == 4
+FAIL: gcc.dg/guality/pr36728-2.c   -O3 -g  line 16 arg5 == 5
+FAIL: gcc.dg/guality/pr36728-2.c   -O3 -g  line 16 arg6 == 6
+FAIL: gcc.dg/guality/pr36728-2.c   -O3 -g  line 16 arg7 == 30
+FAIL: gcc.dg/guality/pr36728-2.c   -O3 -g  line 16 y == 2
 FAIL: gcc.dg/guality/pr36728-2.c   -O3 -g  line 18 *x == (char) 25
+FAIL: gcc.dg/guality/pr36728-2.c   -O3 -g  line 18 arg3 == 3
+FAIL: gcc.dg/guality/pr36728-2.c   -O3 -g  line 18 arg4 == 4
+FAIL: gcc.dg/guality/pr36728-2.c   -O3 -g  line 18 arg5 == 5
+FAIL: gcc.dg/guality/pr36728-2.c   -O3 -g  line 18 arg6 == 6
+FAIL: gcc.dg/guality/pr36728-2.c   -O3 -g  line 18 arg7 == 30
+FAIL: gcc.dg/guality/pr36728-2.c   -O3 -g  line 18 y == 2
 FAIL: gcc.dg/guality/pr36728-2.c   -Os  line 18 *x == (char) 25
+FAIL: gcc.dg/guality/pr36728-3.c   -O2 -flto -fuse-link

[Bug debug/68860] [6 regression] FAIL: gcc.dg/guality/pr36728-1.c -O3 -g line 16 arg1 == 1

2015-12-16 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68860

Jakub Jelinek  changed:

   What|Removed |Added

 CC||vogt at linux dot vnet.ibm.com

--- Comment #2 from Jakub Jelinek  ---
*** Bug 68935 has been marked as a duplicate of this bug. ***

[Bug testsuite/68935] ipa-cp.c changes cause guality test failures

2015-12-16 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68935

Jakub Jelinek  changed:

   What|Removed |Added

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

--- Comment #1 from Jakub Jelinek  ---
Dup.

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

[Bug target/68841] [6 Regression] gcc.c-torture/execute/pr59358.c FAILs with custom compiler flags

2015-12-16 Thread ktkachov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68841

ktkachov at gcc dot gnu.org changed:

   What|Removed |Added

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

--- Comment #7 from ktkachov at gcc dot gnu.org ---
Hmm, looking at it again, the if-converted sequence:
(insn 22 21 73 7 (set (reg:CCGC 17 flags)
(compare:CCGC (reg/v:SI 88 [ i ])
(const_int 3 [0x3]))) file.c:19 7 {*cmpsi_1}
 (nil))
(insn 73 22 74 7 (parallel [
(set (reg:SI 94)
(ashift:SI (reg/v:SI 88 [ i ])
(const_int 1 [0x1])))
(clobber (reg:CC 17 flags))
]) zdenek.c:20 525 {*ashlsi3_1}
 (nil))
(insn 74 73 75 7 (set (reg/v:SI 93 [ k ])
(eq:SI (reg:CCGC 17 flags)
(const_int 0 [0]))) file.c:20 626 {*setcc_si_1_movzbl}
 (nil))

seems invalid since between the comparison and the use of the CC reg insn73
clobbers it. Presumably that's why the comparison is considered dead code.
So ifcvt should have done this. I'll have another look at ifcvt

[Bug libstdc++/68921] [5/6 Regression] std::future::wait() makes invalid futex calls and spins

2015-12-16 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68921

--- Comment #4 from Jonathan Wakely  ---
Author: redi
Date: Wed Dec 16 10:40:04 2015
New Revision: 231676

URL: https://gcc.gnu.org/viewcvs?rev=231676&root=gcc&view=rev
Log:
libstdc++/68921 add timeout argument to futex(2)

PR libstdc++/68921
* src/c++11/futex.cc
(__atomic_futex_unsigned_base::_M_futex_wait_until): Use null pointer
as timeout argument.

Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/src/c++11/futex.cc

[Bug c++/68936] New: [6 Regression] ICE: tree check: expected call_expr, have target_expr in build_min_non_dep_call_vec, at cp/tree.c:2744

2015-12-16 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68936

Bug ID: 68936
   Summary: [6 Regression] ICE: tree check: expected call_expr,
have target_expr in build_min_non_dep_call_vec, at
cp/tree.c:2744
   Product: gcc
   Version: 6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: trippels at gcc dot gnu.org
  Target Milestone: ---

A very recent regression:

trippels@gcc2-power8 status % cat testwave_dll.ii
class A {};
struct predefined_macros {
  struct B {
A (predefined_macros::*generator)();
  };
};
template  class C {
  void m_fn1();
  predefined_macros predef;
};
template  void C::m_fn1() {
predefined_macros::B m = (predef.*m.generator)();
}


trippels@gcc2-power8 status % g++ -c testwave_dll.ii
testwave_dll.ii: In member function ‘void C< 
>::m_fn1()’:
testwave_dll.ii:12:48: internal compiler error: tree check: expected call_expr,
have target_expr in build_min_non_dep_call_vec, at cp/tree.c:2744
 predefined_macros::B m = (predef.*m.generator)();
^

0x10d8c8f3 tree_check_failed(tree_node const*, char const*, int, char const*,
...)
../../gcc/gcc/tree.c:9606
0x103c4bcb tree_check
../../gcc/gcc/tree.h:2997
0x103c4bcb build_min_non_dep_call_vec(tree_node*, tree_node*, vec*)
../../gcc/gcc/cp/tree.c:2744
0x102a18d3 build_offset_ref_call_from_tree(tree_node*, vec**, int)
../../gcc/gcc/cp/decl2.c:5001
0x102e5e3f cp_parser_postfix_expression
../../gcc/gcc/cp/parser.c:6812
0x102f2663 cp_parser_unary_expression
../../gcc/gcc/cp/parser.c:7901
0x102f36e3 cp_parser_cast_expression
../../gcc/gcc/cp/parser.c:8578
0x102f3ddb cp_parser_binary_expression
../../gcc/gcc/cp/parser.c:8680
0x102f4a5f cp_parser_assignment_expression
../../gcc/gcc/cp/parser.c:8968
0x102f5257 cp_parser_constant_expression
../../gcc/gcc/cp/parser.c:9236
0x102f5f17 cp_parser_initializer_clause
../../gcc/gcc/cp/parser.c:20681
0x102f8817 cp_parser_initializer
../../gcc/gcc/cp/parser.c:20622
0x1030fdab cp_parser_init_declarator
../../gcc/gcc/cp/parser.c:18494
0x1031054f cp_parser_simple_declaration
../../gcc/gcc/cp/parser.c:12278
0x10310c47 cp_parser_block_declaration
../../gcc/gcc/cp/parser.c:12147
0x103120df cp_parser_declaration_statement
../../gcc/gcc/cp/parser.c:11759
0x102e0b57 cp_parser_statement
../../gcc/gcc/cp/parser.c:10441
0x102e1597 cp_parser_statement_seq_opt
../../gcc/gcc/cp/parser.c:10719
0x102e176f cp_parser_compound_statement
../../gcc/gcc/cp/parser.c:10673
0x1030dfab cp_parser_function_body
../../gcc/gcc/cp/parser.c:20541

[Bug c++/68936] [6 Regression] ICE: tree check: expected call_expr, have target_expr in build_min_non_dep_call_vec, at cp/tree.c:2744

2015-12-16 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68936

Markus Trippelsdorf  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2015-12-16
 CC||ppalka at gcc dot gnu.org
 Ever confirmed|0   |1

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

commit d175f0193ed47b61eafd213ca2d3dde73f8f5996
Author: ppalka 
Date:   Tue Dec 15 03:33:53 2015 +

Fix PR c++/21802 (two-stage name lookup fails for operators)

[Bug tree-optimization/68861] [6 regression] FAIL: libgomp.fortran/vla8.f90 -O3 -g execution test

2015-12-16 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68861

Richard Biener  changed:

   What|Removed |Added

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

--- Comment #3 from Richard Biener  ---
Confirmed with -O3 -fno-tree-loop-vectorize -fdbg-cnt=vect_slp:3, so it's at
least

vla8.f90:187:0: note: basic block vectorized

causing the abort.

Ok, so we hit some operand swapping plus build-from-scalars (both got recent
fixes but indeed those don't help).

Oh.

vla8.f90:187:0: note: node
vla8.f90:187:0: note:   stmt 0 [vla8.f90:185:0] _7724 = _232 + _7725;
vla8.f90:187:0: note:   stmt 1 [vla8.f90:185:0] _7718 = _6710 + _7725;
vla8.f90:187:0: note:   stmt 2 [vla8.f90:185:0] _7718 = _6710 + _7725;
vla8.f90:187:0: note:   stmt 3 [vla8.f90:185:0] _7699 = _7725 + _8020;
vla8.f90:187:0: note:   stmt 4 [vla8.f90:185:0] _7699 = _7725 + _8020;

so we have duplicates here (hooray) and thus

  for (j = 0; j < group_size; ++j)
if (!matches[j])
  {
gimple *stmt = SLP_TREE_SCALAR_STMTS (*node)[j];
swap_ssa_operands (stmt, gimple_assign_rhs1_ptr (stmt),
   gimple_assign_rhs2_ptr (stmt));
  }

will swap and then re-swap ...

[Bug c++/68184] [4.9/5 Regression] Exception from a virtual function does not get caught

2015-12-16 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68184

--- Comment #9 from Richard Biener  ---
Author: rguenth
Date: Wed Dec 16 11:12:06 2015
New Revision: 231677

URL: https://gcc.gnu.org/viewcvs?rev=231677&root=gcc&view=rev
Log:
2015-12-16  Richard Biener  

Backport from mainline
2015-12-02  Jan Hubicka  

PR ipa/68184
* cgraphunit.c (cgraph_node::analyze): Set can_throw_external.

* g++.dg/torture/pr68184.C: New testcase.

Added:
branches/gcc-5-branch/gcc/testsuite/g++.dg/torture/pr68184.C
Modified:
branches/gcc-5-branch/gcc/ChangeLog
branches/gcc-5-branch/gcc/cgraphunit.c
branches/gcc-5-branch/gcc/testsuite/ChangeLog

[Bug c++/68184] [4.9 Regression] Exception from a virtual function does not get caught

2015-12-16 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68184

Richard Biener  changed:

   What|Removed |Added

  Known to work||5.4.0, 6.0
Summary|[4.9/5 Regression]  |[4.9 Regression] Exception
   |Exception from a virtual|from a virtual function
   |function does not get   |does not get caught
   |caught  |
  Known to fail|6.0 |5.3.0

--- Comment #10 from Richard Biener  ---
And for GCC 5.4.

[Bug target/68937] New: i686: -fno-plt produces wrong code (maybe only with tailcall)

2015-12-16 Thread zsojka at seznam dot cz
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68937

Bug ID: 68937
   Summary: i686: -fno-plt produces wrong code (maybe only with
tailcall)
   Product: gcc
   Version: 6.0
Status: UNCONFIRMED
  Keywords: wrong-code
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: zsojka at seznam dot cz
  Target Milestone: ---
  Host: x86_64-pc-linux-gnu
Target: i686-pc-linux-gnu

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

Output:
$ i686-pc-linux-gnu-gcc -O2 -fPIC -fno-plt testcase.c
$ ./a.out 
Segmentation fault

The wrong code is:
...
foo:
...
call[DWORD PTR bar@GOT[ebx]]
mov DWORD PTR 32[esp], esi
add esp, 20
pop ebx
pop esi
jmp [DWORD PTR bar@GOT[ebx]]

ebx is invalid at this point.

Without -fno-plt, the tailcall optimization is not performed:
--- testcase.s  2015-12-16 12:14:49.061674916 +0100
+++ testcase_broken.s   2015-12-16 12:14:17.541674625 +0100
@@ -30,9 +30,8 @@
mov esi, DWORD PTR 32[esp]
pushesi
-   callbar@PLT
-   mov DWORD PTR [esp], esi
-   callbar@PLT
+   call[DWORD PTR bar@GOT[ebx]]
+   mov DWORD PTR 32[esp], esi
add esp, 20
pop ebx
@@ -41,7 +40,7 @@
pop esi
-   ret
+   jmp [DWORD PTR bar@GOT[ebx]]


This seems to affect only i686 (powerpc, powerpc64, x86_64, x86_64 x32,
aarch64, armv7 are fine)

Tested revisions:
r231665 - FAIL

[Bug c++/68936] [6 Regression] ICE: tree check: expected call_expr, have target_expr in build_min_non_dep_call_vec, at cp/tree.c:2744

2015-12-16 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68936

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|--- |6.0

[Bug libstdc++/68921] [5/6 Regression] std::future::wait() makes invalid futex calls and spins

2015-12-16 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68921

--- Comment #5 from Jonathan Wakely  ---
Author: redi
Date: Wed Dec 16 11:48:55 2015
New Revision: 231679

URL: https://gcc.gnu.org/viewcvs?rev=231679&root=gcc&view=rev
Log:
libstdc++/68921 add timeout argument to futex(2)

PR libstdc++/68921
* src/c++11/futex.cc
(__atomic_futex_unsigned_base::_M_futex_wait_until): Use null pointer
as timeout argument.

Modified:
branches/gcc-5-branch/libstdc++-v3/ChangeLog
branches/gcc-5-branch/libstdc++-v3/src/c++11/futex.cc

[Bug libstdc++/68921] [5/6 Regression] std::future::wait() makes invalid futex calls and spins

2015-12-16 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68921

Jonathan Wakely  changed:

   What|Removed |Added

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

--- Comment #6 from Jonathan Wakely  ---
Fixed for 5.4

[Bug c++/68926] decltype and sfinae to check for template instance availability fails to compile

2015-12-16 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68926

Jonathan Wakely  changed:

   What|Removed |Added

   Keywords||rejects-valid
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2015-12-16
 Ever confirmed|0   |1

--- Comment #1 from Jonathan Wakely  ---
Confirmed, compiles correctly with clang, EDG and MSVC.

Reduced to remove the library header:

struct true_type { static constexpr bool value = true; };
struct false_type { static constexpr bool value = false; };

template struct enable_if { using type = void; };
template<> struct enable_if { };

template struct is_same : false_type { };
template struct is_same : true_type { };

template
typename enable_if::value>::type
func();

template)>
true_type test(T);

false_type test(...);

int main()
{
   decltype(test(0))::value;   // ok
   decltype(test(0.f))::value; // error
}

[Bug testsuite/68914] [6 regression] gcc.dg/vect/pr45752.c FAILs

2015-12-16 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68914

Richard Biener  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2015-12-16
  Component|tree-optimization   |testsuite
   Assignee|unassigned at gcc dot gnu.org  |rguenth at gcc dot 
gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Richard Biener  ---
/vol/gcc/src/hg/trunk/local/gcc/testsuite/gcc.dg/vect/pr45752.c:46:3: note:
unsupported vect permute { 0 0 }
/vol/gcc/src/hg/trunk/local/gcc/testsuite/gcc.dg/vect/pr45752.c:46:3: note:
Build SLP failed: unsupported load permutation *pOutput2_141 = _83;

so SLP fails and we end up with interleaving which isn't supported in this
case.

Thus the testcase needs some adjustment.

[Bug tree-optimization/68916] [6 regression] gcc.dg/vect/slp-perm-4.c FAILs

2015-12-16 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68916

--- Comment #2 from Richard Biener  ---
Author: rguenth
Date: Wed Dec 16 12:13:05 2015
New Revision: 231684

URL: https://gcc.gnu.org/viewcvs?rev=231684&root=gcc&view=rev
Log:
2015-12-16  Richard Biener  

PR testsuite/68916
PR testsuite/68914
* gcc.dg/vect/pr45752.c: Require vect_perm and adjust expected
dump.
* gcc.dg/vect/slp-perm-4.c: Likewise.

Modified:
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.dg/vect/pr45752.c
trunk/gcc/testsuite/gcc.dg/vect/slp-perm-4.c

[Bug testsuite/68914] [6 regression] gcc.dg/vect/pr45752.c FAILs

2015-12-16 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68914

--- Comment #3 from Richard Biener  ---
Author: rguenth
Date: Wed Dec 16 12:13:05 2015
New Revision: 231684

URL: https://gcc.gnu.org/viewcvs?rev=231684&root=gcc&view=rev
Log:
2015-12-16  Richard Biener  

PR testsuite/68916
PR testsuite/68914
* gcc.dg/vect/pr45752.c: Require vect_perm and adjust expected
dump.
* gcc.dg/vect/slp-perm-4.c: Likewise.

Modified:
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.dg/vect/pr45752.c
trunk/gcc/testsuite/gcc.dg/vect/slp-perm-4.c

[Bug testsuite/68914] [6 regression] gcc.dg/vect/pr45752.c FAILs

2015-12-16 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68914

Richard Biener  changed:

   What|Removed |Added

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

--- Comment #2 from Richard Biener  ---
Fixed (hopefully).

[Bug tree-optimization/68916] [6 regression] gcc.dg/vect/slp-perm-4.c FAILs

2015-12-16 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68916

Richard Biener  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |FIXED
   Assignee|unassigned at gcc dot gnu.org  |rguenth at gcc dot 
gnu.org

--- Comment #1 from Richard Biener  ---
Fixed hopefully.

[Bug target/68934] [ARM] using simd types should be rejected if not fpu=neon

2015-12-16 Thread chrbr at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68934

--- Comment #3 from chrbr at gcc dot gnu.org ---

> Real code does not scope simd type definitions tightly enough to make this
> feasible even if it were desirable.

there was an instance of this in Bug #68895. The second function ices while
using int8x8_t types while in vfp mode. So we should probably decide if the
code is legitimate or not (and close as invalid). And if it is how the RTL can
this bi-morphism.

The only solution I had in mind was to play with registered_builtin_types in
the lang hooks, but I agree it is not practical.

[Bug ipa/68930] Aggregate replacements not applied to inline function bodies.

2015-12-16 Thread rguenther at suse dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68930

--- Comment #3 from rguenther at suse dot de  ---
On Wed, 16 Dec 2015, hubicka at gcc dot gnu.org wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68930
> 
> Jan Hubicka  changed:
> 
>What|Removed |Added
> 
>  CC||rguenther at suse dot de
> 
> --- Comment #1 from Jan Hubicka  ---
> Actually applying it just after inlining is probably going to miss the
> transform, too, because there will be extra copy of the whole aggregate.  What
> about making the info about known constant values of aggregates available to
> GVN? It should be able to do the desired cleanup.

But how would you represent this info?  I don't see how it's going to
do better than the inliner inserting an extra initialization (of course
that might stay around if there are no cleanup opportunities and actually
make the code bigger & slower)

[Bug c++/68926] [4.9/5/6 Regression] decltype and sfinae to check for template instance availability fails to compile

2015-12-16 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68926

Jonathan Wakely  changed:

   What|Removed |Added

  Known to work||4.7.4
Summary|decltype and sfinae to  |[4.9/5/6 Regression]
   |check for template instance |decltype and sfinae to
   |availability fails to   |check for template instance
   |compile |availability fails to
   ||compile
  Known to fail||4.8.0

--- Comment #2 from Jonathan Wakely  ---
This compiled OK with 4.7

[Bug tree-optimization/68915] [6 Regression] gcc.dg/vect/pr46032.c FAILs

2015-12-16 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68915

Richard Biener  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2015-12-16
 CC||vries at gcc dot gnu.org
   Assignee|unassigned at gcc dot gnu.org  |rguenth at gcc dot 
gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Richard Biener  ---
Confirmed from the dump.

Rainer, the dump says

/vol/gcc/src/hg/trunk/local/gcc/testsuite/gcc.dg/vect/pr46032.c:40:33: note:
not vectorized: no vectype for stmt: # VUSE <.MEM_4>
_19 = *pretmp_30[idx_3];
 scalar_type: unsigned intD.4
/vol/gcc/src/hg/trunk/local/gcc/testsuite/gcc.dg/vect/pr46032.c:40:33: note:
bad data references.

but that's "impossible" from

/* { dg-require-effective-target vect_int } */

which either isn't in effect for some weird reason (dg-options overriding sth?)
or is confused by optimize attribute usage.

I suppose changing dg-options to dg-additional-options "-fopenmp -fipa-pta"
might work, will commit that.

That would have been the correct thing to do when moving the testcases to
gcc.dg/vect/ with

2015-12-01  Tom de Vries  

* gcc.dg/pr46032.c: Move to ...
* gcc.dg/vect/pr46032.c: here.  Add dg-require-effective-target
vect_int.
* gcc.dg/pr46032-2.c: Move to ...
* gcc.dg/gomp/pr46032-2.c: ... here.
Drop dg-require-effective-target fopenmp.
* gcc.dg/pr46032-3.c: Move to ...
* gcc.dg/gomp/pr46032-3.c: ... here.
Drop dg-require-effective-target fopenmp.

[Bug tree-optimization/68915] [6 Regression] gcc.dg/vect/pr46032.c FAILs

2015-12-16 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68915

Richard Biener  changed:

   What|Removed |Added

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

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

[Bug tree-optimization/68915] [6 Regression] gcc.dg/vect/pr46032.c FAILs

2015-12-16 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68915

--- Comment #3 from Richard Biener  ---
Author: rguenth
Date: Wed Dec 16 12:37:02 2015
New Revision: 231687

URL: https://gcc.gnu.org/viewcvs?rev=231687&root=gcc&view=rev
Log:
2015-12-16  Richard Biener  

PR testsuite/68915
* gcc.dg/vect/pr46032.c: Use dg-additional-options.

Modified:
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.dg/vect/pr46032.c

[Bug c/68162] [5 Regression] Incompatible pointer type using a typedef

2015-12-16 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68162

Richard Biener  changed:

   What|Removed |Added

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

--- Comment #18 from Richard Biener  ---
Prerequesite backported now.

[Bug c/64439] Incorrect location of -Wunused-value or false negative

2015-12-16 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64439

Marek Polacek  changed:

   What|Removed |Added

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

--- Comment #2 from Marek Polacek  ---
This seems to be on purpose since ancient

commit 9dfbe515a74532d27db0a3d11a9163c4e571aa9b
Author: kenner 
Date:   Sun Feb 2 12:37:24 1992 +

Initial revision


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

warn_if_unused_value has:
 1480 case TRUTH_ORIF_EXPR:
 1481 case TRUTH_ANDIF_EXPR:
 1482   /* In && or ||, warn if 2nd operand has no side effect.  */
 1483   exp = TREE_OPERAND (exp, 1);
 1484   goto restart;


As for the discrepancy in Comment 1, the problem is that "a" in "((b = 0) != 0)
&& a" has the location of "&&".  That's because when creating op1 of the
TRUTH_AND_EXPR via c_objc_common_truthvalue_conversion, we use the location of
the TRUTH_AND_EXPR itself--PARM_DECLs don't carry a location.  But that is a
related issue.  So I think I'll close this bug.  Please feel free to reopen.

[Bug lto/61886] [4.9/5/6 Regression] LTO breaks fread with _FORTIFY_SOURCE=2

2015-12-16 Thread mwahab at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61886

mwahab at gcc dot gnu.org changed:

   What|Removed |Added

 CC||mwahab at gcc dot gnu.org

--- Comment #53 from mwahab at gcc dot gnu.org ---
(In reply to Jan Hubicka from comment #52)
> We no longer merge the decls, so hopefully this is fixed, but it would be
> nice to give it a try on the original packages that failed.  We still may
> lose/provoke some warnings during IPA optimizations I suppose as IPA code
> does not assume this kind of side effect for aliases, but that is not an LTO
> specific issue anymore.

The new test case alias-2.c fails for aarch64.

Compiling from the command line with gcc -O2 -fdump-tree-all, I get the
following for the tree.optimized pass
-
;; Function main (main, funcdef_no=0, decl_uid=2753, cgraph_uid=0,
symbol_order=3) (executed once)

main ()
{
  int off.0_2;

  :
  off.0_2 = off;
  b[off.0_2] = 1;
  a[off.0_2] = 2;
  __builtin_abort ();

}


Matthew

[Bug target/64783] -march=armv8.1-a should be supported

2015-12-16 Thread mwahab at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64783

mwahab at gcc dot gnu.org changed:

   What|Removed |Added

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

--- Comment #4 from mwahab at gcc dot gnu.org ---
Author: mwahab
Date: Wed Dec 16 11:45:25 2015
New Revision: 231678

URL: https://gcc.gnu.org/viewcvs?rev=231678&root=gcc&view=rev
Log:
[ARM] Add support for ARMv8.1.

* config/arm/arm-arches.def: Add "armv8.1-a" and "armv8.1-a+crc".
* config/arm/arm-protos.h (FL2_ARCH8_1): New.
(FL2_FOR_ARCH8_1A): New.
* config/arm/arm-tables.opt: Regenerate.
* config/arm/arm.c (arm_arch8_1): New.
(arm_option_override): Set arm_arch8_1.
* config/arm/arm.h (TARGET_NEON_RDMA): New.
(arm_arch8_1): Declare.
* doc/invoke.texi (ARM Options, -march): Add "armv8.1-a" and
"armv8.1-a+crc".
(ARM Options, -mfpu): Fix a typo.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/arm/arm-arches.def
trunk/gcc/config/arm/arm-protos.h
trunk/gcc/config/arm/arm-tables.opt
trunk/gcc/config/arm/arm.c
trunk/gcc/config/arm/arm.h
trunk/gcc/doc/invoke.texi

[Bug target/64784] -march=native should be supported

2015-12-16 Thread mwahab at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64784
Bug 64784 depends on bug 64783, which changed state.

Bug 64783 Summary: -march=armv8.1-a should be supported
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64783

   What|Removed |Added

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

[Bug testsuite/66720] gcc.dg/vect/pr48052.c FAILs

2015-12-16 Thread ro at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66720

Rainer Orth  changed:

   What|Removed |Added

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

--- Comment #6 from Rainer Orth  ---
Yes, since early July, actually.

[Bug target/68937] i686: -fno-plt produces wrong code (maybe only with tailcall)

2015-12-16 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68937

--- Comment #1 from H.J. Lu  ---
There is

static bool
ix86_function_ok_for_sibcall (tree decl, tree exp)
{
  tree type, decl_or_type;
  rtx a, b; 

  /* If we are generating position-independent code, we cannot sibcall
 optimize direct calls to global functions, as the PLT requires
 %ebx be live. (Darwin does not have a PLT.)  */
  if (!TARGET_MACHO
  && !TARGET_64BIT
  && flag_pic
  && flag_plt
  && decl && !targetm.binds_local_p (decl))
return false;

Why dos RA pick callee-saved register as GOT base in jmp?

[Bug target/68937] i686: -fno-plt produces wrong code (maybe only with tailcall)

2015-12-16 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68937

H.J. Lu  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2015-12-16
 CC|hjl at gcc dot gnu.org |hjl.tools at gmail dot 
com
 Ever confirmed|0   |1

[Bug c/64637] Incorrect location for -Wunused-value warnings in for-loop

2015-12-16 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64637

Marek Polacek  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
 CC||mpolacek at gcc dot gnu.org
   Assignee|unassigned at gcc dot gnu.org  |mpolacek at gcc dot 
gnu.org
   Target Milestone|--- |6.0

--- Comment #2 from Marek Polacek  ---
Mine.

[Bug lto/61886] [4.9/5/6 Regression] LTO breaks fread with _FORTIFY_SOURCE=2

2015-12-16 Thread ktkachov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61886

ktkachov at gcc dot gnu.org changed:

   What|Removed |Added

 CC||ktkachov at gcc dot gnu.org

--- Comment #54 from ktkachov at gcc dot gnu.org ---
The new test failure is PR 68832

[Bug tree-optimization/68619] [6 Regression] error: loop with header 6 not in loop tree

2015-12-16 Thread mwahab at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68619

mwahab at gcc dot gnu.org changed:

   What|Removed |Added

 CC||mwahab at gcc dot gnu.org

--- Comment #8 from mwahab at gcc dot gnu.org ---
(In reply to Jeffrey A. Law from comment #6)
> Fixed on trunk.

The new test case pr68619-4.c is failing for arm-none-eabi because it triggers
the error

pr68619-4.c:42:17: error: width of 'code' exceeds its type
   enum rtx_code code:16;


For arm-none-eabi, the rtx_code enum is being represented in 8-bits.
so 'enum rtx_code code:8;' compiles without the error.

Matthew

[Bug tree-optimization/68861] [6 regression] FAIL: libgomp.fortran/vla8.f90 -O3 -g execution test

2015-12-16 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68861

--- Comment #4 from Richard Biener  ---
Author: rguenth
Date: Wed Dec 16 13:45:40 2015
New Revision: 231689

URL: https://gcc.gnu.org/viewcvs?rev=231689&root=gcc&view=rev
Log:
2015-12-16  Richard Biener  

PR tree-optimization/68861
* tree-vect-slp.c (vect_build_slp_tree): Properly handle
duplicate stmts when applying swapping to stmts.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/tree-vect-slp.c

[Bug ipa/68857] [6 regression] FAIL: gcc.target/i386/mpx/vararg-8-nov.c -O3 -g (internal compiler error)

2015-12-16 Thread ienkovich at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68857

Ilya Enkovich  changed:

   What|Removed |Added

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

--- Comment #4 from Ilya Enkovich  ---
Fixed by r231648

[Bug target/68937] i686: -fno-plt produces wrong code (maybe only with tailcall)

2015-12-16 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68937

--- Comment #2 from H.J. Lu  ---
(In reply to H.J. Lu from comment #1)
> There is
> 
> static bool
> ix86_function_ok_for_sibcall (tree decl, tree exp)
> {
>   tree type, decl_or_type;
>   rtx a, b; 
> 
>   /* If we are generating position-independent code, we cannot sibcall
>  optimize direct calls to global functions, as the PLT requires
>  %ebx be live. (Darwin does not have a PLT.)  */
>   if (!TARGET_MACHO
>   && !TARGET_64BIT
>   && flag_pic
>   && flag_plt
>   && decl && !targetm.binds_local_p (decl))
> return false;
> 
> Why dos RA pick callee-saved register as GOT base in jmp?

We should remove flag_plt here.  I will submit a patch.

[Bug c/44478] -Wunused- but-set-variable is incredible noisy in kernel builds

2015-12-16 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44478

Marek Polacek  changed:

   What|Removed |Added

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

--- Comment #7 from Marek Polacek  ---
Looks like there isn't anything to do.

[Bug tree-optimization/68756] [6 Regression] ICE w/ -O1 -floop-nest-optimize and isl 0.15: isl-0.15/isl_id.c:213: unable to find id

2015-12-16 Thread bernds at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68756

Bernd Schmidt  changed:

   What|Removed |Added

 CC||bernds at gcc dot gnu.org,
   ||spop at gcc dot gnu.org

--- Comment #1 from Bernd Schmidt  ---
Ccing Sebastian as the person most likely to be able to investigate.

[Bug c/52050] Want an option to warn about a declaration inside a for/while/if statements.

2015-12-16 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52050

Marek Polacek  changed:

   What|Removed |Added

 CC||mpolacek at gcc dot gnu.org

--- Comment #6 from Marek Polacek  ---
This would be easy to implement, if it's still wanted.  I suggest the name
"-Wdecl-in-for-loop".

[Bug libstdc++/68912] Wrong value category used in _Bind functor

2015-12-16 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68912

--- Comment #2 from Jonathan Wakely  ---
Author: redi
Date: Wed Dec 16 14:16:00 2015
New Revision: 231692

URL: https://gcc.gnu.org/viewcvs?rev=231692&root=gcc&view=rev
Log:
Fix cv-qualifiers in std::bind invocation

PR libstdc++/68912
* include/std/functional (_Bind::operator()): Use lvalue functor to
deduce return type.
* testsuite/20_util/bind/68912.cc: New.

Added:
branches/gcc-5-branch/libstdc++-v3/testsuite/20_util/bind/68912.cc
Modified:
branches/gcc-5-branch/libstdc++-v3/ChangeLog
branches/gcc-5-branch/libstdc++-v3/include/std/functional

[Bug target/68910] [5/6 regression] huge stack frame and poor code with instruction scheduling at -O2

2015-12-16 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68910

--- Comment #7 from Eric Botcazou  ---
> Yes, sorry for imprecise known-to-work information.  The huge stack frame is
> also in 4.3.2 (2792 bytes), but it got worse with every GCC release.

OK, thanks for the information.  I can easily bring back the stack frame to the
4.3.2 territory but the real regression comes from the RTL DSE2 pass, which
used to delete all these useless clear instructions.

[Bug target/67973] All the tests for -gstabs* fail on x86_64-apple-darwin14 with Xcode 7

2015-12-16 Thread bernds at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67973

Bernd Schmidt  changed:

   What|Removed |Added

 CC||bernds at gcc dot gnu.org

--- Comment #11 from Bernd Schmidt  ---
Proposed patch seems not to be attached?

[Bug target/67973] All the tests for -gstabs* fail on x86_64-apple-darwin14 with Xcode 7

2015-12-16 Thread ro at CeBiTec dot Uni-Bielefeld.DE
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67973

--- Comment #12 from ro at CeBiTec dot Uni-Bielefeld.DE  ---
Right: an initial version was posted to gcc-patches at the listed URL,
but is currently being reworked.  I usually only attach patches if they
are not yet ready for posting.

Rainer

[Bug go/68931] gccgo fails to build using MUSL libc

2015-12-16 Thread ian at airs dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68931

--- Comment #1 from Ian Lance Taylor  ---
I don't understand your patch, because I don't understand where CONFIG_USE_MUSL
gets set.

It also seems like the wrong approach.  The basic goal of configure tests is to
test for features, not systems.  mksysinfo.sh already works that way.  What
fails without this patch?

[Bug target/68937] i686: -fno-plt produces wrong code (maybe only with tailcall)

2015-12-16 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68937

H.J. Lu  changed:

   What|Removed |Added

 CC||ubizjak at gmail dot com
   Host|x86_64-pc-linux-gnu |

--- Comment #3 from H.J. Lu  ---
Sibcall pattern:

call_insn/j:TI 12 27 13 2 (call (mem:QI (mem/u/c:SI (plus:SI (reg:SI 3 bx [87])
(const:SI (unspec:SI [
(symbol_ref:SI ("bar") [flags 0x41] 
)
] UNSPEC_GOT))) [0  S4 A8]) [0 bar S1 A8])
(const_int 4 [0x4])) x.i:7 671 {*sibcall}
 (expr_list:REG_DEAD (reg/f:SI 16 argp)
(expr_list:REG_CALL_DECL (symbol_ref:SI ("bar") [flags 0x41] 
)
(nil)))
(expr_list:SI (use (mem:SI (reg/f:SI 16 argp) [0  S4 A32]))
(nil)))

should clobber GOT base register.

[Bug c++/68938] New: [C++11] use of lambda before deduction of auto does not fail in templated function

2015-12-16 Thread sebastien.piat at epita dot fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68938

Bug ID: 68938
   Summary: [C++11] use of lambda before deduction of auto does
not fail in templated function
   Product: gcc
   Version: 5.2.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sebastien.piat at epita dot fr
  Target Milestone: ---

When testing the following code with g++ the compilation fails with error
"use of ‘print’ before deduction of ‘auto’"

===
#include 

void bar()
{
  auto print = std::function([&print](int n){ print(n); });
  print(1);
}

int main()
{
  bar();
  return 0;
}
===

While the following code where the function is templated does compile.

===
#include 

template 
void bar()
{
  auto print = std::function([&print](int n){ print(n); });
  print(1);
}

int main()
{
  bar();
  return 0;
}
===

Compilation with clang++ fails in both cases with error:
"variable 'print' declared with 'auto' type cannot appear in its own
initializer"
It is my understanding that it should not work.
I have tested these with g++ version: Debian 5.2.1-21 and Debian 4.9.2-10.

[Bug fortran/67044] ICE: in aggregate_value_p, at function.c:2068

2015-12-16 Thread bernds at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67044

Bernd Schmidt  changed:

   What|Removed |Added

 CC||bernds at gcc dot gnu.org

--- Comment #4 from Bernd Schmidt  ---
Is this fixed?

[Bug target/67973] All the tests for -gstabs* fail on x86_64-apple-darwin14 with Xcode 7

2015-12-16 Thread bernds at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67973

--- Comment #13 from Bernd Schmidt  ---
Oh, there's a URL field. Never saw that one before. Sorry for the noise.

[Bug tree-optimization/68861] [6 regression] FAIL: libgomp.fortran/vla8.f90 -O3 -g execution test

2015-12-16 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68861

Jeffrey A. Law  changed:

   What|Removed |Added

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

--- Comment #5 from Jeffrey A. Law  ---
I was dreading dreading digging into the SLP code, thanks for taking over on
this one Richi.

Confirmed that it works for my smaller testcase as well as the full vla8 test.

[Bug tree-optimization/68619] [6 Regression] error: loop with header 6 not in loop tree

2015-12-16 Thread law at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68619
Bug 68619 depends on bug 68861, which changed state.

Bug 68861 Summary: [6 regression] FAIL: libgomp.fortran/vla8.f90   -O3 -g  
execution test
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68861

   What|Removed |Added

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

[Bug lto/68902] --as-needed consider library as unneeded even when library have __init functions

2015-12-16 Thread socketpair at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68902

--- Comment #2 from Коренберг Марк  ---
https://sourceware.org/bugzilla/show_bug.cgi?id=19372

[Bug middle-end/68870] [6 Regression] ICE on valid code at -O1, -O2 and -O3 on x86_64-linux-gnu

2015-12-16 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68870

--- Comment #10 from Richard Biener  ---
Author: rguenth
Date: Wed Dec 16 14:56:10 2015
New Revision: 231695

URL: https://gcc.gnu.org/viewcvs?rev=231695&root=gcc&view=rev
Log:
2015-12-16  Richard Biener  

PR tree-optimization/68870
* tree-cfgcleanup.c (cleanup_control_expr_graph): Add first_p
parameter, if set only perform trivial constant folding.
Queue other blocks with conditions for later processing.
(cleanup_control_flow_bb): Add first_p parameter and pass it through.
(cleanup_tree_cfg_1): Pass true for the first iteration
cleanup_control_expr_graph.

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

Added:
trunk/gcc/testsuite/gcc.dg/torture/pr68870.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-cfgcleanup.c

[Bug middle-end/68870] [6 Regression] ICE on valid code at -O1, -O2 and -O3 on x86_64-linux-gnu

2015-12-16 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68870

Richard Biener  changed:

   What|Removed |Added

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

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

[Bug target/68696] [6 Regression] FAIL: gcc.target/aarch64/vbslq_u64_1.c scan-assembler-times bif\\tv 1

2015-12-16 Thread ktkachov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68696

ktkachov at gcc dot gnu.org changed:

   What|Removed |Added

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

--- Comment #3 from ktkachov at gcc dot gnu.org ---
Fixed.

[Bug target/68696] [6 Regression] FAIL: gcc.target/aarch64/vbslq_u64_1.c scan-assembler-times bif\\tv 1

2015-12-16 Thread ktkachov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68696

--- Comment #2 from ktkachov at gcc dot gnu.org ---
Author: ktkachov
Date: Wed Dec 16 15:03:44 2015
New Revision: 231696

URL: https://gcc.gnu.org/viewcvs?rev=231696&root=gcc&view=rev
Log:
[AArch64] PR target/68696 FAIL: gcc.target/aarch64/vbslq_u64_1.c
scan-assembler-times bif\tv 1

PR target/68696
* config/aarch64/aarch64-simd.md (*aarch64_simd_bsl_alt):
New pattern.
(aarch64_simd_bsl_internal): Update comment to reflect
the above.

Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/aarch64/aarch64-simd.md

[Bug c++/68939] ICE or wrong code with OpenMP privatization of reference to VLAs

2015-12-16 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68939

Jakub Jelinek  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2015-12-16
 CC||jason at gcc dot gnu.org
 Ever confirmed|0   |1

[Bug c++/68939] New: ICE or wrong code with OpenMP privatization of reference to VLAs

2015-12-16 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68939

Bug ID: 68939
   Summary: ICE or wrong code with OpenMP privatization of
reference to VLAs
   Product: gcc
   Version: 6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: jakub at gcc dot gnu.org
  Target Milestone: ---

int main ()
{
  int y = 6;
  int a[y - 2];
  int (&c)[y - 2] = a;
  c[0] = 111;

  #pragma omp target private (c)
  c[0] = 222;

  return 0;
}

results in wrong-code being generated (use of uninitialized variable in the
outlined region for determining the size of the private c size), and in ICE
with say:
int main ()
{
  int y = 6;
  int a[y - 2];
  int (&c)[y - 2] = a;
  c[0] = 111;

  #pragma omp parallel private (c)
  #pragma omp single
c[0] = 222;
  return 0;
}
Following is also wrong-code.
int main ()
{
  int y = 6;
  int a[y - 2];
  typedef int T[y - 2];
  T &c = a;
  c[0] = 111;

  #pragma omp target private (c)
  c[0] = 222;

  return 0;
}

I believe the problem is because of some Ada mess the gimplifier no longer
recurses in gimplify_type_sizes on REFERENCE_TYPE.  Well, for all we care, it
would be enough to handle the toplevel REFERENCE_TYPE and nothing else.
But, if we can't change gimplify_type_sizes because of Ada, perhaps we should
tweak the C++ FE so that it arranges to emit a DECL_EXPR with a dummy TYPE_DECL
so that the referenced type sizes are gimplified?

[Bug fortran/67509] [6 regression] FAIL: gfortran.dg/ieee/ieee_7.f90 -O0 execution test

2015-12-16 Thread seurer at linux dot vnet.ibm.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67509

--- Comment #7 from Bill Seurer  ---
It does not appear this patch was ever submitted as this test is still failing.

[Bug target/66785] internal compiler error in record_operand_use

2015-12-16 Thread bernds at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66785

Bernd Schmidt  changed:

   What|Removed |Added

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

--- Comment #6 from Bernd Schmidt  ---
I looked at it and decided it's probably fine.

[Bug fortran/67044] ICE: in aggregate_value_p, at function.c:2068

2015-12-16 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67044

vehre at gcc dot gnu.org changed:

   What|Removed |Added

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

--- Comment #5 from vehre at gcc dot gnu.org ---
I don't see the ICE on trunk 6.0 anymore, therefore closing as fixed.

[Bug c++/67050] [C++14] ICE when calling a template member function from a lambda with implicit "this" capture

2015-12-16 Thread bernds at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67050

Bernd Schmidt  changed:

   What|Removed |Added

 CC||bernds at gcc dot gnu.org

--- Comment #4 from Bernd Schmidt  ---
I can't reproduce this with current trunk, I just get these errors:

tst.cc: In instantiation of ‘Foo::test():: [with auto:1 =
int]’:
tst.cc:6:35:   required by substitution of ‘template
Foo::test()operator decltype
(((Foo::test()::)0u).operator()(arg)) (*)(auto:1)() const [with
auto:1 = int]’
tst.cc:10:17:   required from here
tst.cc:8:29: error: cannot call member function ‘void Foo::X() [with
 = int]’ without object
 X();
 ^~

tst.cc: In instantiation of ‘Foo::test():: [with auto:2 =
int]’:
tst.cc:12:35:   required by substitution of ‘template
Foo::test()operator decltype
(((Foo::test()::)0u).operator()(arg)) (*)(auto:2)() const [with
auto:2 = int]’
tst.cc:15:17:   required from here
tst.cc:13:29: error: cannot call member function ‘void Foo::X() [with
 = int]’ without object
 X();
 ^~

Can anyone else, or should we close it?

[Bug c++/67050] [C++14] ICE when calling a template member function from a lambda with implicit "this" capture

2015-12-16 Thread ldionne.2 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67050

--- Comment #5 from Louis Dionne  ---
Agreed, the ICE seems to be fixed on trunk. However, the error you're getting
is still a bug, right? The code compiles if I use `this->X()`,
but not `X()` alone.

[Bug target/67808] LRA ICEs on simple double to long double conversion test case

2015-12-16 Thread bernds at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67808

Bernd Schmidt  changed:

   What|Removed |Added

 CC||bernds at gcc dot gnu.org

--- Comment #5 from Bernd Schmidt  ---
Can this be closed?

  1   2   3   >